From fa56764ad5630ed3ab9da4a30fdb8dd34bfbaf1f Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 20 Nov 2018 15:54:28 -0600 Subject: [PATCH] 2.31.1 --- README.md | 20 ++++++++++--------- .../js/extras/jquery.tablesorter.pager.min.js | 2 +- dist/js/extras/semver-mod.min.js | 2 +- dist/js/jquery.tablesorter.combined.js | 8 +++++--- dist/js/jquery.tablesorter.combined.min.js | 4 ++-- dist/js/jquery.tablesorter.js | 6 ++++-- dist/js/jquery.tablesorter.min.js | 2 +- dist/js/jquery.tablesorter.widgets.js | 2 +- dist/js/jquery.tablesorter.widgets.min.js | 4 ++-- dist/js/widgets/widget-filter.min.js | 2 +- dist/js/widgets/widget-mark.min.js | 2 +- dist/js/widgets/widget-math.min.js | 4 ++-- dist/js/widgets/widget-output.min.js | 2 +- dist/js/widgets/widget-pager.min.js | 2 +- dist/js/widgets/widget-sortTbodies.min.js | 2 +- dist/js/widgets/widget-staticRow.min.js | 2 +- dist/js/widgets/widget-stickyHeaders.min.js | 2 +- dist/js/widgets/widget-storage.min.js | 2 +- js/jquery.tablesorter.combined.js | 8 +++++--- js/jquery.tablesorter.js | 4 ++-- js/jquery.tablesorter.widgets.js | 2 +- package.json | 2 +- tablesorter.jquery.json | 2 +- 23 files changed, 48 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index be8a31bb..56c4e8b5 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,17 @@ If you would like to contribute, please... View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes). +#### Version 2.31.1 (2018-11-20) + +* Core: + * Store sortList on init. Fixes [issue #1585](https://github.com/Mottie/tablesorter/issues/1585). +* Math: + * Add math_textAttr. See [issue #1601](https://github.com/Mottie/tablesorter/issues/1601). +* Readme: + * Remove bower, gitter & add Slack. +* Meta: + * Update dependencies. + #### Version 2.31.0 (2018-08-27) * Editable: @@ -123,12 +134,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C * input-select updates extra header checkboxes. Fixes [issue #1560](https://github.com/Mottie/tablesorter/issues/1560). * CSS: * Style caption per table theme. Fixes [issue #1564](https://github.com/Mottie/tablesorter/issues/1564). - -#### Version 2.30.6 (2018-06-16) - -* CssStickyHeaders: - * Reinitialize after update. Fixes [issue #1553](https://github.com/Mottie/tablesorter/issues/1553). -* Parser: - * Prevent input-select error. Fixes [issue #1554](https://github.com/Mottie/tablesorter/issues/1554). -* Docs: - * Add lazyload warnings. See [issue #1169](https://github.com/Mottie/tablesorter/issues/1169). diff --git a/dist/js/extras/jquery.tablesorter.pager.min.js b/dist/js/extras/jquery.tablesorter.pager.min.js index ef355157..620f317a 100644 --- a/dist/js/extras/jquery.tablesorter.pager.min.js +++ b/dist/js/extras/jquery.tablesorter.pager.min.js @@ -4,4 +4,4 @@ * tablesorter (FORK) pager plugin * updated 2018-08-27 (v2.31.0) */ -!function(M){"use strict";var T=M.tablesorter;M.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(e,t){return t},ajaxError:null,ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(e){return e},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var f="filterInit filterStart filterEnd sortEnd disablePager enablePager destroyPager updateComplete pageSize pageSet pageAndSize pagerUpdate refreshComplete ",u=this,h=function(e,t,a){var i,s="addClass",r="removeClass",o=t.cssDisabled,n=!!a,l=n||0===t.page,g=I(e,t),c=n||t.page===g-1||0===g;t.updateArrows&&((i=t.$container.find(t.cssFirst+","+t.cssPrev))[l?s:r](o),i.each(function(){this.ariaDisabled=l}),(i=t.$container.find(t.cssNext+","+t.cssLast))[c?s:r](o),i.each(function(){this.ariaDisabled=c}))},w=function(e,t){var a,i,s,r=e.config,o=r.$table.hasClass("hasFilters");if(o&&!t.ajax)if(T.isEmptyObject(r.cache))t.filteredRows=t.totalRows=r.$tbodies.eq(0).children("tr").not(t.countChildRows?"":"."+r.cssChildRow).length;else for(t.filteredRows=0,s=(a=r.cache[0].normalized).length,i=0;in.filteredRows&&t,n.page=i?n.pageReset||0:n.page,n.startRow=i?f*n.page+1:0===n.filteredRows?0:f*n.page+1,n.endRow=Math.min(n.filteredRows,n.totalRows,f*(n.page+1)),s=n.$container.find(n.cssPageDisplay),"function"==typeof n.output?a=n.output(e,n):(c=s.attr("data-pager-output"+(n.filteredRows'):1'+g[o]+"";r.html(i).val(n.page+1)}s.length&&(s["INPUT"===s[0].nodeName?"val":"html"](a),s.find(".ts-startRow, .ts-page").unbind("change"+p).bind("change"+p,function(){var e=M(this).val(),t=M(this).hasClass("ts-startRow")?Math.floor(e/f)+1:e;d.$table.triggerHandler("pageSet"+p,[t])}))}h(e,n),R(e,n),n.initialized&&!1!==t&&(T.debug(d,"pager")&&console.log("Pager >> Triggering pagerComplete"),d.$table.triggerHandler("pagerComplete",n),n.savePages&&T.storage&&T.storage(e,n.storageKey,{page:n.page,size:f===n.totalRows?"all":f}))}},b=function(e,t){var a,i,s,r,o,n,l=I(e,t)||1,g=5*Math.ceil(l/t.maxOptionSize/5),c=l>t.maxOptionSize,d=t.page+1,p=g,f=l-g,u=[1];for(a=c?g:1;a<=l;)u[u.length]=a,a+=c?g:1;if(u[u.length]=l,c){for(s=[],(p=d-(i=Math.max(Math.floor(t.maxOptionSize/g)-1,5)))<1&&(p=1),l<(f=d+i)&&(f=l),a=p;a<=f;a++)s[s.length]=a;g/2<(o=(u=M.grep(u,function(e,t){return M.inArray(e,u)===t})).length)-(n=s.length)&&o+n>t.maxOptionSize&&(r=Math.floor(o/2)-Math.floor(n/2),Array.prototype.splice.apply(u,[r,n])),u=u.concat(s)}return u=M.grep(u,function(e,t){return M.inArray(e,u)===t}).sort(function(e,t){return e-t})},R=function(e,t){var a,i,s,r=e.config,o=r.$tbodies.eq(0);o.find("tr.pagerSavedHeightSpacer").remove(),t.fixedHeight&&!t.isDisabled&&(i=M.data(e,"pagerSavedHeight"))&&(s=0,1'))},z=function(e,t){var a,i=e.config,s=i.$tbodies.eq(0);s.find("tr.pagerSavedHeightSpacer").remove(),s.children("tr:visible").length||s.append(' '),a=s.children("tr").eq(0).height()*("all"===t.size?t.totalRows:t.size),M.data(e,"pagerSavedHeight",a),R(e,t),M.data(e,"pagerLastSize",t.size)},x=function(e,t){if(!t.ajaxUrl){var a,i=0,s=e.config,r=s.$tbodies.eq(0).children("tr"),o=r.length,n="all"===t.size?t.totalRows:t.size,l=t.page*n,g=l+n,c=0,d=0;for(t.cacheIndex=[],a=0;a> Ajax Error",i,s,r),T.showError(t,i,s,r),j.$tbodies.eq(0).children("tr").detach(),a.totalRows=0;else{if(M.isArray(m)?(R=m[(l=isNaN(m[0])&&!isNaN(m[1]))?1:0],a.totalRows=isNaN(R)?a.totalRows||0:R,j.totalRows=j.filteredRows=a.filteredRows=a.totalRows,w=0===a.totalRows?[]:m[l?0:1]||[],h=m[2]):(a.ajaxData=m,j.totalRows=a.totalRows=m.total,j.filteredRows=a.filteredRows=void 0!==m.filteredRows?m.filteredRows:m.total,h=m.headers,w=m.rows||[]),b=w&&w.length,w instanceof M)a.processAjaxOnInit&&(j.$tbodies.eq(0).empty(),j.$tbodies.eq(0).append(w));else if(b){for(o=0;o",n=0;n"+w[o][n]+"";v+=""}a.processAjaxOnInit&&j.$tbodies.eq(0).html(v)}if(a.processAjaxOnInit=!0,h)for(d=(g=P.hasClass("hasStickyHeaders"))?j.widgetOptions.$sticky.children("thead:first").children("tr:not(."+j.cssIgnoreRow+")").children():"",c=P.find("tfoot tr:first").children(),z=(p=j.$headers.filter("th ")).length,n=0;n> Triggering pagerChange"),P.triggerHandler("pagerChange",a),T.applyWidget(t),y(t,a,!0)},0)})}a.initialized||q(t,a)},v=function(e,a){var t,i,s=e.config,r=a.ajaxUrl?a.ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(e,t){return a.page+(t?parseInt(t,10):0)}).replace(/\{size\}/g,a.size):"",o=s.sortList,n=a.currentFilters||M(e).data("lastSearch")||[],l=r.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),g=r.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),c=[];if(l){for(l=l[1],i=o.length,t=0;t> Ajax url = "+r),r},m=function(e,t,a){var i,s,r,o,n=M(e),l=e.config,g=T.debug(l,"pager"),c=l.$table.hasClass("hasFilters"),d=t&&t.length||0,p="all"===a.size?a.totalRows:a.size,f=a.page*p;if(d<1)g&&console.warn("Pager >> No rows for pager to render");else{if(a.page>=a.totalPages&&E(e,a),a.cacheIndex=[],a.isDisabled=!1,a.initialized&&(g&&console.log("Pager >> Triggering pagerChange"),n.triggerHandler("pagerChange",a)),a.removeRows){for(T.clearTableBody(e),i=T.processTbody(e,l.$tbodies.eq(0),!0),r=s=c?0:f,o=0;o> Triggering updateComplete"),n.triggerHandler("updateComplete",[e,!0]))}},C=function(e,t){var a,i,s;for(t.ajax?h(e,t,!0):(M.data(e,"pagerLastPage",t.page),M.data(e,"pagerLastSize",t.size),t.page=0,t.size=t.totalRows,t.totalPages=1,M(e).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),m(e,e.config.rowsCopy,t),t.isDisabled=!0,T.applyWidget(e),T.debug(e.config,"pager")&&console.log("Pager >> Disabled")),s=(i=t.$container.find(t.cssGoto+","+t.cssPageSize+", .ts-startRow, .ts-page")).length,a=0;a> Changing to page "+t.page),t.last={page:t.page,size:t.size,sortList:(d.sortList||[]).join(","),totalRows:t.totalRows,currentFilters:t.currentFilters||[],ajaxUrl:t.ajaxObject.url||"",optAjaxUrl:t.ajaxUrl||""},t.ajax?t.processAjaxOnInit||T.isEmptyObject(t.initialRows)?(n=v(s=e,r=t),l=M(document),g=s.config,c=g.namespace+"pager",""!==n&&(g.showProcessing&&T.isProcessing(s,!0),l.bind("ajaxError"+c,function(e,t,a,i){P(null,s,r,t,a,i),l.unbind("ajaxError"+c)}),o=++r.ajaxCounter,r.last.ajaxUrl=n,r.ajaxObject.url=n,r.ajaxObject.success=function(e,t,a){o> Ajax initialized",r.ajaxObject),M.ajax(r.ajaxObject))):(t.processAjaxOnInit=!0,i=t.initialRows,t.totalRows=void 0!==i.total?i.total:p&&console.error("Pager >> No initial total page set!")||0,t.filteredRows=void 0!==i.filtered?i.filtered:p&&console.error("Pager >> No initial filtered page set!")||0,q(e,t)):t.ajax||m(e,d.rowsCopy,t),M.data(e,"pagerLastPage",t.page),t.initialized&&!1!==a&&(p&&console.log("Pager >> Triggering pageMoved"),f.triggerHandler("pageMoved",t),T.applyWidget(e),e.isUpdating&&(p&&console.log("Pager >> Triggering updateComplete"),f.triggerHandler("updateComplete",[e,!0])))}},I=function(e,t){return T.hasWidget(e,"filter")?Math.min(t.totalPages,t.filteredPages):t.totalPages},N=function(e,t){var a=I(e,t)-1;return t.page=parseInt(t.page,10),(t.page<0||isNaN(t.page))&&(t.page=0),t.page>a&&0<=a&&(t.page=a),t.page},A=function(e,t,a){var i=parseInt(t,10)||e.size||e.settings.size||10;return e.initialized&&(/all/i.test(i+" "+t)||i===e.totalRows)?e.$container.find(e.cssPageSize+' option[value="all"]').length?"all":e.totalRows:"get"===a?i:e.size},F=function(e,t,a){a.size=A(a,t,"get"),a.$container.find(a.cssPageSize).val(a.size),M.data(e,"pagerLastPage",N(e,a)),M.data(e,"pagerLastSize",a.size),a.totalPages="all"===a.size?1:Math.ceil(a.totalRows/a.size),a.filteredPages="all"===a.size?1:Math.ceil(a.filteredRows/a.size)},O=function(e,t){t.page=0,$(e,t)},E=function(e,t){t.page=I(e,t)-1,$(e,t)},L=function(e,t){t.page++;var a=I(e,t)-1;t.page>=a&&(t.page=a),$(e,t)},D=function(e,t){t.page--,t.page<=0&&(t.page=0),$(e,t)},q=function(e,t){t.initialized=!0,t.initializing=!1,T.debug(e.config,"pager")&&console.log("Pager >> Triggering pagerInitialized"),M(e).triggerHandler("pagerInitialized",t),T.applyWidget(e),y(e,t)},U=function(e,t,a){var i,s,r,o=e.config;t.$container.find(t.cssGoto+","+t.cssPageSize+",.ts-startRow, .ts-page").removeClass(t.cssDisabled).removeAttr("disabled").each(function(){this.ariaDisabled=!1}),t.isDisabled=!1,t.page=M.data(e,"pagerLastPage")||t.page||0,s=(r=t.$container.find(t.cssPageSize)).find("option[selected]").val(),t.size=M.data(e,"pagerLastSize")||A(t,s,"get"),t.totalPages="all"===t.size?1:Math.ceil(I(e,t)/t.size),F(e,t.size,t),e.id&&!o.$table.attr("aria-describedby")&&((i=(r=t.$container.find(t.cssPageDisplay)).attr("id"))||(i=e.id+"_pager_info",r.attr("id",i)),o.$table.attr("aria-describedby",i)),z(e,t),a&&(T.update(o),F(e,t.size,t),$(e,t),j(e,t),T.debug(o,"pager")&&console.log("Pager >> Enabled"))},H=function(o,e){var t,s,r,a,n=o.config,i=n.widgetOptions,l=T.debug(n,"pager"),g=n.pager=M.extend(!0,{},M.tablesorterPager.defaults,e),c=n.$table,d=n.namespace+"pager",p=g.$container=M(g.container).addClass("tablesorter-pager").show();g.settings=M.extend(!0,{},M.tablesorterPager.defaults,e),l&&console.log("Pager >> Initializing"),g.oldAjaxSuccess=g.oldAjaxSuccess||g.ajaxObject.success,n.appender=u.appender,g.initializing=!0,g.savePages&&T.storage&&(t=T.storage(o,g.storageKey)||{},g.page=isNaN(t.page)?g.page:t.page,g.size="all"===t.size?t.size:(isNaN(t.size)?g.size:t.size)||g.setSize||10,F(o,g.size,g)),g.regexRows=new RegExp("("+(i.filter_filteredRow||"filtered")+"|"+n.selectorRemove.slice(1)+"|"+n.cssChildRow+")"),g.regexFiltered=new RegExp(i.filter_filteredRow||"filtered"),c.unbind(f.split(" ").join(d+" ").replace(/\s+/g," ")).bind("filterInit filterStart ".split(" ").join(d+" "),function(e,t){var a;if(g.currentFilters=M.isArray(t)?t:n.$table.data("lastSearch"),g.ajax&&"filterInit"===e.type)return $(o,g,!1);a=T.filter.equalFilters?T.filter.equalFilters(n,n.lastSearch,g.currentFilters):(n.lastSearch||[]).join("")!==(g.currentFilters||[]).join(""),"filterStart"!==e.type||!1===g.pageReset||a||(g.page=g.pageReset)}).bind("filterEnd sortEnd ".split(" ").join(d+" "),function(){g.currentFilters=n.$table.data("lastSearch"),(g.initialized||g.initializing)&&(n.delayInit&&n.rowsCopy&&0===n.rowsCopy.length&&S(o),y(o,g,!1),$(o,g,!1),T.applyWidget(o))}).bind("disablePager"+d,function(e){e.stopPropagation(),C(o,g)}).bind("enablePager"+d,function(e){e.stopPropagation(),U(o,g,!0)}).bind("destroyPager"+d,function(e){var t,a,i,s,r;e.stopPropagation(),a=g,i=(t=o).config,s=i.namespace+"pager",r=[a.cssFirst,a.cssPrev,a.cssNext,a.cssLast,a.cssGoto,a.cssPageSize].join(","),C(t,a),a.$container.hide().find(r).unbind(s),i.appender=null,i.$table.unbind(s),T.storage&&T.storage(t,a.storageKey,""),delete i.pager,delete i.rowsCopy}).bind("resetToLoadState"+d,function(e){var t,a;e.stopPropagation(),a=g,(t=o).config.pager=M.extend(!0,{},M.tablesorterPager.defaults,a.settings),H(t,a.settings)}).bind("updateComplete"+d,function(e,t,a){if(e.stopPropagation(),t&&!a&&!g.ajax){var i=n.$tbodies.eq(0).children("tr").not(n.selectorRemove);g.totalRows=i.length-(g.countChildRows?0:i.filter("."+n.cssChildRow).length),g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),i.length&&n.rowsCopy&&0===n.rowsCopy.length&&S(t),g.page>=g.totalPages&&E(t,g),x(t,g),z(t,g),y(t,g,!0)}}).bind("pageSize refreshComplete ".split(" ").join(d+" "),function(e,t){e.stopPropagation(),F(o,A(g,t,"get"),g),$(o,g),x(o,g),y(o,g,!1)}).bind("pageSet pagerUpdate ".split(" ").join(d+" "),function(e,t){e.stopPropagation(),"pagerUpdate"===e.type&&(t=void 0===t?g.page+1:t,g.last.page=!0),g.page=(parseInt(t,10)||1)-1,$(o,g,!0),y(o,g,!1)}).bind("pageAndSize"+d,function(e,t,a){e.stopPropagation(),g.page=(parseInt(t,10)||1)-1,F(o,A(g,a,"get"),g),$(o,g,!0),x(o,g),y(o,g,!1)}),s=[g.cssFirst,g.cssPrev,g.cssNext,g.cssLast],r=[O,D,L,E],l&&!p.length&&console.warn('Pager >> "container" not found'),p.find(s.join(",")).attr("tabindex",0).unbind("click"+d).bind("click"+d,function(e){e.stopPropagation();var t,a=M(this),i=s.length;if(!a.hasClass(g.cssDisabled))for(t=0;t> "goto" selector not found'),(a=p.find(g.cssPageSize)).length?(a.find("option").removeAttr("selected"),a.unbind("change"+d).bind("change"+d,function(){if(!M(this).hasClass(g.cssDisabled)){var e=M(this).val();F(o,e,g),$(o,g),z(o,g)}return!1})):l&&console.warn('Pager >> "size" selector not found'),g.initialized=!1,c.triggerHandler("pagerBeforeInitialized",g),U(o,g,!1),"string"==typeof g.ajaxUrl?(g.ajax=!0,n.widgetOptions.filter_serversideFiltering=!0,n.serverSideSorting=!0,$(o,g)):(g.ajax=!1,T.appendCache(n,!0),j(o,g)),g.ajax||g.initialized||(g.initializing=!1,g.initialized=!0,F(o,g.size,g),$(o,g),l&&console.log("Pager >> Triggering pagerInitialized"),n.$table.triggerHandler("pagerInitialized",g),n.widgetOptions.filter_initialized&&T.hasWidget(o,"filter")||y(o,g,!1)),n.widgetInit.pager=!0};u.appender=function(e,t){var a=e.config,i=a.pager;i.ajax||(a.rowsCopy=t,i.totalRows=i.countChildRows?a.$tbodies.eq(0).children("tr").length:t.length,i.size=M.data(e,"pagerLastSize")||i.size||i.settings.size||10,i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),m(e,t,i),y(e,i,!1))},u.construct=function(e){return this.each(function(){this.config&&this.hasInitialized&&H(this,e)})}}}),T.showError=function(e,t,a,i){var s=M(e),r=s[0].config,o=r&&r.widgetOptions,n=r.pager&&r.pager.cssErrorRow||o&&o.pager_css&&o.pager_css.errorRow||"tablesorter-errorRow",l=typeof t,g=!0,c="",d=function(){r.$table.find("thead").find(r.selectorRemove).remove()};if(s.length){if("function"==typeof r.pager.ajaxError){if(!1===(g=r.pager.ajaxError(r,t,a,i)))return d();c=g}else if("function"==typeof o.pager_ajaxError){if(!1===(g=o.pager_ajaxError(r,t,a,i)))return d();c=g}if(""===c)if("object"===l)c=0===t.status?"Not connected, verify Network":404===t.status?"Requested page not found [404]":500===t.status?"Internal Server Error [500]":"parsererror"===i?"Requested JSON parse failed":"timeout"===i?"Time out error":"abort"===i?"Ajax Request aborted":"Uncaught error: "+t.statusText+" ["+t.status+"]";else{if("string"!==l)return d();c=t}M(/tr\>/.test(c)?c:''+c+"").click(function(){M(this).remove()}).appendTo(r.$table.find("thead:first")).addClass(n+" "+r.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}else console.error("tablesorter showError: no table parameter passed")},M.fn.extend({tablesorterPager:M.tablesorterPager.construct})}(jQuery);return jQuery;})); +!function(M){"use strict";var T=M.tablesorter;M.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(e,t){return t},ajaxError:null,ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(e){return e},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,pageReset:0,size:10,maxOptionSize:20,savePages:!0,storageKey:"tablesorter-pager",fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var f="filterInit filterStart filterEnd sortEnd disablePager enablePager destroyPager updateComplete pageSize pageSet pageAndSize pagerUpdate refreshComplete ",u=this,h=function(e,t,a){var i,s="addClass",r="removeClass",o=t.cssDisabled,n=!!a,l=n||0===t.page,g=I(e,t),c=n||t.page===g-1||0===g;t.updateArrows&&((i=t.$container.find(t.cssFirst+","+t.cssPrev))[l?s:r](o),i.each(function(){this.ariaDisabled=l}),(i=t.$container.find(t.cssNext+","+t.cssLast))[c?s:r](o),i.each(function(){this.ariaDisabled=c}))},w=function(e,t){var a,i,s,r=e.config,o=r.$table.hasClass("hasFilters");if(o&&!t.ajax)if(T.isEmptyObject(r.cache))t.filteredRows=t.totalRows=r.$tbodies.eq(0).children("tr").not(t.countChildRows?"":"."+r.cssChildRow).length;else for(t.filteredRows=0,s=(a=r.cache[0].normalized).length,i=0;in.filteredRows&&t,n.page=i?n.pageReset||0:n.page,n.startRow=i?f*n.page+1:0===n.filteredRows?0:f*n.page+1,n.endRow=Math.min(n.filteredRows,n.totalRows,f*(n.page+1)),s=n.$container.find(n.cssPageDisplay),a="function"==typeof n.output?n.output(e,n):(c=s.attr("data-pager-output"+(n.filteredRows'):1'+g[o]+"";r.html(i).val(n.page+1)}s.length&&(s["INPUT"===s[0].nodeName?"val":"html"](a),s.find(".ts-startRow, .ts-page").unbind("change"+p).bind("change"+p,function(){var e=M(this).val(),t=M(this).hasClass("ts-startRow")?Math.floor(e/f)+1:e;d.$table.triggerHandler("pageSet"+p,[t])}))}h(e,n),R(e,n),n.initialized&&!1!==t&&(T.debug(d,"pager")&&console.log("Pager >> Triggering pagerComplete"),d.$table.triggerHandler("pagerComplete",n),n.savePages&&T.storage&&T.storage(e,n.storageKey,{page:n.page,size:f===n.totalRows?"all":f}))}},b=function(e,t){var a,i,s,r,o,n,l=I(e,t)||1,g=5*Math.ceil(l/t.maxOptionSize/5),c=l>t.maxOptionSize,d=t.page+1,p=g,f=l-g,u=[1];for(a=c?g:1;a<=l;)u[u.length]=a,a+=c?g:1;if(u[u.length]=l,c){for(s=[],(p=d-(i=Math.max(Math.floor(t.maxOptionSize/g)-1,5)))<1&&(p=1),l<(f=d+i)&&(f=l),a=p;a<=f;a++)s[s.length]=a;g/2<(o=(u=M.grep(u,function(e,t){return M.inArray(e,u)===t})).length)-(n=s.length)&&o+n>t.maxOptionSize&&(r=Math.floor(o/2)-Math.floor(n/2),Array.prototype.splice.apply(u,[r,n])),u=u.concat(s)}return u=M.grep(u,function(e,t){return M.inArray(e,u)===t}).sort(function(e,t){return e-t})},R=function(e,t){var a,i,s,r=e.config,o=r.$tbodies.eq(0);o.find("tr.pagerSavedHeightSpacer").remove(),t.fixedHeight&&!t.isDisabled&&(i=M.data(e,"pagerSavedHeight"))&&(s=0,1'))},z=function(e,t){var a,i=e.config,s=i.$tbodies.eq(0);s.find("tr.pagerSavedHeightSpacer").remove(),s.children("tr:visible").length||s.append(' '),a=s.children("tr").eq(0).height()*("all"===t.size?t.totalRows:t.size),M.data(e,"pagerSavedHeight",a),R(e,t),M.data(e,"pagerLastSize",t.size)},x=function(e,t){if(!t.ajaxUrl){var a,i=0,s=e.config,r=s.$tbodies.eq(0).children("tr"),o=r.length,n="all"===t.size?t.totalRows:t.size,l=t.page*n,g=l+n,c=0,d=0;for(t.cacheIndex=[],a=0;a> Ajax Error",i,s,r),T.showError(t,i,s,r),j.$tbodies.eq(0).children("tr").detach(),a.totalRows=0;else{if(M.isArray(m)?(R=m[(l=isNaN(m[0])&&!isNaN(m[1]))?1:0],a.totalRows=isNaN(R)?a.totalRows||0:R,j.totalRows=j.filteredRows=a.filteredRows=a.totalRows,w=0===a.totalRows?[]:m[l?0:1]||[],h=m[2]):(a.ajaxData=m,j.totalRows=a.totalRows=m.total,j.filteredRows=a.filteredRows=void 0!==m.filteredRows?m.filteredRows:m.total,h=m.headers,w=m.rows||[]),b=w&&w.length,w instanceof M)a.processAjaxOnInit&&(j.$tbodies.eq(0).empty(),j.$tbodies.eq(0).append(w));else if(b){for(o=0;o",n=0;n"+w[o][n]+"";v+=""}a.processAjaxOnInit&&j.$tbodies.eq(0).html(v)}if(a.processAjaxOnInit=!0,h)for(d=(g=P.hasClass("hasStickyHeaders"))?j.widgetOptions.$sticky.children("thead:first").children("tr:not(."+j.cssIgnoreRow+")").children():"",c=P.find("tfoot tr:first").children(),z=(p=j.$headers.filter("th ")).length,n=0;n> Triggering pagerChange"),P.triggerHandler("pagerChange",a),T.applyWidget(t),y(t,a,!0)},0)})}a.initialized||q(t,a)},v=function(e,a){var t,i,s=e.config,r=a.ajaxUrl?a.ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(e,t){return a.page+(t?parseInt(t,10):0)}).replace(/\{size\}/g,a.size):"",o=s.sortList,n=a.currentFilters||M(e).data("lastSearch")||[],l=r.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),g=r.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),c=[];if(l){for(l=l[1],i=o.length,t=0;t> Ajax url = "+r),r},m=function(e,t,a){var i,s,r,o,n=M(e),l=e.config,g=T.debug(l,"pager"),c=l.$table.hasClass("hasFilters"),d=t&&t.length||0,p="all"===a.size?a.totalRows:a.size,f=a.page*p;if(d<1)g&&console.warn("Pager >> No rows for pager to render");else{if(a.page>=a.totalPages&&E(e,a),a.cacheIndex=[],a.isDisabled=!1,a.initialized&&(g&&console.log("Pager >> Triggering pagerChange"),n.triggerHandler("pagerChange",a)),a.removeRows){for(T.clearTableBody(e),i=T.processTbody(e,l.$tbodies.eq(0),!0),r=s=c?0:f,o=0;o> Triggering updateComplete"),n.triggerHandler("updateComplete",[e,!0]))}},C=function(e,t){var a,i,s;for(t.ajax?h(e,t,!0):(M.data(e,"pagerLastPage",t.page),M.data(e,"pagerLastSize",t.size),t.page=0,t.size=t.totalRows,t.totalPages=1,M(e).addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),m(e,e.config.rowsCopy,t),t.isDisabled=!0,T.applyWidget(e),T.debug(e.config,"pager")&&console.log("Pager >> Disabled")),s=(i=t.$container.find(t.cssGoto+","+t.cssPageSize+", .ts-startRow, .ts-page")).length,a=0;a> Changing to page "+t.page),t.last={page:t.page,size:t.size,sortList:(d.sortList||[]).join(","),totalRows:t.totalRows,currentFilters:t.currentFilters||[],ajaxUrl:t.ajaxObject.url||"",optAjaxUrl:t.ajaxUrl||""},t.ajax?t.processAjaxOnInit||T.isEmptyObject(t.initialRows)?(n=v(s=e,r=t),l=M(document),g=s.config,c=g.namespace+"pager",""!==n&&(g.showProcessing&&T.isProcessing(s,!0),l.bind("ajaxError"+c,function(e,t,a,i){P(null,s,r,t,a,i),l.unbind("ajaxError"+c)}),o=++r.ajaxCounter,r.last.ajaxUrl=n,r.ajaxObject.url=n,r.ajaxObject.success=function(e,t,a){o> Ajax initialized",r.ajaxObject),M.ajax(r.ajaxObject))):(t.processAjaxOnInit=!0,i=t.initialRows,t.totalRows=void 0!==i.total?i.total:p&&console.error("Pager >> No initial total page set!")||0,t.filteredRows=void 0!==i.filtered?i.filtered:p&&console.error("Pager >> No initial filtered page set!")||0,q(e,t)):t.ajax||m(e,d.rowsCopy,t),M.data(e,"pagerLastPage",t.page),t.initialized&&!1!==a&&(p&&console.log("Pager >> Triggering pageMoved"),f.triggerHandler("pageMoved",t),T.applyWidget(e),e.isUpdating&&(p&&console.log("Pager >> Triggering updateComplete"),f.triggerHandler("updateComplete",[e,!0])))}},I=function(e,t){return T.hasWidget(e,"filter")?Math.min(t.totalPages,t.filteredPages):t.totalPages},N=function(e,t){var a=I(e,t)-1;return t.page=parseInt(t.page,10),(t.page<0||isNaN(t.page))&&(t.page=0),t.page>a&&0<=a&&(t.page=a),t.page},A=function(e,t,a){var i=parseInt(t,10)||e.size||e.settings.size||10;return e.initialized&&(/all/i.test(i+" "+t)||i===e.totalRows)?e.$container.find(e.cssPageSize+' option[value="all"]').length?"all":e.totalRows:"get"===a?i:e.size},F=function(e,t,a){a.size=A(a,t,"get"),a.$container.find(a.cssPageSize).val(a.size),M.data(e,"pagerLastPage",N(e,a)),M.data(e,"pagerLastSize",a.size),a.totalPages="all"===a.size?1:Math.ceil(a.totalRows/a.size),a.filteredPages="all"===a.size?1:Math.ceil(a.filteredRows/a.size)},O=function(e,t){t.page=0,$(e,t)},E=function(e,t){t.page=I(e,t)-1,$(e,t)},L=function(e,t){t.page++;var a=I(e,t)-1;t.page>=a&&(t.page=a),$(e,t)},D=function(e,t){t.page--,t.page<=0&&(t.page=0),$(e,t)},q=function(e,t){t.initialized=!0,t.initializing=!1,T.debug(e.config,"pager")&&console.log("Pager >> Triggering pagerInitialized"),M(e).triggerHandler("pagerInitialized",t),T.applyWidget(e),y(e,t)},U=function(e,t,a){var i,s,r,o=e.config;t.$container.find(t.cssGoto+","+t.cssPageSize+",.ts-startRow, .ts-page").removeClass(t.cssDisabled).removeAttr("disabled").each(function(){this.ariaDisabled=!1}),t.isDisabled=!1,t.page=M.data(e,"pagerLastPage")||t.page||0,s=(r=t.$container.find(t.cssPageSize)).find("option[selected]").val(),t.size=M.data(e,"pagerLastSize")||A(t,s,"get"),t.totalPages="all"===t.size?1:Math.ceil(I(e,t)/t.size),F(e,t.size,t),e.id&&!o.$table.attr("aria-describedby")&&((i=(r=t.$container.find(t.cssPageDisplay)).attr("id"))||(i=e.id+"_pager_info",r.attr("id",i)),o.$table.attr("aria-describedby",i)),z(e,t),a&&(T.update(o),F(e,t.size,t),$(e,t),j(e,t),T.debug(o,"pager")&&console.log("Pager >> Enabled"))},H=function(o,e){var t,s,r,a,n=o.config,i=n.widgetOptions,l=T.debug(n,"pager"),g=n.pager=M.extend(!0,{},M.tablesorterPager.defaults,e),c=n.$table,d=n.namespace+"pager",p=g.$container=M(g.container).addClass("tablesorter-pager").show();g.settings=M.extend(!0,{},M.tablesorterPager.defaults,e),l&&console.log("Pager >> Initializing"),g.oldAjaxSuccess=g.oldAjaxSuccess||g.ajaxObject.success,n.appender=u.appender,g.initializing=!0,g.savePages&&T.storage&&(t=T.storage(o,g.storageKey)||{},g.page=isNaN(t.page)?g.page:t.page,g.size="all"===t.size?t.size:(isNaN(t.size)?g.size:t.size)||g.setSize||10,F(o,g.size,g)),g.regexRows=new RegExp("("+(i.filter_filteredRow||"filtered")+"|"+n.selectorRemove.slice(1)+"|"+n.cssChildRow+")"),g.regexFiltered=new RegExp(i.filter_filteredRow||"filtered"),c.unbind(f.split(" ").join(d+" ").replace(/\s+/g," ")).bind("filterInit filterStart ".split(" ").join(d+" "),function(e,t){var a;if(g.currentFilters=M.isArray(t)?t:n.$table.data("lastSearch"),g.ajax&&"filterInit"===e.type)return $(o,g,!1);a=T.filter.equalFilters?T.filter.equalFilters(n,n.lastSearch,g.currentFilters):(n.lastSearch||[]).join("")!==(g.currentFilters||[]).join(""),"filterStart"!==e.type||!1===g.pageReset||a||(g.page=g.pageReset)}).bind("filterEnd sortEnd ".split(" ").join(d+" "),function(){g.currentFilters=n.$table.data("lastSearch"),(g.initialized||g.initializing)&&(n.delayInit&&n.rowsCopy&&0===n.rowsCopy.length&&S(o),y(o,g,!1),$(o,g,!1),T.applyWidget(o))}).bind("disablePager"+d,function(e){e.stopPropagation(),C(o,g)}).bind("enablePager"+d,function(e){e.stopPropagation(),U(o,g,!0)}).bind("destroyPager"+d,function(e){var t,a,i,s,r;e.stopPropagation(),a=g,i=(t=o).config,s=i.namespace+"pager",r=[a.cssFirst,a.cssPrev,a.cssNext,a.cssLast,a.cssGoto,a.cssPageSize].join(","),C(t,a),a.$container.hide().find(r).unbind(s),i.appender=null,i.$table.unbind(s),T.storage&&T.storage(t,a.storageKey,""),delete i.pager,delete i.rowsCopy}).bind("resetToLoadState"+d,function(e){var t,a;e.stopPropagation(),a=g,(t=o).config.pager=M.extend(!0,{},M.tablesorterPager.defaults,a.settings),H(t,a.settings)}).bind("updateComplete"+d,function(e,t,a){if(e.stopPropagation(),t&&!a&&!g.ajax){var i=n.$tbodies.eq(0).children("tr").not(n.selectorRemove);g.totalRows=i.length-(g.countChildRows?0:i.filter("."+n.cssChildRow).length),g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),i.length&&n.rowsCopy&&0===n.rowsCopy.length&&S(t),g.page>=g.totalPages&&E(t,g),x(t,g),z(t,g),y(t,g,!0)}}).bind("pageSize refreshComplete ".split(" ").join(d+" "),function(e,t){e.stopPropagation(),F(o,A(g,t,"get"),g),$(o,g),x(o,g),y(o,g,!1)}).bind("pageSet pagerUpdate ".split(" ").join(d+" "),function(e,t){e.stopPropagation(),"pagerUpdate"===e.type&&(t=void 0===t?g.page+1:t,g.last.page=!0),g.page=(parseInt(t,10)||1)-1,$(o,g,!0),y(o,g,!1)}).bind("pageAndSize"+d,function(e,t,a){e.stopPropagation(),g.page=(parseInt(t,10)||1)-1,F(o,A(g,a,"get"),g),$(o,g,!0),x(o,g),y(o,g,!1)}),s=[g.cssFirst,g.cssPrev,g.cssNext,g.cssLast],r=[O,D,L,E],l&&!p.length&&console.warn('Pager >> "container" not found'),p.find(s.join(",")).attr("tabindex",0).unbind("click"+d).bind("click"+d,function(e){e.stopPropagation();var t,a=M(this),i=s.length;if(!a.hasClass(g.cssDisabled))for(t=0;t> "goto" selector not found'),(a=p.find(g.cssPageSize)).length?(a.find("option").removeAttr("selected"),a.unbind("change"+d).bind("change"+d,function(){if(!M(this).hasClass(g.cssDisabled)){var e=M(this).val();F(o,e,g),$(o,g),z(o,g)}return!1})):l&&console.warn('Pager >> "size" selector not found'),g.initialized=!1,c.triggerHandler("pagerBeforeInitialized",g),U(o,g,!1),"string"==typeof g.ajaxUrl?(g.ajax=!0,n.widgetOptions.filter_serversideFiltering=!0,n.serverSideSorting=!0,$(o,g)):(g.ajax=!1,T.appendCache(n,!0),j(o,g)),g.ajax||g.initialized||(g.initializing=!1,g.initialized=!0,F(o,g.size,g),$(o,g),l&&console.log("Pager >> Triggering pagerInitialized"),n.$table.triggerHandler("pagerInitialized",g),n.widgetOptions.filter_initialized&&T.hasWidget(o,"filter")||y(o,g,!1)),n.widgetInit.pager=!0};u.appender=function(e,t){var a=e.config,i=a.pager;i.ajax||(a.rowsCopy=t,i.totalRows=i.countChildRows?a.$tbodies.eq(0).children("tr").length:t.length,i.size=M.data(e,"pagerLastSize")||i.size||i.settings.size||10,i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),m(e,t,i),y(e,i,!1))},u.construct=function(e){return this.each(function(){this.config&&this.hasInitialized&&H(this,e)})}}}),T.showError=function(e,t,a,i){var s=M(e),r=s[0].config,o=r&&r.widgetOptions,n=r.pager&&r.pager.cssErrorRow||o&&o.pager_css&&o.pager_css.errorRow||"tablesorter-errorRow",l=typeof t,g=!0,c="",d=function(){r.$table.find("thead").find(r.selectorRemove).remove()};if(s.length){if("function"==typeof r.pager.ajaxError){if(!1===(g=r.pager.ajaxError(r,t,a,i)))return d();c=g}else if("function"==typeof o.pager_ajaxError){if(!1===(g=o.pager_ajaxError(r,t,a,i)))return d();c=g}if(""===c)if("object"===l)c=0===t.status?"Not connected, verify Network":404===t.status?"Requested page not found [404]":500===t.status?"Internal Server Error [500]":"parsererror"===i?"Requested JSON parse failed":"timeout"===i?"Time out error":"abort"===i?"Ajax Request aborted":"Uncaught error: "+t.statusText+" ["+t.status+"]";else{if("string"!==l)return d();c=t}M(/tr\>/.test(c)?c:''+c+"").click(function(){M(this).remove()}).appendTo(r.$table.find("thead:first")).addClass(n+" "+r.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}else console.error("tablesorter showError: no table parameter passed")},M.fn.extend({tablesorterPager:M.tablesorterPager.construct})}(jQuery);return jQuery;})); diff --git a/dist/js/extras/semver-mod.min.js b/dist/js/extras/semver-mod.min.js index a53aa521..416ab739 100644 --- a/dist/js/extras/semver-mod.min.js +++ b/dist/js/extras/semver-mod.min.js @@ -1,2 +1,2 @@ /*! Modified semver.js for node.js (v4.3.3, 3/27/2015) */ -!function(){var h,n={exports:{}}.exports=L;h="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var r=Array.prototype.slice.call(arguments,0);r.unshift("SEMVER"),console.log.apply(console,r)}:function(){},n.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,c=n.re=[],r=n.src=[],e=0,t=e++;r[t]="0|[1-9]\\d*";var s=e++;r[s]="[0-9]+";var a=e++;r[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=e++;r[p]="("+r[t]+")\\.("+r[t]+")\\.("+r[t]+")";var u=e++;r[u]="("+r[s]+")\\.("+r[s]+")\\.("+r[s]+")";var l=e++;r[l]="(?:"+r[t]+"|"+r[a]+")";var f=e++;r[f]="(?:"+r[s]+"|"+r[a]+")";var v=e++;r[v]="(?:-("+r[l]+"(?:\\."+r[l]+")*))";var m=e++;r[m]="(?:-?("+r[f]+"(?:\\."+r[f]+")*))";var g=e++;r[g]="[0-9A-Za-z-]+";var w=e++;r[w]="(?:\\+("+r[g]+"(?:\\."+r[g]+")*))";var y=e++,d="v?"+r[p]+r[v]+"?"+r[w]+"?";r[y]="^"+d+"$";var j="[v=\\s]*"+r[u]+r[m]+"?"+r[w]+"?",E=e++;r[E]="^"+j+"$";var b=e++;r[b]="((?:<|>)?=?)";var $=e++;r[$]=r[s]+"|x|X|\\*";var k=e++;r[k]=r[t]+"|x|X|\\*";var R=e++;r[R]="[v=\\s]*("+r[k]+")(?:\\.("+r[k]+")(?:\\.("+r[k]+")(?:"+r[v]+")?"+r[w]+"?)?)?";var S=e++;r[S]="[v=\\s]*("+r[$]+")(?:\\.("+r[$]+")(?:\\.("+r[$]+")(?:"+r[m]+")?"+r[w]+"?)?)?";var x=e++;r[x]="^"+r[b]+"\\s*"+r[R]+"$";var I=e++;r[I]="^"+r[b]+"\\s*"+r[S]+"$";var T=e++;r[T]="(?:~>?)";var V=e++;r[V]="(\\s*)"+r[T]+"\\s+",c[V]=new RegExp(r[V],"g");var A=e++;r[A]="^"+r[T]+r[R]+"$";var C=e++;r[C]="^"+r[T]+r[S]+"$";var N=e++;r[N]="(?:\\^)";var M=e++;r[M]="(\\s*)"+r[N]+"\\s+",c[M]=new RegExp(r[M],"g");var _=e++;r[_]="^"+r[N]+r[R]+"$";var D=e++;r[D]="^"+r[N]+r[S]+"$";var X=e++;r[X]="^"+r[b]+"\\s*("+j+")$|^$";var z=e++;r[z]="^"+r[b]+"\\s*("+d+")$|^$";var G=e++;r[G]="(\\s*)"+r[b]+"\\s*("+j+"|"+r[R]+")",c[G]=new RegExp(r[G],"g");var O=e++;r[O]="^\\s*("+r[R]+")\\s+-\\s+("+r[R]+")\\s*$";var P=e++;r[P]="^\\s*("+r[S]+")\\s+-\\s+("+r[S]+")\\s*$";var Z=e++;r[Z]="(<|>)?=?\\s*\\*";for(var q=0;q<34;q++)h(q,r[q]),c[q]||(c[q]=new RegExp(r[q]));function B(r,e){if(r instanceof L)return r;if("string"!=typeof r)return null;if(r.length>i)return null;if(!(e?c[E]:c[y]).test(r))return null;try{return new L(r,e)}catch(r){return null}}function L(r,e){if(r instanceof L){if(r.loose===e)return r;r=r.version}else if("string"!=typeof r)throw new TypeError("Invalid Version: "+r);if(r.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof L))return new L(r,e);h("SemVer",r,e),this.loose=e;var t=r.trim().match(e?c[E]:c[y]);if(!t)throw new TypeError("Invalid Version: "+r);if(this.raw=r,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(function(r){if(/^[0-9]+$/.test(r)){var e=+r;if(0<=e&&e'},L.prototype.toString=function(){return this.version},L.prototype.compare=function(r){return h("SemVer.compare",this.version,this.loose,r),r instanceof L||(r=new L(r,this.loose)),this.compareMain(r)||this.comparePre(r)},L.prototype.compareMain=function(r){return r instanceof L||(r=new L(r,this.loose)),F(this.major,r.major)||F(this.minor,r.minor)||F(this.patch,r.patch)},L.prototype.comparePre=function(r){if(r instanceof L||(r=new L(r,this.loose)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;var e=0;do{var t=this.prerelease[e],n=r.prerelease[e];if(h("prerelease compare",e,t,n),void 0===t&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===t)return-1;if(t!==n)return F(t,n)}while(++e)},L.prototype.inc=function(r,e){switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var t=this.prerelease.length;0<=--t;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+r)}return this.format(),this},n.inc=function(r,e,t,n){"string"==typeof t&&(n=t,t=void 0);try{return new L(r,t).inc(e,n).version}catch(r){return null}},n.diff=function(r,e){{if(W(r,e))return null;var t=B(r),n=B(e);if(t.prerelease.length||n.prerelease.length){for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return i}},n.compareIdentifiers=F;var U=/^[0-9]+$/;function F(r,e){var t=U.test(r),n=U.test(e);return t&&n&&(r=+r,e=+e),t&&!n?-1:n&&!t?1:r":i=K(r,t,n);break;case">=":i=rr(r,t,n);break;case"<":i=Q(r,t,n);break;case"<=":i=er(r,t,n);break;default:throw new TypeError("Invalid operator: "+e)}return i}function nr(r,e){if(r instanceof nr){if(r.loose===e)return r;r=r.value}if(!(this instanceof nr))return new nr(r,e);h("comparator",r,e),this.loose=e,this.parse(r),this.semver===ir?this.value="":this.value=this.operator+this.semver.version,h("comp",this)}n.rcompareIdentifiers=function(r,e){return F(e,r)},n.major=function(r,e){return new L(r,e).major},n.minor=function(r,e){return new L(r,e).minor},n.patch=function(r,e){return new L(r,e).patch},n.compare=H,n.compareLoose=function(r,e){return H(r,e,!0)},n.rcompare=J,n.sort=function(r,t){return r.sort(function(r,e){return n.compare(r,e,t)})},n.rsort=function(r,t){return r.sort(function(r,e){return n.rcompare(r,e,t)})},n.gt=K,n.lt=Q,n.eq=W,n.neq=Y,n.gte=rr,n.lte=er,n.cmp=tr,n.Comparator=nr;var ir={};function or(r,e){if(r instanceof or&&r.loose===e)return r;if(!(this instanceof or))return new or(r,e);if(this.loose=e,this.raw=r,this.set=r.split(/\s*\|\|\s*/).map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+r);this.format()}function sr(r){return!r||"x"===r.toLowerCase()||"*"===r}function ar(r,e,t,n,i,o,s,a,p,c,u,h,l){return((e=sr(t)?"":sr(n)?">="+t+".0.0":sr(i)?">="+t+"."+n+".0":">="+e)+" "+(a=sr(p)?"":sr(c)?"<"+(+p+1)+".0.0":sr(u)?"<"+p+"."+(+c+1)+".0":h?"<="+p+"."+c+"."+u+"-"+h:"<="+a)).trim()}function pr(r,e){for(var t=0;t":i=K,o=er,s=Q,a=">",p=">=";break;case"<":i=Q,o=rr,s=K,a="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(cr(r,e,n))return!1;for(var c=0;c'},nr.prototype.toString=function(){return this.value},nr.prototype.test=function(r){return h("Comparator.test",r,this.loose),this.semver===ir||("string"==typeof r&&(r=new L(r,this.loose)),tr(r,this.operator,this.semver,this.loose))},(n.Range=or).prototype.inspect=function(){return''},or.prototype.format=function(){return this.range=this.set.map(function(r){return r.join(" ").trim()}).join("||").trim(),this.range},or.prototype.toString=function(){return this.range},or.prototype.parseRange=function(r){var p=this.loose;r=r.trim(),h("range",r,p);var e=p?c[P]:c[O];r=r.replace(e,ar),h("hyphen replace",r),r=r.replace(c[G],"$1$2$3"),h("comparator trim",r,c[G]),r=(r=(r=r.replace(c[V],"$1~")).replace(c[M],"$1^")).split(/\s+/).join(" ");var t=p?c[X]:c[z],n=r.split(" ").map(function(r){return t=p,h("comp",e=r),s=t,e=e.trim().split(/\s+/).map(function(r){return function(s,r){h("caret",s,r);var e=r?c[D]:c[_];return s.replace(e,function(r,e,t,n,i){var o;return h("caret",s,r,e,t,n,i),sr(e)?o="":sr(t)?o=">="+e+".0.0 <"+(+e+1)+".0.0":sr(n)?o="0"===e?">="+e+"."+t+".0 <"+e+"."+(+t+1)+".0":">="+e+"."+t+".0 <"+(+e+1)+".0.0":i?(h("replaceCaret pr",i),"-"!==i.charAt(0)&&(i="-"+i),o="0"===e?"0"===t?">="+e+"."+t+"."+n+i+" <"+e+"."+t+"."+(+n+1):">="+e+"."+t+"."+n+i+" <"+e+"."+(+t+1)+".0":">="+e+"."+t+"."+n+i+" <"+(+e+1)+".0.0"):(h("no pr"),o="0"===e?"0"===t?">="+e+"."+t+"."+n+" <"+e+"."+t+"."+(+n+1):">="+e+"."+t+"."+n+" <"+e+"."+(+t+1)+".0":">="+e+"."+t+"."+n+" <"+(+e+1)+".0.0"),h("caret return",o),o})}(r,s)}).join(" "),h("caret",e),a=t,e=e.trim().split(/\s+/).map(function(r){return s=r,e=a?c[C]:c[A],s.replace(e,function(r,e,t,n,i){var o;return h("tilde",s,r,e,t,n,i),sr(e)?o="":sr(t)?o=">="+e+".0.0 <"+(+e+1)+".0.0":sr(n)?o=">="+e+"."+t+".0 <"+e+"."+(+t+1)+".0":i?(h("replaceTilde pr",i),"-"!==i.charAt(0)&&(i="-"+i),o=">="+e+"."+t+"."+n+i+" <"+e+"."+(+t+1)+".0"):o=">="+e+"."+t+"."+n+" <"+e+"."+(+t+1)+".0",h("tilde return",o),o});var s,e}).join(" "),h("tildes",e),h("replaceXRanges",i=e,o=t),e=i.split(/\s+/).map(function(r){return function(u,r){u=u.trim();var e=r?c[I]:c[x];return u.replace(e,function(r,e,t,n,i,o){h("xRange",u,r,e,t,n,i,o);var s=sr(t),a=s||sr(n),p=a||sr(i),c=p;return"="===e&&c&&(e=""),s?r=">"===e||"<"===e?"<0.0.0":"*":e&&c?(a&&(n=0),p&&(i=0),">"===e?(e=">=",a?(t=+t+1,i=n=0):p&&(n=+n+1,i=0)):"<="===e&&(e="<",a?t=+t+1:n=+n+1),r=e+t+"."+n+"."+i):a?r=">="+t+".0.0 <"+(+t+1)+".0.0":p&&(r=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"),h("xRange return",r),r})}(r,o)}).join(" "),h("xrange",e),h("replaceStars",n=e,t),e=n.trim().replace(c[Z],""),h("stars",e),e;var e,t,n,i,o,a,s}).join(" ").split(/\s+/);return this.loose&&(n=n.filter(function(r){return!!r.match(t)})),n=n.map(function(r){return new nr(r,p)})},n.toComparators=function(r,e){return new or(r,e).set.map(function(r){return r.map(function(r){return r.value}).join(" ").trim().split(" ")})},or.prototype.test=function(r){if(!r)return!1;"string"==typeof r&&(r=new L(r,this.loose));for(var e=0;e",t)},n.outside=ur,"function"==typeof define&&define.amd&&define(n)}(); \ No newline at end of file +!function(){var h,n={exports:{}}.exports=L;h="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var r=Array.prototype.slice.call(arguments,0);r.unshift("SEMVER"),console.log.apply(console,r)}:function(){},n.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,c=n.re=[],r=n.src=[],e=0,t=e++;r[t]="0|[1-9]\\d*";var s=e++;r[s]="[0-9]+";var a=e++;r[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=e++;r[p]="("+r[t]+")\\.("+r[t]+")\\.("+r[t]+")";var u=e++;r[u]="("+r[s]+")\\.("+r[s]+")\\.("+r[s]+")";var l=e++;r[l]="(?:"+r[t]+"|"+r[a]+")";var f=e++;r[f]="(?:"+r[s]+"|"+r[a]+")";var v=e++;r[v]="(?:-("+r[l]+"(?:\\."+r[l]+")*))";var m=e++;r[m]="(?:-?("+r[f]+"(?:\\."+r[f]+")*))";var g=e++;r[g]="[0-9A-Za-z-]+";var w=e++;r[w]="(?:\\+("+r[g]+"(?:\\."+r[g]+")*))";var y=e++,d="v?"+r[p]+r[v]+"?"+r[w]+"?";r[y]="^"+d+"$";var j="[v=\\s]*"+r[u]+r[m]+"?"+r[w]+"?",E=e++;r[E]="^"+j+"$";var b=e++;r[b]="((?:<|>)?=?)";var $=e++;r[$]=r[s]+"|x|X|\\*";var k=e++;r[k]=r[t]+"|x|X|\\*";var R=e++;r[R]="[v=\\s]*("+r[k]+")(?:\\.("+r[k]+")(?:\\.("+r[k]+")(?:"+r[v]+")?"+r[w]+"?)?)?";var S=e++;r[S]="[v=\\s]*("+r[$]+")(?:\\.("+r[$]+")(?:\\.("+r[$]+")(?:"+r[m]+")?"+r[w]+"?)?)?";var x=e++;r[x]="^"+r[b]+"\\s*"+r[R]+"$";var I=e++;r[I]="^"+r[b]+"\\s*"+r[S]+"$";var T=e++;r[T]="(?:~>?)";var V=e++;r[V]="(\\s*)"+r[T]+"\\s+",c[V]=new RegExp(r[V],"g");var A=e++;r[A]="^"+r[T]+r[R]+"$";var C=e++;r[C]="^"+r[T]+r[S]+"$";var N=e++;r[N]="(?:\\^)";var M=e++;r[M]="(\\s*)"+r[N]+"\\s+",c[M]=new RegExp(r[M],"g");var _=e++;r[_]="^"+r[N]+r[R]+"$";var D=e++;r[D]="^"+r[N]+r[S]+"$";var X=e++;r[X]="^"+r[b]+"\\s*("+j+")$|^$";var z=e++;r[z]="^"+r[b]+"\\s*("+d+")$|^$";var G=e++;r[G]="(\\s*)"+r[b]+"\\s*("+j+"|"+r[R]+")",c[G]=new RegExp(r[G],"g");var O=e++;r[O]="^\\s*("+r[R]+")\\s+-\\s+("+r[R]+")\\s*$";var P=e++;r[P]="^\\s*("+r[S]+")\\s+-\\s+("+r[S]+")\\s*$";var Z=e++;r[Z]="(<|>)?=?\\s*\\*";for(var q=0;q<34;q++)h(q,r[q]),c[q]||(c[q]=new RegExp(r[q]));function B(r,e){if(r instanceof L)return r;if("string"!=typeof r)return null;if(r.length>i)return null;if(!(e?c[E]:c[y]).test(r))return null;try{return new L(r,e)}catch(r){return null}}function L(r,e){if(r instanceof L){if(r.loose===e)return r;r=r.version}else if("string"!=typeof r)throw new TypeError("Invalid Version: "+r);if(r.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof L))return new L(r,e);h("SemVer",r,e),this.loose=e;var t=r.trim().match(e?c[E]:c[y]);if(!t)throw new TypeError("Invalid Version: "+r);if(this.raw=r,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(function(r){if(/^[0-9]+$/.test(r)){var e=+r;if(0<=e&&e'},L.prototype.toString=function(){return this.version},L.prototype.compare=function(r){return h("SemVer.compare",this.version,this.loose,r),r instanceof L||(r=new L(r,this.loose)),this.compareMain(r)||this.comparePre(r)},L.prototype.compareMain=function(r){return r instanceof L||(r=new L(r,this.loose)),F(this.major,r.major)||F(this.minor,r.minor)||F(this.patch,r.patch)},L.prototype.comparePre=function(r){if(r instanceof L||(r=new L(r,this.loose)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;var e=0;do{var t=this.prerelease[e],n=r.prerelease[e];if(h("prerelease compare",e,t,n),void 0===t&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===t)return-1;if(t!==n)return F(t,n)}while(++e)},L.prototype.inc=function(r,e){switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var t=this.prerelease.length;0<=--t;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+r)}return this.format(),this},n.inc=function(r,e,t,n){"string"==typeof t&&(n=t,t=void 0);try{return new L(r,t).inc(e,n).version}catch(r){return null}},n.diff=function(r,e){{if(W(r,e))return null;var t=B(r),n=B(e);if(t.prerelease.length||n.prerelease.length){for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return i}},n.compareIdentifiers=F;var U=/^[0-9]+$/;function F(r,e){var t=U.test(r),n=U.test(e);return t&&n&&(r=+r,e=+e),t&&!n?-1:n&&!t?1:r":i=K(r,t,n);break;case">=":i=rr(r,t,n);break;case"<":i=Q(r,t,n);break;case"<=":i=er(r,t,n);break;default:throw new TypeError("Invalid operator: "+e)}return i}function nr(r,e){if(r instanceof nr){if(r.loose===e)return r;r=r.value}if(!(this instanceof nr))return new nr(r,e);h("comparator",r,e),this.loose=e,this.parse(r),this.semver===ir?this.value="":this.value=this.operator+this.semver.version,h("comp",this)}n.rcompareIdentifiers=function(r,e){return F(e,r)},n.major=function(r,e){return new L(r,e).major},n.minor=function(r,e){return new L(r,e).minor},n.patch=function(r,e){return new L(r,e).patch},n.compare=H,n.compareLoose=function(r,e){return H(r,e,!0)},n.rcompare=J,n.sort=function(r,t){return r.sort(function(r,e){return n.compare(r,e,t)})},n.rsort=function(r,t){return r.sort(function(r,e){return n.rcompare(r,e,t)})},n.gt=K,n.lt=Q,n.eq=W,n.neq=Y,n.gte=rr,n.lte=er,n.cmp=tr,n.Comparator=nr;var ir={};function or(r,e){if(r instanceof or&&r.loose===e)return r;if(!(this instanceof or))return new or(r,e);if(this.loose=e,this.raw=r,this.set=r.split(/\s*\|\|\s*/).map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+r);this.format()}function sr(r){return!r||"x"===r.toLowerCase()||"*"===r}function ar(r,e,t,n,i,o,s,a,p,c,u,h,l){return((e=sr(t)?"":sr(n)?">="+t+".0.0":sr(i)?">="+t+"."+n+".0":">="+e)+" "+(a=sr(p)?"":sr(c)?"<"+(+p+1)+".0.0":sr(u)?"<"+p+"."+(+c+1)+".0":h?"<="+p+"."+c+"."+u+"-"+h:"<="+a)).trim()}function pr(r,e){for(var t=0;t":i=K,o=er,s=Q,a=">",p=">=";break;case"<":i=Q,o=rr,s=K,a="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(cr(r,e,n))return!1;for(var c=0;c'},nr.prototype.toString=function(){return this.value},nr.prototype.test=function(r){return h("Comparator.test",r,this.loose),this.semver===ir||("string"==typeof r&&(r=new L(r,this.loose)),tr(r,this.operator,this.semver,this.loose))},(n.Range=or).prototype.inspect=function(){return''},or.prototype.format=function(){return this.range=this.set.map(function(r){return r.join(" ").trim()}).join("||").trim(),this.range},or.prototype.toString=function(){return this.range},or.prototype.parseRange=function(r){var p=this.loose;r=r.trim(),h("range",r,p);var e=p?c[P]:c[O];r=r.replace(e,ar),h("hyphen replace",r),r=r.replace(c[G],"$1$2$3"),h("comparator trim",r,c[G]),r=(r=(r=r.replace(c[V],"$1~")).replace(c[M],"$1^")).split(/\s+/).join(" ");var t=p?c[X]:c[z],n=r.split(" ").map(function(r){return t=p,h("comp",e=r),s=t,e=e.trim().split(/\s+/).map(function(r){return function(s,r){h("caret",s,r);var e=r?c[D]:c[_];return s.replace(e,function(r,e,t,n,i){var o;return h("caret",s,r,e,t,n,i),o=sr(e)?"":sr(t)?">="+e+".0.0 <"+(+e+1)+".0.0":sr(n)?"0"===e?">="+e+"."+t+".0 <"+e+"."+(+t+1)+".0":">="+e+"."+t+".0 <"+(+e+1)+".0.0":i?(h("replaceCaret pr",i),"-"!==i.charAt(0)&&(i="-"+i),"0"===e?"0"===t?">="+e+"."+t+"."+n+i+" <"+e+"."+t+"."+(+n+1):">="+e+"."+t+"."+n+i+" <"+e+"."+(+t+1)+".0":">="+e+"."+t+"."+n+i+" <"+(+e+1)+".0.0"):(h("no pr"),"0"===e?"0"===t?">="+e+"."+t+"."+n+" <"+e+"."+t+"."+(+n+1):">="+e+"."+t+"."+n+" <"+e+"."+(+t+1)+".0":">="+e+"."+t+"."+n+" <"+(+e+1)+".0.0"),h("caret return",o),o})}(r,s)}).join(" "),h("caret",e),a=t,e=e.trim().split(/\s+/).map(function(r){return s=r,e=a?c[C]:c[A],s.replace(e,function(r,e,t,n,i){var o;return h("tilde",s,r,e,t,n,i),o=sr(e)?"":sr(t)?">="+e+".0.0 <"+(+e+1)+".0.0":sr(n)?">="+e+"."+t+".0 <"+e+"."+(+t+1)+".0":i?(h("replaceTilde pr",i),"-"!==i.charAt(0)&&(i="-"+i),">="+e+"."+t+"."+n+i+" <"+e+"."+(+t+1)+".0"):">="+e+"."+t+"."+n+" <"+e+"."+(+t+1)+".0",h("tilde return",o),o});var s,e}).join(" "),h("tildes",e),h("replaceXRanges",i=e,o=t),e=i.split(/\s+/).map(function(r){return function(u,r){u=u.trim();var e=r?c[I]:c[x];return u.replace(e,function(r,e,t,n,i,o){h("xRange",u,r,e,t,n,i,o);var s=sr(t),a=s||sr(n),p=a||sr(i),c=p;return"="===e&&c&&(e=""),s?r=">"===e||"<"===e?"<0.0.0":"*":e&&c?(a&&(n=0),p&&(i=0),">"===e?(e=">=",a?(t=+t+1,i=n=0):p&&(n=+n+1,i=0)):"<="===e&&(e="<",a?t=+t+1:n=+n+1),r=e+t+"."+n+"."+i):a?r=">="+t+".0.0 <"+(+t+1)+".0.0":p&&(r=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"),h("xRange return",r),r})}(r,o)}).join(" "),h("xrange",e),h("replaceStars",n=e,t),e=n.trim().replace(c[Z],""),h("stars",e),e;var e,t,n,i,o,a,s}).join(" ").split(/\s+/);return this.loose&&(n=n.filter(function(r){return!!r.match(t)})),n=n.map(function(r){return new nr(r,p)})},n.toComparators=function(r,e){return new or(r,e).set.map(function(r){return r.map(function(r){return r.value}).join(" ").trim().split(" ")})},or.prototype.test=function(r){if(!r)return!1;"string"==typeof r&&(r=new L(r,this.loose));for(var e=0;e",t)},n.outside=ur,"function"==typeof define&&define.amd&&define(n)}(); \ No newline at end of file diff --git a/dist/js/jquery.tablesorter.combined.js b/dist/js/jquery.tablesorter.combined.js index 5fc89ebd..a3fc884b 100644 --- a/dist/js/jquery.tablesorter.combined.js +++ b/dist/js/jquery.tablesorter.combined.js @@ -1,7 +1,7 @@ -/*! tablesorter (FORK) - updated 2018-08-27 (v2.31.0)*/ +/*! tablesorter (FORK) - updated 2018-11-20 (v2.31.1)*/ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery) { -/*! TableSorter (FORK) v2.31.0 *//* +/*! TableSorter (FORK) v2.31.1 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -25,7 +25,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.31.0', + version : '2.31.1', parsers : [], widgets : [], @@ -322,6 +322,8 @@ ts.applyWidget( table, true ); // if user has supplied a sort list to constructor if ( c.sortList.length > 0 ) { + // save sortList before any sortAppend is added + c.last.sortList = c.sortList; ts.sortOn( c, c.sortList, {}, !c.initWidgets ); } else { ts.setHeadersCss( c ); diff --git a/dist/js/jquery.tablesorter.combined.min.js b/dist/js/jquery.tablesorter.combined.min.js index dbde1291..0efd971c 100644 --- a/dist/js/jquery.tablesorter.combined.min.js +++ b/dist/js/jquery.tablesorter.combined.min.js @@ -1,4 +1,4 @@ (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ -/*! tablesorter (FORK) - updated 2018-08-27 (v2.31.0)*/ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(R){"use strict";var T=R.tablesorter={version:"2.31.0",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",cssIconDisabled:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(t,r){if(t&&t.tHead&&0!==t.tBodies.length&&!0!==t.hasInitialized){var e,a="",s=R(t),i=R.metadata;t.hasInitialized=!1,t.isProcessing=!0,t.config=r,R.data(t,"tablesorter",r),T.debug(r,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+T.version),R.data(t,"startoveralltimer",new Date)),r.supportsDataObject=((e=R.fn.jquery.split("."))[0]=parseInt(e[0],10),1':"",l.$headers=R(R.map(l.$table.find(l.selectorHeaders),function(e,t){var r,a,s,i,o,n=R(e);if(!T.getClosest(n,"tr").hasClass(l.cssIgnoreRow))return/(th|td)/i.test(e.nodeName)||(o=T.getClosest(n,"th, td"),n.attr("data-column",o.attr("data-column"))),r=T.getColumnData(l.table,l.headers,t,!0),l.headerContent[t]=n.html(),""===l.headerTemplate||n.find("."+T.css.headerIn).length||(i=l.headerTemplate.replace(T.regex.templateContent,n.html()).replace(T.regex.templateIcon,n.find("."+T.css.icon).length?"":c),l.onRenderTemplate&&(a=l.onRenderTemplate.apply(n,[t,i]))&&"string"==typeof a&&(i=a),n.html('
'+i+"
")),l.onRenderHeader&&l.onRenderHeader.apply(n,[t,l,l.$table]),s=parseInt(n.attr("data-column"),10),e.column=s,o=T.getOrder(T.getData(n,r,"sortInitialOrder")||l.sortInitialOrder),l.sortVars[s]={count:-1,order:o?l.sortReset?[1,0,2]:[1,0]:l.sortReset?[0,1,2]:[0,1],lockedOrder:!1,sortedBy:""},void 0!==(o=T.getData(n,r,"lockedOrder")||!1)&&!1!==o&&(l.sortVars[s].lockedOrder=!0,l.sortVars[s].order=T.getOrder(o)?[1,1]:[0,0]),l.headerList[t]=e,n.addClass(T.css.header+" "+l.cssHeader),T.getClosest(n,"tr").addClass(T.css.headerRow+" "+l.cssHeaderRow).attr("role","row"),l.tabIndex&&n.attr("tabindex",0),e})),l.$headerIndexed=[],r=0;r'),t=o.$table.width(),s=(a=o.$tbodies.find("tr:first").children(":visible")).length,i=0;i").css("width",r));o.$table.prepend(n)}},getData:function(e,t,r){var a,s,i="",o=R(e);return o.length?(a=!!R.metadata&&o.metadata(),s=" "+(o.attr("class")||""),void 0!==o.data(r)||void 0!==o.data(r.toLowerCase())?i+=o.data(r)||o.data(r.toLowerCase()):a&&void 0!==a[r]?i+=a[r]:t&&void 0!==t[r]?i+=t[r]:" "!==s&&s.match(" "+r+"-")&&(i=s.match(new RegExp("\\s"+r+"-([\\w-]+)"))[1]||""),R.trim(i)):""},getColumnData:function(e,t,r,a,s){if("object"!=typeof t||null===t)return t;var i,o=(e=R(e)[0]).config,n=s||o.$headers,l=o.$headerIndexed&&o.$headerIndexed[r]||n.find('[data-column="'+r+'"]:last');if(void 0!==t[r])return a?t[r]:t[n.index(l)];for(i in t)if("string"==typeof i&&l.filter(i).add(l.find(i)).length)return t[i]},isProcessing:function(e,t,r){var a=(e=R(e))[0].config,s=r||e.find("."+T.css.header);t?(void 0!==r&&0'),R.fn.detach?t.detach():t.remove();var a=R(e).find("colgroup.tablesorter-savemyplace");t.insertAfter(a),a.remove(),e.isProcessing=!1},clearTableBody:function(e){R(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,r="[",a=T.characterEquivalents;if(!T.characterRegex){for(t in T.characterRegexArray={},a)"string"==typeof t&&(r+=a[t],T.characterRegexArray[t]=new RegExp("["+a[t]+"]","g"));T.characterRegex=new RegExp(r+"]")}if(T.characterRegex.test(e))for(t in a)"string"==typeof t&&(e=e.replace(T.characterRegexArray[t],t));return e},validateOptions:function(e){var t,r,a,s,i="headers sortForce sortList sortAppend widgets".split(" "),o=e.originalSettings;if(o){for(t in T.debug(e,"core")&&(s=new Date),o)if("undefined"===(a=typeof T.defaults[t]))console.warn('Tablesorter Warning! "table.config.'+t+'" option not recognized');else if("object"===a)for(r in o[t])a=T.defaults[t]&&typeof T.defaults[t][r],R.inArray(t,i)<0&&"undefined"===a&&console.warn('Tablesorter Warning! "table.config.'+t+"."+r+'" option not recognized');T.debug(e,"core")&&console.log("validate options time:"+T.benchmark(s))}},restoreHeaders:function(e){var t,r,a=R(e)[0].config,s=a.$table.find(a.selectorHeaders),i=s.length;for(t=0;t tr").children("th, td");!1===t&&0<=R.inArray("uitheme",i.widgets)&&(s.triggerHandler("applyWidgetId",["uitheme"]),s.triggerHandler("applyWidgetId",["zebra"])),o.find("tr").not(n).remove(),a="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(i.namespace+" "),s.removeData("tablesorter").unbind(a.replace(T.regex.spaces," ")),i.$headers.add(l).removeClass([T.css.header,i.cssHeader,i.cssAsc,i.cssDesc,T.css.sortAsc,T.css.sortDesc,T.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),n.find(i.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(i.namespace+" ").replace(T.regex.spaces," ")),T.restoreHeaders(e),s.toggleClass(T.css.table+" "+i.tableClass+" tablesorter-"+i.theme,!1===t),s.removeClass(i.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof r&&r(e),T.debug(i,"core")&&console.log("tablesorter has been removed")}}};R.fn.tablesorter=function(t){return this.each(function(){var e=R.extend(!0,{},T.defaults,t,T.instanceMethods);e.originalSettings=t,!this.hasInitialized&&T.buildTable&&"TABLE"!==this.nodeName?T.buildTable(this,e):T.setup(this,e)})},window.console&&window.console.log||(T.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=1> Using",n?u:"cookies"),b.parseJSON&&(n?l=b.parseJSON(y[u][t]||"null")||{}:(i=v.cookie.split(/[;\s|=]/),l=0!==(s=b.inArray(t,i)+1)&&b.parseJSON(i[s]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[m]?l[m][h]:"";l[m]||(l[m]={}),l[m][h]=r,n?y[u][t]=JSON.stringify(l):((o=new Date).setTime(o.getTime()+31536e6),v.cookie=t+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+o.toGMTString()+"; path=/")}}(e,window,document),function($){"use strict";var S=$.tablesorter||{};S.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},$.extend(S.css,{wrapper:"tablesorter-wrapper"}),S.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var a,s,i,o,n,l,c,d,f,u,g,p,h,m=S.themes,b=t.$table.add($(t.namespace+"_extra_table")),y=t.$headers.add($(t.namespace+"_extra_headers")),v=t.theme||"jui",w=m[v]||{},x=$.trim([w.sortNone,w.sortDesc,w.sortAsc,w.active].join(" ")),C=$.trim([w.iconSortNone,w.iconSortDesc,w.iconSortAsc].join(" ")),_=S.debug(t,"uitheme");for(_&&(n=new Date),b.hasClass("tablesorter-"+v)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,u=m[t.appliedTheme]||{},g=(h=!$.isEmptyObject(u))?[u.sortNone,u.sortDesc,u.sortAsc,u.active].join(" "):"",p=h?[u.iconSortNone,u.iconSortDesc,u.iconSortAsc].join(" "):"",h&&(r.zebra[0]=$.trim(" "+r.zebra[0].replace(" "+u.even,"")),r.zebra[1]=$.trim(" "+r.zebra[1].replace(" "+u.odd,"")),t.$tbodies.children().removeClass([u.even,u.odd].join(" "))),w.even&&(r.zebra[0]+=" "+w.even),w.odd&&(r.zebra[1]+=" "+w.odd),b.children("caption").removeClass(u.caption||"").addClass(w.caption),d=b.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(u.table||"")).addClass("tablesorter-"+v+" "+(w.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(u.footerRow||"").addClass(w.footerRow).children("th, td").removeClass(u.footerCells||"").addClass(w.footerCells),y.removeClass((h?[u.header,u.hover,g].join(" "):"")||"").addClass(w.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){$(this)["mouseenter"===e.type?"addClass":"removeClass"](w.hover||"")}),y.each(function(){var e=$(this);e.find("."+S.css.wrapper).length||e.wrapInner('
')}),t.cssIcon&&y.find("."+S.css.icon).removeClass(h?[u.icons,p].join(" "):"").addClass(w.icons||""),S.hasWidget(t.table,"filter")&&(s=function(){b.children("thead").children("."+S.css.filterRow).removeClass(h&&u.filterRow||"").addClass(w.filterRow||"")},r.filter_initialized?s():b.one("filterInit",function(){s()}))),a=0;a> Applied "+v+" theme"+S.benchmark(n))},remove:function(e,t,r,a){if(r.uitheme_applied){var s=t.$table,i=t.appliedTheme||"jui",o=S.themes[i]||S.themes.jui,n=s.children("thead").children(),l=o.sortNone+" "+o.sortDesc+" "+o.sortAsc,c=o.iconSortNone+" "+o.iconSortDesc+" "+o.iconSortAsc;s.removeClass("tablesorter-"+i+" "+o.table),r.uitheme_applied=!1,a||(s.find(S.css.header).removeClass(o.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(o.hover+" "+l+" "+o.active).filter("."+S.css.filterRow).removeClass(o.filterRow),n.find("."+S.css.icon).removeClass(o.icons+" "+c))}}})}(e),function(b){"use strict";var y=b.tablesorter||{};y.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(e,t,r){var a,s,i,o,n,l,c,d,f=t.$table,u=t.$tbodies,g=t.sortList,p=g.length,h=r&&r.columns||["primary","secondary","tertiary"],m=h.length-1;for(c=h.join(" "),s=0;s=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!H.orTest.test(t.iFilter)&&!H.orSplit.test(t.filter)||H.regex.test(t.filter))return null;var a,s,i,o=A.extend({},t),n=t.filter.split(H.orSplit),l=t.iFilter.split(H.orSplit),c=n.length;for(a=0;a]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(s.data("placeholder")||s.attr("data-placeholder")||d.filter_placeholder.select||"")+"":"",0<=(a=o=t).indexOf(d.filter_selectSourceSeparator)&&(a=(o=t.split(d.filter_selectSourceSeparator))[1],o=o[0]),e+="");c.$table.find("thead").find("select."+b.filter+'[data-column="'+i+'"]').append(e),(n="function"==typeof(a=d.filter_selectSource)||N.getColumnData(r,a,i))&&D.buildSelect(c.table,i,"",!0,s.hasClass(d.filter_onlyAvail))}D.buildDefault(r,!0),D.bindSearch(r,c.$table.find("."+b.filter),!0),d.filter_external&&D.bindSearch(r,d.filter_external),d.filter_hideFilters&&D.hideFilters(c),c.showProcessing&&(a="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(a.replace(N.regex.spaces," ")).bind(a,function(e,t){s=t?c.$table.find("."+b.header).filter("[data-column]").filter(function(){return""!==t[A(this).data("column")]}):"",N.isProcessing(r,"filterStart"===e.type,t?s:"")})),c.filteredRows=c.totalRows,a="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(a.replace(N.regex.spaces," ")).bind(a,function(){D.completeInit(this)}),c.pager&&c.pager.initialized&&!d.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){D.filterInitComplete(c)},100)):d.filter_initialized||D.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,a=D.setDefaults(e,t,r)||[];a.length&&(t.delayInit&&""===a.join("")||N.setFilters(e,a,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||D.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),a=r.length&&r[0].config,s=a&&a.widgetOptions;s&&!s.filter_initialized&&(s.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,a=e.widgetOptions,s=0,i=function(){a.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),D.findRows(e.table,e.lastSearch||[]),N.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(A.isEmptyObject(a.filter_formatter))i();else{for(r=a.filter_formatterInit.length,t=0;t';for(i=0;i").appendTo(t.$table.children("thead").eq(0)).children("td"),i=0;i").appendTo(a):((d=N.getColumnData(e,r.filter_formatter,i))?(r.filter_formatterCount++,(h=d(a,i))&&0===h.length&&(h=a.children("input")),h&&(0===h.parent().length||h.parent().length&&h.parent()[0]!==a[0])&&a.append(h)):h=A('').appendTo(a),h&&(f=o.data("placeholder")||o.attr("data-placeholder")||r.filter_placeholder.search||"",h.attr("placeholder",f))),h&&(c=(A.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[i]&&r.filter_cssFilter[i]||"":r.filter_cssFilter)||"",h.addClass(b.filter+" "+c),(f=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(f=["{{label}}"]),A.each(f,function(e,t){var r=new RegExp(t,"g"),a=o.attr("data-"+t.replace(/{{|}}/g,"")),s=void 0===a?o.text():a;c=c.replace(r,A.trim(s))}),h.attr({"data-column":a.attr("data-column"),"aria-label":c}),l&&(h.attr("placeholder","").addClass(b.filterDisabled)[0].disabled=!0)))},bindSearch:function(s,e,t){if(s=A(s)[0],(e=A(e)).length){var r,i=s.config,o=i.widgetOptions,a=i.namespace+"filter",n=o.filter_$externalFilters;!0!==t&&(r=o.filter_anyColumnSelector+","+o.filter_multipleColumnSelector,o.filter_$anyMatch=e.filter(r),n&&n.length?o.filter_$externalFilters=o.filter_$externalFilters.add(e):o.filter_$externalFilters=e,N.setFilters(s,i.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(a+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(N.regex.spaces," ")).bind("keydown"+a,function(e){if(e.which===l.escape&&!s.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+a,function(e){o=s.config.widgetOptions;var t=parseInt(A(this).attr("data-column"),10),r="boolean"==typeof o.filter_liveSearch?o.filter_liveSearch:N.getColumnData(s,o.filter_liveSearch,t);if(void 0===r&&(r=o.filter_liveSearch.fallback||!1),A(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===l.escape)this.value=o.filter_resetOnEsc?"":i.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=l.left&&e.which<=l.down)))return;if(!1===r&&""!==this.value&&e.which!==l.enter)return}D.searching(s,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(a+" "),function(e){var t=parseInt(A(this).attr("data-column"),10),r=e.type,a="boolean"==typeof o.filter_liveSearch?o.filter_liveSearch:N.getColumnData(s,o.filter_liveSearch,t);!s.config.widgetOptions.filter_initialized||e.which!==l.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==a&&(!0===a||"INPUT"===e.target.nodeName)||this.value===i.lastSearch[t])||(e.preventDefault(),A(this).attr("data-lastSearchTime",(new Date).getTime()),D.searching(s,"keypress"!==r,!0,t))})}},searching:function(e,t,r,a){var s,i=e.config.widgetOptions;void 0===a?s=!1:void 0===(s="boolean"==typeof i.filter_liveSearch?i.filter_liveSearch:N.getColumnData(e,i.filter_liveSearch,a))&&(s=i.filter_liveSearch.fallback||!1),clearTimeout(i.filter_searchTimer),void 0===t||!0===t?i.filter_searchTimer=setTimeout(function(){D.checkFilters(e,t,r)},s?i.filter_searchDelay:10):D.checkFilters(e,t,r)},equalFilters:function(e,t,r){var a,s=[],i=[],o=e.columns+1;for(t=A.isArray(t)?t:[],r=A.isArray(r)?r:[],a=0;a=e.columns&&(n=e.columns-1);o<=n;o++)u[u.length]=o;t=t.replace(s[d],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),F.filteredRows=0,t=z||[],c=F.totalRows=0;c> Searching through "+(w&&v> Completed search"+N.benchmark(m)),R.filter_initialized&&(F.$table.triggerHandler("filterBeforeEnd",F),F.$table.triggerHandler("filterEnd",F)),setTimeout(function(){N.applyWidget(F.table)},0)}},getOptionSource:function(e,t,r){var a=(e=A(e)[0]).config,s=!1,i=a.widgetOptions.filter_selectSource,o=a.$table.data("lastSearch")||[],n="function"==typeof i||N.getColumnData(e,i,t);if(r&&""!==o[t]&&(r=!1),!0===n)s=i(e,t,r);else{if(n instanceof A||"string"===A.type(n)&&0<=n.indexOf(""))return n;if(A.isArray(n))s=n;else if("object"===A.type(i)&&n&&null===(s=n(e,t,r)))return null}return!1===s&&(s=D.getOptions(e,t,r)),D.processOptions(e,t,s)},processOptions:function(s,i,r){if(!A.isArray(r))return!1;var o,e,t,a,n,l,c=(s=A(s)[0]).config,d=null!=i&&0<=i&&i'+(p.data("placeholder")||p.attr("data-placeholder")||g.filter_placeholder.select||"")+"",m=u.$table.find("thead").find("select."+b.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=D.getOptionSource(e,t,s))){if(A.isArray(r)){for(i=0;i"}else""+f!="[object Object]"&&(0<=(o=n=f=(""+f).replace(H.quote,""")).indexOf(g.filter_selectSourceSeparator)&&(o=(l=n.split(g.filter_selectSourceSeparator))[0],n=l[1]),h+=""!==f?"":"");r=[]}c=(u.$filters?u.$filters:u.$table.children("thead")).find("."+b.filter),g.filter_$externalFilters&&(c=c&&c.length?c.add(g.filter_$externalFilters):g.filter_$externalFilters),(d=c.filter('select[data-column="'+t+'"]')).length&&(d[a?"html":"append"](h),A.isArray(r)||d.append(r).val(m),d.val(m))}}},buildDefault:function(e,t){var r,a,s,i=e.config,o=i.widgetOptions,n=i.columns;for(r=0;r'),x=d.parent().addClass(F.css.stickyHide).css({position:m.length?"absolute":"fixed",padding:parseInt(d.parent().parent().css("padding-left"),10),top:c+w,left:0,visibility:"hidden",zIndex:p.stickyHeaders_zIndex||2}),f=d.children("thead:first"),C="",u=function(e,t){var r,a,s,i,o,n=e.filter(":visible"),l=n.length;for(r=0;rr.top&&l thead:gt(0), tr.sticky-false").hide(),d.find("> tbody, > tfoot").remove(),d.find("caption").toggle(p.stickyHeaders_includeCaption),i=f.children().children(),d.css({height:0,width:0,margin:0}),i.find("."+F.css.resizer).remove(),h.addClass("hasStickyHeaders").bind("pagerComplete"+o,function(){$()}),F.bindEvents(e,f.children().children("."+F.css.header)),p.stickyHeaders_appendTo?S(p.stickyHeaders_appendTo).append(x):h.after(x),r.onRenderHeader)for(a=(s=f.children("tr").children()).length,t=0;t";d("head").append(e)}),f.resizable={init:function(e,t){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable");var r,a,s,i,o=e.$table,n=o.parent(),l=parseInt(o.css("margin-top"),10),c=t.resizable_vars={useStorage:f.storage&&!1!==t.resizable,$wrap:n,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===n.css("overflow")||"scroll"===n.css("overflow")||"auto"===n.css("overflow-x")||"scroll"===n.css("overflow-x"),storedSizes:[]};for(f.resizableReset(e.table,!0),c.tableWidth=o.width(),c.fullWidth=Math.abs(n.width()-c.tableWidth)<20,c.useStorage&&c.overflow&&(f.storage(e.table,"tablesorter-table-original-css-width",c.tableWidth),i=f.storage(e.table,"tablesorter-table-resized-width")||"auto",f.resizable.setWidth(o,i,!0)),t.resizable_vars.storedSizes=s=(c.useStorage?f.storage(e.table,f.css.resizableStorage):[])||[],f.resizable.setWidths(e,t,s),f.resizable.updateStoredSizes(e,t),t.$resizable_container=d('
').css({top:l}).insertBefore(o),a=0;a').appendTo(t.$resizable_container).attr({"data-column":a,unselectable:"on"}).data("header",r).bind("selectstart",!1);f.resizable.bindings(e,t)}},updateStoredSizes:function(e,t){var r,a,s=e.columns,i=t.resizable_vars;for(i.storedSizes=[],r=0;r> Saving last sort: "+e.sortList+c.benchmark(s))):(i.addClass("hasSaveSort"),n="",c.storage&&(n=d(e),l&&console.log('saveSort >> Last sort loaded: "'+n+'"'+c.benchmark(s)),i.bind("saveSortReset",function(e){e.stopPropagation(),c.storage(t,"tablesorter-savesort","")})),a&&n&&0 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(t,r){if(t&&t.tHead&&0!==t.tBodies.length&&!0!==t.hasInitialized){var e,a="",s=R(t),i=R.metadata;t.hasInitialized=!1,t.isProcessing=!0,t.config=r,R.data(t,"tablesorter",r),T.debug(r,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+T.version),R.data(t,"startoveralltimer",new Date)),r.supportsDataObject=((e=R.fn.jquery.split("."))[0]=parseInt(e[0],10),1':"",l.$headers=R(R.map(l.$table.find(l.selectorHeaders),function(e,t){var r,a,s,i,o,n=R(e);if(!T.getClosest(n,"tr").hasClass(l.cssIgnoreRow))return/(th|td)/i.test(e.nodeName)||(o=T.getClosest(n,"th, td"),n.attr("data-column",o.attr("data-column"))),r=T.getColumnData(l.table,l.headers,t,!0),l.headerContent[t]=n.html(),""===l.headerTemplate||n.find("."+T.css.headerIn).length||(i=l.headerTemplate.replace(T.regex.templateContent,n.html()).replace(T.regex.templateIcon,n.find("."+T.css.icon).length?"":c),l.onRenderTemplate&&(a=l.onRenderTemplate.apply(n,[t,i]))&&"string"==typeof a&&(i=a),n.html('
'+i+"
")),l.onRenderHeader&&l.onRenderHeader.apply(n,[t,l,l.$table]),s=parseInt(n.attr("data-column"),10),e.column=s,o=T.getOrder(T.getData(n,r,"sortInitialOrder")||l.sortInitialOrder),l.sortVars[s]={count:-1,order:o?l.sortReset?[1,0,2]:[1,0]:l.sortReset?[0,1,2]:[0,1],lockedOrder:!1,sortedBy:""},void 0!==(o=T.getData(n,r,"lockedOrder")||!1)&&!1!==o&&(l.sortVars[s].lockedOrder=!0,l.sortVars[s].order=T.getOrder(o)?[1,1]:[0,0]),l.headerList[t]=e,n.addClass(T.css.header+" "+l.cssHeader),T.getClosest(n,"tr").addClass(T.css.headerRow+" "+l.cssHeaderRow).attr("role","row"),l.tabIndex&&n.attr("tabindex",0),e})),l.$headerIndexed=[],r=0;r'),t=o.$table.width(),s=(a=o.$tbodies.find("tr:first").children(":visible")).length,i=0;i").css("width",r));o.$table.prepend(n)}},getData:function(e,t,r){var a,s,i="",o=R(e);return o.length?(a=!!R.metadata&&o.metadata(),s=" "+(o.attr("class")||""),void 0!==o.data(r)||void 0!==o.data(r.toLowerCase())?i+=o.data(r)||o.data(r.toLowerCase()):a&&void 0!==a[r]?i+=a[r]:t&&void 0!==t[r]?i+=t[r]:" "!==s&&s.match(" "+r+"-")&&(i=s.match(new RegExp("\\s"+r+"-([\\w-]+)"))[1]||""),R.trim(i)):""},getColumnData:function(e,t,r,a,s){if("object"!=typeof t||null===t)return t;var i,o=(e=R(e)[0]).config,n=s||o.$headers,l=o.$headerIndexed&&o.$headerIndexed[r]||n.find('[data-column="'+r+'"]:last');if(void 0!==t[r])return a?t[r]:t[n.index(l)];for(i in t)if("string"==typeof i&&l.filter(i).add(l.find(i)).length)return t[i]},isProcessing:function(e,t,r){var a=(e=R(e))[0].config,s=r||e.find("."+T.css.header);t?(void 0!==r&&0'),R.fn.detach?t.detach():t.remove();var a=R(e).find("colgroup.tablesorter-savemyplace");t.insertAfter(a),a.remove(),e.isProcessing=!1},clearTableBody:function(e){R(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,r="[",a=T.characterEquivalents;if(!T.characterRegex){for(t in T.characterRegexArray={},a)"string"==typeof t&&(r+=a[t],T.characterRegexArray[t]=new RegExp("["+a[t]+"]","g"));T.characterRegex=new RegExp(r+"]")}if(T.characterRegex.test(e))for(t in a)"string"==typeof t&&(e=e.replace(T.characterRegexArray[t],t));return e},validateOptions:function(e){var t,r,a,s,i="headers sortForce sortList sortAppend widgets".split(" "),o=e.originalSettings;if(o){for(t in T.debug(e,"core")&&(s=new Date),o)if("undefined"===(a=typeof T.defaults[t]))console.warn('Tablesorter Warning! "table.config.'+t+'" option not recognized');else if("object"===a)for(r in o[t])a=T.defaults[t]&&typeof T.defaults[t][r],R.inArray(t,i)<0&&"undefined"===a&&console.warn('Tablesorter Warning! "table.config.'+t+"."+r+'" option not recognized');T.debug(e,"core")&&console.log("validate options time:"+T.benchmark(s))}},restoreHeaders:function(e){var t,r,a=R(e)[0].config,s=a.$table.find(a.selectorHeaders),i=s.length;for(t=0;t tr").children("th, td");!1===t&&0<=R.inArray("uitheme",i.widgets)&&(s.triggerHandler("applyWidgetId",["uitheme"]),s.triggerHandler("applyWidgetId",["zebra"])),o.find("tr").not(n).remove(),a="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(i.namespace+" "),s.removeData("tablesorter").unbind(a.replace(T.regex.spaces," ")),i.$headers.add(l).removeClass([T.css.header,i.cssHeader,i.cssAsc,i.cssDesc,T.css.sortAsc,T.css.sortDesc,T.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),n.find(i.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(i.namespace+" ").replace(T.regex.spaces," ")),T.restoreHeaders(e),s.toggleClass(T.css.table+" "+i.tableClass+" tablesorter-"+i.theme,!1===t),s.removeClass(i.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof r&&r(e),T.debug(i,"core")&&console.log("tablesorter has been removed")}}};R.fn.tablesorter=function(t){return this.each(function(){var e=R.extend(!0,{},T.defaults,t,T.instanceMethods);e.originalSettings=t,!this.hasInitialized&&T.buildTable&&"TABLE"!==this.nodeName?T.buildTable(this,e):T.setup(this,e)})},window.console&&window.console.log||(T.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=1> Using",n?u:"cookies"),b.parseJSON&&(l=n?b.parseJSON(y[u][t]||"null")||{}:(i=v.cookie.split(/[;\s|=]/),0!==(s=b.inArray(t,i)+1)&&b.parseJSON(i[s]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[m]?l[m][h]:"";l[m]||(l[m]={}),l[m][h]=r,n?y[u][t]=JSON.stringify(l):((o=new Date).setTime(o.getTime()+31536e6),v.cookie=t+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+o.toGMTString()+"; path=/")}}(e,window,document),function($){"use strict";var S=$.tablesorter||{};S.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},$.extend(S.css,{wrapper:"tablesorter-wrapper"}),S.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var a,s,i,o,n,l,c,d,f,u,g,p,h,m=S.themes,b=t.$table.add($(t.namespace+"_extra_table")),y=t.$headers.add($(t.namespace+"_extra_headers")),v=t.theme||"jui",w=m[v]||{},x=$.trim([w.sortNone,w.sortDesc,w.sortAsc,w.active].join(" ")),C=$.trim([w.iconSortNone,w.iconSortDesc,w.iconSortAsc].join(" ")),_=S.debug(t,"uitheme");for(_&&(n=new Date),b.hasClass("tablesorter-"+v)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,u=m[t.appliedTheme]||{},g=(h=!$.isEmptyObject(u))?[u.sortNone,u.sortDesc,u.sortAsc,u.active].join(" "):"",p=h?[u.iconSortNone,u.iconSortDesc,u.iconSortAsc].join(" "):"",h&&(r.zebra[0]=$.trim(" "+r.zebra[0].replace(" "+u.even,"")),r.zebra[1]=$.trim(" "+r.zebra[1].replace(" "+u.odd,"")),t.$tbodies.children().removeClass([u.even,u.odd].join(" "))),w.even&&(r.zebra[0]+=" "+w.even),w.odd&&(r.zebra[1]+=" "+w.odd),b.children("caption").removeClass(u.caption||"").addClass(w.caption),d=b.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(u.table||"")).addClass("tablesorter-"+v+" "+(w.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(u.footerRow||"").addClass(w.footerRow).children("th, td").removeClass(u.footerCells||"").addClass(w.footerCells),y.removeClass((h?[u.header,u.hover,g].join(" "):"")||"").addClass(w.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){$(this)["mouseenter"===e.type?"addClass":"removeClass"](w.hover||"")}),y.each(function(){var e=$(this);e.find("."+S.css.wrapper).length||e.wrapInner('
')}),t.cssIcon&&y.find("."+S.css.icon).removeClass(h?[u.icons,p].join(" "):"").addClass(w.icons||""),S.hasWidget(t.table,"filter")&&(s=function(){b.children("thead").children("."+S.css.filterRow).removeClass(h&&u.filterRow||"").addClass(w.filterRow||"")},r.filter_initialized?s():b.one("filterInit",function(){s()}))),a=0;a> Applied "+v+" theme"+S.benchmark(n))},remove:function(e,t,r,a){if(r.uitheme_applied){var s=t.$table,i=t.appliedTheme||"jui",o=S.themes[i]||S.themes.jui,n=s.children("thead").children(),l=o.sortNone+" "+o.sortDesc+" "+o.sortAsc,c=o.iconSortNone+" "+o.iconSortDesc+" "+o.iconSortAsc;s.removeClass("tablesorter-"+i+" "+o.table),r.uitheme_applied=!1,a||(s.find(S.css.header).removeClass(o.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(o.hover+" "+l+" "+o.active).filter("."+S.css.filterRow).removeClass(o.filterRow),n.find("."+S.css.icon).removeClass(o.icons+" "+c))}}})}(e),function(b){"use strict";var y=b.tablesorter||{};y.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(e,t,r){var a,s,i,o,n,l,c,d,f=t.$table,u=t.$tbodies,g=t.sortList,p=g.length,h=r&&r.columns||["primary","secondary","tertiary"],m=h.length-1;for(c=h.join(" "),s=0;s=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!H.orTest.test(t.iFilter)&&!H.orSplit.test(t.filter)||H.regex.test(t.filter))return null;var a,s,i,o=A.extend({},t),n=t.filter.split(H.orSplit),l=t.iFilter.split(H.orSplit),c=n.length;for(a=0;a]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(s.data("placeholder")||s.attr("data-placeholder")||d.filter_placeholder.select||"")+"":"",0<=(a=o=t).indexOf(d.filter_selectSourceSeparator)&&(a=(o=t.split(d.filter_selectSourceSeparator))[1],o=o[0]),e+="");c.$table.find("thead").find("select."+b.filter+'[data-column="'+i+'"]').append(e),(n="function"==typeof(a=d.filter_selectSource)||N.getColumnData(r,a,i))&&D.buildSelect(c.table,i,"",!0,s.hasClass(d.filter_onlyAvail))}D.buildDefault(r,!0),D.bindSearch(r,c.$table.find("."+b.filter),!0),d.filter_external&&D.bindSearch(r,d.filter_external),d.filter_hideFilters&&D.hideFilters(c),c.showProcessing&&(a="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(a.replace(N.regex.spaces," ")).bind(a,function(e,t){s=t?c.$table.find("."+b.header).filter("[data-column]").filter(function(){return""!==t[A(this).data("column")]}):"",N.isProcessing(r,"filterStart"===e.type,t?s:"")})),c.filteredRows=c.totalRows,a="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(a.replace(N.regex.spaces," ")).bind(a,function(){D.completeInit(this)}),c.pager&&c.pager.initialized&&!d.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){D.filterInitComplete(c)},100)):d.filter_initialized||D.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,a=D.setDefaults(e,t,r)||[];a.length&&(t.delayInit&&""===a.join("")||N.setFilters(e,a,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||D.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),a=r.length&&r[0].config,s=a&&a.widgetOptions;s&&!s.filter_initialized&&(s.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,a=e.widgetOptions,s=0,i=function(){a.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),D.findRows(e.table,e.lastSearch||[]),N.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(A.isEmptyObject(a.filter_formatter))i();else{for(r=a.filter_formatterInit.length,t=0;t';for(i=0;i").appendTo(t.$table.children("thead").eq(0)).children("td"),i=0;i").appendTo(a):((d=N.getColumnData(e,r.filter_formatter,i))?(r.filter_formatterCount++,(h=d(a,i))&&0===h.length&&(h=a.children("input")),h&&(0===h.parent().length||h.parent().length&&h.parent()[0]!==a[0])&&a.append(h)):h=A('').appendTo(a),h&&(f=o.data("placeholder")||o.attr("data-placeholder")||r.filter_placeholder.search||"",h.attr("placeholder",f))),h&&(c=(A.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[i]&&r.filter_cssFilter[i]||"":r.filter_cssFilter)||"",h.addClass(b.filter+" "+c),(f=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(f=["{{label}}"]),A.each(f,function(e,t){var r=new RegExp(t,"g"),a=o.attr("data-"+t.replace(/{{|}}/g,"")),s=void 0===a?o.text():a;c=c.replace(r,A.trim(s))}),h.attr({"data-column":a.attr("data-column"),"aria-label":c}),l&&(h.attr("placeholder","").addClass(b.filterDisabled)[0].disabled=!0)))},bindSearch:function(s,e,t){if(s=A(s)[0],(e=A(e)).length){var r,i=s.config,o=i.widgetOptions,a=i.namespace+"filter",n=o.filter_$externalFilters;!0!==t&&(r=o.filter_anyColumnSelector+","+o.filter_multipleColumnSelector,o.filter_$anyMatch=e.filter(r),n&&n.length?o.filter_$externalFilters=o.filter_$externalFilters.add(e):o.filter_$externalFilters=e,N.setFilters(s,i.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(a+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(N.regex.spaces," ")).bind("keydown"+a,function(e){if(e.which===l.escape&&!s.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+a,function(e){o=s.config.widgetOptions;var t=parseInt(A(this).attr("data-column"),10),r="boolean"==typeof o.filter_liveSearch?o.filter_liveSearch:N.getColumnData(s,o.filter_liveSearch,t);if(void 0===r&&(r=o.filter_liveSearch.fallback||!1),A(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===l.escape)this.value=o.filter_resetOnEsc?"":i.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=l.left&&e.which<=l.down)))return;if(!1===r&&""!==this.value&&e.which!==l.enter)return}D.searching(s,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(a+" "),function(e){var t=parseInt(A(this).attr("data-column"),10),r=e.type,a="boolean"==typeof o.filter_liveSearch?o.filter_liveSearch:N.getColumnData(s,o.filter_liveSearch,t);!s.config.widgetOptions.filter_initialized||e.which!==l.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==a&&(!0===a||"INPUT"===e.target.nodeName)||this.value===i.lastSearch[t])||(e.preventDefault(),A(this).attr("data-lastSearchTime",(new Date).getTime()),D.searching(s,"keypress"!==r,!0,t))})}},searching:function(e,t,r,a){var s,i=e.config.widgetOptions;void 0===a?s=!1:void 0===(s="boolean"==typeof i.filter_liveSearch?i.filter_liveSearch:N.getColumnData(e,i.filter_liveSearch,a))&&(s=i.filter_liveSearch.fallback||!1),clearTimeout(i.filter_searchTimer),void 0===t||!0===t?i.filter_searchTimer=setTimeout(function(){D.checkFilters(e,t,r)},s?i.filter_searchDelay:10):D.checkFilters(e,t,r)},equalFilters:function(e,t,r){var a,s=[],i=[],o=e.columns+1;for(t=A.isArray(t)?t:[],r=A.isArray(r)?r:[],a=0;a=e.columns&&(n=e.columns-1);o<=n;o++)u[u.length]=o;t=t.replace(s[d],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),F.filteredRows=0,t=z||[],c=F.totalRows=0;c> Searching through "+(w&&v> Completed search"+N.benchmark(m)),R.filter_initialized&&(F.$table.triggerHandler("filterBeforeEnd",F),F.$table.triggerHandler("filterEnd",F)),setTimeout(function(){N.applyWidget(F.table)},0)}},getOptionSource:function(e,t,r){var a=(e=A(e)[0]).config,s=!1,i=a.widgetOptions.filter_selectSource,o=a.$table.data("lastSearch")||[],n="function"==typeof i||N.getColumnData(e,i,t);if(r&&""!==o[t]&&(r=!1),!0===n)s=i(e,t,r);else{if(n instanceof A||"string"===A.type(n)&&0<=n.indexOf(""))return n;if(A.isArray(n))s=n;else if("object"===A.type(i)&&n&&null===(s=n(e,t,r)))return null}return!1===s&&(s=D.getOptions(e,t,r)),D.processOptions(e,t,s)},processOptions:function(s,i,r){if(!A.isArray(r))return!1;var o,e,t,a,n,l,c=(s=A(s)[0]).config,d=null!=i&&0<=i&&i'+(p.data("placeholder")||p.attr("data-placeholder")||g.filter_placeholder.select||"")+"",m=u.$table.find("thead").find("select."+b.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=D.getOptionSource(e,t,s))){if(A.isArray(r)){for(i=0;i"}else""+f!="[object Object]"&&(0<=(o=n=f=(""+f).replace(H.quote,""")).indexOf(g.filter_selectSourceSeparator)&&(o=(l=n.split(g.filter_selectSourceSeparator))[0],n=l[1]),h+=""!==f?"":"");r=[]}c=(u.$filters?u.$filters:u.$table.children("thead")).find("."+b.filter),g.filter_$externalFilters&&(c=c&&c.length?c.add(g.filter_$externalFilters):g.filter_$externalFilters),(d=c.filter('select[data-column="'+t+'"]')).length&&(d[a?"html":"append"](h),A.isArray(r)||d.append(r).val(m),d.val(m))}}},buildDefault:function(e,t){var r,a,s,i=e.config,o=i.widgetOptions,n=i.columns;for(r=0;r'),x=d.parent().addClass(F.css.stickyHide).css({position:m.length?"absolute":"fixed",padding:parseInt(d.parent().parent().css("padding-left"),10),top:c+w,left:0,visibility:"hidden",zIndex:p.stickyHeaders_zIndex||2}),f=d.children("thead:first"),C="",u=function(e,t){var r,a,s,i,o,n=e.filter(":visible"),l=n.length;for(r=0;rr.top&&l thead:gt(0), tr.sticky-false").hide(),d.find("> tbody, > tfoot").remove(),d.find("caption").toggle(p.stickyHeaders_includeCaption),i=f.children().children(),d.css({height:0,width:0,margin:0}),i.find("."+F.css.resizer).remove(),h.addClass("hasStickyHeaders").bind("pagerComplete"+o,function(){$()}),F.bindEvents(e,f.children().children("."+F.css.header)),p.stickyHeaders_appendTo?S(p.stickyHeaders_appendTo).append(x):h.after(x),r.onRenderHeader)for(a=(s=f.children("tr").children()).length,t=0;t";d("head").append(e)}),f.resizable={init:function(e,t){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable");var r,a,s,i,o=e.$table,n=o.parent(),l=parseInt(o.css("margin-top"),10),c=t.resizable_vars={useStorage:f.storage&&!1!==t.resizable,$wrap:n,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===n.css("overflow")||"scroll"===n.css("overflow")||"auto"===n.css("overflow-x")||"scroll"===n.css("overflow-x"),storedSizes:[]};for(f.resizableReset(e.table,!0),c.tableWidth=o.width(),c.fullWidth=Math.abs(n.width()-c.tableWidth)<20,c.useStorage&&c.overflow&&(f.storage(e.table,"tablesorter-table-original-css-width",c.tableWidth),i=f.storage(e.table,"tablesorter-table-resized-width")||"auto",f.resizable.setWidth(o,i,!0)),t.resizable_vars.storedSizes=s=(c.useStorage?f.storage(e.table,f.css.resizableStorage):[])||[],f.resizable.setWidths(e,t,s),f.resizable.updateStoredSizes(e,t),t.$resizable_container=d('
').css({top:l}).insertBefore(o),a=0;a').appendTo(t.$resizable_container).attr({"data-column":a,unselectable:"on"}).data("header",r).bind("selectstart",!1);f.resizable.bindings(e,t)}},updateStoredSizes:function(e,t){var r,a,s=e.columns,i=t.resizable_vars;for(i.storedSizes=[],r=0;r> Saving last sort: "+e.sortList+c.benchmark(s))):(i.addClass("hasSaveSort"),n="",c.storage&&(n=d(e),l&&console.log('saveSort >> Last sort loaded: "'+n+'"'+c.benchmark(s)),i.bind("saveSortReset",function(e){e.stopPropagation(),c.storage(t,"tablesorter-savesort","")})),a&&n&&0 0 ) { + // save sortList before any sortAppend is added + c.last.sortList = c.sortList; ts.sortOn( c, c.sortList, {}, !c.initWidgets ); } else { ts.setHeadersCss( c ); diff --git a/dist/js/jquery.tablesorter.min.js b/dist/js/jquery.tablesorter.min.js index 1fc5792f..50fdd472 100644 --- a/dist/js/jquery.tablesorter.min.js +++ b/dist/js/jquery.tablesorter.min.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(A){"use strict";var L=A.tablesorter={version:"2.31.0",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",cssIconDisabled:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(t,r){if(t&&t.tHead&&0!==t.tBodies.length&&!0!==t.hasInitialized){var e,o="",s=A(t),a=A.metadata;t.hasInitialized=!1,t.isProcessing=!0,t.config=r,A.data(t,"tablesorter",r),L.debug(r,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+L.version),A.data(t,"startoveralltimer",new Date)),r.supportsDataObject=((e=A.fn.jquery.split("."))[0]=parseInt(e[0],10),1':"",d.$headers=A(A.map(d.$table.find(d.selectorHeaders),function(e,t){var r,o,s,a,n,i=A(e);if(!L.getClosest(i,"tr").hasClass(d.cssIgnoreRow))return/(th|td)/i.test(e.nodeName)||(n=L.getClosest(i,"th, td"),i.attr("data-column",n.attr("data-column"))),r=L.getColumnData(d.table,d.headers,t,!0),d.headerContent[t]=i.html(),""===d.headerTemplate||i.find("."+L.css.headerIn).length||(a=d.headerTemplate.replace(L.regex.templateContent,i.html()).replace(L.regex.templateIcon,i.find("."+L.css.icon).length?"":l),d.onRenderTemplate&&(o=d.onRenderTemplate.apply(i,[t,a]))&&"string"==typeof o&&(a=o),i.html('
'+a+"
")),d.onRenderHeader&&d.onRenderHeader.apply(i,[t,d,d.$table]),s=parseInt(i.attr("data-column"),10),e.column=s,n=L.getOrder(L.getData(i,r,"sortInitialOrder")||d.sortInitialOrder),d.sortVars[s]={count:-1,order:n?d.sortReset?[1,0,2]:[1,0]:d.sortReset?[0,1,2]:[0,1],lockedOrder:!1,sortedBy:""},void 0!==(n=L.getData(i,r,"lockedOrder")||!1)&&!1!==n&&(d.sortVars[s].lockedOrder=!0,d.sortVars[s].order=L.getOrder(n)?[1,1]:[0,0]),d.headerList[t]=e,i.addClass(L.css.header+" "+d.cssHeader),L.getClosest(i,"tr").addClass(L.css.headerRow+" "+d.cssHeaderRow).attr("role","row"),d.tabIndex&&i.attr("tabindex",0),e})),d.$headerIndexed=[],r=0;r'),t=n.$table.width(),s=(o=n.$tbodies.find("tr:first").children(":visible")).length,a=0;a").css("width",r));n.$table.prepend(i)}},getData:function(e,t,r){var o,s,a="",n=A(e);return n.length?(o=!!A.metadata&&n.metadata(),s=" "+(n.attr("class")||""),void 0!==n.data(r)||void 0!==n.data(r.toLowerCase())?a+=n.data(r)||n.data(r.toLowerCase()):o&&void 0!==o[r]?a+=o[r]:t&&void 0!==t[r]?a+=t[r]:" "!==s&&s.match(" "+r+"-")&&(a=s.match(new RegExp("\\s"+r+"-([\\w-]+)"))[1]||""),A.trim(a)):""},getColumnData:function(e,t,r,o,s){if("object"!=typeof t||null===t)return t;var a,n=(e=A(e)[0]).config,i=s||n.$headers,d=n.$headerIndexed&&n.$headerIndexed[r]||i.find('[data-column="'+r+'"]:last');if(void 0!==t[r])return o?t[r]:t[i.index(d)];for(a in t)if("string"==typeof a&&d.filter(a).add(d.find(a)).length)return t[a]},isProcessing:function(e,t,r){var o=(e=A(e))[0].config,s=r||e.find("."+L.css.header);t?(void 0!==r&&0'),A.fn.detach?t.detach():t.remove();var o=A(e).find("colgroup.tablesorter-savemyplace");t.insertAfter(o),o.remove(),e.isProcessing=!1},clearTableBody:function(e){A(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,r="[",o=L.characterEquivalents;if(!L.characterRegex){for(t in L.characterRegexArray={},o)"string"==typeof t&&(r+=o[t],L.characterRegexArray[t]=new RegExp("["+o[t]+"]","g"));L.characterRegex=new RegExp(r+"]")}if(L.characterRegex.test(e))for(t in o)"string"==typeof t&&(e=e.replace(L.characterRegexArray[t],t));return e},validateOptions:function(e){var t,r,o,s,a="headers sortForce sortList sortAppend widgets".split(" "),n=e.originalSettings;if(n){for(t in L.debug(e,"core")&&(s=new Date),n)if("undefined"===(o=typeof L.defaults[t]))console.warn('Tablesorter Warning! "table.config.'+t+'" option not recognized');else if("object"===o)for(r in n[t])o=L.defaults[t]&&typeof L.defaults[t][r],A.inArray(t,a)<0&&"undefined"===o&&console.warn('Tablesorter Warning! "table.config.'+t+"."+r+'" option not recognized');L.debug(e,"core")&&console.log("validate options time:"+L.benchmark(s))}},restoreHeaders:function(e){var t,r,o=A(e)[0].config,s=o.$table.find(o.selectorHeaders),a=s.length;for(t=0;t tr").children("th, td");!1===t&&0<=A.inArray("uitheme",a.widgets)&&(s.triggerHandler("applyWidgetId",["uitheme"]),s.triggerHandler("applyWidgetId",["zebra"])),n.find("tr").not(i).remove(),o="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(a.namespace+" "),s.removeData("tablesorter").unbind(o.replace(L.regex.spaces," ")),a.$headers.add(d).removeClass([L.css.header,a.cssHeader,a.cssAsc,a.cssDesc,L.css.sortAsc,L.css.sortDesc,L.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),i.find(a.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(a.namespace+" ").replace(L.regex.spaces," ")),L.restoreHeaders(e),s.toggleClass(L.css.table+" "+a.tableClass+" tablesorter-"+a.theme,!1===t),s.removeClass(a.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof r&&r(e),L.debug(a,"core")&&console.log("tablesorter has been removed")}}};A.fn.tablesorter=function(t){return this.each(function(){var e=A.extend(!0,{},L.defaults,t,L.instanceMethods);e.originalSettings=t,!this.hasInitialized&&L.buildTable&&"TABLE"!==this.nodeName?L.buildTable(this,e):L.setup(this,e)})},window.console&&window.console.log||(L.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=1 thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(t,r){if(t&&t.tHead&&0!==t.tBodies.length&&!0!==t.hasInitialized){var e,o="",s=A(t),a=A.metadata;t.hasInitialized=!1,t.isProcessing=!0,t.config=r,A.data(t,"tablesorter",r),L.debug(r,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+L.version),A.data(t,"startoveralltimer",new Date)),r.supportsDataObject=((e=A.fn.jquery.split("."))[0]=parseInt(e[0],10),1':"",d.$headers=A(A.map(d.$table.find(d.selectorHeaders),function(e,t){var r,o,s,a,n,i=A(e);if(!L.getClosest(i,"tr").hasClass(d.cssIgnoreRow))return/(th|td)/i.test(e.nodeName)||(n=L.getClosest(i,"th, td"),i.attr("data-column",n.attr("data-column"))),r=L.getColumnData(d.table,d.headers,t,!0),d.headerContent[t]=i.html(),""===d.headerTemplate||i.find("."+L.css.headerIn).length||(a=d.headerTemplate.replace(L.regex.templateContent,i.html()).replace(L.regex.templateIcon,i.find("."+L.css.icon).length?"":l),d.onRenderTemplate&&(o=d.onRenderTemplate.apply(i,[t,a]))&&"string"==typeof o&&(a=o),i.html('
'+a+"
")),d.onRenderHeader&&d.onRenderHeader.apply(i,[t,d,d.$table]),s=parseInt(i.attr("data-column"),10),e.column=s,n=L.getOrder(L.getData(i,r,"sortInitialOrder")||d.sortInitialOrder),d.sortVars[s]={count:-1,order:n?d.sortReset?[1,0,2]:[1,0]:d.sortReset?[0,1,2]:[0,1],lockedOrder:!1,sortedBy:""},void 0!==(n=L.getData(i,r,"lockedOrder")||!1)&&!1!==n&&(d.sortVars[s].lockedOrder=!0,d.sortVars[s].order=L.getOrder(n)?[1,1]:[0,0]),d.headerList[t]=e,i.addClass(L.css.header+" "+d.cssHeader),L.getClosest(i,"tr").addClass(L.css.headerRow+" "+d.cssHeaderRow).attr("role","row"),d.tabIndex&&i.attr("tabindex",0),e})),d.$headerIndexed=[],r=0;r'),t=n.$table.width(),s=(o=n.$tbodies.find("tr:first").children(":visible")).length,a=0;a").css("width",r));n.$table.prepend(i)}},getData:function(e,t,r){var o,s,a="",n=A(e);return n.length?(o=!!A.metadata&&n.metadata(),s=" "+(n.attr("class")||""),void 0!==n.data(r)||void 0!==n.data(r.toLowerCase())?a+=n.data(r)||n.data(r.toLowerCase()):o&&void 0!==o[r]?a+=o[r]:t&&void 0!==t[r]?a+=t[r]:" "!==s&&s.match(" "+r+"-")&&(a=s.match(new RegExp("\\s"+r+"-([\\w-]+)"))[1]||""),A.trim(a)):""},getColumnData:function(e,t,r,o,s){if("object"!=typeof t||null===t)return t;var a,n=(e=A(e)[0]).config,i=s||n.$headers,d=n.$headerIndexed&&n.$headerIndexed[r]||i.find('[data-column="'+r+'"]:last');if(void 0!==t[r])return o?t[r]:t[i.index(d)];for(a in t)if("string"==typeof a&&d.filter(a).add(d.find(a)).length)return t[a]},isProcessing:function(e,t,r){var o=(e=A(e))[0].config,s=r||e.find("."+L.css.header);t?(void 0!==r&&0'),A.fn.detach?t.detach():t.remove();var o=A(e).find("colgroup.tablesorter-savemyplace");t.insertAfter(o),o.remove(),e.isProcessing=!1},clearTableBody:function(e){A(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,r="[",o=L.characterEquivalents;if(!L.characterRegex){for(t in L.characterRegexArray={},o)"string"==typeof t&&(r+=o[t],L.characterRegexArray[t]=new RegExp("["+o[t]+"]","g"));L.characterRegex=new RegExp(r+"]")}if(L.characterRegex.test(e))for(t in o)"string"==typeof t&&(e=e.replace(L.characterRegexArray[t],t));return e},validateOptions:function(e){var t,r,o,s,a="headers sortForce sortList sortAppend widgets".split(" "),n=e.originalSettings;if(n){for(t in L.debug(e,"core")&&(s=new Date),n)if("undefined"===(o=typeof L.defaults[t]))console.warn('Tablesorter Warning! "table.config.'+t+'" option not recognized');else if("object"===o)for(r in n[t])o=L.defaults[t]&&typeof L.defaults[t][r],A.inArray(t,a)<0&&"undefined"===o&&console.warn('Tablesorter Warning! "table.config.'+t+"."+r+'" option not recognized');L.debug(e,"core")&&console.log("validate options time:"+L.benchmark(s))}},restoreHeaders:function(e){var t,r,o=A(e)[0].config,s=o.$table.find(o.selectorHeaders),a=s.length;for(t=0;t tr").children("th, td");!1===t&&0<=A.inArray("uitheme",a.widgets)&&(s.triggerHandler("applyWidgetId",["uitheme"]),s.triggerHandler("applyWidgetId",["zebra"])),n.find("tr").not(i).remove(),o="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(a.namespace+" "),s.removeData("tablesorter").unbind(o.replace(L.regex.spaces," ")),a.$headers.add(d).removeClass([L.css.header,a.cssHeader,a.cssAsc,a.cssDesc,L.css.sortAsc,L.css.sortDesc,L.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),i.find(a.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(a.namespace+" ").replace(L.regex.spaces," ")),L.restoreHeaders(e),s.toggleClass(L.css.table+" "+a.tableClass+" tablesorter-"+a.theme,!1===t),s.removeClass(a.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof r&&r(e),L.debug(a,"core")&&console.log("tablesorter has been removed")}}};A.fn.tablesorter=function(t){return this.each(function(){var e=A.extend(!0,{},L.defaults,t,L.instanceMethods);e.originalSettings=t,!this.hasInitialized&&L.buildTable&&"TABLE"!==this.nodeName?L.buildTable(this,e):L.setup(this,e)})},window.console&&window.console.log||(L.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=1> Using",n?h:"cookies"),b.parseJSON&&(n?o=b.parseJSON(y[h][t]||"null")||{}:(l=_.cookie.split(/[;\s|=]/),o=0!==(a=b.inArray(t,l)+1)&&b.parseJSON(l[a]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return o&&o[m]?o[m][g]:"";o[m]||(o[m]={}),o[m][g]=r,n?y[h][t]=JSON.stringify(o):((s=new Date).setTime(s.getTime()+31536e6),_.cookie=t+"="+JSON.stringify(o).replace(/\"/g,'"')+"; expires="+s.toGMTString()+"; path=/")}}(e,window,document),function(C){"use strict";var z=C.tablesorter||{};z.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},C.extend(z.css,{wrapper:"tablesorter-wrapper"}),z.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var i,a,l,s,n,o,c,d,f,h,u,p,g,m=z.themes,b=t.$table.add(C(t.namespace+"_extra_table")),y=t.$headers.add(C(t.namespace+"_extra_headers")),_=t.theme||"jui",v=m[_]||{},w=C.trim([v.sortNone,v.sortDesc,v.sortAsc,v.active].join(" ")),x=C.trim([v.iconSortNone,v.iconSortDesc,v.iconSortAsc].join(" ")),S=z.debug(t,"uitheme");for(S&&(n=new Date),b.hasClass("tablesorter-"+_)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,h=m[t.appliedTheme]||{},u=(g=!C.isEmptyObject(h))?[h.sortNone,h.sortDesc,h.sortAsc,h.active].join(" "):"",p=g?[h.iconSortNone,h.iconSortDesc,h.iconSortAsc].join(" "):"",g&&(r.zebra[0]=C.trim(" "+r.zebra[0].replace(" "+h.even,"")),r.zebra[1]=C.trim(" "+r.zebra[1].replace(" "+h.odd,"")),t.$tbodies.children().removeClass([h.even,h.odd].join(" "))),v.even&&(r.zebra[0]+=" "+v.even),v.odd&&(r.zebra[1]+=" "+v.odd),b.children("caption").removeClass(h.caption||"").addClass(v.caption),d=b.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(h.table||"")).addClass("tablesorter-"+_+" "+(v.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(h.footerRow||"").addClass(v.footerRow).children("th, td").removeClass(h.footerCells||"").addClass(v.footerCells),y.removeClass((g?[h.header,h.hover,u].join(" "):"")||"").addClass(v.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){C(this)["mouseenter"===e.type?"addClass":"removeClass"](v.hover||"")}),y.each(function(){var e=C(this);e.find("."+z.css.wrapper).length||e.wrapInner('
')}),t.cssIcon&&y.find("."+z.css.icon).removeClass(g?[h.icons,p].join(" "):"").addClass(v.icons||""),z.hasWidget(t.table,"filter")&&(a=function(){b.children("thead").children("."+z.css.filterRow).removeClass(g&&h.filterRow||"").addClass(v.filterRow||"")},r.filter_initialized?a():b.one("filterInit",function(){a()}))),i=0;i> Applied "+_+" theme"+z.benchmark(n))},remove:function(e,t,r,i){if(r.uitheme_applied){var a=t.$table,l=t.appliedTheme||"jui",s=z.themes[l]||z.themes.jui,n=a.children("thead").children(),o=s.sortNone+" "+s.sortDesc+" "+s.sortAsc,c=s.iconSortNone+" "+s.iconSortDesc+" "+s.iconSortAsc;a.removeClass("tablesorter-"+l+" "+s.table),r.uitheme_applied=!1,i||(a.find(z.css.header).removeClass(s.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(s.hover+" "+o+" "+s.active).filter("."+z.css.filterRow).removeClass(s.filterRow),n.find("."+z.css.icon).removeClass(s.icons+" "+c))}}})}(e),function(b){"use strict";var y=b.tablesorter||{};y.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(e,t,r){var i,a,l,s,n,o,c,d,f=t.$table,h=t.$tbodies,u=t.sortList,p=u.length,g=r&&r.columns||["primary","secondary","tertiary"],m=g.length-1;for(c=g.join(" "),a=0;a=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!O.orTest.test(t.iFilter)&&!O.orSplit.test(t.filter)||O.regex.test(t.filter))return null;var i,a,l,s=A.extend({},t),n=t.filter.split(O.orSplit),o=t.iFilter.split(O.orSplit),c=n.length;for(i=0;i]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(a.data("placeholder")||a.attr("data-placeholder")||d.filter_placeholder.select||"")+"":"",0<=(i=s=t).indexOf(d.filter_selectSourceSeparator)&&(i=(s=t.split(d.filter_selectSourceSeparator))[1],s=s[0]),e+="");c.$table.find("thead").find("select."+b.filter+'[data-column="'+l+'"]').append(e),(n="function"==typeof(i=d.filter_selectSource)||E.getColumnData(r,i,l))&&I.buildSelect(c.table,l,"",!0,a.hasClass(d.filter_onlyAvail))}I.buildDefault(r,!0),I.bindSearch(r,c.$table.find("."+b.filter),!0),d.filter_external&&I.bindSearch(r,d.filter_external),d.filter_hideFilters&&I.hideFilters(c),c.showProcessing&&(i="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(i.replace(E.regex.spaces," ")).bind(i,function(e,t){a=t?c.$table.find("."+b.header).filter("[data-column]").filter(function(){return""!==t[A(this).data("column")]}):"",E.isProcessing(r,"filterStart"===e.type,t?a:"")})),c.filteredRows=c.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(i.replace(E.regex.spaces," ")).bind(i,function(){I.completeInit(this)}),c.pager&&c.pager.initialized&&!d.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){I.filterInitComplete(c)},100)):d.filter_initialized||I.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,i=I.setDefaults(e,t,r)||[];i.length&&(t.delayInit&&""===i.join("")||E.setFilters(e,i,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||I.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,a=i&&i.widgetOptions;a&&!a.filter_initialized&&(a.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,i=e.widgetOptions,a=0,l=function(){i.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),I.findRows(e.table,e.lastSearch||[]),E.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(A.isEmptyObject(i.filter_formatter))l();else{for(r=i.filter_formatterInit.length,t=0;t';for(l=0;l").appendTo(t.$table.children("thead").eq(0)).children("td"),l=0;l").appendTo(i):((d=E.getColumnData(e,r.filter_formatter,l))?(r.filter_formatterCount++,(g=d(i,l))&&0===g.length&&(g=i.children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==i[0])&&i.append(g)):g=A('').appendTo(i),g&&(f=s.data("placeholder")||s.attr("data-placeholder")||r.filter_placeholder.search||"",g.attr("placeholder",f))),g&&(c=(A.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[l]&&r.filter_cssFilter[l]||"":r.filter_cssFilter)||"",g.addClass(b.filter+" "+c),(f=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(f=["{{label}}"]),A.each(f,function(e,t){var r=new RegExp(t,"g"),i=s.attr("data-"+t.replace(/{{|}}/g,"")),a=void 0===i?s.text():i;c=c.replace(r,A.trim(a))}),g.attr({"data-column":i.attr("data-column"),"aria-label":c}),o&&(g.attr("placeholder","").addClass(b.filterDisabled)[0].disabled=!0)))},bindSearch:function(a,e,t){if(a=A(a)[0],(e=A(e)).length){var r,l=a.config,s=l.widgetOptions,i=l.namespace+"filter",n=s.filter_$externalFilters;!0!==t&&(r=s.filter_anyColumnSelector+","+s.filter_multipleColumnSelector,s.filter_$anyMatch=e.filter(r),n&&n.length?s.filter_$externalFilters=s.filter_$externalFilters.add(e):s.filter_$externalFilters=e,E.setFilters(a,l.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(i+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(E.regex.spaces," ")).bind("keydown"+i,function(e){if(e.which===o.escape&&!a.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+i,function(e){s=a.config.widgetOptions;var t=parseInt(A(this).attr("data-column"),10),r="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);if(void 0===r&&(r=s.filter_liveSearch.fallback||!1),A(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===o.escape)this.value=s.filter_resetOnEsc?"":l.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=o.left&&e.which<=o.down)))return;if(!1===r&&""!==this.value&&e.which!==o.enter)return}I.searching(a,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(i+" "),function(e){var t=parseInt(A(this).attr("data-column"),10),r=e.type,i="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);!a.config.widgetOptions.filter_initialized||e.which!==o.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==i&&(!0===i||"INPUT"===e.target.nodeName)||this.value===l.lastSearch[t])||(e.preventDefault(),A(this).attr("data-lastSearchTime",(new Date).getTime()),I.searching(a,"keypress"!==r,!0,t))})}},searching:function(e,t,r,i){var a,l=e.config.widgetOptions;void 0===i?a=!1:void 0===(a="boolean"==typeof l.filter_liveSearch?l.filter_liveSearch:E.getColumnData(e,l.filter_liveSearch,i))&&(a=l.filter_liveSearch.fallback||!1),clearTimeout(l.filter_searchTimer),void 0===t||!0===t?l.filter_searchTimer=setTimeout(function(){I.checkFilters(e,t,r)},a?l.filter_searchDelay:10):I.checkFilters(e,t,r)},equalFilters:function(e,t,r){var i,a=[],l=[],s=e.columns+1;for(t=A.isArray(t)?t:[],r=A.isArray(r)?r:[],i=0;i=e.columns&&(n=e.columns-1);s<=n;s++)h[h.length]=s;t=t.replace(a[d],"")}if(!r&&/,/.test(t))for(f=(o=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),F.filteredRows=0,t=$||[],c=F.totalRows=0;c> Searching through "+(v&&_> Completed search"+E.benchmark(m)),R.filter_initialized&&(F.$table.triggerHandler("filterBeforeEnd",F),F.$table.triggerHandler("filterEnd",F)),setTimeout(function(){E.applyWidget(F.table)},0)}},getOptionSource:function(e,t,r){var i=(e=A(e)[0]).config,a=!1,l=i.widgetOptions.filter_selectSource,s=i.$table.data("lastSearch")||[],n="function"==typeof l||E.getColumnData(e,l,t);if(r&&""!==s[t]&&(r=!1),!0===n)a=l(e,t,r);else{if(n instanceof A||"string"===A.type(n)&&0<=n.indexOf(""))return n;if(A.isArray(n))a=n;else if("object"===A.type(l)&&n&&null===(a=n(e,t,r)))return null}return!1===a&&(a=I.getOptions(e,t,r)),I.processOptions(e,t,a)},processOptions:function(a,l,r){if(!A.isArray(r))return!1;var s,e,t,i,n,o,c=(a=A(a)[0]).config,d=null!=l&&0<=l&&l'+(p.data("placeholder")||p.attr("data-placeholder")||u.filter_placeholder.select||"")+"",m=h.$table.find("thead").find("select."+b.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=I.getOptionSource(e,t,a))){if(A.isArray(r)){for(l=0;l"}else""+f!="[object Object]"&&(0<=(s=n=f=(""+f).replace(O.quote,""")).indexOf(u.filter_selectSourceSeparator)&&(s=(o=n.split(u.filter_selectSourceSeparator))[0],n=o[1]),g+=""!==f?"":"");r=[]}c=(h.$filters?h.$filters:h.$table.children("thead")).find("."+b.filter),u.filter_$externalFilters&&(c=c&&c.length?c.add(u.filter_$externalFilters):u.filter_$externalFilters),(d=c.filter('select[data-column="'+t+'"]')).length&&(d[i?"html":"append"](g),A.isArray(r)||d.append(r).val(m),d.val(m))}}},buildDefault:function(e,t){var r,i,a,l=e.config,s=l.widgetOptions,n=l.columns;for(r=0;r'),w=d.parent().addClass(F.css.stickyHide).css({position:m.length?"absolute":"fixed",padding:parseInt(d.parent().parent().css("padding-left"),10),top:c+v,left:0,visibility:"hidden",zIndex:p.stickyHeaders_zIndex||2}),f=d.children("thead:first"),x="",h=function(e,t){var r,i,a,l,s,n=e.filter(":visible"),o=n.length;for(r=0;rr.top&&o thead:gt(0), tr.sticky-false").hide(),d.find("> tbody, > tfoot").remove(),d.find("caption").toggle(p.stickyHeaders_includeCaption),l=f.children().children(),d.css({height:0,width:0,margin:0}),l.find("."+F.css.resizer).remove(),g.addClass("hasStickyHeaders").bind("pagerComplete"+s,function(){C()}),F.bindEvents(e,f.children().children("."+F.css.header)),p.stickyHeaders_appendTo?z(p.stickyHeaders_appendTo).append(w):g.after(w),r.onRenderHeader)for(i=(a=f.children("tr").children()).length,t=0;t";d("head").append(e)}),f.resizable={init:function(e,t){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable");var r,i,a,l,s=e.$table,n=s.parent(),o=parseInt(s.css("margin-top"),10),c=t.resizable_vars={useStorage:f.storage&&!1!==t.resizable,$wrap:n,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===n.css("overflow")||"scroll"===n.css("overflow")||"auto"===n.css("overflow-x")||"scroll"===n.css("overflow-x"),storedSizes:[]};for(f.resizableReset(e.table,!0),c.tableWidth=s.width(),c.fullWidth=Math.abs(n.width()-c.tableWidth)<20,c.useStorage&&c.overflow&&(f.storage(e.table,"tablesorter-table-original-css-width",c.tableWidth),l=f.storage(e.table,"tablesorter-table-resized-width")||"auto",f.resizable.setWidth(s,l,!0)),t.resizable_vars.storedSizes=a=(c.useStorage?f.storage(e.table,f.css.resizableStorage):[])||[],f.resizable.setWidths(e,t,a),f.resizable.updateStoredSizes(e,t),t.$resizable_container=d('
').css({top:o}).insertBefore(s),i=0;i').appendTo(t.$resizable_container).attr({"data-column":i,unselectable:"on"}).data("header",r).bind("selectstart",!1);f.resizable.bindings(e,t)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r> Saving last sort: "+e.sortList+c.benchmark(a))):(l.addClass("hasSaveSort"),n="",c.storage&&(n=d(e),o&&console.log('saveSort >> Last sort loaded: "'+n+'"'+c.benchmark(a)),l.bind("saveSortReset",function(e){e.stopPropagation(),c.storage(t,"tablesorter-savesort","")})),i&&n&&0> Using",n?h:"cookies"),b.parseJSON&&(o=n?b.parseJSON(y[h][t]||"null")||{}:(l=_.cookie.split(/[;\s|=]/),0!==(a=b.inArray(t,l)+1)&&b.parseJSON(l[a]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return o&&o[m]?o[m][g]:"";o[m]||(o[m]={}),o[m][g]=r,n?y[h][t]=JSON.stringify(o):((s=new Date).setTime(s.getTime()+31536e6),_.cookie=t+"="+JSON.stringify(o).replace(/\"/g,'"')+"; expires="+s.toGMTString()+"; path=/")}}(e,window,document),function(C){"use strict";var z=C.tablesorter||{};z.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},C.extend(z.css,{wrapper:"tablesorter-wrapper"}),z.addWidget({id:"uitheme",priority:10,format:function(e,t,r){var i,a,l,s,n,o,c,d,f,h,u,p,g,m=z.themes,b=t.$table.add(C(t.namespace+"_extra_table")),y=t.$headers.add(C(t.namespace+"_extra_headers")),_=t.theme||"jui",v=m[_]||{},w=C.trim([v.sortNone,v.sortDesc,v.sortAsc,v.active].join(" ")),x=C.trim([v.iconSortNone,v.iconSortDesc,v.iconSortAsc].join(" ")),S=z.debug(t,"uitheme");for(S&&(n=new Date),b.hasClass("tablesorter-"+_)&&t.theme===t.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,h=m[t.appliedTheme]||{},u=(g=!C.isEmptyObject(h))?[h.sortNone,h.sortDesc,h.sortAsc,h.active].join(" "):"",p=g?[h.iconSortNone,h.iconSortDesc,h.iconSortAsc].join(" "):"",g&&(r.zebra[0]=C.trim(" "+r.zebra[0].replace(" "+h.even,"")),r.zebra[1]=C.trim(" "+r.zebra[1].replace(" "+h.odd,"")),t.$tbodies.children().removeClass([h.even,h.odd].join(" "))),v.even&&(r.zebra[0]+=" "+v.even),v.odd&&(r.zebra[1]+=" "+v.odd),b.children("caption").removeClass(h.caption||"").addClass(v.caption),d=b.removeClass((t.appliedTheme?"tablesorter-"+(t.appliedTheme||""):"")+" "+(h.table||"")).addClass("tablesorter-"+_+" "+(v.table||"")).children("tfoot"),t.appliedTheme=t.theme,d.length&&d.children("tr").removeClass(h.footerRow||"").addClass(v.footerRow).children("th, td").removeClass(h.footerCells||"").addClass(v.footerCells),y.removeClass((g?[h.header,h.hover,u].join(" "):"")||"").addClass(v.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(e){C(this)["mouseenter"===e.type?"addClass":"removeClass"](v.hover||"")}),y.each(function(){var e=C(this);e.find("."+z.css.wrapper).length||e.wrapInner('
')}),t.cssIcon&&y.find("."+z.css.icon).removeClass(g?[h.icons,p].join(" "):"").addClass(v.icons||""),z.hasWidget(t.table,"filter")&&(a=function(){b.children("thead").children("."+z.css.filterRow).removeClass(g&&h.filterRow||"").addClass(v.filterRow||"")},r.filter_initialized?a():b.one("filterInit",function(){a()}))),i=0;i> Applied "+_+" theme"+z.benchmark(n))},remove:function(e,t,r,i){if(r.uitheme_applied){var a=t.$table,l=t.appliedTheme||"jui",s=z.themes[l]||z.themes.jui,n=a.children("thead").children(),o=s.sortNone+" "+s.sortDesc+" "+s.sortAsc,c=s.iconSortNone+" "+s.iconSortDesc+" "+s.iconSortAsc;a.removeClass("tablesorter-"+l+" "+s.table),r.uitheme_applied=!1,i||(a.find(z.css.header).removeClass(s.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(s.hover+" "+o+" "+s.active).filter("."+z.css.filterRow).removeClass(s.filterRow),n.find("."+z.css.icon).removeClass(s.icons+" "+c))}}})}(e),function(b){"use strict";var y=b.tablesorter||{};y.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(e,t,r){var i,a,l,s,n,o,c,d,f=t.$table,h=t.$tbodies,u=t.sortList,p=u.length,g=r&&r.columns||["primary","secondary","tertiary"],m=g.length-1;for(c=g.join(" "),a=0;a=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!O.orTest.test(t.iFilter)&&!O.orSplit.test(t.filter)||O.regex.test(t.filter))return null;var i,a,l,s=A.extend({},t),n=t.filter.split(O.orSplit),o=t.iFilter.split(O.orSplit),c=n.length;for(i=0;i]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(a.data("placeholder")||a.attr("data-placeholder")||d.filter_placeholder.select||"")+"":"",0<=(i=s=t).indexOf(d.filter_selectSourceSeparator)&&(i=(s=t.split(d.filter_selectSourceSeparator))[1],s=s[0]),e+="");c.$table.find("thead").find("select."+b.filter+'[data-column="'+l+'"]').append(e),(n="function"==typeof(i=d.filter_selectSource)||E.getColumnData(r,i,l))&&I.buildSelect(c.table,l,"",!0,a.hasClass(d.filter_onlyAvail))}I.buildDefault(r,!0),I.bindSearch(r,c.$table.find("."+b.filter),!0),d.filter_external&&I.bindSearch(r,d.filter_external),d.filter_hideFilters&&I.hideFilters(c),c.showProcessing&&(i="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(i.replace(E.regex.spaces," ")).bind(i,function(e,t){a=t?c.$table.find("."+b.header).filter("[data-column]").filter(function(){return""!==t[A(this).data("column")]}):"",E.isProcessing(r,"filterStart"===e.type,t?a:"")})),c.filteredRows=c.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(i.replace(E.regex.spaces," ")).bind(i,function(){I.completeInit(this)}),c.pager&&c.pager.initialized&&!d.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){I.filterInitComplete(c)},100)):d.filter_initialized||I.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,i=I.setDefaults(e,t,r)||[];i.length&&(t.delayInit&&""===i.join("")||E.setFilters(e,i,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||I.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,a=i&&i.widgetOptions;a&&!a.filter_initialized&&(a.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,i=e.widgetOptions,a=0,l=function(){i.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),I.findRows(e.table,e.lastSearch||[]),E.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(A.isEmptyObject(i.filter_formatter))l();else{for(r=i.filter_formatterInit.length,t=0;t';for(l=0;l").appendTo(t.$table.children("thead").eq(0)).children("td"),l=0;l").appendTo(i):((d=E.getColumnData(e,r.filter_formatter,l))?(r.filter_formatterCount++,(g=d(i,l))&&0===g.length&&(g=i.children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==i[0])&&i.append(g)):g=A('').appendTo(i),g&&(f=s.data("placeholder")||s.attr("data-placeholder")||r.filter_placeholder.search||"",g.attr("placeholder",f))),g&&(c=(A.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[l]&&r.filter_cssFilter[l]||"":r.filter_cssFilter)||"",g.addClass(b.filter+" "+c),(f=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(f=["{{label}}"]),A.each(f,function(e,t){var r=new RegExp(t,"g"),i=s.attr("data-"+t.replace(/{{|}}/g,"")),a=void 0===i?s.text():i;c=c.replace(r,A.trim(a))}),g.attr({"data-column":i.attr("data-column"),"aria-label":c}),o&&(g.attr("placeholder","").addClass(b.filterDisabled)[0].disabled=!0)))},bindSearch:function(a,e,t){if(a=A(a)[0],(e=A(e)).length){var r,l=a.config,s=l.widgetOptions,i=l.namespace+"filter",n=s.filter_$externalFilters;!0!==t&&(r=s.filter_anyColumnSelector+","+s.filter_multipleColumnSelector,s.filter_$anyMatch=e.filter(r),n&&n.length?s.filter_$externalFilters=s.filter_$externalFilters.add(e):s.filter_$externalFilters=e,E.setFilters(a,l.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(i+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(E.regex.spaces," ")).bind("keydown"+i,function(e){if(e.which===o.escape&&!a.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+i,function(e){s=a.config.widgetOptions;var t=parseInt(A(this).attr("data-column"),10),r="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);if(void 0===r&&(r=s.filter_liveSearch.fallback||!1),A(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===o.escape)this.value=s.filter_resetOnEsc?"":l.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=o.left&&e.which<=o.down)))return;if(!1===r&&""!==this.value&&e.which!==o.enter)return}I.searching(a,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(i+" "),function(e){var t=parseInt(A(this).attr("data-column"),10),r=e.type,i="boolean"==typeof s.filter_liveSearch?s.filter_liveSearch:E.getColumnData(a,s.filter_liveSearch,t);!a.config.widgetOptions.filter_initialized||e.which!==o.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==i&&(!0===i||"INPUT"===e.target.nodeName)||this.value===l.lastSearch[t])||(e.preventDefault(),A(this).attr("data-lastSearchTime",(new Date).getTime()),I.searching(a,"keypress"!==r,!0,t))})}},searching:function(e,t,r,i){var a,l=e.config.widgetOptions;void 0===i?a=!1:void 0===(a="boolean"==typeof l.filter_liveSearch?l.filter_liveSearch:E.getColumnData(e,l.filter_liveSearch,i))&&(a=l.filter_liveSearch.fallback||!1),clearTimeout(l.filter_searchTimer),void 0===t||!0===t?l.filter_searchTimer=setTimeout(function(){I.checkFilters(e,t,r)},a?l.filter_searchDelay:10):I.checkFilters(e,t,r)},equalFilters:function(e,t,r){var i,a=[],l=[],s=e.columns+1;for(t=A.isArray(t)?t:[],r=A.isArray(r)?r:[],i=0;i=e.columns&&(n=e.columns-1);s<=n;s++)h[h.length]=s;t=t.replace(a[d],"")}if(!r&&/,/.test(t))for(f=(o=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),F.filteredRows=0,t=$||[],c=F.totalRows=0;c> Searching through "+(v&&_> Completed search"+E.benchmark(m)),R.filter_initialized&&(F.$table.triggerHandler("filterBeforeEnd",F),F.$table.triggerHandler("filterEnd",F)),setTimeout(function(){E.applyWidget(F.table)},0)}},getOptionSource:function(e,t,r){var i=(e=A(e)[0]).config,a=!1,l=i.widgetOptions.filter_selectSource,s=i.$table.data("lastSearch")||[],n="function"==typeof l||E.getColumnData(e,l,t);if(r&&""!==s[t]&&(r=!1),!0===n)a=l(e,t,r);else{if(n instanceof A||"string"===A.type(n)&&0<=n.indexOf(""))return n;if(A.isArray(n))a=n;else if("object"===A.type(l)&&n&&null===(a=n(e,t,r)))return null}return!1===a&&(a=I.getOptions(e,t,r)),I.processOptions(e,t,a)},processOptions:function(a,l,r){if(!A.isArray(r))return!1;var s,e,t,i,n,o,c=(a=A(a)[0]).config,d=null!=l&&0<=l&&l'+(p.data("placeholder")||p.attr("data-placeholder")||u.filter_placeholder.select||"")+"",m=h.$table.find("thead").find("select."+b.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=I.getOptionSource(e,t,a))){if(A.isArray(r)){for(l=0;l"}else""+f!="[object Object]"&&(0<=(s=n=f=(""+f).replace(O.quote,""")).indexOf(u.filter_selectSourceSeparator)&&(s=(o=n.split(u.filter_selectSourceSeparator))[0],n=o[1]),g+=""!==f?"":"");r=[]}c=(h.$filters?h.$filters:h.$table.children("thead")).find("."+b.filter),u.filter_$externalFilters&&(c=c&&c.length?c.add(u.filter_$externalFilters):u.filter_$externalFilters),(d=c.filter('select[data-column="'+t+'"]')).length&&(d[i?"html":"append"](g),A.isArray(r)||d.append(r).val(m),d.val(m))}}},buildDefault:function(e,t){var r,i,a,l=e.config,s=l.widgetOptions,n=l.columns;for(r=0;r'),w=d.parent().addClass(F.css.stickyHide).css({position:m.length?"absolute":"fixed",padding:parseInt(d.parent().parent().css("padding-left"),10),top:c+v,left:0,visibility:"hidden",zIndex:p.stickyHeaders_zIndex||2}),f=d.children("thead:first"),x="",h=function(e,t){var r,i,a,l,s,n=e.filter(":visible"),o=n.length;for(r=0;rr.top&&o thead:gt(0), tr.sticky-false").hide(),d.find("> tbody, > tfoot").remove(),d.find("caption").toggle(p.stickyHeaders_includeCaption),l=f.children().children(),d.css({height:0,width:0,margin:0}),l.find("."+F.css.resizer).remove(),g.addClass("hasStickyHeaders").bind("pagerComplete"+s,function(){C()}),F.bindEvents(e,f.children().children("."+F.css.header)),p.stickyHeaders_appendTo?z(p.stickyHeaders_appendTo).append(w):g.after(w),r.onRenderHeader)for(i=(a=f.children("tr").children()).length,t=0;t";d("head").append(e)}),f.resizable={init:function(e,t){if(!e.$table.hasClass("hasResizable")){e.$table.addClass("hasResizable");var r,i,a,l,s=e.$table,n=s.parent(),o=parseInt(s.css("margin-top"),10),c=t.resizable_vars={useStorage:f.storage&&!1!==t.resizable,$wrap:n,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===n.css("overflow")||"scroll"===n.css("overflow")||"auto"===n.css("overflow-x")||"scroll"===n.css("overflow-x"),storedSizes:[]};for(f.resizableReset(e.table,!0),c.tableWidth=s.width(),c.fullWidth=Math.abs(n.width()-c.tableWidth)<20,c.useStorage&&c.overflow&&(f.storage(e.table,"tablesorter-table-original-css-width",c.tableWidth),l=f.storage(e.table,"tablesorter-table-resized-width")||"auto",f.resizable.setWidth(s,l,!0)),t.resizable_vars.storedSizes=a=(c.useStorage?f.storage(e.table,f.css.resizableStorage):[])||[],f.resizable.setWidths(e,t,a),f.resizable.updateStoredSizes(e,t),t.$resizable_container=d('
').css({top:o}).insertBefore(s),i=0;i').appendTo(t.$resizable_container).attr({"data-column":i,unselectable:"on"}).data("header",r).bind("selectstart",!1);f.resizable.bindings(e,t)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r> Saving last sort: "+e.sortList+c.benchmark(a))):(l.addClass("hasSaveSort"),n="",c.storage&&(n=d(e),o&&console.log('saveSort >> Last sort loaded: "'+n+'"'+c.benchmark(a)),l.bind("saveSortReset",function(e){e.stopPropagation(),c.storage(t,"tablesorter-savesort","")})),i&&n&&0=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!D.orTest.test(t.iFilter)&&!D.orSplit.test(t.filter)||D.regex.test(t.filter))return null;var i,l,a,n=M.extend({},t),s=t.filter.split(D.orSplit),o=t.iFilter.split(D.orSplit),c=s.length;for(i=0;i]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(l.data("placeholder")||l.attr("data-placeholder")||f.filter_placeholder.select||"")+"":"",0<=(i=n=t).indexOf(f.filter_selectSourceSeparator)&&(i=(n=t.split(f.filter_selectSourceSeparator))[1],n=n[0]),e+="");c.$table.find("thead").find("select."+_.filter+'[data-column="'+a+'"]').append(e),(s="function"==typeof(i=f.filter_selectSource)||z.getColumnData(r,i,a))&&I.buildSelect(c.table,a,"",!0,l.hasClass(f.filter_onlyAvail))}I.buildDefault(r,!0),I.bindSearch(r,c.$table.find("."+_.filter),!0),f.filter_external&&I.bindSearch(r,f.filter_external),f.filter_hideFilters&&I.hideFilters(c),c.showProcessing&&(i="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(i.replace(z.regex.spaces," ")).bind(i,function(e,t){l=t?c.$table.find("."+_.header).filter("[data-column]").filter(function(){return""!==t[M(this).data("column")]}):"",z.isProcessing(r,"filterStart"===e.type,t?l:"")})),c.filteredRows=c.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(i.replace(z.regex.spaces," ")).bind(i,function(){I.completeInit(this)}),c.pager&&c.pager.initialized&&!f.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){I.filterInitComplete(c)},100)):f.filter_initialized||I.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,i=I.setDefaults(e,t,r)||[];i.length&&(t.delayInit&&""===i.join("")||z.setFilters(e,i,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||I.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,l=i&&i.widgetOptions;l&&!l.filter_initialized&&(l.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,i=e.widgetOptions,l=0,a=function(){i.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),I.findRows(e.table,e.lastSearch||[]),z.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(M.isEmptyObject(i.filter_formatter))a();else{for(r=i.filter_formatterInit.length,t=0;t';for(a=0;a").appendTo(t.$table.children("thead").eq(0)).children("td"),a=0;a").appendTo(i):((f=z.getColumnData(e,r.filter_formatter,a))?(r.filter_formatterCount++,(g=f(i,a))&&0===g.length&&(g=i.children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==i[0])&&i.append(g)):g=M('').appendTo(i),g&&(d=n.data("placeholder")||n.attr("data-placeholder")||r.filter_placeholder.search||"",g.attr("placeholder",d))),g&&(c=(M.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[a]&&r.filter_cssFilter[a]||"":r.filter_cssFilter)||"",g.addClass(_.filter+" "+c),(d=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(d=["{{label}}"]),M.each(d,function(e,t){var r=new RegExp(t,"g"),i=n.attr("data-"+t.replace(/{{|}}/g,"")),l=void 0===i?n.text():i;c=c.replace(r,M.trim(l))}),g.attr({"data-column":i.attr("data-column"),"aria-label":c}),o&&(g.attr("placeholder","").addClass(_.filterDisabled)[0].disabled=!0)))},bindSearch:function(l,e,t){if(l=M(l)[0],(e=M(e)).length){var r,a=l.config,n=a.widgetOptions,i=a.namespace+"filter",s=n.filter_$externalFilters;!0!==t&&(r=n.filter_anyColumnSelector+","+n.filter_multipleColumnSelector,n.filter_$anyMatch=e.filter(r),s&&s.length?n.filter_$externalFilters=n.filter_$externalFilters.add(e):n.filter_$externalFilters=e,z.setFilters(l,a.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(i+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(z.regex.spaces," ")).bind("keydown"+i,function(e){if(e.which===o.escape&&!l.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+i,function(e){n=l.config.widgetOptions;var t=parseInt(M(this).attr("data-column"),10),r="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:z.getColumnData(l,n.filter_liveSearch,t);if(void 0===r&&(r=n.filter_liveSearch.fallback||!1),M(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===o.escape)this.value=n.filter_resetOnEsc?"":a.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=o.left&&e.which<=o.down)))return;if(!1===r&&""!==this.value&&e.which!==o.enter)return}I.searching(l,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(i+" "),function(e){var t=parseInt(M(this).attr("data-column"),10),r=e.type,i="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:z.getColumnData(l,n.filter_liveSearch,t);!l.config.widgetOptions.filter_initialized||e.which!==o.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==i&&(!0===i||"INPUT"===e.target.nodeName)||this.value===a.lastSearch[t])||(e.preventDefault(),M(this).attr("data-lastSearchTime",(new Date).getTime()),I.searching(l,"keypress"!==r,!0,t))})}},searching:function(e,t,r,i){var l,a=e.config.widgetOptions;void 0===i?l=!1:void 0===(l="boolean"==typeof a.filter_liveSearch?a.filter_liveSearch:z.getColumnData(e,a.filter_liveSearch,i))&&(l=a.filter_liveSearch.fallback||!1),clearTimeout(a.filter_searchTimer),void 0===t||!0===t?a.filter_searchTimer=setTimeout(function(){I.checkFilters(e,t,r)},l?a.filter_searchDelay:10):I.checkFilters(e,t,r)},equalFilters:function(e,t,r){var i,l=[],a=[],n=e.columns+1;for(t=M.isArray(t)?t:[],r=M.isArray(r)?r:[],i=0;i=e.columns&&(s=e.columns-1);n<=s;n++)u[u.length]=n;t=t.replace(l[f],"")}if(!r&&/,/.test(t))for(d=(o=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),R.filteredRows=0,t=S||[],c=R.totalRows=0;c> Searching through "+(w&&F> Completed search"+z.benchmark(m)),T.filter_initialized&&(R.$table.triggerHandler("filterBeforeEnd",R),R.$table.triggerHandler("filterEnd",R)),setTimeout(function(){z.applyWidget(R.table)},0)}},getOptionSource:function(e,t,r){var i=(e=M(e)[0]).config,l=!1,a=i.widgetOptions.filter_selectSource,n=i.$table.data("lastSearch")||[],s="function"==typeof a||z.getColumnData(e,a,t);if(r&&""!==n[t]&&(r=!1),!0===s)l=a(e,t,r);else{if(s instanceof M||"string"===M.type(s)&&0<=s.indexOf(""))return s;if(M.isArray(s))l=s;else if("object"===M.type(a)&&s&&null===(l=s(e,t,r)))return null}return!1===l&&(l=I.getOptions(e,t,r)),I.processOptions(e,t,l)},processOptions:function(l,a,r){if(!M.isArray(r))return!1;var n,e,t,i,s,o,c=(l=M(l)[0]).config,f=null!=a&&0<=a&&a'+(p.data("placeholder")||p.attr("data-placeholder")||h.filter_placeholder.select||"")+"",m=u.$table.find("thead").find("select."+_.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=I.getOptionSource(e,t,l))){if(M.isArray(r)){for(a=0;a"}else""+d!="[object Object]"&&(0<=(n=s=d=(""+d).replace(D.quote,""")).indexOf(h.filter_selectSourceSeparator)&&(n=(o=s.split(h.filter_selectSourceSeparator))[0],s=o[1]),g+=""!==d?"":"");r=[]}c=(u.$filters?u.$filters:u.$table.children("thead")).find("."+_.filter),h.filter_$externalFilters&&(c=c&&c.length?c.add(h.filter_$externalFilters):h.filter_$externalFilters),(f=c.filter('select[data-column="'+t+'"]')).length&&(f[i?"html":"append"](g),M.isArray(r)||f.append(r).val(m),f.val(m))}}},buildDefault:function(e,t){var r,i,l,a=e.config,n=a.widgetOptions,s=a.columns;for(r=0;r=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,t,r){if(!D.orTest.test(t.iFilter)&&!D.orSplit.test(t.filter)||D.regex.test(t.filter))return null;var i,l,a,n=M.extend({},t),s=t.filter.split(D.orSplit),o=t.iFilter.split(D.orSplit),c=s.length;for(i=0;i]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/'+(l.data("placeholder")||l.attr("data-placeholder")||f.filter_placeholder.select||"")+"":"",0<=(i=n=t).indexOf(f.filter_selectSourceSeparator)&&(i=(n=t.split(f.filter_selectSourceSeparator))[1],n=n[0]),e+="");c.$table.find("thead").find("select."+_.filter+'[data-column="'+a+'"]').append(e),(s="function"==typeof(i=f.filter_selectSource)||z.getColumnData(r,i,a))&&I.buildSelect(c.table,a,"",!0,l.hasClass(f.filter_onlyAvail))}I.buildDefault(r,!0),I.bindSearch(r,c.$table.find("."+_.filter),!0),f.filter_external&&I.bindSearch(r,f.filter_external),f.filter_hideFilters&&I.hideFilters(c),c.showProcessing&&(i="filterStart filterEnd ".split(" ").join(c.namespace+"filter-sp "),c.$table.unbind(i.replace(z.regex.spaces," ")).bind(i,function(e,t){l=t?c.$table.find("."+_.header).filter("[data-column]").filter(function(){return""!==t[M(this).data("column")]}):"",z.isProcessing(r,"filterStart"===e.type,t?l:"")})),c.filteredRows=c.totalRows,i="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(c.namespace+"filter "),c.$table.unbind(i.replace(z.regex.spaces," ")).bind(i,function(){I.completeInit(this)}),c.pager&&c.pager.initialized&&!f.filter_initialized?(c.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){I.filterInitComplete(c)},100)):f.filter_initialized||I.completeInit(r)},completeInit:function(e){var t=e.config,r=t.widgetOptions,i=I.setDefaults(e,t,r)||[];i.length&&(t.delayInit&&""===i.join("")||z.setFilters(e,i,!0)),t.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){r.filter_initialized||I.filterInitComplete(t)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,l=i&&i.widgetOptions;l&&!l.filter_initialized&&(l.filter_formatterInit[t]=1)},filterInitComplete:function(e){var t,r,i=e.widgetOptions,l=0,a=function(){i.filter_initialized=!0,e.lastSearch=e.$table.data("lastSearch"),e.$table.triggerHandler("filterInit",e),I.findRows(e.table,e.lastSearch||[]),z.debug(e,"filter")&&console.log("Filter >> Widget initialized")};if(M.isEmptyObject(i.filter_formatter))a();else{for(r=i.filter_formatterInit.length,t=0;t';for(a=0;a").appendTo(t.$table.children("thead").eq(0)).children("td"),a=0;a").appendTo(i):((f=z.getColumnData(e,r.filter_formatter,a))?(r.filter_formatterCount++,(g=f(i,a))&&0===g.length&&(g=i.children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==i[0])&&i.append(g)):g=M('').appendTo(i),g&&(d=n.data("placeholder")||n.attr("data-placeholder")||r.filter_placeholder.search||"",g.attr("placeholder",d))),g&&(c=(M.isArray(r.filter_cssFilter)?void 0!==r.filter_cssFilter[a]&&r.filter_cssFilter[a]||"":r.filter_cssFilter)||"",g.addClass(_.filter+" "+c),(d=(c=r.filter_filterLabel).match(/{{([^}]+?)}}/g))||(d=["{{label}}"]),M.each(d,function(e,t){var r=new RegExp(t,"g"),i=n.attr("data-"+t.replace(/{{|}}/g,"")),l=void 0===i?n.text():i;c=c.replace(r,M.trim(l))}),g.attr({"data-column":i.attr("data-column"),"aria-label":c}),o&&(g.attr("placeholder","").addClass(_.filterDisabled)[0].disabled=!0)))},bindSearch:function(l,e,t){if(l=M(l)[0],(e=M(e)).length){var r,a=l.config,n=a.widgetOptions,i=a.namespace+"filter",s=n.filter_$externalFilters;!0!==t&&(r=n.filter_anyColumnSelector+","+n.filter_multipleColumnSelector,n.filter_$anyMatch=e.filter(r),s&&s.length?n.filter_$externalFilters=n.filter_$externalFilters.add(e):n.filter_$externalFilters=e,z.setFilters(l,a.$table.data("lastSearch")||[],!1===t)),r="keypress keyup keydown search change input ".split(" ").join(i+" "),e.attr("data-lastSearchTime",(new Date).getTime()).unbind(r.replace(z.regex.spaces," ")).bind("keydown"+i,function(e){if(e.which===o.escape&&!l.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+i,function(e){n=l.config.widgetOptions;var t=parseInt(M(this).attr("data-column"),10),r="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:z.getColumnData(l,n.filter_liveSearch,t);if(void 0===r&&(r=n.filter_liveSearch.fallback||!1),M(this).attr("data-lastSearchTime",(new Date).getTime()),e.which===o.escape)this.value=n.filter_resetOnEsc?"":a.lastSearch[t];else{if(""!==this.value&&("number"==typeof r&&this.value.length=o.left&&e.which<=o.down)))return;if(!1===r&&""!==this.value&&e.which!==o.enter)return}I.searching(l,!0,!0,t)}).bind("search change keypress input blur ".split(" ").join(i+" "),function(e){var t=parseInt(M(this).attr("data-column"),10),r=e.type,i="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:z.getColumnData(l,n.filter_liveSearch,t);!l.config.widgetOptions.filter_initialized||e.which!==o.enter&&"search"!==r&&"blur"!==r&&("change"!==r&&"input"!==r||!0!==i&&(!0===i||"INPUT"===e.target.nodeName)||this.value===a.lastSearch[t])||(e.preventDefault(),M(this).attr("data-lastSearchTime",(new Date).getTime()),I.searching(l,"keypress"!==r,!0,t))})}},searching:function(e,t,r,i){var l,a=e.config.widgetOptions;void 0===i?l=!1:void 0===(l="boolean"==typeof a.filter_liveSearch?a.filter_liveSearch:z.getColumnData(e,a.filter_liveSearch,i))&&(l=a.filter_liveSearch.fallback||!1),clearTimeout(a.filter_searchTimer),void 0===t||!0===t?a.filter_searchTimer=setTimeout(function(){I.checkFilters(e,t,r)},l?a.filter_searchDelay:10):I.checkFilters(e,t,r)},equalFilters:function(e,t,r){var i,l=[],a=[],n=e.columns+1;for(t=M.isArray(t)?t:[],r=M.isArray(r)?r:[],i=0;i=e.columns&&(s=e.columns-1);n<=s;n++)u[u.length]=n;t=t.replace(l[f],"")}if(!r&&/,/.test(t))for(d=(o=t.split(/\s*,\s*/)).length,c=0;c> Starting filter widget search",r),m=new Date),R.filteredRows=0,t=S||[],c=R.totalRows=0;c> Searching through "+(w&&F> Completed search"+z.benchmark(m)),T.filter_initialized&&(R.$table.triggerHandler("filterBeforeEnd",R),R.$table.triggerHandler("filterEnd",R)),setTimeout(function(){z.applyWidget(R.table)},0)}},getOptionSource:function(e,t,r){var i=(e=M(e)[0]).config,l=!1,a=i.widgetOptions.filter_selectSource,n=i.$table.data("lastSearch")||[],s="function"==typeof a||z.getColumnData(e,a,t);if(r&&""!==n[t]&&(r=!1),!0===s)l=a(e,t,r);else{if(s instanceof M||"string"===M.type(s)&&0<=s.indexOf(""))return s;if(M.isArray(s))l=s;else if("object"===M.type(a)&&s&&null===(l=s(e,t,r)))return null}return!1===l&&(l=I.getOptions(e,t,r)),I.processOptions(e,t,l)},processOptions:function(l,a,r){if(!M.isArray(r))return!1;var n,e,t,i,s,o,c=(l=M(l)[0]).config,f=null!=a&&0<=a&&a'+(p.data("placeholder")||p.attr("data-placeholder")||h.filter_placeholder.select||"")+"",m=u.$table.find("thead").find("select."+_.filter+'[data-column="'+t+'"]').val();if(void 0!==r&&""!==r||null!==(r=I.getOptionSource(e,t,l))){if(M.isArray(r)){for(a=0;a"}else""+d!="[object Object]"&&(0<=(n=s=d=(""+d).replace(D.quote,""")).indexOf(h.filter_selectSourceSeparator)&&(n=(o=s.split(h.filter_selectSourceSeparator))[0],s=o[1]),g+=""!==d?"":"");r=[]}c=(u.$filters?u.$filters:u.$table.children("thead")).find("."+_.filter),h.filter_$externalFilters&&(c=c&&c.length?c.add(h.filter_$externalFilters):h.filter_$externalFilters),(f=c.filter('select[data-column="'+t+'"]')).length&&(f[i?"html":"append"](g),M.isArray(r)||f.append(r).val(m),f.val(m))}}},buildDefault:function(e,t){var r,i,l,a=e.config,n=a.widgetOptions,s=a.columns;for(r=0;r|\\||\"|\\'|\\s+(?:&&|-|"+(d.language.and||"and")+"|"+(d.language.or||"or")+"|"+(d.language.to||"to")+")\\s+)",d.mark.regex.filter=new RegExp(e,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(e){if(e instanceof RegExp){var t="".match(e);return null===t||t.length<5}return!1},cleanMatches:function(e){for(var t=[],r=e&&e.length||0;r--;)""!==e[r]&&(t[t.length]=e[r]);return t},ignoreColumns:function(e){for(var t=e.widgetOptions,r=e.columns,n=[];r--;)(t.mark_tsIgnore[r]||c(e.$headerIndexed[r]).hasClass("mark-ignore"))&&(n[n.length]=":nth-child("+(r+1)+")");return n.length?":not("+n.join(",")+")":""},update:function(o,e){var l={},g=o.widgetOptions,m=d.mark.regex,s=o.$table.find("tbody tr").unmark().not("."+(o.widgetOptions.filter_filteredRow||"filtered"));e=e||c.tablesorter.getFilters(o.$table),c.each(o.widgetOptions,function(e,t){var r=e.match(m.mark);r&&void 0!==r[1]&&(l[r[1]]=t)}),c.each(e,function(e,t){if(t&&!c(o.$headerIndexed[e]).hasClass("mark-ignore")&&!g.mark_tsIgnore[e]){var r=null,n=t,a=!1,i=e===o.columns?d.mark.ignoreColumns(o):":nth-child("+(e+1)+")";if(m.pure.test(t)){".*"===(n=m.pure.exec(t))[1]&&(n[1]="");try{r=new RegExp(n[1],"gim"),n=new RegExp(n[1],n[2])}catch(e){n=null}return void(d.mark.checkRegex(r)&&s.children(i).markRegExp(n,l))}0===t.indexOf("~")?(a=!0,n=t.replace(/~/g,"").split("")):(-1|\\||\"|\\'|\\s+(?:&&|-|"+(d.language.and||"and")+"|"+(d.language.or||"or")+"|"+(d.language.to||"to")+")\\s+)",d.mark.regex.filter=new RegExp(e,"gim")}else console.warn('Widget-mark not initialized: missing "jquery.mark.js"')},regex:{mark:/^mark_(.+)$/,pure:/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/},checkRegex:function(e){if(e instanceof RegExp){var t="".match(e);return null===t||t.length<5}return!1},cleanMatches:function(e){for(var t=[],r=e&&e.length||0;r--;)""!==e[r]&&(t[t.length]=e[r]);return t},ignoreColumns:function(e){for(var t=e.widgetOptions,r=e.columns,n=[];r--;)(t.mark_tsIgnore[r]||c(e.$headerIndexed[r]).hasClass("mark-ignore"))&&(n[n.length]=":nth-child("+(r+1)+")");return n.length?":not("+n.join(",")+")":""},update:function(o,e){var l={},g=o.widgetOptions,m=d.mark.regex,s=o.$table.find("tbody tr").unmark().not("."+(o.widgetOptions.filter_filteredRow||"filtered"));e=e||c.tablesorter.getFilters(o.$table),c.each(o.widgetOptions,function(e,t){var r=e.match(m.mark);r&&void 0!==r[1]&&(l[r[1]]=t)}),c.each(e,function(e,t){if(t&&!c(o.$headerIndexed[e]).hasClass("mark-ignore")&&!g.mark_tsIgnore[e]){var r=null,n=t,a=!1,i=e===o.columns?d.mark.ignoreColumns(o):":nth-child("+(e+1)+")";if(m.pure.test(t)){".*"===(n=m.pure.exec(t))[1]&&(n[1]="");try{r=new RegExp(n[1],"gim"),n=new RegExp(n[1],n[2])}catch(e){n=null}return void(d.mark.checkRegex(r)&&s.children(i).markRegExp(n,l))}n=0===t.indexOf("~")?(a=!0,t.replace(/~/g,"").split("")):(-1"+r+"
").text().replace(/\{content\}/g,"").trim(),a=a.replace(n,"")),a=_.formatFloat(a.replace(/[^\w,. \-()]/g,""),t.table)||0,isNaN(a)?0:a},getRow:function(t,e,n){var a,r=t.widgetOptions,i=[],l=e.closest("tr"),o=l.hasClass(r.filter_filteredRow||"filtered");return n&&(l=l.filter(n)),!n&&o||(a=l.children().not("["+r.math_dataAttrib+"=ignore]"),r.math_ignore.length&&(a=a.filter(function(){return-1===v.inArray(x.getCellIndex(v(this)),r.math_ignore)})),i=a.not(e).map(function(){return x.processText(t,v(this))}).get()),i},getColumn:function(t,e,n,a){var r,i,l,o,h,s,d=t.widgetOptions,u=[],c=e.closest("tr"),g=d.math_dataAttrib,f="["+g+"=ignore]",m=d.filter_filteredRow||"filtered",p=x.getCellIndex(e),_=t.$table.children("tbody").children(),b=["["+g+"^=above]","["+g+"^=below]","["+g+"^=col]","["+g+"^=all]"];if("above"===n)for(r=o=_.index(c);0<=r;)s=(l=_.eq(r)).children().filter(b[0]).length,a&&(l=l.filter(a)),i=l.children().filter(function(){return x.getCellIndex(v(this))===p}),((a||!l.hasClass(m))&&l.not(f).length&&r!==o||s&&r!==o)&&(s?r=0:i.length&&(u[u.length]=x.processText(t,i))),r--;else if("below"===n)for(o=_.length,r=_.index(c)+1;r"+i+"
").text().replace(/\{content\}/g,"").trim(),r=r.replace(n,"")),r=_.formatFloat(r.replace(/[^\w,. \-()]/g,""),t.table)||0,isNaN(r)?0:r},getRow:function(t,e,n){var a,r=t.widgetOptions,i=[],l=e.closest("tr"),o=l.hasClass(r.filter_filteredRow||"filtered");return n&&(l=l.filter(n)),!n&&o||(a=l.children().not("["+r.math_dataAttrib+"=ignore]"),r.math_ignore.length&&(a=a.filter(function(){return-1===v.inArray(x.getCellIndex(v(this)),r.math_ignore)})),i=a.not(e).map(function(){return x.processText(t,v(this))}).get()),i},getColumn:function(t,e,n,a){var r,i,l,o,h,s,d=t.widgetOptions,u=[],c=e.closest("tr"),g=d.math_dataAttrib,f="["+g+"=ignore]",m=d.filter_filteredRow||"filtered",p=x.getCellIndex(e),_=t.$table.children("tbody").children(),b=["["+g+"^=above]","["+g+"^=below]","["+g+"^=col]","["+g+"^=all]"];if("above"===n)for(r=o=_.index(c);0<=r;)s=(l=_.eq(r)).children().filter(b[0]).length,a&&(l=l.filter(a)),i=l.children().filter(function(){return x.getCellIndex(v(this))===p}),((a||!l.hasClass(m))&&l.not(f).length&&r!==o||s&&r!==o)&&(s?r=0:i.length&&(u[u.length]=x.processText(t,i))),r--;else if("below"===n)for(o=_.length,r=_.index(c)+1;r)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(e){e.$table.off(S.event).on(S.event,function(t){t.stopPropagation(),!S.busy&&t.timeStamp-S.lastEvent>S.noDblClick&&(S.lastEvent=t.timeStamp,S.busy=!0,S.process(e,e.widgetOptions))})},processRow:function(t,e,o,u){var n,r,a,p,i,l,s,c,d,f,_=t.widgetOptions,w=[],m=_.output_duplicateSpans,g=o&&u&&_.output_headerRows&&b.isFunction(_.output_callbackJSON),h=0,v=e.length;for(p=0;p"+S.popupTitle+'"),n.document.close(),n.focus()}catch(t){return n.close(),S.popup(e,o,u)}return!0},download:function(t,e,o){if("function"==typeof e.output_savePlugin)return e.output_savePlugin(t,e,o);var u,n,r,a,p=window.navigator,i=document.createElement("a");if(/(iP)/g.test(p.userAgent))return alert(S.message),!1;try{r=!!new Blob}catch(t){r=!1}return r?(window.URL=window.URL||window.webkitURL,a=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.output_encoding)?["\ufeff",o]:[o],n=new Blob(a,{type:e.output_encoding}),p.msSaveBlob?p.msSaveBlob(n,e.output_saveFileName):(i.href=window.URL.createObjectURL(n),i.download=e.output_saveFileName,document.createEvent&&((u=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(u))),!1):(window.open(e.output_encoding+encodeURIComponent(o)+"?download","_self"),!0)},remove:function(t){t.$table.off(S.event)}};y.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(){return!0},output_callbackJSON:function(t,e,o){return e+"("+o+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(t,e,o){S.init(o)},remove:function(t,e){S.remove(e)}})}(jQuery);return jQuery;})); +!function(b){"use strict";var y=b.tablesorter,S=y.output={event:"outputTable",noDblClick:600,lastEvent:0,busy:!1,regexQuote:/([\n\t\x09\x0d\x0a]|<[^<]+>)/,regexBR:/(|\n)/g,regexIMG:/]+alt\s*=\s*['"]([^'"]+)['"][^>]*>/i,regexHTML:/<[^<]+>/g,replaceCR:"\r\n",replaceTab:"\t",popupTitle:"Output",popupStyle:"width:100%;height:100%;margin:0;resize:none;",message:"Your device does not support downloading. Please try again in desktop browser.",init:function(e){e.$table.off(S.event).on(S.event,function(t){t.stopPropagation(),!S.busy&&t.timeStamp-S.lastEvent>S.noDblClick&&(S.lastEvent=t.timeStamp,S.busy=!0,S.process(e,e.widgetOptions))})},processRow:function(t,e,o,u){var n,r,a,p,i,l,s,c,d,f,_=t.widgetOptions,w=[],m=_.output_duplicateSpans,g=o&&u&&_.output_headerRows&&b.isFunction(_.output_callbackJSON),h=0,v=e.length;for(p=0;p"+S.popupTitle+'"),n.document.close(),n.focus()}catch(t){return n.close(),S.popup(e,o,u)}return!0},download:function(t,e,o){if("function"==typeof e.output_savePlugin)return e.output_savePlugin(t,e,o);var u,n,r,a,p=window.navigator,i=document.createElement("a");if(/(iP)/g.test(p.userAgent))return alert(S.message),!1;try{r=!!new Blob}catch(t){r=!1}return r?(window.URL=window.URL||window.webkitURL,a=/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.output_encoding)?["\ufeff",o]:[o],n=new Blob(a,{type:e.output_encoding}),p.msSaveBlob?p.msSaveBlob(n,e.output_saveFileName):(i.href=window.URL.createObjectURL(n),i.download=e.output_saveFileName,document.createEvent&&((u=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(u))),!1):(window.open(e.output_encoding+encodeURIComponent(o)+"?download","_self"),!0)},remove:function(t){t.$table.off(S.event)}};y.addWidget({id:"output",options:{output_separator:",",output_ignoreColumns:[],output_hiddenColumns:!1,output_includeFooter:!1,output_includeHeader:!0,output_headerRows:!1,output_dataAttrib:"data-name",output_delivery:"popup",output_saveRows:"filtered",output_duplicateSpans:!0,output_replaceQuote:"“;",output_includeHTML:!1,output_trimSpaces:!0,output_wrapQuotes:!1,output_popupStyle:"width=500,height=300",output_saveFileName:"mytable.csv",output_formatContent:null,output_callback:function(){return!0},output_callbackJSON:function(t,e,o){return e+"("+o+")"},output_encoding:"data:application/octet-stream;charset=utf8,",output_savePlugin:null},init:function(t,e,o){S.init(o)},remove:function(t,e){S.remove(e)}})}(jQuery);return jQuery;})); diff --git a/dist/js/widgets/widget-pager.min.js b/dist/js/widgets/widget-pager.min.js index 855c39c8..21cc2cc3 100644 --- a/dist/js/widgets/widget-pager.min.js +++ b/dist/js/widgets/widget-pager.min.js @@ -1,4 +1,4 @@ (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ /*! Widget: Pager - updated 2018-08-27 (v2.31.0) */ -!function(S){"use strict";var C,$=S.tablesorter;$.addWidget({id:"pager",priority:55,options:{pager_output:"{startRow} to {endRow} of {totalRows} rows",pager_updateArrows:!0,pager_startPage:0,pager_pageReset:0,pager_size:10,pager_maxOptionSize:20,pager_savePages:!0,pager_storageKey:"tablesorter-pager",pager_fixedHeight:!1,pager_countChildRows:!1,pager_removeRows:!1,pager_ajaxUrl:null,pager_customAjaxUrl:function(e,a){return a},pager_ajaxError:null,pager_ajaxObject:{dataType:"json"},pager_processAjaxOnInit:!0,pager_ajaxProcessing:function(e){return e},pager_css:{container:"tablesorter-pager",errorRow:"tablesorter-errorRow",disabled:"disabled"},pager_selectors:{container:".pager",first:".first",prev:".prev",next:".next",last:".last",gotoPage:".gotoPage",pageDisplay:".pagedisplay",pageSize:".pagesize"}},init:function(e){C.init(e)},format:function(e,a){if(!a.pager||!a.pager.initialized)return C.initComplete(a);C.moveToPage(a,a.pager,!1)},remove:function(e,a,t,r){C.destroyPager(a,r)}}),C=$.pager={init:function(e){if(!(e.hasInitialized&&e.config.pager&&e.config.pager.initialized)){var a,t=e.config,r=t.widgetOptions,i=r.pager_selectors,s=t.pager=S.extend({totalPages:0,filteredRows:0,filteredPages:0,currentFilters:[],page:r.pager_startPage,startRow:0,endRow:0,ajaxCounter:0,$size:null,last:{},setSize:r.pager_size,setPage:r.pager_startPage},t.pager);s.removeRows=r.pager_removeRows,s.isInitializing||(s.isInitializing=!0,$.debug(t,"pager")&&console.log("Pager >> Initializing"),s.size=S.data(e,"pagerLastSize")||r.pager_size,s.$container=S(i.container).addClass(r.pager_css.container).show(),s.totalRows=t.$tbodies.eq(0).children("tr").not(r.pager_countChildRows?"":"."+t.cssChildRow).length,s.oldAjaxSuccess=s.oldAjaxSuccess||r.pager_ajaxObject.success,t.appender=C.appender,s.initializing=!0,r.pager_savePages&&$.storage&&(a=$.storage(e,r.pager_storageKey)||{},s.page=(isNaN(a.page)?s.page:a.page)||s.setPage||0,s.size="all"===a.size?a.size:(isNaN(a.size)?s.size:a.size)||s.setSize||10,C.setPageSize(t,s.size)),s.regexRows=new RegExp("("+(r.filter_filteredRow||"filtered")+"|"+t.selectorRemove.slice(1)+"|"+t.cssChildRow+")"),s.regexFiltered=new RegExp(r.filter_filteredRow||"filtered"),s.initialized=!1,t.$table.triggerHandler("pagerBeforeInitialized",t),C.enablePager(t,!1),s.ajaxObject=r.pager_ajaxObject,s.ajaxObject.url=r.pager_ajaxUrl,"string"==typeof r.pager_ajaxUrl?(s.ajax=!0,r.filter_serversideFiltering=!0,t.serverSideSorting=!0,C.moveToPage(t,s)):(s.ajax=!1,$.appendCache(t,!0)))}},initComplete:function(e){var a=e.pager;C.bindEvents(e),a.ajax||C.hideRowsSetup(e),a.initialized=!0,a.initializing=!1,a.isInitializing=!1,C.setPageSize(e,a.size),$.debug(e,"pager")&&console.log("Pager >> Triggering pagerInitialized"),e.$table.triggerHandler("pagerInitialized",e),e.widgetOptions.filter_initialized&&$.hasWidget(e.table,"filter")||C.updatePageDisplay(e,!a.ajax)},bindEvents:function(i){var s,o,e,g=i.pager,n=i.widgetOptions,a=i.namespace+"pager",t=n.pager_selectors,r=$.debug(i,"pager");i.$table.off(a).on("filterInit filterStart ".split(" ").join(a+" "),function(e,a){var t;if(g.currentFilters=S.isArray(a)?a:i.$table.data("lastSearch"),g.ajax&&"filterInit"===e.type)return C.moveToPage(i,g,!1);t=$.filter.equalFilters?$.filter.equalFilters(i,i.lastSearch,g.currentFilters):(i.lastSearch||[]).join("")!==(g.currentFilters||[]).join(""),"filterStart"!==e.type||!1===n.pager_pageReset||t||(g.page=n.pager_pageReset)}).on("filterEnd sortEnd ".split(" ").join(a+" "),function(){g.currentFilters=i.$table.data("lastSearch"),(g.initialized||g.initializing)&&(i.delayInit&&i.rowsCopy&&0===i.rowsCopy.length&&C.updateCache(i),C.updatePageDisplay(i,!1),$.applyWidget(i.table))}).on("disablePager"+a,function(e){e.stopPropagation(),C.showAllRows(i)}).on("enablePager"+a,function(e){e.stopPropagation(),C.enablePager(i,!0)}).on("destroyPager"+a,function(e){e.stopPropagation(),$.removeWidget(i.table,"pager",!1)}).on("updateComplete"+a,function(e,a,t){if(e.stopPropagation(),a&&!t&&!g.ajax){var r=i.$tbodies.eq(0).children("tr").not(i.selectorRemove);g.totalRows=r.length-(n.pager_countChildRows?0:r.filter("."+i.cssChildRow).length),g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),r.length&&i.rowsCopy&&0===i.rowsCopy.length&&C.updateCache(i),g.page>=g.totalPages&&C.moveToLastPage(i,g),C.hideRows(i),C.changeHeight(i),C.updatePageDisplay(i,!1),$.applyWidget(a),C.updatePageDisplay(i)}}).on("pageSize refreshComplete ".split(" ").join(a+" "),function(e,a){e.stopPropagation(),C.setPageSize(i,C.parsePageSize(i,a,"get")),C.moveToPage(i,g,!0),C.hideRows(i),C.updatePageDisplay(i,!1)}).on("pageSet pagerUpdate ".split(" ").join(a+" "),function(e,a){e.stopPropagation(),"pagerUpdate"===e.type&&(a=void 0===a?g.page+1:a,g.last.page=!0),g.page=(parseInt(a,10)||1)-1,C.moveToPage(i,g,!0),C.updatePageDisplay(i,!1)}).on("pageAndSize"+a,function(e,a,t){e.stopPropagation(),g.page=(parseInt(a,10)||1)-1,C.setPageSize(i,C.parsePageSize(i,t,"get")),C.moveToPage(i,g,!0),C.hideRows(i),C.updatePageDisplay(i,!1)}),s=[t.first,t.prev,t.next,t.last],o=["moveToFirstPage","moveToPrevPage","moveToNextPage","moveToLastPage"],r&&!g.$container.length&&console.warn('Pager >> "container" not found'),g.$container.find(s.join(",")).attr("tabindex",0).off("click"+a).on("click"+a,function(e){e.stopPropagation();var a,t=S(this),r=s.length;if(!t.hasClass(n.pager_css.disabled))for(a=0;a> "goto" selector not found'),(e=g.$container.find(n.pager_selectors.pageSize)).length?(e.find("option").removeAttr("selected"),e.off("change"+a).on("change"+a,function(){if(!S(this).hasClass(n.pager_css.disabled)){var e=S(this).val();g.$container.find(n.pager_selectors.pageSize).val(e),C.setPageSize(i,e),C.moveToPage(i,g,!0),C.changeHeight(i)}return!1})):r&&console.warn('Pager >> "size" selector not found')},pagerArrows:function(e,a){var t=e.pager,r=!!a,i=r||0===t.page,s=C.getTotalPages(e,t),o=r||t.page===s-1||0===s,g=e.widgetOptions,n=g.pager_selectors;g.pager_updateArrows&&(t.$container.find(n.first+","+n.prev).toggleClass(g.pager_css.disabled,i).prop("aria-disabled",i),t.$container.find(n.next+","+n.last).toggleClass(g.pager_css.disabled,o).prop("aria-disabled",o))},calcFilters:function(e){var a,t,r,i=e.widgetOptions,s=e.pager,o=e.$table.hasClass("hasFilters");if(o&&!s.ajax)if(S.isEmptyObject(e.cache))s.filteredRows=s.totalRows=e.$tbodies.eq(0).children("tr").not(i.pager_countChildRows?"":"."+e.cssChildRow).length;else for(s.filteredRows=0,r=(a=e.cache[0].normalized).length,t=0;td.filteredRows&&e,d.page=r?p.pager_pageReset||0:d.page,d.startRow=r?f*d.page+1:0===d.filteredRows?0:f*d.page+1,d.endRow=Math.min(d.filteredRows,d.totalRows,f*(d.page+1)),i=d.$container.find(p.pager_selectors.pageDisplay),"function"==typeof p.pager_output?a=p.pager_output(l,d):(n=i.attr("data-pager-output"+(d.filteredRows'):1'+s[o]+"";d.$container.find(p.pager_selectors.gotoPage).html(r).val(d.page+1)}i.length&&(i["INPUT"===i[0].nodeName?"val":"html"](a),i.find(".ts-startRow, .ts-page").off("change"+c).on("change"+c,function(){var e=S(this).val(),a=S(this).hasClass("ts-startRow")?Math.floor(e/f)+1:e;t.$table.triggerHandler("pageSet"+c,[a])}))}C.pagerArrows(t),C.fixHeight(t),d.initialized&&!1!==e&&($.debug(t,"pager")&&console.log("Pager >> Triggering pagerComplete"),t.$table.triggerHandler("pagerComplete",t),p.pager_savePages&&$.storage&&$.storage(l,p.pager_storageKey,{page:d.page,size:f===d.totalRows?"all":f}))}},buildPageSelect:function(e,a){var t,r,i,s,o,g,n=e.widgetOptions,l=C.getTotalPages(e,a)||1,p=5*Math.ceil(l/n.pager_maxOptionSize/5),d=l>n.pager_maxOptionSize,c=a.page+1,f=p,u=l-p,h=[1];for(t=d?p:1;t<=l;)h[h.length]=t,t+=d?p:1;if(h[h.length]=l,d){for(i=[],(f=c-(r=Math.max(Math.floor(n.pager_maxOptionSize/p)-1,5)))<1&&(f=1),l<(u=c+r)&&(u=l),t=f;t<=u;t++)i[i.length]=t;p/2<(o=(h=S.grep(h,function(e,a){return S.inArray(e,h)===a})).length)-(g=i.length)&&o+g>n.pager_maxOptionSize&&(s=Math.floor(o/2)-Math.floor(g/2),Array.prototype.splice.apply(h,[s,g])),h=h.concat(i)}return h=S.grep(h,function(e,a){return S.inArray(e,h)===a}).sort(function(e,a){return e-a})},fixHeight:function(e){var a,t,r,i=e.table,s=e.pager,o=e.widgetOptions,g=e.$tbodies.eq(0);g.find("tr.pagerSavedHeightSpacer").remove(),o.pager_fixedHeight&&!s.isDisabled&&(t=S.data(i,"pagerSavedHeight"))&&(r=0,1'))},changeHeight:function(e){var a,t=e.table,r=e.pager,i="all"===r.size?r.totalRows:r.size,s=e.$tbodies.eq(0);s.find("tr.pagerSavedHeightSpacer").remove(),s.children("tr:visible").length||s.append(' '),a=s.children("tr").eq(0).height()*i,S.data(t,"pagerSavedHeight",a),C.fixHeight(e),S.data(t,"pagerLastSize",r.size)},hideRows:function(e){if(!e.widgetOptions.pager_ajaxUrl){var a,t,r,i,s,o=e.pager,g=e.widgetOptions,n=e.$tbodies.length,l="all"===o.size?o.totalRows:o.size,p=o.page*l,d=p+l,c=0,f=0;for(o.cacheIndex=[],a=0;a> Ajax Error",t,r,i),$.showError(s,t,r,i),a.$tbodies.eq(0).children("tr").detach(),o.totalRows=0;else{if(S.isArray(y)?(v=y[(d=isNaN(y[0])&&!isNaN(y[1]))?1:0],o.totalRows=isNaN(v)?o.totalRows||0:v,a.totalRows=a.filteredRows=o.filteredRows=o.totalRows,z=0===o.totalRows?[]:y[d?0:1]||[],b=y[2]):(o.ajaxData=y,a.totalRows=o.totalRows=y.total,a.filteredRows=o.filteredRows=void 0!==y.filteredRows?y.filteredRows:y.total,b=y.headers,z=y.rows||[]),R=z&&z.length,z instanceof S)g.pager_processAjaxOnInit&&(a.$tbodies.eq(0).empty(),a.$tbodies.eq(0).append(z));else if(R){for(l=0;l",p=0;p"+z[l][p]+"";_+=""}g.pager_processAjaxOnInit&&a.$tbodies.eq(0).html(_)}if(g.pager_processAjaxOnInit=!0,b){for(u=(c=j.hasClass("hasStickyHeaders"))?g.$sticky.children("thead:first").children("tr:not(."+a.cssIgnoreRow+")").children():"",f=j.find("tfoot tr:first").children(),m=(h=a.$headers.filter("th")).length,p=0;p> Triggering pagerChange"),j.triggerHandler("pagerChange",o),$.applyWidget(s),C.updatePageDisplay(a)},0)})}o.initialized||$.applyWidget(s)},getAjax:function(i){var r,e=C.getAjaxUrl(i),s=S(document),o=i.namespace+"pager",g=i.pager;""!==e&&(i.showProcessing&&$.isProcessing(i.table,!0),s.on("ajaxError"+o,function(e,a,t,r){C.renderAjax(null,i,a,t,r),s.off("ajaxError"+o)}),r=++g.ajaxCounter,g.last.ajaxUrl=e,g.ajaxObject.url=e,g.ajaxObject.success=function(e,a,t){r> Ajax initialized",g.ajaxObject),S.ajax(g.ajaxObject))},getAjaxUrl:function(e){var a,t,r=e.pager,i=e.widgetOptions,s=i.pager_ajaxUrl?i.pager_ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(e,a){return r.page+(a?parseInt(a,10):0)}).replace(/\{size\}/g,r.size):"",o=e.sortList,g=r.currentFilters||e.$table.data("lastSearch")||[],n=s.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),l=s.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),p=[];if(n){for(n=n[1],t=o.length,a=0;a> Ajax url = "+s),s},renderTable:function(e,a){var t,r,i,s,o=e.table,g=e.pager,n=e.widgetOptions,l=$.debug(e,"pager"),p=e.$table.hasClass("hasFilters"),d=a&&a.length||0,c="all"===g.size?g.totalRows:g.size,f=g.page*c;if(d<1)l&&console.warn("Pager >> No rows for pager to render");else{if(g.page>=g.totalPages)return C.moveToLastPage(e,g);if(g.cacheIndex=[],g.isDisabled=!1,g.initialized&&(l&&console.log("Pager >> Triggering pagerChange"),e.$table.triggerHandler("pagerChange",e)),n.pager_removeRows){for($.clearTableBody(o),t=$.processTbody(o,e.$tbodies.eq(0),!0),i=r=p?0:f,s=0;s> Triggering updateComplete"),e.$table.triggerHandler("updateComplete",[o,!0]))}},showAllRows:function(e){var a,t,r,i=e.table,s=e.pager,o=e.widgetOptions;for(s.ajax?C.pagerArrows(e,!0):(S.data(i,"pagerLastPage",s.page),S.data(i,"pagerLastSize",s.size),s.page=0,s.size=s.totalRows,s.totalPages=1,e.$table.addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),C.renderTable(e,e.rowsCopy),s.isDisabled=!0,$.applyWidget(i),$.debug(e,"pager")&&console.log("Pager >> Disabled")),r=(t=s.$container.find(o.pager_selectors.pageSize+","+o.pager_selectors.gotoPage+",.ts-startRow, .ts-page")).length,a=0;a> Changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(e.sortList||[]).join(","),totalRows:a.totalRows,currentFilters:a.currentFilters||[],ajaxUrl:a.ajaxObject.url||"",optAjaxUrl:s.pager_ajaxUrl},a.ajax?s.pager_processAjaxOnInit||S.isEmptyObject(s.pager_initialRows)?C.getAjax(e):(s.pager_processAjaxOnInit=!0,r=s.pager_initialRows,a.totalRows=void 0!==r.total?r.total:g&&console.error("Pager >> No initial total page set!")||0,a.filteredRows=void 0!==r.filtered?r.filtered:g&&console.error("Pager >> No initial filtered page set!")||0,C.updatePageDisplay(e,!1)):a.ajax||C.renderTable(e,e.rowsCopy),S.data(i,"pagerLastPage",a.page),a.initialized&&!1!==t&&(g&&console.log("Pager >> Triggering pageMoved"),e.$table.triggerHandler("pageMoved",e),$.applyWidget(i),!a.ajax&&i.isUpdating&&(g&&console.log("Pager >> Triggering updateComplete"),e.$table.triggerHandler("updateComplete",[i,!0])))))}},getTotalPages:function(e,a){return $.hasWidget(e.table,"filter")?Math.min(a.totalPages,a.filteredPages):a.totalPages},parsePageNumber:function(e,a){var t=C.getTotalPages(e,a)-1;return a.page=parseInt(a.page,10),(a.page<0||isNaN(a.page))&&(a.page=0),a.page>t&&0<=t&&(a.page=t),a.page},parsePageSize:function(e,a,t){var r=e.pager,i=e.widgetOptions,s=parseInt(a,10)||r.size||i.pager_size||10;return r.initialized&&(/all/i.test(s+" "+a)||s===r.totalRows)?r.$container.find(i.pager_selectors.pageSize+' option[value="all"]').length?"all":r.totalRows:"get"===t?s:r.size},setPageSize:function(e,a){var t=e.pager,r=e.table;t.size=C.parsePageSize(e,a,"get"),t.$container.find(e.widgetOptions.pager_selectors.pageSize).val(t.size),S.data(r,"pagerLastPage",C.parsePageNumber(e,t)),S.data(r,"pagerLastSize",t.size),t.totalPages="all"===t.size?1:Math.ceil(t.totalRows/t.size),t.filteredPages="all"===t.size?1:Math.ceil(t.filteredRows/t.size)},moveToFirstPage:function(e,a){a.page=0,C.moveToPage(e,a,!0)},moveToLastPage:function(e,a){a.page=C.getTotalPages(e,a)-1,C.moveToPage(e,a,!0)},moveToNextPage:function(e,a){a.page++;var t=C.getTotalPages(e,a)-1;a.page>=t&&(a.page=t),C.moveToPage(e,a,!0)},moveToPrevPage:function(e,a){a.page--,a.page<=0&&(a.page=0),C.moveToPage(e,a,!0)},destroyPager:function(e,a){var t=e.table,r=e.pager,i=e.widgetOptions.pager_selectors||{},s=[i.first,i.prev,i.next,i.last,i.gotoPage,i.pageSize].join(","),o=e.namespace+"pager";if(r){if(r.initialized=!1,e.$table.off(o),r.$container.hide().find(s).off(o),a)return;e.appender=null,C.showAllRows(e),$.storage&&$.storage(t,e.widgetOptions.pager_storageKey,""),r.$container=null,e.pager=null,e.rowsCopy=null}},enablePager:function(e,a){var t,r,i=e.table,s=e.pager,o=e.widgetOptions,g=s.$container.find(o.pager_selectors.pageSize);s.isDisabled=!1,s.page=S.data(i,"pagerLastPage")||s.page||0,r=g.find("option[selected]").val(),s.size=S.data(i,"pagerLastSize")||C.parsePageSize(e,r,"get"),C.setPageSize(e,s.size),s.totalPages="all"===s.size?1:Math.ceil(C.getTotalPages(e,s)/s.size),e.$table.removeClass("pagerDisabled"),i.id&&!e.$table.attr("aria-describedby")&&((t=(g=s.$container.find(o.pager_selectors.pageDisplay)).attr("id"))||(t=i.id+"_pager_info",g.attr("id",t)),e.$table.attr("aria-describedby",t)),C.changeHeight(e),a&&($.update(e),C.setPageSize(e,s.size),C.moveToPage(e,s,!0),C.hideRowsSetup(e),$.debug(e,"pager")&&console.log("Pager >> Enabled"))},appender:function(e,a){var t=e.config,r=t.widgetOptions,i=t.pager;i.ajax?C.moveToPage(t,i,!0):(t.rowsCopy=a,i.totalRows=r.pager_countChildRows?t.$tbodies.eq(0).children("tr").length:a.length,i.size=S.data(e,"pagerLastSize")||i.size||r.pager_size||i.setSize||10,i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),C.moveToPage(t,i),C.updatePageDisplay(t,!1))}},$.showError=function(e,a,t,r){var i=S(e),s=i[0].config,o=s&&s.widgetOptions,g=s.pager&&s.pager.cssErrorRow||o&&o.pager_css&&o.pager_css.errorRow||"tablesorter-errorRow",n=typeof a,l=!0,p="",d=function(){s.$table.find("thead").find(s.selectorRemove).remove()};if(i.length){if("function"==typeof s.pager.ajaxError){if(!1===(l=s.pager.ajaxError(s,a,t,r)))return d();p=l}else if("function"==typeof o.pager_ajaxError){if(!1===(l=o.pager_ajaxError(s,a,t,r)))return d();p=l}if(""===p)if("object"===n)p=0===a.status?"Not connected, verify Network":404===a.status?"Requested page not found [404]":500===a.status?"Internal Server Error [500]":"parsererror"===r?"Requested JSON parse failed":"timeout"===r?"Time out error":"abort"===r?"Ajax Request aborted":"Uncaught error: "+a.statusText+" ["+a.status+"]";else{if("string"!==n)return d();p=a}S(/tr\>/.test(p)?p:''+p+"").click(function(){S(this).remove()}).appendTo(s.$table.find("thead:first")).addClass(g+" "+s.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}else console.error("tablesorter showError: no table parameter passed")}}(jQuery);return jQuery;})); +!function(S){"use strict";var C,$=S.tablesorter;$.addWidget({id:"pager",priority:55,options:{pager_output:"{startRow} to {endRow} of {totalRows} rows",pager_updateArrows:!0,pager_startPage:0,pager_pageReset:0,pager_size:10,pager_maxOptionSize:20,pager_savePages:!0,pager_storageKey:"tablesorter-pager",pager_fixedHeight:!1,pager_countChildRows:!1,pager_removeRows:!1,pager_ajaxUrl:null,pager_customAjaxUrl:function(e,a){return a},pager_ajaxError:null,pager_ajaxObject:{dataType:"json"},pager_processAjaxOnInit:!0,pager_ajaxProcessing:function(e){return e},pager_css:{container:"tablesorter-pager",errorRow:"tablesorter-errorRow",disabled:"disabled"},pager_selectors:{container:".pager",first:".first",prev:".prev",next:".next",last:".last",gotoPage:".gotoPage",pageDisplay:".pagedisplay",pageSize:".pagesize"}},init:function(e){C.init(e)},format:function(e,a){if(!a.pager||!a.pager.initialized)return C.initComplete(a);C.moveToPage(a,a.pager,!1)},remove:function(e,a,t,r){C.destroyPager(a,r)}}),C=$.pager={init:function(e){if(!(e.hasInitialized&&e.config.pager&&e.config.pager.initialized)){var a,t=e.config,r=t.widgetOptions,i=r.pager_selectors,s=t.pager=S.extend({totalPages:0,filteredRows:0,filteredPages:0,currentFilters:[],page:r.pager_startPage,startRow:0,endRow:0,ajaxCounter:0,$size:null,last:{},setSize:r.pager_size,setPage:r.pager_startPage},t.pager);s.removeRows=r.pager_removeRows,s.isInitializing||(s.isInitializing=!0,$.debug(t,"pager")&&console.log("Pager >> Initializing"),s.size=S.data(e,"pagerLastSize")||r.pager_size,s.$container=S(i.container).addClass(r.pager_css.container).show(),s.totalRows=t.$tbodies.eq(0).children("tr").not(r.pager_countChildRows?"":"."+t.cssChildRow).length,s.oldAjaxSuccess=s.oldAjaxSuccess||r.pager_ajaxObject.success,t.appender=C.appender,s.initializing=!0,r.pager_savePages&&$.storage&&(a=$.storage(e,r.pager_storageKey)||{},s.page=(isNaN(a.page)?s.page:a.page)||s.setPage||0,s.size="all"===a.size?a.size:(isNaN(a.size)?s.size:a.size)||s.setSize||10,C.setPageSize(t,s.size)),s.regexRows=new RegExp("("+(r.filter_filteredRow||"filtered")+"|"+t.selectorRemove.slice(1)+"|"+t.cssChildRow+")"),s.regexFiltered=new RegExp(r.filter_filteredRow||"filtered"),s.initialized=!1,t.$table.triggerHandler("pagerBeforeInitialized",t),C.enablePager(t,!1),s.ajaxObject=r.pager_ajaxObject,s.ajaxObject.url=r.pager_ajaxUrl,"string"==typeof r.pager_ajaxUrl?(s.ajax=!0,r.filter_serversideFiltering=!0,t.serverSideSorting=!0,C.moveToPage(t,s)):(s.ajax=!1,$.appendCache(t,!0)))}},initComplete:function(e){var a=e.pager;C.bindEvents(e),a.ajax||C.hideRowsSetup(e),a.initialized=!0,a.initializing=!1,a.isInitializing=!1,C.setPageSize(e,a.size),$.debug(e,"pager")&&console.log("Pager >> Triggering pagerInitialized"),e.$table.triggerHandler("pagerInitialized",e),e.widgetOptions.filter_initialized&&$.hasWidget(e.table,"filter")||C.updatePageDisplay(e,!a.ajax)},bindEvents:function(i){var s,o,e,g=i.pager,n=i.widgetOptions,a=i.namespace+"pager",t=n.pager_selectors,r=$.debug(i,"pager");i.$table.off(a).on("filterInit filterStart ".split(" ").join(a+" "),function(e,a){var t;if(g.currentFilters=S.isArray(a)?a:i.$table.data("lastSearch"),g.ajax&&"filterInit"===e.type)return C.moveToPage(i,g,!1);t=$.filter.equalFilters?$.filter.equalFilters(i,i.lastSearch,g.currentFilters):(i.lastSearch||[]).join("")!==(g.currentFilters||[]).join(""),"filterStart"!==e.type||!1===n.pager_pageReset||t||(g.page=n.pager_pageReset)}).on("filterEnd sortEnd ".split(" ").join(a+" "),function(){g.currentFilters=i.$table.data("lastSearch"),(g.initialized||g.initializing)&&(i.delayInit&&i.rowsCopy&&0===i.rowsCopy.length&&C.updateCache(i),C.updatePageDisplay(i,!1),$.applyWidget(i.table))}).on("disablePager"+a,function(e){e.stopPropagation(),C.showAllRows(i)}).on("enablePager"+a,function(e){e.stopPropagation(),C.enablePager(i,!0)}).on("destroyPager"+a,function(e){e.stopPropagation(),$.removeWidget(i.table,"pager",!1)}).on("updateComplete"+a,function(e,a,t){if(e.stopPropagation(),a&&!t&&!g.ajax){var r=i.$tbodies.eq(0).children("tr").not(i.selectorRemove);g.totalRows=r.length-(n.pager_countChildRows?0:r.filter("."+i.cssChildRow).length),g.totalPages="all"===g.size?1:Math.ceil(g.totalRows/g.size),r.length&&i.rowsCopy&&0===i.rowsCopy.length&&C.updateCache(i),g.page>=g.totalPages&&C.moveToLastPage(i,g),C.hideRows(i),C.changeHeight(i),C.updatePageDisplay(i,!1),$.applyWidget(a),C.updatePageDisplay(i)}}).on("pageSize refreshComplete ".split(" ").join(a+" "),function(e,a){e.stopPropagation(),C.setPageSize(i,C.parsePageSize(i,a,"get")),C.moveToPage(i,g,!0),C.hideRows(i),C.updatePageDisplay(i,!1)}).on("pageSet pagerUpdate ".split(" ").join(a+" "),function(e,a){e.stopPropagation(),"pagerUpdate"===e.type&&(a=void 0===a?g.page+1:a,g.last.page=!0),g.page=(parseInt(a,10)||1)-1,C.moveToPage(i,g,!0),C.updatePageDisplay(i,!1)}).on("pageAndSize"+a,function(e,a,t){e.stopPropagation(),g.page=(parseInt(a,10)||1)-1,C.setPageSize(i,C.parsePageSize(i,t,"get")),C.moveToPage(i,g,!0),C.hideRows(i),C.updatePageDisplay(i,!1)}),s=[t.first,t.prev,t.next,t.last],o=["moveToFirstPage","moveToPrevPage","moveToNextPage","moveToLastPage"],r&&!g.$container.length&&console.warn('Pager >> "container" not found'),g.$container.find(s.join(",")).attr("tabindex",0).off("click"+a).on("click"+a,function(e){e.stopPropagation();var a,t=S(this),r=s.length;if(!t.hasClass(n.pager_css.disabled))for(a=0;a> "goto" selector not found'),(e=g.$container.find(n.pager_selectors.pageSize)).length?(e.find("option").removeAttr("selected"),e.off("change"+a).on("change"+a,function(){if(!S(this).hasClass(n.pager_css.disabled)){var e=S(this).val();g.$container.find(n.pager_selectors.pageSize).val(e),C.setPageSize(i,e),C.moveToPage(i,g,!0),C.changeHeight(i)}return!1})):r&&console.warn('Pager >> "size" selector not found')},pagerArrows:function(e,a){var t=e.pager,r=!!a,i=r||0===t.page,s=C.getTotalPages(e,t),o=r||t.page===s-1||0===s,g=e.widgetOptions,n=g.pager_selectors;g.pager_updateArrows&&(t.$container.find(n.first+","+n.prev).toggleClass(g.pager_css.disabled,i).prop("aria-disabled",i),t.$container.find(n.next+","+n.last).toggleClass(g.pager_css.disabled,o).prop("aria-disabled",o))},calcFilters:function(e){var a,t,r,i=e.widgetOptions,s=e.pager,o=e.$table.hasClass("hasFilters");if(o&&!s.ajax)if(S.isEmptyObject(e.cache))s.filteredRows=s.totalRows=e.$tbodies.eq(0).children("tr").not(i.pager_countChildRows?"":"."+e.cssChildRow).length;else for(s.filteredRows=0,r=(a=e.cache[0].normalized).length,t=0;td.filteredRows&&e,d.page=r?p.pager_pageReset||0:d.page,d.startRow=r?f*d.page+1:0===d.filteredRows?0:f*d.page+1,d.endRow=Math.min(d.filteredRows,d.totalRows,f*(d.page+1)),i=d.$container.find(p.pager_selectors.pageDisplay),a="function"==typeof p.pager_output?p.pager_output(l,d):(n=i.attr("data-pager-output"+(d.filteredRows'):1'+s[o]+"";d.$container.find(p.pager_selectors.gotoPage).html(r).val(d.page+1)}i.length&&(i["INPUT"===i[0].nodeName?"val":"html"](a),i.find(".ts-startRow, .ts-page").off("change"+c).on("change"+c,function(){var e=S(this).val(),a=S(this).hasClass("ts-startRow")?Math.floor(e/f)+1:e;t.$table.triggerHandler("pageSet"+c,[a])}))}C.pagerArrows(t),C.fixHeight(t),d.initialized&&!1!==e&&($.debug(t,"pager")&&console.log("Pager >> Triggering pagerComplete"),t.$table.triggerHandler("pagerComplete",t),p.pager_savePages&&$.storage&&$.storage(l,p.pager_storageKey,{page:d.page,size:f===d.totalRows?"all":f}))}},buildPageSelect:function(e,a){var t,r,i,s,o,g,n=e.widgetOptions,l=C.getTotalPages(e,a)||1,p=5*Math.ceil(l/n.pager_maxOptionSize/5),d=l>n.pager_maxOptionSize,c=a.page+1,f=p,u=l-p,h=[1];for(t=d?p:1;t<=l;)h[h.length]=t,t+=d?p:1;if(h[h.length]=l,d){for(i=[],(f=c-(r=Math.max(Math.floor(n.pager_maxOptionSize/p)-1,5)))<1&&(f=1),l<(u=c+r)&&(u=l),t=f;t<=u;t++)i[i.length]=t;p/2<(o=(h=S.grep(h,function(e,a){return S.inArray(e,h)===a})).length)-(g=i.length)&&o+g>n.pager_maxOptionSize&&(s=Math.floor(o/2)-Math.floor(g/2),Array.prototype.splice.apply(h,[s,g])),h=h.concat(i)}return h=S.grep(h,function(e,a){return S.inArray(e,h)===a}).sort(function(e,a){return e-a})},fixHeight:function(e){var a,t,r,i=e.table,s=e.pager,o=e.widgetOptions,g=e.$tbodies.eq(0);g.find("tr.pagerSavedHeightSpacer").remove(),o.pager_fixedHeight&&!s.isDisabled&&(t=S.data(i,"pagerSavedHeight"))&&(r=0,1'))},changeHeight:function(e){var a,t=e.table,r=e.pager,i="all"===r.size?r.totalRows:r.size,s=e.$tbodies.eq(0);s.find("tr.pagerSavedHeightSpacer").remove(),s.children("tr:visible").length||s.append(' '),a=s.children("tr").eq(0).height()*i,S.data(t,"pagerSavedHeight",a),C.fixHeight(e),S.data(t,"pagerLastSize",r.size)},hideRows:function(e){if(!e.widgetOptions.pager_ajaxUrl){var a,t,r,i,s,o=e.pager,g=e.widgetOptions,n=e.$tbodies.length,l="all"===o.size?o.totalRows:o.size,p=o.page*l,d=p+l,c=0,f=0;for(o.cacheIndex=[],a=0;a> Ajax Error",t,r,i),$.showError(s,t,r,i),a.$tbodies.eq(0).children("tr").detach(),o.totalRows=0;else{if(S.isArray(y)?(v=y[(d=isNaN(y[0])&&!isNaN(y[1]))?1:0],o.totalRows=isNaN(v)?o.totalRows||0:v,a.totalRows=a.filteredRows=o.filteredRows=o.totalRows,z=0===o.totalRows?[]:y[d?0:1]||[],b=y[2]):(o.ajaxData=y,a.totalRows=o.totalRows=y.total,a.filteredRows=o.filteredRows=void 0!==y.filteredRows?y.filteredRows:y.total,b=y.headers,z=y.rows||[]),R=z&&z.length,z instanceof S)g.pager_processAjaxOnInit&&(a.$tbodies.eq(0).empty(),a.$tbodies.eq(0).append(z));else if(R){for(l=0;l",p=0;p"+z[l][p]+"";_+=""}g.pager_processAjaxOnInit&&a.$tbodies.eq(0).html(_)}if(g.pager_processAjaxOnInit=!0,b){for(u=(c=j.hasClass("hasStickyHeaders"))?g.$sticky.children("thead:first").children("tr:not(."+a.cssIgnoreRow+")").children():"",f=j.find("tfoot tr:first").children(),m=(h=a.$headers.filter("th")).length,p=0;p> Triggering pagerChange"),j.triggerHandler("pagerChange",o),$.applyWidget(s),C.updatePageDisplay(a)},0)})}o.initialized||$.applyWidget(s)},getAjax:function(i){var r,e=C.getAjaxUrl(i),s=S(document),o=i.namespace+"pager",g=i.pager;""!==e&&(i.showProcessing&&$.isProcessing(i.table,!0),s.on("ajaxError"+o,function(e,a,t,r){C.renderAjax(null,i,a,t,r),s.off("ajaxError"+o)}),r=++g.ajaxCounter,g.last.ajaxUrl=e,g.ajaxObject.url=e,g.ajaxObject.success=function(e,a,t){r> Ajax initialized",g.ajaxObject),S.ajax(g.ajaxObject))},getAjaxUrl:function(e){var a,t,r=e.pager,i=e.widgetOptions,s=i.pager_ajaxUrl?i.pager_ajaxUrl.replace(/\{page([\-+]\d+)?\}/,function(e,a){return r.page+(a?parseInt(a,10):0)}).replace(/\{size\}/g,r.size):"",o=e.sortList,g=r.currentFilters||e.$table.data("lastSearch")||[],n=s.match(/\{\s*sort(?:List)?\s*:\s*(\w*)\s*\}/),l=s.match(/\{\s*filter(?:List)?\s*:\s*(\w*)\s*\}/),p=[];if(n){for(n=n[1],t=o.length,a=0;a> Ajax url = "+s),s},renderTable:function(e,a){var t,r,i,s,o=e.table,g=e.pager,n=e.widgetOptions,l=$.debug(e,"pager"),p=e.$table.hasClass("hasFilters"),d=a&&a.length||0,c="all"===g.size?g.totalRows:g.size,f=g.page*c;if(d<1)l&&console.warn("Pager >> No rows for pager to render");else{if(g.page>=g.totalPages)return C.moveToLastPage(e,g);if(g.cacheIndex=[],g.isDisabled=!1,g.initialized&&(l&&console.log("Pager >> Triggering pagerChange"),e.$table.triggerHandler("pagerChange",e)),n.pager_removeRows){for($.clearTableBody(o),t=$.processTbody(o,e.$tbodies.eq(0),!0),i=r=p?0:f,s=0;s> Triggering updateComplete"),e.$table.triggerHandler("updateComplete",[o,!0]))}},showAllRows:function(e){var a,t,r,i=e.table,s=e.pager,o=e.widgetOptions;for(s.ajax?C.pagerArrows(e,!0):(S.data(i,"pagerLastPage",s.page),S.data(i,"pagerLastSize",s.size),s.page=0,s.size=s.totalRows,s.totalPages=1,e.$table.addClass("pagerDisabled").removeAttr("aria-describedby").find("tr.pagerSavedHeightSpacer").remove(),C.renderTable(e,e.rowsCopy),s.isDisabled=!0,$.applyWidget(i),$.debug(e,"pager")&&console.log("Pager >> Disabled")),r=(t=s.$container.find(o.pager_selectors.pageSize+","+o.pager_selectors.gotoPage+",.ts-startRow, .ts-page")).length,a=0;a> Changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(e.sortList||[]).join(","),totalRows:a.totalRows,currentFilters:a.currentFilters||[],ajaxUrl:a.ajaxObject.url||"",optAjaxUrl:s.pager_ajaxUrl},a.ajax?s.pager_processAjaxOnInit||S.isEmptyObject(s.pager_initialRows)?C.getAjax(e):(s.pager_processAjaxOnInit=!0,r=s.pager_initialRows,a.totalRows=void 0!==r.total?r.total:g&&console.error("Pager >> No initial total page set!")||0,a.filteredRows=void 0!==r.filtered?r.filtered:g&&console.error("Pager >> No initial filtered page set!")||0,C.updatePageDisplay(e,!1)):a.ajax||C.renderTable(e,e.rowsCopy),S.data(i,"pagerLastPage",a.page),a.initialized&&!1!==t&&(g&&console.log("Pager >> Triggering pageMoved"),e.$table.triggerHandler("pageMoved",e),$.applyWidget(i),!a.ajax&&i.isUpdating&&(g&&console.log("Pager >> Triggering updateComplete"),e.$table.triggerHandler("updateComplete",[i,!0])))))}},getTotalPages:function(e,a){return $.hasWidget(e.table,"filter")?Math.min(a.totalPages,a.filteredPages):a.totalPages},parsePageNumber:function(e,a){var t=C.getTotalPages(e,a)-1;return a.page=parseInt(a.page,10),(a.page<0||isNaN(a.page))&&(a.page=0),a.page>t&&0<=t&&(a.page=t),a.page},parsePageSize:function(e,a,t){var r=e.pager,i=e.widgetOptions,s=parseInt(a,10)||r.size||i.pager_size||10;return r.initialized&&(/all/i.test(s+" "+a)||s===r.totalRows)?r.$container.find(i.pager_selectors.pageSize+' option[value="all"]').length?"all":r.totalRows:"get"===t?s:r.size},setPageSize:function(e,a){var t=e.pager,r=e.table;t.size=C.parsePageSize(e,a,"get"),t.$container.find(e.widgetOptions.pager_selectors.pageSize).val(t.size),S.data(r,"pagerLastPage",C.parsePageNumber(e,t)),S.data(r,"pagerLastSize",t.size),t.totalPages="all"===t.size?1:Math.ceil(t.totalRows/t.size),t.filteredPages="all"===t.size?1:Math.ceil(t.filteredRows/t.size)},moveToFirstPage:function(e,a){a.page=0,C.moveToPage(e,a,!0)},moveToLastPage:function(e,a){a.page=C.getTotalPages(e,a)-1,C.moveToPage(e,a,!0)},moveToNextPage:function(e,a){a.page++;var t=C.getTotalPages(e,a)-1;a.page>=t&&(a.page=t),C.moveToPage(e,a,!0)},moveToPrevPage:function(e,a){a.page--,a.page<=0&&(a.page=0),C.moveToPage(e,a,!0)},destroyPager:function(e,a){var t=e.table,r=e.pager,i=e.widgetOptions.pager_selectors||{},s=[i.first,i.prev,i.next,i.last,i.gotoPage,i.pageSize].join(","),o=e.namespace+"pager";if(r){if(r.initialized=!1,e.$table.off(o),r.$container.hide().find(s).off(o),a)return;e.appender=null,C.showAllRows(e),$.storage&&$.storage(t,e.widgetOptions.pager_storageKey,""),r.$container=null,e.pager=null,e.rowsCopy=null}},enablePager:function(e,a){var t,r,i=e.table,s=e.pager,o=e.widgetOptions,g=s.$container.find(o.pager_selectors.pageSize);s.isDisabled=!1,s.page=S.data(i,"pagerLastPage")||s.page||0,r=g.find("option[selected]").val(),s.size=S.data(i,"pagerLastSize")||C.parsePageSize(e,r,"get"),C.setPageSize(e,s.size),s.totalPages="all"===s.size?1:Math.ceil(C.getTotalPages(e,s)/s.size),e.$table.removeClass("pagerDisabled"),i.id&&!e.$table.attr("aria-describedby")&&((t=(g=s.$container.find(o.pager_selectors.pageDisplay)).attr("id"))||(t=i.id+"_pager_info",g.attr("id",t)),e.$table.attr("aria-describedby",t)),C.changeHeight(e),a&&($.update(e),C.setPageSize(e,s.size),C.moveToPage(e,s,!0),C.hideRowsSetup(e),$.debug(e,"pager")&&console.log("Pager >> Enabled"))},appender:function(e,a){var t=e.config,r=t.widgetOptions,i=t.pager;i.ajax?C.moveToPage(t,i,!0):(t.rowsCopy=a,i.totalRows=r.pager_countChildRows?t.$tbodies.eq(0).children("tr").length:a.length,i.size=S.data(e,"pagerLastSize")||i.size||r.pager_size||i.setSize||10,i.totalPages="all"===i.size?1:Math.ceil(i.totalRows/i.size),C.moveToPage(t,i),C.updatePageDisplay(t,!1))}},$.showError=function(e,a,t,r){var i=S(e),s=i[0].config,o=s&&s.widgetOptions,g=s.pager&&s.pager.cssErrorRow||o&&o.pager_css&&o.pager_css.errorRow||"tablesorter-errorRow",n=typeof a,l=!0,p="",d=function(){s.$table.find("thead").find(s.selectorRemove).remove()};if(i.length){if("function"==typeof s.pager.ajaxError){if(!1===(l=s.pager.ajaxError(s,a,t,r)))return d();p=l}else if("function"==typeof o.pager_ajaxError){if(!1===(l=o.pager_ajaxError(s,a,t,r)))return d();p=l}if(""===p)if("object"===n)p=0===a.status?"Not connected, verify Network":404===a.status?"Requested page not found [404]":500===a.status?"Internal Server Error [500]":"parsererror"===r?"Requested JSON parse failed":"timeout"===r?"Time out error":"abort"===r?"Ajax Request aborted":"Uncaught error: "+a.statusText+" ["+a.status+"]";else{if("string"!==n)return d();p=a}S(/tr\>/.test(p)?p:''+p+"").click(function(){S(this).remove()}).appendTo(s.$table.find("thead:first")).addClass(g+" "+s.selectorRemove.slice(1)).attr({role:"alert","aria-live":"assertive"})}else console.error("tablesorter showError: no table parameter passed")}}(jQuery);return jQuery;})); diff --git a/dist/js/widgets/widget-sortTbodies.min.js b/dist/js/widgets/widget-sortTbodies.min.js index 719e6f25..f5711b32 100644 --- a/dist/js/widgets/widget-sortTbodies.min.js +++ b/dist/js/widgets/widget-sortTbodies.min.js @@ -5,4 +5,4 @@ * by Rob Garrison * Contributors: Chris Rogers */ -!function(x){"use strict";var q=x.tablesorter;q.sortTbodies={init:function(o,r){var t,e,s,n,i,d=o.namespace+"sortTbody",a=o.$table.children("tbody"),b=a.length;for(r.sortTbody_original_serverSideSorting=o.serverSideSorting,r.sortTbody_original_cssInfoBlock=o.cssInfoBlock,o.cssInfoBlock=r.sortTbody_noSort,q.sortTbodies.setTbodies(o,r),t=0;t'),v=o.parent().addClass(S.css.stickyHide).css({position:g.length?"absolute":"fixed",padding:parseInt(o.parent().parent().css("padding-left"),10),top:l+_,left:0,visibility:"hidden",zIndex:y.stickyHeaders_zIndex||2}),p=o.children("thead:first"),m="",f=function(e,s){var t,i,r,a,d,n=e.filter(":visible"),c=n.length;for(t=0;tt.top&&c thead:gt(0), tr.sticky-false").hide(),o.find("> tbody, > tfoot").remove(),o.find("caption").toggle(y.stickyHeaders_includeCaption),a=p.children().children(),o.css({height:0,width:0,margin:0}),a.find("."+S.css.resizer).remove(),k.addClass("hasStickyHeaders").bind("pagerComplete"+d,function(){C()}),S.bindEvents(e,p.children().children("."+S.css.header)),y.stickyHeaders_appendTo?T(y.stickyHeaders_appendTo).append(v):k.after(v),t.onRenderHeader)for(i=(r=p.children("tr").children()).length,s=0;s'),v=o.parent().addClass(S.css.stickyHide).css({position:g.length?"absolute":"fixed",padding:parseInt(o.parent().parent().css("padding-left"),10),top:l+_,left:0,visibility:"hidden",zIndex:y.stickyHeaders_zIndex||2}),p=o.children("thead:first"),m="",f=function(e,s){var t,i,r,a,d,n=e.filter(":visible"),c=n.length;for(t=0;tt.top&&c thead:gt(0), tr.sticky-false").hide(),o.find("> tbody, > tfoot").remove(),o.find("caption").toggle(y.stickyHeaders_includeCaption),a=p.children().children(),o.css({height:0,width:0,margin:0}),a.find("."+S.css.resizer).remove(),k.addClass("hasStickyHeaders").bind("pagerComplete"+d,function(){C()}),S.bindEvents(e,p.children().children("."+S.css.header)),y.stickyHeaders_appendTo?T(y.stickyHeaders_appendTo).append(v):k.after(v),t.onRenderHeader)for(i=(r=p.children("tr").children()).length,s=0;s> Using",g?u:"cookies"),m.parseJSON&&(g?n=m.parseJSON(y[u][t]||"null")||{}:(a=O.cookie.split(/[;\s|=]/),n=0!==(s=m.inArray(t,a)+1)&&m.parseJSON(a[s]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return n&&n[f]?n[f][_]:"";n[f]||(n[f]={}),n[f][_]=r,g?y[u][t]=JSON.stringify(n):((i=new Date).setTime(i.getTime()+31536e6),O.cookie=t+"="+JSON.stringify(n).replace(/\"/g,'"')+"; expires="+i.toGMTString()+"; path=/")}}(jQuery,window,document);return jQuery;})); +!function(m,y,O){"use strict";var w=m.tablesorter||{};m.extend(!0,w.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),w.storage=function(e,t,r,o){var s,a,i,g=!1,n={},p=(e=m(e)[0]).config,l=p&&p.widgetOptions,d=w.debug(p,"storage"),u=(o&&o.storageType||l&&l.storage_storageType).toString().charAt(0).toLowerCase(),S=u?"":o&&o.useSessionStorage||l&&l.storage_useSessionStorage,c=m(e),_=o&&o.id||c.attr(o&&o.group||l&&l.storage_group||"data-table-group")||l&&l.storage_tableId||e.id||m(".tablesorter").index(c),f=o&&o.url||c.attr(o&&o.page||l&&l.storage_page||"data-table-page")||l&&l.storage_fixedUrl||p&&p.fixedUrl||y.location.pathname;if("c"!==u&&(u="s"===u||S?"sessionStorage":"localStorage")in y)try{y[u].setItem("_tmptest","temp"),g=!0,y[u].removeItem("_tmptest")}catch(e){console.warn(u+" is not supported in this browser")}if(d&&console.log("Storage >> Using",g?u:"cookies"),m.parseJSON&&(n=g?m.parseJSON(y[u][t]||"null")||{}:(a=O.cookie.split(/[;\s|=]/),0!==(s=m.inArray(t,a)+1)&&m.parseJSON(a[s]||"null")||{})),void 0===r||!y.JSON||!JSON.hasOwnProperty("stringify"))return n&&n[f]?n[f][_]:"";n[f]||(n[f]={}),n[f][_]=r,g?y[u][t]=JSON.stringify(n):((i=new Date).setTime(i.getTime()+31536e6),O.cookie=t+"="+JSON.stringify(n).replace(/\"/g,'"')+"; expires="+i.toGMTString()+"; path=/")}}(jQuery,window,document);return jQuery;})); diff --git a/js/jquery.tablesorter.combined.js b/js/jquery.tablesorter.combined.js index e1226a02..ceeaa2e8 100644 --- a/js/jquery.tablesorter.combined.js +++ b/js/jquery.tablesorter.combined.js @@ -4,10 +4,10 @@ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██ █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀ */ -/*! tablesorter (FORK) - updated 2018-08-27 (v2.31.0)*/ +/*! tablesorter (FORK) - updated 2018-11-20 (v2.31.1)*/ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery) { -/*! TableSorter (FORK) v2.31.0 *//* +/*! TableSorter (FORK) v2.31.1 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -31,7 +31,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.31.0', + version : '2.31.1', parsers : [], widgets : [], @@ -328,6 +328,8 @@ ts.applyWidget( table, true ); // if user has supplied a sort list to constructor if ( c.sortList.length > 0 ) { + // save sortList before any sortAppend is added + c.last.sortList = c.sortList; ts.sortOn( c, c.sortList, {}, !c.initWidgets ); } else { ts.setHeadersCss( c ); diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 14ce1b61..e0724731 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1,4 +1,4 @@ -/*! TableSorter (FORK) v2.31.0 *//* +/*! TableSorter (FORK) v2.31.1 *//* * Client-side table sorting with ease! * @requires jQuery v1.2.6+ * @@ -22,7 +22,7 @@ 'use strict'; var ts = $.tablesorter = { - version : '2.31.0', + version : '2.31.1', parsers : [], widgets : [], diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 8f3edf2e..5955f8c9 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -4,7 +4,7 @@ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██ █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀ */ -/*! tablesorter (FORK) - updated 2018-08-27 (v2.31.0)*/ +/*! tablesorter (FORK) - updated 2018-11-20 (v2.31.1)*/ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ (function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery) { /*! Widget: storage - updated 2018-03-18 (v2.30.0) */ diff --git a/package.json b/package.json index 155d4458..4d5786d8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tablesorter", "title": "tablesorter", - "version": "2.31.0", + "version": "2.31.1", "description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.", "author": { "name": "Christian Bach", diff --git a/tablesorter.jquery.json b/tablesorter.jquery.json index 8a44b495..0c0733cf 100644 --- a/tablesorter.jquery.json +++ b/tablesorter.jquery.json @@ -1,7 +1,7 @@ { "name": "tablesorter", "title": "tablesorter", - "version": "2.31.0", + "version": "2.31.1", "description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.", "author": { "name": "Christian Bach",