/* tableExport.jquery.plugin Version 1.10.5 Copyright (c) 2015-2019 hhurz, https://github.com/hhurz Original Work Copyright (c) 2014 Giri Raj Licensed under the MIT License */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,m,v){c instanceof String&&(c=String(c));for(var y=c.length,x=0;xe&&"undefined"!==typeof Q[e]&&-1!==c.inArray(Q[e],a.ignoreColumn))&&(k=!0):k=!0;return k}function C(b,d,e,k,g){if("function"===typeof g){var l=!1;"function"===typeof a.onIgnoreRow&&(l=a.onIgnoreRow(c(b),e));if(!1===l&&-1===c.inArray(e,a.ignoreRow)&&-1===c.inArray(e-k,a.ignoreRow)&&L(c(b))){var t=x(c(b),d),p=0;t.each(function(b){var a=c(this),d,l=S(this),k=T(this);c.each(E,function(){if(e>=this.s.r&& e<=this.e.r&&p>=this.s.c&&p<=this.e.c)for(d=0;d<=this.e.c-this.s.c;++d)g(null,e,p++)});if(!1===Da(a,t.length,b)){if(k||l)l=l||1,E.push({s:{r:e,c:p},e:{r:e+(k||1)-1,c:p+l-1}});g(this,e,p++)}if(l)for(d=0;d=this.s.r&&e<=this.e.r&&p>=this.s.c&&p<=this.e.c)for(Z=0;Z<=this.e.c-this.s.c;++Z)g(null,e,p++)})}}}function na(b,a,e,c){if("undefined"!==typeof c.images&&(e=c.images[e],"undefined"!==typeof e)){a=a.getBoundingClientRect();var d=b.width/b.height,l= a.width/a.height,k=b.width,p=b.height,f=19.049976/25.4,h=0;l<=d?(p=Math.min(b.height,a.height),k=a.width*p/a.height):l>d&&(k=Math.min(b.width,a.width),p=a.height*k/a.width);k*=f;p*=f;pb.textPos.x&&k+h>b.textPos.x+b.width&&(0<=".,!%*;:=-".indexOf(f.charAt(0))&&(m=f.charAt(0),h=e.doc.getStringUnitWidth(m)*e.doc.internal.getFontSize(),k+h<=b.textPos.x+b.width&&(e.doc.autoTableText(m,k,g,l),f=f.substring(1,f.length)),h=e.doc.getStringUnitWidth(f)*e.doc.internal.getFontSize()),k=b.textPos.x,g+=e.doc.internal.getFontSize());if("visible"!==b.styles.overflow)for(;f.length&&k+h>b.textPos.x+b.width;)f=f.substring(0,f.length-1),h=e.doc.getStringUnitWidth(f)*e.doc.internal.getFontSize(); e.doc.autoTableText(f,k,g,l);k+=h}if(t||p)c(d).is("b")?t=!1:c(d).is("i")&&(p=!1),e.doc.setFontType(t||p?t?"bold":"italic":"normal");d=d.nextSibling}b.textPos.x=k;b.textPos.y=g}else e.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,l)}}function ca(b,a,e){return null==b?"":b.toString().replace(new RegExp(null==a?"":a.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),e)}function ha(b){return null==b?"":b.toString().replace(/^\s+/,"")}function ia(b){return null==b?"":b.toString().replace(/\s+$/, "")}function ja(b){b=ca(b||"0",a.numbers.html.thousandsSeparator,"");b=ca(b,a.numbers.html.decimalMark,".");return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function Fa(b){-1]*)>)/gi,"\u2060");f=c("
").html(m).contents();b=!1;m="";c.each(f.text().split("\u2028"),function(b,d){0b?1:0)).split(".");1===f.length&&(f[1]="");var n=3b?"-":"")+(a.numbers.output.thousandsSeparator?(n?f[0].substr(0,n)+a.numbers.output.thousandsSeparator:"")+f[0].substr(n).replace(/(\d{3})(?=\d)/g, "$1"+a.numbers.output.thousandsSeparator):f[0])+(f[1].length?a.numbers.output.decimalMark+f[1]:"")}}else k=l;!0===a.escape&&(k=escape(k));"function"===typeof a.onCellData&&(k=a.onCellData(g,d,e,k))}return k}function ua(b){return 0l?g+=String.fromCharCode(l):(127l?g+=String.fromCharCode(l>>6|192):(g+=String.fromCharCode(l>>12|224),g+=String.fromCharCode(l>>6&63|128)),g+=String.fromCharCode(l&63|128))}a=g}for(;f>2;t=(t&3)<<4|g>>4;var p=(g&15)<<2|b>>6;var h=b&63;isNaN(g)?p=h=64:isNaN(b)&&(h=64);c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)}return c}var a={csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,exportHiddenCells:!1, fileName:"tableExport",htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null, onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},mso:{fileFormat:"xlshtml",onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:""},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onAfterSaveToFile:null,onBeforeSaveToFile:null,onCellData:null,onCellHtmlData:null,onIgnoreRow:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait", defaultStyle:{font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},K={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09], b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792, 1224],"credit-card":[153,243]},w=this,da=null,r=[],u=[],n=0,q="",Q=[],E=[],wa,G=[],R=!1;c.extend(!0,a,m);"xlsx"===a.type&&(a.mso.fileFormat=a.type,a.type="excel");"undefined"!==typeof a.excelFileFormat&&"undefined"===a.mso.fileFormat&&(a.mso.fileFormat=a.excelFileFormat);"undefined"!==typeof a.excelPageFormat&&"undefined"===a.mso.pageFormat&&(a.mso.pageFormat=a.excelPageFormat);"undefined"!==typeof a.excelPageOrientation&&"undefined"===a.mso.pageOrientation&&(a.mso.pageOrientation=a.excelPageOrientation); "undefined"!==typeof a.excelRTL&&"undefined"===a.mso.rtl&&(a.mso.rtl=a.excelRTL);"undefined"!==typeof a.excelstyles&&"undefined"===a.mso.styles&&(a.mso.styles=a.excelstyles);"undefined"!==typeof a.onMsoNumberFormat&&"undefined"===a.mso.onMsoNumberFormat&&(a.mso.onMsoNumberFormat=a.onMsoNumberFormat);"undefined"!==typeof a.worksheetName&&"undefined"===a.mso.worksheetName&&(a.mso.worksheetName=a.worksheetName);a.mso.pageOrientation="l"===a.mso.pageOrientation.substr(0,1)?"landscape":"portrait";Q=P(w); if("csv"===a.type||"tsv"===a.type||"txt"===a.type){var M="",W=0;E=[];n=0;var ka=function(b,d,e){b.each(function(){q="";C(this,d,n,e+b.length,function(b,c,d){var e=q,g="";if(null!==b)if(b=B(b,c,d),c=null===b||""===b?"":b.toString(),"tsv"===a.type)b instanceof Date&&b.toLocaleString(),g=ca(c,"\t"," ");else if(b instanceof Date)g=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(g=ua(c),g=ca(g,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=g.indexOf(a.csvSeparator)||/[\r\n ]/g.test(g))g=a.csvEnclosure+ g+a.csvEnclosure;q=e+(g+("tsv"===a.type?"\t":a.csvSeparator))});q=c.trim(q).substring(0,q.length-1);0"+B(a,c,e)+""});n++});N+="";var xa=1;u=y(c(w));c(u).each(function(){var a=1;q="";C(this,"td,th",n,r.length+u.length,function(b,c,f){q+=""+B(b,c,f)+"";a++});0"!==q&&(N+=''+q+"",xa++);n++});N+="";if("string"===a.outputMode)return N;if("base64"===a.outputMode)return H(N);J(N,a.fileName+".xml", "application/xml","utf-8","base64",!1)}else if("excel"===a.type&&"xmlss"===a.mso.fileFormat){var ma=[],z=[];c(w).filter(function(){return L(c(this))}).each(function(){function b(a,b,d){var e=[];c(a).each(function(){var b=0,g=0;q="";C(this,"td,th",n,d+a.length,function(a,d,l){if(null!==a){var f="";d=B(a,d,l);l="String";if(!1!==jQuery.isNumeric(d))l="Number";else{var k=Fa(d);!1!==k&&(d=k,l="Number",f+=' ss:StyleID="pct1"')}"Number"!==l&&(d=d.replace(/\n/g,"
"));k=S(a);a=T(a);c.each(e,function(){if(n>= this.s.r&&n<=this.e.r&&g>=this.s.c&&g<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)g++,b++});if(a||k)a=a||1,k=k||1,e.push({s:{r:n,c:g},e:{r:n+a-1,c:g+k-1}});1'+c("
").text(d).html()+"\r";g++}});0\r'+q+"\r");n++});return a.length}var d=c(this),e="";"string"=== typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(z.length+1):"undefined"!==typeof a.mso.worksheetName[z.length]&&(e=a.mso.worksheetName[z.length]);e.length||(e=d.find("caption").text()||"");e.length||(e="Table "+(z.length+1));e=c.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));z.push(c("
").text(e).html());!1===a.exportHiddenCells&&(G=d.find("tr, th, td").filter(":hidden"),R=0\r";var f=b(v(d),"th,td",f);b(y(d),"td,th", f);F+="\r";ma.push(F)});m={};for(var D={},h,O,V=0,Z=z.length;V\r\r\r\r '+ (new Date).toISOString()+'\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r False\r False\r\r\r \r \r \r\r'; for(D=0;D\r'+ma[D],m=a.mso.rtl?m+'\r\r\r':m+'\r',m+="\r";m+="\r";if("string"===a.outputMode)return m;if("base64"===a.outputMode)return H(m);J(m,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"=== a.type&&"xlsx"===a.mso.fileFormat){z=[];var ya=XLSX.utils.book_new();c(w).filter(function(){return L(c(this))}).each(function(){var b=c(this),d=XLSX.utils.table_to_sheet(this),e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(z.length+1):"undefined"!==typeof a.mso.worksheetName[z.length]&&(e=a.mso.worksheetName[z.length]);e.length||(e=b.find("caption").text()||"");e.length||(e="Table "+(z.length+1));e=c.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0, 31));z.push(e);XLSX.utils.book_append_sheet(ya,d,e)});m=XLSX.write(ya,{type:"binary",bookType:a.mso.fileFormat,bookSST:!1});J(Ha(m),a.fileName+"."+a.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",!1)}else if("excel"===a.type||"xls"===a.type||"word"===a.type||"doc"===a.type){m="excel"===a.type||"xls"===a.type?"excel":"word";D="excel"===m?"xls":"doc";h='xmlns:x="urn:schemas-microsoft-com:office:'+m+'"';var F="",X="";c(w).filter(function(){return L(c(this))}).each(function(){var b= c(this);""===X&&(X=a.mso.worksheetName||b.find("caption").text()||"Table",X=c.trim(X.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===a.exportHiddenCells&&(G=b.find("tr, th, td").filter(":hidden"),R=0";r=v(b);c(r).each(function(){var b=c(this);q="";C(this,"th,td",n,r.length,function(c,d,g){if(null!==c){var e="",f=document.defaultView.getComputedStyle(c,null),k=document.defaultView.getComputedStyle(b[0],null);q+=""}});0"+q+"");n++});F+="";u=y(b);c(u).each(function(){var b=c(this);q="";C(this,"td,th",n,r.length+u.length,function(d,f,g){if(null!==d){var e=B(d,f,g),k="",h=c(d).data("tableexport-msonumberformat"), m=document.defaultView.getComputedStyle(d,null),n=document.defaultView.getComputedStyle(b[0],null);"undefined"===typeof h&&"function"===typeof a.mso.onMsoNumberFormat&&(h=a.mso.onMsoNumberFormat(d,f,g));"undefined"!==typeof h&&""!==h&&(k="style=\"mso-number-format:'"+h+"'");for(var r in a.mso.styles)h=m[a.mso.styles[r]],""===h&&(h=n[a.mso.styles[r]]),""!==h&&"0px none rgb(0, 0, 0)"!==h&&"rgba(0, 0, 0, 0)"!==h&&(k+=""===k?'style="':";",k+=a.mso.styles[r]+":"+h);q+=""));q+=">"+e+""}});0"+q+"");n++});a.displayTableName&&(F+=""+B(c("

"+a.tableName+"

"))+"");F+=""});h=''+('')+"";"excel"===m&&(h+="\x3c!--[if gte mso 9]>",h+="",h+="",h+="",h+="",h+="",h+=X,h+="",h+="",h+="",a.mso.rtl&&(h+=""),h+="",h+="",h+="",h+="",h+="",h+="";h+="@page { size:"+a.mso.pageOrientation+"; mso-page-orientation:"+ a.mso.pageOrientation+"; }";h+="@page Section1 {size:"+K[a.mso.pageFormat][0]+"pt "+K[a.mso.pageFormat][1]+"pt";h+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";h+="div.Section1 {page:Section1;}";h+="@page Section2 {size:"+K[a.mso.pageFormat][1]+"pt "+K[a.mso.pageFormat][0]+"pt";h+=";mso-page-orientation:"+a.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";h+="div.Section2 {page:Section2;}"; h+="br {mso-data-placement:same-cell;}";h+="";h+="";h+="";h+='
';h+=F;h+="
";h+="";h+="";if("string"===a.outputMode)return h;if("base64"===a.outputMode)return H(h);J(h,a.fileName+"."+D,"application/vnd.ms-"+m,"","base64",!1)}else if("png"===a.type)html2canvas(c(w)[0]).then(function(b){b=b.toDataURL();for(var c=atob(b.substring(22)),e=new ArrayBuffer(c.length),f=new Uint8Array(e),g=0;gBa){a>K.a0[0]&&(ea="a0",Y="l");for(var d in K)K.hasOwnProperty(d)&&K[d][1]>a&&(ea=d,Y="l",K[d][0]>a&&(Y="p"));Ba=a}}});a.jspdf.format=""===ea?"a4":ea;a.jspdf.orientation=""===Y?"w":Y}if(null==f.doc&&(f.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),f.wScaleFactor=1,f.hScaleFactor=1,"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(f.doc);!0===f.outputImages&&(f.images={});"undefined"!==typeof f.images&&(c(w).filter(function(){return L(c(this))}).each(function(){var b= 0;E=[];!1===a.exportHiddenCells&&(G=c(this).find("tr, th, td").filter(":hidden"),R=0a.styles.rowHeight&&(a.styles.rowHeight=g)}a.styles.halign="inherit"===d.headerStyles.halign?"center":d.headerStyles.halign;a.styles.valign=d.headerStyles.valign;"undefined"!==typeof e.style&&!0!==e.style.hidden&&("inherit"===d.headerStyles.halign&&(a.styles.halign=e.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=e.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=e.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=e.style.fstyle))}}); "function"!==typeof d.createdCell&&(d.createdCell=function(a,b){b=f.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===d.styles.halign?"center":d.styles.halign;a.styles.valign=d.styles.valign;"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===d.styles.halign&&(a.styles.halign=b.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===d.styles.fontStyle&& (a.styles.fontStyle=b.style.fstyle))});"function"!==typeof d.drawHeaderCell&&(d.drawHeaderCell=function(a,b){var c=f.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?pa(a,b,c):!1});"function"!==typeof d.drawCell&&(d.drawCell=function(a,b){var d=f.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof d&&d.isCanvas))pa(a,b,d)&&(f.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"!==typeof d&&"undefined"!==typeof d.elements&& d.elements.length?(b=a.height/d.rect.height,b>f.hScaleFactor&&(f.hScaleFactor=b),f.wScaleFactor=a.width/d.rect.width,b=a.textPos.y,sa(a,d.elements,f),a.textPos.y=b,ta(a,d.elements,f)):ta(a,{},f));else{d=d.elements[0];var e=c(d).attr("data-tableexport-canvas"),g=d.getBoundingClientRect();a.width=g.width*f.wScaleFactor;a.height=g.height*f.hScaleFactor;b.row.height=a.height;na(a,d,e,f)}return!1});f.headerrows=[];r=v(c(this));c(r).each(function(){b=0;f.headerrows[n]=[];C(this,"th,td",n,r.length,function(a, c,d){var e=va(a);e.title=B(a,c,d);e.key=b++;e.rowIndex=n;f.headerrows[n].push(e)});n++});if(0