!function(e){"use strict";vart=e.tablesorter,o=t.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(t,l,a){varn,c;(n=e(a.columnSelector_layout)).find("input").add(n.filter("input")).length?(l.$table.addClass(l.namespace.slice(1)+"columnselector"),(c=l.selector={$container:e(a.columnSelector_container||"<div>")}).$style=e("<style></style>").prop("disabled",!0).appendTo("head"),c.$breakpoints=e("<style></style>").prop("disabled",!0).appendTo("head"),c.isInitializing=!0,o.setUpColspan(l,a),o.setupSelector(l,a),a.columnSelector_mediaquery&&o.setupBreakpoints(l,a),c.isInitializing=!1,c.$container.length?o.updateCols(l,a):l.debug&&console.warn("ColumnSelector: >> container not found"),l.$table.off("refreshColumnSelector.tscolsel").on("refreshColumnSelector.tscolsel",function(e,t,l){o.refreshColumns(this.config,t,l)})):l.debug&&console.error("ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***")},refreshColumns:function(t,l,a){varn,c,r,s,u=t.selector,i=e.isArray(a||l),d=t.widgetOptions;if(void0!==l&&null!==l&&u.$container.length){if("selectors"===l&&(u.$container.empty(),o.setupSelector(t,d),o.setupBreakpoints(t,d),void0===a&&null!==a&&(a=u.auto)),i)for(c=a||l,e.each(c,function(e,t){c[e]=parseInt(t,10)}),n=0;n<t.columns;n++)s=e.inArray(n,c)>=0,(r=u.$container.find("input[data-column="+n+"]")).length&&(r.prop("checked",s),u.states[n]=s);s=!0===a||!0===l||"auto"===l&&!1!==a,r=u.$container.find('input[data-column="auto"]').prop("checked",s),o.updateAuto(t,d,r)}elseo.updateBreakpoints(t,d),o.updateCols(t,d);o.saveValues(t,d),o.adjustColspans(t,d)},setupSelector:function(l,a){varn,c,r,s,u,i,d,p=l.selector,m=p.$container,h=a.columnSelector_saveColumns&&t.storage,f=h?t.storage(l.table,"tablesorter-columnSelector"):[],S=h?t.storage(l.table,"tablesorter-columnSelector-auto"):{};for(p.auto=e.isEmptyObject(S)||"boolean"!==e.type(S.auto)?a.columnSelector_mediaqueryState:S.auto,p.states=[],p.$column=[],p.$wrapper=[],p.$checkbox=[],n=0;n<l.columns;n++)s=(r=l.$headerIndexed[n]).attr(a.columnSelector_priority)||1,i=r.attr("data-column"),u=t.getColumnData(l.table,l.headers,i),S=t.getData(r,u,"columnSelector"),isNaN(s)&&s.length>0||"disable"===S||a.columnSelector_columns[i]&&"disable"===a.columnSelector_columns[i]?p.states[i]=null:(p.states[i]=f&&void0!==f[i]&&null!==f[i]?f[i]:void0!==a.columnSelector_columns[i]&&null!==a.columnSelector_columns[i]?a.columnSelector_columns[i]:"true"===S||"false"!==S,p.$column[i]=e(this),m.length&&(c=r.attr(a.columnSelector_name)||r.text().trim(),"function"==typeofa.columnSelector_layoutCustomizer&&(d=r.find("."+t.css.headerIn),c=a.columnSelector_layoutCustomizer(d.length?d:r,c,parseInt(i,10))),p.$wrapper[i]=e(a.columnSelector_layout.replace(/\{name\}/g,c)).appendTo(m),p.$checkbox[i]=p.$wrapper[i].find("input").add(p.$wrapper[i].filter("input")).attr("data-column",i).toggleClass(a.columnSelector_cssChecked,p.states[i]).prop("checked",p.states[i]).on("change",function(){if(!p.isInitializing){vart=e(this).attr("data-column");if(!o.checkChange(l,this.checked))returnthis.checked=!this.checked,!1;l.selector.states[t]=this.checked,o.updateCols(l,a)}}).change()))},checkChange:function(e,t){for(varo=e.widgetOptions,l=o.columnSelector_maxVisible,a=o.columnSelector_minVisible,n=e.selector.states,c=n.length,r=0;c-->=0;)n[c]&&r++;return!(t&null!==l&&r>=l||!t&&null!==a&&r<=a)},setupBreakpoints:function(t,l){vara=t.selector;l.columnSelector_mediaquery&&(a.lastIndex=-1,o.updateBreakpoints(t,l),t.$table.off("updateAll.tscolsel").on("updateAll.tscolsel",function(){o.setupSelector(t,l),o.setupBreakpoints(t,l),o.updateBreakpoints(t,l),o.updateCols(t,l)})),a.$container.length&&(l.columnSelector_mediaquery&&(a.$auto=e(l.columnSelector_layout.replace(/\{name\}/g,l.columnSelector_mediaqueryName)).prependTo(a.$container),a.$auto.find("input").add(a.$auto.filter("input")).attr("data-column","auto").prop("checked",a.auto).toggleClass(l.columnSelector_cssChecked,a.a