/* Highcharts JS v8.2.2 (2020-10-22) Exporting module (c) 2010-2019 Torstein Honsi License: www.highcharts.com/license */ (function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/export-data",["highcharts","highcharts/modules/exporting"],function(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,b,e,c){a.hasOwnProperty(b)||(a[b]=c.apply(null,e))}a=a?a._modules:{};g(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var b=a.win,e=b.navigator,c=b.document, g=b.URL||b.webkitURL||b,v=/Edge\/\d+/.test(e.userAgent),C=a.dataURLtoBlob=function(f){if((f=f.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3d.userAgent.indexOf("Chrome"),c=n.URL||n.webkitURL||n;try{if(d.msSaveOrOpenBlob&&n.MSBlobBuilder){var m=new n.MSBlobBuilder;m.append(a);return m.getBlob("image/svg+xml")}if(!f)return c.createObjectURL(new n.Blob(["\ufeff"+a],{type:b}))}catch(N){}}var C=e.doc,f=e.seriesTypes,n=e.win;e=c.addEvent;var J=c.defined,K=c.extend,F=c.find,D= c.fireEvent,L=c.getOptions,M=c.isNumber,x=c.pick;c=c.setOptions;var G=g.downloadURL;c({exporting:{csv:{annotations:{itemDelimiter:"; ",join:!1},columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",exportData:{annotationHeader:"Annotations",categoryHeader:"Category",categoryDatetimeHeader:"DateTime"},viewData:"View data table", hideData:"Hide data table"}});e(b,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&!this.dataTableDiv&&this.viewData()});b.prototype.setUpKeyToAxis=function(){f.arearange&&(f.arearange.prototype.keyToAxis={low:"y",high:"y"});f.gantt&&(f.gantt.prototype.keyToAxis={start:"x",end:"x"})};b.prototype.getDataRows=function(d){var b=this.hasParallelCoordinates,f=this.time,c=this.options.exporting&&this.options.exporting.csv||{},e=this.xAxis, r={},g=[],n=[],E=[],t;var u=this.options.lang.exportData;var q=u.categoryHeader,y=u.categoryDatetimeHeader,H=function(k,b,f){if(c.columnHeaderFormatter){var h=c.columnHeaderFormatter(k,b,f);if(!1!==h)return h}return k?k instanceof a?k.options.title&&k.options.title.text||(k.dateTime?y:q):d?{columnTitle:1',d=this.options,c=a?(1.1).toLocaleString()[1]:".",f=x(d.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(f);var e=0,g=f?a.shift():null,n=a.shift(),p=function(a,b,d,f){var e=x(f,""); b="text"+(b?" "+b:"");"number"===typeof e?(e=e.toString(),","===c&&(e=e.replace(".",c)),b="number"):f||(b="empty");return"<"+a+(d?" "+d:"")+' class="'+b+'">'+e+""};!1!==d.exporting.tableCaption&&(b+=''+x(d.exporting.tableCaption,d.title.text?d.title.text.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/"):"Chart")+"");for(var t=0,u=a.length;t e&&(e=a[t].length);b+=function(a,b,c){var e="",g=0;c=c||b&&b.length;var h,m=0;if(h=f&&a&&b){a:if(h=a.length,b.length===h){for(;h--;)if(a[h]!==b[h]){h=!1;break a}h=!0}else h=!1;h=!h}if(h){for(e+="";g"}return e+""}(g,n,Math.max(e,n.length));b+="";a.forEach(function(a){b+="";for(var d=0;d"});b+="";a={html:b};D(this,"afterGetTable",a);return a.html};b.prototype.downloadCSV=function(){var a=this.getCSV(!0);G(v(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+ ".csv")};b.prototype.downloadXLS=function(){var a='\x3c!--[if gte mso 9]>Ark1td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}'+ this.getTable(!0)+"";G(v(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+n.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};b.prototype.viewData=function(){this.dataTableDiv||(this.dataTableDiv=C.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,this.renderTo.nextSibling),this.dataTableDiv.innerHTML=this.getTable());if(""===this.dataTableDiv.style.display||"none"=== this.dataTableDiv.style.display)this.dataTableDiv.style.display="block";this.isDataTableVisible=!0;D(this,"afterViewData",this.dataTableDiv)};b.prototype.hideData=function(){this.dataTableDiv&&"block"===this.dataTableDiv.style.display&&(this.dataTableDiv.style.display="none");this.isDataTableVisible=!1};b.prototype.toggleDataTable=function(){var a=this.exportDivElements,b=this.options.exporting;b=b&&b.buttons&&b.buttons.contextButton.menuItems;var c=this.options.lang;this.isDataTableVisible?this.hideData(): this.viewData();(null===p||void 0===p?0:p.menuItemDefinitions)&&(null===c||void 0===c?0:c.viewData)&&c.hideData&&b&&a&&a.length&&(a[b.indexOf("viewData")].innerHTML=this.isDataTableVisible?c.hideData:c.viewData)};var p=L().exporting;p&&(K(p.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}),p.buttons&&p.buttons.contextButton.menuItems.push("separator", "downloadCSV","downloadXLS","viewData"));f.map&&(f.map.prototype.exportKey="name");f.mapbubble&&(f.mapbubble.prototype.exportKey="name");f.treemap&&(f.treemap.prototype.exportKey="name")});g(a,"masters/modules/export-data.src.js",[],function(){})}); //# sourceMappingURL=export-data.js.map