1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-04-27 20:32:54 +02:00
TableFilter/dist/tablefilter/tf-0-24aebd8385b2ca535807.js

8 lines
53 KiB
JavaScript

/**
* tablefilter v0.5.40 by Max Guglielmi
* build date: 2017-08-27T00:12:05.289Z
* MIT License
*/
webpackJsonp([0],{439:function(t,e,n){function r(t){return n(i(t))}function i(t){var e=o[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}var o={"./array":69,"./array.js":69,"./const":15,"./const.js":15,"./cookie":115,"./cookie.js":115,"./dom":10,"./dom.js":10,"./emitter":108,"./emitter.js":108,"./event":19,"./event.js":19,"./extensions/advancedGrid/adapterEzEditTable":440,"./extensions/advancedGrid/adapterEzEditTable.js":440,"./extensions/advancedGrid/advancedGrid":442,"./extensions/advancedGrid/advancedGrid.js":442,"./extensions/colOps/colOps":443,"./extensions/colOps/colOps.js":443,"./extensions/colsVisibility/colsVisibility":444,"./extensions/colsVisibility/colsVisibility.js":444,"./extensions/filtersVisibility/filtersVisibility":445,"./extensions/filtersVisibility/filtersVisibility.js":445,"./extensions/sort/adapterSortabletable":441,"./extensions/sort/adapterSortabletable.js":441,"./extensions/sort/sort":446,"./extensions/sort/sort.js":446,"./feature":12,"./feature.js":12,"./modules/alternateRows":124,"./modules/alternateRows.js":124,"./modules/baseDropdown":68,"./modules/baseDropdown.js":68,"./modules/checkList":127,"./modules/checkList.js":127,"./modules/clearButton":123,"./modules/clearButton.js":123,"./modules/dateType":110,"./modules/dateType.js":110,"./modules/dropdown":109,"./modules/dropdown.js":109,"./modules/gridLayout":116,"./modules/gridLayout.js":116,"./modules/hash":113,"./modules/hash.js":113,"./modules/help":111,"./modules/help.js":111,"./modules/highlightKeywords":118,"./modules/highlightKeywords.js":118,"./modules/loader":117,"./modules/loader.js":117,"./modules/markActiveColumns":120,"./modules/markActiveColumns.js":120,"./modules/noResults":125,"./modules/noResults.js":125,"./modules/paging":126,"./modules/paging.js":126,"./modules/popupFilter":119,"./modules/popupFilter.js":119,"./modules/rowsCounter":121,"./modules/rowsCounter.js":121,"./modules/state":112,"./modules/state.js":112,"./modules/statusBar":122,"./modules/statusBar.js":122,"./modules/storage":114,"./modules/storage.js":114,"./number":67,"./number.js":67,"./root":16,"./root.js":16,"./settings":9,"./settings.js":9,"./sort":106,"./sort.js":106,"./string":21,"./string.js":21,"./tablefilter":107,"./tablefilter.js":107,"./types":6,"./types.js":6};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=439},440:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(12),l=n(10),d=n(15),u=n(9),c=n(16),h=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n.name));return o.desc=(0,u.defaultsStr)(n.description,"ezEditTable adapter"),o.filename=(0,u.defaultsStr)(n.filename,"ezEditTable.js"),o.vendorPath=n.vendor_path,o.loadStylesheet=Boolean(n.load_stylesheet),o.stylesheet=(0,u.defaultsStr)(n.stylesheet,o.vendorPath+"ezEditTable.css"),o.stylesheetName=(0,u.defaultsStr)(n.stylesheet_name,"ezEditTableCss"),n.scroll_into_view=!1!==n.scroll_into_view&&t.gridLayout,o._ezEditTable=null,o.cfg=n,o.enable(),o}return o(e,t),s(e,[{key:"init",value:function(){var t=this;if(!this.initialized){var e=this.tf;if(c.root.EditTable)this._setAdvancedGrid();else{var n=this.vendorPath+this.filename;e.import(this.filename,n,function(){return t._setAdvancedGrid()})}this.loadStylesheet&&!e.isImported(this.stylesheet,"link")&&e.import(this.stylesheetName,this.stylesheet,null,"link"),this.emitter.on(["filter-focus","filter-blur"],function(){return t._toggleForInputFilter()}),this.initialized=!0}}},{key:"_setAdvancedGrid",value:function(){var t=this.tf,e=void 0,n=this.cfg;e=(0,l.tag)(t.dom(),"thead").length>0&&!n.startRow?void 0:n.startRow||t.refRow,n.base_path=n.base_path||t.basePath+"ezEditTable/";var r=n.editable,i=n.selection;i&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var o=0,s=0;if(i){var a=function(e,n,r){var i=e.Selection,a=function(r){if("row"===e.defaultSelection)i.SelectRowByIndex(r);else{e.ClearSelections();var o=n.cellIndex,s=t.dom().rows[r];"both"===e.defaultSelection&&i.SelectRowByIndex(r),s&&i.SelectCell(s.cells[o])}if(t.validRowsIndex.length!==t.getRowsNb()){var a=t.dom().rows[r];a&&a.scrollIntoView(!1),c&&(c.cellIndex===t.getCellsNb()-1&&t.gridLayout?t.tblCont.scrollLeft=1e8:0===c.cellIndex&&t.gridLayout?t.tblCont.scrollLeft=0:c.scrollIntoView(!1))}};if(t.validRowsIndex){var l=t.validRowsIndex,d=l.length,u="row"!==e.defaultSelection?n.parentNode:n,c="TD"===n.nodeName?n:null,h=void 0!==r?e.Event.GetKey(r):0,f=-1!==l.indexOf(u.rowIndex),p=void 0,b=t.feature("paging"),m=34===h||33===h?b&&b.pageLength||e.nbRowsPerPage:1;if(f)34!==h&&33!==h?(o=l.indexOf(u.rowIndex),s=u.rowIndex):(p=34===h?o+m<=d-1?l[o+m]:[d-1]:o-m<=l[0]?l[0]:l[o-m],s=p,o=l.indexOf(p),a(p));else{if(u.rowIndex>s)if(u.rowIndex>=l[d-1])p=l[d-1];else{var g=o+m;p=g>d-1?l[d-1]:l[g]}else if(u.rowIndex<=l[0])p=l[0];else{var v=l[o-m];p=v||l[0]}s=u.rowIndex,a(p)}}},d=function(e,n){var r="row"!==e.defaultSelection?n.parentNode:n;if(t.paging&&t.feature("paging").nbPages>1){var i=t.feature("paging");e.nbRowsPerPage=i.pageLength;var o=t.validRowsIndex,s=o.length,a=parseInt(i.startPagingRow,10)+parseInt(i.pageLength,10),l=r.rowIndex;l===o[s-1]&&i.currentPageNb!==i.nbPages?i.setPage("last"):l===o[0]&&1!==i.currentPageNb?i.setPage("first"):l>o[a-1]&&l<o[s-1]?i.setPage("next"):l<o[i.startPagingRow]&&l>o[0]&&i.setPage("previous")}};if(t.paging&&(t.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),n=e._ezEditTable,r=n.Selection,i=r.GetActiveRow();i&&i.scrollIntoView(!1);var o=r.GetActiveCell();o&&o.scrollIntoView(!1)}),"row"===n.default_selection){var u=n.on_before_selected_row;n.on_before_selected_row=function(){var t=arguments;d(t[0],t[1],t[2]),u&&u.call(null,t[0],t[1],t[2])};var c=n.on_after_selected_row;n.on_after_selected_row=function(){var t=arguments;a(t[0],t[1],t[2]),c&&c.call(null,t[0],t[1],t[2])}}else{var h=n.on_before_selected_cell;n.on_before_selected_cell=function(){var t=arguments;d(t[0],t[1],t[2]),h&&h.call(null,t[0],t[1],t[2])};var f=n.on_after_selected_cell;n.on_after_selected_cell=function(){var t=arguments;a(t[0],t[1],t[2]),f&&f.call(null,t[0],t[1],t[2])}}}if(r){var p=n.on_added_dom_row;if(n.on_added_dom_row=function(){var e=arguments;t.nbFilterableRows++,t.paging?(t.nbFilterableRows++,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset()):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),p&&p.call(null,e[0],e[1],e[2])},n.actions&&n.actions.delete){var b=n.actions.delete.on_after_submit;n.actions.delete.on_after_submit=function(){var e=arguments;t.nbFilterableRows--,t.paging?(t.nbFilterableRows--,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset(!1)):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),b&&b.call(null,e[0],e[1])}}}try{this._ezEditTable=new EditTable(t.id,n,e),this._ezEditTable.Init()}catch(t){throw new Error('Failed to instantiate EditTable object.\n \n"ezEditTable" dependency not found.')}this.initialized=!0}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"toggle",value:function(){var t=this._ezEditTable;t.editable?t.Editable.Remove():t.Editable.Set(),t.selection?t.Selection.Remove():t.Selection.Set()}},{key:"_toggleForInputFilter",value:function(){var t=this.tf;if(t.getActiveFilterId()){var e=t.getColumnIndexFromFilterId(t.getActiveFilterId());t.getFilterType(e)===d.INPUT&&this.toggle()}}},{key:"destroy",value:function(){var t=this;if(this.initialized){var e=this._ezEditTable;e&&(this.cfg.selection&&(e.Selection.ClearSelections(),e.Selection.Remove()),this.cfg.editable&&e.Editable.Remove()),this.emitter.off(["filter-focus","filter-blur"],function(){return t._toggleForInputFilter()}),this.initialized=!1}}}]),e}(a.Feature);e.default=h},441:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=t.split(".");for(var n in e){for(var r=e[n];3>r.length;)r="0"+r;e[n]=r}return e.join(".")}function a(t,e){var n=s(t.value.toLowerCase()),r=s(e.value.toLowerCase());return n===r?0:n<r?-1:1}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=n(12),u=n(6),c=n(10),h=n(19),f=n(67),p=n(15),b=n(9),m=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n.name));return o.name=n.name,o.desc=(0,b.defaultsStr)(n.description,"Sortable table"),o.sorted=!1,o.sortTypes=(0,b.defaultsArr)(n.types,t.colTypes),o.sortColAtStart=(0,b.defaultsArr)(n.sort_col_at_start,null),o.asyncSort=Boolean(n.async_sort),o.triggerIds=(0,b.defaultsArr)(n.trigger_ids,[]),o.imgPath=(0,b.defaultsStr)(n.images_path,t.themesPath),o.imgBlank=(0,b.defaultsStr)(n.image_blank,"blank.png"),o.imgClassName=(0,b.defaultsStr)(n.image_class_name,"sort-arrow"),o.imgAscClassName=(0,b.defaultsStr)(n.image_asc_class_name,"ascending"),o.imgDescClassName=(0,b.defaultsStr)(n.image_desc_class_name,"descending"),o.customKey=(0,b.defaultsStr)(n.custom_key,"data-tf-sortKey"),o.onSortLoaded=(0,b.defaultsFn)(n.on_sort_loaded,u.EMPTY_FN),o.onBeforeSort=(0,b.defaultsFn)(n.on_before_sort,u.EMPTY_FN),o.onAfterSort=(0,b.defaultsFn)(n.on_after_sort,u.EMPTY_FN),o.stt=null,o.enable(),o}return o(e,t),l(e,[{key:"init",value:function(){var t=this;if(!this.initialized){var e=this.tf,n=this;if((0,u.isUndef)(SortableTable))throw new Error("SortableTable class not found.");this.emitter.emit("add-date-type-formats",this.tf,this.sortTypes),this.overrideSortableTable(),this.setSortTypes(),this.onSortLoaded(e,this),this.stt.onbeforesort=function(){n.onBeforeSort(e,n.stt.sortColumn),e.paging&&e.feature("paging").disable()},this.stt.onsort=function(){if(n.sorted=!0,e.paging){var t=e.feature("paging");e.getValidRows(!0),t.enable(),t.setPage(t.getPage())}n.onAfterSort(e,n.stt.sortColumn,n.stt.descending),n.emitter.emit("column-sorted",e,n.stt.sortColumn,n.stt.descending)};var r=n.sortColAtStart;r&&this.stt.sort(r[0],r[1]),this.emitter.on(["sort"],function(e,n,r){return t.sortByColumnIndex(n,r)}),this.initialized=!0,this.emitter.emit("sort-initialized",e,this)}}},{key:"sortByColumnIndex",value:function(t,e){this.stt.sort(t,e)}},{key:"overrideSortableTable",value:function(){var t=this,e=this.tf;SortableTable.prototype.headerOnclick=function(e){if(t.initialized){for(var n=e.target||e.srcElement;n.tagName!==p.CELL_TAG&&n.tagName!==p.HEADER_TAG;)n=n.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(n):n.cellIndex)}},SortableTable.getCellIndex=function(t){var e=t.parentNode.cells,n=e.length,r=void 0;for(r=0;e[r]!==t&&r<n;r++);return r},SortableTable.prototype.initHeader=function(n){var r=this;if(!r.tHead){if(!e.gridLayout)return;r.tHead=e.feature("gridLayout").headTbl.tHead}r.headersRow=e.headersRow;var i=r.tHead.rows[r.headersRow].cells;r.sortTypes=n||[];for(var o=i.length,s=void 0,a=void 0,l=0;l<o;l++)a=i[l],null!==r.sortTypes[l]&&"None"!==r.sortTypes[l]?(a.style.cursor="pointer",s=(0,c.createElm)("img",["src",t.imgPath+t.imgBlank]),a.appendChild(s),null!==r.sortTypes[l]&&a.setAttribute("_sortType",r.sortTypes[l]),(0,h.addEvt)(a,"click",r._headerOnclick)):(a.setAttribute("_sortType",n[l]),a._sortType="None");r.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var e=this,n=void 0,r=void 0,i=void 0;if(t.asyncSort&&t.triggerIds.length>0){var o=t.triggerIds;n=[],r=o.length;for(var s=0;s<r;s++)n.push((0,c.elm)(o[s]))}else{if(!this.tHead)return;n=e.tHead.rows[e.headersRow].cells,r=n.length}for(var a=0;a<r;a++){var l=n[a];if(l){var d=l.getAttribute("_sortType");null!==d&&"None"!==d&&(i=l.lastChild||l,"img"!==i.nodeName.toLowerCase()&&(i=(0,c.createElm)("img",["src",t.imgPath+t.imgBlank]),l.appendChild(i)),a===e.sortColumn?i.className=t.imgClassName+" "+(this.descending?t.imgDescClassName:t.imgAscClassName):i.className=t.imgClassName)}}},SortableTable.prototype.getRowValue=function(t,e,n){var r=this,i=r._sortTypeInfo[e];if(i&&i.getRowValue)return i.getRowValue(t,n);var o=t.cells[n],s=SortableTable.getInnerText(o);return r.getValueFromString(s,e)},SortableTable.getInnerText=function(e){if(e)return e.getAttribute(t.customKey)?e.getAttribute(t.customKey):(0,c.getText)(e)}}},{key:"addSortType",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2];SortableTable.prototype.addSortType(r,i,o)}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,n=this.sortTypes,r=[],i=0;i<e.nbCells;i++){var o=void 0;if(n[i])if(o=n[i],(0,u.isObj)(o)){if(o.type===p.DATE)o=this._addDateType(i,n);else if(o.type===p.FORMATTED_NUMBER){var l=o.decimal||e.decimalSeparator;o=this._addNumberType(i,l)}}else o=o.toLowerCase(),o===p.DATE?o=this._addDateType(i,n):o===p.FORMATTED_NUMBER||o===p.NUMBER?o=this._addNumberType(i,e.decimalSeparator):o===p.NONE&&(o="None");else o=p.STRING;r.push(o)}this.addSortType("caseinsensitivestring",SortableTable.toUpperCase),this.addSortType(p.STRING),this.addSortType(p.IP_ADDRESS,s,a),this.stt=new SortableTable(e.dom(),r),this.asyncSort&&this.triggerIds.length>0&&function(){for(var e=t.triggerIds,n=0;n<e.length;n++)if(null!==e[n]){var i=(0,c.elm)(e[n]);i&&(i.style.cursor="pointer",(0,h.addEvt)(i,"click",function(n){var r=n.target;t.tf.sort&&t.stt.asyncSort(e.indexOf(r.id))}),i.setAttribute("_sortType",r[n]))}}()}},{key:"_addDateType",value:function(t,e){var n=this.tf,r=n.feature("dateType"),i=r.getOptions(t,e).locale||n.locale,o=p.DATE+"-"+i;return this.addSortType(o,function(t){var e=r.parse(t,i);return isNaN(+e)?new Date(-864e11):e}),o}},{key:"_addNumberType",value:function(t,e){var n=p.FORMATTED_NUMBER+("."===e?"":"-custom");return this.addSortType(n,function(t){return(0,f.parse)(t,e)}),n}},{key:"destroy",value:function(){var t=this;if(this.initialized){var e=this.tf;this.emitter.off(["sort"],function(e,n,r){return t.sortByColumnIndex(n,r)}),this.sorted=!1,this.stt.destroy();for(var n=e.getFiltersId(),r=0;r<n.length;r++){var i=e.getHeaderElement(r),o=(0,c.tag)(i,"img");1===o.length&&i.removeChild(o[0])}this.initialized=!1}}}]),e}(d.Feature);e.default=m},442:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(440),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},443:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(12),l=n(10),d=n(6),u=n(106),c=n(15),h=n(447),f=function(t){return t&&t.__esModule?t:{default:t}}(h),p=n(9),b=["after-filtering","after-page-change","after-page-length-change"],m=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n.name));return o.onBeforeOperation=(0,p.defaultsFn)(n.on_before_operation,d.EMPTY_FN),o.onAfterOperation=(0,p.defaultsFn)(n.on_after_operation,d.EMPTY_FN),o.opts=n,o.labelIds=(0,p.defaultsArr)(n.id,[]),o.colIndexes=(0,p.defaultsArr)(n.col,[]),o.operations=(0,p.defaultsArr)(n.operation,[]),o.outputTypes=(0,p.defaultsArr)(n.write_method,[]),o.formatResults=(0,p.defaultsArr)(n.format_result,[]),o.totRowIndexes=(0,p.defaultsArr)(n.tot_row_index,[]),o.excludeRows=(0,p.defaultsArr)(n.exclude_row,[]),o.decimalPrecisions=(0,p.defaultsArr)(n.decimal_precision,2),o.enable(),o}return o(e,t),s(e,[{key:"init",value:function(){var t=this;this.initialized||(this.emitter.on(b,function(){return t.calcAll()}),this.calcAll(),this.initialized=!0)}},{key:"calcAll",value:function(){var t=this.tf;if(t.isInitialized()){this.onBeforeOperation(t,this),this.emitter.emit("before-column-operation",t,this);var e=this.colIndexes,n=this.operations,r=this.outputTypes,i=this.totRowIndexes,o=this.excludeRows,s=this.formatResults,a=this.decimalPrecisions,l=[];e.forEach(function(t){-1===l.indexOf(t)&&l.push(t)});for(var u=l.length,c=t.dom().rows,h=[],f=0;f<u;f++){h.push(t.getVisibleColumnData(l[f],!1,o));for(var p=h[f],b=0,m=[],g=[],v=[],y=void 0,T=[],_=0,S=0;S<e.length;S++)e[S]===l[f]&&(m[_]=(n[S]||"sum").toLowerCase(),g[_]=a[S],v[_]=this.labelIds[S],y=(0,d.isArray)(r)?r[S]:null,T[_]=this.configureFormat(l[f],s[S]),_++);for(var w=0;w<_;w++)this.emitter.emit("before-column-calc",t,this,l[f],p,m[w],g[w]),b=Number(this.calc(p,m[w],null)),this.emitter.emit("column-calc",t,this,l[f],b,m[w],g[w]),this.writeResult(b,v[w],y,g[w],T[w]);var C=i&&i[f]?c[i[f]]:null;C&&(C.style.display="")}this.onAfterOperation(t,this),this.emitter.emit("after-column-operation",t,this)}}},{key:"columnCalc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sum",n=arguments[2],r=this.excludeRows||[],i=tf.getVisibleColumnData(t,!1,r);return Number(this.calc(i,e,n))}},{key:"calc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sum",n=arguments[2],r=0;switch("q1"!==e&&"q3"!==e&&"median"!==e||(t=this.sortColumnValues(t,u.numSortAsc)),e){case"mean":r=this.calcMean(t);break;case"sum":r=this.calcSum(t);break;case"min":r=this.calcMin(t);break;case"max":r=this.calcMax(t);break;case"median":r=this.calcMedian(t);break;case"q1":r=this.calcQ1(t);break;case"q3":r=this.calcQ3(t)}return(0,d.isEmpty)(n)?r:r.toFixed(n)}},{key:"calcSum",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,d.isEmpty)(t)?0:t.reduce(function(t,e){return Number(t)+Number(e)})}},{key:"calcMean",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.calcSum(t)/t.length;return Number(e)}},{key:"calcMax",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Math.max.apply(null,t)}},{key:"calcMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Math.min.apply(null,t)}},{key:"calcMedian",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0;return e%2==1?(n=Math.floor(e/2),Number(t[n])):(Number(t[e/2])+Number(t[e/2-1]))/2}},{key:"calcQ1",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0;return n=Math.floor(e/4),4*n===e?(Number(t[n-1])+Number(t[n]))/2:Number(t[n])}},{key:"calcQ3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,n=0,r=0;return n=Math.floor(e/4),4*n===e?(r=3*n,(Number(t[r])+Number(t[r-1]))/2):Number(t[e-n-1])}},{key:"sortColumnValues",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];return t.sort(e)}},{key:"writeResult",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"innerhtml",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=(0,l.elm)(e);if(o)switch(t=t.toFixed(r),t=isNaN(t)||!isFinite(t)?"":(0,f.default)(i)(t),n.toLowerCase()){case"innerhtml":o.innerHTML=t;break;case"setvalue":o.value=t;break;case"createtextnode":var s=o.firstChild,a=(0,l.createText)(t);o.replaceChild(a,s)}}},{key:"configureFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.tf;if(n.hasType(t,[c.FORMATTED_NUMBER])){var r=n.colTypes[t];r.decimal&&!e.decimal&&(e.decimal=r.decimal),r.thousands&&!e.integerSeparator&&(e.integerSeparator=r.thousands)}else e.decimal=e.decimal||"",e.integerSeparator=e.integerSeparator||"";return e}},{key:"destroy",value:function(){var t=this;this.initialized&&(this.emitter.off(b,function(){return t.calcAll()}),this.initialized=!1)}}]),e}(a.Feature);e.default=m},444:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(12),l=n(10),d=n(6),u=n(19),c=n(16),h=n(15),f=n(9),p=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n.name)),s=o.config;return o.name=n.name,o.desc=(0,f.defaultsStr)(n.description,"Columns visibility manager"),o.spanEl=null,o.btnEl=null,o.contEl=null,o.tickToHide=(0,f.defaultsBool)(n.tick_to_hide,!0),o.manager=(0,f.defaultsBool)(n.manager,!0),o.headersTbl=n.headers_table||null,o.headersIndex=(0,f.defaultsNb)(n.headers_index,1),o.contElTgtId=(0,f.defaultsStr)(n.container_target_id,null),o.headersText=(0,f.defaultsArr)(n.headers_text,[]),o.btnTgtId=(0,f.defaultsStr)(n.btn_target_id,null),o.btnText=(0,f.defaultsStr)(n.btn_text,"Columns&#9660;"),o.btnHtml=(0,f.defaultsStr)(n.btn_html,null),o.btnCssClass=(0,f.defaultsStr)(n.btn_css_class,"colVis"),o.btnCloseText=(0,f.defaultsStr)(n.btn_close_text,"Close"),o.btnCloseHtml=(0,f.defaultsStr)(n.btn_close_html,null),o.btnCloseCssClass=(0,f.defaultsStr)(n.btn_close_css_class,o.btnCssClass),o.stylesheet=(0,f.defaultsStr)(n.stylesheet,"colsVisibility.css"),o.spanCssClass=(0,f.defaultsStr)(n.span_css_class,"colVisSpan"),o.contCssClass=(0,f.defaultsStr)(n.cont_css_class,"colVisCont"),o.listCssClass=(0,f.defaultsStr)(s.list_css_class,"cols_checklist"),o.listItemCssClass=(0,f.defaultsStr)(s.checklist_item_css_class,"cols_checklist_item"),o.listSlcItemCssClass=(0,f.defaultsStr)(s.checklist_selected_item_css_class,"cols_checklist_slc_item"),o.text=(0,f.defaultsStr)(n.text,o.tickToHide?"Hide: ":"Show: "),o.atStart=(0,f.defaultsArr)(n.at_start,[]),o.enableHover=Boolean(n.enable_hover),o.enableTickAll=Boolean(n.enable_tick_all),o.tickAllText=(0,f.defaultsStr)(n.tick_all_text,"Select all:"),o.hiddenCols=[],o.boundMouseup=null,o.onLoaded=(0,f.defaultsFn)(n.on_loaded,d.EMPTY_FN),o.onBeforeOpen=(0,f.defaultsFn)(n.on_before_open,d.EMPTY_FN),o.onAfterOpen=(0,f.defaultsFn)(n.on_after_open,d.EMPTY_FN),o.onBeforeClose=(0,f.defaultsFn)(n.on_before_close,d.EMPTY_FN),o.onAfterClose=(0,f.defaultsFn)(n.on_after_close,d.EMPTY_FN),o.onBeforeColHidden=(0,f.defaultsFn)(n.on_before_col_hidden,d.EMPTY_FN),o.onAfterColHidden=(0,f.defaultsFn)(n.on_after_col_hidden,d.EMPTY_FN),o.onBeforeColDisplayed=(0,f.defaultsFn)(n.on_before_col_displayed,d.EMPTY_FN),o.onAfterColDisplayed=(0,f.defaultsFn)(n.on_after_col_displayed,d.EMPTY_FN),t.gridLayout&&(o.headersTbl=t.feature("gridLayout").headTbl,o.headersIndex=0),t.import(n.name+"Style",t.getStylePath()+o.stylesheet,null,"link"),o.enable(),o}return o(e,t),s(e,[{key:"onMouseup",value:function(t){for(var e=(0,u.targetEvt)(t);e&&e!==this.contEl&&e!==this.btnEl;)e=e.parentNode;e!==this.contEl&&e!==this.btnEl&&this.toggle()}},{key:"toggle",value:function(){(0,u.removeEvt)(c.root,"mouseup",this.boundMouseup);var t=this.contEl.style.display;"inline"!==t&&this.onBeforeOpen(this),"inline"===t&&this.onBeforeClose(this),this.contEl.style.display="inline"===t?h.NONE:"inline","inline"!==t&&(this.onAfterOpen(this),(0,u.addEvt)(c.root,"mouseup",this.boundMouseup)),"inline"===t&&this.onAfterClose(this)}},{key:"checkItem",value:function(t){var e=t.parentNode;if(e&&t){var n=t.firstChild.checked,r=t.firstChild.getAttribute("id").split("_")[1];r=parseInt(r,10),n?(0,l.addClass)(e,this.listSlcItemCssClass):(0,l.removeClass)(e,this.listSlcItemCssClass);var i=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(i=!0),this.setHidden(r,i)}}},{key:"init",value:function(){var t=this;!this.initialized&&this.manager&&(this.emitter.on(["hide-column"],function(e,n){return t.hideCol(n)}),this.buildBtn(),this.buildManager(),this.initialized=!0,this.boundMouseup=this.onMouseup.bind(this),this.emitter.emit("columns-visibility-initialized",this.tf,this),this._hideAtStart())}},{key:"buildBtn",value:function(){var t=this;if(!this.btnEl){var e=this.tf,n=(0,l.createElm)("span");n.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var r=this.btnTgtId?(0,l.elm)(this.btnTgtId):e.rDiv;if(this.btnTgtId)r.appendChild(n);else{var i=r.firstChild;i.parentNode.insertBefore(n,i)}if(this.btnHtml){n.innerHTML=this.btnHtml;var o=n.firstChild;this.enableHover?(0,u.addEvt)(o,"mouseover",function(e){return t.toggle(e)}):(0,u.addEvt)(o,"click",function(e){return t.toggle(e)})}else{var s=(0,l.createElm)("a",["href","javascript:;"]);s.className=this.btnCssClass,s.title=this.desc,s.innerHTML=this.btnText,n.appendChild(s),this.enableHover?(0,u.addEvt)(s,"mouseover",function(e){return t.toggle(e)}):(0,u.addEvt)(s,"click",function(e){return t.toggle(e)})}this.spanEl=n,this.btnEl=this.spanEl.firstChild,this.onLoaded(this)}}},{key:"buildManager",value:function(){var t=this,e=this.tf,n=this.contElTgtId?(0,l.elm)(this.contElTgtId):(0,l.createElm)("div");n.className=this.contCssClass;var r=(0,l.createElm)("p");r.innerHTML=this.text,n.appendChild(r);var i=(0,l.createElm)("ul");i.className=this.listCssClass;var o=this.headersTbl||e.dom(),s=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),a=o.rows[s];if(this.enableTickAll){var d=(0,l.createCheckItem)("col__"+e.id,this.tickAllText,this.tickAllText);(0,l.addClass)(d,this.listItemCssClass),i.appendChild(d),d.check.checked=!this.tickToHide,(0,u.addEvt)(d.check,"click",function(){for(var t=0;t<a.cells.length;t++){var n=(0,l.elm)("col_"+t+"_"+e.id);n&&d.check.checked!==n.checked&&(n.click(),n.checked=d.check.checked)}})}for(var c=0;c<a.cells.length;c++){var h=a.cells[c],f=this.headersText[c]||this._getHeaderText(h),p=(0,l.createCheckItem)("col_"+c+"_"+e.id,f,f);(0,l.addClass)(p,this.listItemCssClass),this.tickToHide||(0,l.addClass)(p,this.listSlcItemCssClass),i.appendChild(p),this.tickToHide||(p.check.checked=!0),(0,u.addEvt)(p.check,"click",function(e){var n=(0,u.targetEvt)(e),r=n.parentNode;t.checkItem(r)})}var b=(0,l.createElm)("p",["align","center"]),m=void 0;this.btnCloseHtml?(b.innerHTML=this.btnCloseHtml,m=b.firstChild,(0,u.addEvt)(m,"click",function(e){return t.toggle(e)})):(m=(0,l.createElm)("a",["href","javascript:;"]),m.className=this.btnCloseCssClass,m.innerHTML=this.btnCloseText,(0,u.addEvt)(m,"click",function(e){return t.toggle(e)}),b.appendChild(m)),n.appendChild(i),n.appendChild(b),this.btnEl.parentNode.insertBefore(n,this.btnEl),this.contEl=n}},{key:"setHidden",value:function(t,e){var n=this.tf,r=n.dom();e&&this.onBeforeColHidden(this,t),e||this.onBeforeColDisplayed(this,t),this._hideCells(r,t,e),this.headersTbl&&this._hideCells(this.headersTbl,t,e);var i=this.hiddenCols,o=i.indexOf(t);e?-1===o&&this.hiddenCols.push(t):-1!==o&&this.hiddenCols.splice(o,1),e&&(this.onAfterColHidden(this,t),this.emitter.emit("column-hidden",n,this,t,this.hiddenCols)),e||(this.onAfterColDisplayed(this,t),this.emitter.emit("column-shown",n,this,t,this.hiddenCols))}},{key:"showCol",value:function(t){if(!(0,d.isUndef)(t)&&this.isColHidden(t))if(this.manager&&this.contEl){var e=(0,l.elm)("col_"+t+"_"+this.tf.id);e&&e.click()}else this.setHidden(t,!1)}},{key:"hideCol",value:function(t){if(!(0,d.isUndef)(t)&&!this.isColHidden(t))if(this.manager&&this.contEl){var e=(0,l.elm)("col_"+t+"_"+this.tf.id);e&&e.click()}else this.setHidden(t,!0)}},{key:"isColHidden",value:function(t){return-1!==this.hiddenCols.indexOf(t)}},{key:"toggleCol",value:function(t){(0,d.isUndef)(t)||this.isColHidden(t)?this.showCol(t):this.hideCol(t)}},{key:"getHiddenCols",value:function(){return this.hiddenCols}},{key:"destroy",value:function(){var t=this;this.initialized&&((0,l.elm)(this.contElTgtId)?(0,l.elm)(this.contElTgtId).innerHTML="":(this.contEl.innerHTML="",(0,l.removeElm)(this.contEl),this.contEl=null),this.btnEl.innerHTML="",(0,l.removeElm)(this.btnEl),this.btnEl=null,this.emitter.off(["hide-column"],function(e,n){return t.hideCol(n)}),this.boundMouseup=null,this.initialized=!1)}},{key:"_getHeaderText",value:function(t){if(!t.hasChildNodes)return"";for(var e=0;e<t.childNodes.length;e++){var n=t.childNodes[e];if(3===n.nodeType)return n.nodeValue;if(1===n.nodeType){if(n.id&&-1!==n.id.indexOf("popUp"))continue;return(0,l.getText)(n)}}return""}},{key:"_hideCells",value:function(t,e,n){for(var r=0;r<t.rows.length;r++){var i=t.rows[r],o=i.cells[e];o&&(o.style.display=n?h.NONE:"")}}},{key:"_hideAtStart",value:function(){var t=this;this.atStart.forEach(function(e){t.hideCol(e)})}}]),e}(a.Feature);e.default=p},445:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(12),l=n(10),d=n(6),u=n(19),c=n(9),h=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n.name));return o.name=n.name,o.desc=(0,c.defaultsStr)(n.description,"Filters row visibility manager"),o.stylesheet=(0,c.defaultsStr)(n.stylesheet,"filtersVisibility.css"),o.icnExpand=(0,c.defaultsStr)(n.expand_icon_name,"icn_exp.png"),o.icnCollapse=(0,c.defaultsStr)(n.collapse_icon_name,"icn_clp.png"),o.contEl=null,o.btnEl=null,o.icnExpandHtml='<img src="'+t.themesPath+o.icnExpand+'" alt="Expand filters" >',o.icnCollapseHtml='<img src="'+t.themesPath+o.icnCollapse+'" alt="Collapse filters" >',o.defaultText="Toggle filters",o.targetId=n.target_id||null,o.enableIcon=(0,c.defaultsBool)(n.enable_icon,!0),o.btnText=(0,c.defaultsStr)(n.btn_text,""),o.collapseBtnHtml=o.enableIcon?o.icnCollapseHtml+o.btnText:o.btnText||o.defaultText,o.expandBtnHtml=o.enableIcon?o.icnExpandHtml+o.btnText:o.btnText||o.defaultText,o.btnHtml=(0,c.defaultsStr)(n.btn_html,null),o.btnCssClass=(0,c.defaultsStr)(n.btn_css_class,"btnExpClpFlt"),o.contCssClass=(0,c.defaultsStr)(n.cont_css_class,"expClpFlt"),o.filtersRowIndex=(0,c.defaultsNb)(n.filters_row_index,t.getFiltersRowIndex()),o.visibleAtStart=(0,c.defaultsNb)(n.visible_at_start,!0),o.onBeforeShow=(0,c.defaultsFn)(n.on_before_show,d.EMPTY_FN),o.onAfterShow=(0,c.defaultsFn)(n.on_after_show,d.EMPTY_FN),o.onBeforeHide=(0,c.defaultsFn)(n.on_before_hide,d.EMPTY_FN),o.onAfterHide=(0,c.defaultsFn)(n.on_after_hide,d.EMPTY_FN),t.import(n.name+"Style",t.getStylePath()+o.stylesheet,null,"link"),o.enable(),o}return o(e,t),s(e,[{key:"init",value:function(){var t=this;this.initialized||(this.buildUI(),this.initialized=!0,this.emitter.on(["show-filters"],function(e,n){return t.show(n)}),this.emitter.emit("filters-visibility-initialized",this.tf,this))}},{key:"buildUI",value:function(){var t=this,e=this.tf,n=(0,l.createElm)("span");n.className=this.contCssClass,this.targetId||e.setToolbar();var r=this.targetId?(0,l.elm)(this.targetId):e.rDiv;if(this.targetId)r.appendChild(n);else{var i=r.firstChild;i.parentNode.insertBefore(n,i)}var o=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,o=n.firstChild):(o=(0,l.createElm)("a",["href","javascript:void(0);"]),o.className=this.btnCssClass,o.title=this.btnText||this.defaultText,o.innerHTML=this.collapseBtnHtml,n.appendChild(o)),(0,u.addEvt)(o,"click",function(){return t.toggle()}),this.contEl=n,this.btnEl=o,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.dom(),n=e.rows[this.filtersRowIndex],r=""===n.style.display;this.show(!r)}},{key:"show",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.tf,n=e.gridLayout?e.feature("gridLayout").headTbl:e.dom(),r=n.rows[this.filtersRowIndex];t&&this.onBeforeShow(this),t||this.onBeforeHide(this),r.style.display=t?"":"none",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=t?this.collapseBtnHtml:this.expandBtnHtml),t&&this.onAfterShow(this),t||this.onAfterHide(this),this.emitter.emit("filters-toggled",e,this,t)}},{key:"destroy",value:function(){var t=this;this.initialized&&(this.emitter.off(["show-filters"],function(e,n){return t.show(n)}),this.btnEl.innerHTML="",(0,l.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,l.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)}}]),e}(a.Feature);e.default=h},446:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(441),i=function(t){return t&&t.__esModule?t:{default:t}}(r);n(16).root.SortableTable||n(448),e.default=i.default},447:function(t,e){function n(t){function e(e,n){if(n=n||{},!e&&0!==e)return"";e=""+e;var d=[],u="-"===e.charAt(0);return e=e.replace(/^\-/g,""),t.negativeLeftOut||n.noUnits||d.push(t.prefix),u&&d.push(t.negativeLeftSymbol),t.negativeLeftOut&&!n.noUnits&&d.push(t.prefix),e=e.split("."),null!=t.round&&l(e,t.round),null!=t.truncate&&(e[1]=a(e[1],t.truncate)),t.padLeft>0&&(e[0]=o(e[0],t.padLeft)),t.padRight>0&&(e[1]=s(e[1],t.padRight)),!n.noSeparator&&e[1]&&(e[1]=i(e[1],t.decimalsSeparator)),!n.noSeparator&&e[0]&&(e[0]=r(e[0],t.integerSeparator)),d.push(e[0]),e[1]&&(d.push(t.decimal),d.push(e[1])),t.negativeRightOut&&!n.noUnits&&d.push(t.suffix),u&&d.push(t.negativeRightSymbol),t.negativeRightOut||n.noUnits||d.push(t.suffix),d.join("")}function n(e,n){n=n||[],t.allowedSeparators&&t.allowedSeparators.forEach(function(t){n.push(t)}),n.push(t.integerSeparator),n.push(t.decimalsSeparator),e=e.replace(t.prefix,""),e=e.replace(t.suffix,"");var r=e;do{e=r;for(var i=0;i<n.length;i++)r=r.replace(n[i],"")}while(r!=e);return e}if(t=t||{},t.negativeType=t.negativeType||("R"===t.negative?"right":"left"),"string"!=typeof t.negativeLeftSymbol)switch(t.negativeType){case"left":t.negativeLeftSymbol="-";break;case"brackets":t.negativeLeftSymbol="(";break;default:t.negativeLeftSymbol=""}if("string"!=typeof t.negativeRightSymbol)switch(t.negativeType){case"right":t.negativeRightSymbol="-";break;case"brackets":t.negativeRightSymbol=")";break;default:t.negativeRightSymbol=""}return"boolean"!=typeof t.negativeLeftOut&&(t.negativeLeftOut=!1!==t.negativeOut),"boolean"!=typeof t.negativeRightOut&&(t.negativeRightOut=!1!==t.negativeOut),t.prefix=t.prefix||"",t.suffix=t.suffix||"","string"!=typeof t.integerSeparator&&(t.integerSeparator="string"==typeof t.separator?t.separator:","),t.decimalsSeparator="string"==typeof t.decimalsSeparator?t.decimalsSeparator:"",t.decimal=t.decimal||".",t.padLeft=t.padLeft||-1,t.padRight=t.padRight||-1,e.negative=t.negative,e.negativeOut=t.negativeOut,e.negativeType=t.negativeType,e.negativeLeftOut=t.negativeLeftOut,e.negativeLeftSymbol=t.negativeLeftSymbol,e.negativeRightOut=t.negativeRightOut,e.negativeRightSymbol=t.negativeRightSymbol,e.prefix=t.prefix,e.suffix=t.suffix,e.separate=t.separate,e.integerSeparator=t.integerSeparator,e.decimalsSeparator=t.decimalsSeparator,e.decimal=t.decimal,e.padLeft=t.padLeft,e.padRight=t.padRight,e.truncate=t.truncate,e.round=t.round,e.unformat=n,e}function r(t,e){if(t+="",!e)return t;for(var n=/(\d+)(\d{3})/;n.test(t);)t=t.replace(n,"$1"+e+"$2");return t}function i(t,e){if(t+="",!e)return t;for(var n=/(\d{3})(\d+)/;n.test(t);)t=t.replace(n,"$1"+e+"$2");return t}function o(t,e){t+="";for(var n=[];n.length+t.length<e;)n.push("0");return n.join("")+t}function s(t,e){t?t+="":t="";for(var n=[];n.length+t.length<e;)n.push("0");return t+n.join("")}function a(t,e){return t&&(t+=""),t&&t.length>e?t.substr(0,e):t}function l(t,e){if(t[1]&&e>=0&&t[1].length>e){var n=t[1].slice(0,e);if(+t[1].substr(e,1)>=5){for(var r="";"0"===n.charAt(0);)r+="0",n=n.substr(1);n=+n+1+"",n=r+n,n.length>e&&(t[0]=+t[0]+ +n.charAt(0)+"",n=n.substring(1))}t[1]=n}return t}t.exports=n},448:function(t,e,n){n(449)(n(450))},449:function(t,e){t.exports=function(t){"undefined"!=typeof execScript?execScript(t):eval.call(null,t)}},450:function(t,e){t.exports='/*----------------------------------------------------------------------------\\\r\n| Sortable Table 1.12 |\r\n|-----------------------------------------------------------------------------|\r\n| Created by Erik Arvidsson |\r\n| (http://webfx.eae.net/contact.html#erik) |\r\n| For WebFX (http://webfx.eae.net/) |\r\n|-----------------------------------------------------------------------------|\r\n| A DOM 1 based script that allows an ordinary HTML table to be sortable. |\r\n|-----------------------------------------------------------------------------|\r\n| Copyright (c) 1998 - 2006 Erik Arvidsson |\r\n|-----------------------------------------------------------------------------|\r\n| Licensed under the Apache License, Version 2.0 (the "License"); you may not |\r\n| use this file except in compliance with the License. You may obtain a copy |\r\n| of the License at http://www.apache.org/licenses/LICENSE-2.0 |\r\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\r\n| Unless required by applicable law or agreed to in writing, software |\r\n| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |\r\n| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |\r\n| License for the specific language governing permissions and limitations |\r\n| under the License. |\r\n|-----------------------------------------------------------------------------|\r\n| 2003-01-10 | First version |\r\n| 2003-01-19 | Minor changes to the date parsing |\r\n| 2003-01-28 | JScript 5.0 fixes (no support for \'in\' operator) |\r\n| 2003-02-01 | Sloppy typo like error fixed in getInnerText |\r\n| 2003-07-04 | Added workaround for IE cellIndex bug. |\r\n| 2003-11-09 | The bDescending argument to sort was not correctly working |\r\n| | Using onclick DOM0 event if no support for addEventListener |\r\n| | or attachEvent |\r\n| 2004-01-13 | Adding addSortType and removeSortType which makes it a lot |\r\n| | easier to add new, custom sort types. |\r\n| 2004-01-27 | Switch to use descending = false as the default sort order. |\r\n| | Change defaultDescending to suit your needs. |\r\n| 2004-03-14 | Improved sort type None look and feel a bit |\r\n| 2004-08-26 | Made the handling of tBody and tHead more flexible. Now you |\r\n| | can use another tHead or no tHead, and you can chose some |\r\n| | other tBody. |\r\n| 2006-04-25 | Changed license to Apache Software License 2.0 |\r\n|-----------------------------------------------------------------------------|\r\n| Created 2003-01-10 | All changes are in the log above. | Updated 2006-04-25 |\r\n\\----------------------------------------------------------------------------*/\r\n\r\n\r\nfunction SortableTable(oTable, oSortTypes) {\r\n\r\n\tthis.sortTypes = oSortTypes || [];\r\n\r\n\tthis.sortColumn = null;\r\n\tthis.descending = null;\r\n\r\n\tvar oThis = this;\r\n\tthis._headerOnclick = function (e) {\r\n\t\toThis.headerOnclick(e);\r\n\t};\r\n\r\n\tif (oTable) {\r\n\t\tthis.setTable( oTable );\r\n\t\tthis.document = oTable.ownerDocument || oTable.document;\r\n\t}\r\n\telse {\r\n\t\tthis.document = document;\r\n\t}\r\n\r\n\r\n\t// only IE needs this\r\n\tvar win = this.document.defaultView || this.document.parentWindow;\r\n\tthis._onunload = function () {\r\n\t\toThis.destroy();\r\n\t};\r\n\tif (win && typeof win.attachEvent != "undefined") {\r\n\t\twin.attachEvent("onunload", this._onunload);\r\n\t}\r\n}\r\n\r\nSortableTable.gecko = navigator.product == "Gecko";\r\nSortableTable.msie = /msie/i.test(navigator.userAgent);\r\n// Mozilla is faster when doing the DOM manipulations on\r\n// an orphaned element. MSIE is not\r\nSortableTable.removeBeforeSort = SortableTable.gecko;\r\n\r\nSortableTable.prototype.onsort = function () {};\r\n\r\n// default sort order. true -> descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.element = oTable;\r\n\tthis.setTHead( oTable.tHead );\r\n\tthis.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n\tif (this.tHead && this.tHead != oTHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.tHead = oTHead;\r\n\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n\tthis.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tif ( this.tHead )\r\n\t\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar doc = this.tHead.ownerDocument || this.tHead.document;\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tvar l = cells.length;\r\n\tvar img, c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n\t\t\timg = doc.createElement("IMG");\r\n\t\t\timg.src = "images/blank.png";\r\n\t\t\tc.appendChild(img);\r\n\t\t\tif (this.sortTypes[i] != null)\r\n\t\t\t\tc._sortType = this.sortTypes[i];\r\n\t\t\tif (typeof c.addEventListener != "undefined")\r\n\t\t\t\tc.addEventListener("click", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.attachEvent != "undefined")\r\n\t\t\t\tc.attachEvent("onclick", this._headerOnclick);\r\n\t\t\telse\r\n\t\t\t\tc.onclick = this._headerOnclick;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tc.setAttribute( "_sortType", oSortTypes[i] );\r\n\t\t\tc._sortType = "None";\r\n\t\t}\r\n\t}\r\n\tthis.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (c._sortType != null && c._sortType != "None") {\r\n\t\t\tc.removeChild(c.lastChild);\r\n\t\t\tif (typeof c.removeEventListener != "undefined")\r\n\t\t\t\tc.removeEventListener("click", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.detachEvent != "undefined")\r\n\t\t\t\tc.detachEvent("onclick", this._headerOnclick);\r\n\t\t\tc._sortType = null;\r\n\t\t\tc.removeAttribute( "_sortType" );\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar img;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tif (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n\t\t\timg = cells[i].lastChild;\r\n\t\t\tif (i == this.sortColumn)\r\n\t\t\t\timg.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n\t\t\telse\r\n\t\t\t\timg.className = "sort-arrow";\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n\t// find TD element\r\n\tvar el = e.target || e.srcElement;\r\n\twhile (el.tagName != "TD")\r\n\t\tel = el.parentNode;\r\n\r\n\tthis.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n\tvar cells = oTd.parentNode.childNodes\r\n\tvar l = cells.length;\r\n\tvar i;\r\n\tfor (i = 0; cells[i] != oTd && i < l; i++)\r\n\t\t;\r\n\treturn i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n\treturn this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n\tif (!this.tBody) return;\r\n\tif (sSortType == null)\r\n\t\tsSortType = this.getSortType(nColumn);\r\n\r\n\t// exit if None\r\n\tif (sSortType == "None")\r\n\t\treturn;\r\n\r\n\tif (bDescending == null) {\r\n\t\tif (this.sortColumn != nColumn)\r\n\t\t\tthis.descending = this.defaultDescending;\r\n\t\telse\r\n\t\t\tthis.descending = !this.descending;\r\n\t}\r\n\telse\r\n\t\tthis.descending = bDescending;\r\n\r\n\tthis.sortColumn = nColumn;\r\n\r\n\tif (typeof this.onbeforesort == "function")\r\n\t\tthis.onbeforesort();\r\n\r\n\tvar f = this.getSortFunction(sSortType, nColumn);\r\n\tvar a = this.getCache(sSortType, nColumn);\r\n\tvar tBody = this.tBody;\r\n\r\n\ta.sort(f);\r\n\r\n\tif (this.descending)\r\n\t\ta.reverse();\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// remove from doc\r\n\t\tvar nextSibling = tBody.nextSibling;\r\n\t\tvar p = tBody.parentNode;\r\n\t\tp.removeChild(tBody);\r\n\t}\r\n\r\n\t// insert in the new order\r\n\tvar l = a.length;\r\n\tfor (var i = 0; i < l; i++)\r\n\t\ttBody.appendChild(a[i].element);\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// insert into doc\r\n\t\tp.insertBefore(tBody, nextSibling);\r\n\t}\r\n\r\n\tthis.updateHeaderArrows();\r\n\r\n\tthis.destroyCache(a);\r\n\r\n\tif (typeof this.onsort == "function")\r\n\t\tthis.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n\tvar oThis = this;\r\n\tthis._asyncsort = function () {\r\n\t\toThis.sort(nColumn, bDescending, sSortType);\r\n\t};\r\n\twindow.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n\tif (!this.tBody) return [];\r\n\tvar rows = this.tBody.rows;\r\n\tvar l = rows.length;\r\n\tvar a = new Array(l);\r\n\tvar r;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tr = rows[i];\r\n\t\ta[i] = {\r\n\t\t\tvalue:\t\tthis.getRowValue(r, sType, nColumn),\r\n\t\t\telement:\tr\r\n\t\t};\r\n\t};\r\n\treturn a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n\tvar l = oArray.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\toArray[i].value = null;\r\n\t\toArray[i].element = null;\r\n\t\toArray[i] = null;\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n\t// if we have defined a custom getRowValue use that\r\n\tif (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n\t\treturn this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n\tvar s;\r\n\tvar c = oRow.cells[nColumn];\r\n\tif (typeof c.innerText != "undefined")\r\n\t\ts = c.innerText;\r\n\telse\r\n\t\ts = SortableTable.getInnerText(c);\r\n\treturn this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n\tvar s = "";\r\n\tvar cs = oNode.childNodes;\r\n\tvar l = cs.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tswitch (cs[i].nodeType) {\r\n\t\t\tcase 1: //ELEMENT_NODE\r\n\t\t\t\ts += SortableTable.getInnerText(cs[i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\t//TEXT_NODE\r\n\t\t\t\ts += cs[i].nodeValue;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].getValueFromString( sText );\r\n\treturn sText;\r\n\t/*\r\n\tswitch (sType) {\r\n\t\tcase "Number":\r\n\t\t\treturn Number(sText);\r\n\t\tcase "CaseInsensitiveString":\r\n\t\t\treturn sText.toUpperCase();\r\n\t\tcase "Date":\r\n\t\t\tvar parts = sText.split("-");\r\n\t\t\tvar d = new Date(0);\r\n\t\t\td.setFullYear(parts[0]);\r\n\t\t\td.setDate(parts[2]);\r\n\t\t\td.setMonth(parts[1] - 1);\r\n\t\t\treturn d.valueOf();\r\n\t}\r\n\treturn sText;\r\n\t*/\r\n\t};\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].compare;\r\n\treturn SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n\tthis.uninitHeader();\r\n\tvar win = this.document.parentWindow;\r\n\tif (win && typeof win.detachEvent != "undefined") {\t// only IE needs this\r\n\t\twin.detachEvent("onunload", this._onunload);\r\n\t}\r\n\tthis._onunload = null;\r\n\tthis.element = null;\r\n\tthis.tHead = null;\r\n\tthis.tBody = null;\r\n\tthis.document = null;\r\n\tthis._headerOnclick = null;\r\n\tthis.sortTypes = null;\r\n\tthis._asyncsort = null;\r\n\tthis.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n\tthis._sortTypeInfo[sType] = {\r\n\t\ttype:\t\t\t\tsType,\r\n\t\tgetValueFromString:\tfGetValueFromString || SortableTable.idFunction,\r\n\t\tcompare:\t\t\tfCompareFunction || SortableTable.basicCompare,\r\n\t\tgetRowValue:\t\tfGetRowValue\r\n\t};\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n\tdelete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n\tif (n1.value < n2.value)\r\n\t\treturn -1;\r\n\tif (n2.value < n1.value)\r\n\t\treturn 1;\r\n\treturn 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n\treturn x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n\treturn s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n\tvar parts = s.split("-");\r\n\tvar d = new Date(0);\r\n\td.setFullYear(parts[0]);\r\n\td.setDate(parts[2]);\r\n\td.setMonth(parts[1] - 1);\r\n\treturn d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}});
//# sourceMappingURL=tf-0-24aebd8385b2ca535807.js.map