1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-17 22:06:41 +02:00
TableFilter/dist/tablefilter.js
2015-04-06 18:45:46 +10:00

10 lines
125 KiB
JavaScript

/*------------------------------------------------------------------------
- TableFilter v3.0.0 by Max Guglielmi
- build date: Sat Apr 04 2015 19:15:47
- http://tablefilter.free.fr
- Copyright (c) 2014, Licensed under the MIT License
------------------------------------------------------------------------*/
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b:a.TableFilter=b()}(this,function(){function SortableTable(a,b){this.sortTypes=b||[],this.sortColumn=null,this.descending=null;var c=this;this._headerOnclick=function(a){c.headerOnclick(a)},a?(this.setTable(a),this.document=a.ownerDocument||a.document):this.document=document;var d=this.document.defaultView||this.document.parentWindow;this._onunload=function(){c.destroy()},d&&"undefined"!=typeof d.attachEvent&&d.attachEvent("onunload",this._onunload)}var requirejs,require,define;return function(a){function b(a,b){return r.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=p.map,q=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,p.nodeIdCompat&&t.test(a[g])&&(a[g]=a[g].replace(t,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||q)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(b,c){return function(){var d=s.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),k.apply(a,d.concat([b,c]))}}function e(a){return function(b){return c(b,a)}}function f(a){return function(b){n[a]=b}}function g(c){if(b(o,c)){var d=o[c];delete o[c],q[c]=!0,j.apply(a,d)}if(!b(n,c)&&!b(q,c))throw new Error("No "+c);return n[c]}function h(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function i(a){return function(){return p&&p.config&&p.config[a]||{}}}var j,k,l,m,n={},o={},p={},q={},r=Object.prototype.hasOwnProperty,s=[].slice,t=/\.js$/;l=function(a,b){var d,f=h(a),i=f[0];return a=f[1],i&&(i=c(i,b),d=g(i)),i?a=d&&d.normalize?d.normalize(a,e(b)):c(a,b):(a=c(a,b),f=h(a),i=f[0],a=f[1],i&&(d=g(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},m={require:function(a){return d(a)},exports:function(a){var b=n[a];return"undefined"!=typeof b?b:n[a]={}},module:function(a){return{id:a,uri:"",exports:n[a],config:i(a)}}},j=function(c,e,h,i){var j,k,p,r,s,t,u=[],v=typeof h;if(i=i||c,"undefined"===v||"function"===v){for(e=!e.length&&h.length?["require","exports","module"]:e,s=0;s<e.length;s+=1)if(r=l(e[s],i),k=r.f,"require"===k)u[s]=m.require(c);else if("exports"===k)u[s]=m.exports(c),t=!0;else if("module"===k)j=u[s]=m.module(c);else if(b(n,k)||b(o,k)||b(q,k))u[s]=g(k);else{if(!r.p)throw new Error(c+" missing "+k);r.p.load(r.n,d(i,!0),f(k),{}),u[s]=n[k]}p=h?h.apply(n[c],u):void 0,c&&(j&&j.exports!==a&&j.exports!==n[c]?n[c]=j.exports:p===a&&t||(n[c]=p))}else c&&(n[c]=h)},requirejs=require=k=function(b,c,d,e,f){if("string"==typeof b)return m[b]?m[b](c):g(l(b,c).f);if(!b.splice){if(p=b,p.deps&&k(p.deps,p.callback),!c)return;c.splice?(b=c,c=d,d=null):b=a}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?j(a,b,c,d):setTimeout(function(){j(a,b,c,d)},4),k},k.config=function(a){return k(a)},requirejs._defined=n,define=function(a,c,d){c.splice||(d=c,c=[]),b(n,a)||b(o,a)||(o[a]=[a,c,d])},define.amd={jQuery:!0}}(),define("../libs/almond/almond",function(){}),define("event",["exports"],function(a){var b={add:function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},remove:function(a,b,c,d){a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener?a.removeEventListener(b,c,d):a["on"+b]=null},stop:function(a){a||(a=window.event),a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},cancel:function(a){a||(a=window.event),a.preventDefault?a.preventDefault():a.returnValue=!1}};a.Event=b}),define("dom",["exports"],function(a){function b(){return document.documentElement.classList}var c={};c.getText=function(a){var b=a.textContent||a.innerText||a.innerHTML.replace(/<[^<>]+>/g,"");return b=b.replace(/^\s+/,"").replace(/\s+$/,"")},c.create=function(a){if(a&&""!==a){var b=document.createElement(a),c=arguments;if(c.length>1)for(var d=0;d<c.length;d++){var e=typeof c[d];"object"===e.toLowerCase()&&2===c[d].length&&b.setAttribute(c[d][0],c[d][1])}return b}},c.text=function(a){return document.createTextNode(a)},c.position=function(a){var b=0,c=0;if(a&&a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a==a.offsetParent);return{left:b,top:c}},c.hasClass=function(a,c){return a?b()?a.classList.contains(c):a.className.match(new RegExp("(\\s|^)"+c+"(\\s|$)")):!1},c.addClass=function(a,c){return a?b()?void a.classList.add(c):void(""===a.className?a.className=c:this.hasClass(a,c)||(a.className+=" "+c)):void 0},c.removeClass=function(a,c){if(a){if(b())return void a.classList.remove(c);var d=new RegExp("(\\s|^)"+c+"(\\s|$)","g");a.className=a.className.replace(d,"")}},c.createOpt=function(a,b,c){var d=c?!0:!1,e=d?this.create("option",["value",b],["selected","true"]):this.create("option",["value",b]);return e.appendChild(this.text(a)),e},c.createCheckItem=function(a,b,c){var d=this.create("li"),e=this.create("label",["for",a]),f=this.create("input",["id",a],["name",a],["type","checkbox"],["value",b]);return e.appendChild(f),e.appendChild(this.text(c)),d.appendChild(e),d.label=e,d.check=f,d},c.id=function(a){return document.getElementById(a)},c.tag=function(a,b){return a.getElementsByTagName(b)},a.Dom=c}),define("string",["exports"],function(a){var b={};b.lower=function(a){return a.toLowerCase()},b.upper=function(a){return a.toUpperCase()},b.trim=function(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")},b.isEmpty=function(a){return""===this.trim(a)},b.rgxEsc=function(a){function b(b){var c=new RegExp("\\"+b,"g");a=a.replace(c,"\\"+b)}for(var c=["\\","[","^","$",".","|","?","*","+","(",")"],d=0;d<c.length;d++)b(c[d]);return a},b.matchCase=function(a,b){return b?a:this.lower(a)},a.Str=b}),define("cookie",["exports"],function(a){var b={};b.write=function(a,b,c){var d="";c&&(d=new Date((new Date).getTime()+36e5*c),d="; expires="+d.toGMTString()),document.cookie=a+"="+escape(b)+d},b.read=function(a){var b="",c=a+"=";if(document.cookie.length>0){var d=document.cookie,e=d.indexOf(c);if(-1!==e){e+=c.length;var f=d.indexOf(";",e);-1===f&&(f=d.length),b=unescape(d.substring(e,f))}}return b},b.remove=function(a){this.write(a,"",-1)},b.valueToArray=function(a,b){b||(b=",");var c=this.read(a),d=c.split(b);return d},b.getValueByIndex=function(a,b,c){c||(c=",");var d=this.valueToArray(a,c);return d[b]},a.Cookie=b}),define("types",["exports"],function(a){var b={},c=void 0;b.isObj=function(a){var b=!1;return"string"==typeof a?window[a]&&"object"==typeof window[a]&&(b=!0):a&&"object"==typeof a&&(b=!0),b},b.isFn=function(a){return a&&a.constructor==Function},b.isArray=function(a){return a&&a.constructor==Array},b.isUndef=function(a){return a===c},a.Types=b}),define("array",["exports","string"],function(a,b){var c=b.Str,d={has:function(a,b,d){for(var e=void 0===d?!1:d,f=0;f<a.length;f++)if(c.matchCase(a[f].toString(),e)==b)return!0;return!1},indexByValue:function(a,b,d){for(var e=void 0===d?!1:d,f=0;f<a.length;f++)if(c.matchCase(a[f].toString(),e)==b)return f;return-1}};a.Arr=d}),define("helpers",["exports","string"],function(a,b){var c=b.Str,d={isIE:function(){return/msie|MSIE/.test(navigator.userAgent)},removeNbFormat:function(a,b){if(a){b||(b="us");var d=a;return d="us"===c.lower(b)?+d.replace(/[^\d\.-]/g,""):+d.replace(/[^\d\,-]/g,"").replace(",",".")}}};a.Helpers=d}),define("date",["exports"],function(a){var b={isValid:function(a,b){if(b||(b="DMY"),b=b.toUpperCase(),3!=b.length&&"DDMMMYYYY"===b){var c=this.format(a,b);a=c.getDate()+"/"+(c.getMonth()+1)+"/"+c.getFullYear(),b="DMY"}(-1===b.indexOf("M")||-1===b.indexOf("D")||-1===b.indexOf("Y"))&&(b="DMY");var d,e;if("Y"==b.substring(0,1)?(d=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,e=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==b.substring(1,2)?(d=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,e=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(d=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,e=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),d.test(a)===!1&&e.test(a)===!1)return!1;var f,g,h,i=a.split(RegExp.$1);f="M"===b.substring(0,1)?i[0]:"M"===b.substring(1,2)?i[1]:i[2],g="D"===b.substring(0,1)?i[0]:"D"===b.substring(1,2)?i[1]:i[2],h="Y"===b.substring(0,1)?i[0]:"Y"===b.substring(1,2)?i[1]:i[2],parseInt(h,10)<=50&&(h=(parseInt(h,10)+2e3).toString()),parseInt(h,10)<=99&&(h=(parseInt(h,10)+1900).toString());var j=new Date(parseInt(h,10),parseInt(f,10)-1,parseInt(g,10),0,0,0,0);return parseInt(g,10)!=j.getDate()?!1:parseInt(f,10)-1!=j.getMonth()?!1:!0},format:function(a){var b=function(){return a.apply(this,arguments)};return b.toString=function(){return a.toString()},b}(function(a,b){function c(a){if(void 0===a)return 0;if(a.length>2)return a;var b;return 99>=a&&a>50&&(b="19"+a),(50>a||"00"===a)&&(b="20"+a),b}function d(a){if(void 0===a)return 0;for(var b,c=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],d=0;d<c.length;d++){var e=c[d];if(a.toLowerCase()===e){b=d+1;break}}return(b>11||23>b)&&(b-=12),1>b||b>12?0:b}if(b||(b="DMY"),!a||""===a)return new Date(1001,0,1);var e,f;switch(b.toUpperCase()){case"DDMMMYYYY":f=a.replace(/[- \/.]/g," ").split(" "),e=new Date(c(f[2]),d(f[1])-1,f[0]);break;case"DMY":f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0]);break;case"MDY":f=a.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[0]-1,f[1]);break;case"YMD":f=a.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),e=new Date(c(f[0]),f[1]-1,f[2]);break;default:f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0])}return e})};a.DateHelper=b}),define("sort",["exports","string"],function(a,b){var c=b.Str,d={ignoreCase:function(a,b){var d=c.lower(a),e=c.lower(b);return e>d?-1:d>e?1:0}};a.Sort=d}),define("modules/store",["exports","../cookie"],function(a,b){{var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},e=b.Cookie;a.Store=function(){function a(b){d(this,a);var c=b.config();this.duration=isNaN(c.set_cookie_duration)?1e5:parseInt(c.set_cookie_duration,10),this.tf=b}return c(a,null,{saveFilterValues:{value:function(a){for(var b=this.tf,c=[],d=0;d<b.fltIds.length;d++){var f=b.getFilterValue(d);""===f&&(f=" "),c.push(f)}c.push(b.fltIds.length),e.write(a,c.join(b.separator),this.duration)},writable:!0,configurable:!0},getFilterValues:{value:function(a){var b=e.read(a),c=new RegExp(this.tf.separator,"g");return b.split(c)},writable:!0,configurable:!0},savePageNb:{value:function(a){e.write(a,this.tf.Cpt.paging.currentPageNb,this.duration)},writable:!0,configurable:!0},getPageNb:{value:function(a){return e.read(a)},writable:!0,configurable:!0},savePageLength:{value:function(a){e.write(a,this.tf.Cpt.paging.resultsPerPageSlc.selectedIndex,this.duration)},writable:!0,configurable:!0},getPageLength:{value:function(a){return e.read(a)},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/gridLayout",["exports","../dom","../types","../helpers","../event"],function(a,b,c,d,e){{var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=b.Dom,i=c.Types,j=(d.Helpers,e.Event);a.GridLayout=function(){function a(b){g(this,a);var c=b.config();this.gridWidth=c.grid_width||null,this.gridHeight=c.grid_height||null,this.gridMainContCssClass=c.grid_cont_css_class||"grd_Cont",this.gridContCssClass=c.grid_tbl_cont_css_class||"grd_tblCont",this.gridHeadContCssClass=c.grid_tblHead_cont_css_class||"grd_headTblCont",this.gridInfDivCssClass=c.grid_inf_grid_css_class||"grd_inf",this.gridHeadRowIndex=c.grid_headers_row_index||0,this.gridHeadRows=c.grid_headers_rows||[0],this.gridEnableFilters=void 0!==c.grid_enable_default_filters?c.grid_enable_default_filters:!0,this.gridDefaultColWidth=c.grid_default_col_width||"100px",this.gridEnableColResizer=void 0!==c.grid_enable_cols_resizer?c.grid_enable_cols_resizer:!1,this.gridColResizerPath=c.grid_cont_col_resizer_path||this.basePath+"TFExt_ColsResizer/TFExt_ColsResizer.js",this.gridColElms=[],this.tf=b}return f(a,null,{init:{value:function(){var a=this.tf,b=a.config(),c=a.tbl;if(a.gridLayout){if(a.isExternalFlt=!0,!a.hasColWidth){a.colWidth=[];for(var d=0;d<a.nbCells;d++){var e,f=c.rows[this.gridHeadRowIndex].cells[d];e=""!==f.width?f.width:""!==f.style.width?parseInt(f.style.width,10):this.gridDefaultColWidth,a.colWidth[d]=e}a.hasColWidth=!0}a.setColWidths(this.gridHeadRowIndex);var g;g=""!==c.width?c.width:""!==c.style.width?parseInt(c.style.width,10):c.clientWidth,this.tblMainCont=h.create("div",["id",a.prfxMainTblCont+a.id]),this.tblMainCont.className=this.gridMainContCssClass,this.gridWidth&&(this.tblMainCont.style.width=this.gridWidth),c.parentNode.insertBefore(this.tblMainCont,c),this.tblCont=h.create("div",["id",a.prfxTblCont+a.id]),this.tblCont.className=this.gridContCssClass,this.gridWidth&&(this.tblCont.style.width=this.gridWidth),this.gridHeight&&(this.tblCont.style.height=this.gridHeight),c.parentNode.insertBefore(this.tblCont,c);var k=c.parentNode.removeChild(c);this.tblCont.appendChild(k),""===c.style.width&&(c.style.width=(a._containsStr("%",g)?c.clientWidth:g)+"px");var l=this.tblCont.parentNode.removeChild(this.tblCont);this.tblMainCont.appendChild(l),this.headTblCont=h.create("div",["id",a.prfxHeadTblCont+a.id]),this.headTblCont.className=this.gridHeadContCssClass,this.gridWidth&&(this.headTblCont.style.width=this.gridWidth),this.headTbl=h.create("table",["id",a.prfxHeadTbl+a.id]);for(var m=h.create("tHead"),n=c.rows[this.gridHeadRowIndex],o=[],p=0;p<a.nbCells;p++){var q=n.cells[p],r=q.getAttribute("id");r&&""!==r||(r=a.prfxGridTh+p+"_"+a.id,q.setAttribute("id",r)),o.push(r)}var s=h.create("tr");if(this.gridEnableFilters&&a.fltGrid){a.externalFltTgtIds=[];for(var t=0;t<a.nbCells;t++){var u=a.prfxFlt+t+a.prfxGridFltTd+a.id,v=h.create(a.fltCellTag,["id",u]);s.appendChild(v),a.externalFltTgtIds[t]=u}}for(var w=0;w<this.gridHeadRows.length;w++){var x=c.rows[this.gridHeadRows[0]];m.appendChild(x)}this.headTbl.appendChild(m),0===a.filtersRowIndex?m.insertBefore(s,n):m.appendChild(s),this.headTblCont.appendChild(this.headTbl),this.tblCont.parentNode.insertBefore(this.headTblCont,this.tblCont);var y=h.tag(c,"thead");y.length>0&&c.removeChild(y[0]),this.headTbl.style.width=c.style.width,this.headTbl.style.tableLayout="fixed",c.style.tableLayout="fixed",this.headTbl.cellPadding=c.cellPadding,this.headTbl.cellSpacing=c.cellSpacing,a.setColWidths(),this.headTblCont.style.width=this.tblCont.clientWidth+"px",c.style.width="";var z=this;j.add(this.tblCont,"scroll",function(){var a=this.scrollLeft;if(z.headTblCont.scrollLeft=a,!z.isPointerXOverwritten)try{z.Evt.pointerX=function(b){var c=b||global.event,d=tf_StandardBody().scrollLeft+a;return c.pageX+a||c.clientX+d},z.isPointerXOverwritten=!0}catch(b){z.isPointerXOverwritten=!1}}),b.sort!==!1&&(a.sort=!0,a.sortConfig.asyncSort=!0,a.sortConfig.triggerIds=o),this.gridEnableColResizer&&(a.hasExtensions?a._containsStr("colsresizer",Str.lower(a.extensions.src.toString()))||(a.extensions.name.push("ColumnsResizer_"+a.id),a.extensions.src.push(a.gridColResizerPath),a.extensions.description.push("Columns Resizing"),a.extensions.initialize.push(function(a){a.SetColsResizer("ColumnsResizer_"+a.id)})):(a.extensions={name:["ColumnsResizer_"+a.id],src:[this.gridColResizerPath],description:["Columns Resizing"],initialize:[function(a){a.SetColsResizer("ColumnsResizer_"+a.id)}]},a.hasExtensions=!0)),b.col_resizer_cols_headers_table=this.headTbl.getAttribute("id"),b.col_resizer_cols_headers_index=this.gridHeadRowIndex,b.col_resizer_width_adjustment=0,b.col_enable_text_ellipsis=!1,z.tblHasColTag=h.tag(c,"col").length>0?!0:!1;var A=function(b){if(b){for(var d=a.nbCells-1;d>=0;d--){var e=h.create("col",["id",a.id+"_col_"+d]);c.firstChild.parentNode.insertBefore(e,c.firstChild),e.style.width=a.colWidth[d],b.gridColElms[d]=e}b.tblHasColTag=!0}};if(z.tblHasColTag)for(var B=h.tag(c,"col"),C=0;C<a.nbCells;C++)B[C].setAttribute("id",a.id+"_col_"+C),B[C].style.width=a.colWidth[C],z.gridColElms.push(B[C]);else A(z);var D=i.isFn(b.on_after_col_resized)?b.on_after_col_resized:null;b.on_after_col_resized=function(a,b){if(b){var d=a.crWColsRow.cells[b].style.width,e=a.gridColElms[b];e.style.width=d;var f=a.crWColsRow.cells[b].clientWidth,g=a.crWRowDataTbl.cells[b].clientWidth;f!=g&&(a.headTbl.style.width=c.clientWidth+"px"),D&&D.call(null,a,b)}},c.clientWidth!==this.headTbl.clientWidth&&(c.style.width=this.headTbl.clientWidth+"px")}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf,b=a.tbl;if(a.gridLayout){var c=b.parentNode.removeChild(b);this.tblMainCont.parentNode.insertBefore(c,this.tblMainCont),this.tblMainCont.parentNode.removeChild(this.tblMainCont),this.tblMainCont=null,this.headTblCont=null,this.headTbl=null,this.tblCont=null,b.outerHTML=a.sourceTblHtml,b=h.id(a.id)}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/loader",["exports","../dom","../types"],function(a,b,c){{var d=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=b.Dom,g=c.Types,h=window;a.Loader=function(){function a(b){e(this,a);var c=b.config();this.loaderTgtId=c.loader_target_id||null,this.loaderDiv=null,this.loaderText=c.loader_text||"Loading...",this.loaderHtml=c.loader_html||null,this.loaderCssClass=c.loader_css_class||"loader",this.loaderCloseDelay=200,this.onShowLoader=g.isFn(c.on_show_loader)?c.on_show_loader:null,this.onHideLoader=g.isFn(c.on_hide_loader)?c.on_hide_loader:null,this.tf=b;var d=f.create("div",["id",b.prfxLoader+b.id]);d.className=this.loaderCssClass;var h=this.loaderTgtId?f.id(this.loaderTgtId):b.tbl.parentNode;this.loaderTgtId?h.appendChild(d):h.insertBefore(d,b.tbl),this.loaderDiv=f.id(b.prfxLoader+b.id),this.loaderHtml?this.loaderDiv.innerHTML=this.loaderHtml:this.loaderDiv.appendChild(f.text(this.loaderText))}return d(a,null,{show:{value:function(a){var b=this;if(this.tf.loader&&this.loaderDiv&&this.loaderDiv.style.display!==a){var c=function(){b.loaderDiv&&(b.onShowLoader&&"none"!==a&&b.onShowLoader.call(null,b),b.loaderDiv.style.display=a,b.onHideLoader&&"none"===a&&b.onHideLoader.call(null,b))},d="none"===a?this.loaderCloseDelay:1;h.setTimeout(c,d)}},writable:!0,configurable:!0},remove:{value:function(){if(this.loaderDiv){var a=this.tf,b=this.loaderTgtId?f.id(this.loaderTgtId):a.gridLayout?a.Cpt.gridLayout.tblCont:a.tbl.parentNode;b.removeChild(this.loaderDiv),this.loaderDiv=null}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/highlightKeywords",["exports","../dom","../string"],function(a,b,c){{var d=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=b.Dom,g=c.Str;a.HighlightKeyword=function(){function a(b){e(this,a);var c=b.config();this.highlightCssClass=c.highlight_css_class||"keyword",this.highlightedNodes=[],this.tf=b}return d(a,null,{highlight:{value:function(a,b,c){if(a.hasChildNodes)for(var d=a.childNodes,e=0;e<d.length;e++)this.highlight(d[e],b,c);if(3===a.nodeType){var h=g.lower(a.nodeValue),i=g.lower(b);if(-1!=h.indexOf(i)){var j=a.parentNode;if(j&&j.className!=c){var k=a.nodeValue,l=h.indexOf(i),m=f.text(k.substr(0,l)),n=k.substr(l,b.length),o=f.text(k.substr(l+b.length)),p=f.text(n),q=f.create("span");q.className=c,q.appendChild(p),j.insertBefore(m,a),j.insertBefore(q,a),j.insertBefore(o,a),j.removeChild(a),this.highlightedNodes.push(q.firstChild)}}}},writable:!0,configurable:!0},unhighlight:{value:function(a,b){for(var c=[],d=this.highlightedNodes,e=0;e<d.length;e++){var f=d[e];if(f){var h=g.lower(f.nodeValue),i=g.lower(a);if(-1!==h.indexOf(i)){var j=f.parentNode;if(j&&j.className===b){var k=j.previousSibling,l=j.nextSibling;if(!k||!l)continue;l.nodeValue=k.nodeValue+f.nodeValue+l.nodeValue,k.nodeValue="",f.nodeValue="",c.push(e)}}}}for(var m=0;m<c.length;m++)d.splice(c[m],1)},writable:!0,configurable:!0},unhighlightAll:{value:function(){if(this.tf.highlightKeywords&&this.tf.searchArgs){for(var a=0;a<this.tf.searchArgs.length;a++)this.unhighlight(this.tf.searchArgs[a],this.highlightCssClass);this.highlightedNodes=[]}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/popupFilter",["exports","../types","../dom","../event","../helpers"],function(a,b,c,d,e){{var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=b.Types,i=c.Dom,j=d.Event,k=e.Helpers;a.PopupFilter=function(){function a(b){g(this,a);var c=b.config();b.isExternalFlt=!0,b.externalFltTgtIds=[],this.popUpImgFlt=c.popup_filters_image||b.themesPath+"icn_filter.gif",this.popUpImgFltActive=c.popup_filters_image_active||b.themesPath+"icn_filterActive.gif",this.popUpImgFltHtml=c.popup_filters_image_html||'<img src="'+this.popUpImgFlt+'" alt="Column filter" />',this.popUpDivCssClass=c.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=h.isFn(c.on_before_popup_filter_open)?c.on_before_popup_filter_open:null,this.onAfterPopUpOpen=h.isFn(c.on_after_popup_filter_open)?c.on_after_popup_filter_open:null,this.onBeforePopUpClose=h.isFn(c.on_before_popup_filter_close)?c.on_before_popup_filter_close:null,this.onAfterPopUpClose=h.isFn(c.on_after_popup_filter_close)?c.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.tf=b}return f(a,null,{onClick:{value:function(a){var b=a||global.event,c=b.target.parentNode,d=parseInt(c.getAttribute("ci"),10);if(this.closeAll(d),this.toggle(d),this.popUpFltAdjustToContainer){var e=this.popUpFltElms[d],f=this.tf.getHeaderElement(d),g=.95*f.clientWidth;if(k.isIE()){var h=i.position(f).left;e.style.left=h+"px"}e.style.width=parseInt(g,10)+"px"}j.cancel(b),j.stop(b)},writable:!0,configurable:!0},init:{value:function(){for(var a=this,b=this.tf,c=0;c<b.nbCells;c++)if(b["col"+c]!==b.fltTypeNone){var d=i.create("span",["id",b.prfxPopUpSpan+b.id+"_"+c],["ci",c]);d.innerHTML=this.popUpImgFltHtml;var e=b.getHeaderElement(c);e.appendChild(d),j.add(d,"click",function(b){a.onClick(b)}),this.popUpFltSpans[c]=d,this.popUpFltImgs[c]=d.firstChild}},writable:!0,configurable:!0},buildAll:{value:function(){for(var a=0;a<this.popUpFltElmCache.length;a++)this.build(a,this.popUpFltElmCache[a])},writable:!0,configurable:!0},build:{value:function(a,b){var c=this.tf,d=b?b:i.create("div",["id",c.prfxPopUpDiv+c.id+"_"+a]);d.className=this.popUpDivCssClass,c.externalFltTgtIds.push(d.id);var e=c.getHeaderElement(a);e.insertBefore(d,e.firstChild),j.add(d,"click",function(a){j.stop(a)}),this.popUpFltElms[a]=d},writable:!0,configurable:!0},toggle:{value:function(a){var b=this.tf,c=this.popUpFltElms[a];"none"===c.style.display||""===c.style.display?(this.onBeforePopUpOpen&&this.onBeforePopUpOpen.call(null,this,this.popUpFltElms[a],a),c.style.display="block",b["col"+a]===b.fltTypeInp&&b.GetFilterElement(a).focus(),this.onAfterPopUpOpen&&this.onAfterPopUpOpen.call(null,this,this.popUpFltElms[a],a)):(this.onBeforePopUpClose&&this.onBeforePopUpClose.call(null,this,this.popUpFltElms[a],a),c.style.display="none",this.onAfterPopUpClose&&this.onAfterPopUpClose.call(null,this,this.popUpFltElms[a],a))},writable:!0,configurable:!0},closeAll:{value:function(a){for(var b=0;b<this.popUpFltElms.length;b++)if(b!==a){var c=this.popUpFltElms[b];c&&(c.style.display="none")}},writable:!0,configurable:!0},buildIcons:{value:function(){for(var a=0;a<this.popUpFltImgs.length;a++)this.buildIcon(a,!1)},writable:!0,configurable:!0},buildIcon:{value:function(a,b){h.isUndef(b)?!0:b;this.popUpFltImgs[a]&&(this.popUpFltImgs[a].src=b?this.popUpImgFltActive:this.popUpImgFlt)},writable:!0,configurable:!0},destroy:{value:function(){this.popUpFltElmCache=[];for(var a=0;a<this.popUpFltElms.length;a++){var b=this.popUpFltElms[a],c=this.popUpFltSpans[a],d=this.popUpFltImgs[a];b&&(b.parentNode.removeChild(b),this.popUpFltElmCache[a]=b),b=null,c&&c.parentNode.removeChild(c),c=null,d&&d.parentNode.removeChild(d),d=null}this.popUpFltElms=[],this.popUpFltSpans=[],this.popUpFltImgs=[]},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/dropdown",["exports","../dom","../array","../string","../sort"],function(a,b,c,d,e){{var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=b.Dom,i=c.Arr,j=d.Str,k=e.Sort;a.Dropdown=function(){function a(b){g(this,a);var c=b.config();this.enableSlcResetFilter=c.enable_slc_reset_filter?!1:!0,this.nonEmptyText=c.non_empty_text||"(Non empty)",this.slcFillingMethod=c.slc_filling_method||"createElement",this.activateSlcTooltip=c.activate_slc_tooltip||"Click to activate",this.multipleSlcTooltip=c.multiple_slc_tooltip||"Use Ctrl key for multiple selections",this.isCustom=null,this.opts=null,this.optsTxt=null,this.slcInnerHtml=null,this.tf=b}return f(a,null,{build:{value:function(a,b,c,d){var e=this.tf;e.EvtManager(e.Evt.name.dropdown,{slcIndex:a,slcRefreshed:b,slcExternal:c,slcId:d})},writable:!0,configurable:!0},_build:{value:function(a){var b=void 0===arguments[1]?!1:arguments[1],c=void 0===arguments[2]?!1:arguments[2],d=void 0===arguments[3]?null:arguments[3],e=this.tf;a=parseInt(a,10),this.opts=[],this.optsTxt=[],this.slcInnerHtml="";var f=e.fltIds[a];if((h.id(f)||c)&&(h.id(d)||!c)){{var g=h.id(c?d:f),l=e.tbl.rows,m=e.matchCase;j.lower(this.slcFillingMethod)}this.isCustom=e.hasCustomSlcOptions&&i.has(e.customSlcOptions.cols,a);var n;b&&e.activeFilterId&&(n=e.activeFilterId.split("_")[0],n=n.split(e.prfxFlt)[1]);var o=[],p=[];e.rememberGridValues&&(o=e.Cpt.store.getFilterValues(e.fltsValuesCookie),o&&!j.isEmpty(o.toString())&&(this.isCustom?p.push(o[a]):p=o[a].split(" "+e.orOperator+" ")));var q=null,r=null;b&&e.disableExcludedOptions&&(q=[],r=[]);for(var s=e.refRow;s<e.nbRows;s++)if(!e.hasVisibleRows||!i.has(e.visibleRows,s)||e.paging){var t=l[s].cells,u=t.length;if(u===e.nbCells&&!this.isCustom)for(var v=0;u>v;v++)if(a===v&&(!b||b&&e.disableExcludedOptions)||a==v&&b&&(""===l[s].style.display&&!e.paging||e.paging&&(!e.validRowsIndex||e.validRowsIndex&&i.has(e.validRowsIndex,s))&&(void 0===n||n==a||n!=a&&i.has(e.validRowsIndex,s)))){var w=e.getCellData(v,t[v]),x=j.matchCase(w,m);if(i.has(this.opts,x,m)||this.opts.push(w),b&&e.disableExcludedOptions){var y=r[v];y||(y=this.GetFilteredDataCol(v)),i.has(y,x,m)||i.has(q,x,m)||this.isFirstLoad||q.push(w)}}}if(this.isCustom){var z=e.__getCustomValues(a);this.opts=z[0],this.optsTxt=z[1]}if(e.sortSlc&&!this.isCustom&&(m?(this.opts.sort(),q&&q.sort()):(this.opts.sort(k.ignoreCase),q&&q.sort(k.ignoreCase))),e.sortNumAsc&&i.has(e.sortNumAsc,a))try{this.opts.sort(numSortAsc),q&&q.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(A){this.opts.sort(),q&&q.sort(),this.isCustom&&this.optsTxt.sort()}if(e.sortNumDesc&&i.has(e.sortNumDesc,a))try{this.opts.sort(numSortDesc),q&&q.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(A){this.opts.sort(),q&&q.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(a,g,b,q,o,p)}},writable:!0,configurable:!0},addOptions:{value:function(a,b,c,d,e,f){var g=this.tf,k=j.lower(this.slcFillingMethod),l=b.value;b.innerHTML="",b=this.addFirstOption(b);for(var m=0;m<this.opts.length;m++)if(""!==this.opts[m]){var n=this.opts[m],o=this.isCustom?this.optsTxt[m]:n,p=!1;if(c&&this.disableExcludedOptions&&i.has(d,j.matchCase(n,g.matchCase),g.matchCase)&&(p=!0),"innerhtml"===k){var q="";g.fillSlcOnDemand&&l===this.opts[m]&&(q='selected="selected"'),this.slcInnerHtml+='<option value="'+n+'" '+q+(p?'disabled="disabled"':"")+">"+o+"</option>"}else{var r;r=g.fillSlcOnDemand&&l===this.opts[m]&&g["col"+a]===g.fltTypeSlc?h.createOpt(o,n,!0):g["col"+a]!==g.fltTypeMulti?h.createOpt(o,n," "!==e[a]&&n===e[a]?!0:!1):h.createOpt(o,n,i.has(f,j.matchCase(this.opts[m],g.matchCase),g.matchCase)||-1!==f.toString().indexOf(n)?!0:!1),p&&(r.disabled=!0),b.appendChild(r)}}"innerhtml"===k&&(b.innerHTML+=this.slcInnerHtml),b.setAttribute("filled","1")},writable:!0,configurable:!0},addFirstOption:{value:function(a){var b=this.tf,c=j.lower(this.slcFillingMethod);if("innerhtml"===c)this.slcInnerHtml+='<option value="">'+b.displayAllText+"</option>";else{var d=h.createOpt(this.enableSlcResetFilter?b.displayAllText:"","");if(this.enableSlcResetFilter||(d.style.display="none"),a.appendChild(d),b.enableEmptyOption){var e=h.createOpt(b.emptyText,b.emOperator);a.appendChild(e)}if(b.enableNonEmptyOption){var f=h.createOpt(b.nonEmptyText,b.nmOperator);a.appendChild(f)}}return a},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/checkList",["exports","../dom","../array","../string","../sort","../event"],function(a,b,c,d,e,f){{var g=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},i=b.Dom,j=c.Arr,k=d.Str,l=e.Sort,m=f.Event;a.CheckList=function(){function a(b){h(this,a);var c=b.config();this.checkListDiv=[],this.checkListDivCssClass=c.div_checklist_css_class||"div_checklist",this.checkListCssClass=c.checklist_css_class||"flt_checklist",this.checkListItemCssClass=c.checklist_item_css_class||"flt_checklist_item",this.checkListSlcItemCssClass=c.checklist_selected_item_css_class||"flt_checklist_slc_item",this.activateCheckListTxt=c.activate_checklist_text||"Click to load filter data",this.checkListItemDisabledCssClass=c.checklist_item_disabled_css_class||"flt_checklist_item_disabled",this.enableCheckListResetFilter=c.enable_checklist_reset_filter===!1?!1:!0,this.isCustom=null,this.opts=null,this.optsTxt=null,this.tf=b}return g(a,null,{onChange:{value:function(a){this.tf.Evt._OnSlcChange(a)},writable:!0,configurable:!0},optionClick:{value:function(a){this.setCheckListValues(a.target),this.onChange(a)},writable:!0,configurable:!0},build:{value:function(a,b,c){var d=this.tf;d.EvtManager(d.Evt.name.checklist,{slcIndex:a,slcExternal:b,slcId:c})},writable:!0,configurable:!0},_build:{value:function(a){var b=this,c=void 0===arguments[1]?!1:arguments[1],d=void 0===arguments[2]?null:arguments[2],e=this.tf;a=parseInt(a,10),this.opts=[],this.optsTxt=[];var f=e.prfxCheckListDiv+a+"_"+e.id;if((i.id(f)||c)&&(i.id(d)||!c)){var g=c?i.id(d):this.checkListDiv[a],h=i.create("ul",["id",e.fltIds[a]],["colIndex",a]);h.className=this.checkListCssClass,m.add(h,"change",function(a){b.onChange(a)});var n=e.tbl.rows;this.isCustom=e.hasCustomSlcOptions&&j.has(e.customSlcOptions.cols,a);var o;e.refreshFilters&&e.activeFilterId&&(o=e.activeFilterId.split("_")[0],o=o.split(e.prfxFlt)[1]);var p,q=[];e.refreshFilters&&e.disableExcludedOptions&&(p=[]);for(var r=e.refRow;r<e.nbRows;r++)if(!e.hasVisibleRows||!j.has(e.visibleRows,r)||e.paging){var s=n[r].cells,t=s.length;if(t===e.nbCells&&!this.isCustom)for(var u=0;t>u;u++)if(a===u&&(!e.refreshFilters||e.refreshFilters&&e.disableExcludedOptions)||a===u&&e.refreshFilters&&(""===n[r].style.display&&!e.paging||e.paging&&(!o||o===a||o!=a&&j.has(e.validRowsIndex,r)))){var v=e.getCellData(u,s[u]),w=k.matchCase(v,e.matchCase);
j.has(this.opts,w,e.matchCase)||this.opts.push(v);var x=q[u];e.refreshFilters&&e.disableExcludedOptions&&(x||(q[u]=e.GetFilteredDataCol(u)),j.has(x,w,e.matchCase)||j.has(p,w,e.matchCase)||e.isFirstLoad||p.push(v))}}if(this.isCustom){var y=e.__getCustomValues(a);this.opts=y[0],this.optsTxt=y[1]}if(e.sortSlc&&!this.isCustom&&(e.matchCase?(this.opts.sort(),p&&p.sort()):(this.opts.sort(l.ignoreCase),p&&p.sort(l.ignoreCase))),e.sortNumAsc&&j.has(e.sortNumAsc,a))try{this.opts.sort(numSortAsc),p&&p.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(z){this.opts.sort(),p&&p.sort(),this.isCustom&&this.optsTxt.sort()}if(e.sortNumDesc&&j.has(e.sortNumDesc,a))try{this.opts.sort(numSortDesc),p&&p.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(z){this.opts.sort(),p&&p.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(a,h,e.separator),e.fillSlcOnDemand&&(g.innerHTML=""),g.appendChild(h),g.setAttribute("filled","1")}},writable:!0,configurable:!0},addChecks:{value:function(a,b){var c=this,d=this.tf,e=this.addTChecks(a,b),f=[],g=d.Cpt.store,h=g?g.getFilterValues(d.fltsValuesCookie)[a]:null;h&&k.trim(h).length>0&&(d.hasCustomSlcOptions&&j.has(d.customSlcOptions.cols,a)?f.push(h):f=h.split(" "+d.orOperator+" "));for(var l=0;l<this.opts.length;l++){var n=this.opts[l],o=this.isCustom?this.optsTxt[l]:n,p=i.createCheckItem(d.fltIds[a]+"_"+(l+e),n,o);p.className=this.checkListItemCssClass,d.refreshFilters&&d.disableExcludedOptions&&j.has(excludedOpts,k.matchCase(n,d.matchCase),d.matchCase)?(i.addClass(p,this.checkListItemDisabledCssClass),p.check.disabled=!0,p.disabled=!0):m.add(p.check,"click",function(a){c.optionClick(a)}),b.appendChild(p),""===n&&(p.style.display="none"),d.rememberGridValues&&(d.hasCustomSlcOptions&&j.has(d.customSlcOptions.cols,a)&&-1!=f.toString().indexOf(n)||j.has(f,k.matchCase(n,d.matchCase),d.matchCase))&&(p.check.checked=!0,this.setCheckListValues(p.check))}},writable:!0,configurable:!0},addTChecks:{value:function(a,b){var c=this,d=this.tf,e=1,f=i.createCheckItem(d.fltIds[a]+"_0","",d.displayAllText);if(f.className=this.checkListItemCssClass,b.appendChild(f),m.add(f.check,"click",function(a){c.optionClick(a)}),this.enableCheckListResetFilter||(f.style.display="none"),d.enableEmptyOption){var g=i.createCheckItem(d.fltIds[a]+"_1",d.emOperator,d.emptyText);g.className=this.checkListItemCssClass,b.appendChild(g),m.add(g.check,"click",function(a){c.optionClick(a)}),e++}if(d.enableNonEmptyOption){var h=i.createCheckItem(d.fltIds[a]+"_2",d.nmOperator,d.nonEmptyText);h.className=this.checkListItemCssClass,b.appendChild(h),m.add(h.check,"click",function(a){c.optionClick(a)}),e++}return e},writable:!0,configurable:!0},setCheckListValues:{value:function(a){if(a){for(var b=this.tf,c=a.value,d=parseInt(a.id.split("_")[2],10),e="ul",f="li",g=a;k.lower(g.nodeName)!==e;)g=g.parentNode;var h=g.childNodes[d],j=g.getAttribute("colIndex"),l=g.getAttribute("value"),m=g.getAttribute("indexes");if(a.checked){if(""===c){if(m&&""!==m)for(var n=m.split(b.separator),o=0;o<n.length;o++){var p=i.id(b.fltIds[j]+"_"+n[o]);p&&(p.checked=!1,i.removeClass(g.childNodes[n[o]],this.checkListSlcItemCssClass))}g.setAttribute("value",""),g.setAttribute("indexes","")}else l=l?l:"",c=k.trim(l+" "+c+" "+b.orOperator),d=m+d+b.separator,g.setAttribute("value",c),g.setAttribute("indexes",d),i.id(b.fltIds[j]+"_0")&&(i.id(b.fltIds[j]+"_0").checked=!1);k.lower(h.nodeName)===f&&(i.removeClass(g.childNodes[0],this.checkListSlcItemCssClass),i.addClass(h,this.checkListSlcItemCssClass))}else{if(""!==c){var q=new RegExp(k.rgxEsc(c+" "+b.orOperator));l=l.replace(q,""),g.setAttribute("value",k.trim(l));var r=new RegExp(k.rgxEsc(d+b.separator));m=m.replace(r,""),g.setAttribute("indexes",m)}k.lower(h.nodeName)===f&&i.removeClass(h,this.checkListSlcItemCssClass)}}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/rowsCounter",["exports","../dom","../types","../helpers"],function(a,b,c,d){{var e=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=b.Dom,h=c.Types,i=d.Helpers;a.RowsCounter=function(){function a(b){f(this,a);var c=b.config();this.rowsCounterTgtId=c.rows_counter_target_id||null,this.rowsCounterDiv=null,this.rowsCounterSpan=null,this.rowsCounterText=c.rows_counter_text||"Rows: ",this.fromToTextSeparator=c.from_to_text_separator||"-",this.overText=c.over_text||" / ",this.totRowsCssClass=c.tot_rows_css_class||"tot",this.onBeforeRefreshCounter=h.isFn(c.on_before_refresh_counter)?c.on_before_refresh_counter:null,this.onAfterRefreshCounter=h.isFn(c.on_after_refresh_counter)?c.on_after_refresh_counter:null,this.tf=b}return e(a,null,{init:{value:function(){var a=this.tf;if((a.hasGrid()||a.isFirstLoad)&&!this.rowsCounterSpan){var b=g.create("div",["id",a.prfxCounter+a.id]);b.className=this.totRowsCssClass;var c=g.create("span",["id",a.prfxTotRows+a.id]),d=g.create("span",["id",a.prfxTotRowsTxt+a.id]);d.appendChild(g.text(this.rowsCounterText)),this.rowsCounterTgtId||a.setToolbar();var e=this.rowsCounterTgtId?g.id(this.rowsCounterTgtId):a.lDiv;this.rowsCounterDiv&&i.isIE()&&(this.rowsCounterDiv.outerHTML=""),this.rowsCounterTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.rowsCounterDiv=b,this.rowsCounterSpan=c,this.refresh()}},writable:!0,configurable:!0},refresh:{value:function(a){if(this.rowsCounterSpan){var b=this.tf;this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,b,this.rowsCounterSpan);var c;if(b.paging){var d=b.Cpt.paging;if(d){var e=parseInt(d.startPagingRow,10)+(b.nbVisibleRows>0?1:0),f=e+d.pagingLength-1<=b.nbVisibleRows?e+d.pagingLength-1:b.nbVisibleRows;c=e+this.fromToTextSeparator+f+this.overText+b.nbVisibleRows}}else c=a&&""!==a?a:b.nbFilterableRows-b.nbHiddenRows-(b.hasVisibleRows?b.visibleRows.length:0);this.rowsCounterSpan.innerHTML=c,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,b,this.rowsCounterSpan,c)}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf;a.hasGrid()&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?i.isIE()?this.rowsCounterDiv.outerHTML="":this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):g.id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/statusBar",["exports","../dom","../event","../types","../helpers"],function(a,b,c,d,e){{var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=b.Dom,i=(c.Event,d.Types),j=e.Helpers,k=window;a.StatusBar=function(){function a(b){g(this,a);var c=b.config();this.statusBarTgtId=c.status_bar_target_id||null,this.statusBarDiv=null,this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarText=c.status_bar_text||"",this.statusBarCssClass=c.status_bar_css_class||"status",this.statusBarCloseDelay=250,this.onBeforeShowMsg=i.isFn(c.on_before_show_msg)?c.on_before_show_msg:null,this.onAfterShowMsg=i.isFn(c.on_after_show_msg)?c.on_after_show_msg:null,this.tf=b}return f(a,null,{init:{value:function(){var a=this.tf;if(a.hasGrid()||a.isFirstLoad){var b=h.create("div",["id",a.prfxStatus+a.id]);b.className=this.statusBarCssClass;var c=h.create("span",["id",a.prfxStatusSpan+a.id]),d=h.create("span",["id",a.prfxStatusTxt+a.id]);d.appendChild(h.text(this.statusBarText)),this.statusBarTgtId||a.setToolbar();var e=this.statusBarTgtId?h.id(this.statusBarTgtId):a.lDiv;this.statusBarDiv&&j.isIE()&&(this.statusBarDiv.outerHTML=""),this.statusBarTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.statusBarDiv=b,this.statusBarSpan=c,this.statusBarSpanText=d}},writable:!0,configurable:!0},message:{value:function(){var a=this,b=void 0===arguments[0]?"":arguments[0],c=this.tf;if(c.statusBar&&this.statusBarSpan){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,b);var d=""===b?this.statusBarCloseDelay:1;k.setTimeout(function(){a.statusBarSpan.innerHTML=b,a.onAfterShowMsg&&a.onAfterShowMsg.call(null,a.tf,b)},d)}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf;a.hasGrid()&&this.statusBarDiv&&(this.statusBarDiv.innerHTML="",this.statusBarDiv.parentNode.removeChild(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null)},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/paging",["exports","../dom","../types","../string","../helpers","../event"],function(a,b,c,d,e,f){{var g=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},i=b.Dom,j=c.Types,k=d.Str,l=(e.Helpers,f.Event);a.Paging=function(){function a(b){h(this,a);var c=b.config();this.btnPageCssClass=c.paging_btn_css_class||"pgInp",this.pagingSlc=null,this.resultsPerPageSlc=null,this.pagingTgtId=c.paging_target_id||null,this.pagingLength=isNaN(c.paging_length)?10:c.paging_length,this.resultsPerPageTgtId=c.results_per_page_target_id||null,this.pgSlcCssClass=c.paging_slc_css_class||"pgSlc",this.pgInpCssClass=c.paging_inp_css_class||"pgNbInp",this.resultsPerPage=c.results_per_page||null,this.hasResultsPerPage=j.isArray(this.resultsPerPage),this.resultsSlcCssClass=c.results_slc_css_class||"rspg",this.resultsSpanCssClass=c.results_span_css_class||"rspgSpan",this.startPagingRow=0,this.nbPages=0,this.currentPageNb=1,this.btnNextPageText=c.btn_next_page_text||">",this.btnPrevPageText=c.btn_prev_page_text||"<",this.btnLastPageText=c.btn_last_page_text||">|",this.btnFirstPageText=c.btn_first_page_text||"|<",this.btnNextPageHtml=c.btn_next_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' nextPage" title="Next page" />':null),this.btnPrevPageHtml=c.btn_prev_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' previousPage" title="Previous page" />':null),this.btnFirstPageHtml=c.btn_first_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' firstPage" title="First page" />':null),this.btnLastPageHtml=c.btn_last_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' lastPage" title="Last page" />':null),this.pageText=c.page_text||" Page ",this.ofText=c.of_text||" of ",this.nbPgSpanCssClass=c.nb_pages_css_class||"nbpg",this.hasPagingBtns=c.paging_btns===!1?!1:!0,this.pageSelectorType=c.page_selector_type||b.fltTypeSlc,this.onBeforeChangePage=j.isFn(c.on_before_change_page)?c.on_before_change_page:null,this.onAfterChangePage=j.isFn(c.on_after_change_page)?c.on_after_change_page:null;var d=this.refRow,e=this.nbRows;this.nbPages=Math.ceil((e-d)/this.pagingLength);var f=this;this.evt={slcIndex:function(){return f.pageSelectorType===b.fltTypeSlc?f.pagingSlc.options.selectedIndex:parseInt(f.pagingSlc.value,10)-1},nbOpts:function(){return f.pageSelectorType===b.fltTypeSlc?parseInt(f.pagingSlc.options.length,10)-1:f.nbPages-1},next:function(){var a=f.evt.slcIndex()<f.evt.nbOpts()?f.evt.slcIndex()+1:0;f.changePage(a)},prev:function(){var a=f.evt.slcIndex()>0?f.evt.slcIndex()-1:f.evt.nbOpts();f.changePage(a)},last:function(){f.changePage(f.evt.nbOpts())},first:function(){f.changePage(0)},_detectKey:function(a){var c=b.Evt.getKeyCode(a);13===c&&(b.sorted?(b.filter(),f.changePage(f.evt.slcIndex())):f.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},this.tf=b}return g(a,null,{init:{value:function(){var a,b=this,c=this.tf,d=this.evt;this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),d.slcPagesChange=function(a){b.changePage(),a.target.blur()},this.pageSelectorType===c.fltTypeSlc&&(a=i.create(c.fltTypeSlc,["id",c.prfxSlcPages+c.id]),a.className=this.pgSlcCssClass,l.add(a,"change",d.slcPagesChange)),this.pageSelectorType===c.fltTypeInp&&(a=i.create(c.fltTypeInp,["id",c.prfxSlcPages+c.id],["value",this.currentPageNb]),a.className=this.pgInpCssClass,l.add(a,"keypress",d._detectKey));var e=i.create("span",["id",c.prfxBtnNextSpan+c.id]),f=i.create("span",["id",c.prfxBtnPrevSpan+c.id]),g=i.create("span",["id",c.prfxBtnLastSpan+c.id]),h=i.create("span",["id",c.prfxBtnFirstSpan+c.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)e.innerHTML=this.btnNextPageHtml,l.add(e,"click",d.next);else{var j=i.create(c.fltTypeInp,["id",c.prfxBtnNext+c.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);j.className=this.btnPageCssClass,l.add(j,"click",d.next),e.appendChild(j)}if(this.btnPrevPageHtml)f.innerHTML=this.btnPrevPageHtml,l.add(f,"click",d.prev);else{var k=i.create(c.fltTypeInp,["id",c.prfxBtnPrev+c.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);k.className=this.btnPageCssClass,l.add(k,"click",d.prev),f.appendChild(k)}if(this.btnLastPageHtml)g.innerHTML=this.btnLastPageHtml,l.add(g,"click",d.last);else{var m=i.create(c.fltTypeInp,["id",c.prfxBtnLast+c.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);m.className=this.btnPageCssClass,l.add(m,"click",d.last),g.appendChild(m)}if(this.btnFirstPageHtml)h.innerHTML=this.btnFirstPageHtml,l.add(h,"click",d.first);else{var n=i.create(c.fltTypeInp,["id",c.prfxBtnFirst+c.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);n.className=this.btnPageCssClass,l.add(n,"click",d.first),h.appendChild(n)}}this.pagingTgtId||c.setToolbar();var o=this.pagingTgtId?i.id(this.pagingTgtId):c.mDiv;o.appendChild(h),o.appendChild(f);var p=i.create("span",["id",c.prfxPgBeforeSpan+c.id]);p.appendChild(i.text(this.pageText)),p.className=this.nbPgSpanCssClass,o.appendChild(p),o.appendChild(a);var q=i.create("span",["id",c.prfxPgAfterSpan+c.id]);q.appendChild(i.text(this.ofText)),q.className=this.nbPgSpanCssClass,o.appendChild(q);var r=i.create("span",["id",c.prfxPgSpan+c.id]);r.className=this.nbPgSpanCssClass,r.appendChild(i.text(" "+this.nbPages+" ")),o.appendChild(r),o.appendChild(e),o.appendChild(g),this.pagingSlc=i.id(c.prfxSlcPages+c.id),(!c.rememberGridValues||this.isPagingRemoved)&&this.setPagingInfo(),c.fltGrid||(c.ValidateAllRows(),this.setPagingInfo(c.validRowsIndex)),this.isPagingRemoved=!1},writable:!0,configurable:!0},addPaging:{value:function(){var a=void 0===arguments[0]?!1:arguments[0],b=this.tf;b.hasGrid()&&!b.paging&&(b.paging=!0,this.isPagingRemoved=!0,this.init(),b.resetValues(),a&&b.filter())},writable:!0,configurable:!0},setPagingInfo:{value:function(a){var b=this.tf,c=b.tbl.rows,d=this.pagingTgtId?i.id(this.pagingTgtId):b.mDiv,e=i.id(b.prfxPgSpan+b.id);if(a&&a.length>0)b.validRowsIndex=a;else{b.validRowsIndex=[];for(var f=b.refRow;f<b.nbRows;f++){var g=c[f];if(g){var h=g.getAttribute("validRow");"true"!==h&&h||b.validRowsIndex.push(f)}}}if(this.nbPages=Math.ceil(b.validRowsIndex.length/this.pagingLength),e.innerHTML=this.nbPages,this.pageSelectorType===b.fltTypeSlc&&(this.pagingSlc.innerHTML=""),this.nbPages>0)if(d.style.visibility="visible",this.pageSelectorType===b.fltTypeSlc)for(var j=0;j<this.nbPages;j++){var k=new Option(j+1,j*this.pagingLength,!1,!1);this.pagingSlc.options[j]=k}else this.pagingSlc.value=this.currentPageNb;else d.style.visibility="hidden";this.groupByPage(b.validRowsIndex)},writable:!0,configurable:!0},groupByPage:{value:function(a){var b=this.tf,c=b.tbl.rows,d=parseInt(this.startPagingRow,10)+parseInt(this.pagingLength,10);a&&(b.validRowsIndex=a);for(var e=0;e<b.validRowsIndex.length;e++){var f=c[b.validRowsIndex[e]];e>=this.startPagingRow&&d>e?("true"!==f.getAttribute("validRow")&&f.getAttribute("validRow")||(f.style.display=""),b.alternateBgs&&b.Cpt.alternateRows&&b.Cpt.alternateRows.setRowBg(b.validRowsIndex[e],e)):(f.style.display="none",b.alternateBgs&&b.Cpt.alternateRows&&b.Cpt.alternateRows.removeRowBg(b.validRowsIndex[e]))}b.nbVisibleRows=b.validRowsIndex.length,b.isStartBgAlternate=!1,b.applyGridProps()},writable:!0,configurable:!0},setPage:{value:function(a){var b=this.tf;if(b.hasGrid()&&this.paging){var c=this.evt,d=typeof a;if("string"===d)switch(k.lower(a)){case"next":c.next();break;case"previous":c.prev();break;case"last":c.last();break;case"first":c.first();break;default:c.next()}else"number"===d&&this.changePage(a-1)}},writable:!0,configurable:!0},setResultsPerPage:{value:function(){var a=this,b=this.tf,c=this.evt;if((b.hasGrid()||b.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){c.slcResultsChange=function(b){a.changeResultsPerPage(),b.target.blur()};var d=i.create(b.fltTypeSlc,["id",b.prfxSlcResults+b.id]);d.className=b.resultsSlcCssClass;var e=this.resultsPerPage[0],f=this.resultsPerPage[1],g=i.create("span",["id",b.prfxSlcResultsTxt+b.id]);g.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||b.setToolbar();var h=this.resultsPerPageTgtId?i.id(this.resultsPerPageTgtId):b.rDiv;g.appendChild(i.text(e)),h.appendChild(g),h.appendChild(d),this.resultsPerPageSlc=i.id(b.prfxSlcResults+b.id);for(var j=0;j<f.length;j++){var k=new Option(f[j],f[j],!1,!1);this.resultsPerPageSlc.options[j]=k}l.add(d,"change",c.slcResultsChange)}},writable:!0,configurable:!0},removeResultsPerPage:{value:function(){var a=this.tf;if(a.hasGrid()&&this.resultsPerPageSlc&&this.resultsPerPage){var b=this.resultsPerPageSlc,c=i.id(a.prfxSlcResultsTxt+a.id);b&&b.parentNode.removeChild(b),c&&c.parentNode.removeChild(c),this.resultsPerPageSlc=null}},writable:!0,configurable:!0},changePage:{value:function(a){var b=this.tf,c=b.Evt;b.EvtManager(c.name.changepage,{pgIndex:a})},writable:!0,configurable:!0},changeResultsPerPage:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.changeresultsperpage)},writable:!0,configurable:!0},resetPage:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.resetpage)},writable:!0,configurable:!0},resetPageLength:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.resetpagelength)},writable:!0,configurable:!0},_changePage:{value:function(a){var b=this.tf;b.paging&&(null===a&&(a=this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.options.selectedIndex:this.pagingSlc.value-1),a>=0&&a<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,a),this.currentPageNb=parseInt(a,10)+1,this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.options[a].selected=!0:this.pagingSlc.value=this.currentPageNb,b.rememberPageNb&&b.Cpt.store.savePageNb(b.pgNbCookie),this.startPagingRow=this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.value:a*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,a)))},writable:!0,configurable:!0},_changeResultsPerPage:{value:function(){var a=this.tf;if(a.paging){var b=this.resultsPerPageSlc,c=this.pageSelectorType===a.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(b.options[b.selectedIndex].value,10),this.startPagingRow=this.pagingLength*c,!isNaN(this.pagingLength)){if(this.startPagingRow>=a.nbFilterableRows&&(this.startPagingRow=a.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===a.fltTypeSlc){var d=this.pagingSlc.options.length-1<=c?this.pagingSlc.options.length-1:c;this.pagingSlc.options[d].selected=!0}a.rememberPageLen&&a.Cpt.store.savePageLength(a.pgLenCookie)}}},writable:!0,configurable:!0},_resetPage:{value:function(a){var b=this.tf,c=b.Cpt.store.getPageNb(a);""!==c&&this.changePage(c-1)},writable:!0,configurable:!0},_resetPageLength:{value:function(a){var b=this.tf;if(b.paging){var c=b.Cpt.store.getPageLength(a);""!==c&&(this.resultsPerPageSlc.options[c].selected=!0,this.changeResultsPerPage())}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf;if(a.hasGrid()){var b,c,d,e,f,g,h;b=i.id(a.prfxBtnNextSpan+a.id),c=i.id(a.prfxBtnPrevSpan+a.id),d=i.id(a.prfxBtnLastSpan+a.id),e=i.id(a.prfxBtnFirstSpan+a.id),f=i.id(a.prfxPgBeforeSpan+a.id),g=i.id(a.prfxPgAfterSpan+a.id),h=i.id(a.prfxPgSpan+a.id);var j=this.evt;this.pagingSlc&&(this.pageSelectorType===a.fltTypeSlc?l.remove(this.pagingSlc,"change",j.slcPagesChange):this.pageSelectorType===a.fltTypeInp&&l.remove(this.pagingSlc,"keypress",j._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),b&&(l.remove(b,"click",j.next),b.parentNode.removeChild(b)),c&&(l.remove(c,"click",j.prev),c.parentNode.removeChild(c)),d&&(l.remove(d,"click",j.last),d.parentNode.removeChild(d)),e&&(l.remove(e,"click",j.first),e.parentNode.removeChild(e)),f&&f.parentNode.removeChild(f),g&&g.parentNode.removeChild(g),h&&h.parentNode.removeChild(h),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.isPagingRemoved=!0,a.paging=!1}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/clearButton",["exports","../dom","../event"],function(a,b,c){{var d=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=b.Dom,g=c.Event;a.ClearButton=function(){function a(b){e(this,a);var c=b.config();this.btnResetTgtId=c.btn_reset_target_id||null,this.btnResetEl=null,this.btnResetText=c.btn_reset_text||"Reset",this.btnResetTooltip=c.btn_reset_tooltip||"Clear filters",this.btnResetHtml=c.btn_reset_html||(b.enableIcons?'<input type="button" value="" class="'+b.btnResetCssClass+'" title="'+this.btnResetTooltip+'" />':null),this.tf=b}return d(a,null,{onClick:{value:function(){this.tf.clearFilters()},writable:!0,configurable:!0},init:{value:function(){var a=this,b=this.tf;if(b.hasGrid()||b.isFirstLoad||!b.btnResetEl){var c=f.create("span",["id",b.prfxResetSpan+b.id]);this.btnResetTgtId||b.setToolbar();var d=this.btnResetTgtId?f.id(this.btnResetTgtId):b.rDiv;if(d.appendChild(c),this.btnResetHtml){c.innerHTML=this.btnResetHtml;var e=c.firstChild;g.add(e,"click",function(){a.onClick()})}else{var h=f.create("a",["href","javascript:void(0);"]);h.className=b.btnResetCssClass,h.appendChild(f.text(this.btnResetText)),c.appendChild(h),g.add(h,"click",function(){a.onClick()})}this.btnResetEl=c.firstChild}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf;if(a.hasGrid()&&this.btnResetEl){var b=f.id(a.prfxResetSpan+a.id);b&&b.parentNode.removeChild(b),this.btnResetEl=null}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/help",["exports","../dom","../event"],function(a,b,c){{var d=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=b.Dom,g=c.Event;a.Help=function(){function a(b){e(this,a);var c=b.config();this.helpInstrTgtId=c.help_instructions_target_id||null,this.helpInstrContTgtId=c.help_instructions_container_target_id||null,this.helpInstrText=c.help_instructions_text?c.help_instructions_text:'Use the filters above each column to filter and limit table data. Avanced searches can be performed by using the following operators: <br /><b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, <b>||</b>,<b>&amp;&amp;</b>, <b>[empty]</b>, <b>[nonempty]</b>, <b>rgx:</b><br/> These operators are described here:<br/><a href="http://tablefilter.free.fr/#operators" target="_blank">http://tablefilter.free.fr/#operators</a><hr/>',this.helpInstrHtml=c.help_instructions_html||null,this.helpInstrBtnText=c.help_instructions_btn_text||"?",this.helpInstrBtnHtml=c.help_instructions_btn_html||null,this.helpInstrBtnCssClass=c.help_instructions_btn_css_class||"helpBtn",this.helpInstrContCssClass=c.help_instructions_container_css_class||"helpCont",this.helpInstrBtnEl=null,this.helpInstrContEl=null,this.helpInstrDefaultHtml='<div class="helpFooter"><h4>HTML Table Filter Generator v. '+b.version+'</h4><a href="http://tablefilter.free.fr" target="_blank">http://tablefilter.free.fr</a><br/><span>&copy;2009-'+b.year+' Max Guglielmi.</span><div align="center" style="margin-top:8px;"><a href="javascript:void(0);">Close</a></div></div>',this.tf=b}return d(a,null,{init:{value:function(){var a=this;if(!this.helpInstrBtnEl){var b=this.tf,c=f.create("span",["id",b.prfxHelpSpan+b.id]),d=f.create("div",["id",b.prfxHelpDiv+b.id]);this.helpInstrTgtId||b.setToolbar();var e=this.helpInstrTgtId?f.id(this.helpInstrTgtId):b.rDiv;e.appendChild(c);var h=this.helpInstrContTgtId?f.id(this.helpInstrContTgtId):c;if(this.helpInstrBtnHtml){c.innerHTML=this.helpInstrBtnHtml;var i=c.firstChild;g.add(i,"click",function(){a.toggle()}),h.appendChild(d)}else{h.appendChild(d);var j=f.create("a",["href","javascript:void(0);"]);j.className=this.helpInstrBtnCssClass,j.appendChild(f.text(this.helpInstrBtnText)),c.appendChild(j),g.add(j,"click",function(){a.toggle()})}this.helpInstrHtml?(this.helpInstrContTgtId&&h.appendChild(d),d.innerHTML=this.helpInstrHtml,this.helpInstrContTgtId||(d.className=this.helpInstrContCssClass,g.add(d,"dblclick",function(){a.toggle()}))):(d.innerHTML=this.helpInstrText,d.className=this.helpInstrContCssClass,g.add(d,"dblclick",function(){a.toggle()})),d.innerHTML+=this.helpInstrDefaultHtml,g.add(d,"click",function(){a.toggle()}),this.helpInstrContEl=d,this.helpInstrBtnEl=c}},writable:!0,configurable:!0},toggle:{value:function(){if(this.helpInstrContEl){var a=this.helpInstrContEl.style.display;if(""===a||"none"===a){this.helpInstrContEl.style.display="block";var b=f.position(this.helpInstrBtnEl).left;this.helpInstrContTgtId||(this.helpInstrContEl.style.left=b-this.helpInstrContEl.clientWidth+25+"px")}else this.helpInstrContEl.style.display="none"}},writable:!0,configurable:!0},destroy:{value:function(){this.helpInstrBtnEl&&(this.helpInstrBtnEl.parentNode.removeChild(this.helpInstrBtnEl),this.helpInstrBtnEl=null,this.helpInstrContEl&&(this.helpInstrContEl.parentNode.removeChild(this.helpInstrContEl),this.helpInstrContEl=null))},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/alternateRows",["exports","../dom"],function(a,b){{var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},e=b.Dom;a.AlternateRows=function(){function a(b){d(this,a);var c=b.config();this.evenCss=c.even_row_css_class||"even",this.oddCss=c.odd_row_css_class||"odd",this.tf=b}return c(a,null,{init:{value:function(){if(this.tf.hasGrid()||this.tf.isFirstLoad)for(var a=(this.tf.tbl.rows,null===this.tf.validRowsIndex),b=a?this.tf.refRow:0,c=a?this.tf.nbFilterableRows+b:this.tf.validRowsIndex.length,d=0,e=b;c>e;e++){var f=a?e:this.tf.validRowsIndex[e];this.setRowBg(f,d),d++}},writable:!0,configurable:!0},setRowBg:{value:function(a,b){if(this.tf.alternateBgs&&!isNaN(a)){var c=this.tf.tbl.rows,d=b?b:a;this.removeRowBg(a),e.addClass(c[a],d%2?this.evenCss:this.oddCss)}},writable:!0,configurable:!0},removeRowBg:{value:function(a){if(!isNaN(a)){var b=this.tf.tbl.rows;e.removeClass(b[a],this.oddCss),e.removeClass(b[a],this.evenCss)}},writable:!0,configurable:!0},remove:{value:function(){if(this.tf.hasGrid()){for(var a=(this.tf.tbl.rows,this.tf.refRow);a<this.tf.nbRows;a++)this.removeRowBg(a);this.tf.isStartBgAlternate=!0}},writable:!0,configurable:!0},enable:{value:function(){this.tf.alternateBgs=!0},writable:!0,configurable:!0},disable:{value:function(){this.tf.alternateBgs=!1},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("modules/colOps",["exports","../dom","../string","../types"],function(exports,_dom,_string,_types){var _prototypeProperties=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},_classCallCheck=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},Dom=_dom.Dom,Str=_string.Str,Types=_types.Types,ColOps=exports.ColOps=function(){function ColOps(a){_classCallCheck(this,ColOps);var b=a.config();this.colOperation=b.col_operation,this.onBeforeOperation=Types.isFn(b.on_before_operation)?b.on_before_operation:null,this.onAfterOperation=Types.isFn(b.on_after_operation)?b.on_after_operation:null,this.tf=a}return _prototypeProperties(ColOps,null,{calc:{value:function calc(){if(this.tf.isFirstLoad||this.tf.hasGrid()){this.onBeforeOperation&&this.onBeforeOperation.call(null,this.tf);var colOperation=this.colOperation,labelId=colOperation.id,colIndex=colOperation.col,operation=colOperation.operation,outputType=colOperation.write_method,totRowIndex=colOperation.tot_row_index,excludeRow=colOperation.exclude_row,decimalPrecision=void 0!==colOperation.decimal_precision?colOperation.decimal_precision:2,ucolIndex=[],ucolMax=0;ucolIndex[ucolMax]=colIndex[0];for(var ii=1;ii<colIndex.length;ii++){for(var saved=0,jj=0;ucolMax>=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==Str.lower(typeof labelId)&&"object"==Str.lower(typeof colIndex)&&"object"==Str.lower(typeof operation))for(var row=this.tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(this.tf.getColValues(ucolIndex[ucol],!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;k<colIndex.length;k++)if(colIndex[k]===ucolIndex[ucol])switch(mThisCol++,opsThisCol[mThisCol]=Str.lower(operation[k]),decThisCol[mThisCol]=decimalPrecision[k],labThisCol[mThisCol]=labelId[k],oTypeThisCol=void 0!==outputType&&"object"===Str.lower(typeof outputType)?outputType[k]:null,opsThisCol[mThisCol]){case"mean":meanFlag=1;break;case"sum":sumFlag=1;break;case"min":minFlag=1;break;case"max":maxFlag=1;break;case"median":medFlag=1;break;case"q1":q1Flag=1;break;case"q3":q3Flag=1}for(var j=0;j<colvalues[ucol].length;j++){if((1==q1Flag||1==q3Flag||1==medFlag)&&j<colvalues[ucol].length-1)for(k=j+1;k<colvalues[ucol].length;k++)eval(colvalues[ucol][k])<eval(colvalues[ucol][j])&&(temp=colvalues[ucol][j],colvalues[ucol][j]=colvalues[ucol][k],colvalues[ucol][k]=temp);var cvalue=parseFloat(colvalues[ucol][j]);theList[j]=parseFloat(cvalue),isNaN(cvalue)||(nbvalues++,(1===sumFlag||1===meanFlag)&&(sumValue+=parseFloat(cvalue)),1===minFlag&&(minValue=null===minValue?parseFloat(cvalue):parseFloat(cvalue)<minValue?parseFloat(cvalue):minValue),1===maxFlag&&(maxValue=null===maxValue?parseFloat(cvalue):parseFloat(cvalue)>maxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),Dom.id(labThisCol[i]))switch(Str.lower(oTypeThisCol)){case"innerhtml":Dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result;
break;case"setvalue":Dom.id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=Dom.id(labThisCol[i]).firstChild,txtnode=Dom.text(result);Dom.id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{Dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?row[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,this.tf)}},writable:!0,configurable:!0}}),ColOps}();Object.defineProperty(exports,"__esModule",{value:!0})}),SortableTable.gecko="Gecko"==navigator.product,SortableTable.msie=/msie/i.test(navigator.userAgent),SortableTable.removeBeforeSort=SortableTable.gecko,SortableTable.prototype.onsort=function(){},SortableTable.prototype.defaultDescending=!1,SortableTable.prototype._sortTypeInfo={},SortableTable.prototype.setTable=function(a){this.tHead&&this.uninitHeader(),this.element=a,this.setTHead(a.tHead),this.setTBody(a.tBodies[0])},SortableTable.prototype.setTHead=function(a){this.tHead&&this.tHead!=a&&this.uninitHeader(),this.tHead=a,this.initHeader(this.sortTypes)},SortableTable.prototype.setTBody=function(a){this.tBody=a},SortableTable.prototype.setSortTypes=function(a){this.tHead&&this.uninitHeader(),this.sortTypes=a||[],this.tHead&&this.initHeader(this.sortTypes)},SortableTable.prototype.initHeader=function(a){if(this.tHead){var b=this.tHead.rows[0].cells,c=this.tHead.ownerDocument||this.tHead.document;this.sortTypes=a||[];for(var d,e,f=b.length,g=0;f>g;g++)e=b[g],null!=this.sortTypes[g]&&"None"!=this.sortTypes[g]?(d=c.createElement("IMG"),d.src="images/blank.png",e.appendChild(d),null!=this.sortTypes[g]&&(e._sortType=this.sortTypes[g]),"undefined"!=typeof e.addEventListener?e.addEventListener("click",this._headerOnclick,!1):"undefined"!=typeof e.attachEvent?e.attachEvent("onclick",this._headerOnclick):e.onclick=this._headerOnclick):(e.setAttribute("_sortType",a[g]),e._sortType="None");this.updateHeaderArrows()}},SortableTable.prototype.uninitHeader=function(){if(this.tHead)for(var a,b=this.tHead.rows[0].cells,c=b.length,d=0;c>d;d++)a=b[d],null!=a._sortType&&"None"!=a._sortType&&(a.removeChild(a.lastChild),"undefined"!=typeof a.removeEventListener?a.removeEventListener("click",this._headerOnclick,!1):"undefined"!=typeof a.detachEvent&&a.detachEvent("onclick",this._headerOnclick),a._sortType=null,a.removeAttribute("_sortType"))},SortableTable.prototype.updateHeaderArrows=function(){if(this.tHead)for(var a,b=this.tHead.rows[0].cells,c=b.length,d=0;c>d;d++)null!=b[d]._sortType&&"None"!=b[d]._sortType&&(a=b[d].lastChild,a.className=d==this.sortColumn?"sort-arrow "+(this.descending?"descending":"ascending"):"sort-arrow")},SortableTable.prototype.headerOnclick=function(a){for(var b=a.target||a.srcElement;"TD"!=b.tagName;)b=b.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(b):b.cellIndex)},SortableTable.getCellIndex=function(a){var b,c=a.parentNode.childNodes,d=c.length;for(b=0;c[b]!=a&&d>b;b++);return b},SortableTable.prototype.getSortType=function(a){return this.sortTypes[a]||"String"},SortableTable.prototype.sort=function(a,b,c){if(this.tBody&&(null==c&&(c=this.getSortType(a)),"None"!=c)){this.descending=null==b?this.sortColumn!=a?this.defaultDescending:!this.descending:b,this.sortColumn=a,"function"==typeof this.onbeforesort&&this.onbeforesort();var d=this.getSortFunction(c,a),e=this.getCache(c,a),f=this.tBody;if(e.sort(d),this.descending&&e.reverse(),SortableTable.removeBeforeSort){var g=f.nextSibling,h=f.parentNode;h.removeChild(f)}for(var i=e.length,j=0;i>j;j++)f.appendChild(e[j].element);SortableTable.removeBeforeSort&&h.insertBefore(f,g),this.updateHeaderArrows(),this.destroyCache(e),"function"==typeof this.onsort&&this.onsort()}},SortableTable.prototype.asyncSort=function(a,b,c){var d=this;this._asyncsort=function(){d.sort(a,b,c)},window.setTimeout(this._asyncsort,1)},SortableTable.prototype.getCache=function(a,b){if(!this.tBody)return[];for(var c,d=this.tBody.rows,e=d.length,f=new Array(e),g=0;e>g;g++)c=d[g],f[g]={value:this.getRowValue(c,a,b),element:c};return f},SortableTable.prototype.destroyCache=function(a){for(var b=a.length,c=0;b>c;c++)a[c].value=null,a[c].element=null,a[c]=null},SortableTable.prototype.getRowValue=function(a,b,c){if(this._sortTypeInfo[b]&&this._sortTypeInfo[b].getRowValue)return this._sortTypeInfo[b].getRowValue(a,c);var d,e=a.cells[c];return d="undefined"!=typeof e.innerText?e.innerText:SortableTable.getInnerText(e),this.getValueFromString(d,b)},SortableTable.getInnerText=function(a){for(var b="",c=a.childNodes,d=c.length,e=0;d>e;e++)switch(c[e].nodeType){case 1:b+=SortableTable.getInnerText(c[e]);break;case 3:b+=c[e].nodeValue}return b},SortableTable.prototype.getValueFromString=function(a,b){return this._sortTypeInfo[b]?this._sortTypeInfo[b].getValueFromString(a):a},SortableTable.prototype.getSortFunction=function(a){return this._sortTypeInfo[a]?this._sortTypeInfo[a].compare:SortableTable.basicCompare},SortableTable.prototype.destroy=function(){this.uninitHeader();var a=this.document.parentWindow;a&&"undefined"!=typeof a.detachEvent&&a.detachEvent("onunload",this._onunload),this._onunload=null,this.element=null,this.tHead=null,this.tBody=null,this.document=null,this._headerOnclick=null,this.sortTypes=null,this._asyncsort=null,this.onsort=null},SortableTable.prototype.addSortType=function(a,b,c,d){this._sortTypeInfo[a]={type:a,getValueFromString:b||SortableTable.idFunction,compare:c||SortableTable.basicCompare,getRowValue:d}},SortableTable.prototype.removeSortType=function(a){delete this._sortTypeInfo[a]},SortableTable.basicCompare=function(a,b){return a.value<b.value?-1:b.value<a.value?1:0},SortableTable.idFunction=function(a){return a},SortableTable.toUpperCase=function(a){return a.toUpperCase()},SortableTable.toDate=function(a){var b=a.split("-"),c=new Date(0);return c.setFullYear(b[0]),c.setDate(b[2]),c.setMonth(b[1]-1),c.valueOf()},SortableTable.prototype.addSortType("Number",Number),SortableTable.prototype.addSortType("CaseInsensitiveString",SortableTable.toUpperCase),SortableTable.prototype.addSortType("Date",SortableTable.toDate),SortableTable.prototype.addSortType("String"),define("extensions/sortabletable/sortabletable",function(a){return function(){var b;return b||a.SortableTable}}(this)),define("extensions/sortabletable/adapterSortabletable",["exports","../../types","../../dom","../../array","../../event","../../date","../../helpers"],function(a,b,c,d,e,f,g){function h(a){return w.removeNbFormat(a,"us")}function i(a){return w.removeNbFormat(a,"eu")}function j(a,b){return v.format(a,b)}function k(a){return j(a,"DMY")}function l(a){return j(a,"MDY")}function m(a){return j(a,"YMD")}function n(a){return j(a,"DDMMMYYYY")}function o(a){var b=a.split(".");for(var c in b){for(var d=b[c];3>d.length;)d="0"+d;b[c]=d}return b.join(".")}function p(a,b){var c=o(a.value.toLowerCase()),d=o(b.value.toLowerCase());return c==d?0:d>c?-1:1}{var q=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},r=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},s=b.Types,t=c.Dom,u=(d.Arr,e.Event),v=f.DateHelper,w=g.Helpers;a.AdapterSortableTable=function(){function a(b){r(this,a);var c=b.config();this.isPaged=!1,this.sorted=!1,this.sortImgPath=c.sort_images_path||b.themesPath,this.sortImgBlank=c.sort_image_blank||"blank.png",this.sortImgClassName=c.sort_image_class_name||"sort-arrow",this.sortImgAscClassName=c.sort_image_asc_class_name||"ascending",this.sortImgDescClassName=c.sort_image_desc_class_name||"descending",this.sortCustomKey=c.sort_custom_key||"data-tf-sortKey",this.onSortLoaded=s.isFn(c.on_sort_loaded)?c.on_sort_loaded:null,this.onBeforeSort=s.isFn(c.on_before_sort)?c.on_before_sort:null,this.onAfterSort=s.isFn(c.on_after_sort)?c.on_after_sort:null,this.tf=b}return q(a,null,{init:{value:function(){var a=this.tf,b=a.sortConfig,c=this;if(s.isUndef(SortableTable))throw new Error("SortableTable class not found.");this.overrideSortableTable(),this.setSortTypes(),b.sortCol&&this.stt.sort(b.sortCol[0],b.sortCol[1]),a.isSortEnabled=!0,this.onSortLoaded&&this.onSortLoaded.call(null,a,this),this.stt.onbeforesort=function(){this.onBeforeSort&&this.onBeforeSort.call(null,a,this.stt.sortColumn),a.performSort(),a.paging&&(c.isPaged=!0,a.paging=!1,a.Cpt.paging.destroy())},this.stt.onsort=function(){if(c.sorted=!0,a.alternateBgs)for(var b=a.tbl.rows,d=0,e=function(b,c,d){s.isUndef(d)&&(d=!1);var e=a.Cpt.alternateRows,f=e.oddCss,g=e.evenCss;t.removeClass(b,f),t.removeClass(b,g),d||t.addClass(b,c%2?f:g)},f=a.refRow;f<a.nbRows;f++){var g=b[f].getAttribute("validRow");a.paging&&""===b[f].style.display?(e(b[f],d),d++):"true"!==g&&null!==g||""!==b[f].style.display?e(b[f],d,!0):(e(b[f],d),d++)}if(c.isPaged){var h=a.Cpt.paging,i=a.config();if(h.hasResultsPerPage){var j=h.resultsPerPageSlc;i.paging_length=j.options[j.selectedIndex].value}h.addPaging(!1),h.setPage(h.currentPageNb),c.isPaged=!1}c.onAfterSort&&c.onAfterSort.call(null,a,a.stt.sortColumn)}},writable:!0,configurable:!0},sortByColumnIndex:{value:function(a){this.stt.sort(a)},writable:!0,configurable:!0},overrideSortableTable:{value:function(){var a=this,b=this.tf;SortableTable.prototype.headerOnclick=function(a){if(b.sort){for(var c=a.target||a.srcElement;"TD"!==c.tagName&&"TH"!==c.tagName;)c=c.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(c):c.cellIndex)}},SortableTable.getCellIndex=function(a){var b,c=a.parentNode.cells,d=c.length;for(b=0;c[b]!=a&&d>b;b++);return b},SortableTable.prototype.initHeader=function(c){var d=this;if(!d.tHead)throw new Error("Sorting feature requires a THEAD element");d.headersRow=b.headersRow;{var e=d.tHead.rows[d.headersRow].cells;d.tHead.ownerDocument||d.tHead.document}d.sortTypes=c||[];for(var f,g,h=e.length,i=0;h>i;i++)g=e[i],null!==d.sortTypes[i]&&"None"!==d.sortTypes[i]?(g.style.cursor="pointer",f=t.create("img",["src",a.sortImgPath+a.sortImgBlank]),g.appendChild(f),null!==d.sortTypes[i]&&g.setAttribute("_sortType",d.sortTypes[i]),u.add(g,"click",d._headerOnclick)):(g.setAttribute("_sortType",c[i]),g._sortType="None");d.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var c,d,e,f=this;if(b.sortConfig.asyncSort&&null!==b.sortConfig.triggerIds){var g=b.sortConfig.triggerIds;c=[],d=g.length;for(var h=0;h<g.length;h++)c.push(t.id(g[h]))}else{if(!this.tHead)return;c=f.tHead.rows[f.headersRow].cells,d=c.length}for(var i=0;d>i;i++){var j=c[i].getAttribute("_sortType");null!==j&&"None"!==j&&(e=c[i].lastChild||c[i],"img"!==e.nodeName.toLowerCase()&&(e=t.create("img",["src",a.sortImgPath+a.sortImgBlank]),c[i].appendChild(e)),e.className=i===f.sortColumn?a.sortImgClassName+" "+(this.descending?a.sortImgDescClassName:a.sortImgAscClassName):a.sortImgClassName)}},SortableTable.prototype.getRowValue=function(a,b,c){var d=this,e=d._sortTypeInfo[b];if(e&&e.getRowValue)return e.getRowValue(a,c);var f=a.cells[c],g=SortableTable.getInnerText(f);return d.getValueFromString(g,b)},SortableTable.getInnerText=function(b){return b.getAttribute(a.sortCustomKey)?b.getAttribute(a.sortCustomKey):t.getText(b)}},writable:!0,configurable:!0},addSortType:{value:function(){SortableTable.prototype.addSortType(arguments[0],arguments[1],arguments[2],arguments[3])},writable:!0,configurable:!0},setSortTypes:{value:function(){for(var a=this,b=this.tf,c=b.sortConfig,d=c.sortTypes,e=[],f=0;f<b.nbCells;f++){var g;null!==d&&null!=d[f]?(g=d[f].toLowerCase(),"none"===g&&(g="None")):g=b.hasColNbFormat&&null!==b.colNbFormat[f]?b.colNbFormat[f].toLowerCase():b.hasColDateType&&null!==b.colDateType[f]?b.colDateType[f].toLowerCase()+"date":"String",e.push(g)}if(this.addSortType("number",Number),this.addSortType("caseinsensitivestring",SortableTable.toUpperCase),this.addSortType("date",SortableTable.toDate),this.addSortType("string"),this.addSortType("us",h),this.addSortType("eu",i),this.addSortType("dmydate",k),this.addSortType("ymddate",m),this.addSortType("mdydate",l),this.addSortType("ddmmmyyyydate",n),this.addSortType("ipaddress",o,p),this.stt=new SortableTable(b.tbl,e),c.asyncSort&&null!==c.triggerIds)for(var j=c.triggerIds,q=0;q<j.length;q++)if(null!==j[q]){var r=t.id(j[q]);r&&(r.style.cursor="pointer",u.add(r,"click",function(b){var c=b.target;a.tf.sort&&a.stt.asyncSort(Arr.indexByValue(j,c.id,!0))}),r.setAttribute("_sortType",e[q]))}},writable:!0,configurable:!0},destroy:{value:function(){var a=this.tf;a.sort=!1,this.sorted=!1,this.stt.destroy();for(var b=a.getFiltersId(),c=0;c<b.length;c++){var d=a.getHeaderElement(c),e=t.tag(d,"img");1===e.length&&d.removeChild(e[0])}},writable:!0,configurable:!0}}),a}()}Object.defineProperty(a,"__esModule",{value:!0})}),define("tablefilter",["exports","module","event","dom","string","cookie","types","array","helpers","date","sort","modules/store","modules/gridLayout","modules/loader","modules/highlightKeywords","modules/popupFilter","modules/dropdown","modules/checkList","modules/rowsCounter","modules/statusBar","modules/paging","modules/clearButton","modules/help","modules/alternateRows","modules/colOps","extensions/sortabletable/sortabletable","extensions/sortabletable/adapterSortabletable"],function(a,b,c,d,e,f,g,h,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(a,b){if(a){b||(b="us");var c=a;return c="us"===J.lower(b)?+c.replace(/[^\d\.-]/g,""):+c.replace(/[^\d\,-]/g,"").replace(",",".")}}function E(){if(eb.body.__defineGetter__&&HTMLElement){var a=HTMLElement.prototype;a.__defineGetter__&&a.__defineGetter__("outerHTML",function(){var a=this.parentNode,b=I.create(a.tagName);b.appendChild(this);var c=b.innerHTML;return a.appendChild(this),c}),a.__defineSetter__&&HTMLElement.prototype.__defineSetter__("outerHTML",function(a){var b=this.ownerDocument.createRange();b.setStartBefore(this);var c=b.createContextualFragment(a);return this.parentNode.replaceChild(c,this),a})}}var F=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},G=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},H=c.Event,I=d.Dom,J=e.Str,K=f.Cookie,L=g.Types,M=h.Arr,N=(k.Helpers,l.DateHelper),O=(m.Sort,n.Store),P=o.GridLayout,Q=p.Loader,R=q.HighlightKeyword,S=r.PopupFilter,T=s.Dropdown,U=t.CheckList,V=u.RowsCounter,W=v.StatusBar,X=w.Paging,Y=x.ClearButton,Z=y.Help,$=z.AlternateRows,_=A.ColOps,ab=C.AdapterSortableTable,bb=window,cb=N.isValid,db=N.format,eb=bb.document,fb=function(){function a(b){if(G(this,a),0!==arguments.length){if(this.id=b,this.version="3.0",this.year=(new Date).getFullYear(),this.tbl=I.id(b),this.startRow=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=null,this.nbRows=null,this.nbCells=null,this._hasGrid=!1,this.enableModules=!1,!this.tbl||"table"!==J.lower(this.tbl.nodeName)||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter class: HTML table not found.");if(arguments.length>1)for(var c=0;c<arguments.length;c++){var d=arguments[c],e=typeof d;switch(J.lower(e)){case"number":this.startRow=d;break;case"object":this.cfg=d}}var f=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(g){this.nbCells=this.getCellsNb(0)}this.basePath=void 0!==f.base_path?f.base_path:"",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltCol=[];for(var h=0;h<this.nbCells;h++){var i=f["col_"+h],j=i?J.lower(i):this.fltTypeInp;this.fltCol.push(j),this["col"+h]=j}this.publicMethods=void 0!==f.public_methods?f.public_methods:!1,this.fltGrid=f.grid===!1?!1:!0,this.gridLayout=f.grid_layout?!0:!1,this.sourceTblHtml=null,this.gridLayout&&(void 0===this.tbl.outerHTML&&E(),this.sourceTblHtml=this.tbl.outerHTML),this.filtersRowIndex=f.filters_row_index||0,this.headersRow=f.headers_row_index||(0===this.filtersRowIndex?1:0),this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==f.filters_cell_tag||"td"!==f.filters_cell_tag?"td":f.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.tblData=[],this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.contDiv=null,this.infDivCssClass=f.inf_div_css_class||"inf",this.lDivCssClass=f.left_div_css_class||"ldiv",this.rDivCssClass=f.right_div_css_class||"rdiv",this.mDivCssClass=f.middle_div_css_class||"mdiv",this.contDivCssClass=f.content_div_css_class||"cont",this.stylesheet=f.stylesheet||this.basePath+"filtergrid.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=f.flts_row_css_class||"fltrow",this.enableIcons=f.enable_icons===!1?!1:!0,this.alternateBgs=f.alternate_rows===!0?!0:!1,this.hasColWidth=f.col_width===!0?!0:!1,this.colWidth=this.hasColWidth?f.col_width:null,this.fixedHeaders=f.fixed_headers===!0?!0:!1,this.tBodyH=isNaN(f.tbody_height)?200:f.tbody_height,this.fltCssClass=f.flt_css_class||"flt",this.fltMultiCssClass=f.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=f.flt_small_css_class||"flt_s",this.singleFltCssClass=f.single_flt_css_class||"single_flt",this.isStartBgAlternate=!0,this.enterKey=f.enter_key===!1?!1:!0,this.isModFilterFn=f.mod_filter_fn===!0?!0:!1,this.modFilterFn=this.isModFilterFn?f.mod_filter_fn:null,this.onBeforeFilter=L.isFn(f.on_before_filter)?f.on_before_filter:null,this.onAfterFilter=L.isFn(f.on_after_filter)?f.on_after_filter:null,this.matchCase=f.match_case===!0?!0:!1,this.exactMatch=f.exact_match===!0?!0:!1,this.linkedFilters=f.linked_filters===!0?!0:!1,this.disableExcludedOptions=f.disable_excluded_options===!0?!0:!1,this.activeFlt=null,this.activeFilterId=null,this.hasColOperation=f.col_operation?!0:!1,this.colOperation=null,this.hasVisibleRows=f.rows_always_visible?!0:!1,this.visibleRows=this.hasVisibleRows?f.rows_always_visible:[],this.searchType=f.search_type||"include",this.isExternalFlt=f.external_flt_grid===!0?!0:!1,this.externalFltTgtIds=f.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(f.exec_delay)?100:parseInt(f.exec_delay,10),this.onFiltersLoaded=L.isFn(f.on_filters_loaded)?f.on_filters_loaded:null,this.singleSearchFlt=f.single_search_filter===!0?!0:!1,this.onRowValidated=L.isFn(f.on_row_validated)?f.on_row_validated:null,this.customCellDataCols=f.custom_cell_data_cols?f.custom_cell_data_cols:[],this.customCellData=L.isFn(f.custom_cell_data)?f.custom_cell_data:null,this.watermark=f.watermark||"",this.isWatermarkArray=L.isArray(this.watermark),this.toolBarTgtId=f.toolbar_target_id||null,this.helpInstructions=f.help_instructions||!1,this.popUpFilters=f.popup_filters===!0?!0:!1,this.markActiveColumns=f.mark_active_columns===!0?!0:!1,this.activeColumnsCssClass=f.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=L.isFn(f.on_before_active_column)?f.on_before_active_column:null,this.onAfterActiveColumn=L.isFn(f.on_after_active_column)?f.on_after_active_column:null,this.displayAllText=f.display_all_text||"",this.enableEmptyOption=f.enable_empty_option===!0?!0:!1,this.emptyText=f.empty_text||"(Empty)",this.enableNonEmptyOption=f.enable_non_empty_option===!0?!0:!1,this.nonEmptyText=f.non_empty_text||"(Non empty)",this.onSlcChange=f.on_change===!1?!1:!0,this.sortSlc=f.sort_select===!1?!1:!0,this.isSortNumAsc=f.sort_num_asc===!0?!0:!1,this.sortNumAsc=this.isSortNumAsc?f.sort_num_asc:null,this.isSortNumDesc=f.sort_num_desc===!0?!0:!1,this.sortNumDesc=this.isSortNumDesc?f.sort_num_desc:null,this.fillSlcOnDemand=f.fill_slc_on_demand===!0?!0:!1,this.hasCustomSlcOptions=L.isObj(f.custom_slc_options)?!0:!1,this.customSlcOptions=L.isArray(f.custom_slc_options)?f.custom_slc_options:null,this.rgxOperator=f.regexp_operator||"rgx:",this.emOperator=f.empty_operator||"[empty]",this.nmOperator=f.nonempty_operator||"[nonempty]",this.orOperator=f.or_operator||"||",this.anOperator=f.and_operator||"&&",this.grOperator=f.greater_operator||">",this.lwOperator=f.lower_operator||"<",this.leOperator=f.lower_equal_operator||"<=",this.geOperator=f.greater_equal_operator||">=",this.dfOperator=f.different_operator||"!",this.lkOperator=f.like_operator||"*",this.eqOperator=f.equal_operator||"=",this.stOperator=f.start_with_operator||"{",this.enOperator=f.end_with_operator||"}",this.curExp=f.cur_exp||"^[¥£€$]",this.separator=f.separator||",",this.rowsCounter=f.rows_counter===!0?!0:!1,this.statusBar=f.status_bar===!0?!0:!1,this.loader=f.loader===!0?!0:!1,this.displayBtn=f.btn===!0?!0:!1,this.btnText=f.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=f.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=f.btn_reset===!0?!0:!1,this.btnResetCssClass=f.btn_reset_css_class||"reset",this.onBeforeReset=L.isFn(f.on_before_reset)?f.on_before_reset:null,this.onAfterReset=L.isFn(f.on_after_reset)?f.on_after_reset:null,this.paging=f.paging===!0?!0:!1,this.nbVisibleRows=0,this.nbHiddenRows=0,this.sort=f.sort===!0?!0:!1,this.isSortEnabled=!1,this.sortConfig=f.sort_config||{},this.sortConfig.name=void 0!==this.sortConfig.name?f.sort_config.name:"sortabletable",this.sortConfig.src=void 0!==this.sortConfig.src?f.sort_config.src:this.basePath+"extensions/sortabletable/sortabletable.js",this.sortConfig.adapterSrc=void 0!==this.sortConfig.adapter_src?f.sort_config.adapter_src:this.basePath+"extensions/sortabletable/adapterSortabletable.js",this.sortConfig.initialize=void 0!==this.sortConfig.initialize?f.sort_config.initialize:function(){},this.sortConfig.sortTypes=L.isArray(this.sortConfig.sort_types)?f.sort_config.sort_types:[],this.sortConfig.sortCol=void 0!==this.sortConfig.sort_col?f.sort_config.sort_col:null,this.sortConfig.asyncSort=this.sortConfig.async_sort===!0?!0:!1,this.sortConfig.triggerIds=L.isArray(this.sortConfig.sort_trigger_ids)?f.sort_config.sort_trigger_ids:[],this.selectable=f.selectable===!0?!0:!1,this.editable=f.editable===!0?!0:!1,this.ezEditTableConfig=f.ezEditTable_config||{},this.ezEditTableConfig.name=void 0!==this.ezEditTableConfig.name?f.ezEditTable_config.name:"ezedittable",this.ezEditTableConfig.src=void 0!==this.ezEditTableConfig.src?f.ezEditTable_config.src:this.basePath+"ezEditTable/ezEditTable.js",this.ezEditTableConfig.loadStylesheet=this.ezEditTableConfig.loadStylesheet===!0?!0:!1,this.ezEditTableConfig.stylesheet=this.ezEditTableConfig.stylesheet||this.basePath+"ezEditTable/ezEditTable.css",this.ezEditTableConfig.stylesheetName=void 0!==this.ezEditTableConfig.stylesheetName?f.ezEditTable_config.stylesheetName:"ezEditTableCss",this.ezEditTableConfig.err='Failed to instantiate EditTable object.\n"ezEditTable" module may not be available.',this.onKeyUp=f.on_keyup===!0?!0:!1,this.onKeyUpDelay=isNaN(f.on_keyup_delay)?900:f.on_keyup_delay,this.isUserTyping=null,this.onKeyUpTimer=void 0,this.highlightKeywords=f.highlight_keywords===!0?!0:!1,this.defaultDateType=f.default_date_type||"DMY",this.thousandsSeparator=f.thousands_separator||",",this.decimalSeparator=f.decimal_separator||".",this.hasColNbFormat=f.col_number_format===!0?!0:!1,this.colNbFormat=L.isArray(this.hasColNbFormat)?f.col_number_format:null,this.hasColDateType=f.col_date_type===!0?!0:!1,this.colDateType=L.isArray(this.hasColDateType)?f.col_date_type:null,this.msgFilter=f.msg_filter||"Filtering data...",this.msgPopulate=f.msg_populate||"Populating filter...",this.msgPopulateCheckList=f.msg_populate_checklist||"Populating list...",this.msgChangePage=f.msg_change_page||"Collecting paging data...",this.msgClear=f.msg_clear||"Clearing filters...",this.msgChangeResults=f.msg_change_results||"Changing results per page...",this.msgResetValues=f.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=f.msg_reset_page||"Re-setting page...",this.msgResetPageLength=f.msg_reset_page_length||"Re-setting page length...",this.msgSort=f.msg_sort||"Sorting data...",this.msgLoadExtensions=f.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=f.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxContentDiv="cont_",this.prfxCheckListDiv="chkdiv_",this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_",this.prfxCounter="counter_",this.prfxTotRows="totrows_span_",this.prfxTotRowsTxt="totRowsTextSpan_",this.prfxResetSpan="resetspan_",this.prfxLoader="load_",this.prfxStatus="status_",this.prfxStatusSpan="statusSpan_",this.prfxStatusTxt="statusText_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.prfxMainTblCont="gridCont_",this.prfxTblCont="tblCont_",this.prfxHeadTblCont="tblHeadCont_",this.prfxHeadTbl="tblHead_",this.prfxGridFltTd="_td_",this.prfxGridTh="tblHeadTh_",this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_",this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.hasStoredValues=!1,this.rememberGridValues=f.remember_grid_values===!0?!0:!1,this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&f.remember_page_number?!0:!1,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&f.remember_page_length?!0:!1,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.hasExtensions=f.extensions===!0?!0:!1,this.extensions=this.hasExtensions?f.extensions:null,this.enableDefaultTheme=f.enable_default_theme===!0?!0:!1,this.hasThemes=f.enable_default_theme||f.themes&&L.isObj(f.themes)?!0:!1,this.themes=this.hasThemes?f.themes:null,this.themesPath=f.themes_path||this.basePath+"TF_Themes/",this.Cpt={loader:null,alternateRows:null,colOps:null,rowsCounter:null,gridLayout:null,store:null,highlightKeywords:null,paging:null,checkList:null,dropdown:null,popupFilter:null,clearButton:null,help:null,statusBar:null},this.Extensions={sort:null};var k=this;this.Evt={name:{filter:"Filter",dropdown:"dropdown",checklist:"checkList",changepage:"changePage",clear:"Clear",changeresultsperpage:"changeResults",resetvalues:"ResetValues",resetpage:"resetPage",resetpagelength:"resetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},getKeyCode:function(a){return a.charCode?a.charCode:a.keyCode?a.keyCode:a.which?a.which:0},_DetectKey:function(a){if(k.enterKey){var b=a||bb.event;if(b){var c=k.Evt.getKeyCode(b);13===c?(k._filter(),H.cancel(b),H.stop(b)):(k.isUserTyping=!0,bb.clearInterval(k.onKeyUpTimer),k.onKeyUpTimer=void 0)}}},_OnKeyUp:function(a){function b(){bb.clearInterval(k.onKeyUpTimer),k.onKeyUpTimer=void 0,k.isUserTyping||(k.filter(),k.isUserTyping=null)}if(k.onKeyUp){var c=a||bb.event,d=k.Evt.getKeyCode(c);k.isUserTyping=!1,13!==d&&9!==d&&27!==d&&38!==d&&40!==d?void 0===k.onKeyUpTimer&&(k.onKeyUpTimer=bb.setInterval(b,k.onKeyUpDelay)):(bb.clearInterval(k.onKeyUpTimer),k.onKeyUpTimer=void 0)}},_OnKeyDown:function(){k.onKeyUp&&(k.isUserTyping=!0)},_OnInpBlur:function(){k.onKeyUp&&(k.isUserTyping=!1,bb.clearInterval(k.onKeyUpTimer)),k.ezEditTable&&(k.editable&&k.ezEditTable.Editable.Set(),k.selectable&&k.ezEditTable.Selection.Set())},_OnInpFocus:function(a){var b=a||bb.event;k.activeFilterId=this.getAttribute("id"),k.activeFlt=I.id(k.activeFilterId),k.popUpFilters&&(H.cancel(b),H.stop(b)),k.ezEditTable&&(k.editable&&k.ezEditTable.Editable.Remove(),k.selectable&&k.ezEditTable.Selection.Remove())},_OnSlcFocus:function(a){var b=a||bb.event;if(k.activeFilterId=this.getAttribute("id"),k.activeFlt=I.id(k.activeFilterId),k.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var c=this.getAttribute("ct");k.Cpt.dropdown._build(c)}k.popUpFilters&&(H.cancel(b),H.stop(b))},_OnSlcChange:function(a){if(k.activeFlt){var b=(k.activeFlt.getAttribute("colIndex"),a||bb.event);k.popUpFilters&&H.stop(b),k.onSlcChange&&k.filter()}},_OnSlcBlur:function(){},_OnCheckListClick:function(){if(k.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var a=this.getAttribute("ct");k.Cpt.checkList._build(a),k.Cpt.checkList.checkListDiv[a].onclick=null,k.Cpt.checkList.checkListDiv[a].title=""}},_OnCheckListFocus:function(){k.activeFilterId=this.firstChild.getAttribute("id"),k.activeFlt=I.id(k.activeFilterId)},_OnCheckListBlur:function(){},_OnBtnClick:function(){k.filter()},_OnSlcPagesChangeEvt:null,_EnableSlc:function(){this.firstChild.disabled=!1,this.firstChild.focus(),this.onclick=null},_Paging:{nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}}}return F(a,null,{init:{value:function(){if(!this._hasGrid){this.tbl||(this.tbl=I.id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popUpFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var a,b=this.cfg,c=this.singleSearchFlt?1:this.nbCells;if(void 0===window["tf_"+this.id]&&(window["tf_"+this.id]=this),this.includeFile(this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._LoadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(this.Cpt.store=new O(this)),this.gridLayout&&(this.Cpt.gridLayout=new P(this),this.Cpt.gridLayout.init()),this.loader&&(this.Cpt.loader||(this.Cpt.loader=new Q(this))),this.highlightKeywords&&(this.Cpt.highlightKeyword=new R(this)),this.popUpFilters&&(this.Cpt.popupFilter||(this.Cpt.popupFilter=new S(this)),this.Cpt.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var d;if(!this.gridLayout){var e=I.tag(this.tbl,"thead");d=e.length>0?e[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,d.className=this.fltsRowCssClass,!this.isExternalFlt||this.gridLayout&&!this.popUpFilters||(d.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var f=0;c>f;f++){this.popUpFilters&&this.Cpt.popupFilter.build(f);var g=I.create(this.fltCellTag),h=this["col"+f],i=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[f]:null;if(this.singleSearchFlt&&(g.colSpan=this.nbCells),this.gridLayout||d.appendChild(g),a=f==c-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,void 0===h&&(h=void 0===b["col_"+f]?this.fltTypeInp:J.lower(b["col_"+f])),this.singleSearchFlt&&(h=this.fltTypeInp,a=this.singleFltCssClass),h===this.fltTypeSlc||h===this.fltTypeMulti){this.Cpt.dropdown||(this.Cpt.dropdown=new T(this));var j=this.Cpt.dropdown,k=I.create(this.fltTypeSlc,["id",this.prfxFlt+f+"_"+this.id],["ct",f],["filled","0"]);if(h===this.fltTypeMulti&&(k.multiple=this.fltTypeMulti,k.title=j.multipleSlcTooltip),k.className=J.lower(h)===this.fltTypeSlc?a:this.fltMultiCssClass,i?(I.id(i).appendChild(k),this.externalFltEls.push(k)):g.appendChild(k),this.fltIds.push(this.prfxFlt+f+"_"+this.id),this.fillSlcOnDemand||j._build(f),H.add(k,"keypress",this.Evt._DetectKey),H.add(k,"change",this.Evt._OnSlcChange),H.add(k,"focus",this.Evt._OnSlcFocus),H.add(k,"blur",this.Evt._OnSlcBlur),this.fillSlcOnDemand){var l=I.createOpt(this.displayAllText,"");k.appendChild(l)}}else if(h===this.fltTypeCheckList){this.Cpt.checkList||(this.Cpt.checkList=new U(this));var m=I.create("div",["id",this.prfxCheckListDiv+f+"_"+this.id],["ct",f],["filled","0"]);m.className=this.Cpt.checkList.checkListDivCssClass,i?(I.id(i).appendChild(m),this.externalFltEls.push(m)):g.appendChild(m),this.Cpt.checkList.checkListDiv[f]=m,this.fltIds.push(this.prfxFlt+f+"_"+this.id),this.fillSlcOnDemand||this.Cpt.checkList._build(f),this.fillSlcOnDemand&&(H.add(m,"click",this.Evt._OnCheckListClick),m.appendChild(I.text(this.Cpt.checkList.activateCheckListTxt))),H.add(m,"click",this.Evt._OnCheckListFocus)
}else{var n=h===this.fltTypeInp?"text":"hidden",o=I.create(this.fltTypeInp,["id",this.prfxFlt+f+"_"+this.id],["type",n],["ct",f]);if("hidden"!==n&&this.watermark&&o.setAttribute("placeholder",this.isWatermarkArray?this.watermark[f]:this.watermark),o.className=a,o.onfocus=this.Evt._OnInpFocus,i?(I.id(i).appendChild(o),this.externalFltEls.push(o)):g.appendChild(o),this.fltIds.push(this.prfxFlt+f+"_"+this.id),o.onkeypress=this.Evt._DetectKey,o.onkeydown=this.Evt._OnKeyDown,o.onkeyup=this.Evt._OnKeyUp,o.onblur=this.Evt._OnInpBlur,this.rememberGridValues){var p=this.Cpt.store.getFilterValues(this.fltsValuesCookie);" "!=p[f]&&this.setFilterValue(f,p[f],!1)}}if(f==c-1&&this.displayBtn){var q=I.create(this.fltTypeInp,["id",this.prfxValButton+f+"_"+this.id],["type","button"],["value",this.btnText]);q.className=this.btnCssClass,i?I.id(i).appendChild(q):g.appendChild(q),q.onclick=this.Evt._OnBtnClick}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.rowsCounter&&(this.Cpt.rowsCounter=new V(this),this.Cpt.rowsCounter.init()),this.statusBar&&(this.Cpt.statusBar=new W(this),this.Cpt.statusBar.init()),(this.paging||this.Cpt.paging&&this.Cpt.paging.isPagingRemoved)&&(this.Cpt.paging=new X(this),this.Cpt.paging.init()),this.btnReset&&(this.Cpt.clearButton=new Y(this),this.Cpt.clearButton.init()),this.helpInstructions&&(this.Cpt.help=new Z(this),this.Cpt.help.init()),this.hasColWidth&&!this.gridLayout&&this.setColWidths(),this.alternateBgs&&(this.Cpt.alternateRows=new $(this),this.Cpt.alternateRows.init()),this.hasColOperation&&(this.Cpt.colOps=new _(this),this.Cpt.colOps.calc()),this.sort&&this.setSort(),(this.selectable||this.editable)&&this.SetEditable(),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||I.addClass(this.tbl,this.prfxTf),this.loader&&this.Cpt.loader.show("none"),this.hasExtensions&&this.LoadExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}},writable:!0,configurable:!0},EvtManager:{value:function(a,b){function c(){if(a){switch(a){case d.Evt.name.filter:d.isModFilterFn?d.modFilterFn.call(null,d):d._filter();break;case d.Evt.name.dropdown:d.linkedFilters?d.Cpt.dropdown._build(e,!0):d.Cpt.dropdown._build(e,!1,f,g);break;case d.Evt.name.checklist:d.Cpt.checkList._build(e,f,g);break;case d.Evt.name.changepage:d.Cpt.paging._changePage(h);break;case d.Evt.name.clear:d._clearFilters(),d._filter();break;case d.Evt.name.changeresultsperpage:d.Cpt.paging._changeResultsPerPage();break;case d.Evt.name.resetvalues:d._resetValues(),d._filter();break;case d.Evt.name.resetpage:d.Cpt.paging._resetPage(d.pgNbCookie);break;case d.Evt.name.resetpagelength:d.Cpt.paging._resetPageLength(d.pgLenCookie);break;case d.Evt.name.sort:break;case d.Evt.name.loadextensions:d._LoadExtensions();break;case d.Evt.name.loadthemes:d._LoadThemes();break;default:d["_"+a].call(null,d,b)}d.statusBar&&d.Cpt.statusBar.message(""),d.loader&&d.Cpt.loader.show("none")}}var d=this,e=b&&void 0!==b.slcIndex?b.slcIndex:null,f=b&&void 0!==b.slcExternal?b.slcExternal:!1,g=b&&void 0!==b.slcId?b.slcId:null,h=b&&void 0!==b.pgIndex?b.pgIndex:null;if(this.loader||this.statusBar){try{this.Cpt.loader.show(""),this.Cpt.statusBar.message(this["msg"+a])}catch(i){}bb.setTimeout(c,this.execDelay)}else c()},writable:!0,configurable:!0},ImportModule:{value:function(a){a.path&&a.name&&this.includeFile(a.name,a.path,a.init)},writable:!0,configurable:!0},LoadExtensions:{value:function(){if(!this.Ext){var a=this;this.Ext={list:{},add:function(b,c,d,e){var f=d.split("/")[d.split("/").length-1],g=new RegExp(f),h=d.replace(g,"");a.Ext.list[b]={name:b,description:c,file:f,path:h,callback:e}}}}this.EvtManager(this.Evt.name.loadextensions)},writable:!0,configurable:!0},_LoadExtensions:{value:function(){if(this.hasExtensions&&L.isArray(this.extensions.name)&&L.isArray(this.extensions.src))for(var a=this.extensions,b=0;b<a.name.length;b++){var c=a.src[b],d=a.name[b],e=a.initialize&&a.initialize[b]?a.initialize[b]:null,f=a.description&&a.description[b]?a.description[b]:null;this.Ext.add(d,f,c,e),this.isImported(c)?e.call(null,this):this.includeFile(d,c,e)}},writable:!0,configurable:!0},LoadThemes:{value:function(){this.EvtManager(this.Evt.name.loadthemes)},writable:!0,configurable:!0},_LoadThemes:{value:function(){if(this.hasThemes){if(!this.Thm){var a=this;this.Thm={list:{},add:function(b,c,d,e){var f=d.split("/")[d.split("/").length-1],g=new RegExp(f),h=d.replace(g,"");a.Thm.list[b]={name:b,description:c,file:f,path:h,callback:e}}}}if(this.enableDefaultTheme&&(this.themes={name:["DefaultTheme"],src:[this.themesPath+"Default/TF_Default.css"],description:["Default Theme"]},this.Thm.add("DefaultTheme",this.themesPath+"Default/TF_Default.css","Default Theme")),L.isArray(this.themes.name)&&L.isArray(this.themes.src))for(var b=this.themes,c=0;c<b.name.length;c++){var d=b.src[c],e=b.name[c],f=b.initialize&&b.initialize[c]?b.initialize[c]:null,g=b.description&&b.description[c]?b.description[c]:null;this.Thm.add(e,g,d,f),this.isImported(d,"link")||this.includeFile(e,d,null,"link"),L.isFn(f)&&f.call(null,this)}this.btnResetText=null,this.btnResetHtml='<input type="button" value="" class="'+this.btnResetCssClass+'" title="Clear filters" />',this.btnPrevPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' previousPage" title="Previous page" />',this.btnNextPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' nextPage" title="Next page" />',this.btnFirstPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' firstPage" title="First page" />',this.btnLastPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' lastPage" title="Last page" />',this.loader=!0,this.loaderHtml='<div class="defaultLoader"></div>',this.loaderText=null}},writable:!0,configurable:!0},remove:{value:function(){if(this.fltGrid&&this._hasGrid){var a=this.tbl.rows;this.paging&&this.Cpt.paging.destroy(),this.statusBar&&this.Cpt.statusBar.destroy(),this.rowsCounter&&this.Cpt.rowsCounter.destroy(),this.btnReset&&this.Cpt.clearButton.destroy(),this.helpInstructions&&this.Cpt.help.destroy(),this.isExternalFlt&&!this.popUpFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&this.Cpt.highlightKeyword.unhighlightAll(),this.sort&&this.Extensions.sort.destroy(),this.loader&&this.Cpt.loader.remove(),this.popUpFilters&&this.Cpt.popupFilter.destroy(),this.markActiveColumns&&this.clearActiveColumns(),(this.editable||this.selectable)&&this.RemoveEditable();for(var b=this.refRow;b<this.nbRows;b++){a[b].style.display="";try{a[b].hasAttribute("validRow")&&a[b].removeAttribute("validRow")}catch(c){for(var d=a[b],e=d.attributes,f=0;f<e.length;f++)"validrow"===J.lower(e.nodeName)&&d.removeAttribute("validRow")}this.alternateBgs&&this.Cpt.alternateRows.removeRowBg(b)}this.fltGrid&&!this.gridLayout&&(this.fltGridEl=a[this.filtersRowIndex],this.tbl.deleteRow(this.filtersRowIndex)),this.gridLayout&&this.Cpt.gridLayout.destroy(),I.removeClass(this.tbl,this.prfxTf),this.activeFlt=null,this.isStartBgAlternate=!0,this._hasGrid=!1,this.tbl=null}},writable:!0,configurable:!0},setToolbar:{value:function(){if(null===this.infDiv){var a=I.create("div",["id",this.prfxInfDiv+this.id]);a.className=this.infDivCssClass,this.toolBarTgtId?I.id(this.toolBarTgtId).appendChild(a):this.gridLayout?(this.Cpt.gridLayout.tblMainCont.appendChild(a),a.className=this.gridInfDivCssClass):this.tbl.parentNode.insertBefore(a,this.tbl),this.infDiv=I.id(this.prfxInfDiv+this.id);var b=I.create("div",["id",this.prfxLDiv+this.id]);b.className=this.lDivCssClass,a.appendChild(b),this.lDiv=I.id(this.prfxLDiv+this.id);var c=I.create("div",["id",this.prfxRDiv+this.id]);c.className=this.rDivCssClass,a.appendChild(c),this.rDiv=I.id(this.prfxRDiv+this.id);var d=I.create("div",["id",this.prfxMDiv+this.id]);d.className=this.mDivCssClass,a.appendChild(d),this.mDiv=I.id(this.prfxMDiv+this.id),this.helpInstructions||(this.Cpt.help||(this.Cpt.help=new Z(this)),this.Cpt.help.init())}},writable:!0,configurable:!0},removeToolbar:{value:function(){this.infDiv&&(this.infDiv.parentNode.removeChild(this.infDiv),this.infDiv=null)},writable:!0,configurable:!0},removeExternalFlts:{value:function(){if(this.isExternalFlt||this.externalFltTgtIds)for(var a=0;a<this.externalFltTgtIds.length;a++){var b=this.externalFltTgtIds[a],c=I.id(b);c&&(c.innerHTML="")}},writable:!0,configurable:!0},setSort:{value:function(){var a=new ab(this);this.Extensions.sort=a,a.init()},writable:!0,configurable:!0},setOldSort:{value:function(){function a(){console.log("loadSortable"),d.isImported(c.src)?d.Evt._EnableSort():d.includeFile(c.name,c.src,d.Evt._EnableSort)}var b=this.Evt._EnableSort,c=this.sortConfig,d=this;L.isFn(b)||(this.Evt._EnableSort=function(){if(!d.isSortEnabled||d.gridLayout){require(["extensions/sortabletable/adapterSortabletable"],function(a){d.Extensions.sort=new a(d),d.Extensions.sort.init()})}}),console.log("is require loaded: "+d.isImported("require.js")),d.isImported("require.js")?a():d.includeFile("tf-requirejs",d.basePath+"require.js",d.Evt._EnableSort)},writable:!0,configurable:!0},performSort:{value:function(){this.EvtManager(this.Evt.name.sort)},writable:!0,configurable:!0},SetEditable:{value:function(){var a=this.ezEditTableConfig;this.isImported(a.src)?this._EnableEditable():this.includeFile(a.name,a.src,this._EnableEditable),a.loadStylesheet&&!this.isImported(a.stylesheet,"link")&&this.includeFile(a.stylesheetName,a.stylesheet,null,"link")},writable:!0,configurable:!0},RemoveEditable:{value:function(){var a=this.ezEditTable;a&&(this.selectable&&(a.Selection.ClearSelections(),a.Selection.Remove()),this.editable&&a.Editable.Remove())},writable:!0,configurable:!0},ResetEditable:{value:function(){var a=this.ezEditTable;a&&(this.selectable&&a.Selection.Set(),this.editable&&a.Editable.Set())},writable:!0,configurable:!0},_EnableEditable:{value:function(a){a||(a=this);var b,c=a.ezEditTableConfig,d=I.tag(a.tbl,"thead");if(b=d.length>0&&!c.startRow?void 0:c.startRow||a.refRow,c.scroll_into_view=c.scroll_into_view===!1?!1:!0,c.base_path=c.base_path||a.basePath+"ezEditTable/",c.editable=a.editable=a.cfg.editable,c.selection=a.selectable=a.cfg.selectable,a.selectable&&(c.default_selection=c.default_selection||"row"),c.active_cell_css=c.active_cell_css||"ezETSelectedCell",a._lastValidRowIndex=0,a._lastRowIndex=0,a.selectable){var e=function(b,c,d){if(a.validRowsIndex){var e,f=a.validRowsIndex,g=f.length,h="row"!==b.defaultSelection?c.parentNode:c,i="TD"===c.nodeName?c:null,j=void 0!==d?b.Event.GetKey(d):0,k=M.has(f,h.rowIndex),l=34===j||33===j?a.pagingLength||b.nbRowsPerPage:1;if(k)34!==j&&33!==j?(a._lastValidRowIndex=M.indexByValue(f,h.rowIndex),a._lastRowIndex=h.rowIndex):(e=34===j?a._lastValidRowIndex+l<=g-1?f[a._lastValidRowIndex+l]:[g-1]:a._lastValidRowIndex-l<=f[0]?f[0]:f[a._lastValidRowIndex-l],a._lastRowIndex=e,a._lastValidRowIndex=M.indexByValue(f,e),o(e));else{if(h.rowIndex>a._lastRowIndex)if(h.rowIndex>=f[g-1])e=f[g-1];else{var m=a._lastValidRowIndex+l;e=m>g-1?f[g-1]:f[m]}else if(h.rowIndex<=f[0])e=f[0];else{var n=f[a._lastValidRowIndex-l];e=n?n:f[0]}a._lastRowIndex=h.rowIndex,o(e)}var o=function(d){if("row"===b.defaultSelection)b.Selection.SelectRowByIndex(d);else{b.ClearSelections();var e=c.cellIndex,f=a.tbl.rows[d];"both"===b.defaultSelection&&b.Selection.SelectRowByIndex(d),f&&b.Selection.SelectCell(f.cells[e])}if(a.validRowsIndex.length!==a.getRowsNb()){var g=a.tbl.rows[d];g&&g.scrollIntoView(!1),i&&(i.cellIndex===a.getCellsNb()-1&&a.gridLayout?a.tblCont.scrollLeft=1e8:0===i.cellIndex&&a.gridLayout?a.tblCont.scrollLeft=0:i.scrollIntoView(!1))}}}},f=function(b,c){var d="row"!==b.defaultSelection?c.parentNode:c;if(a.paging&&a.nbPages>1){b.nbRowsPerPage=a.pagingLength;var e=a.validRowsIndex,f=e.length,g=parseInt(a.startPagingRow,10)+parseInt(a.pagingLength,10),h=d.rowIndex;h===e[f-1]&&a.currentPageNb!=a.nbPages?a.Cpt.paging.setPage("last"):h==e[0]&&1!==a.currentPageNb?a.Cpt.paging.setPage("first"):h>e[g-1]&&h<e[f-1]?a.Cpt.paging.setPage("next"):h<e[a.startPagingRow]&&h>e[0]&&a.Cpt.paging.setPage("previous")}};if(a.paging&&(a.onAfterChangePage=function(a){var b=a.ezEditTable,c=b.Selection.GetActiveRow();c&&c.scrollIntoView(!1);var d=b.Selection.GetActiveCell();d&&d.scrollIntoView(!1)}),"row"===c.default_selection){var g=c.on_before_selected_row;c.on_before_selected_row=function(){f(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])};var h=c.on_after_selected_row;c.on_after_selected_row=function(){e(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])}}else{var i=c.on_before_selected_cell;c.on_before_selected_cell=function(){f(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])};var j=c.on_after_selected_cell;c.on_after_selected_cell=function(){e(arguments[0],arguments[1],arguments[2]),j&&j.call(null,arguments[0],arguments[1],arguments[2])}}}if(a.editable){var k=c.on_added_dom_row;if(c.on_added_dom_row=function(){a.nbFilterableRows++,a.paging?(a.nbRows++,a.nbVisibleRows++,a.nbFilterableRows++,a.paging=!1,a.Cpt.paging.destroy(),a.Cpt.paging.addPaging()):a.Cpt.rowsCounter.refresh(),a.alternateBgs&&a.Cpt.alternateRows.init(),k&&k.call(null,arguments[0],arguments[1],arguments[2])},c.actions&&c.actions["delete"]){var l=c.actions["delete"].on_after_submit;c.actions["delete"].on_after_submit=function(){a.nbFilterableRows--,a.paging?(a.nbRows--,a.nbVisibleRows--,a.nbFilterableRows--,a.paging=!1,a.Cpt.paging.destroy(),a.Cpt.paging.addPaging(!1)):a.Cpt.rowsCounter.refresh(),a.alternateBgs&&a.Cpt.alternateRows.init(),l&&l.call(null,arguments[0],arguments[1])}}}try{a.ezEditTable=new EditTable(a.id,c,b),a.ezEditTable.Init()}catch(m){console.log(c.err)}},writable:!0,configurable:!0},resetValues:{value:function(){this.EvtManager(this.Evt.name.resetvalues)},writable:!0,configurable:!0},_resetValues:{value:function(){this.rememberGridValues&&this.fillSlcOnDemand&&this.resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Cpt.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Cpt.paging.resetPage(this.pgNbCookie)},writable:!0,configurable:!0},resetGridValues:{value:function(a){if(this.fillSlcOnDemand){var b=this.Cpt.store.getFilterValues(a),c=this.getFiltersByType(this.fltTypeSlc,!0),d=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(b[b.length-1])===this.fltIds.length){for(var e=0;e<b.length-1;e++)if(" "!==b[e]){var f,g;if(this["col"+e]===this.fltTypeSlc||this["col"+e]===this.fltTypeMulti){var h=I.id(this.fltIds[e]);if(h.options[0].selected=!1,M.has(c,e)&&(g=I.createOpt(b[e],b[e],!0),h.appendChild(g),this.hasStoredValues=!0),M.has(d,e))for(f=b[e].split(" "+this.orOperator+" "),j=0;j<f.length;j++)""!==f[j]&&(g=I.createOpt(f[j],f[j],!0),h.appendChild(g),this.hasStoredValues=!0)}else if(this["col"+e]==this.fltTypeCheckList){var i=this.Cpt.checkList,k=i.checkListDiv[e];k.title=k.innerHTML,k.innerHTML="";var l=I.create("ul",["id",this.fltIds[e]],["colIndex",e]);l.className=i.checkListCssClass;var m=I.createCheckItem(this.fltIds[e]+"_0","",this.displayAllText);for(m.className=i.checkListItemCssClass,l.appendChild(m),k.appendChild(l),f=b[e].split(" "+this.orOperator+" "),j=0;j<f.length;j++)if(""!==f[j]){var n=I.createCheckItem(this.fltIds[e]+"_"+(j+1),f[j],f[j]);n.className=i.checkListItemCssClass,l.appendChild(n),n.check.checked=!0,i.setCheckListValues(n.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Cpt.paging.setPagingInfo()}}},writable:!0,configurable:!0},filter:{value:function(){this.EvtManager(this.Evt.name.filter)},writable:!0,configurable:!0},_filter:{value:function(){function a(a,b,c){if(f.highlightKeywords&&b){a=a.replace(n,""),a=a.replace(o,""),a=a.replace(p,""),a=a.replace(q,"");var d=a;(i.test(a)||j.test(a)||k.test(a)||l.test(a)||m.test(a))&&(d=I.getText(c)),""!==d&&f.Cpt.highlightKeyword.highlight(c,d,f.Cpt.highlightKeyword.highlightCssClass)}}function b(a,b,c){var e,v,w,x=k.test(a),y=i.test(a),z=l.test(a),A=j.test(a),B=m.test(a),C=o.test(a),F=n.test(a),G=(r.test(a),p.test(a)),H=q.test(a),I=s===a,K=t===a,L=u.test(a),M=x&&cb(a.replace(k,""),E),N=y&&cb(a.replace(i,""),E),O=z&&cb(a.replace(l,""),E),P=A&&cb(a.replace(j,""),E),Q=B&&cb(a.replace(m,""),E),R=C&&cb(a.replace(o,""),E);if(cb(b,E))v=db(b,E),M?(w=db(a.replace(k,""),E),e=w>v):N?(w=db(a.replace(i,""),E),e=w>=v):P?(w=db(a.replace(j,""),E),e=v>=w):O?(w=db(a.replace(l,""),E),e=v>w):Q?(w=db(a.replace(m,""),E),e=v.toString()!=w.toString()):R?(w=db(a.replace(o,""),E),e=v.toString()==w.toString()):n.test(a)?e=f._containsStr(a.replace(n,""),b,null,!1):cb(a,E)?(w=db(a,E),e=v.toString()==w.toString()):I?e=J.isEmpty(b):K&&(e=!J.isEmpty(b));else if(f.hasColNbFormat&&f.colNbFormat[c]?(g=D(b,f.colNbFormat[c]),h=f.colNbFormat[c]):","===f.thousandsSeparator&&"."===f.decimalSeparator?(g=D(b,"us"),h="us"):(g=D(b,"eu"),h="eu"),y)e=g<=D(a.replace(i,""),h);else if(A)e=g>=D(a.replace(j,""),h);else if(x)e=g<D(a.replace(k,""),h);else if(z)e=g>D(a.replace(l,""),h);else if(B)e=f._containsStr(a.replace(m,""),b)?!1:!0;else if(F)e=f._containsStr(a.replace(n,""),b,null,!1);else if(C)e=f._containsStr(a.replace(o,""),b,null,!0);else if(G)e=0===b.indexOf(a.replace(p,""))?!0:!1;else if(H){var S=a.replace(q,"");e=b.lastIndexOf(S,b.length-1)===b.length-1-(S.length-1)&&b.lastIndexOf(S,b.length-1)>-1?!0:!1}else if(I)e=J.isEmpty(b);else if(K)e=!J.isEmpty(b);else if(L)try{var T=a.replace(u,""),U=new RegExp(T);e=U.test(b)}catch(V){e=!1}else{var W=d["col_"+c];e=f._containsStr(a,b,W?W:f.fltTypeInp)}return e}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var c=this.tbl.rows,d=this.cfg,e=0;this.validRowsIndex=[];var f=this;this.highlightKeywords&&this.Cpt.highlightKeyword.unhighlightAll(),this.popUpFilters&&this.Cpt.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var g,h,i=new RegExp(this.leOperator),j=new RegExp(this.geOperator),k=new RegExp(this.lwOperator),l=new RegExp(this.grOperator),m=new RegExp(this.dfOperator),n=new RegExp(J.rgxEsc(this.lkOperator)),o=new RegExp(this.eqOperator),p=new RegExp(this.stOperator),q=new RegExp(this.enOperator),r=new RegExp(this.anOperator),s=(new RegExp(this.curExp),this.emOperator),t=this.nmOperator,u=new RegExp(J.rgxEsc(this.rgxOperator)),v=this.refRow;v<this.nbRows;v++){"none"===c[v].style.display&&(c[v].style.display="");var w=c[v].cells,x=w.length;if(x===this.nbCells){for(var y=[],z="include"===this.searchType?!0:!1,A=!1,B=0;x>B;B++){var C=this.searchArgs[this.singleSearchFlt?0:B],E=this.hasColDateType?this.colDateType[B]:this.defaultDateType;if(""!==C){var F=J.matchCase(this.getCellData(B,w[B]),this.matchCase),G=C.split(this.orOperator),H=G.length>1?!0:!1,K=C.split(this.anOperator),L=K.length>1?!0:!1;if(H||L){for(var N,O=!1,P=H?G:K,Q=0;Q<P.length&&(N=J.trim(P[Q]),O=b(N,F,B),a(N,O,w[B]),!H||!O)&&(!L||O);Q++);y[B]=O}else y[B]=b(J.trim(C),F,B),a(C,y[B],w[B]);y[B]||(z="include"===this.searchType?!1:!0),this.singleSearchFlt&&y[B]&&(A=!0),this.popUpFilters&&this.Cpt.popupFilter.buildIcon(B,!0),this.markActiveColumns&&v===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,B),I.addClass(this.getHeaderElement(B),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,B))}}this.singleSearchFlt&&A&&(z=!0),z?(this.validateRow(v,!0),this.validRowsIndex.push(v),this.alternateBgs&&this.Cpt.alternateRows.setRowBg(v,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,v)):(this.validateRow(v,!1),this.hasVisibleRows&&M.has(this.visibleRows,v)&&!this.paging?this.validRowsIndex.push(v):e++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=e,this.isStartBgAlternate=!1,this.rememberGridValues&&this.Cpt.store.saveFilterValues(this.fltsValuesCookie),this.paging?(this.startPagingRow=0,this.currentPageNb=1,this.Cpt.paging.setPagingInfo(this.validRowsIndex)):this.applyGridProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}},writable:!0,configurable:!0},applyGridProps:{value:function(){this.activeFlt&&J.lower(this.activeFlt.nodeName)===this.fltTypeSlc&&!this.popUpFilters&&(this.activeFlt.blur(),this.activeFlt.parentNode&&this.activeFlt.parentNode.focus()),this.visibleRows&&this.enforceVisibility(),this.hasColOperation&&this.Cpt.colOps.calc(),this.linkedFilters&&this.linkFilters();var a=!this.paging&&this.hasVisibleRows?this.nbVisibleRows-this.visibleRows.length:this.nbVisibleRows;this.rowsCounter&&this.Cpt.rowsCounter.refresh(a),this.popUpFilters&&this.Cpt.popupFilter.closeAll()},writable:!0,configurable:!0},getColValues:{value:function(a,b,c){if(this.fltGrid){for(var d=this.tbl.rows,e=[],f=this.refRow;f<this.nbRows;f++){var g=!1;c&&L.isArray(c)&&(g=M.has(c,f));var h=d[f].cells,i=h.length;if(i==this.nbCells&&!g)for(var j=0;i>j;j++)if(j===a&&""===d[f].style.display){var k=J.lower(this.getCellData(j,h[j])),l=this.colNbFormat?this.colNbFormat[a]:null,m=b?D(k,l):k;e.push(m)}}return e}},writable:!0,configurable:!0},getFilterValue:{value:function(a){if(this.fltGrid){var b,c=this.getFilterElement(a);if(!c)return"";var d=this.fltCol[a];if(d!==this.fltTypeMulti&&d!==this.fltTypeCheckList)b=c.value;else if(d===this.fltTypeMulti){b="";for(var e=0;e<c.options.length;e++)c.options[e].selected&&(b=b.concat(c.options[e].value+" "+this.orOperator+" "));b=b.substr(0,b.length-4)}else d===this.fltTypeCheckList&&(null!==c.getAttribute("value")?(b=c.getAttribute("value"),b=b.substr(0,b.length-3)):b="");return b}},writable:!0,configurable:!0},getFiltersValue:{value:function(){if(this.fltGrid){for(var a=[],b=0;b<this.fltIds.length;b++)a.push(J.trim(J.matchCase(this.getFilterValue(b),this.matchCase)));return a}},writable:!0,configurable:!0},getFilterId:{value:function(){return this.fltGrid?this.fltIds[i]:void 0},writable:!0,configurable:!0},getFiltersByType:{value:function(a,b){if(this.fltGrid){for(var c=[],d=0;d<this.fltIds.length;d++){var e=this["col"+d];if(e===J.lower(a)){var f=b?d:this.fltIds[d];c.push(f)}}return c}},writable:!0,configurable:!0},getFilterElement:{value:function(a){return this.fltGrid?I.id(this.fltIds[a]):null},writable:!0,configurable:!0},getCellsNb:{value:function(a){var b=a?this.tbl.rows[a]:this.tbl.rows[0];return b.cells.length},writable:!0,configurable:!0},getRowsNb:{value:function(a){var b=this.refRow?this.refRow:0,c=this.tbl.rows.length;return a&&(b=0),parseInt(c-b,10)},writable:!0,configurable:!0},getCellData:{value:function(a,b){return void 0!==a&&b?this.customCellData&&M.has(this.customCellDataCols,a)?this.customCellData.call(null,this,b,a):I.getText(b):""},writable:!0,configurable:!0},getTableData:{value:function(){for(var a=this.tbl.rows,b=this.refRow;b<this.nbRows;b++){for(var c=[b,[]],d=a[b].cells,e=0;e<d.length;e++){var f=this.getCellData(e,d[e]);c[1].push(f)}this.tblData.push(c)}return this.tblData},writable:!0,configurable:!0},getFilteredData:{value:function(a){if(!this.validRowsIndex)return[];var b=this.tbl.rows,c=[];if(a){for(var d=this.gridLayout?this.headTbl:this.tbl,e=d.rows[this.headersRow],f=[e.rowIndex,[]],g=0;g<this.nbCells;g++){var h=this.getCellData(g,e.cells[g]);f[1].push(h)}c.push(f)}for(var i=this.getValidRowsIndex(!0),j=0;j<i.length;j++){for(var k=[this.validRowsIndex[j],[]],l=b[this.validRowsIndex[j]].cells,m=0;m<l.length;m++){var n=this.getCellData(m,l[m]);k[1].push(n)}c.push(k)}return c},writable:!0,configurable:!0},getFilteredDataCol:{value:function(a){if(void 0===a)return[];for(var b=this.getFilteredData(),c=[],d=0;d<b.length;d++){var e=b[d],f=e[1],g=f[a];c.push(g)}return c},writable:!0,configurable:!0},getRowDisplay:{value:function(a){return this.fltGrid||L.isObj(a)?a.style.display:void 0},writable:!0,configurable:!0},validateRow:{value:function(a,b){var c=this.tbl.rows[a];if(c&&"boolean"===J.lower(typeof b)){this.hasVisibleRows&&M.has(this.visibleRows,a)&&!this.paging&&(b=!0);var d=b?"":"none",e=b?"true":"false";c.style.display=d,this.paging&&c.setAttribute("validRow",e)}},writable:!0,configurable:!0},validateAllRows:{value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var a=this.refRow;a<this.nbFilterableRows;a++)this.validateRow(a,!0),this.validRowsIndex.push(a)}},writable:!0,configurable:!0},setFilterValue:{value:function(a,b,c){if((this.fltGrid||this.isFirstLoad)&&this.getFilterElement(a)){var d=this.getFilterElement(a),e=this["col"+a];if(b=void 0===b?"":b,e!==this.fltTypeMulti&&e!=this.fltTypeCheckList)d.value=b;else if(e===this.fltTypeMulti)for(var f=b.split(" "+this.orOperator+" "),g=0;g<d.options.length;g++)(""===f||""===f[0])&&(d.options[g].selected=!1),""===d.options[g].value&&(d.options[g].selected=!1),""!==d.options[g].value&&M.has(f,d.options[g].value,!0)&&(d.options[g].selected=!0);else if(e===this.fltTypeCheckList){b=J.matchCase(b,this.matchCase);for(var h=b.split(" "+this.orOperator+" "),i=(d.setAttribute("value",""),d.setAttribute("indexes",""),0);i<I.tag(d,"li").length;i++){var j=I.tag(d,"li")[i],k=I.tag(j,"label")[0],l=I.tag(j,"input")[0],m=J.matchCase(I.getText(k),this.matchCase);""!==m&&M.has(h,m,!0)?(l.checked=!0,this.Cpt.checkList.setCheckListValues(l)):(l.checked=!1,this.Cpt.checkList.setCheckListValues(l))}}}},writable:!0,configurable:!0},setColWidths:{value:function(a){function b(a){if((d||d.nbCells==d.colWidth.length)&&d.nbCells==a.cells.length)for(var b=0;b<d.nbCells;b++)a.cells[b].style.width=d.colWidth[b]}if(this.fltGrid&&this.hasColWidth){var c,d=this;c=void 0===a?"none"!=this.tbl.rows[0].style.display?0:1:a,b(this.tbl.rows[c])}},writable:!0,configurable:!0},enforceVisibility:{value:function(){if(this._hasGrid&&this.hasVisibleRows&&!this.paging)for(var a=0;a<this.visibleRows.length;a++)this.visibleRows[a]<=this.nbRows&&this.validateRow(this.visibleRows[a],!0)},writable:!0,configurable:!0},clearFilters:{value:function(){this.EvtManager(this.Evt.name.clear)},writable:!0,configurable:!0},_clearFilters:{value:function(){if(this.fltGrid){this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var a=0;a<this.fltIds.length;a++)this.setFilterValue(a,"");this.linkedFilters&&(this.activeFilterId="",this.linkFilters()),this.rememberPageLen&&K.remove(this.pgLenCookie),this.rememberPageNb&&K.remove(this.pgNbCookie),this.onAfterReset&&this.onAfterReset.call(null,this)}},writable:!0,configurable:!0},clearActiveColumns:{value:function(){for(var a=0;a<this.fltIds.length;a++)I.removeClass(this.getHeaderElement(a),this.activeColumnsCssClass)},writable:!0,configurable:!0},refresh:{value:function(b){var c=b?b:this.cfg,d=this.sort;d&&(this.sort=!1),this.nbRows=this.getRowsNb(),this.remove(),window["tf_"+this.id]=new a(this.id,this.startRow,c),this.isFirstLoad=!0,this.fltIds=[],this.init(),d&&(this.st.setTBody(this.tbl.tBodies[0]),this.sort=!0)},writable:!0,configurable:!0},linkFilters:{value:function(){var a=this.getFiltersByType(this.fltTypeSlc,!0),b=this.getFiltersByType(this.fltTypeMulti,!0),c=this.getFiltersByType(this.fltTypeCheckList,!0),d=a.concat(b);if(d=d.concat(c),this.activeFilterId){var e=this.activeFilterId.split("_")[0];e=e.split(this.prfxFlt)[1];for(var f,g=0;g<d.length;g++){var h=I.id(this.fltIds[d[g]]);if(f=this.getFilterValue(d[g]),e!==d[g]||this.paging&&M.has(a,d[g])&&e===d[g]||!this.paging&&(M.has(c,d[g])||M.has(b,d[g]))||f===this.displayAllText){if(M.has(c,d[g])?this.Cpt.checkList.checkListDiv[d[g]].innerHTML="":h.innerHTML="",this.fillSlcOnDemand){var i=I.createOpt(this.displayAllText,"");h&&h.appendChild(i)}M.has(c,d[g])?this.Cpt.checkList._build(d[g]):this.Cpt.dropdown._build(d[g],!0),this.setFilterValue(d[g],f)}}}},writable:!0,configurable:!0},_resetGrid:{value:function(){function a(a){a.tbl.deleteRow(a.filtersRowIndex),a.remove(),a.fltIds=[],a.isFirstLoad=!0,a.popUpFilters&&a.Cpt.popupFilter.destroy(),a._AddGrid()}if(!this.isFirstLoad){if(this.gridLayout||this.tbl.rows[this.filtersRowIndex].parentNode.insertBefore(this.fltGridEl,this.tbl.rows[this.filtersRowIndex]),this.isExternalFlt)for(var b=0;b<this.externalFltTgtIds.length;b++){var c=I.id(this.externalFltTgtIds[b]);if(c){c.appendChild(this.externalFltEls[b]);var d=this["col"+b];this.gridLayout&&""===this.externalFltEls[b].innerHTML&&d!==this.fltTypeInp&&((d===this.fltTypeSlc||d===this.fltTypeMulti)&&this.Cpt.dropdown.build(b),d===this.fltTypeCheckList&&this.Cpt.checkList.build(b))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length,this.isSortEnabled&&(this.sort=!0),""===this.tbl.rows[this.filtersRowIndex].innerHTML?a(this):this.popUpFilters&&(this.headersRow++,this.Cpt.popupFilter.buildAll()),this.gridLayout||I.addClass(this.tbl,this.prfxTf),this._hasGrid=!0}},writable:!0,configurable:!0},_containsStr:{value:function(a,b,c,d){var e,f=this.matchCase?"g":"gi",g=d?d:this.exactMatch;return e=g||c!==this.fltTypeInp&&c?new RegExp("(^\\s*)"+J.rgxEsc(a)+"(\\s*$)",f):new RegExp(J.rgxEsc(a),f),e.test(b)},writable:!0,configurable:!0},isImported:{value:function(a,b){for(var c=!1,d=b?b:"script",e="script"==d?"src":"href",f=I.tag(eb,d),g=0;g<f.length;g++)if(void 0!==f[g][e]&&f[g][e].match(a)){c=!0;break}return c},writable:!0,configurable:!0},includeFile:{value:function(a,b,c,d){var e=d?d:"script",f=this.isImported(b,e);if(!f){var g,h=this,i=!1,j=I.tag(eb,"head")[0];g="link"===J.lower(e)?I.create("link",["id",a],["type","text/css"],["rel","stylesheet"],["href",b]):I.create("script",["id",a],["type","text/javascript"],["src",b]),g.onload=g.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,"function"==typeof c&&c.call(null,h))},g.onerror=function(){throw new Error("TF script could not load:\n"+this.src)},j.appendChild(g)}},writable:!0,configurable:!0},hasGrid:{value:function(){return this._hasGrid},writable:!0,configurable:!0},getFiltersId:{value:function(){return this._hasGrid?this.fltIds:void 0},writable:!0,configurable:!0},getValidRowsIndex:{value:function(a){if(this._hasGrid){if(!a)return this.validRowsIndex;this.validRowsIndex=[];for(var b=this.refRow;b<this.getRowsNb(!0);b++){var c=this.tbl.rows[b];this.paging?("true"===c.getAttribute("validRow")||null===c.getAttribute("validRow"))&&this.validRowsIndex.push(c.rowIndex):"none"!==this.getRowDisplay(c)&&this.validRowsIndex.push(c.rowIndex)}return this.validRowsIndex}},writable:!0,configurable:!0},getFiltersRowIndex:{value:function(){return this._hasGrid?this.filtersRowIndex:void 0},writable:!0,configurable:!0},getHeadersRowIndex:{value:function(){return this._hasGrid?this.headersRow:void 0},writable:!0,configurable:!0},getStartRowIndex:{value:function(){return this._hasGrid?this.refRow:void 0},writable:!0,configurable:!0},getLastRowIndex:{value:function(){return this._hasGrid?this.nbRows-1:void 0},writable:!0,configurable:!0},getHeaderElement:{value:function(a){for(var b,c=this.gridLayout?this.headTbl:this.tbl,d=I.tag(c,"thead"),e=this.headersRow,f=0;f<this.nbCells;f++)if(f===a){0===d.length&&(b=c.rows[e].cells[f]),1===d.length&&(b=d[0].rows[e].cells[f]);break}return b},writable:!0,configurable:!0},config:{value:function(){return this.cfg},writable:!0,configurable:!0},getFilterableRowsNb:{value:function(){return this.getRowsNb(!1)},writable:!0,configurable:!0}}),a}();b.exports=fb}),require("tablefilter")});