(function(n){"object"==typeof module&&module.exports?(n["default"]=n,module.exports=n):"function"==typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(t){return n(t),n.Highcharts=t,n}):n("undefined"!=typeof Highcharts?Highcharts:void 0)})(function(n){function t(n,t,i,r){n.hasOwnProperty(t)||(n[t]=r.apply(null,i))}n=n?n._modules:{};t(n,"modules/full-screen.src.js",[n["parts/Chart.js"],n["parts/Globals.js"],n["parts/Utilities.js"]],function(n,t,i){var r=i.addEvent;return i=function(){function n(n){this.chart=n;this.isOpen=!1;n=n.renderTo;this.browserProps||("function"==typeof n.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:n.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:n.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:n.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}return n.prototype.close=function(){var n=this.chart;this.isOpen&&this.browserProps&&n.container.ownerDocument instanceof Document&&n.container.ownerDocument[this.browserProps.exitFullscreen]();this.unbindFullscreenEvent&&this.unbindFullscreenEvent();this.isOpen=!1;this.setButtonText()},n.prototype.open=function(){var n=this,t=n.chart,i;n.browserProps&&(n.unbindFullscreenEvent=r(t.container.ownerDocument,n.browserProps.fullscreenChange,function(){n.isOpen?(n.isOpen=!1,n.close()):(n.isOpen=!0,n.setButtonText())}),i=t.renderTo[n.browserProps.requestFullscreen](),i&&i["catch"](function(){alert("Full screen is not supported inside a frame.")}),r(t,"destroy",n.unbindFullscreenEvent))},n.prototype.setButtonText=function(){var n,i=this.chart,r=i.exportDivElements,t=i.options.exporting,u=null===(n=null===t||void 0===t?void 0:t.buttons)||void 0===n?void 0:n.contextButton.menuItems;n=i.options.lang;(null===t||void 0===t?0:t.menuItemDefinitions)&&(null===n||void 0===n?0:n.exitFullscreen)&&n.viewFullscreen&&u&&r&&r.length&&(r[u.indexOf("viewFullscreen")].innerHTML=this.isOpen?n.exitFullscreen:t.menuItemDefinitions.viewFullscreen.text||n.viewFullscreen)},n.prototype.toggle=function(){this.isOpen?this.close():this.open()},n}(),t.Fullscreen=i,r(n,"beforeRender",function(){this.fullscreen=new t.Fullscreen(this)}),t.Fullscreen});t(n,"mixins/navigation.js",[],function(){return{initUpdate:function(n){n.navigation||(n.navigation={updates:[],update:function(n,t){this.updates.forEach(function(i){i.update.call(i.context,n,t)})}})},addUpdate:function(n,t){t.navigation||this.initUpdate(t);t.navigation.updates.push({update:n,context:t})}}});t(n,"modules/exporting.src.js",[n["parts/Chart.js"],n["mixins/navigation.js"],n["parts/Globals.js"],n["parts/Options.js"],n["parts/SVGRenderer.js"],n["parts/Utilities.js"]],function(n,t,i,r,u,f){var v=i.doc,d=i.isTouchDevice,h=i.win;r=r.defaultOptions;var c=f.addEvent,o=f.css,l=f.createElement,p=f.discardElement,a=f.extend,g=f.find,y=f.fireEvent,nt=f.isObject,e=f.merge,w=f.objectEach,s=f.pick,tt=f.removeEvent,it=f.uniqueKey,b=h.navigator.userAgent,k=i.Renderer.prototype.symbols,rt=/Edge\/|Trident\/|MSIE /.test(b),ut=/firefox/i.test(b);a(r.lang,{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});r.navigation||(r.navigation={});e(!0,r.navigation,{buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}});e(!0,r.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",color:"#333333",background:"none",fontSize:d?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}}});r.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:"viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}};i.post=function(n,t,i){var r=l("form",e({method:"post",action:n,enctype:"multipart/form-data"},i),{display:"none"},v.body);w(t,function(n,t){l("input",{type:"hidden",name:t,value:n},null,r)});r.submit();p(r)};i.isSafari&&i.win.matchMedia("print").addListener(function(n){i.printingChart&&(n.matches?i.printingChart.beforePrint():i.printingChart.afterPrint())});a(n.prototype,{sanitizeSVG:function(n,t){var r=n.indexOf("<\/svg>")+6,i=n.substr(r);return n=n.substr(0,r),t&&t.exporting&&t.exporting.allowHTML&&i&&(i='<foreignObject x="0" y="0" width="'+t.chart.width+'" height="'+t.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+i+"<\/body><\/foreignObject>",n=n.replace("<\/svg>",i+"<\/svg>")),n=n.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|&quot;)(.*?)("|&quot;);?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g," xlink:href=").replace(/\n/," ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g," ").replace(/&shy;/g,"­"),this.ieSanitizeSVG&&(n=this.ieSanitizeSVG(n)),n},getChartHTML:function(){return this.styledMode&&this.inlineStyles(),this.container.innerHTML},getSVG:function(n){var o,t=e(this.options,n),u;t.plotOptions=e(this.userOptions.plotOptions,n&&n.plotOptions);t.time=e(this.userOptions.time,n&&n.time);var s=l("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},v.body),r=this.renderTo.style.width,f=this.renderTo.style.height;return r=t.exporting.sourceWidth||t.chart.width||/px$/.test(r)&&parseInt(r,10)||(t.isGantt?800:600),f=t.exporting.sourceHeight||t.chart.height||/px$/.test(f)&&parseInt(f,10)||400,a(t.chart,{animation:!1,renderTo:s,forExport:!0,renderer:"SVGRenderer",width:r,height:f}),t.exporting.enabled=!1,delete t.data,t.series=[],this.series.forEach(function(n){o=e(n.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:n.visible});o.isInternal||t.series.push(o)}),this.axes.forEach(function(n){n.userOptions.internalKey||(n.userOptions.internalKey=it())}),u=new i.Chart(t,this.callback),n&&["xAxis","yAxis","series"].forEach(function(t){var i={};n[t]&&(i[t]=n[t],u.update(i))}),this.axes.forEach(function(n){var i=g(u.axes,function(t){return t.options.internalKey===n.userOptions.internalKey}),t=n.getExtremes(),r=t.userMin;t=t.userMax;i&&("undefined"!=typeof r&&r!==i.min||"undefined"!=typeof t&&t!==i.max)&&i.setExtremes(r,t,!0,!1)}),r=u.getChartHTML(),y(this,"getSVG",{chartCopy:u}),r=this.sanitizeSVG(r,t),t=null,u.destroy(),p(s),r},getSVGForExport:function(n,t){var i=this.options.exporting;return this.getSVG(e({chart:{borderRadius:0}},i.chartOptions,t,{exporting:{sourceWidth:n&&n.sourceWidth||i.sourceWidth,sourceHeight:n&&n.sourceHeight||i.sourceHeight}}))},getFilename:function(){var t=this.userOptions.title&&this.userOptions.title.text,n=this.options.exporting.filename;return n?n.replace(/\//g,"-"):("string"==typeof t&&(n=t.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!n||5>n.length)&&(n="chart"),n)},exportChart:function(n,t){t=this.getSVGForExport(n,t);n=e(this.options.exporting,n);i.post(n.url,{filename:n.filename?n.filename.replace(/\//g,"-"):this.getFilename(),type:n.type,width:n.width||0,scale:n.scale,svg:t},n.formAttributes)},moveContainers:function(n){(this.fixedDiv?[this.fixedDiv,this.scrollingContainer]:[this.container]).forEach(function(t){n.appendChild(t)})},beforePrint:function(){var i=v.body,t=this.options.exporting.printMaxWidth,n={childNodes:i.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0;this.pointer.reset(null,0);y(this,"beforePrint");t&&this.chartWidth>t&&(n.resetParams=[this.options.chart.width,void 0,!1],this.setSize(t,void 0,!1));[].forEach.call(n.childNodes,function(t,i){1===t.nodeType&&(n.origDisplay[i]=t.style.display,t.style.display="none")});this.moveContainers(i);this.printReverseInfo=n},afterPrint:function(){if(this.printReverseInfo){var t=this.printReverseInfo.childNodes,r=this.printReverseInfo.origDisplay,n=this.printReverseInfo.resetParams;this.moveContainers(this.renderTo);[].forEach.call(t,function(n,t){1===n.nodeType&&(n.style.display=r[t]||"")});this.isPrinting=!1;n&&this.setSize.apply(this,n);delete this.printReverseInfo;delete i.printingChart;y(this,"afterPrint")}},print:function(){var n=this;n.isPrinting||(i.printingChart=n,i.isSafari||n.beforePrint(),setTimeout(function(){h.focus();h.print();i.isSafari||setTimeout(function(){n.afterPrint()},1e3)},1))},contextMenu:function(n,t,i,r,u,e,s){var p=this,d=p.options.navigation,g=p.chartWidth,tt=p.chartHeight,it="cache-"+n,w=p[it],b=Math.max(u,e),k;w||(p.exportContextMenu=p[it]=w=l("div",{className:n},{position:"absolute",zIndex:1e3,padding:b+"px",pointerEvents:"auto"},p.fixedDiv||p.container),k=l("ul",{className:"highcharts-menu"},{listStyle:"none",margin:0,padding:0},w),p.styledMode||o(k,a({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},d.menuStyle)),w.hideMenu=function(){o(w,{display:"none"});s&&s.setState(0);p.openMenu=!1;o(p.renderTo,{overflow:"hidden"});f.clearTimeout(w.hideTimer);y(p,"exportMenuHidden")},p.exportEvents.push(c(w,"mouseleave",function(){w.hideTimer=h.setTimeout(w.hideMenu,500)}),c(w,"mouseenter",function(){f.clearTimeout(w.hideTimer)}),c(v,"mouseup",function(t){p.pointer.inClass(t.target,n)||w.hideMenu()}),c(w,"click",function(){p.openMenu&&w.hideMenu()})),t.forEach(function(n){if("string"==typeof n&&(n=p.options.exporting.menuItemDefinitions[n]),nt(n,!0)){if(n.separator)var t=l("hr",null,null,k);else t=l("li",{className:"highcharts-menu-item",onclick:function(t){t&&t.stopPropagation();w.hideMenu();n.onclick&&n.onclick.apply(p,arguments)},innerHTML:n.text||p.options.lang[n.textKey]},null,k),p.styledMode||(t.onmouseover=function(){o(this,d.menuItemHoverStyle)},t.onmouseout=function(){o(this,d.menuItemStyle)},o(t,a({cursor:"pointer"},d.menuItemStyle)));p.exportDivElements.push(t)}}),p.exportDivElements.push(k,w),p.exportMenuWidth=w.offsetWidth,p.exportMenuHeight=w.offsetHeight);t={display:"block"};i+p.exportMenuWidth>g?t.right=g-i-u-b+"px":t.left=i-b+"px";r+e+p.exportMenuHeight>tt&&"top"!==s.alignOptions.verticalAlign?t.bottom=tt-r-b+"px":t.top=r+e-b+"px";o(w,t);o(p.renderTo,{overflow:""});p.openMenu=!0;y(p,"exportMenuShown")},addButton:function(n){var i=this,l=i.renderer,t=e(i.options.navigation.buttonOptions,n),v=t.onclick,y=t.menuItems,f=t.symbolSize||12,h,u,c;if(i.btnCount||(i.btnCount=0),i.exportDivElements||(i.exportDivElements=[],i.exportSVGElements=[]),!1!==t.enabled){var r=t.theme,o=r.states,p=o&&o.hover;o=o&&o.select;i.styledMode||(r.fill=s(r.fill,"#ffffff"),r.stroke=s(r.stroke,"none"));delete r.states;v?h=function(n){n&&n.stopPropagation();v.call(i,n)}:y&&(h=function(n){n&&n.stopPropagation();i.contextMenu(u.menuClassName,y,u.translateX,u.translateY,u.width,u.height,u);u.setState(2)});t.text&&t.symbol?r.paddingLeft=s(r.paddingLeft,25):t.text||a(r,{width:t.width,height:t.height,padding:0});i.styledMode||(r["stroke-linecap"]="round",r.fill=s(r.fill,"#ffffff"),r.stroke=s(r.stroke,"none"));u=l.button(t.text,0,0,h,r,p,o).addClass(n.className).attr({title:s(i.options.lang[t._titleKey||t.titleKey],"")});u.menuClassName=n.menuClassName||"highcharts-menu-"+i.btnCount++;t.symbol&&(c=l.symbol(t.symbol,t.symbolX-f/2,t.symbolY-f/2,f,f,{width:f,height:f}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(u),i.styledMode||c.attr({stroke:t.symbolStroke,fill:t.symbolFill,"stroke-width":t.symbolStrokeWidth||1}));u.add(i.exportingGroup).align(a(t,{width:u.width,x:s(t.x,i.buttonOffset)}),!0,"spacingBox");i.buttonOffset+=(u.width+t.buttonSpacing)*("right"===t.align?-1:1);i.exportSVGElements.push(u,c)}},destroyExport:function(n){var t=n?n.target:this,i,r,u;n=t.exportSVGElements;i=t.exportDivElements;r=t.exportEvents;n&&(n.forEach(function(n,i){n&&(n.onclick=n.ontouchstart=null,u="cache-"+n.menuClassName,t[u]&&delete t[u],t.exportSVGElements[i]=n.destroy())}),n.length=0);t.exportingGroup&&(t.exportingGroup.destroy(),delete t.exportingGroup);i&&(i.forEach(function(n,i){f.clearTimeout(n.hideTimer);tt(n,"mouseleave");t.exportDivElements[i]=n.onmouseout=n.onmouseover=n.ontouchstart=n.onclick=null;p(n)}),i.length=0);r&&(r.forEach(function(n){n()}),r.length=0)}});u.prototype.inlineToAttributes="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");u.prototype.inlineBlacklist=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/];u.prototype.unstyledElements=["clipPath","defs","desc"];n.prototype.inlineStyles=function(){function f(n){return n.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()})}function s(n){function g(t,i){if(v=p=!1,u){for(y=u.length;y--&&!p;)p=u[y].test(i);v=!p}for("transform"===i&&"none"===t&&(v=!0),y=l.length;y--&&!v;)v=l[y].test(i)||"function"==typeof t;v||nt[i]===t&&"svg"!==n.nodeName||r[n.nodeName][i]===t||(c&&-1===c.indexOf(i)?k+=f(i)+":"+t+";":t&&n.setAttribute(f(i),t))}var k="",v,p,y,o,nt,b,d;if(1===n.nodeType&&-1===a.indexOf(n.nodeName)){if(o=h.getComputedStyle(n,null),nt="svg"===n.nodeName?{}:h.getComputedStyle(n.parentNode,null),r[n.nodeName]||(i=t.getElementsByTagName("svg")[0],b=t.createElementNS(n.namespaceURI,n.nodeName),i.appendChild(b),r[n.nodeName]=e(h.getComputedStyle(b,null)),"text"===n.nodeName&&delete r.text.fill,i.removeChild(b)),ut||rt)for(d in o)g(o[d],d);else w(o,g);k&&(o=n.getAttribute("style"),n.setAttribute("style",(o?o+";":"")+k));"svg"===n.nodeName&&n.setAttribute("stroke-width","1px");"text"!==n.nodeName&&[].forEach.call(n.children||n.childNodes,s)}}var n=this.renderer,c=n.inlineToAttributes,l=n.inlineBlacklist,u=n.inlineWhitelist,a=n.unstyledElements,r={},i,t;n=v.createElement("iframe");o(n,{width:"1px",height:"1px",visibility:"hidden"});v.body.appendChild(n);t=n.contentWindow.document;t.open();t.write('<svg xmlns="http://www.w3.org/2000/svg"><\/svg>');t.close();s(this.container.querySelector("svg"));i.parentNode.removeChild(i)};k.menu=function(n,t,i,r){return[["M",n,t+2.5],["L",n+i,t+2.5],["M",n,t+r/2+.5],["L",n+i,t+r/2+.5],["M",n,t+r-1.5],["L",n+i,t+r-1.5]]};k.menuball=function(n,t,i,r){return n=[],r=r/3-2,n.concat(this.circle(i-r,t,r,r),this.circle(i-r,t+r+4,r,r),this.circle(i-r,t+2*(r+4),r,r))};n.prototype.renderExporting=function(){var n=this,t=n.options.exporting,i=t.buttons,r=n.isDirtyExporting||!n.exportSVGElements;n.buttonOffset=0;n.isDirtyExporting&&n.destroyExport();r&&!1!==t.enabled&&(n.exportEvents=[],n.exportingGroup=n.exportingGroup||n.renderer.g("exporting-group").attr({zIndex:3}).add(),w(i,function(t){n.addButton(t)}),n.isDirtyExporting=!1);c(n,"destroy",n.destroyExport)};c(n,"init",function(){var n=this;n.exporting={update:function(t,i){n.isDirtyExporting=!0;e(!0,n.options.exporting,t);s(i,!0)&&n.redraw()}};t.addUpdate(function(t,i){n.isDirtyExporting=!0;e(!0,n.options.navigation,t);s(i,!0)&&n.redraw()},n)});n.prototype.callbacks.push(function(n){n.renderExporting();c(n,"redraw",n.renderExporting)})});t(n,"masters/modules/exporting.src.js",[],function(){})})