/*!
SearchPanes 1.0.1
2019-2020 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.checkEs6ConformanceViaProxy=function(){try{var b={},m=Object.create(new $jscomp.global.Proxy(b,{get:function(k,h,f){return k==b&&"q"==h&&f==m}}));return!0===m.q}catch(k){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;
$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.arrayIteratorImpl=function(b){var m=0;return function(){return m").addClass(this.classes.buttonGroup),clear:$('').addClass(this.classes.dull).addClass(this.classes.paneButton).addClass(this.classes.clearButton),
container:$("
").addClass(this.classes.container).addClass(this.classes.layout+(7>d?c:c.split("-")[0]+"-6")),countButton:$('').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:$(""+(this.colExists?$(a.column(this.colExists?this.s.index:0).header()).text():this.customPaneSettings.header||"Custom Pane")+" | |
---|
"),lower:$("").addClass(this.classes.subRow2).addClass(this.classes.narrowButton),
nameButton:$('').addClass(this.classes.paneButton).addClass(this.classes.nameButton),searchBox:$("").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:$('').addClass(this.classes.paneButton),searchCont:$("").addClass(this.classes.searchCont),searchLabelCont:$("").addClass(this.classes.searchLabelCont),topRow:$("").addClass(this.classes.topRow),
upper:$("").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.displayed=!1;a=this.s.dt;this.selections=[];this.s.colOpts=this.colExists?this._getOptions():this._getBonusOptions();var l=this.s.colOpts;c=$('').addClass(this.classes.paneButton);$(c).text(a.i18n("searchPanes.clearPane","X"));this.dom.container.addClass(l.className);this.dom.container.addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?this.customPaneSettings.className:
"");$(e).append(this.dom.container);var q=a.table(0).node();this.s.searchFunction=function(a,c,d,e){if(0===n.selections.length||a.nTable!==q)return!0;a="";n.colExists&&(a=c[n.s.index],"filter"!==l.orthogonal.filter&&(a=n.s.rowData.filterMap.get(d),a instanceof $.fn.dataTable.Api&&(a=a.toArray())));return n._search(a,d)};$.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)$(c).on("click",function(){n.dom.container.find(n.classes.search).each(function(){$(this).val("");$(this).trigger("input")});
n.clearPane()});a.on("draw.dtsp",function(){n._adjustTopRow()});$(window).on("resize.dtsp",b.util.throttle(function(){n._adjustTopRow()}));a.on("column-reorder.dtsp",function(a,c,d){n.s.index=d.mapping[n.s.index]});return this}f.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map}};f.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();this.updateTable();return this};f.prototype.destroy=
function(){$(this.s.dtPane).off(".dtsp");$(this.s.dt).off(".dtsp");$(this.dom.nameButton).off(".dtsp");$(this.dom.countButton).off(".dtsp");$(this.dom.clear).off(".dtsp");$(this.dom.searchButton).off(".dtsp");$(this.dom.container).remove();for(var a=$.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==a;)$.fn.dataTable.ext.search.splice(a,1),a=$.fn.dataTable.ext.search.indexOf(this.s.searchFunction);void 0!==this.s.dtPane&&this.s.dtPane.destroy()};f.prototype.getPaneCount=function(){return void 0!==
this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:0};f.prototype.rebuildPane=function(){this.clearData();void 0!==this.s.dtPane&&this.s.dtPane.clear().destroy();this.dom.container.removeClass(this.classes.hidden);this.s.displayed=!1;this._buildPane();return this};f.prototype.removePane=function(){this.s.displayed=!1;$(this.dom.container).hide()};f.prototype.setCascadeRegen=function(a){this.s.cascadeRegen=a};f.prototype.setClear=function(a){this.s.clearing=a};f.prototype.updatePane=
function(a){void 0===a&&(a=!1);this.s.updating=!0;this._updateCommon(a);this.s.updating=!1};f.prototype.updateTable=function(){this.selections=this.s.dtPane.rows({selected:!0}).data().toArray();this._searchExtras();(this.c.cascadePanes||this.c.viewTotal)&&this.updatePane()};f.prototype._addOption=function(a,d,g,c,e,r){if(Array.isArray(a)||a instanceof b.Api)if(a instanceof b.Api&&(a=a.toArray(),d=d.toArray()),a.length===d.length)for(var f=0;f$(a[0]).width()||252>$(c[0]).width())&&0!==$(a[0]).width()?($(a[0]).addClass(this.classes.narrow),$(d[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),$(g[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):
($(a[0]).removeClass(this.classes.narrow),$(d[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch),$(g[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};f.prototype._buildPane=function(){var a=this;this.selections=[];var d=this.s.dt,g=d.column(this.colExists?this.s.index:0),c=this.s.colOpts,e=this.s.rowData,r=d.i18n("searchPanes.count","{total}"),f=d.i18n("searchPanes.countFiltered","{shown} ({total})"),l=d.state.loaded();if(this.colExists){var q=
-1;if(l&&l.searchPanes&&l.searchPanes.panes)for(var p=0;pthis.c.threshold:q>c.threshold)||!0!==c.show&&1>=p)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.c.viewTotal&&0===e.arrayTotals.length?this._detailsPane():e.binsTotal=e.bins;this.dom.container.addClass(this.classes.show)}this.s.displayed=
!0;this._displayPane();this.dom.dtP.on("stateLoadParams.dt",function(a,c,e){$.isEmptyObject(d.state.loaded())&&$.each(e,function(a,c){delete e[a]})});p=$.fn.dataTable.ext.errMode;$.fn.dataTable.ext.errMode="none";q=b.Scroller;this.s.dtPane=$(this.dom.dtP).DataTable($.extend(!0,{dom:"t",columnDefs:[{className:"dtsp-nameColumn",data:"display",render:function(d,e,g){if("sort"===e)return g.sort;if("type"===e)return g.type;var b;a.s.filteringActive&&a.c.viewTotal?b=f.replace(/{total}/,g.total):b=r.replace(/{total}/,
g.total);for(b=b.replace(/{shown}/,g.shown);-1!==b.indexOf("{total}");)b=b.replace(/{total}/,g.total);for(;-1!==b.indexOf("{shown}");)b=b.replace(/{shown}/,g.shown);e=''+b+"";if(a.c.hideCount||c.hideCount)e="";return a.c.dataLength?d.length>a.c.dataLength?''+d.substr(0,a.c.dataLength)+"..."+e:''+d+""+e:''+d+""+e},targets:0,type:void 0!==d.settings()[0].aoColumns[this.s.index]?
d.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+this.classes.badgePill,data:"total",targets:1,visible:!1}],deferRender:!0,info:!1,paging:q?!0:!1,scrollY:"200px",scroller:q?!0:!1,select:!0,stateSave:d.settings()[0].oFeatures.bStateSave?!0:!1},this.c.dtOpts,void 0!==c?c.dtOpts:{},null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts?this.customPaneSettings.dtOpts:{}));$(this.dom.dtP).addClass(this.classes.table);$(this.dom.searchBox).attr("placeholder",
void 0!==c.header?c.header:this.colExists?d.settings()[0].aoColumns[this.s.index].sTitle:this.customPaneSettings.header||"Custom Pane");$.fn.dataTable.select.init(this.s.dtPane);$.fn.dataTable.ext.errMode=p;if(this.colExists){g=(g=g.search())?g.substr(1,g.length-2).split("|"):[];var k=0;e.arrayFilter.forEach(function(a){""===a.filter&&k++});p=0;for(g=e.arrayFilter.length;pNo Data",hideCount:!1,layout:"columns-3",orderable:!0,orthogonal:{display:"display",hideCount:!1,search:"filter",show:void 0,sort:"sort",threshold:.6,type:"type"},preSelect:[],threshold:.6,viewTotal:!1};return f}(),k=$.fn.dataTable,h=function(){function b(a,d,g){var c=this;void 0===g&&(g=!1);this.regenerating=
!1;if(!k||!k.versionCheck||!k.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!k.select)throw Error("SearchPane requires Select");var e=new k.Api(a);this.classes=$.extend(!0,{},b.classes);this.c=$.extend(!0,{},b.defaults,d);this.dom={clearAll:$('').addClass(this.classes.clearAll),container:$("").addClass(this.classes.panes).text(e.i18n("searchPanes.loadMessage","Loading Search Panes...")),emptyMessage:$("").addClass(this.classes.emptyMessage),
options:$("").addClass(this.classes.container),panes:$("").addClass(this.classes.container),title:$("").addClass(this.classes.title),titleRow:$("").addClass(this.classes.titleRow),wrapper:$("")};this.s={colOpts:[],dt:e,filterPane:-1,panes:[],selectionList:[],updating:!1};e.settings()[0]._searchPanes=this;this.dom.clearAll.text(e.i18n("searchPanes.clearMessage","Clear All"));this._getState();if(this.s.dt.settings()[0]._bInitComplete||g)this._paneDeclare(e,a,d);else e.on("preInit.dt",
function(){c._paneDeclare(e,a,d)})}b.prototype.clearSelections=function(){this.dom.container.find(this.classes.search).each(function(){$(this).val("");$(this).trigger("input")});for(var a=[],d=0,b=this.s.panes;d=this.s.dt.page.info().recordsTotal?
this._startup(a):setTimeout(function(){d._startup(a)},100)};b.prototype._startup=function(a){var d=this;$(this.dom.container).text("");this._attachExtras();$(this.dom.container).append(this.dom.panes);for(var b=0,c=this.s.panes;b