text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery"),require("datatables.net/js/jquery.dataTables"),require("datatables.net-bs4/js/dataTables.bootstrap4"),require("datatables.net-buttons/js/dataTables.buttons"),require("datatables.net-buttons-bs4/js/buttons.bootstrap4"),require("datatables.net-buttons/js/buttons.colVis"),require("datatables.net-buttons/js/buttons.html5"),require("datatables.net-buttons/js/buttons.print"),require("datatables.net-responsive/js/dataTables.responsive"),require("datatables.net-responsive-bs4/js/responsive.bootstrap4")):"function"==typeof define&&define.amd?define(["jquery","datatables.net/js/jquery.dataTables","datatables.net-bs4/js/dataTables.bootstrap4","datatables.net-buttons/js/dataTables.buttons","datatables.net-buttons-bs4/js/buttons.bootstrap4","datatables.net-buttons/js/buttons.colVis","datatables.net-buttons/js/buttons.html5","datatables.net-buttons/js/buttons.print","datatables.net-responsive/js/dataTables.responsive","datatables.net-responsive-bs4/js/responsive.bootstrap4"],e):e((t=t||self).jquery)}(this,function(t){t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,"undefined"!=typeof module&&module.exports&&(module.exports=function(){function e(e,s,n,a){this.version="3.0.1",this.table=e,this.userOptions=s,this.eventOptions=n,this.translations=a,this.elements={columnRowSelector:".js-table-columns",filterRowSelector:".js-table-filters",filterSelectColumn:".js-select-filter",filterInputColumn:".js-input-filter"},this.prefix={throw:"w2wDataTables: "},this.defaultOptions={language:"en",stateSaving:!0,dom:'<"row"<"col-md-4"f><"col-md-4 col-md-offset-4 text-right">>trlip<"clear">',buttons:[],showAlertForXhrInactivity:!0,handleXhrInactivity:function(){},showAlertForErrors:!0,handleErrors:function(){}},this.globals={options:{},source:e.data("source"),columnFilter:e.data("column-filter"),autoReload:e.data("auto-reload"),perPage:e.data("per-page"),tableID:e.attr("id"),serverSide:!0,table:!1,state:!1,translations:{},debounceDelay:250},this.events={"draw.dt":[this.recalc.bind(this)],"init.dt":[],initComplete:[],"xhr.dt":[this.onXhr.bind(this)],"error.dt":[this.onError.bind(this)]},t.fn.dataTable.ext.errMode="none"}var s=e.prototype;return s.onXhr=function(t,e,s,n){if(4===n.readyState&&200!==n.status){if(403!==n.status||"CSRF token validation failed"!==n.responseJSON.error)throw e.oInit.showAlertForErrors&&alert("Something went wrong. The administrator has been notified. Please try again later."),e.oInit.handleErrors(),this.prefix.throw+"Ajax call returned a "+n.status+" status code";e.oInit.showAlertForXhrInactivity&&alert("You need to refresh the page due to an extended period of inactivity"),e.oInit.handleXhrInactivity()}},s.onError=function(t,e,s,n){if(7!==s)throw e.oInit.showAlertForErrors&&alert("Something went wrong. The administrator has been notified. Please try again later."),e.oInit.handleErrors(),this.prefix.throw+n},s.init=function(){this.globals.options=this.getOptions(),this.globals.translations=this.getTranslations(),this.globals.options.buttons=this.getFilters(),this.hasRequirementsOrThrow(),this.getEventOptions(),this.makeTable()},s.getOptions=function(){return t.extend(this.defaultOptions,this.userOptions)},s.getTranslations=function(){return this.translations.get(this.globals.options.language)},s.getEventOptions=function(){t.each(this.eventOptions,function(e,s){this.events[e]=t.extend({},this.events[e],s||{})})},s.hasRequirementsOrThrow=function(){var t=this.table.find(this.elements.columnRowSelector);if(void 0!==this.globals.source&&""!==this.globals.source||(this.globals.serverSide=!1),void 0===this.globals.tableID||""===this.globals.tableID)throw this.prefix.throw+"missing id attribute!";if(0===t.length)throw this.prefix.throw+"missing column row ("+this.elements.columnRowSelector+")!";if(void 0!==this.globals.autoReload&&!this.globals.autoReload>0)throw this.prefix.throw+"invalid reload interval!";if(void 0!==this.globals.perPage&&!this.globals.perPage>0)throw this.prefix.throw+"invalid amount per page!"},s.makeTable=function(){var e={autoWidth:!1,columns:this.getColumns(),initComplete:function(){e.component.table.find(e.component.elements.filterRowSelector).length>0&&e.component.filterColumn(),e.component.triggerEvent("initComplete")},order:this.getOrder(),orderCellsTop:!0,processing:!0,responsive:!0,serverSide:this.globals.serverSide,stateSave:this.globals.options.stateSaving,component:this},s=this;if(t.extend(e,this.globals.options),e.language=this.globals.translations,1==this.globals.serverSide&&(e.ajax={method:"POST",url:this.globals.source}),!this.table)throw"Unknown element for the datatable!";this.globals.table=this.table.DataTable(e),this.globals.state=this.globals.table.state.loaded(),this.setFilterValues(),void 0!==this.globals.autoReload&&this.bindReload(this.globals.autoReload),void 0!==this.globals.perPage&&(this.globals.options.perPage=this.globals.perPage),void 0!==this.globals.options.perPage&&this.setPageLength(),this.globals.table.on("init.dt",function(){s.triggerEvent("init.dt")}),t.each(this.events,this.listenToEvent.bind(this)),1!=this.globals.serverSide&&this.filterColumn()},s.addEvent=function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},s.listenToEvent=function(t){var e=this;this.globals.table.on(t,function(){e.triggerEvent(t,arguments)})},s.triggerEvent=function(e,s){this.events[e]&&t.each(this.events[e],function(t,e){e.apply(this,s)})},s.setPageLength=function(){this.globals.table.page.len(this.globals.options.perPage).draw()},s.getColumns=function(){var e=this.table.find(this.elements.columnRowSelector+" th"),s=[];return e.each(function(){var e=[!0,!1],n=t(this),a=n.data("name"),o=n.data("data"),i=n.data("orderable"),l=n.data("searchable");void 0===o&&(o=a),void 0!==i&&e.indexOf(i)||(i=!0),void 0!==l&&e.indexOf(l)||(l=!0),s.push({data:o,name:a,orderable:i,searchable:l})}),s},s.getOrder=function(){var t=this.table.find('[data-default-sort="true"]'),e=t.data("default-sort-order");if(0===t.length)return[[0,"desc"]];if(void 0===e)throw this.prefix.throw+'You must add a sorting order (default-sort-order="asc/desc") if you are filtering on a custom column!';if(-1==["asc","desc"].indexOf(e))throw this.prefix.throw+"You must add a valid sorting order (asc/desc) if you are filtering on a custom column!";return[[t.index(),e]]},s.filterColumn=function(){var t=this;t.globals.table&&t.globals.table.columns().eq(0).each(function(e){var s=t.table.find(t.elements.filterRowSelector+" th:eq("+e+")");t.initFilterSelect(e,s),t.initFilterInput(e,s)})},s.initFilterInput=function(e,s){var n=this,a=n.debounce(function(s,a){var o=t(this).val();a&&!o||n.globals.table.column(e).search(o).draw()},n.globals.debounceDelay);s.find(n.elements.filterInputColumn).on("input",a),s.find(n.elements.filterInputColumn).on("change",a),s.find(n.elements.filterInputColumn).each(a)},s.initFilterSelect=function(e,s){var n=this,a=n.debounce(function(s,a){var o=t(this).val();a&&!o||n.globals.table.column(e).search(n.searchString(o),!0,!1).draw()},n.globals.debounceDelay);s.find(n.elements.filterSelectColumn).on("change",a),s.find(n.elements.filterSelectColumn).each(a)},s.searchString=function(t,e){void 0===e&&(e="|");var s=t;return!s||Array.isArray(s)&&s.length<1?"":(Array.isArray(s)&&s.length>0&&(s=s.join(e)),"^"+s+"$")},s.bindReload=function(t){setInterval(function(){this.globals.table.ajax.reload()},t)},s.debounce=function(t,e,s){var n;return function(){var a=this,o=arguments;clearTimeout(n),n=setTimeout(function(){n=null,s||t.apply(a,o)},e),s&&!n&&t.apply(a,o)}},s.recalc=function(){this.globals.table&&this.globals.table.responsive.recalc()},s.setFilterValues=function(){var e=this;e.globals.state&&e.globals.state.columns&&t.each(e.globals.state.columns,function(t,s){var n=s.search.search;n&&(s.search.regex&&(n=n.slice(1,-1)),e.table.find(e.elements.filterRowSelector+" th").eq(t).find(".form-control").val(n))})},s.getFilters=function(){var e=this.table.find(this.elements.columnRowSelector+" th"),s={},n=[],a=[],o=this;return o.globals.options.buttons&&(n=this.globals.options.buttons),e.each(function(){var e=t(o),n=e.data("name"),i=e.data("filter");i?(t.each(i.split("|"),function(t,e){s[e]||(s[e]=[]),s[e].indexOf(n+":name")<0&&s[e].push(n+":name")}),a.push(n+":name")):a.push(n+":name")}),t.each(s,function(t,e){var s=a.filter(function(t){return e.indexOf(t)<0});n.push({extend:"colvisGroup",text:t,show:e,hide:s})}),!jQuery.isEmptyObject(s)&&n.length>0&&n.push({extend:"colvisGroup",text:o.globals.translations.all,show:a,hide:[]}),1==o.globals.columnFilter&&n.push({extend:"colvis",text:'<i class="fa fa-columns"></i> '+o.globals.translations.columns}),n},s.getTable=function(){return this.globals.table},e}())});
  //# sourceMappingURL=datatables.umd.js.map
  