EVOLUTION-NINJA
Edit File: exporting.min.js
!function(t){var e,n=t.Chart,o=t.addEvent,i=t.removeEvent,r=HighchartsAdapter.fireEvent,a=t.createElement,s=t.discardElement,l=t.css,p=t.merge,c=t.each,h=t.extend,u=t.splat,d=Math.max,g=document,m=window,x=t.isTouchDevice,y=t.Renderer.prototype.symbols,f=t.getOptions();h(f.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"}),f.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:x?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}},f.exporting={type:"image/png",url:"http://export.highcharts.com/",buttons:{contextButton:{menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}},t.post=function(t,e,n){var o;t=a("form",p({method:"post",action:t,enctype:"multipart/form-data"},n),{display:"none"},g.body);for(o in e)a("input",{type:"hidden",name:o,value:e[o]},null,t);t.submit(),s(t)},h(n.prototype,{sanitizeSVG:function(t){return t.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").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(/<\/svg>.*?$/,"</svg>").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/ /g," ").replace(/­/g,"").replace(/<IMG /g,"<image ").replace(/<(\/?)TITLE>/g,"<$1title>").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/ id=([^" >]+)/g,' id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(e){var n,o,i,r,l,d=this,m=p(d.options,e),x=m.exporting.allowHTML;return g.createElementNS||(g.createElementNS=function(t,e){return g.createElement(e)}),o=a("div",null,{position:"absolute",top:"-9999em",width:d.chartWidth+"px",height:d.chartHeight+"px"},g.body),i=d.renderTo.style.width,l=d.renderTo.style.height,i=m.exporting.sourceWidth||m.chart.width||/px$/.test(i)&&parseInt(i,10)||600,l=m.exporting.sourceHeight||m.chart.height||/px$/.test(l)&&parseInt(l,10)||400,h(m.chart,{animation:!1,renderTo:o,forExport:!x,width:i,height:l}),m.exporting.enabled=!1,delete m.data,m.series=[],c(d.series,function(t){(r=p(t.options,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:t.visible})).isInternal||m.series.push(r)}),e&&c(["xAxis","yAxis"],function(t){c(u(e[t]),function(e,n){m[t][n]=p(m[t][n],e)})}),n=new t.Chart(m,d.callback),c(["xAxis","yAxis"],function(t){c(d[t],function(e,o){var i=n[t][o],r=(a=e.getExtremes()).userMin,a=a.userMax;i&&(void 0!==r||void 0!==a)&&i.setExtremes(r,a,!0,!1)})}),i=n.getChartHTML(),m=null,n.destroy(),s(o),x&&(o=i.match(/<\/svg>(.*?$)/))&&(o='<foreignObject x="0" y="0 width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">'+o[1]+"</body></foreignObject>",i=i.replace("</svg>",o+"</svg>")),(i=this.sanitizeSVG(i)).replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'")},getSVGForExport:function(t,e){var n=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},n.chartOptions,e,{exporting:{sourceWidth:t&&t.sourceWidth||n.sourceWidth,sourceHeight:t&&t.sourceHeight||n.sourceHeight}}))},exportChart:function(e,n){var o=this.getSVGForExport(e,n);e=p(this.options.exporting,e);t.post(e.url,{filename:e.filename||"chart",type:e.type,width:e.width||0,scale:e.scale||2,svg:o},e.formAttributes)},print:function(){var t=this,e=t.container,n=[],o=e.parentNode,i=g.body,a=i.childNodes;t.isPrinting||(t.isPrinting=!0,r(t,"beforePrint"),c(a,function(t,e){1===t.nodeType&&(n[e]=t.style.display,t.style.display="none")}),i.appendChild(e),m.focus(),m.print(),setTimeout(function(){o.appendChild(e),c(a,function(t,e){1===t.nodeType&&(t.style.display=n[e])}),t.isPrinting=!1,r(t,"afterPrint")},1e3))},contextMenu:function(t,e,n,r,s,p,u){var g,m,x,y=this,f=y.options.navigation,b=f.menuItemStyle,v=y.chartWidth,w=y.chartHeight,S="cache-"+t,k=y[S],E=d(s,p),C=function(e){y.pointer.inClass(e.target,t)||m()};k||(y[S]=k=a("div",{className:t},{position:"absolute",zIndex:1e3,padding:E+"px"},y.container),g=a("div",null,h({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},f.menuStyle),k),m=function(){l(k,{display:"none"}),u&&u.setState(0),y.openMenu=!1},o(k,"mouseleave",function(){x=setTimeout(m,500)}),o(k,"mouseenter",function(){clearTimeout(x)}),o(document,"mouseup",C),o(y,"destroy",function(){i(document,"mouseup",C)}),c(e,function(t){if(t){var e=t.separator?a("hr",null,null,g):a("div",{onmouseover:function(){l(this,f.menuItemHoverStyle)},onmouseout:function(){l(this,b)},onclick:function(e){e.stopPropagation(),m(),t.onclick&&t.onclick.apply(y,arguments)},innerHTML:t.text||y.options.lang[t.textKey]},h({cursor:"pointer"},b),g);y.exportDivElements.push(e)}}),y.exportDivElements.push(g,k),y.exportMenuWidth=k.offsetWidth,y.exportMenuHeight=k.offsetHeight),e={display:"block"},n+y.exportMenuWidth>v?e.right=v-n-s-E+"px":e.left=n-E+"px",r+p+y.exportMenuHeight>w&&"top"!==u.alignOptions.verticalAlign?e.bottom=w-r-E+"px":e.top=r+p-E+"px",l(k,e),y.openMenu=!0},addButton:function(n){var o,i,r=this,a=r.renderer,s=p(r.options.navigation.buttonOptions,n),l=s.onclick,c=s.menuItems,u={stroke:s.symbolStroke,fill:s.symbolFill},d=s.symbolSize||12;if(r.btnCount||(r.btnCount=0),r.exportDivElements||(r.exportDivElements=[],r.exportSVGElements=[]),!1!==s.enabled){var g,m=s.theme,x=(y=m.states)&&y.hover,y=y&&y.select;delete m.states,l?g=function(t){t.stopPropagation(),l.call(r,t)}:c&&(g=function(){r.contextMenu(i.menuClassName,c,i.translateX,i.translateY,i.width,i.height,i),i.setState(2)}),s.text&&s.symbol?m.paddingLeft=t.pick(m.paddingLeft,25):s.text||h(m,{width:s.width,height:s.height,padding:0}),(i=a.button(s.text,0,0,g,m,x,y).attr({title:r.options.lang[s._titleKey],"stroke-linecap":"round"})).menuClassName=n.menuClassName||"highcharts-menu-"+r.btnCount++,s.symbol&&(o=a.symbol(s.symbol,s.symbolX-d/2,s.symbolY-d/2,d,d).attr(h(u,{"stroke-width":s.symbolStrokeWidth||1,zIndex:1})).add(i)),i.add().align(h(s,{width:i.width,x:t.pick(s.x,e)}),!0,"spacingBox"),e+=(i.width+s.buttonSpacing)*("right"===s.align?-1:1),r.exportSVGElements.push(i,o)}},destroyExport:function(t){var e,n;t=t.target;for(e=0;e<t.exportSVGElements.length;e++)(n=t.exportSVGElements[e])&&(n.onclick=n.ontouchstart=null,t.exportSVGElements[e]=n.destroy());for(e=0;e<t.exportDivElements.length;e++)n=t.exportDivElements[e],i(n,"mouseleave"),t.exportDivElements[e]=n.onmouseout=n.onmouseover=n.ontouchstart=n.onclick=null,s(n)}}),y.menu=function(t,e,n,o){return["M",t,e+2.5,"L",t+n,e+2.5,"M",t,e+o/2+.5,"L",t+n,e+o/2+.5,"M",t,e+o-1.5,"L",t+n,e+o-1.5]},n.prototype.callbacks.push(function(t){var n,i=t.options.exporting,r=i.buttons;if(e=0,!1!==i.enabled){for(n in r)t.addButton(r[n]);o(t,"destroy",t.destroyExport)}})}(Highcharts);