Files
everything2/EveryThing/wwwroot/vendor/libs/tableexport/tableexport.js
David Štaleker 03b92525d7 Prvi commit
2023-05-12 09:00:07 +02:00

24 lines
35 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(t,e){var o=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=552)}({552:function(t,e,o){o(553)},553:function(t,e,o){"use strict";
/**
* @preserve tableExport.jquery.plugin
*
* Version 1.10.3
*
* Copyright (c) 2015-2019 hhurz, https://github.com/hhurz
*
* Original Work Copyright (c) 2014 Giri Raj
*
* Licensed under the MIT License
**/
/**
* @preserve tableExport.jquery.plugin
*
* Version 1.10.3
*
* Copyright (c) 2015-2019 hhurz, https://github.com/hhurz
*
* Original Work Copyright (c) 2014 Giri Raj
*
* Licensed under the MIT License
**/
var n;(n=jQuery).fn.tableExport=function(t){var e,o={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,tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},r={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]},i=1.15,a=this,l=null,s=[],c=[],d=0,h="",u=[],f=[],p=[],m=!1;if(n.extend(!0,o,t),"xlsx"===o.type&&(o.mso.fileFormat=o.type,o.type="excel"),void 0!==o.excelFileFormat&&"undefined"===o.mso.fileFormat&&(o.mso.fileFormat=o.excelFileFormat),void 0!==o.excelPageFormat&&"undefined"===o.mso.pageFormat&&(o.mso.pageFormat=o.excelPageFormat),void 0!==o.excelPageOrientation&&"undefined"===o.mso.pageOrientation&&(o.mso.pageOrientation=o.excelPageOrientation),void 0!==o.excelRTL&&"undefined"===o.mso.rtl&&(o.mso.rtl=o.excelRTL),void 0!==o.excelstyles&&"undefined"===o.mso.styles&&(o.mso.styles=o.excelstyles),void 0!==o.onMsoNumberFormat&&"undefined"===o.mso.onMsoNumberFormat&&(o.mso.onMsoNumberFormat=o.onMsoNumberFormat),void 0!==o.worksheetName&&"undefined"===o.mso.worksheetName&&(o.mso.worksheetName=o.worksheetName),o.mso.pageOrientation="l"===o.mso.pageOrientation.substr(0,1)?"landscape":"portrait",u=it(a),"csv"===o.type||"tsv"===o.type||"txt"===o.type){var g="",v=0;f=[],d=0;var y=function(t,e,r){return t.each(function(){h="",lt(this,e,d,r+t.length,function(t,e,n){h+=function(t,e,n){var r="";if(null!==t){var i=gt(t,e,n),a=null===i||""===i?"":i.toString();"tsv"===o.type?(i instanceof Date&&i.toLocaleString(),r=ut(a,"\t"," ")):i instanceof Date?r=o.csvEnclosure+i.toLocaleString()+o.csvEnclosure:((r=ut(r=vt(a),o.csvEnclosure,o.csvEnclosure+o.csvEnclosure)).indexOf(o.csvSeparator)>=0||/[\r\n ]/g.test(r))&&(r=o.csvEnclosure+r+o.csvEnclosure)}return r}(t,e,n)+("tsv"===o.type?"\t":o.csvSeparator)}),(h=n.trim(h).substring(0,h.length-1)).length>0&&(g.length>0&&(g+="\n"),g+=h),d++}),t.length};if(v+=y(n(a).find("thead").first().find(o.theadSelector),"th,td",v),rt(n(a),"tbody").each(function(){v+=y(rt(n(this),o.tbodySelector),"td,th",v)}),o.tfootSelector.length&&y(n(a).find("tfoot").first().find(o.tfootSelector),"td,th",v),g+="\n","string"===o.outputMode)return g;if("base64"===o.outputMode)return At(g);if("window"===o.outputMode)return void Tt(!1,"data:text/"+("csv"===o.type?"csv":"plain")+";charset=utf-8,",g);Nt(g,o.fileName+"."+o.type,"text/"+("csv"===o.type?"csv":"plain"),"utf-8","","csv"===o.type&&o.csvUseBOM)}else if("sql"===o.type){d=0,f=[];var b="INSERT INTO `"+o.tableName+"` (";if(s=ot(n(a)),n(s).each(function(){lt(this,"th,td",d,s.length,function(t,e,o){b+="'"+gt(t,e,o)+"',"}),d++,b=n.trim(b).substring(0,b.length-1)}),b+=") VALUES ",c=nt(n(a)),n(c).each(function(){h="",lt(this,"td,th",d,s.length+c.length,function(t,e,o){h+="'"+gt(t,e,o)+"',"}),h.length>3&&(b+="("+h,b=n.trim(b).substring(0,b.length-1),b+="),"),d++}),b=n.trim(b).substring(0,b.length-1),b+=";","string"===o.outputMode)return b;if("base64"===o.outputMode)return At(b);Nt(b,o.fileName+".sql","application/sql","utf-8","",!1)}else if("json"===o.type){var w=[];f=[],s=ot(n(a)),n(s).each(function(){var t=[];lt(this,"th,td",d,s.length,function(e,o,n){t.push(gt(e,o,n))}),w.push(t)});var x=[];c=nt(n(a)),n(c).each(function(){var t={},e=0;lt(this,"td,th",d,s.length+c.length,function(o,n,r){w.length?t[w[w.length-1][e]]=gt(o,n,r):t[e]=gt(o,n,r),e++}),!1===n.isEmptyObject(t)&&x.push(t),d++});var S="";if(S="head"===o.jsonScope?JSON.stringify(w):"data"===o.jsonScope?JSON.stringify(x):JSON.stringify({header:w,data:x}),"string"===o.outputMode)return S;if("base64"===o.outputMode)return At(S);Nt(S,o.fileName+".json","application/json","utf-8","base64",!1)}else if("xml"===o.type){d=0,f=[];var C='<?xml version="1.0" encoding="utf-8"?>';C+="<tabledata><fields>",s=ot(n(a)),n(s).each(function(){lt(this,"th,td",d,s.length,function(t,e,o){C+="<field>"+gt(t,e,o)+"</field>"}),d++}),C+="</fields><data>";var F=1;if(c=nt(n(a)),n(c).each(function(){var t=1;h="",lt(this,"td,th",d,s.length+c.length,function(e,o,n){h+="<column-"+t+">"+gt(e,o,n)+"</column-"+t+">",t++}),h.length>0&&"<column-1></column-1>"!==h&&(C+='<row id="'+F+'">'+h+"</row>",F++),d++}),C+="</data></tabledata>","string"===o.outputMode)return C;if("base64"===o.outputMode)return At(C);Nt(C,o.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===o.type&&"xmlss"===o.mso.fileFormat){var k=[],N=[];n(a).filter(function(){return at(n(this))}).each(function(){var t=n(this),e="";function r(t,e,o){var r=[];return n(t).each(function(){var e=0,i=0;h="",lt(this,"td,th",d,o+t.length,function(t,o,a){if(null!==t){var l="",s=gt(t,o,a),c="String";if(!1!==jQuery.isNumeric(s))c="Number";else{var u=((m=s).indexOf("%")>-1?!1!==(m=mt(m.replace(/%/g,"")))&&(m/=100):m=!1,m);!1!==u&&(s=u,c="Number",l+=' ss:StyleID="pct1"')}"Number"!==c&&(s=s.replace(/\n/g,"<br>"));var f=xt(t),p=St(t);n.each(r,function(){if(d>=this.s.r&&d<=this.e.r&&i>=this.s.c&&i<=this.e.c)for(var t=0;t<=this.e.c-this.s.c;++t)i++,e++}),(p||f)&&(p=p||1,f=f||1,r.push({s:{r:d,c:i},e:{r:d+p-1,c:i+f-1}})),f>1&&(l+=' ss:MergeAcross="'+(f-1)+'"',i+=f-1),p>1&&(l+=' ss:MergeDown="'+(p-1)+'" ss:StyleID="rsp1"'),e>0&&(l+=' ss:Index="'+(i+1)+'"',e=0),h+="<Cell"+l+'><Data ss:Type="'+c+'">'+n("<div />").text(s).html()+"</Data></Cell>\r",i++}var m}),h.length>0&&(H+='<Row ss:AutoFitHeight="0">\r'+h+"</Row>\r"),d++}),t.length}"string"==typeof o.mso.worksheetName&&o.mso.worksheetName.length?e=o.mso.worksheetName+" "+(N.length+1):void 0!==o.mso.worksheetName[N.length]&&(e=o.mso.worksheetName[N.length]),e.length||(e=t.find("caption").text()||""),e.length||(e="Table "+(N.length+1)),e=n.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)),N.push(n("<div />").text(e).html()),!1===o.exportHiddenCells&&(p=t.find("tr, th, td").filter(":hidden"),m=p.length>0),d=0,u=it(this),H="<Table>\r";var i=r(ot(t),"th,td",i);r(nt(t),"td,th",i),H+="</Table>\r",k.push(H)});for(var T,A,j={},O={},M=0,R=N.length;M<R;M++)T=N[M],A=j[T],2===(A=j[T]=null==A?1:A+1)&&(N[O[T]]=N[O[T]].substring(0,29)+"-1"),j[T]>1?N[M]=N[M].substring(0,29)+"-"+j[T]:O[T]=M;for(var P=(new Date).toISOString(),I='<?xml version="1.0" encoding="UTF-8"?>\r<?mso-application progid="Excel.Sheet"?>\r<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:o="urn:schemas-microsoft-com:office:office"\r xmlns:x="urn:schemas-microsoft-com:office:excel"\r xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:html="http://www.w3.org/TR/REC-html40">\r<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">\r <Created>'+P+'</Created>\r</DocumentProperties>\r<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">\r <AllowPNG/>\r</OfficeDocumentSettings>\r<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">\r <WindowHeight>9000</WindowHeight>\r <WindowWidth>13860</WindowWidth>\r <WindowTopX>0</WindowTopX>\r <WindowTopY>0</WindowTopY>\r <ProtectStructure>False</ProtectStructure>\r <ProtectWindows>False</ProtectWindows>\r</ExcelWorkbook>\r<Styles>\r <Style ss:ID="Default" ss:Name="Normal">\r <Alignment ss:Vertical="Bottom"/>\r <Borders/>\r <Font/>\r <Interior/>\r <NumberFormat/>\r <Protection/>\r </Style>\r <Style ss:ID="rsp1">\r <Alignment ss:Vertical="Center"/>\r </Style>\r <Style ss:ID="pct1">\r <NumberFormat ss:Format="Percent"/>\r </Style>\r</Styles>\r',E=0;E<k.length;E++)I+='<Worksheet ss:Name="'+N[E]+'" ss:RightToLeft="'+(o.mso.rtl?"1":"0")+'">\r'+k[E],o.mso.rtl?I+='<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\r<DisplayRightToLeft/>\r</WorksheetOptions>\r':I+='<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"/>\r',I+="</Worksheet>\r";if(I+="</Workbook>\r","string"===o.outputMode)return I;if("base64"===o.outputMode)return At(I);Nt(I,o.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===o.type&&"xlsx"===o.mso.fileFormat){var N=[],D=XLSX.utils.book_new();n(a).filter(function(){return at(n(this))}).each(function(){var t=n(this),e=XLSX.utils.table_to_sheet(this),r="";"string"==typeof o.mso.worksheetName&&o.mso.worksheetName.length?r=o.mso.worksheetName+" "+(N.length+1):void 0!==o.mso.worksheetName[N.length]&&(r=o.mso.worksheetName[N.length]),r.length||(r=t.find("caption").text()||""),r.length||(r="Table "+(N.length+1)),r=n.trim(r.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)),N.push(r),XLSX.utils.book_append_sheet(D,e,r)});var W=XLSX.write(D,{type:"binary",bookType:o.mso.fileFormat,bookSST:!1});Nt(function(t){for(var e=new ArrayBuffer(t.length),o=new Uint8Array(e),n=0;n!==t.length;++n)o[n]=255&t.charCodeAt(n);return e}(W),o.fileName+"."+o.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",!1)}else if("excel"===o.type||"xls"===o.type||"word"===o.type||"doc"===o.type){var L="excel"===o.type||"xls"===o.type?"excel":"word",U="excel"===L?"xls":"doc",B='xmlns:x="urn:schemas-microsoft-com:office:'+L+'"',H="",z="";n(a).filter(function(){return at(n(this))}).each(function(){var t=n(this);""===z&&(z=o.mso.worksheetName||t.find("caption").text()||"Table",z=n.trim(z.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31))),!1===o.exportHiddenCells&&(p=t.find("tr, th, td").filter(":hidden"),m=p.length>0),d=0,f=[],u=it(this),H+="<table><thead>",s=ot(t),n(s).each(function(){var t=n(this);h="",lt(this,"th,td",d,s.length,function(e,n,r){if(null!==e){var i="",a=document.defaultView.getComputedStyle(e,null),l=document.defaultView.getComputedStyle(t[0],null);for(var s in h+="<th",o.mso.styles){var c=a[o.mso.styles[s]];""===c&&(c=l[o.mso.styles[s]]),""!==c&&"0px none rgb(0, 0, 0)"!==c&&"rgba(0, 0, 0, 0)"!==c&&(i+=""===i?'style="':";",i+=o.mso.styles[s]+":"+c)}""!==i&&(h+=" "+i+'"');var d=xt(e);d>0&&(h+=' colspan="'+d+'"');var u=St(e);u>0&&(h+=' rowspan="'+u+'"'),h+=">"+gt(e,n,r)+"</th>"}}),h.length>0&&(H+="<tr>"+h+"</tr>"),d++}),H+="</thead><tbody>",c=nt(t),n(c).each(function(){var t=n(this);h="",lt(this,"td,th",d,s.length+c.length,function(e,r,i){if(null!==e){var a=gt(e,r,i),l="",s=n(e).data("tableexport-msonumberformat"),c=document.defaultView.getComputedStyle(e,null),d=document.defaultView.getComputedStyle(t[0],null);for(var u in void 0===s&&"function"==typeof o.mso.onMsoNumberFormat&&(s=o.mso.onMsoNumberFormat(e,r,i)),void 0!==s&&""!==s&&(l="style=\"mso-number-format:'"+s+"'"),o.mso.styles)""===(s=c[o.mso.styles[u]])&&(s=d[o.mso.styles[u]]),""!==s&&"0px none rgb(0, 0, 0)"!==s&&"rgba(0, 0, 0, 0)"!==s&&(l+=""===l?'style="':";",l+=o.mso.styles[u]+":"+s);h+="<td",""!==l&&(h+=" "+l+'"');var f=xt(e);f>0&&(h+=' colspan="'+f+'"');var p=St(e);p>0&&(h+=' rowspan="'+p+'"'),"string"==typeof a&&""!==a&&(a=(a=vt(a)).replace(/\n/g,"<br>")),h+=">"+a+"</td>"}}),h.length>0&&(H+="<tr>"+h+"</tr>"),d++}),o.displayTableName&&(H+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+gt(n("<p>"+o.tableName+"</p>"))+"</td></tr>"),H+="</tbody></table>"});var _='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+B+' xmlns="http://www.w3.org/TR/REC-html40">';if(_+='<meta http-equiv="content-type" content="application/vnd.ms-'+L+'; charset=UTF-8">',_+="<head>","excel"===L&&(_+="\x3c!--[if gte mso 9]>",_+="<xml>",_+="<x:ExcelWorkbook>",_+="<x:ExcelWorksheets>",_+="<x:ExcelWorksheet>",_+="<x:Name>",_+=z,_+="</x:Name>",_+="<x:WorksheetOptions>",_+="<x:DisplayGridlines/>",o.mso.rtl&&(_+="<x:DisplayRightToLeft/>"),_+="</x:WorksheetOptions>",_+="</x:ExcelWorksheet>",_+="</x:ExcelWorksheets>",_+="</x:ExcelWorkbook>",_+="</xml>",_+="<![endif]--\x3e"),_+="<style>",_+="@page { size:"+o.mso.pageOrientation+"; mso-page-orientation:"+o.mso.pageOrientation+"; }",_+="@page Section1 {size:"+r[o.mso.pageFormat][0]+"pt "+r[o.mso.pageFormat][1]+"pt",_+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",_+="div.Section1 {page:Section1;}",_+="@page Section2 {size:"+r[o.mso.pageFormat][1]+"pt "+r[o.mso.pageFormat][0]+"pt",_+=";mso-page-orientation:"+o.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",_+="div.Section2 {page:Section2;}",_+="br {mso-data-placement:same-cell;}",_+="</style>",_+="</head>",_+="<body>",_+='<div class="Section'+("landscape"===o.mso.pageOrientation?"2":"1")+'">',_+=H,_+="</div>",_+="</body>",_+="</html>","string"===o.outputMode)return _;if("base64"===o.outputMode)return At(_);Nt(_,o.fileName+"."+U,"application/vnd.ms-"+L,"","base64",!1)}else if("png"===o.type)html2canvas(n(a)[0]).then(function(t){for(var e=t.toDataURL(),n=atob(e.substring(22)),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return"string"===o.outputMode?n:"base64"===o.outputMode?At(e):void("window"!==o.outputMode?Nt(r,o.fileName+".png","image/png","","",!1):window.open(e))});else if("pdf"===o.type)if(!0===o.pdfmake.enabled){var K=[],X=[];d=0,f=[];var V=function(t,e,o){var r=0;return n(t).each(function(){var t=[];lt(this,e,d,o,function(e,o,n){if(null!=e){var r=xt(e),i=St(e),a=gt(e,o,n)||" ";r>1||i>1?(r=r||1,i=i||1,t.push({colSpan:r,rowSpan:i,text:a})):t.push(a)}else t.push(" ")}),t.length&&X.push(t),r<t.length&&(r=t.length),d++}),r};s=ot(n(this));for(var q=V(s,"th,td",s.length),Q=K.length;Q<q;Q++)K.push("*");c=nt(n(this)),V(c,"th,td",s.length+c.length);var Y={content:[{table:{headerRows:s.length,widths:K,body:X}}]};n.extend(!0,Y,o.pdfmake.docDefinition),pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}},n.extend(!0,pdfMake.fonts,o.pdfmake.fonts),pdfMake.createPdf(Y).getBuffer(function(t){Nt(t,o.fileName+".pdf","application/pdf","","",!1)})}else if(!1===o.jspdf.autotable){var $={dim:{w:Ft(n(a).first().get(0),"width","mm"),h:Ft(n(a).first().get(0),"height","mm")},pagesplit:!1},J=new jsPDF(o.jspdf.orientation,o.jspdf.unit,o.jspdf.format);J.addHTML(n(a).first(),o.jspdf.margins.left,o.jspdf.margins.top,$,function(){ct(J,!1)})}else{var G=o.jspdf.autotable.tableExport;if("string"==typeof o.jspdf.format&&"bestfit"===o.jspdf.format.toLowerCase()){var Z="",tt="",et=0;n(a).each(function(){if(at(n(this))){var t=Ft(n(this).get(0),"width","pt");if(t>et){for(var e in t>r.a0[0]&&(Z="a0",tt="l"),r)r.hasOwnProperty(e)&&r[e][1]>t&&(Z=e,tt="l",r[e][0]>t&&(tt="p"));et=t}}}),o.jspdf.format=""===Z?"a4":Z,o.jspdf.orientation=""===tt?"w":tt}null==G.doc&&(G.doc=new jsPDF(o.jspdf.orientation,o.jspdf.unit,o.jspdf.format),G.wScaleFactor=1,G.hScaleFactor=1,"function"==typeof o.jspdf.onDocCreated&&o.jspdf.onDocCreated(G.doc)),!0===G.outputImages&&(G.images={}),void 0!==G.images&&(n(a).filter(function(){return at(n(this))}).each(function(){var t=0;f=[],!1===o.exportHiddenCells&&(p=n(this).find("tr, th, td").filter(":hidden"),m=p.length>0),s=ot(n(this)),c=nt(n(this)),n(c).each(function(){lt(this,"td,th",s.length+t,s.length+c.length,function(t){!function t(e,o,r){if(null!=e)if(e.hasAttribute("data-tableexport-canvas")){var i=(new Date).getTime();n(e).attr("data-tableexport-canvas",i),r.images[i]={url:'[data-tableexport-canvas="'+i+'"]',src:null}}else"undefined"!==o&&null!=o&&o.each(function(){if(n(this).is("img")){var o=kt(this.src);r.images[o]={url:this.src,src:this.src}}t(e,n(this).children(),r)})}(t,n(t).children(),G)}),t++})}),s=[],c=[]),function(t,e){var o=0,r=0;function i(){e(o)}function a(t){if(t.url)if(t.src){var e=new Image;o=++r,e.crossOrigin="Anonymous",e.onerror=e.onload=function(){if(e.complete&&(0===e.src.indexOf("data:image/")&&(e.width=t.width||e.width||0,e.height=t.height||e.height||0),e.width+e.height)){var o=document.createElement("canvas"),n=o.getContext("2d");o.width=e.width,o.height=e.height,n.drawImage(e,0,0),t.src=o.toDataURL("image/png")}--r||i()},e.src=t.url}else{var a=n(t.url);a.length&&(o=++r,html2canvas(a[0]).then(function(e){t.src=e.toDataURL("image/png"),--r||i()}))}}if(void 0!==t.images)for(var l in t.images)t.images.hasOwnProperty(l)&&a(t.images[l]);r||i()}(G,function(){n(a).filter(function(){return at(n(this))}).each(function(){var t;if(d=0,f=[],!1===o.exportHiddenCells&&(p=n(this).find("tr, th, td").filter(":hidden"),m=p.length>0),u=it(this),G.columns=[],G.rows=[],G.teCells={},"function"==typeof G.onTable&&!1===G.onTable(n(this),o))return!0;o.jspdf.autotable.tableExport=null;var e=n.extend(!0,{},o.jspdf.autotable);if(o.jspdf.autotable.tableExport=G,e.margin={},n.extend(!0,e.margin,o.jspdf.margins),e.tableExport=G,"function"!=typeof e.beforePageContent&&(e.beforePageContent=function(t){if(1===t.pageCount){var e=t.table.rows.concat(t.table.headerRow);n.each(e,function(){this.height>0&&(this.height+=(2-i)/2*this.styles.fontSize,t.table.height+=(2-i)/2*this.styles.fontSize)})}}),"function"!=typeof e.createdHeaderCell&&(e.createdHeaderCell=function(t,o){if(t.styles=n.extend({},o.row.styles),void 0!==G.columns[o.column.dataKey]){var r,i=G.columns[o.column.dataKey];void 0!==i.rect&&(t.contentWidth=i.rect.width,void 0!==G.heightRatio&&0!==G.heightRatio||(r=o.row.raw[o.column.dataKey].rowspan?o.row.raw[o.column.dataKey].rect.height/o.row.raw[o.column.dataKey].rowspan:o.row.raw[o.column.dataKey].rect.height,G.heightRatio=t.styles.rowHeight/r),(r=o.row.raw[o.column.dataKey].rect.height*G.heightRatio)>t.styles.rowHeight&&(t.styles.rowHeight=r)),t.styles.halign="inherit"===e.headerStyles.halign?"center":e.headerStyles.halign,t.styles.valign=e.headerStyles.valign,void 0!==i.style&&!0!==i.style.hidden&&("inherit"===e.headerStyles.halign&&(t.styles.halign=i.style.align),"inherit"===e.styles.fillColor&&(t.styles.fillColor=i.style.bcolor),"inherit"===e.styles.textColor&&(t.styles.textColor=i.style.color),"inherit"===e.styles.fontStyle&&(t.styles.fontStyle=i.style.fstyle))}}),"function"!=typeof e.createdCell&&(e.createdCell=function(t,o){var n=G.teCells[o.row.index+":"+o.column.dataKey];t.styles.halign="inherit"===e.styles.halign?"center":e.styles.halign,t.styles.valign=e.styles.valign,void 0!==n&&void 0!==n.style&&!0!==n.style.hidden&&("inherit"===e.styles.halign&&(t.styles.halign=n.style.align),"inherit"===e.styles.fillColor&&(t.styles.fillColor=n.style.bcolor),"inherit"===e.styles.textColor&&(t.styles.textColor=n.style.color),"inherit"===e.styles.fontStyle&&(t.styles.fontStyle=n.style.fstyle))}),"function"!=typeof e.drawHeaderCell&&(e.drawHeaderCell=function(t,e){var o=G.columns[e.column.dataKey];return(!0!==o.style.hasOwnProperty("hidden")||!0!==o.style.hidden)&&o.rowIndex>=0&&dt(t,e,o)}),"function"!=typeof e.drawCell&&(e.drawCell=function(t,e){var r=G.teCells[e.row.index+":"+e.column.dataKey],i=void 0!==r&&r.isCanvas;if(!0!==i){if(dt(t,e,r))if(G.doc.rect(t.x,t.y,t.width,t.height,t.styles.fillStyle),void 0!==r&&void 0!==r.elements&&r.elements.length){var a=t.height/r.rect.height;a>G.hScaleFactor&&(G.hScaleFactor=a),G.wScaleFactor=t.width/r.rect.width;var l=t.textPos.y;!function t(e,r,i){r.each(function(){if(n(this).is("div")){var r=bt(Ct(this,"background-color"),[255,255,255]),a=bt(Ct(this,"border-top-color"),[0,0,0]),l=Ft(this,"border-top-width",o.jspdf.unit),s=this.getBoundingClientRect(),c=this.offsetLeft*i.wScaleFactor,d=this.offsetTop*i.hScaleFactor,h=s.width*i.wScaleFactor,u=s.height*i.hScaleFactor;i.doc.setDrawColor.apply(void 0,a),i.doc.setFillColor.apply(void 0,r),i.doc.setLineWidth(l),i.doc.rect(e.x+c,e.y+d,h,u,l?"FD":"F")}else if(n(this).is("img")){var f=kt(this.src);st(e,this,f,i)}t(e,n(this).children(),i)})}(t,r.elements,G),t.textPos.y=l,ht(t,r.elements,G)}else ht(t,{},G)}else{var s=r.elements[0],c=n(s).attr("data-tableexport-canvas"),d=s.getBoundingClientRect();t.width=d.width*G.wScaleFactor,t.height=d.height*G.hScaleFactor,e.row.height=t.height,st(t,s,c,G)}return!1}),G.headerrows=[],s=ot(n(this)),n(s).each(function(){t=0,G.headerrows[d]=[],lt(this,"th,td",d,s.length,function(e,o,n){var r=wt(e);r.title=gt(e,o,n),r.key=t++,r.rowIndex=d,G.headerrows[d].push(r)}),d++}),d>0)for(var r=d-1;r>=0;)n.each(G.headerrows[r],function(){var t=this;r>0&&null===this.rect&&(t=G.headerrows[r-1][this.key]),null!==t&&t.rowIndex>=0&&(!0!==t.style.hasOwnProperty("hidden")||!0!==t.style.hidden)&&G.columns.push(t)}),r=G.columns.length>0?-1:r-1;var a=0;c=[],c=nt(n(this)),n(c).each(function(){var e=[];t=0,lt(this,"td,th",d,s.length+c.length,function(o,r,i){var l;void 0===G.columns[t]&&(l={title:"",key:t,style:{hidden:!0}},G.columns.push(l)),null!=o?((l=wt(o)).isCanvas=o.hasAttribute("data-tableexport-canvas"),l.elements=l.isCanvas?n(o):n(o).children(),G.teCells[a+":"+t++]=l):((l=n.extend(!0,{},G.teCells[a+":"+(t-1)])).colspan=-1,G.teCells[a+":"+t++]=l),e.push(gt(o,r,i))}),e.length&&(G.rows.push(e),a++),d++}),"function"==typeof G.onBeforeAutotable&&G.onBeforeAutotable(n(this),G.columns,G.rows,e),G.doc.autoTable(G.columns,G.rows,e),"function"==typeof G.onAfterAutotable&&G.onAfterAutotable(n(this),e),o.jspdf.autotable.startY=G.doc.autoTableEndPosY()+e.margin.top}),ct(G.doc,void 0!==G.images&&!1===jQuery.isEmptyObject(G.images)),void 0!==G.headerrows&&(G.headerrows.length=0),void 0!==G.columns&&(G.columns.length=0),void 0!==G.rows&&(G.rows.length=0),delete G.doc,G.doc=null})}function ot(t){var e=[];return rt(t,"thead").each(function(){e.push.apply(e,rt(n(this),o.theadSelector).toArray())}),e}function nt(t){var e=[];return rt(t,"tbody").each(function(){e.push.apply(e,rt(n(this),o.tbodySelector).toArray())}),o.tfootSelector.length&&rt(t,"tfoot").each(function(){e.push.apply(e,rt(n(this),o.tfootSelector).toArray())}),e}function rt(t,e){var o=t[0].tagName,r=t.parents(o).length;return t.find(e).filter(function(){return r===n(this).closest(o).parents(o).length})}function it(t){var e=[];return n(t).find("thead").first().find("th").each(function(t,o){void 0!==n(o).attr("data-field")?e[t]=n(o).attr("data-field"):e[t]=t.toString()}),e}function at(t){var e=void 0!==t[0].cellIndex,o=void 0!==t[0].rowIndex,r=e||o?function(t){var e=[];return m&&(e=p.filter(function(){var e=!1;return this.nodeType===t[0].nodeType&&(void 0!==this.rowIndex&&this.rowIndex===t[0].rowIndex?e=!0:void 0!==this.cellIndex&&this.cellIndex===t[0].cellIndex&&void 0!==this.parentNode.rowIndex&&void 0!==t[0].parentNode.rowIndex&&this.parentNode.rowIndex===t[0].parentNode.rowIndex&&(e=!0)),e})),!1===m||0===e.length}(t):t.is(":visible"),i=t.data("tableexport-display");return e&&"none"!==i&&"always"!==i&&(t=n(t[0].parentNode),o=void 0!==t[0].rowIndex,i=t.data("tableexport-display")),o&&"none"!==i&&"always"!==i&&(i=t.closest("table").data("tableexport-display")),"none"!==i&&(!0===r||"always"===i)}function lt(t,e,r,i,a){if("function"==typeof a){var l=!1;if("function"==typeof o.onIgnoreRow&&(l=o.onIgnoreRow(n(t),r)),!1===l&&-1===n.inArray(r,o.ignoreRow)&&-1===n.inArray(r-i,o.ignoreRow)&&at(n(t))){var s=rt(n(t),e),c=0;s.each(function(t){var e,i=n(this),l=xt(this),d=St(this);if(n.each(f,function(){if(r>=this.s.r&&r<=this.e.r&&c>=this.s.c&&c<=this.e.c)for(e=0;e<=this.e.c-this.s.c;++e)a(null,r,c++)}),!1===function(t,e,r){var i=!1;return at(t)?o.ignoreColumn.length>0&&(-1!==n.inArray(r,o.ignoreColumn)||-1!==n.inArray(r-e,o.ignoreColumn)||u.length>r&&void 0!==u[r]&&-1!==n.inArray(u[r],o.ignoreColumn))&&(i=!0):i=!0,i}(i,s.length,t)&&((d||l)&&(d=d||1,l=l||1,f.push({s:{r:r,c:c},e:{r:r+d-1,c:c+l-1}})),a(this,r,c++)),l)for(e=0;e<l-1;++e)a(null,r,c++)}),n.each(f,function(){if(r>=this.s.r&&r<=this.e.r&&c>=this.s.c&&c<=this.e.c)for(R=0;R<=this.e.c-this.s.c;++R)a(null,r,c++)})}}}function st(t,e,o,n){if(void 0!==n.images){var r=n.images[o];if(void 0!==r){var i=e.getBoundingClientRect(),a=t.width/t.height,l=i.width/i.height,s=t.width,c=t.height,d=0;l<=a?(c=Math.min(t.height,i.height),s=i.width*c/i.height):l>a&&(s=Math.min(t.width,i.width),c=i.height*s/i.width),s*=19.049976/25.4,(c*=19.049976/25.4)<t.height&&(d=(t.height-c)/2);try{n.doc.addImage(r.src,t.textPos.x,t.y+d,s,c)}catch(t){}t.textPos.x+=s}}}function ct(t,e){if("string"===o.outputMode)return t.output();if("base64"===o.outputMode)return At(t.output());if("window"===o.outputMode)return window.URL=window.URL||window.webkitURL,void window.open(window.URL.createObjectURL(t.output("blob")));try{var n=t.output("blob");saveAs(n,o.fileName+".pdf")}catch(n){Tt(o.fileName+".pdf","data:application/pdf"+(e?"":";base64")+",",e?t.output("blob"):t.output())}}function dt(t,e,o){var n=0;if(void 0!==o&&(n=o.colspan),n>=0){for(var r=t.width,a=t.textPos.x,l=e.table.columns.indexOf(e.column),s=1;s<n;s++){var c=e.table.columns[l+s];r+=c.width}if(n>1&&("right"===t.styles.halign?a=t.textPos.x+r-t.width:"center"===t.styles.halign&&(a=t.textPos.x+(r-t.width)/2)),t.width=r,t.textPos.x=a,void 0!==o&&o.rowspan>1&&(t.height=t.height*o.rowspan),"middle"===t.styles.valign||"bottom"===t.styles.valign){var d="string"==typeof t.text?t.text.split(/\r\n|\r|\n/g):t.text,h=d.length||1;h>2&&(t.textPos.y-=(2-i)/2*e.row.styles.fontSize*(h-2)/3)}return!0}return!1}function ht(t,e,r){if("function"==typeof r.onAutotableText)r.onAutotableText(r.doc,t,e);else{var i=t.textPos.x,a=t.textPos.y,l={halign:t.styles.halign,valign:t.styles.valign};if(e.length){for(var s=e[0];s.previousSibling;)s=s.previousSibling;for(var c=!1,d=!1;s;){var h=s.innerText||s.textContent||"",u=h.length&&" "===h[0]?" ":"",f=h.length>1&&" "===h[h.length-1]?" ":"";!0!==o.preserve.leadingWS&&(h=u+ft(h)),!0!==o.preserve.trailingWS&&(h=pt(h)+f),n(s).is("br")&&(i=t.textPos.x,a+=r.doc.internal.getFontSize()),n(s).is("b")?c=!0:n(s).is("i")&&(d=!0),(c||d)&&r.doc.setFontType(c&&d?"bolditalic":c?"bold":"italic");var p=r.doc.getStringUnitWidth(h)*r.doc.internal.getFontSize();if(p){if("linebreak"===t.styles.overflow&&i>t.textPos.x&&i+p>t.textPos.x+t.width){if(".,!%*;:=-".indexOf(h.charAt(0))>=0){var m=h.charAt(0);p=r.doc.getStringUnitWidth(m)*r.doc.internal.getFontSize(),i+p<=t.textPos.x+t.width&&(r.doc.autoTableText(m,i,a,l),h=h.substring(1,h.length)),p=r.doc.getStringUnitWidth(h)*r.doc.internal.getFontSize()}i=t.textPos.x,a+=r.doc.internal.getFontSize()}if("visible"!==t.styles.overflow)for(;h.length&&i+p>t.textPos.x+t.width;)h=h.substring(0,h.length-1),p=r.doc.getStringUnitWidth(h)*r.doc.internal.getFontSize();r.doc.autoTableText(h,i,a,l),i+=p}(c||d)&&(n(s).is("b")?c=!1:n(s).is("i")&&(d=!1),r.doc.setFontType(c||d?c?"bold":"italic":"normal")),s=s.nextSibling}t.textPos.x=i,t.textPos.y=a}else r.doc.autoTableText(t.text,t.textPos.x,t.textPos.y,l)}}function ut(t,e,o){return null==t?"":t.toString().replace(new RegExp(function(t){return null==t?"":t.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}(e),"g"),o)}function ft(t){return null==t?"":t.toString().replace(/^\s+/,"")}function pt(t){return null==t?"":t.toString().replace(/\s+$/,"")}function mt(t){return t=ut(t=t||"0",o.numbers.html.thousandsSeparator,""),("number"==typeof(t=ut(t,o.numbers.html.decimalMark,"."))||!1!==jQuery.isNumeric(t))&&t}function gt(t,e,r){var i="";if(null!==t){var a,l=n(t);if(l[0].hasAttribute("data-tableexport-canvas"))a="";else if(l[0].hasAttribute("data-tableexport-value"))a=(a=l.data("tableexport-value"))?a+"":"";else if(a=l.html(),"function"==typeof o.onCellHtmlData)a=o.onCellHtmlData(l,e,r,a);else if(""!==a){var s=n.parseHTML(a),c=0,d=0;a="",n.each(s,function(){n(this).is("input")?a+=l.find("input").eq(c++).val():n(this).is("select")?a+=l.find("select option:selected").eq(d++).text():n(this).is("br")?a+="<br>":void 0===n(this).html()?a+=n(this).text():(void 0===jQuery().bootstrapTable||!0!==n(this).hasClass("filterControl")&&0===n(t).parents(".detail-view").length)&&(a+=n(this).html())})}if(!0===o.htmlContent)i=n.trim(a);else if(a&&""!==a){var h=n(t).data("tableexport-cellformat");if(""!==h){var u=a.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi,""),f=n("<div/>").html(u).contents(),p=!1;if(u="",n.each(f.text().split("\u2028"),function(t,e){t>0&&(u+=" "),!0!==o.preserve.leadingWS&&(e=ft(e)),u+=!0!==o.preserve.trailingWS?pt(e):e}),n.each(u.split(""),function(t,e){t>0&&(i+="\n"),!0!==o.preserve.leadingWS&&(e=ft(e)),!0!==o.preserve.trailingWS&&(e=pt(e)),i+=e.replace(/\u00AD/g,"")}),i=i.replace(/\u00A0/g," "),"json"===o.type||"excel"===o.type&&"xmlss"===o.mso.fileFormat||!1===o.numbers.output)!1!==(p=mt(i))&&(i=Number(p));else if((o.numbers.html.decimalMark!==o.numbers.output.decimalMark||o.numbers.html.thousandsSeparator!==o.numbers.output.thousandsSeparator)&&!1!==(p=mt(i))){var m=(""+p.substr(p<0?1:0)).split(".");1===m.length&&(m[1]="");var g=m[0].length>3?m[0].length%3:0;i=(p<0?"-":"")+(o.numbers.output.thousandsSeparator?(g?m[0].substr(0,g)+o.numbers.output.thousandsSeparator:"")+m[0].substr(g).replace(/(\d{3})(?=\d)/g,"$1"+o.numbers.output.thousandsSeparator):m[0])+(m[1].length?o.numbers.output.decimalMark+m[1]:"")}}else i=a}!0===o.escape&&(i=escape(i)),"function"==typeof o.onCellData&&(i=o.onCellData(l,e,r,i))}return i}function vt(t){return t.length>0&&!0===o.preventInjection&&"=+-@".indexOf(t.charAt(0))>=0?"'"+t:t}function yt(t,e,o){return e+"-"+o.toLowerCase()}function bt(t,e){var o=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(t),n=e;return o&&(n=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]),n}function wt(t){var e=Ct(t,"text-align"),o=Ct(t,"font-weight"),n=Ct(t,"font-style"),r="";"start"===e&&(e="rtl"===Ct(t,"direction")?"right":"left"),o>=700&&(r="bold"),"italic"===n&&(r+=n),""===r&&(r="normal");var i={style:{align:e,bcolor:bt(Ct(t,"background-color"),[255,255,255]),color:bt(Ct(t,"color"),[0,0,0]),fstyle:r},colspan:xt(t),rowspan:St(t)};if(null!==t){var a=t.getBoundingClientRect();i.rect={width:a.width,height:a.height}}return i}function xt(t){var e=n(t).data("tableexport-colspan");return void 0===e&&n(t).is("[colspan]")&&(e=n(t).attr("colspan")),parseInt(e)||0}function St(t){var e=n(t).data("tableexport-rowspan");return void 0===e&&n(t).is("[rowspan]")&&(e=n(t).attr("rowspan")),parseInt(e)||0}function Ct(t,e){try{return window.getComputedStyle?(e=e.replace(/([a-z])([A-Z])/,yt),window.getComputedStyle(t,null).getPropertyValue(e)):t.currentStyle?t.currentStyle[e]:t.style[e]}catch(t){}return""}function Ft(t,e,o){var n=Ct(t,e),r=n.match(/\d+/);return null!==r?(r=r[0],function(t,e,o){var n=document.createElement("div");n.style.overflow="hidden",n.style.visibility="hidden",t.appendChild(n),n.style.width=100+o;var r=100/n.offsetWidth;return t.removeChild(n),e*r}(t.parentElement,r,o)):0}function kt(t){var e,o,n,r=0;if(0===t.length)return r;for(e=0,n=t.length;e<n;e++)o=t.charCodeAt(e),r=(r<<5)-r+o,r|=0;return r}function Nt(t,n,r,i,a,l){var s=!0;if("function"==typeof o.onBeforeSaveToFile&&"boolean"!=typeof(s=o.onBeforeSaveToFile(t,n,r,i,a))&&(s=!0),s)try{e=new Blob([t],{type:r+";charset="+i}),saveAs(e,n,!1===l),"function"==typeof o.onAfterSaveToFile&&o.onAfterSaveToFile(t,n)}catch(e){Tt(n,"data:"+r+(i.length?";charset="+i:"")+(a.length?";"+a:"")+","+(l?"\ufeff":""),t)}}function Tt(t,e,n){var r=window.navigator.userAgent;if(!1!==t&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([n]),t);else if(!1!==t&&(r.indexOf("MSIE ")>0||r.match(/Trident.*rv\:11\./))){var i=document.createElement("iframe");if(i){document.body.appendChild(i),i.setAttribute("style","display:none"),i.contentDocument.open("txt/plain","replace"),i.contentDocument.write(n),i.contentDocument.close(),i.contentDocument.focus();var a=t.substr(t.lastIndexOf(".")+1);switch(a){case"doc":case"json":case"png":case"pdf":case"xls":case"xlsx":t+=".txt"}i.contentDocument.execCommand("SaveAs",!0,t),document.body.removeChild(i)}}else{var s=document.createElement("a");if(s){var c=null;if(s.style.display="none",!1!==t?s.download=t:s.target="_blank","object"==typeof n){window.URL=window.URL||window.webkitURL;var d=[];d.push(n),c=window.URL.createObjectURL(new Blob(d,{type:e})),s.href=c}else e.toLowerCase().indexOf("base64,")>=0?s.href=e+At(n):s.href=e+encodeURIComponent(n);document.body.appendChild(s),document.createEvent?(null===l&&(l=document.createEvent("MouseEvents")),l.initEvent("click",!0,!1),s.dispatchEvent(l)):document.createEventObject?s.fireEvent("onclick"):"function"==typeof s.onclick&&s.onclick(),setTimeout(function(){c&&window.URL.revokeObjectURL(c),document.body.removeChild(s),"function"==typeof o.onAfterSaveToFile&&o.onAfterSaveToFile(n,t)},100)}}}function At(t){var e,o,n,r,i,a,l,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",d=0;for(t=function(t){if("string"==typeof t){t=t.replace(/\x0d\x0a/g,"\n");for(var e="",o=0;o<t.length;o++){var n=t.charCodeAt(o);n<128?e+=String.fromCharCode(n):n>127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}return t}(t);d<t.length;)e=t.charCodeAt(d++),o=t.charCodeAt(d++),n=t.charCodeAt(d++),r=e>>2,i=(3&e)<<4|o>>4,a=(15&o)<<2|n>>6,l=63&n,isNaN(o)?a=l=64:isNaN(n)&&(l=64),c=c+s.charAt(r)+s.charAt(i)+s.charAt(a)+s.charAt(l);return c}return this}}});if("object"==typeof o){var n=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,t&&t!==window?t:null];for(var r in o)n[0]&&(n[0][r]=o[r]),n[1]&&"__esModule"!==r&&(n[1][r]=o[r]),n[2]&&(n[2][r]=o[r])}}(this);