mivita/resources/assets/vendor/libs/bootstrap-table/bootstrap-table.js
2018-10-29 09:39:31 +01:00

1 line
No EOL
58 KiB
JavaScript
Executable file

!function(t,i){var e=function(t){var i={};function e(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=363)}({362:function(t,i){!function(t){"use strict";var i=3;try{i=parseInt(t.fn.dropdown.Constructor.VERSION,10)}catch(t){}var e={3:{buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggleOff:"glyphicon-list-alt icon-list-alt",toggleOn:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus",fullscreen:"glyphicon-fullscreen"},pullClass:"pull",toobarDropdowHtml:['<ul class="dropdown-menu" role="menu">',"</ul>"],toobarDropdowItemHtml:'<li role="menuitem"><label>%s</label></li>',pageDropdownHtml:['<ul class="dropdown-menu" role="menu">',"</ul>"],pageDropdownItemHtml:'<li role="menuitem" class="%s"><a href="#">%s</a></li>'},4:{buttonsClass:"secondary",iconsPrefix:"fa",icons:{paginationSwitchDown:"fa-toggle-down",paginationSwitchUp:"fa-toggle-up",refresh:"fa-refresh",toggleOff:"fa-toggle-off",toggleOn:"fa-toggle-on",columns:"fa-th-list",detailOpen:"fa-plus",detailClose:"fa-minus",fullscreen:"fa-arrows-alt"},pullClass:"float",toobarDropdowHtml:['<div class="dropdown-menu dropdown-menu-right">',"</div>"],toobarDropdowItemHtml:'<label class="dropdown-item">%s</label>',pageDropdownHtml:['<div class="dropdown-menu">',"</div>"],pageDropdownItemHtml:'<a class="dropdown-item %s" href="#">%s</a>'}}[i],o=null,s=function(t){var i=arguments,e=!0,o=1;return t=t.replace(/%s/g,function(){var t=i[o++];return void 0===t?(e=!1,""):t}),e?t:""},n=function(){if(null===o){var i,e,s=t("<p/>").addClass("fixed-table-scroll-inner"),n=t("<div/>").addClass("fixed-table-scroll-outer");n.append(s),t("body").append(n),i=s[0].offsetWidth,n.css("overflow","scroll"),e=s[0].offsetWidth,i===e&&(e=n[0].clientWidth),n.remove(),o=i-e}return o},a=function(i,e,o,n){var a=e;if("string"==typeof e){var r=e.split(".");r.length>1?(a=window,t.each(r,function(t,i){a=a[i]})):a=window[e]}return"object"==typeof a?a:"function"==typeof a?a.apply(i,o||[]):!a&&"string"==typeof e&&s.apply(this,[e].concat(o))?s.apply(this,[e].concat(o)):n},r=function(i,e,o){var s=Object.getOwnPropertyNames||function(t){var i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e);return i},n=s(i),a=s(e),r="";if(o&&n.length!==a.length)return!1;for(var l=0;l<n.length;l++)if(r=n[l],t.inArray(r,a)>-1&&i[r]!==e[r])return!1;return!0},l=function(t){return"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#x60;"):t},h=function(t){for(var i in t){var e=i.split(/(?=[A-Z])/).join("-").toLowerCase();e!==i&&(t[e]=t[i],delete t[i])}return t},p=function(t,i,e){var o=t;if("string"!=typeof i||t.hasOwnProperty(i))return e?l(t[i]):t[i];var s=i.split(".");for(var n in s)s.hasOwnProperty(n)&&(o=o&&o[s[n]]);return e?l(o):o},c=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},d=function(i,e){this.options=e,this.$el=t(i),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};d.DEFAULTS={classes:"table table-hover",sortClass:void 0,locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,rememberOrder:!1,striped:!1,columns:[[]],data:[],totalField:"total",dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(t){return t},queryParamsType:"limit",responseHandler:function(t){return t},pagination:!1,onlyInfoPagination:!1,paginationLoop:!0,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"&lsaquo;",paginationNextText:"&rsaquo;",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,showFullscreen:!1,smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(t,i){return""},detailFilter:function(t,i){return!0},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",buttonsToolbar:void 0,buttonsAlign:"right",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:e.buttonsClass,iconsPrefix:e.iconsPrefix,icons:e.icons,customSearch:t.noop,customSort:t.noop,ignoreClickToSelectOn:function(i){return t.inArray(i.tagName,["A","BUTTON"])},rowStyle:function(t,i){return{}},rowAttributes:function(t,i){return{}},footerStyle:function(t,i){return{}},onAll:function(t,i){return!1},onClickCell:function(t,i,e,o){return!1},onDblClickCell:function(t,i,e,o){return!1},onClickRow:function(t,i){return!1},onDblClickRow:function(t,i){return!1},onSort:function(t,i){return!1},onCheck:function(t){return!1},onUncheck:function(t){return!1},onCheckAll:function(t){return!1},onUncheckAll:function(t){return!1},onCheckSome:function(t){return!1},onUncheckSome:function(t){return!1},onLoadSuccess:function(t){return!1},onLoadError:function(t){return!1},onColumnSwitch:function(t,i){return!1},onPageChange:function(t,i){return!1},onSearch:function(t){return!1},onToggle:function(t){return!1},onPreBody:function(t){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(t,i,e){return!1},onCollapseRow:function(t,i){return!1},onRefreshOptions:function(t){return!1},onRefresh:function(t){return!1},onResetView:function(){return!1},onScrollBody:function(){return!1}},(d.LOCALES={})["en-US"]=d.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(t){return s("%s rows per page",t)},formatShowingRows:function(t,i,e){return s("Showing %s to %s of %s rows",t,i,e)},formatDetailPagination:function(t){return s("Showing %s rows",t)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatFullscreen:function(){return"Fullscreen"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},t.extend(d.DEFAULTS,d.LOCALES["en-US"]),d.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,class:void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0,escape:!1,showSelectTitle:!1},d.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh","scroll-body.bs.table":"onScrollBody"},d.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initHiddenRows(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},d.prototype.initLocale=function(){if(this.options.locale){var i=this.options.locale.split(/-|_/);i[0].toLowerCase(),i[1]&&i[1].toUpperCase(),t.fn.bootstrapTable.locales[this.options.locale]?t.extend(this.options,t.fn.bootstrapTable.locales[this.options.locale]):t.fn.bootstrapTable.locales[i.join("-")]?t.extend(this.options,t.fn.bootstrapTable.locales[i.join("-")]):t.fn.bootstrapTable.locales[i[0]]&&t.extend(this.options,t.fn.bootstrapTable.locales[i[0]])}},d.prototype.initContainer=function(){this.$container=t(['<div class="bootstrap-table">','<div class="fixed-table-toolbar"></div>',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination" style="clear: both;"></div>':"",'<div class="fixed-table-container">','<div class="fixed-table-header"><table></table></div>','<div class="fixed-table-body">','<div class="fixed-table-loading">',this.options.formatLoadingMessage(),"</div>","</div>",'<div class="fixed-table-footer"><table><tr></tr></table></div>',"</div>","bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination"></div>':"","</div>"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.options.buttonsToolbar?this.$toolbar=t("body").find(this.options.buttonsToolbar):this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('<div class="clearfix"></div>'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==t.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},d.prototype.initTable=function(){var i=this,e=[],o=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=t("<thead></thead>").appendTo(this.$el)),this.$header.find("tr").each(function(){var i=[];t(this).find("th").each(function(){void 0!==t(this).data("field")&&t(this).data("field",t(this).data("field")+""),i.push(t.extend({},{title:t(this).html(),class:t(this).attr("class"),titleTooltip:t(this).attr("title"),rowspan:t(this).attr("rowspan")?+t(this).attr("rowspan"):void 0,colspan:t(this).attr("colspan")?+t(this).attr("colspan"):void 0},t(this).data()))}),e.push(i)}),t.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=t.extend(!0,[],e,this.options.columns),this.columns=[],this.fieldsColumnsIndex=[],function(i){var e,o,s,n=0,a=[];for(e=0;e<i[0].length;e++)n+=i[0][e].colspan||1;for(e=0;e<i.length;e++)for(a[e]=[],o=0;o<n;o++)a[e][o]=!1;for(e=0;e<i.length;e++)for(o=0;o<i[e].length;o++){var r=i[e][o],l=r.rowspan||1,h=r.colspan||1,p=t.inArray(!1,a[e]);for(1===h&&(r.fieldIndex=p,void 0===r.field&&(r.field=p)),s=0;s<l;s++)a[e+s][p]=!0;for(s=0;s<h;s++)a[e][p+s]=!0}}(this.options.columns),t.each(this.options.columns,function(e,o){t.each(o,function(o,s){void 0!==(s=t.extend({},d.COLUMN_DEFAULTS,s)).fieldIndex&&(i.columns[s.fieldIndex]=s,i.fieldsColumnsIndex[s.field]=s.fieldIndex),i.options.columns[e][o]=s})}),!this.options.data.length){var s=[];this.$el.find(">tbody>tr").each(function(e){var n={};n._id=t(this).attr("id"),n._class=t(this).attr("class"),n._data=h(t(this).data()),t(this).find(">td").each(function(o){for(var a,r,l=t(this),p=+l.attr("colspan")||1,c=+l.attr("rowspan")||1;s[e]&&s[e][o];o++);for(a=o;a<o+p;a++)for(r=e;r<e+c;r++)s[r]||(s[r]=[]),s[r][a]=!0;var d=i.columns[o].field;n[d]=t(this).html(),n["_"+d+"_id"]=t(this).attr("id"),n["_"+d+"_class"]=t(this).attr("class"),n["_"+d+"_rowspan"]=t(this).attr("rowspan"),n["_"+d+"_colspan"]=t(this).attr("colspan"),n["_"+d+"_title"]=t(this).attr("title"),n["_"+d+"_data"]=h(t(this).data())}),o.push(n)}),this.options.data=o,o.length&&(this.fromHtml=!0)}},d.prototype.initHeader=function(){var i=this,e={},o=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},t.each(this.options.columns,function(n,a){o.push("<tr>"),0===n&&!i.options.cardView&&i.options.detailView&&o.push(s('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',i.options.columns.length)),t.each(a,function(t,n){var a="",r="",h="",p="",c=s(' class="%s"',n.class),d=(i.options.sortOrder||n.order,"px"),u=n.width;if(void 0===n.width||i.options.cardView||"string"==typeof n.width&&-1!==n.width.indexOf("%")&&(d="%"),n.width&&"string"==typeof n.width&&(u=n.width.replace("%","").replace("px","")),r=s("text-align: %s; ",n.halign?n.halign:n.align),h=s("text-align: %s; ",n.align),p=s("vertical-align: %s; ",n.valign),p+=s("width: %s; ",!n.checkbox&&!n.radio||u?u?u+d:void 0:n.showSelectTitle?void 0:"36px"),void 0!==n.fieldIndex){if(i.header.fields[n.fieldIndex]=n.field,i.header.styles[n.fieldIndex]=h+p,i.header.classes[n.fieldIndex]=c,i.header.formatters[n.fieldIndex]=n.formatter,i.header.events[n.fieldIndex]=n.events,i.header.sorters[n.fieldIndex]=n.sorter,i.header.sortNames[n.fieldIndex]=n.sortName,i.header.cellStyles[n.fieldIndex]=n.cellStyle,i.header.searchables[n.fieldIndex]=n.searchable,!n.visible)return;if(i.options.cardView&&!n.cardVisible)return;e[n.field]=n}o.push("<th"+s(' title="%s"',n.titleTooltip),n.checkbox||n.radio?s(' class="bs-checkbox %s"',n.class||""):c,s(' style="%s"',r+p),s(' rowspan="%s"',n.rowspan),s(' colspan="%s"',n.colspan),s(' data-field="%s"',n.field),0===t&&n.fieldIndex?" data-not-first-th":"",">"),o.push(s('<div class="th-inner %s">',i.options.sortable&&n.sortable?"sortable both":""));var f=a=i.options.escape?l(n.title):n.title;n.checkbox&&(a="",!i.options.singleSelect&&i.options.checkboxHeader&&(a='<input name="btSelectAll" type="checkbox" />'),i.header.stateField=n.field),n.radio&&(a="",i.header.stateField=n.field,i.options.singleSelect=!0),!a&&n.showSelectTitle&&(a+=f),o.push(a),o.push("</div>"),o.push('<div class="fht-cell"></div>'),o.push("</div>"),o.push("</th>")}),o.push("</tr>")}),this.$header.html(o.join("")),this.$header.find("th[data-field]").each(function(i){t(this).data(e[t(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){var o=t(this);if(i.options.detailView&&!o.parent().hasClass("bs-checkbox")&&o.closest(".bootstrap-table")[0]!==i.$container[0])return!1;i.options.sortable&&o.parent().data().sortable&&i.onSort(e)}),this.$header.children().children().off("keypress").on("keypress",function(e){if(i.options.sortable&&t(this).data().sortable){var o=e.keyCode||e.which;13==o&&i.onSort(e)}}),t(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),t(window).on("resize.bootstrap-table",t.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var e=t(this).prop("checked");i[e?"checkAll":"uncheckAll"](),i.updateSelected()})},d.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},d.prototype.initData=function(t,i){this.options.data="append"===i?this.options.data.concat(t):"prepend"===i?[].concat(t).concat(this.options.data):t||this.options.data,this.data=this.options.data,"server"!==this.options.sidePagination&&this.initSort()},d.prototype.initSort=function(){var i=this,e=this.options.sortName,o="desc"===this.options.sortOrder?-1:1,n=t.inArray(this.options.sortName,this.header.fields),r=0;this.options.customSort===t.noop?-1!==n&&(this.options.sortStable&&t.each(this.data,function(t,i){i._position=t}),this.data.sort(function(s,r){i.header.sortNames[n]&&(e=i.header.sortNames[n]);var l=p(s,e,i.options.escape),h=p(r,e,i.options.escape),c=a(i.header,i.header.sorters[n],[l,h,s,r]);return void 0!==c?i.options.sortStable&&0===c?s._position-r._position:o*c:(void 0!==l&&null!==l||(l=""),void 0!==h&&null!==h||(h=""),i.options.sortStable&&l===h?(l=s._position,h=r._position,s._position-r._position):t.isNumeric(l)&&t.isNumeric(h)?(l=parseFloat(l),h=parseFloat(h),l<h?-1*o:o):l===h?0:("string"!=typeof l&&(l=l.toString()),-1===l.localeCompare(h)?-1*o:o))}),void 0!==this.options.sortClass&&(clearTimeout(r),r=setTimeout(function(){i.$el.removeClass(i.options.sortClass);var t=i.$header.find(s('[data-field="%s"]',i.options.sortName).index()+1);i.$el.find(s("tr td:nth-child(%s)",t)).addClass(i.options.sortClass)},250))):this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder])},d.prototype.onSort=function(i){var e="keypress"===i.type?t(i.currentTarget):t(i.currentTarget).parent(),o=this.$header.find("th").eq(e.index());this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===e.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=e.data("field"),this.options.rememberOrder?this.options.sortOrder="asc"===e.data("order")?"desc":"asc":this.options.sortOrder=this.columns[this.fieldsColumnsIndex[e.data("field")]].order),this.trigger("sort",this.options.sortName,this.options.sortOrder),e.add(o).data("order",this.options.sortOrder),this.getCaret(),"server"!==this.options.sidePagination?(this.initSort(),this.initBody()):this.initServer(this.options.silentSort)},d.prototype.initToolbar=function(){var i,o,n=this,r=[],l=0,h=0;this.$toolbar.find(".bs-bars").children().length&&t("body").append(t(this.options.toolbar)),this.$toolbar.html(""),"string"!=typeof this.options.toolbar&&"object"!=typeof this.options.toolbar||t(s('<div class="bs-bars %s-%s"></div>',e.pullClass,this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),r=[s('<div class="columns columns-%s btn-group %s-%s">',this.options.buttonsAlign,e.pullClass,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=a(null,this.options.icons)),this.options.showPaginationSwitch&&r.push(s('<button class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+'" type="button" name="paginationSwitch" aria-label="pagination Switch" title="%s">',this.options.formatPaginationSwitch()),s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.paginationSwitchDown),"</button>"),this.options.showFullscreen&&this.$toolbar.find('button[name="fullscreen"]').off("click").on("click",t.proxy(this.toggleFullscreen,this)),this.options.showRefresh&&r.push(s('<button class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+'" type="button" name="refresh" aria-label="refresh" title="%s">',this.options.formatRefresh()),s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.refresh),"</button>"),this.options.showToggle&&r.push(s('<button class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+'" type="button" name="toggle" aria-label="toggle" title="%s">',this.options.formatToggle()),s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.toggleOff),"</button>"),this.options.showFullscreen&&r.push(s('<button class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+'" type="button" name="fullscreen" aria-label="fullscreen" title="%s">',this.options.formatFullscreen()),s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.fullscreen),"</button>"),this.options.showColumns&&(r.push(s('<div class="keep-open btn-group" title="%s">',this.options.formatColumns()),'<button type="button" aria-label="columns" class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">',s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.columns),' <span class="caret"></span>',"</button>",e.toobarDropdowHtml[0]),t.each(this.columns,function(t,i){if(!i.radio&&!i.checkbox&&(!n.options.cardView||i.cardVisible)){var o=i.visible?' checked="checked"':"";i.switchable&&(r.push(s(e.toobarDropdowItemHtml,s('<input type="checkbox" data-field="%s" value="%s"%s> %s',i.field,t,o,i.title))),h++)}}),r.push(e.toobarDropdowHtml[1],"</div>")),r.push("</div>"),(this.showToolbar||r.length>2)&&this.$toolbar.append(r.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",t.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",t.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){n.toggleView()}),this.options.showColumns&&(i=this.$toolbar.find(".keep-open"),h<=this.options.minimumCountColumns&&i.find("input").prop("disabled",!0),i.find("li").off("click").on("click",function(t){t.stopImmediatePropagation()}),i.find("input").off("click").on("click",function(){var i=t(this);n.toggleColumn(t(this).val(),i.prop("checked"),!1),n.trigger("column-switch",t(this).data("field"),i.prop("checked"))})),this.options.search&&((r=[]).push(s('<div class="%s-%s search">',e.pullClass,this.options.searchAlign),s('<input class="form-control'+s(" input-%s",this.options.iconSize)+'" type="text" placeholder="%s">',this.options.formatSearch()),"</div>"),this.$toolbar.append(r.join("")),(o=this.$toolbar.find(".search input")).off("keyup drop blur").on("keyup drop blur",function(i){n.options.searchOnEnterKey&&13!==i.keyCode||t.inArray(i.keyCode,[37,38,39,40])>-1||(clearTimeout(l),l=setTimeout(function(){n.onSearch(i)},n.options.searchTimeOut))}),c()&&o.off("mouseup").on("mouseup",function(t){clearTimeout(l),l=setTimeout(function(){n.onSearch(t)},n.options.searchTimeOut)}))},d.prototype.onSearch=function(i){var e=t.trim(t(i.currentTarget).val());this.options.trimOnSearch&&t(i.currentTarget).val()!==e&&t(i.currentTarget).val(e),e!==this.searchText&&(this.searchText=e,this.options.searchText=e,this.options.pageNumber=1,this.initSearch(),i.firedByInitSearchText?"client"===this.options.sidePagination&&this.updatePagination():this.updatePagination(),this.trigger("search",e))},d.prototype.initSearch=function(){var i=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==t.noop)return void window[this.options.customSearch].apply(this,[this.searchText]);var e=this.searchText&&(this.options.escape?l(this.searchText):this.searchText).toLowerCase(),o=t.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=o?t.grep(this.options.data,function(i,e){for(var s in o)if(t.isArray(o[s])&&-1===t.inArray(i[s],o[s])||!t.isArray(o[s])&&i[s]!==o[s])return!1;return!0}):this.options.data,this.data=e?t.grep(this.data,function(o,s){for(var n=0;n<i.header.fields.length;n++)if(i.header.searchables[n]){var r,l=t.isNumeric(i.header.fields[n])?parseInt(i.header.fields[n],10):i.header.fields[n],h=i.columns[i.fieldsColumnsIndex[l]];if("string"==typeof l){r=o;for(var p=l.split("."),c=0;c<p.length;c++)null!=r[p[c]]&&(r=r[p[c]]);h&&h.searchFormatter&&(r=a(h,i.header.formatters[n],[r,o,s],r))}else r=o[l];if("string"==typeof r||"number"==typeof r)if(i.options.strictSearch){if((r+"").toLowerCase()===e)return!0}else if(-1!==(r+"").toLowerCase().indexOf(e))return!0}return!1}):this.data}},d.prototype.initPagination=function(){if(this.options.pagination){this.$pagination.show();var i,o,n,a,r,l,h,p=this,c=[],d=!1,u=this.getData(),f=this.options.pageList;if("server"!==this.options.sidePagination&&(this.options.totalRows=u.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,d=!0;else if(this.options.pageSize===this.options.totalRows){var g="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;t.inArray(this.options.formatAllRows().toLowerCase(),g)>-1&&(d=!0)}this.totalPages=1+~~((this.options.totalRows-1)/this.options.pageSize),this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),c.push(s('<div class="%s-%s pagination-detail">',e.pullClass,this.options.paginationDetailHAlign),'<span class="pagination-info">',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"</span>"),!this.options.onlyInfoPagination){c.push('<span class="page-list">');var b=[s('<span class="btn-group %s">',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'<button type="button" class="btn'+s(" btn-%s",this.options.buttonsClass)+s(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">','<span class="page-size">',d?this.options.formatAllRows():this.options.pageSize,"</span>",' <span class="caret"></span>',"</button>",e.pageDropdownHtml[0]];if("string"==typeof this.options.pageList){var m=this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").split(",");f=[],t.each(m,function(t,i){f.push(i.toUpperCase()===p.options.formatAllRows().toUpperCase()||"UNLIMITED"===i.toUpperCase()?p.options.formatAllRows():+i)})}for(t.each(f,function(t,i){var o;(!p.options.smartDisplay||0===t||f[t-1]<p.options.totalRows)&&(o=d?i===p.options.formatAllRows()?"active":"":i===p.options.pageSize?"active":"",b.push(s(e.pageDropdownItemHtml,o,i)))}),b.push(e.pageDropdownHtml[1]+"</span>"),c.push(this.options.formatRecordsPerPage(b.join(""))),c.push("</span>"),c.push("</div>",s('<div class="%s-%s pagination">',e.pullClass,this.options.paginationHAlign),'<ul class="pagination'+s(" pagination-%s",this.options.iconSize)+'">',s('<li class="page-item page-pre"><a class="page-link" href="#">%s</a></li>',this.options.paginationPreText)),this.totalPages<5?(o=1,n=this.totalPages):(o=this.options.pageNumber-2,n=o+4,o<1&&(o=1,n=5),n>this.totalPages&&(n=this.totalPages,o=n-4)),this.totalPages>=6&&(this.options.pageNumber>=3&&(c.push(s('<li class="page-item page-first%s">',1===this.options.pageNumber?" active":""),'<a class="page-link" href="#">',1,"</a>","</li>"),o++),this.options.pageNumber>=4&&(4==this.options.pageNumber||6==this.totalPages||7==this.totalPages?o--:c.push('<li class="page-item page-first-separator disabled">','<a class="page-link" href="#">...</a>',"</li>"),n--)),this.totalPages>=7&&this.options.pageNumber>=this.totalPages-2&&o--,6==this.totalPages?this.options.pageNumber>=this.totalPages-2&&n++:this.totalPages>=7&&(7==this.totalPages||this.options.pageNumber>=this.totalPages-3)&&n++,i=o;i<=n;i++)c.push(s('<li class="page-item%s">',i===this.options.pageNumber?" active":""),'<a class="page-link" href="#">',i,"</a>","</li>");this.totalPages>=8&&this.options.pageNumber<=this.totalPages-4&&c.push('<li class="page-item page-last-separator disabled">','<a class="page-link" href="#">...</a>',"</li>"),this.totalPages>=6&&this.options.pageNumber<=this.totalPages-3&&c.push(s('<li class="page-item page-last%s">',this.totalPages===this.options.pageNumber?" active":""),'<a class="page-link" href="#">',this.totalPages,"</a>","</li>"),c.push(s('<li class="page-item page-next"><a class="page-link" href="#">%s</a></li>',this.options.paginationNextText),"</ul>","</div>")}this.$pagination.html(c.join("")),this.options.onlyInfoPagination||(a=this.$pagination.find(".page-list a"),r=this.$pagination.find(".page-pre"),l=this.$pagination.find(".page-next"),h=this.$pagination.find(".page-item").not(".page-next, .page-pre"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(f.length<2||this.options.totalRows<=f[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&r.addClass("disabled"),this.options.pageNumber===this.totalPages&&l.addClass("disabled")),d&&(this.options.pageSize=this.options.formatAllRows()),a.off("click").on("click",t.proxy(this.onPageListChange,this)),r.off("click").on("click",t.proxy(this.onPagePre,this)),l.off("click").on("click",t.proxy(this.onPageNext,this)),h.off("click").on("click",t.proxy(this.onPageNumber,this)))}else this.$pagination.hide()},d.prototype.updatePagination=function(i){i&&t(i.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},d.prototype.onPageListChange=function(i){i.preventDefault();var e=t(i.currentTarget);return e.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=e.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+e.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(i),!1},d.prototype.onPagePre=function(t){return t.preventDefault(),this.options.pageNumber-1==0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(t),!1},d.prototype.onPageNext=function(t){return t.preventDefault(),this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(t),!1},d.prototype.onPageNumber=function(i){if(i.preventDefault(),this.options.pageNumber!==+t(i.currentTarget).text())return this.options.pageNumber=+t(i.currentTarget).text(),this.updatePagination(i),!1},d.prototype.initRow=function(i,e,o,n){var r,h=this,c=[],d={},u=[],f="",g={},b=[];if(!(t.inArray(i,this.hiddenRows)>-1)){if((d=a(this.options,this.options.rowStyle,[i,e],d))&&d.css)for(r in d.css)u.push(r+": "+d.css[r]);if(g=a(this.options,this.options.rowAttributes,[i,e],g))for(r in g)b.push(s('%s="%s"',r,l(g[r])));return i._data&&!t.isEmptyObject(i._data)&&t.each(i._data,function(t,i){"index"!==t&&(f+=s(' data-%s="%s"',t,i))}),c.push("<tr",s(" %s",b.join(" ")),s(' id="%s"',t.isArray(i)?void 0:i._id),s(' class="%s"',d.classes||(t.isArray(i)?void 0:i._class)),s(' data-index="%s"',e),s(' data-uniqueid="%s"',i[this.options.uniqueId]),s("%s",f),">"),this.options.cardView&&c.push(s('<td colspan="%s"><div class="card-views">',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&(c.push("<td>"),a(null,this.options.detailFilter,[e,i])&&c.push('<a class="detail-icon" href="#">',s('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.detailOpen),"</a>"),c.push("</td>")),t.each(this.header.fields,function(o,n){var r="",f=p(i,n,h.options.escape),g="",b="",m={},y="",w=h.header.classes[o],v="",x="",S="",$="",k=h.columns[o];if((!h.fromHtml||void 0!==f||k.checkbox||k.radio)&&k.visible&&(!h.options.cardView||k.cardVisible)){if(k.escape&&(f=l(f)),d=s('style="%s"',u.concat(h.header.styles[o]).join("; ")),i["_"+n+"_id"]&&(y=s(' id="%s"',i["_"+n+"_id"])),i["_"+n+"_class"]&&(w=s(' class="%s"',i["_"+n+"_class"])),i["_"+n+"_rowspan"]&&(x=s(' rowspan="%s"',i["_"+n+"_rowspan"])),i["_"+n+"_colspan"]&&(S=s(' colspan="%s"',i["_"+n+"_colspan"])),i["_"+n+"_title"]&&($=s(' title="%s"',i["_"+n+"_title"])),(m=a(h.header,h.header.cellStyles[o],[f,i,e,n],m)).classes&&(w=s(' class="%s"',m.classes)),m.css){var P=[];for(var C in m.css)P.push(C+": "+m.css[C]);d=s('style="%s"',P.concat(h.header.styles[o]).join("; "))}g=a(k,h.header.formatters[o],[f,i,e,n],f),i["_"+n+"_data"]&&!t.isEmptyObject(i["_"+n+"_data"])&&t.each(i["_"+n+"_data"],function(t,i){"index"!==t&&(v+=s(' data-%s="%s"',t,i))}),k.checkbox||k.radio?(b=k.checkbox?"checkbox":b,b=k.radio?"radio":b,r=[s(h.options.cardView?'<div class="card-view %s">':'<td class="bs-checkbox %s">',k.class||""),"<input"+s(' data-index="%s"',e)+s(' name="%s"',h.options.selectItemName)+s(' type="%s"',b)+s(' value="%s"',i[h.options.idField])+s(' checked="%s"',!0===g||f||g&&g.checked?"checked":void 0)+s(' disabled="%s"',!k.checkboxEnabled||g&&g.disabled?"disabled":void 0)+" />",h.header.formatters[o]&&"string"==typeof g?g:"",h.options.cardView?"</div>":"</td>"].join(""),i[h.header.stateField]=!0===g||!!f||g&&g.checked):(g=void 0===g||null===g?h.options.undefinedText:g,r=h.options.cardView?['<div class="card-view">',h.options.showHeader?s('<span class="title" %s>%s</span>',d,function(i,e,o,s){var n="";return t.each(i,function(t,i){return i[e]!==s||(n=i[o],!1)}),n}(h.columns,"field","title",n)):"",s('<span class="value">%s</span>',g),"</div>"].join(""):[s("<td%s %s %s %s %s %s %s>",y,w,d,v,x,S,$),g,"</td>"].join(""),h.options.cardView&&h.options.smartDisplay&&""===g&&(r='<div class="card-view"></div>')),c.push(r)}}),this.options.cardView&&c.push("</div></td>"),c.push("</tr>"),c.join(" ")}},d.prototype.initBody=function(i){var e=this,o=this.getData();this.trigger("pre-body",o),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=t("<tbody></tbody>").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=o.length);for(var n,r=t(document.createDocumentFragment()),l=this.pageFrom-1;l<this.pageTo;l++){var h=o[l],c=this.initRow(h,l,o,r);n=n||!!c,c&&!0!==c&&r.append(c)}n||r.append('<tr class="no-records-found">'+s('<td colspan="%s">%s</td>',this.$header.find("th").length,this.options.formatNoMatches())+"</tr>"),this.$body.html(r),i||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(i){var o=t(this),n=o.parent(),a=e.data[n.data("index")],r=o[0].cellIndex,l=e.getVisibleFields(),h=l[e.options.detailView&&!e.options.cardView?r-1:r],c=e.columns[e.fieldsColumnsIndex[h]],d=p(a,h,e.options.escape);if(!o.find(".detail-icon").length&&(e.trigger("click"===i.type?"click-cell":"dbl-click-cell",h,d,a,o),e.trigger("click"===i.type?"click-row":"dbl-click-row",a,n,h),"click"===i.type&&e.options.clickToSelect&&c.clickToSelect&&e.options.ignoreClickToSelectOn(i.target))){var u=n.find(s('[name="%s"]',e.options.selectItemName));u.length&&u[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(i){i.preventDefault();var n=t(this),r=n.parent().parent(),l=r.data("index"),h=o[l];if(r.next().is("tr.detail-view"))n.find("i").attr("class",s("%s %s",e.options.iconsPrefix,e.options.icons.detailOpen)),e.trigger("collapse-row",l,h,r.next()),r.next().remove();else{n.find("i").attr("class",s("%s %s",e.options.iconsPrefix,e.options.icons.detailClose)),r.after(s('<tr class="detail-view"><td colspan="%s"></td></tr>',r.find("td").length));var p=r.next().find("td"),c=a(e.options,e.options.detailFormatter,[l,h,p],"");1===p.length&&p.append(c),e.trigger("expand-row",l,h,p)}return e.resetView(),!1}),this.$selectItem=this.$body.find(s('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(i){i.stopImmediatePropagation();var o=t(this),s=o.prop("checked"),n=e.data[o.data("index")];(t(this).is(":radio")||e.options.singleSelect)&&t.each(e.options.data,function(t,i){i[e.header.stateField]=!1}),n[e.header.stateField]=s,e.options.singleSelect&&(e.$selectItem.not(this).each(function(){e.data[t(this).data("index")][e.header.stateField]=!1}),e.$selectItem.filter(":checked").not(this).prop("checked",!1)),e.updateSelected(),e.trigger(s?"check":"uncheck",n,o)}),t.each(this.header.events,function(i,o){if(o){"string"==typeof o&&(o=a(null,o));var s=e.header.fields[i],n=t.inArray(s,e.getVisibleFields());if(-1!==n)for(var r in e.options.detailView&&!e.options.cardView&&(n+=1),o)e.$body.find(">tr:not(.no-records-found)").each(function(){var i=t(this),a=i.find(e.options.cardView?".card-view":"td").eq(n),l=r.indexOf(" "),h=r.substring(0,l),p=r.substring(l+1),c=o[r];a.find(p).off(h).on(h,function(t){var o=i.data("index"),n=e.data[o],a=n[s];c.apply(this,[t,a,n,o])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",o)},d.prototype.initServer=function(i,e,o){var s,n=this,r={},l=t.inArray(this.options.sortName,this.header.fields),h={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.header.sortNames[l]&&(h.sortName=this.header.sortNames[l]),this.options.pagination&&"server"===this.options.sidePagination&&(h.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,h.pageNumber=this.options.pageNumber),(o||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(h={search:h.searchText,sort:h.sortName,order:h.sortOrder},this.options.pagination&&"server"===this.options.sidePagination&&(h.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),h.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,0===h.limit&&delete h.limit)),t.isEmptyObject(this.filterColumnsPartial)||(h.filter=JSON.stringify(this.filterColumnsPartial,null)),r=a(this.options,this.options.queryParams,[h],r),t.extend(r,e||{}),!1!==r&&(i||this.$tableLoading.show(),s=t.extend({},a(null,this.options.ajaxOptions),{type:this.options.method,url:o||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(r):r,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=a(n.options,n.options.responseHandler,[t],t),n.load(t),n.trigger("load-success",t),i||n.$tableLoading.hide()},error:function(t){var e=[];"server"===n.options.sidePagination&&((e={})[n.options.totalField]=0,e[n.options.dataField]=[]),n.load(e),n.trigger("load-error",t.status,t),i||n.$tableLoading.hide()}}),this.options.ajax?a(this,this.options.ajax,[s],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=t.ajax(s))))},d.prototype.initSearchText=function(){if(this.options.search&&(this.searchText="",""!==this.options.searchText)){var t=this.$toolbar.find(".search input");t.val(this.options.searchText),this.onSearch({currentTarget:t,firedByInitSearchText:!0})}},d.prototype.getCaret=function(){var i=this;t.each(this.$header.find("th"),function(e,o){t(o).find(".sortable").removeClass("desc asc").addClass(t(o).data("field")===i.options.sortName?i.options.sortOrder:"both")})},d.prototype.updateSelected=function(){var i=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",i),this.$selectItem.each(function(){t(this).closest("tr")[t(this).prop("checked")?"addClass":"removeClass"]("selected")})},d.prototype.updateRows=function(){var i=this;this.$selectItem.each(function(){i.data[t(this).data("index")][i.header.stateField]=t(this).prop("checked")})},d.prototype.resetRows=function(){var i=this;t.each(this.data,function(t,e){i.$selectAll.prop("checked",!1),i.$selectItem.prop("checked",!1),i.header.stateField&&(e[i.header.stateField]=!1)}),this.initHiddenRows()},d.prototype.trigger=function(i){var e=Array.prototype.slice.call(arguments,1);i+=".bs.table",this.options[d.EVENTS[i]].apply(this.options,e),this.$el.trigger(t.Event(i),e),this.options.onAll(i,e),this.$el.trigger(t.Event("all.bs.table"),[i,e])},d.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(t.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},d.prototype.fitHeader=function(){var i,e,o,a,r=this;if(r.$el.is(":hidden"))r.timeoutId_=setTimeout(t.proxy(r.fitHeader,r),100);else{if(i=this.$tableBody.get(0),e=i.scrollWidth>i.clientWidth&&i.scrollHeight>i.clientHeight+this.$header.outerHeight()?n():0,this.$el.css("margin-top",-this.$header.outerHeight()),(o=t(":focus")).length>0){var l=o.parents("th");if(l.length>0){var h=l.attr("data-field");if(void 0!==h){var p=this.$header.find("[data-field='"+h+"']");p.length>0&&p.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":e}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),(a=t(".focus-temp:visible:eq(0)")).length>0&&(a.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(i){r.$header_.find(s('th[data-field="%s"]',t(this).data("field"))).data(t(this).data())});var c=this.getVisibleFields(),d=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(i){var e=t(this),o=i;if(r.options.detailView&&!r.options.cardView&&(0===i&&r.$header_.find("th.detail").find(".fht-cell").width(e.innerWidth()),o=i-1),-1!==o){var n=r.$header_.find(s('th[data-field="%s"]',c[o]));n.length>1&&(n=t(d[e[0].cellIndex]));var a=n.width()-n.find(".fht-cell").width();n.find(".fht-cell").width(e.innerWidth()-a)}}),this.horizontalScroll(),this.trigger("post-header")}},d.prototype.resetFooter=function(){var i=this,e=i.getData(),o=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&o.push('<td><div class="th-inner">&nbsp;</div><div class="fht-cell"></div></td>'),t.each(this.columns,function(t,n){var r,l="",h="",p=[],c={},d=s(' class="%s"',n.class);if(n.visible&&(!i.options.cardView||n.cardVisible)){if(l=s("text-align: %s; ",n.falign?n.falign:n.align),h=s("vertical-align: %s; ",n.valign),(c=a(null,i.options.footerStyle))&&c.css)for(r in c.css)p.push(r+": "+c.css[r]);o.push("<td",d,s(' style="%s"',l+h+p.concat().join("; ")),">"),o.push('<div class="th-inner">'),o.push(a(n,n.footerFormatter,[e],"&nbsp;")||"&nbsp;"),o.push("</div>"),o.push('<div class="fht-cell"></div>'),o.push("</div>"),o.push("</td>")}}),this.$tableFooter.find("tr").html(o.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},d.prototype.fitFooter=function(){var i,e,o;clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100):(e=this.$el.css("width"),o=e>this.$tableBody.width()?n():0,this.$tableFooter.css({"margin-right":o}).find("table").css("width",e).attr("class",this.$el.attr("class")),i=this.$tableFooter.find("td"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(e){var o=t(this);i.eq(e).find(".fht-cell").width(o.innerWidth())}),this.horizontalScroll())},d.prototype.horizontalScroll=function(){var i=this;i.trigger("scroll-body"),this.$tableBody.off("scroll").on("scroll",function(){i.options.showHeader&&i.options.height&&i.$tableHeader.scrollLeft(t(this).scrollLeft()),i.options.showFooter&&!i.options.cardView&&i.$tableFooter.scrollLeft(t(this).scrollLeft())})},d.prototype.toggleColumn=function(t,i,e){if(-1!==t&&(this.columns[t].visible=i,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var o=this.$toolbar.find(".keep-open input").prop("disabled",!1);e&&o.filter(s('[value="%s"]',t)).prop("checked",i),o.filter(":checked").length<=this.options.minimumCountColumns&&o.filter(":checked").prop("disabled",!0)}},d.prototype.getVisibleFields=function(){var i=this,e=[];return t.each(this.header.fields,function(t,o){var s=i.columns[i.fieldsColumnsIndex[o]];s.visible&&e.push(o)}),e},d.prototype.resetView=function(t){var i=0;if(t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var e=this.$toolbar.outerHeight(!0),o=this.$pagination.outerHeight(!0),s=this.options.height-e-o;this.$tableContainer.css("height",s+"px")}if(this.options.cardView)return this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide();this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),i+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(i+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",i+"px"),this.trigger("reset-view")},d.prototype.getData=function(i){var e=this.options.data;return!this.searchText&&!this.options.sortName&&t.isEmptyObject(this.filterColumns)&&t.isEmptyObject(this.filterColumnsPartial)||(e=this.data),i?e.slice(this.pageFrom-1,this.pageTo):e},d.prototype.load=function(i){var e=!1;this.options.pagination&&"server"===this.options.sidePagination?(this.options.totalRows=i[this.options.totalField],e=i.fixedScroll,i=i[this.options.dataField]):t.isArray(i)||(e=i.fixedScroll,i=i.data),this.initData(i),this.initSearch(),this.initPagination(),this.initBody(e)},d.prototype.append=function(t){this.initData(t,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},d.prototype.prepend=function(t){this.initData(t,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},d.prototype.remove=function(i){var e,o,s=this.options.data.length;if(i.hasOwnProperty("field")&&i.hasOwnProperty("values")){for(e=s-1;e>=0;e--)(o=this.options.data[e]).hasOwnProperty(i.field)&&-1!==t.inArray(o[i.field],i.values)&&(this.options.data.splice(e,1),"server"===this.options.sidePagination&&(this.options.totalRows-=1));s!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},d.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},d.prototype.getRowByUniqueId=function(t){var i,e,o,s=this.options.uniqueId,n=this.options.data.length,a=null;for(i=n-1;i>=0;i--){if((e=this.options.data[i]).hasOwnProperty(s))o=e[s];else{if(!e._data.hasOwnProperty(s))continue;o=e._data[s]}if("string"==typeof o?t=t.toString():"number"==typeof o&&(Number(o)===o&&o%1==0?t=parseInt(t):o===Number(o)&&0!==o&&(t=parseFloat(t))),o===t){a=e;break}}return a},d.prototype.removeByUniqueId=function(t){var i=this.options.data.length,e=this.getRowByUniqueId(t);e&&this.options.data.splice(this.options.data.indexOf(e),1),i!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},d.prototype.updateByUniqueId=function(i){var e=this,o=t.isArray(i)?i:[i];t.each(o,function(i,o){var s;o.hasOwnProperty("id")&&o.hasOwnProperty("row")&&-1!==(s=t.inArray(e.getRowByUniqueId(o.id),e.options.data))&&t.extend(e.options.data[s],o.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},d.prototype.refreshColumnTitle=function(i){if(i.hasOwnProperty("field")&&i.hasOwnProperty("title")&&(this.columns[this.fieldsColumnsIndex[i.field]].title=this.options.escape?l(i.title):i.title,this.columns[this.fieldsColumnsIndex[i.field]].visible)){var e=void 0!==this.options.height?this.$tableHeader:this.$header;e.find("th[data-field]").each(function(e){if(t(this).data("field")===i.field)return t(t(this).find(".th-inner")[0]).text(i.title),!1})}},d.prototype.insertRow=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(this.options.data.splice(t.index,0,t.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},d.prototype.updateRow=function(i){var e=this,o=t.isArray(i)?i:[i];t.each(o,function(i,o){o.hasOwnProperty("index")&&o.hasOwnProperty("row")&&t.extend(e.options.data[o.index],o.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},d.prototype.initHiddenRows=function(){this.hiddenRows=[]},d.prototype.showRow=function(t){this.toggleRow(t,!0)},d.prototype.hideRow=function(t){this.toggleRow(t,!1)},d.prototype.toggleRow=function(i,e){var o,s;i.hasOwnProperty("index")?o=this.getData()[i.index]:i.hasOwnProperty("uniqueId")&&(o=this.getRowByUniqueId(i.uniqueId)),o&&(s=t.inArray(o,this.hiddenRows),e||-1!==s?e&&s>-1&&this.hiddenRows.splice(s,1):this.hiddenRows.push(o),this.initBody(!0))},d.prototype.getHiddenRows=function(i){var e=this,o=this.getData(),s=[];return t.each(o,function(i,o){t.inArray(o,e.hiddenRows)>-1&&s.push(o)}),this.hiddenRows=s,s},d.prototype.mergeCells=function(i){var e,o,s,n=i.index,a=t.inArray(i.field,this.getVisibleFields()),r=i.rowspan||1,l=i.colspan||1,h=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(a+=1),s=h.eq(n).find(">td").eq(a),!(n<0||a<0||n>=this.data.length)){for(e=n;e<n+r;e++)for(o=a;o<a+l;o++)h.eq(e).find(">td").eq(o).hide();s.attr("rowspan",r).attr("colspan",l).show()}},d.prototype.updateCell=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("field")&&t.hasOwnProperty("value")&&(this.data[t.index][t.field]=t.value,!1!==t.reinit&&(this.initSort(),this.initBody(!0)))},d.prototype.updateCellById=function(i){var e=this;if(i.hasOwnProperty("id")&&i.hasOwnProperty("field")&&i.hasOwnProperty("value")){var o=t.isArray(i)?i:[i];t.each(o,function(i,o){var s;-1!==(s=t.inArray(e.getRowByUniqueId(o.id),e.options.data))&&(e.data[s][o.field]=o.value)}),!1!==i.reinit&&(this.initSort(),this.initBody(!0))}},d.prototype.getOptions=function(){return t.extend(!0,{},this.options)},d.prototype.getSelections=function(){var i=this;return t.grep(this.options.data,function(t){return!0===t[i.header.stateField]})},d.prototype.getAllSelections=function(){var i=this;return t.grep(this.options.data,function(t){return t[i.header.stateField]})},d.prototype.checkAll=function(){this.checkAll_(!0)},d.prototype.uncheckAll=function(){this.checkAll_(!1)},d.prototype.checkInvert=function(){var i=this.$selectItem.filter(":enabled"),e=i.filter(":checked");i.each(function(){t(this).prop("checked",!t(this).prop("checked"))}),this.updateRows(),this.updateSelected(),this.trigger("uncheck-some",e),e=this.getSelections(),this.trigger("check-some",e)},d.prototype.checkAll_=function(t){var i;t||(i=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",t),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(),t&&(i=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",i)},d.prototype.check=function(t){this.check_(!0,t)},d.prototype.uncheck=function(t){this.check_(!1,t)},d.prototype.check_=function(t,i){var e=this.$selectItem.filter(s('[data-index="%s"]',i)).prop("checked",t);this.data[i][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[i],e)},d.prototype.checkBy=function(t){this.checkBy_(!0,t)},d.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},d.prototype.checkBy_=function(i,e){if(e.hasOwnProperty("field")&&e.hasOwnProperty("values")){var o=this,n=[];t.each(this.options.data,function(a,r){if(!r.hasOwnProperty(e.field))return!1;if(-1!==t.inArray(r[e.field],e.values)){var l=o.$selectItem.filter(":enabled").filter(s('[data-index="%s"]',a)).prop("checked",i);r[o.header.stateField]=i,n.push(r),o.trigger(i?"check":"uncheck",r,l)}}),this.updateSelected(),this.trigger(i?"check-some":"uncheck-some",n)}},d.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},d.prototype.showLoading=function(){this.$tableLoading.show()},d.prototype.hideLoading=function(){this.$tableLoading.hide()},d.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},d.prototype.toggleFullscreen=function(){this.$el.closest(".bootstrap-table").toggleClass("fullscreen")},d.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url),t&&t.pageNumber&&(this.options.pageNumber=t.pageNumber),t&&t.pageSize&&(this.options.pageSize=t.pageSize),this.initServer(t&&t.silent,t&&t.query,t&&t.url),this.trigger("refresh",t)},d.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&!this.options.cardView&&this.fitFooter()},d.prototype.showColumn=function(t){this.toggleColumn(this.fieldsColumnsIndex[t],!0,!0)},d.prototype.hideColumn=function(t){this.toggleColumn(this.fieldsColumnsIndex[t],!1,!0)},d.prototype.getHiddenColumns=function(){return t.grep(this.columns,function(t){return!t.visible})},d.prototype.getVisibleColumns=function(){return t.grep(this.columns,function(t){return t.visible})},d.prototype.toggleAllColumns=function(i){var e=this;if(t.each(this.columns,function(t,o){e.columns[t].visible=i}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var o=this.$toolbar.find(".keep-open input").prop("disabled",!1);o.filter(":checked").length<=this.options.minimumCountColumns&&o.filter(":checked").prop("disabled",!0)}},d.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},d.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},d.prototype.filterBy=function(i){this.filterColumns=t.isEmptyObject(i)?{}:i,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},d.prototype.scrollTo=function(t){if("string"==typeof t&&(t="bottom"===t?this.$tableBody[0].scrollHeight:0),"number"==typeof t&&this.$tableBody.scrollTop(t),void 0===t)return this.$tableBody.scrollTop()},d.prototype.getScrollPosition=function(){return this.scrollTo()},d.prototype.selectPage=function(t){t>0&&t<=this.options.totalPages&&(this.options.pageNumber=t,this.updatePagination())},d.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},d.prototype.nextPage=function(){this.options.pageNumber<this.options.totalPages&&(this.options.pageNumber++,this.updatePagination())},d.prototype.toggleView=function(){this.options.cardView=!this.options.cardView,this.initHeader();var t=this.$toolbar.find('button[name="toggle"] i');this.options.cardView?(t.removeClass(this.options.icons.toggleOff),t.addClass(this.options.icons.toggleOn)):(t.removeClass(this.options.icons.toggleOn),t.addClass(this.options.icons.toggleOff)),this.initBody(),this.trigger("toggle",this.options.cardView)},d.prototype.refreshOptions=function(i){r(this.options,i,!0)||(this.options=t.extend(this.options,i),this.trigger("refresh-options",this.options),this.destroy(),this.init())},d.prototype.resetSearch=function(t){var i=this.$toolbar.find(".search input");i.val(t||""),this.onSearch({currentTarget:i})},d.prototype.expandRow_=function(t,i){var e=this.$body.find(s('> tr[data-index="%s"]',i));e.next().is("tr.detail-view")===!t&&e.find("> td > .detail-icon").click()},d.prototype.expandRow=function(t){this.expandRow_(!0,t)},d.prototype.collapseRow=function(t){this.expandRow_(!1,t)},d.prototype.expandAllRows=function(i){if(i){var e=this.$body.find(s('> tr[data-index="%s"]',0)),o=this,n=null,a=!1,r=-1;if(e.next().is("tr.detail-view")?e.next().next().is("tr.detail-view")||(e.next().find(".detail-icon").click(),a=!0):(e.find("> td > .detail-icon").click(),a=!0),a)try{r=setInterval(function(){(n=o.$body.find("tr.detail-view").last().find(".detail-icon")).length>0?n.click():clearInterval(r)},1)}catch(t){clearInterval(r)}}else for(var l=this.$body.children(),h=0;h<l.length;h++)this.expandRow_(!0,t(l[h]).data("index"))},d.prototype.collapseAllRows=function(i){if(i)this.expandRow_(!1,0);else for(var e=this.$body.children(),o=0;o<e.length;o++)this.expandRow_(!1,t(e[o]).data("index"))},d.prototype.updateFormatText=function(t,i){this.options[s("format%s",t)]&&("string"==typeof i?this.options[s("format%s",t)]=function(){return i}:"function"==typeof i&&(this.options[s("format%s",t)]=i)),this.initToolbar(),this.initPagination(),this.initBody()};var u=["getOptions","getSelections","getAllSelections","getData","load","append","prepend","remove","removeAll","insertRow","updateRow","updateCell","updateByUniqueId","removeByUniqueId","getRowByUniqueId","showRow","hideRow","getHiddenRows","mergeCells","refreshColumnTitle","checkAll","uncheckAll","checkInvert","check","uncheck","checkBy","uncheckBy","refresh","resetView","resetWidth","destroy","showLoading","hideLoading","showColumn","hideColumn","getHiddenColumns","getVisibleColumns","showAllColumns","hideAllColumns","filterBy","scrollTo","getScrollPosition","selectPage","prevPage","nextPage","togglePagination","toggleView","refreshOptions","resetSearch","expandRow","collapseRow","expandAllRows","collapseAllRows","updateFormatText","updateCellById"];t.fn.bootstrapTable=function(i){var e,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),n=s.data("bootstrap.table"),a=t.extend({},d.DEFAULTS,s.data(),"object"==typeof i&&i);if("string"==typeof i){if(t.inArray(i,u)<0)throw new Error("Unknown method: "+i);if(!n)return;e=n[i].apply(n,o),"destroy"===i&&s.removeData("bootstrap.table")}n||s.data("bootstrap.table",n=new d(this,a))}),void 0===e?this:e},t.fn.bootstrapTable.Constructor=d,t.fn.bootstrapTable.defaults=d.DEFAULTS,t.fn.bootstrapTable.columnDefaults=d.COLUMN_DEFAULTS,t.fn.bootstrapTable.locales=d.LOCALES,t.fn.bootstrapTable.methods=u,t.fn.bootstrapTable.utils={bootstrapVersion:i,sprintf:s,compareObjects:r,calculateObjectValue:a,getItemField:p,objectKeys:function(){var t,i,e,o;Object.keys||(Object.keys=(t=Object.prototype.hasOwnProperty,i=!{toString:null}.propertyIsEnumerable("toString"),o=(e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(s){if("object"!=typeof s&&("function"!=typeof s||null===s))throw new TypeError("Object.keys called on non-object");var n,a,r=[];for(n in s)t.call(s,n)&&r.push(n);if(i)for(a=0;a<o;a++)t.call(s,e[a])&&r.push(e[a]);return r}))},isIEBrowser:c},t(function(){t('[data-toggle="table"]').bootstrapTable()})}(jQuery)},363:function(t,i,e){e(362)}});if("object"==typeof e){var o=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,t&&t!==window?t:null];for(var s in e)o[0]&&(o[0][s]=e[s]),o[1]&&"__esModule"!==s&&(o[1][s]=e[s]),o[2]&&(o[2][s]=e[s])}}(this);