/*!
 * HTML5 export buttons 4.0.0-beta for Buttons and DataTables.
 * © SpryMedia Ltd - datatables.net/license
 *
 * FileSaver.js (1.3.3) - MIT license
 * Copyright © 2016 Eli Grey - http://eligrey.com
 */
import DataTable,{Dom,util}from"datatables.net";import Buttons from"datatables.net-buttons";var _global=window;function bom(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}function download(e,t,o){var l=new XMLHttpRequest;l.open("GET",e),l.responseType="blob",l.onload=function(){saveAs(l.response,t,o)},l.onerror=function(){console.error("could not download file")},l.send()}function corsEnabled(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&t.status<=299}function click(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(o)}}var isMacOSWebView=_global.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),saveAs=_global.saveAs||("object"!=typeof window||window!==_global?function(){}:"download"in HTMLAnchorElement.prototype&&!isMacOSWebView?function(e,t,o){var l=_global.URL||_global.webkitURL,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",n.download=t,n.rel="noopener","string"==typeof e?(n.href=e,n.origin!==location.origin?corsEnabled(n.href)?download(e,t,o):click(n,n.target="_blank"):click(n)):(n.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(n.href)},4e4),setTimeout(function(){click(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,o){var l;t=t||e.name||"download","string"==typeof e?corsEnabled(e)?download(e,t,o):((l=document.createElement("a")).href=e,l.target="_blank",setTimeout(function(){click(l)})):navigator.msSaveOrOpenBlob(bom(e,o),t)}:function(e,t,o,l){if((l=l||open("","_blank"))&&(l.document.title=l.document.body.innerText="downloading..."),"string"==typeof e)return download(e,t,o);var n,r,a,t="application/octet-stream"===e.type,o=/constructor/i.test(_global.HTMLElement)||_global.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);(d||t&&o||isMacOSWebView)&&"undefined"!=typeof FileReader?((n=new FileReader).onloadend=function(){var e=n.result,e=d?e:e.replace(/^data:[^;]*;/,"data:attachment/file;");l?l.location.href=e:location=e,l=null},n.readAsDataURL(e)):(r=_global.URL||_global.webkitURL,a=r.createObjectURL(e),l?l.location=a:location.href=a,l=null,setTimeout(function(){r.revokeObjectURL(a)},4e4))});let dtButtons=DataTable.ext.buttons;DataTable.fileSave=saveAs;var _sheetname=function(e){var t="Sheet1";return t=e.sheetName?e.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""):t},_newLine=function(e){return e.newline||(navigator.userAgent.match(/Windows/)?"\r\n":"\n")},_exportData=function(e,t){function o(e){for(var t="",o=0,l=e.length;o<l;o++)0<o&&(t+=a),t+=r?r+(""+e[o]).replace(d,p+r)+r:e[o];return t}var l=_newLine(t),n=e.buttons.exportData(t.exportOptions),r=t.fieldBoundary,a=t.fieldSeparator,d=new RegExp(r,"g"),p=void 0!==t.escapeChar?t.escapeChar:"\\",e="",i="",s=[];t.header&&(e=n.headerStructure.map(function(e){return o(e.map(function(e){return e?e.title:""}))}).join(l)+l),t.footer&&n.footer&&(i=n.footerStructure.map(function(e){return o(e.map(function(e){return e?e.title:""}))}).join(l)+l);for(var m=0,f=n.body.length;m<f;m++)s.push(o(n.body[m]));return{str:e+s.join(l)+l+i,rows:s.length}};function createCellPos(e){for(var t="A".charCodeAt(0),o="Z".charCodeAt(0)-t+1,l="";0<=e;)l=String.fromCharCode(e%o+t)+l,e=Math.floor(e/o)-1;return l}try{var _serialiser=new XMLSerializer}catch(e){}function _addToZip(o,e){util.object.each(e,(e,t)=>{util.is.plainObject(t)?_addToZip(o.folder(e),t):(t=(t=_serialiser.serializeToString(t)).replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>"),o.file(e,t))})}function _createNode(e,t,o){var l=e.createElement(t);return o&&(o.attr&&Dom.s(l).attr(o.attr),o.children&&util.object.each(o.children,function(e,t){l.appendChild(t)}),null!=o.text)&&l.appendChild(e.createTextNode(o.text)),l}function _excelColWidth(e,t){var o=e.header[t].length;e.footer&&e.footer[t]&&e.footer[t].length>o&&(o=e.footer[t].length);for(var l=0,n=e.body.length;l<n;l++){var r,a=e.body[l][t];if(40<(o=o<(r=(-1!==(a=null!=a?a.toString():"").indexOf("\n")?((r=a.split("\n")).sort(function(e,t){return t.length-e.length}),r[0]):a).length)?r:o))return 54}return 6<(o*=1.35)?o:6}var excelStrings={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>',"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>',"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><definedNames/></workbook>',"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/><mergeCells count="0"/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="6"><numFmt numFmtId="164" formatCode="[$$-409]#,##0.00;-[$$-409]#,##0.00"/><numFmt numFmtId="165" formatCode="&quot;£&quot;#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="68"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9"   fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="1" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="2" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="14" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'},_excelSpecials=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(e){return e/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(e){return e/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(e){return-1*e.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(e){return-1*e.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64},{match:/^(19\d\d|[2-9]\d\d\d)\-(0\d|1[012])\-[0123][\d]$/,style:67,fmt:function(e){return Math.round(25569+Date.parse(e)/864e5)}}],_excelMergeCells=function(e,t,o,l,n){var r=Dom.s(e).find("mergeCells");r.get(0).appendChild(_createNode(e,"mergeCell",{attr:{ref:createCellPos(o)+t+":"+createCellPos(o+n-1)+(t+l-1)}})),r.attr("count",parseFloat(r.attr("count"))+1)};dtButtons.copyHtml5={className:"buttons-copy buttons-html5",text:function(e){return e.i18n("buttons.copy","Copy")},action:function(e,t,o,l,n){var r=_exportData(t,l),a=t.buttons.exportInfo(l),d=_newLine(l),p=r.str,i=Dom.c("div").css({height:"1px",width:"1px",overflow:"hidden",position:"fixed",top:"0",left:"0"}),d=(a.title&&(p=a.title+d+d+p),a.messageTop&&(p=a.messageTop+d+d+p),a.messageBottom&&(p=p+d+d+a.messageBottom),l.customize&&(p=l.customize(p,l,t)),Dom.c("textarea").prop("readonly",!0).val(p).appendTo(i));if(document.queryCommandSupported("copy")){i.appendTo(t.table().container()),d.get(0).focus(),d.get(0).select();try{var s=document.execCommand("copy");if(i.remove(),s)return l.copySuccess&&t.buttons.info(t.i18n("buttons.copyTitle","Copy to clipboard"),t.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},r.rows),2e3),void n()}catch(e){}}function m(){f.off("click.buttons-copy"),Dom.s(document).off(".buttons-copy"),t.buttons.info(!1)}var a=Dom.c("span").html(t.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")).append(i),f=(t.buttons.info(t.i18n("buttons.copyTitle","Copy to clipboard"),a.get(0),0),d.get(0).focus(),d.get(0).select(),a.closest(".dt-button-info"));f.on("click.buttons-copy",function(){m(),n()}),Dom.s(document).on("keydown.buttons-copy",function(e){27===e.keyCode&&(m(),n())}).on("copy.buttons-copy cut.buttons-copy",function(){m(),n()})},async:100,copySuccess:!0,exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!0,title:"*",messageTop:"*",messageBottom:"*"},dtButtons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return!(void 0===window.FileReader||!window.Blob)},text:function(e){return e.i18n("buttons.csv","CSV")},action:function(e,t,o,l,n){var r=_exportData(t,l).str,a=t.buttons.exportInfo(l),d=l.charset;l.customize&&(r=l.customize(r,l,t)),d=!1!==d?(d=d||document.characterSet||document.charset)&&";charset="+d:"",l.bom&&(r=String.fromCharCode(65279)+r),saveAs(new Blob([r],{type:"text/csv"+d}),a.filename,!0),n()},async:100,filename:"*",extension:".csv",exportOptions:{escapeExcelFormula:!0},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!0},dtButtons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return!(void 0===window.FileReader||void 0===DataTable.Buttons.jszip()||!_serialiser)},text:function(e){return e.i18n("buttons.excel","Excel")},action:function(e,t,o,s,l){function n(e){return e=excelStrings[e],(new window.DOMParser).parseFromString(e,"text/xml")}function r(e){f=_createNode(u,"row",{attr:{r:m=c+1}});for(var t=0,o=e.length;t<o;t++){var l=createCellPos(t)+""+m,n=null;if(null==e[t]||""===e[t]){if(!0!==s.createEmptyCells)continue;e[t]=""}var r=e[t];e[t]="function"==typeof e[t].trim?e[t].trim():e[t];for(var a=0,d=_excelSpecials.length;a<d;a++){var p=_excelSpecials[a];if(e[t].match&&!e[t].match(/^0\d+/)&&e[t].match(p.match)){var i=e[t].replace(/[^\d\.\-]/g,"");p.fmt&&(i=p.fmt(i)),n=_createNode(u,"c",{attr:{r:l,s:p.style},children:[_createNode(u,"v",{text:i})]});break}}n=n||("number"==typeof e[t]||e[t].match&&e[t].match(/^-?\d+(\.\d+)?([eE]\-?\d+)?$/)&&!e[t].match(/^0\d+/)?_createNode(u,"c",{attr:{t:"n",r:l},children:[_createNode(u,"v",{text:e[t]})]}):(r=r.replace?r.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""):r,_createNode(u,"c",{attr:{t:"inlineStr",r:l},children:{row:_createNode(u,"is",{children:{row:_createNode(u,"t",{text:r,attr:{"xml:space":"preserve"}})}})}}))),f.appendChild(n)}y.appendChild(f),c++}function a(e){e.forEach(function(e){r(e.map(function(e){return e?e.title:""})),Dom.s(u).find("row").last().find("c").attr("s","2"),e.forEach(function(e,t){e&&(1<e.colspan||1<e.rowspan)&&_excelMergeCells(u,c,t,e.rowspan,e.colspan)})})}var d,m,f,c=0,u=n("xl/worksheets/sheet1.xml"),y=u.getElementsByTagName("sheetData")[0],p={_rels:{".rels":n("_rels/.rels")},xl:{_rels:{"workbook.xml.rels":n("xl/_rels/workbook.xml.rels")},"workbook.xml":n("xl/workbook.xml"),"styles.xml":n("xl/styles.xml"),worksheets:{"sheet1.xml":u}},"[Content_Types].xml":n("[Content_Types].xml")},i=t.buttons.exportData(s.exportOptions),I=t.buttons.exportInfo(s);I.title&&(r([I.title]),_excelMergeCells(u,c,0,1,i.header.length),Dom.s(u).find("row").last().find("c").attr("s","51")),I.messageTop&&(r([I.messageTop]),_excelMergeCells(u,c,0,1,i.header.length)),s.header&&a(i.headerStructure);for(var F=c,x=0,b=i.body.length;x<b;x++)r(i.body[x]);d=c,s.footer&&i.footer&&a(i.footerStructure),I.messageBottom&&(r([I.messageBottom]),_excelMergeCells(u,c,0,1,i.header.length));var h=_createNode(u,"cols");Dom.s(u).find("worksheet").prepend(h);for(var g=0,v=i.header.length;g<v;g++)h.appendChild(_createNode(u,"col",{attr:{min:g+1,max:g+1,width:_excelColWidth(i,g),customWidth:1}}));var w=p.xl["workbook.xml"],B=(Dom.s(w).find("sheets sheet").attr("name",_sheetname(s)),s.autoFilter&&(B=_createNode(u,"autoFilter",{attr:{ref:"A"+F+":"+createCellPos(i.header.length-1)+d}}),Dom.s(B).insertBefore(Dom.s(u).find("mergeCells")),Dom.s(w).find("definedNames").append(_createNode(w,"definedName",{attr:{name:"_xlnm._FilterDatabase",localSheetId:"0",hidden:1},text:"'"+_sheetname(s).replace(/'/g,"''")+"'!$A$"+F+":$"+createCellPos(i.header.length-1)+"$"+d}))),s.customize&&s.customize(p,s,t),Dom.s(u).find("mergeCells"));0===B.children().count()&&B.remove();var w=new(DataTable.Buttons.jszip()),F={compression:"DEFLATE",type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},C=(_addToZip(w,p),I.filename);175<C.length&&(C=C.substr(0,175)),s.customizeZip&&s.customizeZip(w,i,C),w.generateAsync?w.generateAsync(F).then(function(e){saveAs(e,C),l()}):(saveAs(w.generate(F),C),l())},async:100,filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!0,title:"*",messageTop:"*",messageBottom:"*",createEmptyCells:!1,autoFilter:!1,sheetName:""},dtButtons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return void 0!==window.FileReader&&DataTable.Buttons.pdfMake()},text:function(e){return e.i18n("buttons.pdf","PDF")},action:function(e,t,o,l,n){var r=t.buttons.exportData(l.exportOptions),a=t.buttons.exportInfo(l),d=[];l.header&&r.headerStructure.forEach(function(e){d.push(e.map(function(e){return e?{text:e.title,colSpan:e.colspan,rowSpan:e.rowspan,style:"tableHeader"}:{}}))});for(var p=0,i=r.body.length;p<i;p++)d.push(r.body[p].map(function(e){return{text:null==e?"":"string"==typeof e?e:e.toString()}}));l.footer&&r.footerStructure.forEach(function(e){d.push(e.map(function(e){return e?{text:e.title,colSpan:e.colspan,rowSpan:e.rowspan,style:"tableFooter"}:{}}))});var s={pageSize:l.pageSize,pageOrientation:l.orientation,content:[{style:"table",table:{headerRows:l.header?r.headerStructure.length:0,footerRows:l.footer?r.footerStructure.length:0,body:d},layout:{hLineWidth:function(e,t){return 0===e||e===t.table.body.length?0:.5},vLineWidth:function(){return 0},hLineColor:function(e,t){return e===t.table.headerRows||e===t.table.body.length-t.table.footerRows?"#333":"#ddd"},fillColor:function(e){return e<r.headerStructure.length?"#fff":e%2==0?"#f3f3f3":null},paddingTop:function(){return 5},paddingBottom:function(){return 5}}}],styles:{tableHeader:{bold:!0,fontSize:11,alignment:"center"},tableFooter:{bold:!0,fontSize:11,alignment:"center"},table:{margin:[0,5,0,5]},title:{alignment:"center",fontSize:13},message:{}},defaultStyle:{fontSize:10}},t=(a.messageTop&&s.content.unshift({text:a.messageTop,style:"message",margin:[0,0,0,12]}),a.messageBottom&&s.content.push({text:a.messageBottom,style:"message",margin:[0,0,0,12]}),a.title&&s.content.unshift({text:a.title,style:"title",margin:[0,0,0,12]}),l.customize&&l.customize(s,l,t),DataTable.Buttons.pdfMake().createPdf(s));"open"===l.download?t.open():t.download(a.filename),n()},async:100,title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"en-US"===navigator.language||"en-CA"===navigator.language?"LETTER":"A4",header:!0,footer:!0,messageTop:"*",messageBottom:"*",customize:null,download:"download"};export default DataTable;