/*! © SpryMedia Ltd - datatables.net/license */ import DataTable from"datatables.net";function flattenJson(t,e,n){return n=n||{},e=e||"",$.isPlainObject(t)||Array.isArray(t)?$.each(t,function(t,a){flattenJson(a,""===e?t:e+"["+t.toString()+"]",n)}):n[e]=t,n}DataTable.ext.buttons.download={text:"Download",action:function(t,a,e,n){var o={},a=(a.page.info().serverSide&&$.extend(o,a.ajax.params()),"function"==typeof n.data?n.data(o):"object"==typeof n.data&&$.extend(o,n.data),flattenJson(o)),r=$("").css({border:"none",height:0,width:0}).appendTo(document.body)[0].contentWindow.document,d=(r.open(),r.close(),$("
",r).attr("method",n.type).attr("action",n.url).appendTo(r.body));$.each(a,function(t,a){$("",r).attr("type","text").attr("name",t.toString()).attr("autocomplete","no").val(a).appendTo(d)}),d.submit()},url:"",type:"POST",data:{}};export default DataTable;