initial commit master
authorRuss Handorf <rhandorf@handorf.org>
Tue, 18 Apr 2017 12:35:24 +0000 (08:35 -0400)
committerRuss Handorf <rhandorf@handorf.org>
Tue, 18 Apr 2017 12:35:24 +0000 (08:35 -0400)
83 files changed:
charts/canvas/breaker-live-broken.php [new file with mode: 0644]
charts/canvas/breaker.php [new file with mode: 0644]
charts/canvas/canvasjs.min.js [new file with mode: 0644]
charts/canvas/charts.zip [new file with mode: 0644]
charts/canvas/examples/01-line-chart/basic-line-chart.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-date-time-axis.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-line-customization.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-null(empty)-data.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-stripline.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-xy-zoom-type.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/line-chart-with-zooming.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/multi-series-line-chart.html [new file with mode: 0644]
charts/canvas/examples/01-line-chart/multiple-charts-in-one-page.html [new file with mode: 0644]
charts/canvas/examples/02-column-chart/basic-column-chart.html [new file with mode: 0644]
charts/canvas/examples/02-column-chart/column-chart-with-index-label-customization.html [new file with mode: 0644]
charts/canvas/examples/02-column-chart/multi-series-column-chart.html [new file with mode: 0644]
charts/canvas/examples/03-area-chart/area-chart-with-date-time-axis.html [new file with mode: 0644]
charts/canvas/examples/03-area-chart/area-chart-with-line-thickness.html [new file with mode: 0644]
charts/canvas/examples/03-area-chart/area-chart-with-opacity.html [new file with mode: 0644]
charts/canvas/examples/03-area-chart/area-chart-with-xy-zoom-type.html [new file with mode: 0644]
charts/canvas/examples/03-area-chart/basic-area-chart.html [new file with mode: 0644]
charts/canvas/examples/04-pie-chart/basic-pie-chart.html [new file with mode: 0644]
charts/canvas/examples/04-pie-chart/pie-chart-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/05-bar-chart/bar-chart-with-stripline.html [new file with mode: 0644]
charts/canvas/examples/05-bar-chart/basic-bar-chart.html [new file with mode: 0644]
charts/canvas/examples/06-doughnut-chart/basic-doughnut-chart.html [new file with mode: 0644]
charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-explode-on-click-disabled.html [new file with mode: 0644]
charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/07-spline-chart/basic-spline-chart.html [new file with mode: 0644]
charts/canvas/examples/07-spline-chart/spline-chart-with-marker-customization.html [new file with mode: 0644]
charts/canvas/examples/08-bubble-chart/basic-bubble-chart.html [new file with mode: 0644]
charts/canvas/examples/08-bubble-chart/bubble-chart-with-tooltip-customization.html [new file with mode: 0644]
charts/canvas/examples/09-stacked-column-chart/basic-stacked-column-chart.html [new file with mode: 0644]
charts/canvas/examples/09-stacked-column-chart/stacked-column-with-total-shown-on-top.html [new file with mode: 0644]
charts/canvas/examples/10-stacked-bar-chart/basic-stacked-bar-chart.html [new file with mode: 0644]
charts/canvas/examples/10-stacked-bar-chart/stacked-bar-chart-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/11-stacked-area-chart/basic -stacked-area-chart.html [new file with mode: 0644]
charts/canvas/examples/11-stacked-area-chart/stacked-area-chart-with-shared-tooltip.html [new file with mode: 0644]
charts/canvas/examples/12-scatter-chart/basic-scatter-chart.html [new file with mode: 0644]
charts/canvas/examples/12-scatter-chart/multi-series-scatter-chart.html [new file with mode: 0644]
charts/canvas/examples/13-candlestick-chart/basic-candle-stick-chart.html [new file with mode: 0644]
charts/canvas/examples/13-candlestick-chart/candle-stick-chart-with-rising-color-and-tooltip-customization.html [new file with mode: 0644]
charts/canvas/examples/14-ohlc(stock)-chart/basic-ohlc-chart.html [new file with mode: 0644]
charts/canvas/examples/14-ohlc(stock)-chart/ohlc-chart-with-tooltip-customization.html [new file with mode: 0644]
charts/canvas/examples/15-step-line-chart/basic-step-line-chart.html [new file with mode: 0644]
charts/canvas/examples/15-step-line-chart/multi-series-step-line-chart.html [new file with mode: 0644]
charts/canvas/examples/16-step-area-chart/basic-step-area-chart.html [new file with mode: 0644]
charts/canvas/examples/17-spline-area-chart/basic-spline-area-chart.html [new file with mode: 0644]
charts/canvas/examples/17-spline-area-chart/spline-area-chart-with-stripline.html [new file with mode: 0644]
charts/canvas/examples/18-range-bar-chart/basic-range-bar-chart.html [new file with mode: 0644]
charts/canvas/examples/18-range-bar-chart/range-bar-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/19-range-column-chart/basic-range-column-chart.html [new file with mode: 0644]
charts/canvas/examples/19-range-column-chart/range-column-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/20-range-area-chart/basic-range-area-chart.html [new file with mode: 0644]
charts/canvas/examples/20-range-area-chart/range-area-with-null-data.html [new file with mode: 0644]
charts/canvas/examples/21-range-spline-area-chart/basic-range-spline-area_-chart.html [new file with mode: 0644]
charts/canvas/examples/21-range-spline-area-chart/range-spline-area-with-line-chart.html [new file with mode: 0644]
charts/canvas/examples/22-stacked-area-100-chart/basic-stacked-area-100-chart.html [new file with mode: 0644]
charts/canvas/examples/22-stacked-area-100-chart/stacked-area-100-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/23-stacked-bar-100-chart/basic-stacked-bar-100-chart.html [new file with mode: 0644]
charts/canvas/examples/23-stacked-bar-100-chart/stacked-bar-100-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/24-stacked-column-100-chart/basic-stacked-column-100-chart.html [new file with mode: 0644]
charts/canvas/examples/24-stacked-column-100-chart/stacked-column-100-with-index-label.html [new file with mode: 0644]
charts/canvas/examples/25 -jquery-plugin/basic-jquery-line-chart.html [new file with mode: 0644]
charts/canvas/examples/25 -jquery-plugin/multiple-charts-in-one-page.html [new file with mode: 0644]
charts/canvas/examples/26-some-common-options-across-all-chart-types/chart-with-animation.html [new file with mode: 0644]
charts/canvas/examples/26-some-common-options-across-all-chart-types/combination-charts.html [new file with mode: 0644]
charts/canvas/examples/26-some-common-options-across-all-chart-types/culture.html [new file with mode: 0644]
charts/canvas/examples/26-some-common-options-across-all-chart-types/export-chart.html [new file with mode: 0644]
charts/canvas/examples/26-some-common-options-across-all-chart-types/hide-and-unhide-data-series-from-legend.html [new file with mode: 0644]
charts/canvas/instruction.txt [new file with mode: 0644]
charts/canvas/jquery.canvasjs.min.js [new file with mode: 0644]
charts/canvas/license.txt [new file with mode: 0644]
css/power.css [new file with mode: 0644]
footer.html [new file with mode: 0644]
header.html [new file with mode: 0644]
index.php [new file with mode: 0644]
js/jquery-1.7.2.js [new file with mode: 0644]
js/jquery-3.1.1.js [new file with mode: 0644]
js/jquery.sparkline.js [new file with mode: 0644]
json.php [new file with mode: 0644]
power.php [new file with mode: 0644]
power.sql [new file with mode: 0644]

diff --git a/charts/canvas/breaker-live-broken.php b/charts/canvas/breaker-live-broken.php
new file mode 100644 (file)
index 0000000..096591c
--- /dev/null
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML>
+<html>
+
+<head>
+       <script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
+       <script type="text/javascript">
+       window.onload = function () {
+
+               var dps = []; // dataPoints
+
+               var chart = new CanvasJS.Chart("chartContainer",{
+                       title :{
+                               text: "Live Power <?php echo $_GET['id'];?>"
+                       },                      
+                       axisX:{
+                               valueFormatString: " ",
+                       },
+                       data: [{
+                               type: "line",
+                               dataPoints: dps 
+                       }]
+               });
+
+               var xVal = 0;
+               var yVal = 20;  
+               var updateInterval = 5000;
+               var dataLength = 60; // number of dataPoints visible at any point
+
+               var updateChart = function (count) {
+
+                       $.getJSON('http://192.168.5.205:8000/power.php?id=<?php echo $_GET['id'];?>', function(data) {
+                               for (var key in data) {
+                                       //console.log(data[key].amps);
+                                       var time = parseInt(data[key].time);
+                                       var amps = parseFloat(data[key].amps);
+                                       console.log(amps);
+                                       //time =10;
+                                       //amps = 10;
+                                       dps.push({
+                                               x: time,
+                                               y: amps
+                                       });
+                               }
+                       });
+
+                       //count = count || 1;
+                       // count is number of times loop runs to generate random dataPoints.
+                       
+                       //for (var j = 0; j < count; j++) {     
+                       //      yVal = yVal +  Math.round(5 + Math.random() *(-5-5));
+                       //      dps.push({
+                       //              x: xVal,
+                       //              y: yVal
+                       //      });
+                       //      xVal++;
+                       //};
+                       
+                       //if (dps.length > dataLength)
+                       //{
+                       //      dps.shift();                            
+                       //}
+                       chart.render();         
+
+               };
+
+               // generates first set of dataPoints
+               updateChart(dataLength); 
+
+               // update chart after specified time. 
+               setInterval(function(){updateChart()}, updateInterval); 
+
+       }
+       </script>
+       <script type="text/javascript" src="canvasjs.min.js"></script>
+</head>
+<body>
+       <div id="chartContainer" style="height: 300px; width:100%;">
+       </div>
+</body>
+</html>
diff --git a/charts/canvas/breaker.php b/charts/canvas/breaker.php
new file mode 100644 (file)
index 0000000..6b60014
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML>
+<html>
+
+<head>
+       <script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
+       <script type="text/javascript">
+       window.onload = function () {
+
+               var dps = []; // dataPoints
+
+               var chart = new CanvasJS.Chart("chartContainer",{
+                       title :{
+                               text: "Usage of <?php echo $_GET['id'];?> since <?php echo date('r', $_GET['t']);?>"
+                       },                      
+                       axisX:{
+                               valueFormatString: " ",
+                       },
+                       data: [{
+                               type: "line",
+                               dataPoints: dps 
+                       }]
+               });
+
+               var xVal = 0;
+               var yVal = 20;  
+               var updateInterval = 5000;
+               var dataLength = 60; // number of dataPoints visible at any point
+
+               var updateChart = function (count) {
+
+                       $.getJSON('http://192.168.5.205:8000/power.php?id=<?php echo $_GET['id'];?>&t=<?php echo $_GET['t'];?>', function(data) {
+                               for (var key in data) {
+                                       //console.log(data[key].amps);
+                                       var time = parseInt(data[key].time);
+                                       var amps = parseFloat(data[key].amps); // was data[key].amps
+                                       //console.log(amps);
+                                       //time =10;
+                                       //amps = 10;
+                                       dps.push({
+                                               x: time,
+                                               y: amps
+                                       });
+                               }
+                               chart.render();
+                       });
+
+                       //count = count || 1;
+                       // count is number of times loop runs to generate random dataPoints.
+                       
+                       //for (var j = 0; j < count; j++) {     
+                       //      yVal = yVal +  Math.round(5 + Math.random() *(-5-5));
+                       //      dps.push({
+                       //              x: xVal,
+                       //              y: yVal
+                       //      });
+                       //      xVal++;
+                       //};
+                       
+                       //if (dps.length > dataLength)
+                       //{
+                       //      dps.shift();                            
+                       //}
+                       //chart.render();               
+
+               };
+
+               // generates first set of dataPoints
+               updateChart(dataLength); 
+
+               // update chart after specified time. 
+               //setInterval(function(){updateChart()}, updateInterval); 
+
+       }
+       </script>
+       <script type="text/javascript" src="canvasjs.min.js"></script>
+</head>
+<body>
+       <div id="chartContainer" style="height: 300px; width:100%;">
+       </div>
+</body>
+</html>
diff --git a/charts/canvas/canvasjs.min.js b/charts/canvas/canvasjs.min.js
new file mode 100644 (file)
index 0000000..1cd5a8c
--- /dev/null
@@ -0,0 +1,648 @@
+/*
+ CanvasJS HTML5 & JavaScript Charts - v1.9.8 GA - http://canvasjs.com/ 
+ Copyright 2017 fenopix
+
+  --------------------- License Information --------------------
+ CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
+     http://canvasjs.com/license-canvasjs/
+
+*/
+(function(){function U(a,d){a.prototype=Pa(d.prototype);a.prototype.constructor=a;a.base=d.prototype}function Pa(a){function d(){}d.prototype=a;return new d}function Ha(a,d,b){"millisecond"===b?a.setMilliseconds(a.getMilliseconds()+1*d):"second"===b?a.setSeconds(a.getSeconds()+1*d):"minute"===b?a.setMinutes(a.getMinutes()+1*d):"hour"===b?a.setHours(a.getHours()+1*d):"day"===b?a.setDate(a.getDate()+1*d):"week"===b?a.setDate(a.getDate()+7*d):"month"===b?a.setMonth(a.getMonth()+1*d):"year"===b&&a.setFullYear(a.getFullYear()+
+1*d);return a}function O(a,d){var b=!1;0>a&&(b=!0,a*=-1);a=""+a;for(d=d?d:1;a.length<d;)a="0"+a;return b?"-"+a:a}function ka(a){if(!a)return a;a=a.replace(/^\s\s*/,"");for(var d=/\s/,b=a.length;d.test(a.charAt(--b)););return a.slice(0,b+1)}function Qa(a){a.roundRect=function(a,b,c,f,g,h,l,k){l&&(this.fillStyle=l);k&&(this.strokeStyle=k);"undefined"===typeof g&&(g=5);this.lineWidth=h;this.beginPath();this.moveTo(a+g,b);this.lineTo(a+c-g,b);this.quadraticCurveTo(a+c,b,a+c,b+g);this.lineTo(a+c,b+f-g);
+this.quadraticCurveTo(a+c,b+f,a+c-g,b+f);this.lineTo(a+g,b+f);this.quadraticCurveTo(a,b+f,a,b+f-g);this.lineTo(a,b+g);this.quadraticCurveTo(a,b,a+g,b);this.closePath();l&&this.fill();k&&0<h&&this.stroke()}}function ya(a,d){return a-d}function Ia(a,d){return a.x-d.x}function G(a){var d=((a&16711680)>>16).toString(16),b=((a&65280)>>8).toString(16);a=((a&255)>>0).toString(16);d=2>d.length?"0"+d:d;b=2>b.length?"0"+b:b;a=2>a.length?"0"+a:a;return"#"+d+b+a}function Ra(a,d){var b=this.length>>>0,c=Number(d)||
+0,c=0>c?Math.ceil(c):Math.floor(c);for(0>c&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}function x(a){return null===a||"undefined"===typeof a}function qa(a){a.indexOf||(a.indexOf=Ra);return a}function Ja(a,d,b){b=b||"normal";var c=a+"_"+d+"_"+b,f=Ka[c];if(isNaN(f)){try{a="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+a+"; font-size:"+d+"px; font-weight:"+b+";";if(!ba){var g=document.body;ba=document.createElement("span");
+ba.innerHTML="";var h=document.createTextNode("Mpgyi");ba.appendChild(h);g.appendChild(ba)}ba.style.display="";ba.setAttribute("style",a);f=Math.round(ba.offsetHeight);ba.style.display="none"}catch(l){f=Math.ceil(1.1*d)}f=Math.max(f,d);Ka[c]=f}return f}function I(a,d){var b=[];if(b={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[a||"solid"])for(var c=
+0;c<b.length;c++)b[c]*=d;else b=[];return b}function K(a,d,b,c){if(a.addEventListener)a.addEventListener(d,b,c||!1);else if(a.attachEvent)a.attachEvent("on"+d,function(c){c=c||window.event;c.preventDefault=c.preventDefault||function(){c.returnValue=!1};c.stopPropagation=c.stopPropagation||function(){c.cancelBubble=!0};b.call(a,c)});else return!1}function La(a,d,b){a*=Q;d*=Q;a=b.getImageData(a,d,2,2).data;d=!0;for(b=0;4>b;b++)if(a[b]!==a[b+4]|a[b]!==a[b+8]|a[b]!==a[b+12]){d=!1;break}return d?a[0]<<
+16|a[1]<<8|a[2]:0}function L(a,d,b){return a in d?d[a]:b[a]}function ra(a,d,b){if(u&&Ma){var c=a.getContext("2d");sa=c.webkitBackingStorePixelRatio||c.mozBackingStorePixelRatio||c.msBackingStorePixelRatio||c.oBackingStorePixelRatio||c.backingStorePixelRatio||1;Q=za/sa;a.width=d*Q;a.height=b*Q;za!==sa&&(a.style.width=d+"px",a.style.height=b+"px",c.scale(Q,Q))}else a.width=d,a.height=b}function Sa(a){if(!Aa){var d=!1,b=!1;"undefined"===typeof ca.Chart.creditHref?(a.creditHref="http://canvasjs.com/",
+a.creditText=""):(d=a.updateOption("creditText"),b=a.updateOption("creditHref"));if(a.creditHref&&a.creditText){a._creditLink||(a._creditLink=document.createElement("a"),a._creditLink.setAttribute("class","canvasjs-chart-credit"),a._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:2px;top:"+(a.height-14)+"px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),a._creditLink.setAttribute("tabIndex",
+-1),a._creditLink.setAttribute("target","_blank"));if(0===a.renderCount||d||b)a._creditLink.setAttribute("href",a.creditHref),a._creditLink.innerHTML=a.creditText;a._creditLink&&a.creditHref&&a.creditText?(a._creditLink.parentElement||a._canvasJSContainer.appendChild(a._creditLink),a._creditLink.style.top=a.height-14+"px"):a._creditLink.parentElement&&a._canvasJSContainer.removeChild(a._creditLink)}}}function ga(a,d){var b=document.createElement("canvas");b.setAttribute("class","canvasjs-chart-canvas");
+ra(b,a,d);u||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(b);return b}function Ba(a,d,b){if(a&&d&&b){b=b+"."+d;var c="image/"+d;a=a.toDataURL(c);var f=!1,g=document.createElement("a");g.download=b;g.href=a;g.target="_blank";if("undefined"!==typeof Blob&&new Blob){for(var h=a.replace(/^data:[a-z/]*;base64,/,""),h=atob(h),l=new ArrayBuffer(h.length),l=new Uint8Array(l),k=0;k<h.length;k++)l[k]=h.charCodeAt(k);d=new Blob([l.buffer],{type:"image/"+d});try{window.navigator.msSaveBlob(d,
+b),f=!0}catch(m){g.dataset.downloadurl=[c,g.download,g.href].join(":"),g.href=window.URL.createObjectURL(d)}}if(!f)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(n){d=window.open(),d.document.write("<img src='"+a+"'></img><div>Please right click on the image and save it to your device</div>"),d.document.close()}}}function T(a,d,b){d.getAttribute("state")!==
+b&&(d.setAttribute("state",b),d.setAttribute("type","button"),d.style.position="relative",d.style.margin="0px 0px 0px 0px",d.style.padding="3px 4px 0px 4px",d.style.cssFloat="left",d.setAttribute("title",a._cultureInfo[b+"Text"]),d.innerHTML="<img style='height:16px;' src='"+Ta[b].image+"' alt='"+a._cultureInfo[b+"Text"]+"' />")}function ta(){for(var a=null,d=0;d<arguments.length;d++)a=arguments[d],a.style&&(a.style.display="inline")}function Y(){for(var a=null,d=0;d<arguments.length;d++)(a=arguments[d])&&
+a.style&&(a.style.display="none")}function M(a,d,b,c){this._defaultsKey=a;this.parent=c;this._eventListeners=[];c={};b&&(ia[b]&&ia[b][a])&&(c=ia[b][a]);this.options=d?d:{_isPlaceholder:!0};this.setOptions(this.options,c)}function A(a,d){d=d||{};A.base.constructor.call(this,"Chart",d,d.theme?d.theme:"theme1");var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=
+!1;this.renderCount=0;this.panEnabled=this.disableToolTip=this.animatedRender=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];if(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId){this.container.innerHTML="";var c=0,f=0,c=this.options.width?this.width:0<this.container.clientWidth?this.container.clientWidth:this.width,f=this.options.height?this.height:
+0<this.container.clientHeight?this.container.clientHeight:this.height;this.width=c;this.height=f;this.x1=this.y1=0;this.x2=this.width;this.y2=this.height;this._selectedColorSet="undefined"!==typeof ha[this.colorSet]?ha[this.colorSet]:ha.colorSet1;this._canvasJSContainer=document.createElement("div");this._canvasJSContainer.setAttribute("class","canvasjs-chart-container");this._canvasJSContainer.style.position="relative";this._canvasJSContainer.style.textAlign="left";this._canvasJSContainer.style.cursor=
+"auto";u||(this._canvasJSContainer.style.height="0px");this.container.appendChild(this._canvasJSContainer);this.canvas=ga(c,f);this.canvas.style.position="absolute";this.canvas.getContext&&(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Qa(this.ctx),u?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=ga(c,f),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),
+this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this.overlaidCanvas=ga(c,f),this.overlaidCanvas.style.position="absolute",this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",this._eventManager=new la(this),K(window,"resize",function(){b._updateSize()&&b.render()}),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),this._toolBar.style.cssText=
+"position: absolute; right: 1px; top: 1px;",this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},K(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);Y(b._dropdownMenu)}),K(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)}),
+K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)}),this.toolTip=
+new S(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})}else window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function ua(a,d){for(var b=[],c,f=0;f<a.length;f++)if(0==f)b.push(a[0]);else{var g,h,l;l=f-1;g=0===l?0:l-1;h=l===a.length-1?l:l+1;c=Math.abs((a[h].x-a[g].x)/(0===a[h].x-a[l].x?0.01:a[h].x-a[l].x))*(d-1)/2+1;var k=
+(a[h].x-a[g].x)/c;c=(a[h].y-a[g].y)/c;b[b.length]=a[l].x>a[g].x&&0<k||a[l].x<a[g].x&&0>k?{x:a[l].x+k/3,y:a[l].y+c/3}:{x:a[l].x,y:a[l].y+c/9};l=f;g=0===l?0:l-1;h=l===a.length-1?l:l+1;c=Math.abs((a[h].x-a[g].x)/(0===a[l].x-a[g].x?0.01:a[l].x-a[g].x))*(d-1)/2+1;k=(a[h].x-a[g].x)/c;c=(a[h].y-a[g].y)/c;b[b.length]=a[l].x>a[g].x&&0<k||a[l].x<a[g].x&&0>k?{x:a[l].x-k/3,y:a[l].y-c/3}:{x:a[l].x,y:a[l].y-c/9};b[b.length]=a[f]}return b}function Na(a,d){if(null===a||"undefined"===typeof a)return d;var b=parseFloat(a.toString())*
+(0<=a.toString().indexOf("%")?d/100:1);return!isNaN(b)&&b<=d&&0<=b?b:d}function ja(a,d,b,c,f){"undefined"===typeof f&&(f=0);this._padding=f;this._x1=a;this._y1=d;this._x2=b;this._y2=c;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function W(a,d){W.base.constructor.call(this,"TextBlock",d);this.ctx=a;this._isDirty=!0;this._wrappedText=null}function ma(a,d){ma.base.constructor.call(this,"Title",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;
+this.optionsName="title";if(x(this.options.margin)&&a.options.subtitles)for(var b=a.options.subtitles,c=0;c<b.length;c++)if((x(b[c].horizontalAlign)&&"center"===this.horizontalAlign||b[c].horizontalAlign===this.horizontalAlign)&&(x(b[c].verticalAlign)&&"top"===this.verticalAlign||b[c].verticalAlign===this.verticalAlign)&&!b[c].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=
+this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function va(a,d){va.base.constructor.call(this,"Subtitle",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function wa(a,d){wa.base.constructor.call(this,"Legend",d,a.theme,a);this.chart=
+a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=Ja(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function Ca(a,d){Ca.base.constructor.call(this,d);
+this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx}function $(a,d,b,c){$.base.constructor.call(this,"DataSeries",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=b;this.noDataPointsInPlotArea=0;this.id=c;this.chart._eventManager.objectMap[c]={id:c,objectType:"dataSeries",dataSeriesIndex:b};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=
+0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function B(a,d,b,c,f){B.base.constructor.call(this,"Axis",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,
+viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===b?("left"===c||"bottom"===c?(this.optionsName="axisX",x(this.chart.sessionVariables.axisX[f])&&(this.chart.sessionVariables.axisX[f]={}),this.sessionVariables=this.chart.sessionVariables.axisX[f]):(this.optionsName="axisX2",x(this.chart.sessionVariables.axisX2[f])&&(this.chart.sessionVariables.axisX2[f]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[f]),this.options.interval||(this.intervalType=
+null),"theme2"===this.chart.theme&&x(this.options.lineThickness)&&(this.lineThickness=2)):"left"===c||"top"===c?(this.optionsName="axisY",x(this.chart.sessionVariables.axisY[f])&&(this.chart.sessionVariables.axisY[f]={}),this.sessionVariables=this.chart.sessionVariables.axisY[f]):(this.optionsName="axisY2",x(this.chart.sessionVariables.axisY2[f])&&(this.chart.sessionVariables.axisY2[f]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[f]);"undefined"===typeof this.options.titleFontSize&&
+(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=b;"axisX"!==b||d&&"undefined"!==typeof d.gridThickness||(this.gridThickness=0);this._position=c;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&
+(this.labelAngle-=360);if(this.options.stripLines&&0<this.options.stripLines.length)for(this.stripLines=[],d=0;d<this.options.stripLines.length;d++)this.stripLines.push(new na(this.chart,this.options.stripLines[d],a.theme,++this.chart._eventManager.lastObjectId,this));this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||
+null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=
+this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum")}function na(a,d,b,c,f){na.base.constructor.call(this,"StripLine",d,b,f);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=f;
+this.optionsName="stripLines";this.isOptionsInArray=!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=f.logarithmic?Math.sqrt((this.startValue.getTime?this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this.thickness=f.logarithmic?Math.log(this.endValue/this.startValue)/Math.log(f.logarithmBase):
+Math.max(this.endValue-this.startValue),this._thicknessType="value")}function S(a,d){S.base.constructor.call(this,"ToolTip",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._timerId=0;this._prevY=this._prevX=NaN;this.optionsName="toolTip";this._initialize()}function la(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=
+ga(this.chart.width,this.chart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function oa(a){var d;a&&pa[a]&&(d=pa[a]);oa.base.constructor.call(this,"CultureInfo",d)}function Da(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}var z={},u=!!document.createElement("canvas").getContext,ca={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"theme1",animationEnabled:!1,animationDuration:1200,
+dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditText:"",interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",
+horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:u?"transparent":null,margin:5,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,
+borderColor:"black",cornerRadius:0,backgroundColor:null,margin:2,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Legend:{name:null,verticalAlign:"center",horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",cursor:null,itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null,dockInsidePlotArea:!1,reversed:!1,backgroundColor:u?"transparent":null,borderColor:u?
+"transparent":null,borderThickness:0,cornerRadius:0,maxWidth:null,maxHeight:null,markerMargin:null,itemMaxWidth:null,itemWidth:null,itemWrap:!0,itemTextFormatter:null,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},ToolTip:{enabled:!0,shared:!1,animationEnabled:!0,content:null,contentFormatter:null,reversed:!1,backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",borderColor:null,borderThickness:2,cornerRadius:5,fontSize:14,fontColor:"black",fontFamily:"Calibri, Arial, Georgia, serif;",
+fontWeight:"normal",fontStyle:"italic",publicProperties:{options:"readWrite",chart:"readOnly"}},Axis:{minimum:null,maximum:null,viewportMinimum:null,viewportMaximum:null,interval:null,intervalType:null,reversed:!1,logarithmic:!1,logarithmBase:10,title:null,titleFontColor:"black",titleFontSize:20,titleFontFamily:"arial",titleFontWeight:"normal",titleFontStyle:"normal",titleWrap:!0,titleMaxWidth:null,titleBackgroundColor:u?"transparent":null,titleBorderColor:u?"transparent":null,titleBorderThickness:0,
+titleCornerRadius:0,labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!0,labelWrap:!0,labelMaxWidth:null,labelFormatter:null,labelBackgroundColor:u?"transparent":null,labelBorderColor:u?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,prefix:"",suffix:"",includeZero:!0,tickLength:5,tickColor:"black",tickThickness:1,lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"A0A0A0",gridThickness:0,
+gridDashType:"solid",interlacedColor:u?"transparent":null,valueFormatString:null,margin:2,stripLines:[],publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},StripLine:{value:null,startValue:null,endValue:null,color:"orange",opacity:null,thickness:2,lineDashType:"solid",label:"",labelPlacement:"inside",labelAlign:"far",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:u?"transparent":null,labelBorderColor:u?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:"arial",
+labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,showOnTop:!1,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,highlightEnabled:!0,cursor:"default",indexLabel:"",indexLabelPlacement:"auto",indexLabelOrientation:"horizontal",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",
+indexLabelBackgroundColor:null,indexLabelLineColor:"gray",indexLabelLineThickness:1,indexLabelLineDashType:"solid",indexLabelMaxWidth:null,indexLabelWrap:!0,indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1,nullDataLineDashType:"dash",color:null,lineColor:null,risingColor:"white",fillOpacity:null,startAngle:0,radius:null,innerRadius:null,type:"column",xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,xValueFormatString:null,yValueFormatString:null,
+zValueFormatString:null,percentFormatString:null,showInLegend:null,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:u?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:u?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,
+y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},pa={en:{}},ha={colorSet1:"#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "),colorSet2:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},
+ia={theme1:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Subtitle:{fontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",fontSize:16,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Axis:{titleFontSize:26,titleFontColor:"#666666",titleFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",
+labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,labelFontColor:"grey",tickColor:"#BBBBBB",tickThickness:2,gridThickness:2,gridColor:"#BBBBBB",lineThickness:2,lineColor:"#BBBBBB"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineThickness:1}},
+theme2:{Chart:{colorSet:"colorSet2"},Title:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:32,fontColor:"#333333",verticalAlign:"top",margin:5},Subtitle:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:14,fontColor:"#333333",verticalAlign:"top",margin:5},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"monospace, sans-serif,arial black":"arial",titleFontWeight:"bold",labelFontFamily:u?"monospace, Courier New, Courier":"arial",labelFontSize:16,
+labelFontColor:"grey",labelFontWeight:"bold",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineColor:"grey",lineThickness:0},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"arial"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Courier New, Courier, monospace":"arial",indexLabelFontWeight:"bold",indexLabelFontSize:18,indexLabelLineThickness:1}},theme3:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:u?"Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":
+"calibri",fontSize:32,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Subtitle:{fontFamily:u?"Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":"calibri",fontSize:16,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"Verdana, Geneva, Calibri, sans-serif":"calibri",labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,
+labelFontColor:"grey",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineThickness:2,lineColor:"grey"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},DataSeries:{bevelEnabled:!0,indexLabelFontColor:"grey",indexLabelFontFamily:u?"Candara, Optima, Calibri, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineColor:"lightgrey",indexLabelLineThickness:2}}},E={numberDuration:1,yearDuration:314496E5,
+monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")},Ka={},ba=null,Ea=function(){var a=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),b="Sun Mon Tue Wed Thu Fri Sat".split(" "),c="January February March April May June July August September October November December".split(" "),
+f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,h=/[^-+\dA-Z]/g;return function(l,k,m){var n=m?m.days:d,p=m?m.months:c,e=m?m.shortDays:b,r=m?m.shortMonths:f;m="";var q=!1;l=l&&l.getTime?l:l?new Date(l):new Date;if(isNaN(l))throw SyntaxError("invalid date");"UTC:"===k.slice(0,4)&&(k=k.slice(4),q=!0);m=q?"getUTC":"get";var s=l[m+"Date"](),v=l[m+"Day"](),
+w=l[m+"Month"](),y=l[m+"FullYear"](),t=l[m+"Hours"](),u=l[m+"Minutes"](),Z=l[m+"Seconds"](),aa=l[m+"Milliseconds"](),x=q?0:l.getTimezoneOffset();return m=k.replace(a,function(a){switch(a){case "D":return s;case "DD":return O(s,2);case "DDD":return e[v];case "DDDD":return n[v];case "M":return w+1;case "MM":return O(w+1,2);case "MMM":return r[w];case "MMMM":return p[w];case "Y":return parseInt(String(y).slice(-2));case "YY":return O(String(y).slice(-2),2);case "YYY":return O(String(y).slice(-3),3);
+case "YYYY":return O(y,4);case "h":return t%12||12;case "hh":return O(t%12||12,2);case "H":return t;case "HH":return O(t,2);case "m":return u;case "mm":return O(u,2);case "s":return Z;case "ss":return O(Z,2);case "f":return String(aa).slice(0,1);case "ff":return O(String(aa).slice(0,2),2);case "fff":return O(String(aa).slice(0,3),3);case "t":return 12>t?"a":"p";case "tt":return 12>t?"am":"pm";case "T":return 12>t?"A":"P";case "TT":return 12>t?"AM":"PM";case "K":return q?"UTC":(String(l).match(g)||
+[""]).pop().replace(h,"");case "z":return(0<x?"-":"+")+Math.floor(Math.abs(x)/60);case "zz":return(0<x?"-":"+")+O(Math.floor(Math.abs(x)/60),2);case "zzz":return(0<x?"-":"+")+O(Math.floor(Math.abs(x)/60),2)+O(Math.abs(x)%60,2);default:return a.slice(1,a.length-1)}})}}(),da=function(a,d,b){if(null===a)return"";a=Number(a);var c=0>a?!0:!1;c&&(a*=-1);var f=b?b.decimalSeparator:".",g=b?b.digitGroupSeparator:",",h="";d=String(d);var h=1,l=b="",k=-1,m=[],n=[],p=0,e=0,r=0,q=!1,s=0,l=d.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);
+d=null;for(var v=0;l&&v<l.length;v++)if(d=l[v],"."===d&&0>k)k=v;else{if("%"===d)h*=100;else if("\u2030"===d){h*=1E3;continue}else if(","===d[0]&&"."===d[d.length-1]){h/=Math.pow(1E3,d.length-1);k=v+d.length-1;continue}else"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-1]||(q=!0);0>k?(m.push(d),"#"===d||"0"===d?p++:","===d&&r++):(n.push(d),"#"!==d&&"0"!==d||e++)}q&&(d=Math.floor(a),l=-Math.floor(Math.log(a)/Math.LN10+1),s=0===a?0:0===d?-(p+l):String(d).length-p,h/=Math.pow(10,s));0>k&&(k=v);h=(a*h).toFixed(e);
+d=h.split(".");h=(d[0]+"").split("");a=(d[1]+"").split("");h&&"0"===h[0]&&h.shift();for(q=l=v=e=k=0;0<m.length;)if(d=m.pop(),"#"===d||"0"===d)if(k++,k===p){var w=h,h=[];if("0"===d)for(d=p-e-(w?w.length:0);0<d;)w.unshift("0"),d--;for(;0<w.length;)b=w.pop()+b,q++,0===q%l&&(v===r&&0<w.length)&&(b=g+b)}else 0<h.length?(b=h.pop()+b,e++,q++):"0"===d&&(b="0"+b,e++,q++),0===q%l&&(v===r&&0<h.length)&&(b=g+b);else"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-1]||!/[eE][+-]*[0]+/.test(d)?","===d?(v++,l=q,q=0,0<h.length&&
+(b=g+b)):b=1<d.length&&('"'===d[0]&&'"'===d[d.length-1]||"'"===d[0]&&"'"===d[d.length-1])?d.slice(1,d.length-1)+b:d+b:(d=0>s?d.replace("+","").replace("-",""):d.replace("-",""),b+=d.replace(/[0]+/,function(a){return O(s,a.length)}));g="";for(m=!1;0<n.length;)d=n.shift(),"#"===d||"0"===d?0<a.length&&0!==Number(a.join(""))?(g+=a.shift(),m=!0):"0"===d&&(g+="0",m=!0):1<d.length&&('"'===d[0]&&'"'===d[d.length-1]||"'"===d[0]&&"'"===d[d.length-1])?g+=d.slice(1,d.length-1):"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-
+1]||!/[eE][+-]*[0]+/.test(d)?g+=d:(d=0>s?d.replace("+","").replace("-",""):d.replace("-",""),g+=d.replace(/[0]+/,function(a){return O(s,a.length)}));b+=(m?f:"")+g;return c?"-"+b:b},xa=function(a){var d=0,b=0;a=a||window.event;a.offsetX||0===a.offsetX?(d=a.offsetX,b=a.offsetY):a.layerX||0==a.layerX?(d=a.layerX,b=a.layerY):(d=a.pageX-a.target.offsetLeft,b=a.pageY-a.target.offsetTop);return{x:d,y:b}},Ma=!0,za=window.devicePixelRatio||1,sa=1,Q=Ma?za/sa:1,Aa=window&&window.location&&window.location.href&&
+window.location.href.indexOf&&(-1!==window.location.href.indexOf("canvasjs.com")||-1!==window.location.href.indexOf("fiddle")),Ta={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAKRSURBVEiJrdY/iF1FFMfxzwnZrGISUSR/JLGIhoh/QiRNBLWxMLIWEkwbgiAoFgoW2mhlY6dgpY2IlRBRxBSKhSAKIklWJRYuMZKAhiyopAiaTY7FvRtmZ+/ed9/zHRjezLw5v/O9d86cuZGZpmURAfdn5o9DfdZNLXpjz+LziPgyIl6MiG0jPTJzZBuyDrP4BVm0P/AKbljTb4ToY/gGewYA7KyCl+1b3DUYANvwbiHw0gCAGRzBOzjTAXEOu0cC4Ch+r5x/HrpdrcZmvIDFSucMtnYCYC++6HmNDw8FKDT34ETrf639/azOr5vwRk/g5fbeuABtgC04XWk9VQLciMP4EH/3AFzErRNC7MXlQmsesSoHsGPE23hmEoBW+61K66HMXFmIMvN8myilXS36R01ub+KfYvw43ZXwYDX+AHP4BAci4pFJomfmr/ihmNofESsBImJGk7mlncrM45n5JPbhz0kAWpsv+juxaX21YIPmVJS2uNzJMS6ZNexC0d+I7fUWXLFyz2kSZlpWPvASlmqAf/FXNXf3FAF2F/1LuFifAlionB6dRuSI2IwHi6lzmXmp6xR8XY0fiIh7psAwh+3FuDkRHQVjl+a8lkXjo0kLUKH7XaV5oO86PmZ1FTzyP4K/XGl9v/zwfbW7BriiuETGCP5ch9bc9f97HF/vcFzCa5gdEPgWq+t/4v0V63oE1uF4h0DiFJ7HnSWMppDdh1dxtsPvJ2wcBNAKbsJXa0Ck5opdaBPsRNu/usba09i1KsaAVzmLt3sghrRjuK1Tf4xkegInxwy8gKf7dKMVH2QRsV5zXR/Cftyu+aKaKbbkQrsdH+PTzLzcqzkOQAVzM+7FHdiqqe2/YT4zF/t8S/sPmawyvC974vcAAAAASUVORK5CYII="},
+pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJVSURBVFiFvZe7a1RBGMV/x2hWI4JpfKCIiSBKOoOCkID/wP4BFqIIFkE02ChIiC8QDKlSiI3YqRBsBVGwUNAUdiIEUgjiAzQIIsuKJsfizsXr5t7d+8jmwLDfzHz3nLOzc7+ZxTZlGyDgZiWOCuJ9wH2gCUyuqQFgF/AGcKJNrYkBYBj40CIet+muGQi/96kM4WS7C/Tm5VUg7whJg8BkEGkCR4BDYfodsADUgP6wErO5iCtswsuJb32hdbXy8qzL5TIdmzJinHdZoZIBZcSFkGlAKs1Z3YCketZcBtouuaQNkrblMiBpBrhme7mAgU4wMCvpcFsDkq4C54DFVRTH9h+i6vlE0r5UA5ImgCuh28jB28iIs7BIVCOeStoZD64P4uPAjUTygKSx2FsK2TIwkugfk9Qkfd/E+yMWHQCeSRqx/R3gOp3LazfaS2C4B5gHDgD7U9x3E3uAH7KNpC3AHHAwTL4FHgM9GQ8vAaPA0dB/Abxqk2/gBLA9MXba9r1k/d4LfA3JtwueBeM58ucS+edXnAW23wP10N3advEi9CXizTnyN4bPS7Zn4sH/dq3t18AY4e1YLYSy3g/csj2VnFshZPuOpOeSKHCodUINuGj7YetE6je1PV9QoNPJ9StNHKodx7nRbiWrGHBGXAi5DUiqtQwtpcWK0Jubt8CltA5MEV1IfwO7+VffPwGfia5m34CT4bXujIIX0Qna1/cGMNqV/wUJE2czxD8CQ4X5Sl7Jz7SILwCDpbjKPBRMHAd+EtX4HWV5Spdc2w8kDQGPbH8py/MXMygM69/FKz4AAAAASUVORK5CYII="},
+zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAMqSURBVFiFvdfbj91TFMDxz57U6GUEMS1aYzyMtCSSDhWjCZMInpAI3khE/QHtgzdRkXgSCS8SES9epKLi0oRKNETjRahREq2KS1stdRujtDPtbA97n5zdn9+5zJxTK9k5v3POXmt991p7r71+IcaoGwkhTOIebMRqzOBTvIG3Y4zTXRmqSoyx5cAKbMJOHMFJnMZ8/jyFaXyMR7G6nb1aH22cP4BvcBxziG3GKfyTIR9D6BYg1KUghPBCDveFlb/24Av8iuUYw41YVsz5G7uxKcZ4aMEpwGt5NY3V/YbHsQ6rcAHOw/kYxigewr5CZw4fYGxBKcCLOFEYehXrMdRhr5yLETxVScsOLOkKAPfn1TYMPIvLFrShUlS2FDZm8XRHACzFAWl3R2xbqPMCYhmeLCAOYEMngAczbcTvuHYxzguIy/FesR9e6gSwU/OoPYHBHgHgviIKX2Flq7k34KhmcVnbi/PC8JX4MgMcxb118wZwdz5aISscqx7VRcox7MrPQ7i+btIAJrAkf9+bI9EPmZY2IAxiTSuAldLq4Y9+AcSUh78KP0tbAcwU35cXMD1JCIFUoGiehlqAz6TNB1f1C0DK+0h+nsNPrQC2a4bqGmlD9kOGcWt+Po6pVgDvSxfJaSkFd4UQBvoAsBYbCoB3a2flM7slA0R8iyt6rAFDeDPbm8eOTpVwGD9qVq7nLbIaZnmksPU1JtsCZMXNmpdRxFasWITzh6Xj3LCzra1OxcD2QjHiGVzdpfORnMqZio2PcF23ABdJF1Np4BPptlyPi6WzPYBzpJZtHe7A6xW9cnyP8TqA//SEIYRL8Bxul7rihvwgtVn78WcGGZXa9HGd5TDujDHuOePXNiHdKjWgZX/YbsxLx/ktqbjVzTlcjUSnvI5JrdlUVp6WesZZ6R1hRrpq9+EVTGS9jTjYAuKIouGpbcurEkIYxC051KNSamazsc+xK8b4S0VnEi/j0hqTP+M27O258egQwZuzs7pI7Mf4WQXIEDc5s9sux+5+1Py2EmP8UOq6GvWhIScxfdYjUERiAt9Jd84J6a16zf8JEKT3yCm8g1UxRv8CC4pyRhzR1uUAAAAASUVORK5CYII="},
+menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC"}};(function(){z.fSDec=function(a){for(var d="",b=0;b<a.length;b++)d+=String.fromCharCode(a[b]-111);return d};
+
+z.str={tv:[
+],fntStr:[223,231,143,178,208,219,216,209,225,216,155,143,187,228,210,216,211,208,143,182,225,208,221,211,212,155,143,187,228,210,216,211,208,143,194,208,221,226,143,196,221,216,210,222,211,212,155,143,176,225,216,208,219,155,143,226,208,221,226,156,226,212,225,216,213],tBl:[227,212,231,227,177,208,226,212,219,216,221,212],fnt:[213,222,221,227],fSy:[213,216,219,219,194,227,232,219,212],fTx:[213,216,219,219,195,212,231,227],gr:[214,225,212,232],ct:[210,227,231],tp:[227,222,223]};
+
+delete ca[z.fSDec([178,
+215,208,225,227])][z.fSDec([210,225,212,211,216,227,183,225,212,213])];z.pro={sCH:ca[z.fSDec([178,215,208,225,227])][z.fSDec([210,225,212,211,216,227,183,225,212,213])]};z.fAWm=function(a){if("undefined"===typeof z.pro.sCH&&!Aa){var d=a[z.fSDec(z.str.ct)];d[z.fSDec(z.str.tBl)]=z.fSDec(z.str.tp);d[z.fSDec(z.str.fnt)]=11+z.fSDec(z.str.fntStr);d[z.fSDec(z.str.fSy)]=z.fSDec(z.str.gr);d[z.fSDec(z.str.fTx)](z.fSDec(z.str.tv),2,a.height-11-2)}}})();(function(){z.ckDec=function(a){for(var d="",b=0;b<a.length;b++)d+=
+String.fromCharCode(a[b]-111);return d};z.str.ckn=[206,206,210,230,217,198,226,195,225];z.str.tem=[195,225,216,208,219,143,191,212,225,216,222,211,143,215,208,226,143,180,231,223,216,225,212,211,144];z.str.ctm=[191,219,212,208,226,212,143,210,222,221,227,208,210,227,143,226,208,219,212,226,175,210,208,221,229,208,226,217,226,157,210,222,220];z.str.ltm=[213,222,225,143,219,216,210,212,221,226,212,143,222,225,143,227,225,216,208,219,143,212,231,227,212,221,227,216,222,221];z.str.ckve=[212,231,223,216,
+225,212,226,172];z.str.mco=[225,214,209,208,151,161,164,164,155,161,164,164,155,161,164,164,155,159,157,164,152];z.str.mcw=[198,215,216,227,212];z.str.mct=[225,214,209,208,151,161,162,160,155,161,168,155,164,163,155,159,157,166,152];z.str.mcr=[193,212,211];z.fNg=function(a){if(!Aa)try{var d;a:{var b=RegExp(z.ckDec(z.str.ckn)+"=.*","gi"),c=new Date,f=document.cookie.match(b),g=localStorage&&localStorage.getItem("lclStg")&&JSON.parse(localStorage.getItem("lclStg")).name.match(z.ckDec(z.str.ckn))?JSON.parse(localStorage.getItem("lclStg")):
+null;if(f&&0<f.length||g){var h,b=[],l=[],k=null;if(f)for(var m=f[0].split("; "),f=0;f<m.length;f++)b.push(m[f].split("=")[0]),l.push(m[f].split("=")[1]);g&&(k=g);h={ckVal:Number(l[0]),lSVal:k?Number(k.val):null};g=null;h&&h.ckVal&&h.lSVal?g=Math.min(h.ckVal,h.lSVal):h&&h.ckVal?g=h.ckVal:h&&h.lSVal&&(g=h.lSVal);if(2592E6<Math.round(Math.abs(g-c.getTime()))){d=!0;break a}}else{l=new Date;k=l.getTime();l.setTime(k+31536E6);var n={name:z.ckDec(z.str.ckn),val:(new Date).getTime()};document.cookie=z.ckDec(z.str.ckn)+
+"="+(new Date).getTime()+"; "+z.ckDec(z.str.ckve)+l.toUTCString()+"; path=/;";localStorage.setItem("lclStg",JSON.stringify(n))}d=!1}if(d){d=20;var p=a.plotArea.ctx;p.font="bold "+d+(u?"px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif":"px Lucida Sans Unicode");var e=z.ckDec(z.str.tem),r=p.measureText(e).width;p.fillStyle=u?z.ckDec(z.str.mco):z.ckDec(z.str.mcw);p.fillRect(a.plotArea.x2-r-8,a.plotArea.y2-2.5*d-8,r+4,2.5*d+8);p.fillStyle=u?z.ckDec(z.str.mct):z.ckDec(z.str.mcr);p.textBaseline=
+"top";p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-2.5*d-2);d=14;p.font=d+(u?"px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif":"px Lucida Sans Unicode");e=z.ckDec(z.str.ctm);r=p.measureText(e).width;p.fillStyle=u?z.ckDec(z.str.mct):z.ckDec(z.str.mcr);p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-2*d-4);e=z.ckDec(z.str.ltm);r=p.measureText(e).width;p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-d-4)}}catch(q){}}})();M.prototype.setOptions=function(a,d){if(ca[this._defaultsKey]){var b=
+ca[this._defaultsKey],c;for(c in b)"publicProperties"!==c&&b.hasOwnProperty(c)&&(this[c]=a&&c in a?a[c]:d&&c in d?d[c]:b[c])}};M.prototype.get=function(a){var d=ca[this._defaultsKey];if("options"===a)return this.options&&this.options._isPlaceholder?null:this.options;if(d.hasOwnProperty(a)||d.publicProperties&&d.publicProperties.hasOwnProperty(a))return this[a];window.console&&window.console.log('Property "'+a+"\" doesn't exist. Please check for typo.")};M.prototype.set=function(a,d,b){b="undefined"===
+typeof b?!0:b;var c=ca[this._defaultsKey];if("options"===a)this.createUserOptions(d);else if(c.hasOwnProperty(a)||c.publicProperties&&c.publicProperties.hasOwnProperty(a)&&"readWrite"===c.publicProperties[a])this.options._isPlaceholder&&this.createUserOptions(),this.options[a]=d;else{window.console&&(c.publicProperties&&c.publicProperties.hasOwnProperty(a)&&"readOnly"===c.publicProperties[a]?window.console.log('Property "'+a+'" is read-only.'):window.console.log('Property "'+a+"\" doesn't exist. Please check for typo."));
+return}b&&(chart=this.chart||this,chart.render())};M.prototype.addTo=function(a,d,b,c){c="undefined"===typeof c?!0:c;var f=ca[this._defaultsKey];f.hasOwnProperty(a)||f.publicProperties&&f.publicProperties.hasOwnProperty(a)&&"readWrite"===f.publicProperties[a]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[a]&&(this.options[a]=[]),a=this.options[a],b="undefined"===typeof b||null===b?a.length:b,a.splice(b,0,d),c&&(chart=this.chart||this,chart.render())):window.console&&
+(f.publicProperties&&f.publicProperties.hasOwnProperty(a)&&"readOnly"===f.publicProperties[a]?window.console.log('Property "'+a+'" is read-only.'):window.console.log('Property "'+a+"\" doesn't exist. Please check for typo."))};M.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder)if(this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var d=
+this.parent.options[this.optionsName],b=d.length;this.options._isPlaceholder||(qa(d),b=d.indexOf(this.options));this.options="undefined"===typeof a?{}:a;d[b]=this.options}else this.options="undefined"===typeof a?{}:a,a=this.parent.options,this.optionsName?d=this.optionsName:(d=this._defaultsKey)&&0!==d.length?(b=d.charAt(0).toLowerCase(),1<d.length&&(b=b.concat(d.slice(1))),d=b):d=void 0,a[d]=this.options};M.prototype.remove=function(a){a="undefined"===typeof a?!0:a;if(this.isOptionsInArray){var d=
+this.parent.options[this.optionsName];qa(d);var b=d.indexOf(this.options);0<=b&&d.splice(b,1)}else delete this.parent.options[this.optionsName];a&&(chart=this.chart||this,chart.render())};M.prototype.updateOption=function(a){var d=ca[this._defaultsKey],b=this.options.theme?this.options.theme:this.chart&&this.chart.options.theme?this.chart.options.theme:"theme1",c={},f=this[a];b&&(ia[b]&&ia[b][this._defaultsKey])&&(c=ia[b][this._defaultsKey]);a in d&&(f=a in this.options?this.options[a]:c&&a in c?
+c[a]:d[a]);if(f===this[a])return!1;this[a]=f;return!0};M.prototype.trackChanges=function(a){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[a]=this.options[a]};M.prototype.isBeingTracked=function(a){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[a]?!0:!1};M.prototype.hasOptionChanged=function(a){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[a]!==this.options[a]};M.prototype.addEventListener=
+function(a,d,b){a&&d&&(this._eventListeners[a]=this._eventListeners[a]||[],this._eventListeners[a].push({context:b||this,eventHandler:d}))};M.prototype.removeEventListener=function(a,d){if(a&&d&&this._eventListeners[a])for(var b=this._eventListeners[a],c=0;c<b.length;c++)if(b[c].eventHandler===d){b[c].splice(c,1);break}};M.prototype.removeAllEventListeners=function(){this._eventListeners=[]};M.prototype.dispatchEvent=function(a,d,b){if(a&&this._eventListeners[a]){d=d||{};for(var c=this._eventListeners[a],
+f=0;f<c.length;f++)c[f].eventHandler.call(c[f].context,d)}"function"===typeof this[a]&&this[a].call(b||this.chart,d)};U(A,M);A.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.updateOption("colorSet")&&(this._selectedColorSet="undefined"!==typeof ha[this.colorSet]?
+ha[this.colorSet]:ha.colorSet1);this.updateOption("backgroundColor");this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=new oa(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&u;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.options.zoomEnabled?
+(this._zoomButton||(Y(this._zoomButton=document.createElement("button")),T(this,this._zoomButton,"pan"),this._toolBar.appendChild(this._zoomButton),K(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,T(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,T(a,a._zoomButton,"pan"));a.render()})),this._resetButton||(Y(this._resetButton=document.createElement("button")),T(this,this._resetButton,"reset"),this._toolBar.appendChild(this._resetButton),K(this._resetButton,
+"click",function(){a.toolTip.hide();a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,T(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=
+null,a.sessionVariables.axisX2[b].newViewportMaximum=null;if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();Y(a._zoomButton,a._resetButton);a._dispatchRangeEvent("rangeChanging",
+"reset");a.render();a._dispatchRangeEvent("rangeChanged","reset")}),this.overlaidCanvas.style.cursor=a._defaultCursor),this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),ta(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))):this.panEnabled=this.zoomEnabled=!1;this._menuButton?this.exportEnabled?ta(this._menuButton):Y(this._menuButton):
+this.exportEnabled&&u&&(this._menuButton=document.createElement("button"),T(this,this._menuButton,"menu"),this._toolBar.appendChild(this._menuButton),K(this._menuButton,"click",function(){"none"!==a._dropdownMenu.style.display||a._dropDownCloseTime&&500>=(new Date).getTime()-a._dropDownCloseTime.getTime()||(a._dropdownMenu.style.display="block",a._menuButton.blur(),a._dropdownMenu.focus())},!0));if(!this._dropdownMenu&&this.exportEnabled&&u){this._dropdownMenu=document.createElement("div");this._dropdownMenu.setAttribute("tabindex",
+-1);this._dropdownMenu.style.cssText="position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;";a._dropdownMenu.style.display="none";this._toolBar.appendChild(this._dropdownMenu);K(this._dropdownMenu,
+"blur",function(){Y(a._dropdownMenu);a._dropDownCloseTime=new Date},!0);var d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";d.innerHTML=this._cultureInfo.printText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){a.print();Y(a._dropdownMenu)},!0);d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";
+d.innerHTML=this._cultureInfo.saveJPGText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){Ba(a.canvas,"jpeg",a.exportFileName);Y(a._dropdownMenu)},!0);d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";d.innerHTML=this._cultureInfo.savePNGText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor=
+"#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){Ba(a.canvas,"png",a.exportFileName);Y(a._dropdownMenu)},!0)}"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?T(a,a._zoomButton,"zoom"):T(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&T(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(var b in this.toolTip.options)this.toolTip.options.hasOwnProperty(b)&&
+this.toolTip.updateOption(b)};A.prototype._updateSize=function(){var a=0,d=0;this.options.width?a=this.width:this.width=a=0<this.container.clientWidth?this.container.clientWidth:this.width;this.options.height?d=this.height:this.height=d=0<this.container.clientHeight?this.container.clientHeight:this.height;return this.canvas.width!==a*Q||this.canvas.height!==d*Q?(ra(this.canvas,a,d),ra(this.overlaidCanvas,a,d),ra(this._eventManager.ghostCanvas,a,d),!0):!1};A.prototype._initialize=function(){this._animator?
+this._animator.cancelAllAnimations():this._animator=new Da(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.pieDoughnutClickHandler=null;this.animationRequestId&&this.cancelRequestAnimFrame.call(window,this.animationRequestId);this._updateOptions();this.animatedRender=u&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=
+[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,axisXValueType:null,plotTypes:[]};this.layoutManager=new ja(0,0,this.width,this.height,2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];var a=0;if(this.options.data)for(var d=0;d<this.options.data.length;d++)if(a++,!this.options.data[d].type||0<=A._supportedChartTypes.indexOf(this.options.data[d].type)){var b=new $(this,this.options.data[d],a-1,++this._eventManager.lastObjectId);
+null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this._selectedColorSet[b.index%this._selectedColorSet.length]],b.color=this._selectedColorSet[b.index%this._selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===b.type||"ohlc"===b.type?
+[this._selectedColorSet[0]]:this._selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(Ia):b.dataPoints.sort(Ia));this.data.push(b);var c=b.axisPlacement,f;"normal"===c?"xySwapped"===
+this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===c?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement=
+"xySwapped"):"none"==c&&("normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"));if(f&&window.console){window.console.log(f);return}}var g=this;this.addEventListener("dataAnimationIterationEnd",function(){z.fAWm&&z.fAWm(g);0!==g.axisX.length&&z.fNg&&z.fNg(g)});Sa(this);this._objectsInitialized=
+!0};A._supportedChartTypes=qa("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc rangeColumn rangeBar rangeArea rangeSplineArea pie doughnut funnel".split(" "));A.prototype.render=function(a){a&&(this.options=a);this._initialize();var d=[];for(a=0;a<this.data.length;a++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[a].axisYType||
+"primary"===this.data[a].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var b=0;b<this.options.axisY.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[b]=new B(this,this.options.axisY[b],"axisY","left",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[b]=new B(this,this.options.axisY[b],"axisY","bottom",b));this.data[a].axisY=this.axisY[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY.length?
+this.data[a].axisYIndex:0];this.axisY[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY.length?this.data[a].axisYIndex:0].dataSeries.push(this.data[a])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new B(this,this.options.axisY,"axisY","left",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new B(this,this.options.axisY,"axisY","bottom",0))),this.data[a].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[a]);
+if("secondary"===this.data[a].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(b=0;b<this.options.axisY2.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[b]=new B(this,this.options.axisY2[b],"axisY","right",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[b]=new B(this,this.options.axisY2[b],"axisY","top",b));this.data[a].axisY=this.axisY2[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY2.length?
+this.data[a].axisYIndex:0];this.axisY2[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY2.length?this.data[a].axisYIndex:0].dataSeries.push(this.data[a])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=new B(this,this.options.axisY2,"axisY","right",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new B(this,this.options.axisY2,"axisY","top",0))),this.data[a].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[a]);
+if(!this.data[a].axisXType||"primary"===this.data[a].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(b=0;b<this.options.axisX.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[b]=new B(this,this.options.axisX[b],"axisX","bottom",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[b]=new B(this,this.options.axisX[b],"axisX","left",b));this.data[a].axisX=this.axisX[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<
+this.axisX.length?this.data[a].axisXIndex:0];this.axisX[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX.length?this.data[a].axisXIndex:0].dataSeries.push(this.data[a])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[0]=new B(this,this.options.axisX,"axisX","bottom",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new B(this,this.options.axisX,"axisX","left",0))),this.data[a].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[a]);
+if("secondary"===this.data[a].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(b=0;b<this.options.axisX2.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[b]=new B(this,this.options.axisX2[b],"axisX","top",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[b]=new B(this,this.options.axisX2[b],"axisX","right",b));this.data[a].axisX=this.axisX2[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX2.length?
+this.data[a].axisXIndex:0];this.axisX2[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX2.length?this.data[a].axisXIndex:0].dataSeries.push(this.data[a])}else this.axisX2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new B(this,this.options.axisX2,"axisX","top",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=new B(this,this.options.axisX2,"axisX","right",0))),this.data[a].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[a])}if(this.axisY){for(b=
+1;b<this.axisY.length;b++)"undefined"===typeof this.axisY[b].options.gridThickness&&(this.axisY[b].gridThickness=0);for(b=0;b<this.axisY.length-1;b++)"undefined"===typeof this.axisY[b].options.margin&&(this.axisY[b].margin=10)}if(this.axisY2){for(b=1;b<this.axisY2.length;b++)"undefined"===typeof this.axisY2[b].options.gridThickness&&(this.axisY2[b].gridThickness=0);for(b=0;b<this.axisY2.length-1;b++)"undefined"===typeof this.axisY2[b].options.margin&&(this.axisY2[b].margin=10)}this.axisY&&0<this.axisY.length&&
+(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(b=0;b<this.axisX.length;b++)"undefined"===typeof this.axisX[b].options.gridThickness&&(this.axisX[b].gridThickness=0);if(this.axisX2)for(b=0;b<this.axisX2.length;b++)"undefined"===typeof this.axisX2[b].options.gridThickness&&
+(this.axisX2[b].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));b=!1;if(0<this._axes.length&&(this.zoomEnabled||this.panEnabled))for(a=0;a<this._axes.length;a++)if(null!==this._axes[a].viewportMinimum||null!==this._axes[a].viewportMaximum){b=
+!0;break}b?ta(this._zoomButton,this._resetButton):(Y(this._zoomButton,this._resetButton),this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));this._processData();this.options.title&&(this.title=new ma(this,this.options.title),this.title.dockInsidePlotArea?d.push(this.title):this.title.render());if(this.options.subtitles)for(this.subtitles=[],a=0;a<this.options.subtitles.length;a++)b=new va(this,this.options.subtitles[a]),this.subtitles.push(b),b.dockInsidePlotArea?d.push(b):b.render();
+this.legend=new wa(this,this.options.legend);for(a=0;a<this.data.length;a++)(this.data[a].showInLegend||"pie"===this.data[a].type||"doughnut"===this.data[a].type)&&this.legend.dataSeries.push(this.data[a]);this.legend.dockInsidePlotArea?d.push(this.legend):this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)B.setLayoutAndRender(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace());else if("none"===
+this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(a=0;a<d.length;a++)d[a].render();var c=[];if(this.animatedRender){var f=ga(this.width,this.height);f.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}for(a=0;a<this.plotInfo.plotTypes.length;a++)for(var d=this.plotInfo.plotTypes[a],g=0;g<d.plotUnits.length;g++){var h=d.plotUnits[g],l=null;h.targetCanvas=null;this.animatedRender&&(h.targetCanvas=ga(this.width,this.height),h.targetCanvasCtx=h.targetCanvas.getContext("2d"));
+"line"===h.type?l=this.renderLine(h):"stepLine"===h.type?l=this.renderStepLine(h):"spline"===h.type?l=this.renderSpline(h):"column"===h.type?l=this.renderColumn(h):"bar"===h.type?l=this.renderBar(h):"area"===h.type?l=this.renderArea(h):"stepArea"===h.type?l=this.renderStepArea(h):"splineArea"===h.type?l=this.renderSplineArea(h):"stackedColumn"===h.type?l=this.renderStackedColumn(h):"stackedColumn100"===h.type?l=this.renderStackedColumn100(h):"stackedBar"===h.type?l=this.renderStackedBar(h):"stackedBar100"===
+h.type?l=this.renderStackedBar100(h):"stackedArea"===h.type?l=this.renderStackedArea(h):"stackedArea100"===h.type?l=this.renderStackedArea100(h):"bubble"===h.type?l=l=this.renderBubble(h):"scatter"===h.type?l=this.renderScatter(h):"pie"===h.type?this.renderPie(h):"doughnut"===h.type?this.renderPie(h):"candlestick"===h.type?l=this.renderCandlestick(h):"ohlc"===h.type?l=this.renderCandlestick(h):"rangeColumn"===h.type?l=this.renderRangeColumn(h):"rangeBar"===h.type?l=this.renderRangeBar(h):"rangeArea"===
+h.type?l=this.renderRangeArea(h):"rangeSplineArea"===h.type&&(l=this.renderRangeSplineArea(h));for(b=0;b<h.dataSeriesIndexes.length;b++)this._dataInRenderedOrder.push(this.data[h.dataSeriesIndexes[b]]);this.animatedRender&&l&&c.push(l)}this.animatedRender&&0<this._indexLabels.length&&(a=ga(this.width,this.height).getContext("2d"),c.push(this.renderIndexLabels(a)));var k=this;0<c.length?(k.disableToolTip=!0,k._animator.animate(200,k.animationDuration,function(a){k.ctx.clearRect(0,0,k.width,k.height);
+k.ctx.drawImage(f,0,0,Math.floor(k.width*Q),Math.floor(k.height*Q),0,0,k.width,k.height);for(var b=0;b<c.length;b++)l=c[b],1>a&&"undefined"!==typeof l.startTimePercent?a>=l.startTimePercent&&l.animationCallback(l.easingFunction(a-l.startTimePercent,0,1,1-l.startTimePercent),l):l.animationCallback(l.easingFunction(a,0,1,1),l);k.dispatchEvent("dataAnimationIterationEnd",{chart:k})},function(){c=[];for(var a=0;a<k.plotInfo.plotTypes.length;a++)for(var b=k.plotInfo.plotTypes[a],d=0;d<b.plotUnits.length;d++)b.plotUnits[d].targetCanvas=
+null;f=null;k.disableToolTip=!1})):(0<k._indexLabels.length&&k.renderIndexLabels(),k.dispatchEvent("dataAnimationIterationEnd",{chart:k}));this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||Y(this._zoomButton,this._resetButton);this.toolTip._updateToolTip();this.renderCount++};A.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,
+mousemove:this._plotAreaMouseMove,cursor:this.zoomEnabled?"col-resize":"move",cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};A.prototype.categoriseDataSeries=function(){for(var a="",d=0;d<this.data.length;d++)if(a=this.data[d],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=A._supportedChartTypes.indexOf(a.type)){for(var b=null,c=!1,f=null,g=!1,h=0;h<this.plotInfo.plotTypes.length;h++)if(this.plotInfo.plotTypes[h].type===a.type){c=!0;b=this.plotInfo.plotTypes[h];
+break}c||(b={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(b));for(h=0;h<b.plotUnits.length;h++)if(b.plotUnits[h].axisYType===a.axisYType&&b.plotUnits[h].axisXType===a.axisXType&&b.plotUnits[h].axisYIndex===a.axisYIndex&&b.plotUnits[h].axisXIndex===a.axisXIndex){g=!0;f=b.plotUnits[h];break}g||(f={type:a.type,previousDataSeriesCount:0,index:b.plotUnits.length,plotType:b,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===
+a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[]},b.plotUnits.push(f));b.totalDataSeries++;f.dataSeriesIndexes.push(d);a.plotUnit=f}for(d=0;d<this.plotInfo.plotTypes.length;d++)for(b=
+this.plotInfo.plotTypes[d],h=a=0;h<b.plotUnits.length;h++)b.plotUnits[h].previousDataSeriesCount=a,a+=b.plotUnits[h].dataSeriesIndexes.length};A.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var d=this.data[a];if(d.dataPoints)for(var b=d.dataPoints.length,c=0;c<b;c++)d.dataPointIds[c]=++this._eventManager.lastObjectId}};A.prototype._processData=function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var d=
+this.plotInfo.plotTypes[a],b=0;b<d.plotUnits.length;b++){var c=d.plotUnits[b];"line"===c.type||"stepLine"===c.type||"spline"===c.type||"column"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"bar"===c.type||"bubble"===c.type||"scatter"===c.type?this._processMultiseriesPlotUnit(c):"stackedColumn"===c.type||"stackedBar"===c.type||"stackedArea"===c.type?this._processStackedPlotUnit(c):"stackedColumn100"===c.type||"stackedBar100"===c.type||"stackedArea100"===c.type?this._processStacked100PlotUnit(c):
+"candlestick"!==c.type&&"ohlc"!==c.type&&"rangeColumn"!==c.type&&"rangeBar"!==c.type&&"rangeArea"!==c.type&&"rangeSplineArea"!==c.type||this._processMultiYPlotUnit(c)}};A.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var l=this.data[a.dataSeriesIndexes[h]],k=0,m=!1,n=!1,p;if("normal"===l.axisPlacement||"xySwapped"===l.axisPlacement)var e=a.axisX.sessionVariables.newViewportMinimum?
+a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,r=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;
+if(l.dataPoints[k].x&&l.dataPoints[k].x.getTime||"dateTime"===l.xValueType)g=!0;for(k=0;k<l.dataPoints.length;k++){"undefined"===typeof l.dataPoints[k].x&&(l.dataPoints[k].x=k+(a.axisX.logarithmic?1:0));l.dataPoints[k].x.getTime?(g=!0,c=l.dataPoints[k].x.getTime()):c=l.dataPoints[k].x;f=l.dataPoints[k].y;c<b.min&&(b.min=c);c>b.max&&(b.max=c);f<d.min&&(d.min=f);f>d.max&&(d.max=f);if(0<k){if(a.axisX.logarithmic){var q=c/l.dataPoints[k-1].x;1>q&&(q=1/q);b.minDiff>q&&1!==q&&(b.minDiff=q)}else q=c-l.dataPoints[k-
+1].x,0>q&&(q*=-1),b.minDiff>q&&0!==q&&(b.minDiff=q);null!==f&&null!==l.dataPoints[k-1].y&&(a.axisY.logarithmic?(q=f/l.dataPoints[k-1].y,1>q&&(q=1/q),d.minDiff>q&&1!==q&&(d.minDiff=q)):(q=f-l.dataPoints[k-1].y,0>q&&(q*=-1),d.minDiff>q&&0!==q&&(d.minDiff=q)))}if(c<e&&!m)null!==f&&(p=c);else{if(!m&&(m=!0,0<k)){k-=2;continue}if(c>r&&!n)n=!0;else if(c>r&&n)continue;l.dataPoints[k].label&&(a.axisX.labels[c]=l.dataPoints[k].label);c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===
+f?b.viewPortMin===c&&p<c&&(b.viewPortMin=p):(f<d.viewPortMin&&(d.viewPortMin=f),f>d.viewPortMax&&(d.viewPortMax=f))}}this.plotInfo.axisXValueType=l.xValueType=g?"dateTime":"number"}};A.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=[],l=[],k=Infinity,m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,e=!1,r=!1,q;if("normal"===n.axisPlacement||"xySwapped"===
+n.axisPlacement)var s=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,v=this.sessionVariables.axisX.newViewportMaximum?this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?
+this.options.axisX.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)g=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(g=!0,c=n.dataPoints[p].x.getTime()):c=n.dataPoints[p].x;x(n.dataPoints[p].y)?f=0:(f=n.dataPoints[p].y,0===m&&(k=Math.min(f,k)));c<b.min&&(b.min=c);c>b.max&&(b.max=c);if(0<p){if(a.axisX.logarithmic){var w=c/n.dataPoints[p-1].x;1>w&&(w=1/
+w);b.minDiff>w&&1!==w&&(b.minDiff=w)}else w=c-n.dataPoints[p-1].x,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w);null!==f&&null!==n.dataPoints[p-1].y&&(a.axisY.logarithmic?0<f&&(w=f/n.dataPoints[p-1].y,1>w&&(w=1/w),d.minDiff>w&&1!==w&&(d.minDiff=w)):(w=f-n.dataPoints[p-1].y,0>w&&(w*=-1),d.minDiff>w&&0!==w&&(d.minDiff=w)))}if(c<s&&!e)null!==n.dataPoints[p].y&&(q=c);else{if(!e&&(e=!0,0<p)){p-=2;continue}if(c>v&&!r)r=!0;else if(c>v&&r)continue;n.dataPoints[p].label&&(a.axisX.labels[c]=n.dataPoints[p].label);
+c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===n.dataPoints[p].y?b.viewPortMin===c&&q<c&&(b.viewPortMin=q):(a.yTotals[c]=(a.yTotals[c]?a.yTotals[c]:0)+Math.abs(f),0<=f?h[c]=h[c]?h[c]+f:f:l[c]=l[c]?l[c]+f:f)}}this.plotInfo.axisXValueType=n.xValueType=g?"dateTime":"number"}for(p in h)h.hasOwnProperty(p)&&!isNaN(p)&&(a=h[p],a<d.min&&(d.min=Math.min(a,k)),a>d.max&&(d.max=a),p<b.viewPortMin||p>b.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=Math.min(a,k)),a>d.viewPortMax&&
+(d.viewPortMax=a)));for(p in l)l.hasOwnProperty(p)&&!isNaN(p)&&(a=l[p],a<d.min&&(d.min=Math.min(a,k)),a>d.max&&(d.max=a),p<b.viewPortMin||p>b.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=Math.min(a,k)),a>d.viewPortMax&&(d.viewPortMax=a)))}};A.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=!1,l=!1,k=[],m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,
+e=!1,r=!1,q;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var s=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,v=this.sessionVariables.axisX.newViewportMaximum?this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:
+this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)g=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(g=!0,c=n.dataPoints[p].x.getTime()):c=n.dataPoints[p].x;f=x(n.dataPoints[p].y)?null:n.dataPoints[p].y;c<b.min&&(b.min=c);c>b.max&&(b.max=c);if(0<p){if(a.axisX.logarithmic){var w=c/n.dataPoints[p-
+1].x;1>w&&(w=1/w);b.minDiff>w&&1!==w&&(b.minDiff=w)}else w=c-n.dataPoints[p-1].x,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w);x(f)||null===n.dataPoints[p-1].y||(a.axisY.logarithmic?0<f&&(w=f/n.dataPoints[p-1].y,1>w&&(w=1/w),d.minDiff>w&&1!==w&&(d.minDiff=w)):(w=f-n.dataPoints[p-1].y,0>w&&(w*=-1),d.minDiff>w&&0!==w&&(d.minDiff=w)))}if(c<s&&!e)null!==f&&(q=c);else{if(!e&&(e=!0,0<p)){p-=2;continue}if(c>v&&!r)r=!0;else if(c>v&&r)continue;n.dataPoints[p].label&&(a.axisX.labels[c]=n.dataPoints[p].label);
+c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===f?b.viewPortMin===c&&q<c&&(b.viewPortMin=q):(a.yTotals[c]=(a.yTotals[c]?a.yTotals[c]:0)+Math.abs(f),0<=f?h=!0:0>f&&(l=!0),k[c]=k[c]?k[c]+Math.abs(f):Math.abs(f))}}this.plotInfo.axisXValueType=n.xValueType=g?"dateTime":"number"}a.axisY.logarithmic?(d.max=x(d.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(d.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),d.min=x(d.viewPortMin)?1:Math.min(d.viewPortMin,
+1)):h&&!l?(d.max=x(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=x(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):h&&l?(d.max=x(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=x(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99)):!h&&l&&(d.max=x(d.viewPortMax)?-1:Math.max(d.viewPortMax,-1),d.min=x(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99));d.viewPortMin=d.min;d.viewPortMax=d.max;a.dataPointYSums=k}};A.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=
+a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g,h,l=!1,k=0;k<a.dataSeriesIndexes.length;k++){var m=this.data[a.dataSeriesIndexes[k]],n=0,p=!1,e=!1,r,q,s;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var v=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,w=this.sessionVariables.axisX.newViewportMaximum?
+this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(m.dataPoints[n].x&&m.dataPoints[n].x.getTime||"dateTime"===m.xValueType)l=!0;for(n=0;n<m.dataPoints.length;n++){"undefined"===typeof m.dataPoints[n].x&&(m.dataPoints[n].x=n+(a.axisX.logarithmic?1:0));m.dataPoints[n].x.getTime?(l=!0,c=m.dataPoints[n].x.getTime()):c=m.dataPoints[n].x;
+if((f=m.dataPoints[n].y)&&f.length){g=Math.min.apply(null,f);h=Math.max.apply(null,f);q=!0;for(var y=0;y<f.length;y++)null===f.k&&(q=!1);q&&(p||(s=r),r=c)}c<b.min&&(b.min=c);c>b.max&&(b.max=c);g<d.min&&(d.min=g);h>d.max&&(d.max=h);0<n&&(a.axisX.logarithmic?(q=c/m.dataPoints[n-1].x,1>q&&(q=1/q),b.minDiff>q&&1!==q&&(b.minDiff=q)):(q=c-m.dataPoints[n-1].x,0>q&&(q*=-1),b.minDiff>q&&0!==q&&(b.minDiff=q)),f&&(null!==f[0]&&m.dataPoints[n-1].y&&null!==m.dataPoints[n-1].y[0])&&(a.axisY.logarithmic?(q=f[0]/
+m.dataPoints[n-1].y[0],1>q&&(q=1/q),d.minDiff>q&&1!==q&&(d.minDiff=q)):(q=f[0]-m.dataPoints[n-1].y[0],0>q&&(q*=-1),d.minDiff>q&&0!==q&&(d.minDiff=q))));if(!(c<v)||p){if(!p&&(p=!0,0<n)){n-=2;r=s;continue}if(c>w&&!e)e=!0;else if(c>w&&e)continue;m.dataPoints[n].label&&(a.axisX.labels[c]=m.dataPoints[n].label);c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);if(b.viewPortMin===c&&f)for(y=0;y<f.length;y++)if(null===f[y]&&r<c){b.viewPortMin=r;break}null===f?b.viewPortMin===c&&r<c&&
+(b.viewPortMin=r):(g<d.viewPortMin&&(d.viewPortMin=g),h>d.viewPortMax&&(d.viewPortMax=h))}}this.plotInfo.axisXValueType=m.xValueType=l?"dateTime":"number"}};A.prototype.getDataPointAtXY=function(a,d,b){b=b||!1;for(var c=[],f=this._dataInRenderedOrder.length-1;0<=f;f--){var g=null;(g=this._dataInRenderedOrder[f].getDataPointAtXY(a,d,b))&&c.push(g)}a=null;d=!1;for(b=0;b<c.length;b++)if("line"===c[b].dataSeries.type||"stepLine"===c[b].dataSeries.type||"area"===c[b].dataSeries.type||"stepArea"===c[b].dataSeries.type)if(f=
+L("markerSize",c[b].dataPoint,c[b].dataSeries)||8,c[b].distance<=f/2){d=!0;break}for(b=0;b<c.length;b++)d&&"line"!==c[b].dataSeries.type&&"stepLine"!==c[b].dataSeries.type&&"area"!==c[b].dataSeries.type&&"stepArea"!==c[b].dataSeries.type||(a?c[b].distance<=a.distance&&(a=c[b]):a=c[b]);return a};A.prototype.getObjectAtXY=function(a,d,b){var c=null;if(b=this.getDataPointAtXY(a,d,b||!1))c=b.dataSeries.dataPointIds[b.dataPointIndex];else if(u)c=La(a,d,this._eventManager.ghostCtx);else for(b=0;b<this.legend.items.length;b++){var f=
+this.legend.items[b];a>=f.x1&&(a<=f.x2&&d>=f.y1&&d<=f.y2)&&(c=f.id)}return c};A.prototype.getAutoFontSize=function(a,d,b){a/=400;return Math.max(10,Math.round(Math.min(this.width,this.height)*a))};A.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};A.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))};A.prototype.attachEvent=
+function(a){this._events.push(a)};A.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var d=[],b=a.changedTouches,c=b?b[0]:a,f=null;switch(a.type){case "touchstart":case "MSPointerDown":d=["mousemove","mousedown"];this._lastTouchData=xa(c);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":d=["mousemove"];break;case "touchend":case "MSPointerUp":d="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType?["mouseup",
+"click"]:["mouseup"];break;default:return}if(!(b&&1<b.length)){f=xa(c);f.time=new Date;try{var g=f.y-this._lastTouchData.y,h=f.time-this._lastTouchData.time;if(15<Math.abs(g)&&(this._lastTouchData.scroll||200>h)){this._lastTouchData.scroll=!0;var l=window.parent||window;l&&l.scrollBy&&l.scrollBy(0,-g)}}catch(k){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(b=0;b<d.length;b++)f=d[b],g=document.createEvent("MouseEvent"),
+g.initMouseEvent(f,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),c.target.dispatchEvent(g),a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault()}}};A.prototype._dispatchRangeEvent=function(a,d){var b={chart:this};b.type=a;b.trigger=d;var c=[];this.axisX&&0<this.axisX.length&&c.push("axisX");this.axisX2&&0<this.axisX2.length&&c.push("axisX2");this.axisY&&0<this.axisY.length&&c.push("axisY");this.axisY2&&0<this.axisY2.length&&c.push("axisY2");
+for(var f=0;f<c.length;f++)if(x(b[c[f]])&&(b[c[f]]=[]),"axisY"===c[f])for(var g=0;g<this.axisY.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisY2"===c[f])for(g=0;g<this.axisY2.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisX"===c[f])for(g=0;g<this.axisX.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,
+viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisX2"===c[f])for(g=0;g<this.axisX2.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});this.dispatchEvent(a,b,this)};A.prototype._mouseEventHandler=function(a){"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var d=xa(a),b=a.type,c,f;a.which?f=3==a.which:a.button&&(f=2==a.button);A.capturedEventParam&&
+(c=A.capturedEventParam,"mouseup"===b&&(A.capturedEventParam=null,c.chart.overlaidCanvas.releaseCapture?c.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",c.chart._mouseEventHandler,!1)),c.hasOwnProperty(b)&&("mouseup"!==b||c.chart.overlaidCanvas.releaseCapture?a.target===c.chart.overlaidCanvas&&c[b].call(c.context,d.x,d.y):a.target!==c.chart.overlaidCanvas&&(c.chart.isDrag=!1)));if(this.interactivityEnabled)if(this._ignoreNextEvent)this._ignoreNextEvent=
+!1;else if(a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault(),!f){if(!A.capturedEventParam&&this._events){for(var g=0;g<this._events.length;g++)if(this._events[g].hasOwnProperty(b))if(c=this._events[g],f=c.bounds,d.x>=f.x1&&d.x<=f.x2&&d.y>=f.y1&&d.y<=f.y2){c[b].call(c.context,d.x,d.y);"mousedown"===b&&!0===c.capture?(A.capturedEventParam=c,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,
+!1)):"mouseup"===b&&(c.chart.overlaidCanvas.releaseCapture?c.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else c=null;a.target.style.cursor=c&&c.cursor?c.cursor:this._defaultCursor}b=this.plotArea;if(d.x<b.x1||d.x>b.x2||d.y<b.y1||d.y>b.y2)this.toolTip&&this.toolTip.enabled?this.toolTip.hide():this.resetOverlayedCanvas();this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};A.prototype._plotAreaMouseDown=
+function(a,d){this.isDrag=!0;this.dragStartPoint={x:a,y:d}};A.prototype._plotAreaMouseUp=function(a,d){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var b=d-this.dragStartPoint.y,c=a-this.dragStartPoint.x,f=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var l=g,g=f,f=l;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(f=g=0;f<this._axes.length;f++)b=
+this._axes[f],b.logarithmic?b.viewportMinimum<b.minimum?(g=b.minimum/b.viewportMinimum,b.sessionVariables.newViewportMinimum=b.viewportMinimum*g,b.sessionVariables.newViewportMaximum=b.viewportMaximum*g,h=!0):b.viewportMaximum>b.maximum&&(g=b.viewportMaximum/b.maximum,b.sessionVariables.newViewportMinimum=b.viewportMinimum/g,b.sessionVariables.newViewportMaximum=b.viewportMaximum/g,h=!0):b.viewportMinimum<b.minimum?(g=b.minimum-b.viewportMinimum,b.sessionVariables.newViewportMinimum=b.viewportMinimum+
+g,b.sessionVariables.newViewportMaximum=b.viewportMaximum+g,h=!0):b.viewportMaximum>b.maximum&&(g=b.viewportMaximum-b.maximum,b.sessionVariables.newViewportMinimum=b.viewportMinimum-g,b.sessionVariables.newViewportMaximum=b.viewportMaximum-g,h=!0);else if((!f||2<Math.abs(c))&&(!g||2<Math.abs(b))&&this.zoomEnabled){if(!this.dragStartPoint)return;b=f?this.dragStartPoint.x:this.plotArea.x1;c=g?this.dragStartPoint.y:this.plotArea.y1;f=f?a:this.plotArea.x2;g=g?d:this.plotArea.y2;2<Math.abs(b-f)&&2<Math.abs(c-
+g)&&this._zoomPanToSelectedRegion(b,c,f,g)&&(h=!0)}h&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),h&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(ta(this._zoomButton,this._resetButton),T(this,this._zoomButton,"pan"),T(this,this._resetButton,"reset")))}}this.isDrag=!1};A.prototype._plotAreaMouseMove=function(a,d){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var b=0,c=0,f=b=null,f=
+0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=this;"xySwapped"===this.plotInfo.axisPlacement&&(b=g,g=f,f=b);b=this.dragStartPoint.x-a;c=this.dragStartPoint.y-d;2<Math.abs(b)&&8>Math.abs(b)&&(this.panEnabled||this.zoomEnabled)?this.toolTip.hide():this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,d);if((!f||2<Math.abs(b)||!g||2<Math.abs(c))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)f={x1:f?this.plotArea.x1+b:this.plotArea.x1,y1:g?this.plotArea.y1+c:this.plotArea.y1,
+x2:f?this.plotArea.x2+b:this.plotArea.x2,y2:g?this.plotArea.y2+c:this.plotArea.y2},clearTimeout(h._panTimerId),h._panTimerId=setTimeout(function(b,c,e,f){return function(){h._zoomPanToSelectedRegion(b,c,e,f,!0)&&(h._dispatchRangeEvent("rangeChanging","pan"),h.render(),h._dispatchRangeEvent("rangeChanged","pan"),h.dragStartPoint.x=a,h.dragStartPoint.y=d)}}(f.x1,f.y1,f.x2,f.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();b=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle=
+"#A89896";var c=f?this.dragStartPoint.x:this.plotArea.x1,l=g?this.dragStartPoint.y:this.plotArea.y1,k=f?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,m=g?d-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(c,l,f?a:this.plotArea.x2-this.plotArea.x1,g?d:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(c,
+l,k,m);this.overlaidCanvasCtx.globalAlpha=b}}else this.toolTip.mouseMoveHandler(a,d)};A.prototype._zoomPanToSelectedRegion=function(a,d,b,c,f){a=this.validateRegion(a,d,b,c,f);d=a.axesWithValidRange;b=a.axesRanges;if(a.isValid)for(c=0;c<d.length;c++)f=b[c],d[c].setViewPortRange(f.val1,f.val2);return a.isValid};A.prototype.validateRegion=function(a,d,b,c,f){f=f||!1;for(var g=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),l=!1,k=[],m=[],n=[],p=0;p<this.axisX.length;p++)this.axisX[p]&&
+g&&m.push(this.axisX[p]);for(p=0;p<this.axisX2.length;p++)this.axisX2[p]&&g&&m.push(this.axisX2[p]);for(p=0;p<this.axisY.length;p++)this.axisY[p]&&h&&m.push(this.axisY[p]);for(p=0;p<this.axisY2.length;p++)this.axisY2[p]&&h&&m.push(this.axisY2[p]);for(g=0;g<m.length;g++){var h=m[g],p=h.convertPixelToValue({x:a,y:d}),e=h.convertPixelToValue({x:b,y:c});if(p>e)var r=e,e=p,p=r;if(isFinite(h.dataInfo.minDiff))if(!(h.logarithmic&&e/p<Math.pow(h.dataInfo.minDiff,3)||!h.logarithmic&&Math.abs(e-p)<3*Math.abs(h.dataInfo.minDiff)||
+p<h.minimum||e>h.maximum))k.push(h),n.push({val1:p,val2:e}),l=!0;else if(!f){l=!1;break}}return{isValid:l,axesWithValidRange:k,axesRanges:n}};A.prototype.preparePlotArea=function(){var a=this.plotArea;!u&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var d=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var b=this.axisY[0];a.x1=d.x1<d.x2?d.x1:b.lineCoordinates.x1;
+a.y1=d.y1<b.lineCoordinates.y1?d.y1:b.lineCoordinates.y1;a.x2=d.x2>b.lineCoordinates.x2?d.x2:b.lineCoordinates.x2;a.y2=d.y2>d.y1?d.y2:b.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(b=this.axisY2[0],a.x1=d.x1<d.x2?d.x1:b.lineCoordinates.x1,a.y1=d.y1<b.lineCoordinates.y1?d.y1:b.lineCoordinates.y1,a.x2=d.x2>b.lineCoordinates.x2?d.x2:b.lineCoordinates.x2,a.y2=d.y2>d.y1?d.y2:b.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else d=
+this.layoutManager.getFreeSpace(),a.x1=d.x1,a.x2=d.x2,a.y1=d.y1,a.y2=d.y2,a.width=d.width,a.height=d.height;u||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new ja(a.x1,a.y1,a.x2,a.y2,2)};A.prototype.renderIndexLabels=function(a){var d=a||this.plotArea.ctx,b=this.plotArea,c=0,f=0,g=0,h=0,l=c=h=f=g=0,k=0;for(a=0;a<this._indexLabels.length;a++){var m=this._indexLabels[a],n=m.chartType.toLowerCase(),
+p,e,l=L("indexLabelFontColor",m.dataPoint,m.dataSeries),k=L("indexLabelFontSize",m.dataPoint,m.dataSeries);p=L("indexLabelFontFamily",m.dataPoint,m.dataSeries);e=L("indexLabelFontStyle",m.dataPoint,m.dataSeries);var h=L("indexLabelFontWeight",m.dataPoint,m.dataSeries),r=L("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),f=L("indexLabelMaxWidth",m.dataPoint,m.dataSeries),g=L("indexLabelWrap",m.dataPoint,m.dataSeries),q=L("indexLabelLineDashType",m.dataPoint,m.dataSeries),s=L("indexLabelLineColor",
+m.dataPoint,m.dataSeries),v=x(m.dataPoint.indexLabelLineThickness)?x(m.dataSeries.options.indexLabelLineThickness)?0:m.dataSeries.options.indexLabelLineThickness:m.dataPoint.indexLabelLineThickness,c=0<v?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,w={percent:null,total:null},y=null;if(0<=m.dataSeries.type.indexOf("stacked")||"pie"===m.dataSeries.type||"doughnut"===m.dataSeries.type)w=this.getPercentAndTotal(m.dataSeries,m.dataPoint);if(m.dataSeries.indexLabelFormatter||
+m.dataPoint.indexLabelFormatter)y={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,index:m.indexKeyword,total:w.total,percent:w.percent};var t=m.dataPoint.indexLabelFormatter?m.dataPoint.indexLabelFormatter(y):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(y):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,m.dataPoint,m.dataSeries,
+null,m.indexKeyword):null;if(null!==t&&""!==t){var w=L("indexLabelPlacement",m.dataPoint,m.dataSeries),y=L("indexLabelOrientation",m.dataPoint,m.dataSeries),D=m.direction,Z=m.dataSeries.axisX,aa=m.dataSeries.axisY,z=!1,r=new W(d,{x:0,y:0,maxWidth:f?f:0.5*this.width,maxHeight:g?5*k:1.5*k,angle:"horizontal"===y?0:-90,text:t,padding:0,backgroundColor:r,horizontalAlign:"left",fontSize:k,fontFamily:p,fontWeight:h,fontColor:l,fontStyle:e,textBaseline:"top"});r.measureText();m.dataSeries.indexLabelMaxWidth=
+r.maxWidth;if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.dataPoint.y<aa.viewportMinimum||m.dataPoint.y>aa.viewportMaximum)continue}else if(0<=n.indexOf("column")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.bounds.y1>b.y2||m.bounds.y2<b.y1)continue}else if(0<=n.indexOf("bar")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.bounds.x1>
+b.x2||m.bounds.x2<b.x1)continue}else if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum)continue;f=h=2;"horizontal"===y?(l=r.width,k=r.height):(k=r.width,l=r.height);if("normal"===this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))w="auto",h=4;else if(0<=n.indexOf("stacked"))"auto"===w&&(w="inside");else if("bubble"===n||"scatter"===n)w="inside";p=m.point.x-l/2;"inside"!==w?(f=b.y1,g=b.y2,0<D?(e=m.point.y-k-h-c,e<f&&(e="auto"===w?Math.max(m.point.y,f)+h+c:
+f+h+c,z=e+k>m.point.y)):(e=m.point.y+h+c,e>g-k-h-c&&(e="auto"===w?Math.min(m.point.y,g)-k-h-c:g-k-h-c,z=e<m.point.y))):(f=Math.max(m.bounds.y1,b.y1),g=Math.min(m.bounds.y2,b.y2),c=0<=n.indexOf("range")?0<D?Math.max(m.bounds.y1,b.y1)+k/2+h:Math.min(m.bounds.y2,b.y2)-k/2-h:(Math.max(m.bounds.y1,b.y1)+Math.min(m.bounds.y2,b.y2))/2,0<D?(e=Math.max(m.point.y,c)-k/2,e<f&&("bubble"===n||"scatter"===n)&&(e=Math.max(m.point.y-k-h,b.y1+h))):(e=Math.min(m.point.y,c)-k/2,e>g-k-h&&("bubble"===n||"scatter"===n)&&
+(e=Math.min(m.point.y+h,b.y2-k-h))),e=Math.min(e,g-k))}else 0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("scatter")?(w="auto",f=4):0<=n.indexOf("stacked")?"auto"===w&&(w="inside"):"bubble"===n&&(w="inside"),e=m.point.y-k/2,"inside"!==w?(h=b.x1,g=b.x2,0>D?(p=m.point.x-l-f-c,p<h&&(p="auto"===w?Math.max(m.point.x,h)+f+c:h+f+c,z=p+l>m.point.x)):(p=m.point.x+f+c,p>g-l-f-c&&(p="auto"===w?Math.min(m.point.x,g)-l-f-c:g-l-f-c,z=p<m.point.x))):(h=Math.max(m.bounds.x1,b.x1),Math.min(m.bounds.x2,
+b.x2),c=0<=n.indexOf("range")?0>D?Math.max(m.bounds.x1,b.x1)+l/2+f:Math.min(m.bounds.x2,b.x2)-l/2-f:(Math.max(m.bounds.x1,b.x1)+Math.min(m.bounds.x2,b.x2))/2,p=0>D?Math.max(m.point.x,c)-l/2:Math.min(m.point.x,c)-l/2,p=Math.max(p,h));"vertical"===y&&(e+=k);r.x=p;r.y=e;r.render(!0);v&&("inside"!==w&&(0>n.indexOf("bar")&&m.point.x>b.x1&&m.point.x<b.x2||!z)&&(0>n.indexOf("column")&&m.point.y>b.y1&&m.point.y<b.y2||!z))&&(d.lineWidth=v,d.strokeStyle=s?s:"gray",d.setLineDash&&d.setLineDash(I(q,v)),d.beginPath(),
+d.moveTo(m.point.x,m.point.y),0<=n.indexOf("bar")?d.lineTo(p+(0<m.direction?0:l),e+("horizontal"===y?k:-k)/2):0<=n.indexOf("column")?d.lineTo(p+l/2,e+((0<m.direction?k:-k)+("horizontal"===y?k:-k))/2):d.lineTo(p+l/2,e+((e<m.point.y?k:-k)+("horizontal"===y?k:-k))/2),d.stroke())}}d={source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],r=L("indexLabelBackgroundColor",
+m.dataPoint,m.dataSeries),m.dataSeries.indexLabelBackgroundColor=x(r)?u?"transparent":null:r;return d};A.prototype.renderLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;d.save();var c=this.plotArea;d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();for(var c=[],f=null,g=0;g<a.dataSeriesIndexes.length;g++){var h=a.dataSeriesIndexes[g],l=this.data[h];d.lineWidth=l.lineThickness;var k=l.dataPoints,m="solid";if(d.setLineDash){var n=
+I(l.nullDataLineDashType,l.lineThickness),m=l.lineDashType,p=I(m,l.lineThickness);d.setLineDash(p)}var e=l.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:h};e=G(e);b.strokeStyle=e;b.lineWidth=0<l.lineThickness?Math.max(l.lineThickness,4):0;var e=l._colorSet,r=e=l.lineColor=l.options.lineColor?l.options.lineColor:e[0];d.strokeStyle=e;var q=!0,s=0,v,w;d.beginPath();if(0<k.length){for(var y=!1,s=0;s<k.length;s++)if(v=k[s].x.getTime?k[s].x.getTime():k[s].x,!(v<a.axisX.dataInfo.viewPortMin||
+v>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!y)))if("number"!==typeof k[s].y)0<s&&!(l.connectNullData||y||q)&&(d.stroke(),u&&b.stroke()),y=!0;else{v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(k[s].y);var t=l.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:s,x1:v,y1:w};q||y?(!q&&l.connectNullData?(d.setLineDash&&(l.options.nullDataLineDashType||m===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(d.stroke(),
+m=l.nullDataLineDashType,d.setLineDash(n)),d.lineTo(v,w),u&&b.lineTo(v,w)):(d.beginPath(),d.moveTo(v,w),u&&(b.beginPath(),b.moveTo(v,w))),y=q=!1):(d.lineTo(v,w),u&&b.lineTo(v,w),0==s%500&&(d.stroke(),d.beginPath(),d.moveTo(v,w),u&&(b.stroke(),b.beginPath(),b.moveTo(v,w))));s<k.length-1&&(r!==(k[s].lineColor||e)||m!==(k[s].lineDashType||l.lineDashType))&&(d.stroke(),d.beginPath(),d.moveTo(v,w),r=k[s].lineColor||e,d.strokeStyle=r,d.setLineDash&&(k[s].lineDashType?(m=k[s].lineDashType,d.setLineDash(I(m,
+l.lineThickness))):(m=l.lineDashType,d.setLineDash(p))));if(0<k[s].markerSize||0<l.markerSize){var D=l.getMarkerProperties(s,v,w,d),f=D.color;c.push(D);t=G(t);u&&c.push({x:v,y:w,ctx:b,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(k[s].indexLabel||l.indexLabel||k[s].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:k[s],dataSeries:l,point:{x:v,y:w},direction:0>k[s].y===a.axisY.reversed?1:-1,color:e})}d.stroke();u&&b.stroke()}}P.drawMarkers(c);
+l.markerColor=f;d.restore();d.beginPath();u&&b.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;d.save();var c=this.plotArea;d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();for(var c=[],f=null,g=0;g<a.dataSeriesIndexes.length;g++){var h=a.dataSeriesIndexes[g],
+l=this.data[h];d.lineWidth=l.lineThickness;var k=l.dataPoints,m="solid";if(d.setLineDash){var n=I(l.nullDataLineDashType,l.lineThickness),m=l.lineDashType,p=I(m,l.lineThickness);d.setLineDash(p)}var e=l.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:h};e=G(e);b.strokeStyle=e;b.lineWidth=0<l.lineThickness?Math.max(l.lineThickness,4):0;var e=l._colorSet,r=e=l.lineColor=l.options.lineColor?l.options.lineColor:e[0];d.strokeStyle=e;var q=!0,s=0,v,w;d.beginPath();if(0<k.length){for(var y=
+!1,s=0;s<k.length;s++)if(v=k[s].getTime?k[s].x.getTime():k[s].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!y)))if("number"!==typeof k[s].y)0<s&&!(l.connectNullData||y||q)&&(d.stroke(),u&&b.stroke()),y=!0;else{var t=w;v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(k[s].y);var D=l.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:s,x1:v,y1:w};q||y?(!q&&l.connectNullData?(d.setLineDash&&
+(l.options.nullDataLineDashType||m===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(d.stroke(),m=l.nullDataLineDashType,d.setLineDash(n)),d.lineTo(v,t),d.lineTo(v,w),u&&(b.lineTo(v,t),b.lineTo(v,w))):(d.beginPath(),d.moveTo(v,w),u&&(b.beginPath(),b.moveTo(v,w))),y=q=!1):(d.lineTo(v,t),u&&b.lineTo(v,t),d.lineTo(v,w),u&&b.lineTo(v,w),0==s%500&&(d.stroke(),d.beginPath(),d.moveTo(v,w),u&&(b.stroke(),b.beginPath(),b.moveTo(v,w))));s<k.length-1&&(r!==(k[s].lineColor||e)||m!==(k[s].lineDashType||
+l.lineDashType))&&(d.stroke(),d.beginPath(),d.moveTo(v,w),r=k[s].lineColor||e,d.strokeStyle=r,d.setLineDash&&(k[s].lineDashType?(m=k[s].lineDashType,d.setLineDash(I(m,l.lineThickness))):(m=l.lineDashType,d.setLineDash(p))));if(0<k[s].markerSize||0<l.markerSize)t=l.getMarkerProperties(s,v,w,d),f=t.color,c.push(t),D=G(D),u&&c.push({x:v,y:w,ctx:b,type:t.type,size:t.size,color:D,borderColor:D,borderThickness:t.borderThickness});(k[s].indexLabel||l.indexLabel||k[s].indexLabelFormatter||l.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stepLine",dataPoint:k[s],dataSeries:l,point:{x:v,y:w},direction:0>k[s].y===a.axisY.reversed?1:-1,color:e})}d.stroke();u&&b.stroke()}}P.drawMarkers(c);l.markerColor=f;d.restore();d.beginPath();u&&b.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderSpline=function(a){function d(a){a=ua(a,2);if(0<a.length){b.beginPath();u&&c.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&
+(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);u&&c.moveTo(a[0].x,a[0].y);for(var d=0;d<a.length-3;d+=3)if(b.bezierCurveTo(a[d+1].x,a[d+1].y,a[d+2].x,a[d+2].y,a[d+3].x,a[d+3].y),u&&c.bezierCurveTo(a[d+1].x,a[d+1].y,a[d+2].x,a[d+2].y,a[d+3].x,a[d+3].y),0<d&&0===d%3E3||a[d+3].newStrokeStyle||a[d+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[d+3].x,a[d+3].y),a[d+3].newStrokeStyle&&(b.strokeStyle=a[d+3].newStrokeStyle),a[d+3].newLineDashArray&&
+b.setLineDash(a[d+3].newLineDashArray),u&&(c.stroke(),c.beginPath(),c.moveTo(a[d+3].x,a[d+3].y));b.stroke();u&&c.stroke()}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var f=this.plotArea;b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();for(var f=[],g=null,h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l];b.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(b.setLineDash){var p=
+I(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,e=I(n,k.lineThickness);b.setLineDash(e)}var r=k.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:l};r=G(r);c.strokeStyle=r;c.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var r=k._colorSet,q=r=k.lineColor=k.options.lineColor?k.options.lineColor:r[0];b.strokeStyle=r;var s=0,v,w,y=[];b.beginPath();if(0<m.length)for(w=!1,s=0;s<m.length;s++)if(v=m[s].getTime?m[s].x.getTime():m[s].x,!(v<a.axisX.dataInfo.viewPortMin||
+v>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!w)))if("number"!==typeof m[s].y)0<s&&!w&&(k.connectNullData?b.setLineDash&&(0<y.length&&(k.options.nullDataLineDashType||!m[s-1].lineDashType))&&(y[y.length-1].newLineDashArray=p,n=k.nullDataLineDashType):(d(y),y=[])),w=!0;else{v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(m[s].y);var t=k.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:v,y1:w};y[y.length]={x:v,
+y:w};s<m.length-1&&(q!==(m[s].lineColor||r)||n!==(m[s].lineDashType||k.lineDashType))&&(q=m[s].lineColor||r,y[y.length-1].newStrokeStyle=q,b.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,y[y.length-1].newLineDashArray=I(n,k.lineThickness)):(n=k.lineDashType,y[y.length-1].newLineDashArray=e)));if(0<m[s].markerSize||0<k.markerSize){var D=k.getMarkerProperties(s,v,w,b),g=D.color;f.push(D);t=G(t);u&&f.push({x:v,y:w,ctx:c,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(m[s].indexLabel||
+k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:m[s],dataSeries:k,point:{x:v,y:w},direction:0>m[s].y===a.axisY.reversed?1:-1,color:r});w=!1}d(y)}P.drawMarkers(f);k.markerColor=g;b.restore();b.beginPath();u&&c.beginPath();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};var N=function(a,d,b,c,f,g,h,l,k,m,n,p,e){"undefined"===typeof e&&(e=1);h=h||0;l=l||"black";
+var r=15<c-d&&15<f-b?8:0.35*Math.min(c-d,f-b);a.beginPath();a.moveTo(d,b);a.save();a.fillStyle=g;a.globalAlpha=e;a.fillRect(d,b,c-d,f-b);a.globalAlpha=1;0<h&&(e=0===h%2?0:0.5,a.beginPath(),a.lineWidth=h,a.strokeStyle=l,a.moveTo(d,b),a.rect(d-e,b-e,c-d+2*e,f-b+2*e),a.stroke());a.restore();!0===k&&(a.save(),a.beginPath(),a.moveTo(d,b),a.lineTo(d+r,b+r),a.lineTo(c-r,b+r),a.lineTo(c,b),a.closePath(),h=a.createLinearGradient((c+d)/2,b+r,(c+d)/2,b),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, .4)"),
+a.fillStyle=h,a.fill(),a.restore());!0===m&&(a.save(),a.beginPath(),a.moveTo(d,f),a.lineTo(d+r,f-r),a.lineTo(c-r,f-r),a.lineTo(c,f),a.closePath(),h=a.createLinearGradient((c+d)/2,f-r,(c+d)/2,f),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, .4)"),a.fillStyle=h,a.fill(),a.restore());!0===n&&(a.save(),a.beginPath(),a.moveTo(d,b),a.lineTo(d+r,b+r),a.lineTo(d+r,f-r),a.lineTo(d,f),a.closePath(),h=a.createLinearGradient(d+r,(f+b)/2,d,(f+b)/2),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),
+a.fillStyle=h,a.fill(),a.restore());!0===p&&(a.save(),a.beginPath(),a.moveTo(c,b),a.lineTo(c-r,b+r),a.lineTo(c-r,f-r),a.lineTo(c,f),h=a.createLinearGradient(c-r,(f+b)/2,c,(f+b)/2),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),a.fillStyle=h,h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),a.fillStyle=h,a.fill(),a.closePath(),a.restore())};A.prototype.renderColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,
+c=this.plotArea,f=0,g,h,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.dataPointMinWidth=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,m=this.dataPointMaxWidth=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth=
+this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>m&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<f)&&(m=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,
+c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(c=0;c<a.dataSeriesIndexes.length;c++){var m=a.dataSeriesIndexes[c],p=this.data[m],e=p.dataPoints;if(0<e.length)for(var r=5<n&&p.bevelEnabled?!0:!1,f=0;f<e.length;f++)if(e[f].getTime?l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof e[f].y){g=a.axisX.convertValueToPixel(l);h=
+a.axisY.convertValueToPixel(e[f].y);g=a.axisX.reversed?g+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+c)*n<<0:g-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+c)*n<<0;var q=a.axisX.reversed?g-n<<0:g+n<<0,s;0<=e[f].y?s=k:(s=h,h=k);h>s&&(b=h,h=s,s=b);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,g,h,q,s,b,0,null,r&&0<=e[f].y,0>e[f].y&&r,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,
+x1:g,y1:h,x2:q,y2:s};b=G(b);u&&N(this._eventManager.ghostCtx,g,h,q,s,b,0,null,!1,!1,!1,!1);(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:e[f],dataSeries:p,point:{x:g+(q-g)/2,y:0>e[f].y===a.axisY.reversed?h:s},direction:0>e[f].y===a.axisY.reversed?1:-1,bounds:{x1:g,y1:Math.min(h,s),x2:q,y2:Math.max(h,s)},color:b})}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(k,a.axisY.bounds.y2);return{source:d,
+dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:
+this.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:
+-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():
+q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic)h[b]=q[l].y+(h[b]?h[b]:0),0<h[b]&&(k=a.axisY.convertValueToPixel(h[b]),y=f[b]?f[b]:m,f[b]=k);else if(k=a.axisY.convertValueToPixel(q[l].y),0<=q[l].y){var t=f[b]?f[b]:0;k-=t;y=m-t;f[b]=t+(y-k)}else t=g[b]?g[b]:0,y=k+t,k=m+t,g[b]=t+(y-k);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];
+N(d,v,k,w,y,b,0,null,s&&0<=q[l].y,0>q[l].y&&s,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:k,x2:w,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,k,w,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:q[l],dataSeries:r,point:{x:c,y:0<=q[l].y?k:y},direction:0>q[l].y===a.axisY.reversed?1:
+-1,bounds:{x1:v,y1:Math.min(k,y),x2:w,y2:Math.max(k,y)},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(m,a.axisY.bounds.y2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedColumn100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?
+a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
+l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=
+a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length)for(var s=5<p&&r.bevelEnabled?!0:!1,l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){c=a.axisX.convertValueToPixel(b);k=0!==a.dataPointYSums[b]?100*(q[l].y/a.dataPointYSums[b]):0;var v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic){h[b]=k+(h[b]?h[b]:0);if(0>=h[b])continue;k=a.axisY.convertValueToPixel(h[b]);
+y=f[b]?f[b]:m;f[b]=k}else if(k=a.axisY.convertValueToPixel(k),0<=q[l].y){var t=f[b]?f[b]:0;k-=t;y=m-t;f[b]=t+(y-k)}else t=g[b]?g[b]:0,y=k+t,k=m+t,g[b]=t+(y-k);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];N(d,v,k,w,y,b,0,null,s&&0<=q[l].y,0>q[l].y&&s,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:k,x2:w,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,k,w,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||
+r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:q[l],dataSeries:r,point:{x:c,y:0<=q[l].y?k:y},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:v,y1:Math.min(k,y),x2:w,y2:Math.max(k,y)},color:b})}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(m,a.axisY.bounds.y2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderBar=
+function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,m=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||
+(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>m&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<f)&&(m=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();
+d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(c=0;c<a.dataSeriesIndexes.length;c++){var m=a.dataSeriesIndexes[c],p=this.data[m],e=p.dataPoints;if(0<e.length){var r=5<n&&p.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(f=0;f<e.length;f++)if(e[f].getTime?l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===
+typeof e[f].y){h=a.axisX.convertValueToPixel(l);g=a.axisY.convertValueToPixel(e[f].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+c)*n<<0:h-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+c)*n<<0;var q=a.axisX.reversed?h-n<<0:h+n<<0,s;0<=e[f].y?s=k:(s=g,g=k);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,s,h,g,q,b,0,null,r,!1,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:m,
+dataPointIndex:f,x1:s,y1:h,x2:g,y2:q};b=G(b);u&&N(this._eventManager.ghostCtx,s,h,g,q,b,0,null,!1,!1,!1,!1);(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:e[f],dataSeries:p,point:{x:0<=e[f].y?g:s,y:h+(q-h)/2},direction:0>e[f].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,g),y1:h,x2:Math.max(s,g),y2:q},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(k,a.axisX.bounds.x2);return{source:d,
+dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?
+this.dataPointWidth:0.15*this.height<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,
+l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():
+q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic)h[b]=q[l].y+(h[b]?h[b]:0),0<h[b]&&(y=f[b]?f[b]:m,f[b]=k=a.axisY.convertValueToPixel(h[b]));else if(k=a.axisY.convertValueToPixel(q[l].y),0<=q[l].y){var t=f[b]?f[b]:0;y=m+t;k+=t;f[b]=t+(k-y)}else t=g[b]?g[b]:0,y=k-t,k=m-t,g[b]=t+(k-y);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];
+N(d,y,v,k,w,b,0,null,s,!1,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:y,y1:v,x2:k,y2:w};b=G(b);u&&N(this._eventManager.ghostCtx,y,v,k,w,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:q[l],dataSeries:r,point:{x:0<=q[l].y?k:y,y:c},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(y,
+k),y1:v,x2:Math.max(y,k),y2:w},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(m,a.axisX.bounds.x2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedBar100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:
+0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?
+this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],
+q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v;v=0!==a.dataPointYSums[b]?100*(q[l].y/a.dataPointYSums[b]):0;var w=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,y=w+p<<0;if(a.axisY.logarithmic){h[b]=v+(h[b]?h[b]:0);if(0>=h[b])continue;v=f[b]?f[b]:m;f[b]=k=a.axisY.convertValueToPixel(h[b])}else if(k=
+a.axisY.convertValueToPixel(v),0<=q[l].y){var t=f[b]?f[b]:0;v=m+t;k+=t;f[b]=t+(k-v)}else t=g[b]?g[b]:0,v=k-t,k=m-t,g[b]=t+(k-v);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];N(d,v,w,k,y,b,0,null,s,!1,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:w,x2:k,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,w,k,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stackedBar100",dataPoint:q[l],dataSeries:r,point:{x:0<=q[l].y?k:v,y:c},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,k),y1:w,x2:Math.max(v,k),y2:y},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(m,a.axisX.bounds.x2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderArea=function(a){function d(){t&&(0<n.lineThickness&&
+b.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?y=w:0>a.axisY.viewportMaximum?y=g.y1:0<a.axisY.viewportMinimum&&(y=f.y2),b.lineTo(q,y),b.lineTo(t.x,y),b.closePath(),b.globalAlpha=n.fillOpacity,b.fill(),b.globalAlpha=1,u&&(c.lineTo(q,y),c.lineTo(t.x,y),c.closePath(),c.fill()),b.beginPath(),b.moveTo(q,s),c.beginPath(),c.moveTo(q,s),t={x:q,y:s})}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,
+g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=!0,r=0,q,s,v,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
+y,t=null;if(0<p.length){var D=n._colorSet[r%n._colorSet.length],x=n.lineColor=n.options.lineColor||D,aa=x;b.fillStyle=D;b.strokeStyle=x;b.lineWidth=n.lineThickness;var z="solid";if(b.setLineDash){var A=I(n.nullDataLineDashType,n.lineThickness),z=n.lineDashType,R=I(z,n.lineThickness);b.setLineDash(R)}for(var J=!0;r<p.length;r++)if(v=p[r].x.getTime?p[r].x.getTime():p[r].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!J)))if("number"!==typeof p[r].y)n.connectNullData||
+(J||e)||d(),J=!0;else{q=a.axisX.convertValueToPixel(v);s=a.axisY.convertValueToPixel(p[r].y);e||J?(!e&&n.connectNullData?(b.setLineDash&&(n.options.nullDataLineDashType||z===n.lineDashType&&n.lineDashType!==n.nullDataLineDashType)&&(b.stroke(),z=n.nullDataLineDashType,b.setLineDash(A)),b.lineTo(q,s),u&&c.lineTo(q,s)):(b.beginPath(),b.moveTo(q,s),u&&(c.beginPath(),c.moveTo(q,s)),t={x:q,y:s}),J=e=!1):(b.lineTo(q,s),u&&c.lineTo(q,s),0==r%250&&d());r<p.length-1&&(aa!==(p[r].lineColor||x)||z!==(p[r].lineDashType||
+n.lineDashType))&&(d(),aa=p[r].lineColor||x,b.strokeStyle=aa,b.setLineDash&&(p[r].lineDashType?(z=p[r].lineDashType,b.setLineDash(I(z,n.lineThickness))):(z=n.lineDashType,b.setLineDash(R))));var H=n.dataPointIds[r];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:q,y1:s};0!==p[r].markerSize&&(0<p[r].markerSize||0<n.markerSize)&&(v=n.getMarkerProperties(r,q,s,b),l=v.color,h.push(v),H=G(H),u&&h.push({x:q,y:s,ctx:c,type:v.type,size:v.size,color:H,borderColor:H,
+borderThickness:v.borderThickness}));(p[r].indexLabel||n.indexLabel||p[r].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:p[r],dataSeries:n,point:{x:q,y:s},direction:0>p[r].y===a.axisY.reversed?1:-1,color:D})}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderSplineArea=
+function(a){function d(){var d=ua(y,2);if(0<d.length){if(0<n.lineThickness){b.beginPath();b.moveTo(d[0].x,d[0].y);d[0].newStrokeStyle&&(b.strokeStyle=d[0].newStrokeStyle);d[0].newLineDashArray&&b.setLineDash(d[0].newLineDashArray);for(var e=0;e<d.length-3;e+=3)if(b.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),u&&c.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),d[e+3].newStrokeStyle||d[e+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(d[e+3].x,d[e+
+3].y),d[e+3].newStrokeStyle&&(b.strokeStyle=d[e+3].newStrokeStyle),d[e+3].newLineDashArray&&b.setLineDash(d[e+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(d[0].x,d[0].y);u&&(c.beginPath(),c.moveTo(d[0].x,d[0].y));for(e=0;e<d.length-3;e+=3)b.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),u&&c.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?v=s:0>a.axisY.viewportMaximum?v=
+g.y1:0<a.axisY.viewportMinimum&&(v=f.y2);w={x:d[0].x,y:d[0].y};b.lineTo(d[d.length-1].x,v);b.lineTo(w.x,v);b.closePath();b.globalAlpha=n.fillOpacity;b.fill();b.globalAlpha=1;u&&(c.lineTo(d[d.length-1].x,v),c.lineTo(w.x,v),c.closePath(),c.fill())}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,
+k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=0,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v,w=null,y=[];if(0<p.length){var t=n._colorSet[e%n._colorSet.length],D=n.lineColor=n.options.lineColor||t,x=D;b.fillStyle=
+t;b.strokeStyle=D;b.lineWidth=n.lineThickness;var z="solid";if(b.setLineDash){var A=I(n.nullDataLineDashType,n.lineThickness),z=n.lineDashType,B=I(z,n.lineThickness);b.setLineDash(B)}for(q=!1;e<p.length;e++)if(r=p[e].x.getTime?p[e].x.getTime():p[e].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!q)))if("number"!==typeof p[e].y)0<e&&!q&&(n.connectNullData?b.setLineDash&&(0<y.length&&(n.options.nullDataLineDashType||!p[e-1].lineDashType))&&(y[y.length-1].newLineDashArray=
+A,z=n.nullDataLineDashType):(d(),y=[])),q=!0;else{r=a.axisX.convertValueToPixel(r);q=a.axisY.convertValueToPixel(p[e].y);var R=n.dataPointIds[e];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:e,x1:r,y1:q};y[y.length]={x:r,y:q};e<p.length-1&&(x!==(p[e].lineColor||D)||z!==(p[e].lineDashType||n.lineDashType))&&(x=p[e].lineColor||D,y[y.length-1].newStrokeStyle=x,b.setLineDash&&(p[e].lineDashType?(z=p[e].lineDashType,y[y.length-1].newLineDashArray=I(z,n.lineThickness)):
+(z=n.lineDashType,y[y.length-1].newLineDashArray=B)));if(0!==p[e].markerSize&&(0<p[e].markerSize||0<n.markerSize)){var J=n.getMarkerProperties(e,r,q,b),l=J.color;h.push(J);R=G(R);u&&h.push({x:r,y:q,ctx:c,type:J.type,size:J.size,color:R,borderColor:R,borderThickness:J.borderThickness})}(p[e].indexLabel||n.indexLabel||p[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[e],dataSeries:n,point:{x:r,y:q},direction:0>p[e].y===a.axisY.reversed?1:-1,
+color:t});q=!1}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStepArea=function(a){function d(){t&&(0<n.lineThickness&&b.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?y=w:0>a.axisY.viewportMaximum?y=g.y1:0<a.axisY.viewportMinimum&&(y=f.y2),b.lineTo(q,y),b.lineTo(t.x,y),b.closePath(),
+b.globalAlpha=n.fillOpacity,b.fill(),b.globalAlpha=1,u&&(c.lineTo(q,y),c.lineTo(t.x,y),c.closePath(),c.fill()),b.beginPath(),b.moveTo(q,s),c.beginPath(),c.moveTo(q,s),t={x:q,y:s})}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),
+c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=!0,r=0,q,s,v,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),y,t=null,D=!1;if(0<p.length){var x=n._colorSet[r%n._colorSet.length],z=n.lineColor=n.options.lineColor||x,A=z;b.fillStyle=x;b.strokeStyle=z;b.lineWidth=n.lineThickness;var B="solid";if(b.setLineDash){var R=
+I(n.nullDataLineDashType,n.lineThickness),B=n.lineDashType,J=I(B,n.lineThickness);b.setLineDash(J)}for(;r<p.length;r++)if(v=p[r].x.getTime?p[r].x.getTime():p[r].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!D))){var H=s;"number"!==typeof p[r].y?(n.connectNullData||(D||e)||d(),D=!0):(q=a.axisX.convertValueToPixel(v),s=a.axisY.convertValueToPixel(p[r].y),e||D?(!e&&n.connectNullData?(b.setLineDash&&(n.options.nullDataLineDashType||B===n.lineDashType&&n.lineDashType!==
+n.nullDataLineDashType)&&(b.stroke(),B=n.nullDataLineDashType,b.setLineDash(R)),b.lineTo(q,H),b.lineTo(q,s),u&&(c.lineTo(q,H),c.lineTo(q,s))):(b.beginPath(),b.moveTo(q,s),u&&(c.beginPath(),c.moveTo(q,s)),t={x:q,y:s}),D=e=!1):(b.lineTo(q,H),u&&c.lineTo(q,H),b.lineTo(q,s),u&&c.lineTo(q,s),0==r%250&&d()),r<p.length-1&&(A!==(p[r].lineColor||z)||B!==(p[r].lineDashType||n.lineDashType))&&(d(),A=p[r].lineColor||z,b.strokeStyle=A,b.setLineDash&&(p[r].lineDashType?(B=p[r].lineDashType,b.setLineDash(I(B,n.lineThickness))):
+(B=n.lineDashType,b.setLineDash(J)))),H=n.dataPointIds[r],this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:q,y1:s},0!==p[r].markerSize&&(0<p[r].markerSize||0<n.markerSize)&&(v=n.getMarkerProperties(r,q,s,b),l=v.color,h.push(v),H=G(H),u&&h.push({x:q,y:s,ctx:c,type:v.type,size:v.size,color:H,borderColor:H,borderThickness:v.borderThickness})),(p[r].indexLabel||n.indexLabel||p[r].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",
+dataPoint:p[r],dataSeries:n,point:{x:q,y:s},direction:0>p[r].y===a.axisY.reversed?1:-1,color:x}))}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStackedArea=function(a){function d(){if(!(1>k.length)){for(0<t.lineThickness&&b.stroke();0<k.length;){var a=k.pop();b.lineTo(a.x,a.y);u&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=
+t.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();u&&(v.closePath(),v.fill(),v.beginPath());k=[]}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,f=[],g=null,h=this.plotArea,l=[],k=[],m=[],n=[],p=0,e,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;u&&v.beginPath();b.save();u&&v.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(v.beginPath(),v.rect(h.x1,h.y1,h.width,h.height),
+v.clip());for(var w=[],h=0;h<a.dataSeriesIndexes.length;h++){var y=a.dataSeriesIndexes[h],t=this.data[y],D=t.dataPoints;t.dataPointIndexes=[];for(p=0;p<D.length;p++)y=D[p].x.getTime?D[p].x.getTime():D[p].x,t.dataPointIndexes[y]=p,w[y]||(m.push(y),w[y]=!0);m.sort(ya)}for(h=0;h<a.dataSeriesIndexes.length;h++){y=a.dataSeriesIndexes[h];t=this.data[y];D=t.dataPoints;w=!0;k=[];p=t.id;this._eventManager.objectMap[p]={objectType:"dataSeries",dataSeriesIndex:y};p=G(p);v.fillStyle=p;if(0<m.length){var c=t._colorSet[0],
+x=t.lineColor=t.options.lineColor||c,z=x;b.fillStyle=c;b.strokeStyle=x;b.lineWidth=t.lineThickness;var A="solid";if(b.setLineDash){var B=I(t.nullDataLineDashType,t.lineThickness),A=t.lineDashType,R=I(A,t.lineThickness);b.setLineDash(R)}for(var J=!0,p=0;p<m.length;p++){q=m[p];var H=null,H=0<=t.dataPointIndexes[q]?D[t.dataPointIndexes[q]]:{x:q,y:null};if(!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!t.connectNullData||!J)))if("number"!==typeof H.y)t.connectNullData||(J||w)||d(),
+J=!0;else{e=a.axisX.convertValueToPixel(q);var ea=l[q]?l[q]:0;if(a.axisY.logarithmic){n[q]=H.y+(n[q]?n[q]:0);if(0>=n[q])continue;r=a.axisY.convertValueToPixel(n[q])}else r=a.axisY.convertValueToPixel(H.y),r-=ea;k.push({x:e,y:s-ea});l[q]=s-r;w||J?(!w&&t.connectNullData?(b.setLineDash&&(t.options.nullDataLineDashType||A===t.lineDashType&&t.lineDashType!==t.nullDataLineDashType)&&(b.stroke(),A=t.nullDataLineDashType,b.setLineDash(B)),b.lineTo(e,r),u&&v.lineTo(e,r)):(b.beginPath(),b.moveTo(e,r),u&&(v.beginPath(),
+v.moveTo(e,r))),J=w=!1):(b.lineTo(e,r),u&&v.lineTo(e,r),0==p%250&&(d(),b.moveTo(e,r),u&&v.moveTo(e,r),k.push({x:e,y:s-ea})));p<D.length-1&&(z!==(D[p].lineColor||x)||A!==(D[p].lineDashType||t.lineDashType))&&(d(),b.beginPath(),b.moveTo(e,r),k.push({x:e,y:s-ea}),z=D[p].lineColor||x,b.strokeStyle=z,b.setLineDash&&(D[p].lineDashType?(A=D[p].lineDashType,b.setLineDash(I(A,t.lineThickness))):(A=t.lineDashType,b.setLineDash(R))));if(0<=t.dataPointIndexes[q]){var fa=t.dataPointIds[t.dataPointIndexes[q]];
+this._eventManager.objectMap[fa]={id:fa,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:t.dataPointIndexes[q],x1:e,y1:r}}0<=t.dataPointIndexes[q]&&0!==H.markerSize&&(0<H.markerSize||0<t.markerSize)&&(q=t.getMarkerProperties(t.dataPointIndexes[q],e,r,b),g=q.color,f.push(q),markerColor=G(fa),u&&f.push({x:e,y:r,ctx:v,type:q.type,size:q.size,color:markerColor,borderColor:markerColor,borderThickness:q.borderThickness}));(H.indexLabel||t.indexLabel||H.indexLabelFormatter||t.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stackedArea",dataPoint:H,dataSeries:t,point:{x:e,y:r},direction:0>D[p].y===a.axisY.reversed?1:-1,color:c})}}d();b.moveTo(e,r);u&&v.moveTo(e,r)}delete t.dataPointIndexes;t.markerColor=g}P.drawMarkers(f);b.restore();u&&v.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStackedArea100=function(a){function d(){for(0<t.lineThickness&&b.stroke();0<k.length;){var a=k.pop();
+b.lineTo(a.x,a.y);u&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=t.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();u&&(v.closePath(),v.fill(),v.beginPath());k=[]}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,f=this.plotArea,g=[],h=null,l=[],k=[],m=[],n=[],p=0,e,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;b.save();u&&v.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();
+u&&(v.beginPath(),v.rect(f.x1,f.y1,f.width,f.height),v.clip());for(var w=[],f=0;f<a.dataSeriesIndexes.length;f++){var y=a.dataSeriesIndexes[f],t=this.data[y],x=t.dataPoints;t.dataPointIndexes=[];for(p=0;p<x.length;p++)y=x[p].x.getTime?x[p].x.getTime():x[p].x,t.dataPointIndexes[y]=p,w[y]||(m.push(y),w[y]=!0);m.sort(ya)}for(f=0;f<a.dataSeriesIndexes.length;f++){y=a.dataSeriesIndexes[f];t=this.data[y];x=t.dataPoints;w=!0;c=t.id;this._eventManager.objectMap[c]={objectType:"dataSeries",dataSeriesIndex:y};
+c=G(c);v.fillStyle=c;k=[];if(0<m.length){var c=t._colorSet[p%t._colorSet.length],z=t.lineColor=t.options.lineColor||c,A=z;b.fillStyle=c;b.strokeStyle=z;b.lineWidth=t.lineThickness;var B="solid";if(b.setLineDash){var E=I(t.nullDataLineDashType,t.lineThickness),B=t.lineDashType,R=I(B,t.lineThickness);b.setLineDash(R)}for(var J=!0,p=0;p<m.length;p++){q=m[p];var H=null,H=0<=t.dataPointIndexes[q]?x[t.dataPointIndexes[q]]:{x:q,y:null};if(!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&
+(!t.connectNullData||!J)))if("number"!==typeof H.y)t.connectNullData||(J||w)||d(),J=!0;else{var ea;ea=0!==a.dataPointYSums[q]?100*(H.y/a.dataPointYSums[q]):0;e=a.axisX.convertValueToPixel(q);var fa=l[q]?l[q]:0;if(a.axisY.logarithmic){n[q]=ea+(n[q]?n[q]:0);if(0>=n[q])continue;r=a.axisY.convertValueToPixel(n[q])}else r=a.axisY.convertValueToPixel(ea),r-=fa;k.push({x:e,y:s-fa});l[q]=s-r;w||J?(!w&&t.connectNullData?(b.setLineDash&&(t.options.nullDataLineDashType||B===t.lineDashType&&t.lineDashType!==
+t.nullDataLineDashType)&&(b.stroke(),B=t.nullDataLineDashType,b.setLineDash(E)),b.lineTo(e,r),u&&v.lineTo(e,r)):(b.beginPath(),b.moveTo(e,r),u&&(v.beginPath(),v.moveTo(e,r))),J=w=!1):(b.lineTo(e,r),u&&v.lineTo(e,r),0==p%250&&(d(),b.moveTo(e,r),u&&v.moveTo(e,r),k.push({x:e,y:s-fa})));p<x.length-1&&(A!==(x[p].lineColor||z)||B!==(x[p].lineDashType||t.lineDashType))&&(d(),b.beginPath(),b.moveTo(e,r),k.push({x:e,y:s-fa}),A=x[p].lineColor||z,b.strokeStyle=A,b.setLineDash&&(x[p].lineDashType?(B=x[p].lineDashType,
+b.setLineDash(I(B,t.lineThickness))):(B=t.lineDashType,b.setLineDash(R))));if(0<=t.dataPointIndexes[q]){var Fa=t.dataPointIds[t.dataPointIndexes[q]];this._eventManager.objectMap[Fa]={id:Fa,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:t.dataPointIndexes[q],x1:e,y1:r}}0<=t.dataPointIndexes[q]&&0!==H.markerSize&&(0<H.markerSize||0<t.markerSize)&&(q=t.getMarkerProperties(p,e,r,b),h=q.color,g.push(q),markerColor=G(Fa),u&&g.push({x:e,y:r,ctx:v,type:q.type,size:q.size,color:markerColor,borderColor:markerColor,
+borderThickness:q.borderThickness}));(H.indexLabel||t.indexLabel||H.indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:H,dataSeries:t,point:{x:e,y:r},direction:0>x[p].y===a.axisY.reversed?1:-1,color:c})}}d();b.moveTo(e,r);u&&v.moveTo(e,r)}delete t.dataPointIndexes;t.markerColor=h}P.drawMarkers(g);b.restore();u&&v.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};
+A.prototype.renderBubble=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,c=0,f,g;d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(b.x1,b.y1,b.width,b.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var h=-Infinity,l=Infinity,k=0;k<a.dataSeriesIndexes.length;k++)for(var m=a.dataSeriesIndexes[k],n=this.data[m],
+p=n.dataPoints,e=0,c=0;c<p.length;c++)f=p[c].getTime?f=p[c].x.getTime():f=p[c].x,f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax||"undefined"===typeof p[c].z||(e=p[c].z,e>h&&(h=e),e<l&&(l=e));for(var r=25*Math.PI,b=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,r),k=0;k<a.dataSeriesIndexes.length;k++)if(m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,0<p.length)for(d.strokeStyle="#4572A7 ",c=0;c<p.length;c++)if(f=p[c].getTime?f=p[c].x.getTime():f=p[c].x,!(f<a.axisX.dataInfo.viewPortMin||
+f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[c].y){f=a.axisX.convertValueToPixel(f);g=a.axisY.convertValueToPixel(p[c].y);var e=p[c].z,q=2*Math.max(Math.sqrt((h===l?b/2:r+(b-r)/(h-l)*(e-l))/Math.PI)<<0,1),e=n.getMarkerProperties(c,d);e.size=q;d.globalAlpha=n.fillOpacity;P.drawMarker(f,g,d,e.type,e.size,e.color,e.borderColor,e.borderThickness);d.globalAlpha=1;var s=n.dataPointIds[c];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:c,x1:f,y1:g,size:q};
+q=G(s);u&&P.drawMarker(f,g,this._eventManager.ghostCtx,e.type,e.size,q,q,e.borderThickness);(p[c].indexLabel||n.indexLabel||p[c].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:p[c],dataSeries:n,point:{x:f,y:g},direction:1,bounds:{x1:f-e.size/2,y1:g-e.size/2,x2:f+e.size/2,y2:g+e.size/2},color:null})}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,
+animationBase:0}}};A.prototype.renderScatter=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,c=0,f,g;d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(b.x1,b.y1,b.width,b.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l],
+m=k.dataPoints;if(0<m.length){d.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var n=0,p=0,c=0;c<m.length;c++)if(f=m[c].getTime?f=m[c].x.getTime():f=m[c].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof m[c].y){f=a.axisX.convertValueToPixel(f);g=a.axisY.convertValueToPixel(m[c].y);var e=k.getMarkerProperties(c,f,g,d);d.globalAlpha=k.fillOpacity;P.drawMarker(e.x,e.y,e.ctx,e.type,e.size,e.color,e.borderColor,e.borderThickness);d.globalAlpha=
+1;Math.sqrt((n-f)*(n-f)+(p-g)*(p-g))<Math.min(e.size,5)&&m.length>Math.min(this.plotArea.width,this.plotArea.height)||(n=k.dataPointIds[c],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:c,x1:f,y1:g},n=G(n),u&&P.drawMarker(e.x,e.y,this._eventManager.ghostCtx,e.type,e.size,n,n,e.borderThickness),(m[c].indexLabel||k.indexLabel||m[c].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:m[c],dataSeries:k,point:{x:f,
+y:g},direction:1,bounds:{x1:f-e.size/2,y1:g-e.size/2,x2:f+e.size/2,y2:g+e.size/2},color:null}),n=f,p=g)}}}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderCandlestick=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,c=this.plotArea,f=0,g,h,l,k,m,n,f=this.dataPointMinWidth?
+this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.015*this.width;var p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.7*c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&
+(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));p<f&&(p=f);p>g&&(p=g);d.save();u&&b.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(b.beginPath(),b.rect(c.x1,c.y1,c.width,c.height),b.clip());for(var e=0;e<a.dataSeriesIndexes.length;e++){var r=a.dataSeriesIndexes[e],q=this.data[r],s=q.dataPoints;if(0<s.length)for(var v=5<p&&q.bevelEnabled?!0:!1,f=0;f<s.length;f++)if(s[f].getTime?n=s[f].x.getTime():n=s[f].x,!(n<a.axisX.dataInfo.viewPortMin||
+n>a.axisX.dataInfo.viewPortMax)&&null!==s[f].y&&s[f].y.length&&"number"===typeof s[f].y[0]&&"number"===typeof s[f].y[1]&&"number"===typeof s[f].y[2]&&"number"===typeof s[f].y[3]){g=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(s[f].y[0]);l=a.axisY.convertValueToPixel(s[f].y[1]);k=a.axisY.convertValueToPixel(s[f].y[2]);m=a.axisY.convertValueToPixel(s[f].y[3]);var w=g-p/2<<0,y=w+p<<0,c=s[f].color?s[f].color:q._colorSet[0],t=Math.round(Math.max(1,0.15*p)),x=0===t%2?0:0.5,z=q.dataPointIds[f];
+this._eventManager.objectMap[z]={id:z,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:f,x1:w,y1:h,x2:y,y2:l,x3:g,y3:k,x4:g,y4:m,borderThickness:t,color:c};d.strokeStyle=c;d.beginPath();d.lineWidth=t;b.lineWidth=Math.max(t,4);"candlestick"===q.type?(d.moveTo(g-x,l),d.lineTo(g-x,Math.min(h,m)),d.stroke(),d.moveTo(g-x,Math.max(h,m)),d.lineTo(g-x,k),d.stroke(),N(d,w,Math.min(h,m),y,Math.max(h,m),s[f].y[0]<=s[f].y[3]?q.risingColor:c,t,c,v,v,!1,!1,q.fillOpacity),u&&(c=G(z),b.strokeStyle=c,b.moveTo(g-
+x,l),b.lineTo(g-x,Math.min(h,m)),b.stroke(),b.moveTo(g-x,Math.max(h,m)),b.lineTo(g-x,k),b.stroke(),N(b,w,Math.min(h,m),y,Math.max(h,m),c,0,null,!1,!1,!1,!1))):"ohlc"===q.type&&(d.moveTo(g-x,l),d.lineTo(g-x,k),d.stroke(),d.beginPath(),d.moveTo(g,h),d.lineTo(w,h),d.stroke(),d.beginPath(),d.moveTo(g,m),d.lineTo(y,m),d.stroke(),u&&(c=G(z),b.strokeStyle=c,b.moveTo(g-x,l),b.lineTo(g-x,k),b.stroke(),b.beginPath(),b.moveTo(g,h),b.lineTo(w,h),b.stroke(),b.beginPath(),b.moveTo(g,m),b.lineTo(y,m),b.stroke()));
+(s[f].indexLabel||q.indexLabel||s[f].indexLabelFormatter||q.indexLabelFormatter)&&this._indexLabels.push({chartType:q.type,dataPoint:s[f],dataSeries:q,point:{x:w+(y-w)/2,y:a.axisY.reversed?k:l},direction:1,bounds:{x1:w,y1:Math.min(l,k),x2:y,y2:Math.max(l,k)},color:c})}}d.restore();u&&b.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderRangeColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;
+if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.03*this.width;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<
+0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));l<f&&(l=f);l>g&&(l=g);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var m=
+a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints;if(0<p.length)for(var e=5<l&&n.bevelEnabled?!0:!1,f=0;f<p.length;f++)if(p[f].getTime?h=p[f].x.getTime():h=p[f].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){b=a.axisX.convertValueToPixel(h);c=a.axisY.convertValueToPixel(p[f].y[0]);g=a.axisY.convertValueToPixel(p[f].y[1]);var r=a.axisX.reversed?b+a.plotType.totalDataSeries*l/2-(a.previousDataSeriesCount+
+k)*l<<0:b-a.plotType.totalDataSeries*l/2+(a.previousDataSeriesCount+k)*l<<0,q=a.axisX.reversed?r-l<<0:r+l<<0,b=p[f].color?p[f].color:n._colorSet[f%n._colorSet.length];if(c>g){var s=c,c=g;g=s}s=n.dataPointIds[f];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:r,y1:c,x2:q,y2:g};N(d,r,c,q,g,b,0,b,e,e,!1,!1,n.fillOpacity);b=G(s);u&&N(this._eventManager.ghostCtx,r,c,q,g,b,0,null,!1,!1,!1,!1);if(p[f].indexLabel||n.indexLabel||p[f].indexLabelFormatter||
+n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:p[f],dataSeries:n,indexKeyword:0,point:{x:r+(q-r)/2,y:p[f].y[1]>=p[f].y[0]?g:c},direction:p[f].y[1]>=p[f].y[0]?-1:1,bounds:{x1:r,y1:Math.min(c,g),x2:q,y2:Math.max(c,g)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:p[f],dataSeries:n,indexKeyword:1,point:{x:r+(q-r)/2,y:p[f].y[1]>=p[f].y[0]?c:g},direction:p[f].y[1]>=p[f].y[0]?1:-1,bounds:{x1:r,y1:Math.min(c,g),x2:q,y2:Math.max(c,g)},color:b})}}d.restore();
+u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderRangeBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,l,f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:
+Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var k=a.axisX.dataInfo.minDiff;isFinite(k)||(k=0.3*Math.abs(a.axisX.range));k=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(k)/Math.log(a.axisX.range):Math.abs(k)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?
+this.dataPointWidth:-Infinity,f));k<f&&(k=f);k>g&&(k=g);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var m=0;m<a.dataSeriesIndexes.length;m++){var n=a.dataSeriesIndexes[m],p=this.data[n],e=p.dataPoints;if(0<e.length){var r=5<k&&p.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(f=0;f<e.length;f++)if(e[f].getTime?
+l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&null!==e[f].y&&e[f].y.length&&"number"===typeof e[f].y[0]&&"number"===typeof e[f].y[1]){c=a.axisY.convertValueToPixel(e[f].y[0]);g=a.axisY.convertValueToPixel(e[f].y[1]);h=a.axisX.convertValueToPixel(l);h=a.axisX.reversed?h+a.plotType.totalDataSeries*k/2-(a.previousDataSeriesCount+m)*k<<0:h-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+m)*k<<0;var q=a.axisX.reversed?h-k<<0:h+k<<0;c>g&&(b=c,c=
+g,g=b);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,c,h,g,q,b,0,null,r,!1,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:f,x1:c,y1:h,x2:g,y2:q};b=G(b);u&&N(this._eventManager.ghostCtx,c,h,g,q,b,0,null,!1,!1,!1,!1);if(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:e[f],dataSeries:p,indexKeyword:0,point:{x:e[f].y[1]>=
+e[f].y[0]?c:g,y:h+(q-h)/2},direction:e[f].y[1]>=e[f].y[0]?-1:1,bounds:{x1:Math.min(c,g),y1:h,x2:Math.max(c,g),y2:q},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:e[f],dataSeries:p,indexKeyword:1,point:{x:e[f].y[1]>=e[f].y[0]?g:c,y:h+(q-h)/2},direction:e[f].y[1]>=e[f].y[0]?1:-1,bounds:{x1:Math.min(c,g),y1:h,x2:Math.max(c,g),y2:q},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,
+animationBase:0}}};A.prototype.renderRangeArea=function(a){function d(){if(w){var a=null;0<m.lineThickness&&b.stroke();for(var d=l.length-1;0<=d;d--)a=l[d],b.lineTo(a.x,a.y),c.lineTo(a.x,a.y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;c.fill();if(0<m.lineThickness){b.beginPath();b.moveTo(a.x,a.y);for(d=0;d<l.length;d++)a=l[d],b.lineTo(a.x,a.y);b.stroke()}b.beginPath();b.moveTo(r,q);c.beginPath();c.moveTo(r,q);w={x:r,y:q};l=[];l.push({x:r,y:s})}}var b=a.targetCanvasCtx||this.plotArea.ctx;
+if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=[],g=null,h=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(c.beginPath(),c.rect(h.x1,h.y1,h.width,h.height),c.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var l=[],k=a.dataSeriesIndexes[h],m=this.data[k],n=m.dataPoints,f=m.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:k};f=G(f);c.fillStyle=f;var f=[],p=!0,e=0,r,q,s,v,w=null;if(0<n.length){var y=
+m._colorSet[e%m._colorSet.length],t=m.lineColor=m.options.lineColor||y,x=t;b.fillStyle=y;b.strokeStyle=t;b.lineWidth=m.lineThickness;var z="solid";if(b.setLineDash){var A=I(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType,B=I(z,m.lineThickness);b.setLineDash(B)}for(var E=!0;e<n.length;e++)if(v=n[e].x.getTime?n[e].x.getTime():n[e].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!E)))if(null!==n[e].y&&n[e].y.length&&"number"===typeof n[e].y[0]&&"number"===
+typeof n[e].y[1]){r=a.axisX.convertValueToPixel(v);q=a.axisY.convertValueToPixel(n[e].y[0]);s=a.axisY.convertValueToPixel(n[e].y[1]);p||E?(m.connectNullData&&!p?(b.setLineDash&&(m.options.nullDataLineDashType||z===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=B,z=m.nullDataLineDashType,b.setLineDash(A)),b.lineTo(r,q),u&&c.lineTo(r,q),l.push({x:r,y:s})):(b.beginPath(),b.moveTo(r,q),w={x:r,y:q},l=[],l.push({x:r,y:s}),u&&(c.beginPath(),c.moveTo(r,q))),E=p=
+!1):(b.lineTo(r,q),l.push({x:r,y:s}),u&&c.lineTo(r,q),0==e%250&&d());v=m.dataPointIds[e];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:e,x1:r,y1:q,y2:s};e<n.length-1&&(x!==(n[e].lineColor||t)||z!==(n[e].lineDashType||m.lineDashType))&&(d(),x=n[e].lineColor||t,l[l.length-1].newStrokeStyle=x,b.strokeStyle=x,b.setLineDash&&(n[e].lineDashType?(z=n[e].lineDashType,l[l.length-1].newLineDashArray=I(z,m.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):
+(z=m.lineDashType,l[l.length-1].newLineDashArray=B,b.setLineDash(B))));if(0!==n[e].markerSize&&(0<n[e].markerSize||0<m.markerSize)){var R=m.getMarkerProperties(e,r,s,b);f.push(R);var J=G(v);u&&f.push({x:r,y:s,ctx:c,type:R.type,size:R.size,color:J,borderColor:J,borderThickness:R.borderThickness});R=m.getMarkerProperties(e,r,q,b);g=R.color;f.push(R);J=G(v);u&&f.push({x:r,y:q,ctx:c,type:R.type,size:R.size,color:J,borderColor:J,borderThickness:R.borderThickness})}if(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||
+m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:n[e],dataSeries:m,indexKeyword:0,point:{x:r,y:q},direction:n[e].y[0]>n[e].y[1]===a.axisY.reversed?-1:1,color:y}),this._indexLabels.push({chartType:"rangeArea",dataPoint:n[e],dataSeries:m,indexKeyword:1,point:{x:r,y:s},direction:n[e].y[0]>n[e].y[1]===a.axisY.reversed?1:-1,color:y})}else E||p||d(),E=!0;d();P.drawMarkers(f);m.markerColor=g}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,
+animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderRangeSplineArea=function(a){function d(a,d){var e=ua(q,2);if(0<e.length){if(0<k.lineThickness){b.strokeStyle=d;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var f=0;f<e.length-3;f+=3){if(e[f].newStrokeStyle||e[f].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),e[f].newStrokeStyle&&(b.strokeStyle=e[f].newStrokeStyle),e[f].newLineDashArray&&b.setLineDash(e[f].newLineDashArray);
+b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}b.stroke()}b.beginPath();b.moveTo(e[0].x,e[0].y);u&&(c.beginPath(),c.moveTo(e[0].x,e[0].y));for(f=0;f<e.length-3;f+=3)b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y),u&&c.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y);e=ua(s,2);b.lineTo(s[s.length-1].x,s[s.length-1].y);for(f=e.length-1;2<f;f-=3)b.bezierCurveTo(e[f-1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y),u&&c.bezierCurveTo(e[f-
+1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y);b.closePath();b.globalAlpha=k.fillOpacity;b.fill();u&&(c.closePath(),c.fill());b.globalAlpha=1;if(0<k.lineThickness){b.strokeStyle=d;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var g=f=0;f<e.length-3;f+=3,g++){if(q[g].newStrokeStyle||q[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),q[g].newStrokeStyle&&(b.strokeStyle=q[g].newStrokeStyle),q[g].newLineDashArray&&b.setLineDash(q[g].newLineDashArray);
+b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}b.stroke()}b.beginPath()}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=[],g=null,h=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(c.beginPath(),c.rect(h.x1,h.y1,h.width,h.height),c.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l],m=k.dataPoints,f=k.id;this._eventManager.objectMap[f]=
+{objectType:"dataSeries",dataSeriesIndex:l};f=G(f);c.fillStyle=f;var f=[],n=0,p,e,r,q=[],s=[];if(0<m.length){var v=k._colorSet[n%k._colorSet.length],w=k.lineColor=k.options.lineColor||v,y=w;b.fillStyle=v;b.lineWidth=k.lineThickness;var t="solid",x;if(b.setLineDash){var z=I(k.nullDataLineDashType,k.lineThickness),t=k.lineDashType;x=I(t,k.lineThickness)}for(e=!1;n<m.length;n++)if(p=m[n].x.getTime?m[n].x.getTime():m[n].x,!(p<a.axisX.dataInfo.viewPortMin||p>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||
+!e)))if(null!==m[n].y&&m[n].y.length&&"number"===typeof m[n].y[0]&&"number"===typeof m[n].y[1]){p=a.axisX.convertValueToPixel(p);e=a.axisY.convertValueToPixel(m[n].y[0]);r=a.axisY.convertValueToPixel(m[n].y[1]);var A=k.dataPointIds[n];this._eventManager.objectMap[A]={id:A,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:n,x1:p,y1:e,y2:r};q[q.length]={x:p,y:e};s[s.length]={x:p,y:r};n<m.length-1&&(y!==(m[n].lineColor||w)||t!==(m[n].lineDashType||k.lineDashType))&&(y=m[n].lineColor||w,q[q.length-
+1].newStrokeStyle=y,b.setLineDash&&(m[n].lineDashType?(t=m[n].lineDashType,q[q.length-1].newLineDashArray=I(t,k.lineThickness)):(t=k.lineDashType,q[q.length-1].newLineDashArray=x)));if(0!==m[n].markerSize&&(0<m[n].markerSize||0<k.markerSize)){var B=k.getMarkerProperties(n,p,e,b),g=B.color;f.push(B);var E=G(A);u&&f.push({x:p,y:e,ctx:c,type:B.type,size:B.size,color:E,borderColor:E,borderThickness:B.borderThickness});B=k.getMarkerProperties(n,p,r,b);f.push(B);E=G(A);u&&f.push({x:p,y:r,ctx:c,type:B.type,
+size:B.size,color:E,borderColor:E,borderThickness:B.borderThickness})}if(m[n].indexLabel||k.indexLabel||m[n].indexLabelFormatter||k.indexLabelFormatter)this._indexLabels.push({chartType:"splineArea",dataPoint:m[n],dataSeries:k,indexKeyword:0,point:{x:p,y:e},direction:m[n].y[0]<=m[n].y[1]?-1:1,color:v}),this._indexLabels.push({chartType:"splineArea",dataPoint:m[n],dataSeries:k,indexKeyword:1,point:{x:p,y:r},direction:m[n].y[0]<=m[n].y[1]?1:-1,color:v});e=!1}else 0<n&&!e&&(k.connectNullData?b.setLineDash&&
+(0<q.length&&(k.options.nullDataLineDashType||!m[n-1].lineDashType))&&(q[q.length-1].newLineDashArray=z,t=k.nullDataLineDashType):(d(x,w),q=[],s=[])),e=!0;d(x,w);P.drawMarkers(f);k.markerColor=g}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};var Ga=function(a,d,b,c,f,g,h,l,k){if(!(0>b)){"undefined"===typeof l&&(l=1);if(!u){var m=Number((h%(2*Math.PI)).toFixed(8));Number((g%
+(2*Math.PI)).toFixed(8))===m&&(h-=1E-4)}a.save();a.globalAlpha=l;"pie"===f?(a.beginPath(),a.moveTo(d.x,d.y),a.arc(d.x,d.y,b,g,h,!1),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===f&&(a.beginPath(),a.arc(d.x,d.y,b,g,h,!1),0<=k&&a.arc(d.x,d.y,k*b,h,g,!0),a.closePath(),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};A.prototype.renderPie=function(a){function d(){if(m&&n){for(var a=0,b=0,c=0,d=0,f=0;f<n.length;f++){var g=
+n[f],h=m.dataPointIds[f],l={id:h,objectType:"dataPoint",dataPointIndex:f,dataSeriesIndex:0};r.push(l);var p={percent:null,total:null},q=null,p=k.getPercentAndTotal(m,g);if(m.indexLabelFormatter||g.indexLabelFormatter)q={chart:k.options,dataSeries:m,dataPoint:g,total:p.total,percent:p.percent};p=g.indexLabelFormatter?g.indexLabelFormatter(q):g.indexLabel?k.replaceKeywordsWithValue(g.indexLabel,g,m,f):m.indexLabelFormatter?m.indexLabelFormatter(q):m.indexLabel?k.replaceKeywordsWithValue(m.indexLabel,
+g,m,f):g.label?g.label:"";k._eventManager.objectMap[h]=l;l.center={x:t.x,y:t.y};l.y=g.y;l.radius=B;l.percentInnerRadius=F;l.indexLabelText=p;l.indexLabelPlacement=m.indexLabelPlacement;l.indexLabelLineColor=g.indexLabelLineColor?g.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:g.color?g.color:m._colorSet[f%m._colorSet.length];l.indexLabelLineThickness=x(g.indexLabelLineThickness)?m.indexLabelLineThickness:g.indexLabelLineThickness;l.indexLabelLineDashType=g.indexLabelLineDashType?
+g.indexLabelLineDashType:m.indexLabelLineDashType;l.indexLabelFontColor=g.indexLabelFontColor?g.indexLabelFontColor:m.indexLabelFontColor;l.indexLabelFontStyle=g.indexLabelFontStyle?g.indexLabelFontStyle:m.indexLabelFontStyle;l.indexLabelFontWeight=g.indexLabelFontWeight?g.indexLabelFontWeight:m.indexLabelFontWeight;l.indexLabelFontSize=g.indexLabelFontSize?g.indexLabelFontSize:m.indexLabelFontSize;l.indexLabelFontFamily=g.indexLabelFontFamily?g.indexLabelFontFamily:m.indexLabelFontFamily;l.indexLabelBackgroundColor=
+g.indexLabelBackgroundColor?g.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;l.indexLabelMaxWidth=g.indexLabelMaxWidth?g.indexLabelMaxWidth:m.indexLabelMaxWidth?m.indexLabelMaxWidth:0.33*e.width;l.indexLabelWrap="undefined"!==typeof g.indexLabelWrap?g.indexLabelWrap:m.indexLabelWrap;l.startAngle=0===f?m.startAngle?m.startAngle/180*Math.PI:0:r[f-1].endAngle;l.startAngle=(l.startAngle+2*Math.PI)%(2*Math.PI);l.endAngle=l.startAngle+
+2*Math.PI/u*Math.abs(g.y);g=(l.endAngle+l.startAngle)/2;g=(g+2*Math.PI)%(2*Math.PI);l.midAngle=g;if(l.midAngle>Math.PI/2-w&&l.midAngle<Math.PI/2+w){if(0===a||r[c].midAngle>l.midAngle)c=f;a++}else if(l.midAngle>3*Math.PI/2-w&&l.midAngle<3*Math.PI/2+w){if(0===b||r[d].midAngle>l.midAngle)d=f;b++}l.hemisphere=g>Math.PI/2&&g<=3*Math.PI/2?"left":"right";l.indexLabelTextBlock=new W(k.plotArea.ctx,{fontSize:l.indexLabelFontSize,fontFamily:l.indexLabelFontFamily,fontColor:l.indexLabelFontColor,fontStyle:l.indexLabelFontStyle,
+fontWeight:l.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:l.indexLabelBackgroundColor,maxWidth:l.indexLabelMaxWidth,maxHeight:l.indexLabelWrap?5*l.indexLabelFontSize:1.5*l.indexLabelFontSize,text:l.indexLabelText,padding:0,textBaseline:"top"});l.indexLabelTextBlock.measureText()}h=g=0;p=!1;for(f=0;f<n.length;f++)l=r[(c+f)%n.length],1<a&&(l.midAngle>Math.PI/2-w&&l.midAngle<Math.PI/2+w)&&(g<=a/2&&!p?(l.hemisphere="right",g++):(l.hemisphere="left",p=!0));p=!1;for(f=0;f<n.length;f++)l=
+r[(d+f)%n.length],1<b&&(l.midAngle>3*Math.PI/2-w&&l.midAngle<3*Math.PI/2+w)&&(h<=b/2&&!p?(l.hemisphere="left",h++):(l.hemisphere="right",p=!0))}}function b(a){var b=k.plotArea.ctx;b.clearRect(e.x1,e.y1,e.width,e.height);b.fillStyle=k.backgroundColor;b.fillRect(e.x1,e.y1,e.width,e.height);for(b=0;b<n.length;b++){var c=r[b].startAngle,d=r[b].endAngle;if(d>c){var f=0.07*B*Math.cos(r[b].midAngle),g=0.07*B*Math.sin(r[b].midAngle),l=!1;if(n[b].exploded){if(1E-9<Math.abs(r[b].center.x-(t.x+f))||1E-9<Math.abs(r[b].center.y-
+(t.y+g)))r[b].center.x=t.x+f*a,r[b].center.y=t.y+g*a,l=!0}else if(0<Math.abs(r[b].center.x-t.x)||0<Math.abs(r[b].center.y-t.y))r[b].center.x=t.x+f*(1-a),r[b].center.y=t.y+g*(1-a),l=!0;l&&(f={},f.dataSeries=m,f.dataPoint=m.dataPoints[b],f.index=b,k.toolTip.highlightObjects([f]));Ga(k.plotArea.ctx,r[b].center,r[b].radius,n[b].color?n[b].color:m._colorSet[b%m._colorSet.length],m.type,c,d,m.fillOpacity,r[b].percentInnerRadius)}}a=k.plotArea.ctx;a.save();a.fillStyle="black";a.strokeStyle="grey";a.textBaseline=
+"middle";a.lineJoin="round";for(b=b=0;b<n.length;b++)c=r[b],c.indexLabelText&&(c.indexLabelTextBlock.y-=c.indexLabelTextBlock.height/2,d=0,d="left"===c.hemisphere?"inside"!==m.indexLabelPlacement?-(c.indexLabelTextBlock.width+p):-c.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-c.indexLabelTextBlock.width/2,c.indexLabelTextBlock.x+=d,c.indexLabelTextBlock.render(!0),c.indexLabelTextBlock.x-=d,c.indexLabelTextBlock.y+=c.indexLabelTextBlock.height/2,"inside"!==c.indexLabelPlacement&&
+0<c.indexLabelLineThickness&&(d=c.center.x+B*Math.cos(c.midAngle),f=c.center.y+B*Math.sin(c.midAngle),a.strokeStyle=c.indexLabelLineColor,a.lineWidth=c.indexLabelLineThickness,a.setLineDash&&a.setLineDash(I(c.indexLabelLineDashType,c.indexLabelLineThickness)),a.beginPath(),a.moveTo(d,f),a.lineTo(c.indexLabelTextBlock.x,c.indexLabelTextBlock.y),a.lineTo(c.indexLabelTextBlock.x+("left"===c.hemisphere?-p:p),c.indexLabelTextBlock.y),a.stroke()),a.lineJoin="miter");a.save()}function c(a,b){var c=0,c=a.indexLabelTextBlock.y-
+a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-f}function f(a){for(var b=null,d=1;d<n.length;d++)if(b=(a+d+r.length)%r.length,r[b].hemisphere!==r[a].hemisphere){b=null;break}else if(r[b].indexLabelText&&b!==a&&(0>c(r[b],r[a])||("right"===r[a].hemisphere?r[b].indexLabelTextBlock.y>=r[a].indexLabelTextBlock.y:
+r[b].indexLabelTextBlock.y<=r[a].indexLabelTextBlock.y)))break;else b=null;return b}function g(a,b,d){d=(d||0)+1;if(1E3<d)return 0;b=b||0;var e=0,k=t.y-1*s,l=t.y+1*s;if(0<=a&&a<n.length){var h=r[a];if(0>b&&h.indexLabelTextBlock.y<k||0<b&&h.indexLabelTextBlock.y>l)return 0;var p=0,m=0,m=p=p=0;0>b?h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2>k&&h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+b<k&&(b=-(k-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+b))):h.indexLabelTextBlock.y+
+h.indexLabelTextBlock.height/2<k&&h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+b>l&&(b=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+b-l);b=h.indexLabelTextBlock.y+b;k=0;k="right"===h.hemisphere?t.x+Math.sqrt(Math.pow(s,2)-Math.pow(b-t.y,2)):t.x-Math.sqrt(Math.pow(s,2)-Math.pow(b-t.y,2));m=t.x+B*Math.cos(h.midAngle);p=t.y+B*Math.sin(h.midAngle);p=Math.sqrt(Math.pow(k-m,2)+Math.pow(b-p,2));m=Math.acos(B/s);p=Math.acos((s*s+B*B-p*p)/(2*B*s));b=p<m?b-h.indexLabelTextBlock.y:0;k=null;
+for(l=1;l<n.length;l++)if(k=(a-l+r.length)%r.length,r[k].hemisphere!==r[a].hemisphere){k=null;break}else if(r[k].indexLabelText&&r[k].hemisphere===r[a].hemisphere&&k!==a&&(0>c(r[k],r[a])||("right"===r[a].hemisphere?r[k].indexLabelTextBlock.y<=r[a].indexLabelTextBlock.y:r[k].indexLabelTextBlock.y>=r[a].indexLabelTextBlock.y)))break;else k=null;m=k;p=f(a);l=k=0;0>b?(l="right"===h.hemisphere?m:p,e=b,null!==l&&(m=-b,b=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-(r[l].indexLabelTextBlock.y+
+r[l].indexLabelTextBlock.height/2),b-m<q&&(k=-m,l=g(l,k,d+1),+l.toFixed(y)>+k.toFixed(y)&&(e=b>q?-(b-q):-(m-(l-k)))))):0<b&&(l="right"===h.hemisphere?p:m,e=b,null!==l&&(m=b,b=r[l].indexLabelTextBlock.y-r[l].indexLabelTextBlock.height/2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2),b-m<q&&(k=m,l=g(l,k,d+1),+l.toFixed(y)<+k.toFixed(y)&&(e=b>q?b-q:m-(k-l)))));e&&(d=h.indexLabelTextBlock.y+e,b=0,b="right"===h.hemisphere?t.x+Math.sqrt(Math.pow(s,2)-Math.pow(d-t.y,2)):t.x-Math.sqrt(Math.pow(s,
+2)-Math.pow(d-t.y,2)),h.midAngle>Math.PI/2-w&&h.midAngle<Math.PI/2+w?(k=(a-1+r.length)%r.length,k=r[k],a=r[(a+1+r.length)%r.length],"left"===h.hemisphere&&"right"===k.hemisphere&&b>k.indexLabelTextBlock.x?b=k.indexLabelTextBlock.x-15:"right"===h.hemisphere&&("left"===a.hemisphere&&b<a.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x+15)):h.midAngle>3*Math.PI/2-w&&h.midAngle<3*Math.PI/2+w&&(k=(a-1+r.length)%r.length,k=r[k],a=r[(a+1+r.length)%r.length],"right"===h.hemisphere&&"left"===k.hemisphere&&
+b<k.indexLabelTextBlock.x?b=k.indexLabelTextBlock.x+15:"left"===h.hemisphere&&("right"===a.hemisphere&&b>a.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x-15)),h.indexLabelTextBlock.y=d,h.indexLabelTextBlock.x=b,h.indexLabelAngle=Math.atan2(h.indexLabelTextBlock.y-t.y,h.indexLabelTextBlock.x-t.x))}return e}function h(){var a=k.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=a=0,d=0,l=!0,b=0;10>b&&(1>b||0<d);b++){if(m.radius||!m.radius&&
+"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&B-d<=E)l=!1;l&&(B-=d);d=0;if("inside"!==m.indexLabelPlacement){s=B*v;for(a=0;a<n.length;a++){var h=r[a];h.indexLabelTextBlock.x=t.x+s*Math.cos(h.midAngle);h.indexLabelTextBlock.y=t.y+s*Math.sin(h.midAngle);h.indexLabelAngle=h.midAngle;h.radius=B;h.percentInnerRadius=F}for(var w,u,a=0;a<n.length;a++){var h=r[a],x=f(a);if(null!==x){w=r[a];u=r[x];var z=0,z=c(w,u)-q;if(0>z){for(var A=u=0,D=0;D<n.length;D++)D!==a&&r[D].hemisphere===h.hemisphere&&
+(r[D].indexLabelTextBlock.y<h.indexLabelTextBlock.y?u++:A++);u=z/(u+A||1)*A;var A=-1*(z-u),C=D=0;"right"===h.hemisphere?(D=g(a,u),A=-1*(z-D),C=g(x,A),+C.toFixed(y)<+A.toFixed(y)&&+D.toFixed(y)<=+u.toFixed(y)&&g(a,-(A-C))):(D=g(x,u),A=-1*(z-D),C=g(a,A),+C.toFixed(y)<+A.toFixed(y)&&+D.toFixed(y)<=+u.toFixed(y)&&g(x,-(A-C)))}}}}else for(a=0;a<n.length;a++)h=r[a],s="pie"===m.type?0.7*B:0.8*B,x=t.x+s*Math.cos(h.midAngle),u=t.y+s*Math.sin(h.midAngle),h.indexLabelTextBlock.x=x,h.indexLabelTextBlock.y=u;
+for(a=0;a<n.length;a++)if(h=r[a],x=h.indexLabelTextBlock.measureText(),0!==x.height&&0!==x.width)x=x=0,"right"===h.hemisphere?(x=e.x2-(h.indexLabelTextBlock.x+h.indexLabelTextBlock.width+p),x*=-1):x=e.x1-(h.indexLabelTextBlock.x-h.indexLabelTextBlock.width-p),0<x&&(!l&&h.indexLabelText&&(u="right"===h.hemisphere?e.x2-h.indexLabelTextBlock.x:h.indexLabelTextBlock.x-e.x1,0.3*h.indexLabelTextBlock.maxWidth>u?h.indexLabelText="":h.indexLabelTextBlock.maxWidth=0.85*u,0.3*h.indexLabelTextBlock.maxWidth<
+u&&(h.indexLabelTextBlock.x-="right"===h.hemisphere?2:-2)),Math.abs(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-t.y)<B||Math.abs(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2-t.y)<B)&&(x/=Math.abs(Math.cos(h.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)),x=x=0,0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?(x=e.y2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+5),x*=-1):x=e.y1-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-5),0<x&&(!l&&h.indexLabelText&&(u=0<h.indexLabelAngle&&
+h.indexLabelAngle<Math.PI?-1:1,0===g(a,x*u)&&g(a,2*u)),Math.abs(h.indexLabelTextBlock.x-t.x)<B&&(x/=Math.abs(Math.sin(h.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)));var G=function(a,b,c){for(var d=[],e=0;d.push(r[b]),b!==c;b=(b+1+n.length)%n.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,b=-1,d=0,e=!1,g=0;g<
+n.length;g++)if(e=!1,w=r[g],w.indexLabelText){var h=f(g);if(null!==h){var k=r[h];z=0;z=c(w,k);var l;if(l=0>z){l=w.indexLabelTextBlock.x;var m=w.indexLabelTextBlock.y-w.indexLabelTextBlock.height/2,q=w.indexLabelTextBlock.y+w.indexLabelTextBlock.height/2,s=k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2,t=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width,v=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2;l=w.indexLabelTextBlock.x+w.indexLabelTextBlock.width<k.indexLabelTextBlock.x-p||
+l>t+p||m>v+p||q<s-p?!1:!0}l?(0>a&&(a=g),h!==a&&(b=h,d+=-z),0===g%Math.max(n.length/10,3)&&(e=!0)):e=!0;e&&(0<d&&0<=a&&0<=b)&&(G(d,a,b),b=a=-1,d=0)}}0<d&&G(d,a,b)})()}}function l(){k.plotArea.layoutManager.reset();k.title&&(k.title.dockInsidePlotArea||"center"===k.title.horizontalAlign&&"center"===k.title.verticalAlign)&&k.title.render();if(k.subtitles)for(var a=0;a<k.subtitles.length;a++){var b=k.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}k.legend&&
+(k.legend.dockInsidePlotArea||"center"===k.legend.horizontalAlign&&"center"===k.legend.verticalAlign)&&k.legend.render();z.fNg&&z.fNg(k)}var k=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],n=m.dataPoints,p=10,e=this.plotArea,r=[],q=2,s,v=1.3,w=20/180*Math.PI,y=6,t={x:(e.x2+e.x1)/2,y:(e.y2+e.y1)/2},u=0;a=!1;for(var A=0;A<n.length;A++)u+=Math.abs(n[A].y),!a&&("undefined"!==typeof n[A].indexLabel&&null!==n[A].indexLabel&&0<n[A].indexLabel.toString().length)&&(a=!0),
+!a&&("undefined"!==typeof n[A].label&&null!==n[A].label&&0<n[A].label.toString().length)&&(a=!0);if(0!==u){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var B="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(e.width,e.height)/2:0.92*Math.min(e.width,e.height)/2;m.radius&&(B=Na(m.radius,B));var E="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Na(m.innerRadius,B):0.7*B;m.radius=B;"doughnut"===m.type&&(m.innerRadius=E);var F=Math.min(E/B,(B-
+1)/B);this.pieDoughnutClickHandler=function(a){k.isAnimating||!x(a.dataSeries.explodeOnClick)&&!a.dataSeries.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&k._animator.animate(0,500,function(a){b(a);l()}))};d();h();h();h();h();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=k.plotArea.ctx;b.clearRect(e.x1,e.y1,e.width,e.height);b.fillStyle=k.backgroundColor;b.fillRect(e.x1,e.y1,e.width,e.height);a=
+r[0].startAngle+2*Math.PI*a;for(b=0;b<n.length;b++){var c=0===b?r[b].startAngle:d,d=c+(r[b].endAngle-r[b].startAngle),f=!1;d>a&&(d=a,f=!0);var g=n[b].color?n[b].color:m._colorSet[b%m._colorSet.length];d>c&&Ga(k.plotArea.ctx,r[b].center,r[b].radius,g,m.type,c,d,m.fillOpacity,r[b].percentInnerRadius);if(f)break}l()},function(){k.disableToolTip=!1;k._animator.animate(0,k.animatedRender?500:0,function(a){b(a);l()})})}}};A.prototype.animationRequestId=null;A.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||
+window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();A.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;A.prototype.set=function(a,d,b){b="undefined"===typeof b?!0:b;"options"===a?(this.options=d,
+b&&this.render()):A.base.set.call(this,a,d,b)};A.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var d=a.format?a.format:"png",b=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+d);Ba(this.canvas,d,b)};A.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),d=document.createElement("iframe");d.setAttribute("class","canvasjs-chart-print-frame");d.setAttribute("style","position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");
+d.style.height=this.height+"px";this._canvasJSContainer.appendChild(d);var b=this,c=d.contentWindow||d.contentDocument.document||d.contentDocument;c.document.open();c.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="'+a+'"/><body/></html>');c.document.close();setTimeout(function(){c.focus();c.print();setTimeout(function(){b._canvasJSContainer.removeChild(d)},1E3)},500)};ja.prototype.registerSpace=function(a,d){"top"===a?this._topOccupied+=
+d.height:"bottom"===a?this._bottomOccupied+=d.height:"left"===a?this._leftOccupied+=d.width:"right"===a&&(this._rightOccupied+=d.width)};ja.prototype.unRegisterSpace=function(a,d){"top"===a?this._topOccupied-=d.height:"bottom"===a?this._bottomOccupied-=d.height:"left"===a?this._leftOccupied-=d.width:"right"===a&&(this._rightOccupied-=d.width)};ja.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,
+width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};ja.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};U(W,M);W.prototype.render=function(a){a&&this.ctx.save();var d=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var b=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+b);"middle"===this.textBaseline&&(b=-this._lineHeight/
+2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var c=0,f=this.padding,g=null;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,b,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(b=0;b<this._wrappedText.lines.length;b++)g=this._wrappedText.lines[b],"right"===this.horizontalAlign?c=this.width-g.width-this.padding:"left"===this.horizontalAlign?
+c=this.padding:"center"===this.horizontalAlign&&(c=(this.width-2*this.padding)/2-g.width/2+this.padding),this.ctx.fillText(g.text,c,f),f+=g.height;this.ctx.font=d;a&&this.ctx.restore()};W.prototype.setText=function(a){this.text=a;this._isDirty=!0;this._wrappedText=null};W.prototype.measureText=function(){this._lineHeight=Ja(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,
+height:this.height}};W.prototype._getLineWithWidth=function(a,d,b){a=String(a);if(!a)return{text:"",width:0};var c=b=0,f=a.length-1,g=Infinity;for(this.ctx.font=this._getFontString();c<=f;){var g=Math.floor((c+f)/2),h=a.substr(0,g+1);b=this.ctx.measureText(h).width;if(b<d)c=g+1;else if(b>d)f=g-1;else break}b>d&&1<h.length&&(h=h.substr(0,h.length-1),b=this.ctx.measureText(h).width);d=!0;if(h.length===a.length||" "===a[h.length])d=!1;d&&(a=h.split(" "),1<a.length&&a.pop(),h=a.join(" "),b=this.ctx.measureText(h).width);
+return{text:h,width:b}};W.prototype._wrapText=function(){var a=new String(ka(String(this.text))),d=[],b=this.ctx.font,c=0,f=0;for(this.ctx.font=this._getFontString();0<a.length;){var g=this.maxHeight-2*this.padding,h=this._getLineWithWidth(a,this.maxWidth-2*this.padding,!1);h.height=this._lineHeight;d.push(h);var l=f,f=Math.max(f,h.width),c=c+h.height,a=ka(a.slice(h.text.length,a.length));g&&c>g&&(h=d.pop(),c-=h.height,f=l)}this._wrappedText={lines:d,width:f,height:c};this.width=f+2*this.padding;
+this.height=c+2*this.padding;this.ctx.font=b};W.prototype._getFontString=function(){var a;a=""+(this.fontStyle?this.fontStyle+" ":"");a+=this.fontWeight?this.fontWeight+" ":"";a+=this.fontSize?this.fontSize+"px ":"";var d=this.fontFamily?this.fontFamily+"":"";!u&&d&&(d=d.split(",")[0],"'"!==d[0]&&'"'!==d[0]&&(d="'"+d+"'"));return a+=d};U(ma,M);ma.prototype.render=function(){if(this.text){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,d=a.layoutManager.getFreeSpace(),b=d.x1,c=d.y1,f=
+0,g=0,h=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,l,k;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=d.width-4-h*("center"===this.horizontalAlign?2:1)),g=0.5*d.height-this.margin-2,f=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=d.height-4),g=0.5*d.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&
+(this.maxWidth=d.width-4),g=0.5*d.height-4));this.wrap||(g=Math.min(g,Math.max(1.5*this.fontSize,this.fontSize+2.5*this.padding)));var g=new W(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:g,cornerRadius:this.cornerRadius,
+text:this.text,padding:this.padding,textBaseline:"top"}),m=g.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(c=d.y1+2,k="top"):"bottom"===this.verticalAlign&&(c=d.y2-2-m.height,k="bottom"),"left"===this.horizontalAlign?b=d.x1+2:"center"===this.horizontalAlign?b=d.x1+d.width/2-m.width/2:"right"===this.horizontalAlign&&(b=d.x2-2-m.width-h),l=this.horizontalAlign,this.width=m.width,this.height=m.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?
+(b=d.x1+2,c=d.y2-2-(this.maxWidth/2-m.width/2),f=-90,k="left",this.width=m.height,this.height=m.width):"right"===this.horizontalAlign?(b=d.x2-2,c=d.y1+2+(this.maxWidth/2-m.width/2),f=90,k="right",this.width=m.height,this.height=m.width):"center"===this.horizontalAlign&&(c=a.y1+(a.height/2-m.height/2),b=a.x1+(a.width/2-m.width/2),k="center",this.width=m.width,this.height=m.height),l="center");g.x=b;g.y=c;g.angle=f;g.horizontalAlign=l;g.render(!0);a.layoutManager.registerSpace(k,{width:this.width+("left"===
+k||"right"===k?this.margin+2:0),height:this.height+("top"===k||"bottom"===k?this.margin+2:0)});this.bounds={x1:b,y1:c,x2:b+this.width,y2:c+this.height};this.ctx.textBaseline="top"}};U(va,M);va.prototype.render=ma.prototype.render;U(wa,M);wa.prototype.render=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,d=a.layoutManager.getFreeSpace(),b=null,c=0,f=0,g=0,h=0,l=this.markerMargin=this.chart.options.legend&&!x(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:
+0.3*this.fontSize;this.height=0;var k=[],m=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation="horizontal",b=this.verticalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:d.width,h=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*d.height):"center"===this.verticalAlign&&(this.orientation="vertical",b=this.horizontalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*d.width,h=this.maxHeight=null!==this.maxHeight?this.maxHeight:d.height);for(var n=
+0;n<this.dataSeries.length;n++){var p=this.dataSeries[n];if("pie"!==p.type&&"doughnut"!==p.type&&"funnel"!==p.type){var e=p.legendMarkerType=p.legendMarkerType?p.legendMarkerType:"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type&&"scatter"!==p.type&&"bubble"!==p.type||!p.markerType?$.getDefaultLegendMarker(p.type):p.markerType,r=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,q=p.legendMarkerColor=
+p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:p._colorSet[0],s=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,v=p.legendMarkerBorderColor?p.legendMarkerBorderColor:p.markerBorderColor,w=p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:p.markerBorderThickness?Math.max(1,Math.round(0.2*s)):0,r=this.chart.replaceKeywordsWithValue(r,p.dataPoints[0],p,n),e={markerType:e,markerColor:q,text:r,textBlock:null,chartType:p.type,markerSize:s,
+lineColor:p._colorSet[0],dataSeriesIndex:p.index,dataPointIndex:null,markerBorderColor:v,markerBorderThickness:w};k.push(e)}else for(var u=0;u<p.dataPoints.length;u++){var t=p.dataPoints[u],e=t.legendMarkerType?t.legendMarkerType:p.legendMarkerType?p.legendMarkerType:$.getDefaultLegendMarker(p.type),r=t.legendText?t.legendText:p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:t}):t.name?t.name:"DataPoint: "+(u+1),q=
+t.legendMarkerColor?t.legendMarkerColor:p.legendMarkerColor?p.legendMarkerColor:t.color?t.color:p.color?p.color:p._colorSet[u%p._colorSet.length],s=0.75*this.lineHeight,v=t.legendMarkerBorderColor?t.legendMarkerBorderColor:p.legendMarkerBorderColor?p.legendMarkerBorderColor:t.markerBorderColor?t.markerBorderColor:p.markerBorderColor,w=t.legendMarkerBorderThickness?t.legendMarkerBorderThickness:p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:t.markerBorderThickness||p.markerBorderThickness?
+Math.max(1,Math.round(0.2*s)):0,r=this.chart.replaceKeywordsWithValue(r,t,p,u),e={markerType:e,markerColor:q,text:r,textBlock:null,chartType:p.type,markerSize:s,dataSeriesIndex:n,dataPointIndex:u,markerBorderColor:v,markerBorderThickness:w};(t.showInLegend||p.showInLegend&&!1!==t.showInLegend)&&k.push(e)}}!0===this.reversed&&k.reverse();if(0<k.length){p=null;q=u=r=t=0;r=null!==this.itemWidth?null!==this.itemMaxWidth?Math.min(this.itemWidth,this.itemMaxWidth,g):this.itemMaxWidth=Math.min(this.itemWidth,
+g):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,g):this.itemMaxWidth=g;s=0===s?0.75*this.lineHeight:s;r-=s+l;for(n=0;n<k.length;n++){e=k[n];if("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType)r-=2*0.1*this.lineHeight;if(!(0>=h||"undefined"===typeof h||0>=r||"undefined"===typeof r)){if("horizontal"===this.orientation){e.textBlock=new W(this.ctx,{x:0,y:0,maxWidth:r,maxHeight:this.itemWrap?h:this.lineHeight,angle:0,text:e.text,horizontalAlign:"left",fontSize:this.fontSize,
+fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});e.textBlock.measureText();null!==this.itemWidth&&(e.textBlock.width=this.itemWidth-(s+l+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0)));if(!p||p.width+Math.round(e.textBlock.width+s+l+(0===p.width?0:this.horizontalSpacing)+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0))>g)p=
+{items:[],width:0},m.push(p),this.height+=u,u=0;u=Math.max(u,e.textBlock.height)}else e.textBlock=new W(this.ctx,{x:0,y:0,maxWidth:r,maxHeight:!0===this.itemWrap?h:1.5*this.fontSize,angle:0,text:e.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),e.textBlock.measureText(),null!==this.itemWidth&&(e.textBlock.width=this.itemWidth-(s+l+("line"===e.chartType||"spline"===e.chartType||
+"stepLine"===e.chartType?2*0.1*this.lineHeight:0))),this.height<h-this.lineHeight?(p={items:[],width:0},m.push(p)):(p=m[t],t=(t+1)%m.length),this.height+=e.textBlock.height;e.textBlock.x=p.width;e.textBlock.y=0;p.width+=Math.round(e.textBlock.width+s+l+(0===p.width?0:this.horizontalSpacing)+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0));p.items.push(e);this.width=Math.max(p.width,this.width);q=e.textBlock.width+(s+l+("line"===e.chartType||"spline"===
+e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0))}}this.itemWidth=q;this.height=!1===this.itemWrap?m.length*this.lineHeight:this.height+u;this.height=Math.min(h,this.height);this.width=Math.min(g,this.width)}"top"===this.verticalAlign?(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,c=d.y1):"center"===this.verticalAlign?(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/
+2,c=d.y1+d.height/2-this.height/2):"bottom"===this.verticalAlign&&(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,c=d.y2-this.height);this.items=k;for(n=0;n<this.items.length;n++)e=k[n],e.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[e.id]={id:e.id,objectType:"legendItem",legendItemIndex:n,dataSeriesIndex:e.dataSeriesIndex,dataPointIndex:e.dataPointIndex};(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&
+this.ctx.roundRect(f,c,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(n=d=0;n<m.length;n++){p=m[n];for(t=u=0;t<p.items.length;t++){e=p.items[t];q=e.textBlock.x+f+(0===t?0.2*s:this.horizontalSpacing);v=c+d;r=q;this.chart.data[e.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);this.ctx.save();this.ctx.beginPath();this.ctx.rect(f,c,g,Math.max(h-h%this.lineHeight,0));this.ctx.clip();if("line"===e.chartType||"stepLine"===e.chartType||"spline"===
+e.chartType)this.ctx.strokeStyle=e.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(q-0.1*this.lineHeight,v+this.lineHeight/2),this.ctx.lineTo(q+0.85*this.lineHeight,v+this.lineHeight/2),this.ctx.stroke(),r-=0.1*this.lineHeight;P.drawMarker(q+s/2,v+this.lineHeight/2,this.ctx,e.markerType,e.markerSize,e.markerColor,e.markerBorderColor,e.markerBorderThickness);e.textBlock.x=q+l+s;if("line"===e.chartType||"stepLine"===e.chartType||"spline"===e.chartType)e.textBlock.x+=
+0.1*this.lineHeight;e.textBlock.y=Math.round(v+this.lineHeight/2);e.textBlock.render(!0);this.ctx.restore();u=0<t?Math.max(u,e.textBlock.height):e.textBlock.height;this.chart.data[e.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);q=G(e.id);this.ghostCtx.fillStyle=q;this.ghostCtx.beginPath();this.ghostCtx.fillRect(r,e.textBlock.y-this.lineHeight/2,e.textBlock.x+e.textBlock.width-r,e.textBlock.height);e.x1=this.chart._eventManager.objectMap[e.id].x1=r;e.y1=this.chart._eventManager.objectMap[e.id].y1=
+e.textBlock.y-this.lineHeight/2;e.x2=this.chart._eventManager.objectMap[e.id].x2=e.textBlock.x+e.textBlock.width;e.y2=this.chart._eventManager.objectMap[e.id].y2=e.textBlock.y+e.textBlock.height-this.lineHeight/2}d+=u}0<k.length&&a.layoutManager.registerSpace(b,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:f,y1:c,x2:f+this.width,y2:c+this.height}};U(Ca,M);Ca.prototype.render=function(){var a=this.chart.layoutManager.getFreeSpace();this.ctx.fillStyle="red";this.ctx.fillRect(a.x1,a.y1,
+a.x2,a.y2)};U($,M);$.prototype.getDefaultAxisPlacement=function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===
+a)return"xySwapped";if("pie"===a||"doughnut"===a||"funnel"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};$.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a)return"square";if("line"===
+a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a||"funnel"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a)return"triangle";window.console.log("Unknown Chart Type: "+a);return null};$.prototype.getDataPointAtX=function(a,d){if(!this.dataPoints||0===this.dataPoints.length)return null;var b={dataPoint:null,distance:Infinity,index:NaN},c=null,f=0,g=0,h=1,l=Infinity,k=0,m=0,n=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(n=
+Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1<n?Math.min(Math.max((this.dataPoints.length-1)/n*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(n=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<n?Math.min(Math.max((this.dataPoints.length-1)/n*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){g=0<h?n+f:n-f;if(0<=g&&g<this.dataPoints.length){var c=this.dataPoints[g],p=this.axisX.logarithmic?c.x>a?c.x/a:a/c.x:Math.abs(c.x-
+a);p<b.distance&&(b.dataPoint=c,b.distance=p,b.index=g);c=p;c<=l?l=c:0<h?k++:m++;if(1E3<k&&1E3<m)break}else if(0>n-f&&n+f>=this.dataPoints.length)break;-1===h?(f++,h=1):h=-1}return d||b.dataPoint.x!==a?d&&null!==b.dataPoint?b:null:b};$.prototype.getDataPointAtXY=function(a,d,b){if(!this.dataPoints||0===this.dataPoints.length||a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||d<this.chart.plotArea.y1||d>this.chart.plotArea.y2)return null;b=b||!1;var c=[],f=0,g=0,h=1,l=!1,k=Infinity,m=0,n=0,p=0;"none"!==
+this.chart.plotInfo.axisPlacement&&(p=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:d}),this.axisX.logarithmic?(g=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<g?Math.min(Math.max((this.dataPoints.length-1)/g*Math.log(p/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(g=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<g?Math.min(Math.max((this.dataPoints.length-1)/g*(p-this.dataPoints[0].x)>>0,0),this.dataPoints.length):
+0));for(;;){g=0<h?p+f:p-f;if(0<=g&&g<this.dataPoints.length){var e=this.chart._eventManager.objectMap[this.dataPointIds[g]],r=this.dataPoints[g],q=null;if(e){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":a>=e.x1&&(a<=e.x2&&d>=e.y1&&d<=e.y2)&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y1-d),Math.abs(e.y2-d))}),
+l=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=L("markerSize",r,this)||4,v=b?20:s,q=Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-d,2));q<=v&&c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q});g=Math.abs(e.x1-a);g<=k?k=g:0<h?m++:n++;q<=s/2&&(l=!0);break;case "rangeArea":case "rangeSplineArea":s=L("markerSize",r,this)||4;v=b?20:s;q=Math.min(Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-
+d,2)),Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y2-d,2)));q<=v&&c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q});g=Math.abs(e.x1-a);g<=k?k=g:0<h?m++:n++;q<=s/2&&(l=!0);break;case "bubble":s=e.size;q=Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-d,2));q<=s/2&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q}),l=!0);break;case "pie":case "doughnut":s=e.center;v="doughnut"===this.type?e.percentInnerRadius*e.radius:0;q=Math.sqrt(Math.pow(s.x-a,2)+Math.pow(s.y-d,2));q<e.radius&&
+q>v&&(q=Math.atan2(d-s.y,a-s.x),0>q&&(q+=2*Math.PI),q=Number(((180*(q/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(e.startAngle/Math.PI)%360+360)%360).toFixed(12)),v=Number(((180*(e.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===v&&1<e.endAngle&&(v=360),s>=v&&0!==r.y&&(v+=360,q<s&&(q+=360)),q>s&&q<v&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:0}),l=!0));break;case "candlestick":if(a>=e.x1-e.borderThickness/2&&a<=e.x2+e.borderThickness/2&&d>=e.y2-e.borderThickness/2&&d<=
+e.y3+e.borderThickness/2||Math.abs(e.x2-a+e.x1-a)<e.borderThickness&&d>=e.y1&&d<=e.y4)c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y2-d),Math.abs(e.y3-d))}),l=!0;break;case "ohlc":if(Math.abs(e.x2-a+e.x1-a)<e.borderThickness&&d>=e.y2&&d<=e.y3||a>=e.x1&&a<=(e.x2+e.x1)/2&&d>=e.y1-e.borderThickness/2&&d<=e.y1+e.borderThickness/2||a>=(e.x1+e.x2)/2&&a<=e.x2&&d>=e.y4-e.borderThickness/2&&d<=e.y4+e.borderThickness/2)c.push({dataPoint:r,
+dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y2-d),Math.abs(e.y3-d))}),l=!0}if(l||1E3<m&&1E3<n)break}}else if(0>p-f&&p+f>=this.dataPoints.length)break;-1===h?(f++,h=1):h=-1}a=null;for(d=0;d<c.length;d++)a?c[d].distance<=a.distance&&(a=c[d]):a=c[d];return a};$.prototype.getMarkerProperties=function(a,d,b,c){var f=this.dataPoints;return{x:d,y:b,ctx:c,type:f[a].markerType?f[a].markerType:this.markerType,size:f[a].markerSize?f[a].markerSize:this.markerSize,
+color:f[a].markerColor?f[a].markerColor:this.markerColor?this.markerColor:f[a].color?f[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],borderColor:f[a].markerBorderColor?f[a].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:f[a].markerBorderThickness?f[a].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}};U(B,M);B.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var d=this.logLabelValues[0]||
+this.intervalStartPosition;if(Math.log(this.range)/Math.log(d/this.viewportMinimum)<this.noTicks-1){for(var b=B.getNiceNumber((d-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),c=Math.ceil(this.viewportMinimum/b)*b;c<d;c+=b)c<this.viewportMinimum||this.logLabelValues.push(c);this.logLabelValues.sort(ya);this.createExtraLabelsForLog(a)}}};B.prototype.createLabels=function(){var a,d,b=0,c=0,f,g=0,h=0,c=0,l=this.interval,k=0,m,n=0.6*this.chart.height,b=!1;if(this.dataSeries&&
+0<this.dataSeries.length)for(c=0;c<this.dataSeries.length;c++)"dateTime"===this.dataSeries[c].xValueType&&(b=!0);if("axisX"===this.type&&b&&!this.logarithmic)for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),f=Ha(new Date(this.viewportMaximum),this.interval,this.intervalType),b=this.intervalStartPosition;b<f;Ha(b,l,this.intervalType))a=b.getTime(),a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,
+label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[a]?this.labels[a]:Ea(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,
+fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:b.getTime(),textBlock:a,effectiveHeight:null});else{f=this.viewportMaximum;if(this.labels){a=Math.ceil(l);for(var l=Math.ceil(this.intervalStartPosition),p=!1,b=l;b<this.viewportMaximum;b+=a)if(this.labels[b])p=!0;else{p=!1;break}p&&(this.interval=a,this.intervalStartPosition=l)}if(this.logarithmic&&!this.equidistantInterval){this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog());
+for(var e=0;e<this.logLabelValues.length;e++)b=this.logLabelValues[e],b<this.viewportMinimum||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[b]?this.labels[b]:da(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,
+borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:b,textBlock:a,effectiveHeight:null}))}for(b=this.intervalStartPosition;b<=f;b=parseFloat((this.logarithmic&&this.equidistantInterval?b*Math.pow(this.logarithmBase,this.interval):
+b+this.interval).toFixed(14)))a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[b]?this.labels[b]:da(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,
+cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:b,textBlock:a,effectiveHeight:null})}if("bottom"===this._position||"top"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-
+2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*E[this.intervalType+"Duration"]*this.interval,g="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);
+else if("left"===this._position||"right"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*E[this.intervalType+
+"Duration"]*this.interval,this.chart.panEnabled||(g="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize;for(c=0;c<this._labels.length;c++){a=this._labels[c].textBlock;a.maxWidth=g;a.maxHeight=h;var r=a.measureText();m=r.height}f=[];p=l=0;if(this.labelAutoFit||this.options.labelAutoFit)if(x(this.labelAngle)||(this.labelAngle=(this.labelAngle%
+360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(g=0.9*k>>0,p=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;b<this._labels.length;b++){a=
+this._labels[b].textBlock;for(var q,s=a.text.split(" "),c=0;c<s.length;c++)e=s[c],this.ctx.font=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,e=this.ctx.measureText(e),e.width>p&&(q=b,p=e.width)}b=0;for(b=this.intervalStartPosition<this.viewportMinimum?1:0;b<this._labels.length;b++)if(a=this._labels[b].textBlock,r=a.measureText(),b<this._labels.length-1&&(e=b+1,d=this._labels[e].textBlock,d=d.measureText()),f.push(a.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,
+f),Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c=g*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((c-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c),s=(n-(m+a.fontSize/2)*
+Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),!x(this.options.labelWrap))this.labelWrap?x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),this.sessionVariables.labelWrap=this.labelWrap,r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?
+-25:this.sessionVariables.labelAngle):x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=g,r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=
+h,this.sessionVariables.labelWrap=this.labelWrap);else{if(x(this.options.labelWrap))if(!x(this.options.labelMaxWidth))this.options.labelMaxWidth<g?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=c):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h);else if(!x(d))if(c=r.width+d.width>>0,e=this.labelFontSize,p<g)c-2*g>l&&(l=c-2*g,c>=2*g&&c<2.2*g?(this.sessionVariables.labelMaxWidth=
+g,x(this.options.labelFontSize)&&12<e&&(e=Math.floor(12/13*e),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):c>=2.2*g&&c<2.8*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=e):c>=2.8*g&&c<3.2*g?(this.sessionVariables.labelMaxWidth=Math.max(g,p),this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&
+(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):c>=3.2*g&&c<3.6*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=this.labelFontSize):c>3.6*g&&c<5*g?(x(this.options.labelFontSize)&&12<e&&(e=Math.floor(12/13*e),a.measureText()),this.sessionVariables.labelFontSize=
+x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s):c>5*g&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelFontSize=e,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle));else if(q===b&&(0===q&&p+this._labels[q+1].textBlock.measureText().width-2*g>l||q===this._labels.length-1&&p+this._labels[q-
+1].textBlock.measureText().width-2*g>l||0<q&&q<this._labels.length-1&&p+this._labels[q+1].textBlock.measureText().width-2*g>l&&p+this._labels[q-1].textBlock.measureText().width-2*g>l))l=0===q?p+this._labels[q+1].textBlock.measureText().width-2*g:p+this._labels[q-1].textBlock.measureText().width-2*g,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=
+s;else if(0===l)for(this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),r=a.measureText(),c<this._labels.length-1&&(e=c+1,d=this._labels[e].textBlock,d.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),d=d.measureText(),r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=
+-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((c-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c),s=0!=this.labelAngle?(n-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):g,this.sessionVariables.labelMaxHeight=h=this.labelWrap?(n-s*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*
+Math.abs(this.labelAngle)):1.5*this.labelFontSize,x(this.options.labelWrap))?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelMaxHeight=c<0.9*k?0.9*k:c,this.sessionVariables.labelWrap=
+this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s):(x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=h);for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,
+a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:
+this.options.labelFontSize,a.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText();else if("left"===this._position||"right"===this._position)if(g=x(this.options.labelMaxWidth)?0.3*this.chart.width>>0:this.options.labelMaxWidth,h="undefined"===typeof this.options.labelWrap||this.labelWrap?
+0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;b<this._labels.length;b++)(a=this._labels[b].textBlock,r=a.measureText(),b<this._labels.length-1&&(e=b+1,d=this._labels[e].textBlock,
+d=d.measureText()),f.push(a.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,f),c=g*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.sin(Math.PI/180*Math.abs(this.labelAngle)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)?x(this.options.labelWrap)?x(this.options.labelWrap)&&(x(this.options.labelMaxWidth)?x(d)||(k=r.height+d.height>>
+0,k-2*h>p&&(p=k-2*h,k>=2*h&&k<2.4*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):k>=2.4*h&&k<2.8*h?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):k>=2.8*h&&k<3.2*h?(this.sessionVariables.labelMaxHeight=
+h,this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>=3.2*h&&k<3.6*h?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=
+this.labelFontSize):k>3.6*h&&k<10*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>10*h&&k<50*h&&(x(this.options.labelFontSize)&&
+12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle))):(this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:
+this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:this.labelMaxWidth?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:g,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?g:Math.min((c-h*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/
+Math.cos(Math.PI/180*Math.abs(this.labelAngle)),h),x(this.options.labelWrap))?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth>this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=c):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:g,this.sessionVariables.labelMaxHeight=
+0===this.labelAngle?h:c,x(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:c,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=g):(this.sessionVariables.labelMaxHeight=h,x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=
+this.labelWrap);for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?
+this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText();for(b=0;b<this.stripLines.length;b++){var g=this.stripLines[b],
+v;if("outside"===g.labelPlacement){h=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)v="undefined"===typeof g.options.labelWrap?this.sessionVariables.labelMaxHeight:g.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize;if("left"===this._position||"right"===this._position)v="undefined"===typeof g.options.labelWrap?this.sessionVariables.labelMaxHeight:g.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;d=x(g.options.labelBackgroundColor)?"#EEEEEE":
+g.options.labelBackgroundColor}else h="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,v="undefined"===typeof g.options.labelWrap||g.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,d=x(g.options.labelBackgroundColor)?x(g.startValue)&&0!==g.startValue?u?"transparent":null:"#EEEEEE":g.options.labelBackgroundColor;a=new W(this.ctx,{x:0,y:0,backgroundColor:d,borderColor:g.labelBorderColor,
+borderThickness:g.labelBorderThickness,cornerRadius:g.labelCornerRadius,maxWidth:g.options.labelMaxWidth?g.options.labelMaxWidth:h,maxHeight:v,angle:this.labelAngle,text:g.labelFormatter?g.labelFormatter({chart:this.chart,axis:this,stripLine:g}):g.label,horizontalAlign:"left",fontSize:"outside"===g.labelPlacement?g.options.labelFontSize?g.options.labelFontSize:this.labelFontSize:g.labelFontSize,fontFamily:"outside"===g.labelPlacement?g.options.labelFontFamily?g.options.labelFontFamily:this.labelFontFamily:
+g.labelFontFamily,fontWeight:"outside"===g.labelPlacement?g.options.fontWeight?g.options.fontWeight:this.fontWeight:g.fontWeight,fontColor:g.options.labelFontColor||g.color,fontStyle:"outside"===g.labelPlacement?g.options.fontStyle?g.options.fontStyle:this.fontWeight:g.fontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:g.value,textBlock:a,effectiveHeight:null,stripLine:g})}};B.prototype.createLabelsAndCalculateWidth=function(){var a=0,d=0;this._labels=[];this._stripLineLabels=
+[];if("left"===this._position||"right"===this._position){this.createLabels();for(d=0;d<this._labels.length;d++){var b=this._labels[d].textBlock,c=b.measureText(),f=0,f=0===this.labelAngle?c.width:c.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(c.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[d].effectiveWidth=f}for(d=0;d<this._stripLineLabels.length;d++)"outside"===this._stripLineLabels[d].stripLine.labelPlacement&&(this._stripLineLabels[d].stripLine.value>
+this.viewportMinimum&&this._stripLineLabels[d].stripLine.value<this.viewportMaximum)&&(b=this._stripLineLabels[d].textBlock,c=b.measureText(),f=0===this.labelAngle?c.width:c.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(c.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[d].effectiveWidth=f)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+5};B.prototype.createLabelsAndCalculateHeight=function(){var a=0;
+this._labels=[];this._stripLineLabels=[];var d,b=0;this.createLabels();if("bottom"===this._position||"top"===this._position){for(b=0;b<this._labels.length;b++){d=this._labels[b].textBlock;var c=d.measureText(),f=0,f=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(c.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[b].effectiveHeight=f}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&
+(d=this._stripLineLabels[b].textBlock,c=d.measureText(),f=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(c.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[b].effectiveHeight=f)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+5};B.setLayoutAndRender=function(a,d,b,c,f,g){var h,l,k,m,n=a[0]?a[0].chart:d[0].chart,p=n.ctx;if(a&&0<a.length)for(var e=0;e<a.length;e++)a[e]&&a[e].calculateAxisParameters();
+if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].calculateAxisParameters();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateAxisParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateAxisParameters();var r=0,q=0,s=0,v=0,w=0,u=0,t=0,z,A,B=l=0,E,F,G,J;E=F=G=J=!1;if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock=new W(a[e].ctx,{text:a[e].title,horizontalAlign:"center",fontSize:a[e].titleFontSize,fontFamily:a[e].titleFontFamily,fontWeight:a[e].titleFontWeight,
+fontColor:a[e].titleFontColor,fontStyle:a[e].titleFontStyle,borderColor:a[e].titleBorderColor,borderThickness:a[e].titleBorderThickness,backgroundColor:a[e].titleBackgroundColor,cornerRadius:a[e].titleCornerRadius,textBaseline:"top"}));if(d&&0<d.length)for(e=0;e<d.length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock=new W(d[e].ctx,{text:d[e].title,horizontalAlign:"center",fontSize:d[e].titleFontSize,fontFamily:d[e].titleFontFamily,fontWeight:d[e].titleFontWeight,fontColor:d[e].titleFontColor,fontStyle:d[e].titleFontStyle,
+borderColor:d[e].titleBorderColor,borderThickness:d[e].titleBorderThickness,backgroundColor:d[e].titleBackgroundColor,cornerRadius:d[e].titleCornerRadius,textBaseline:"top"}));if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock=new W(b[e].ctx,{text:b[e].title,horizontalAlign:"center",fontSize:b[e].titleFontSize,fontFamily:b[e].titleFontFamily,fontWeight:b[e].titleFontWeight,fontColor:b[e].titleFontColor,fontStyle:b[e].titleFontStyle,borderColor:b[e].titleBorderColor,borderThickness:b[e].titleBorderThickness,
+backgroundColor:b[e].titleBackgroundColor,cornerRadius:b[e].titleCornerRadius,textBaseline:"top"}));if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock=new W(c[e].ctx,{text:c[e].title,horizontalAlign:"center",fontSize:c[e].titleFontSize,fontFamily:c[e].titleFontFamily,fontWeight:c[e].titleFontWeight,fontColor:c[e].titleFontColor,fontStyle:c[e].titleFontStyle,borderColor:c[e].titleBorderColor,borderThickness:c[e].titleBorderThickness,backgroundColor:c[e].titleBackgroundColor,
+cornerRadius:c[e].titleCornerRadius,textBaseline:"top"}));if("normal"===f){var v=[],w=[],u=[],t=[],H=[],I=[],M=[],K=[];if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock.maxWidth=a[e].titleMaxWidth||g.width,a[e]._titleTextBlock.maxHeight=a[e].titleWrap?0.8*g.height:1.5*a[e].titleFontSize,a[e]._titleTextBlock.angle=0);if(d&&0<d.length)for(e=0;e<d[e].length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock.maxWidth=d[e].titleMaxWidth||g.width,d[e]._titleTextBlock.maxHeight=d[e].titleWrap?
+0.8*g.height:1.5*d[e].titleFontSize,d[e]._titleTextBlock.angle=0);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock.maxWidth=b[e].titleMaxWidth||g.height,b[e]._titleTextBlock.maxHeight=b[e].titleWrap?0.8*g.width:1.5*b[e].titleFontSize,b[e]._titleTextBlock.angle=-90);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock.maxWidth=c[e].titleMaxWidth||g.height,c[e]._titleTextBlock.maxHeight=c[e].titleWrap?0.8*g.width:1.5*c[e].titleFontSize,c[e]._titleTextBlock.angle=
+90);for(;4>r;){var N=0,Q=0,P=0,O=0,L=f=0,C=0,S=0,X=0,V=0,U=0,T=0;if(b&&0<b.length)for(u=[],e=U=0;e<b.length;e++)u.push(Math.ceil(b[e]?b[e].createLabelsAndCalculateWidth():0)),U+=u[e],C+=b[e]?b[e].margin:0;else u.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));M.push(u);if(c&&0<c.length)for(t=[],e=T=0;e<c.length;e++)t.push(Math.ceil(c[e]?c[e].createLabelsAndCalculateWidth():0)),T+=t[e],S+=c[e]?c[e].margin:0;else t.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));K.push(t);
+h=Math.round(g.x1+U+C);k=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S);if(a&&0<a.length)for(v=[],e=X=0;e<a.length;e++)a[e]&&(a[e].lineCoordinates={}),a[e].lineCoordinates.width=Math.abs(k-h),a[e].title&&(a[e]._titleTextBlock.maxWidth=0<a[e].titleMaxWidth&&a[e].titleMaxWidth<a[e].lineCoordinates.width?a[e].titleMaxWidth:a[e].lineCoordinates.width),v.push(Math.ceil(a[e]?a[e].createLabelsAndCalculateHeight():0)),X+=v[e],f+=a[e]?a[e].margin:0;else v.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():
+0));H.push(v);if(d&&0<d.length)for(w=[],e=V=0;e<d.length;e++)d[e]&&(d[e].lineCoordinates={}),d[e].lineCoordinates.width=Math.abs(k-h),d[e].title&&(d[e]._titleTextBlock.maxWidth=0<d[e].titleMaxWidth&&d[e].titleMaxWidth<d[e].lineCoordinates.width?d[e].titleMaxWidth:d[e].lineCoordinates.width),w.push(Math.ceil(d[e]?d[e].createLabelsAndCalculateHeight():0)),V+=w[e],L+=d[e]?d[e].margin:0;else w.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateHeight():0));I.push(w);if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&
+(a[e].lineCoordinates.x1=h,a[e].lineCoordinates.x2=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S),a[e]._labels&&1<a[e]._labels.length&&(l=m=0,m=a[e]._labels[1],l="dateTime"===a[e].chart.plotInfo.axisXValueType?a[e]._labels[a[e]._labels.length-2]:a[e]._labels[a[e]._labels.length-1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),s=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+
+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),a[e]&&(a[e].labelAutoFit&&!x(z)&&!x(A))&&(l=0,0<a[e].labelAngle?A+s>k&&(l+=0<a[e].labelAngle?A+s-k-T:0):0>a[e].labelAngle?z-q<h&&z-q<a[e].viewportMinimum&&(B=h-(C+a[e].tickLength+u+z-q+a[e].labelFontSize/2)):0===a[e].labelAngle&&(A+s>k&&(l=A+s/2-k-T),z-q<h&&z-q<a[e].viewportMinimum&&(B=h-C-a[e].tickLength-u-z+q/2)),a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0<a[e].labelAngle&&
+0<l?k-=l:a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0>a[e].labelAngle&&0<B?h+=B:a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0===a[e].labelAngle&&(0<B&&(h+=B),0<l&&(k-=l))),n.panEnabled?X=n.sessionVariables.axisX.height:n.sessionVariables.axisX.height=X,l=Math.round(g.y2-X-f+N),m=Math.round(g.y2),a[e].lineCoordinates.x2=k,a[e].lineCoordinates.width=k-h,a[e].lineCoordinates.y1=l,a[e].lineCoordinates.y2=l,a[e].bounds={x1:h,y1:l,x2:k,y2:m-(X+
+f-v[e]-N),width:k-h,height:m-l}),N+=v[e]+a[e].margin;if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].lineCoordinates.x1=Math.round(g.x1+U+C),d[e].lineCoordinates.x2=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S),d[e].lineCoordinates.width=Math.abs(k-h),d[e]._labels&&1<d[e]._labels.length&&(m=d[e]._labels[1],l="dateTime"===d[e].chart.plotInfo.axisXValueType?d[e]._labels[d[e]._labels.length-2]:d[e]._labels[d[e]._labels.length-1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+
+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),s=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),n.panEnabled?V=n.sessionVariables.axisX2.height:n.sessionVariables.axisX2.height=V,l=Math.round(g.y1),m=Math.round(g.y2+d[e].margin),d[e].lineCoordinates.y1=l+V+L-Q,d[e].lineCoordinates.y2=l,d[e].bounds={x1:h,y1:l+(V+L-w[e]-Q),x2:k,y2:m,width:k-
+h,height:m-l},Q+=w[e]+d[e].margin;if(b&&0<b.length)for(e=0;e<b.length;e++)C=10,b[e]&&(h=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),C=b[e]._labels&&0<b[e]._labels.length?b[e]._labels[b[e]._labels.length-1].textBlock.height/2:10,l=Math.round(g.y1+V+L<Math.max(C,10)?Math.max(C,10):g.y1+V+L),k=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),C=0<a.length?0:b[e]._labels[0].textBlock.height/2,m=Math.round(g.y2-X-f-C),b[e].lineCoordinates={x1:k-P,y1:l,x2:k-P,y2:m,height:Math.abs(m-
+l)},b[e].bounds={x1:h-(u[e]+P),y1:l,x2:k,y2:m,width:k-h,height:m-l},b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.height?b[e].titleMaxWidth:b[e].lineCoordinates.height),P+=u[e]+b[e].margin);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&(h=Math.round(a[0]?a[0].lineCoordinates.x2:d[0].lineCoordinates.x2),k=Math.round(h),C=c[e]._labels&&0<c[e]._labels.length?c[e]._labels[c[e]._labels.length-1].textBlock.height/2:0,l=Math.round(g.y1+V+L<Math.max(C,
+10)?Math.max(C,10):g.y1+V+L),C=0<a.length?0:c[e]._labels[0].textBlock.height/2,m=Math.round(g.y2-(X+f+C)),c[e].lineCoordinates={x1:h+O,y1:l,x2:h+O,y2:m,height:Math.abs(m-l)},c[e].bounds={x1:h,y1:l,x2:k+(t[e]+O),y2:m,width:k-h,height:m-l},c[e].title&&(c[e]._titleTextBlock.maxWidth=0<c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.height?c[e].titleMaxWidth:c[e].lineCoordinates.height),O+=t[e]+c[e].margin);if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&(a[e].calculateValueToPixelConversionParameters(),
+a[e]._labels&&1<a[e]._labels.length&&(z=(a[e].logarithmic?Math.log(a[e]._labels[1].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[1].position-a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1,A="dateTime"===a[e].chart.plotInfo.axisXValueType?(a[e].logarithmic?Math.log(a[e]._labels[a[e]._labels.length-2].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[a[e]._labels.length-2].position-
+a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1:(a[e].logarithmic?Math.log(a[e]._labels[a[e]._labels.length-1].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[a[e]._labels.length-1].position-a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1));if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].calculateValueToPixelConversionParameters(),d[e]._labels&&1<d[e]._labels.length&&(z=
+(d[e].logarithmic?Math.log(d[e]._labels[1].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[1].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+d[e].lineCoordinates.x1,A="dateTime"===d[e].chart.plotInfo.axisXValueType?(d[e].logarithmic?Math.log(d[e]._labels[d[e]._labels.length-2].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[d[e]._labels.length-2].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+
+d[e].lineCoordinates.x1:(d[e].logarithmic?Math.log(d[e]._labels[d[e]._labels.length-1].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[d[e]._labels.length-1].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+d[e].lineCoordinates.x1);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateValueToPixelConversionParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateValueToPixelConversionParameters();if(0<r){if(a&&0<a.length)for(e=
+0;e<a.length;e++)E=H[r-1][e]===H[r][e]?!0:!1;else E=!0;if(d&&0<d.length)for(e=0;e<d.length;e++)F=I[r-1][e]===I[r][e]?!0:!1;else F=!0;if(b&&0<b.length)for(e=0;e<b.length;e++)G=M[r-1][e]===M[r][e]?!0:!1;else G=!0;if(c&&0<c.length)for(e=0;e<c.length;e++)J=K[r-1][e]===K[r][e]?!0:!1;else J=!0}if(E&&F&&G&&J)break;r++}p.save();p.beginPath();a[0]&&p.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[0].bounds.height);d[0]&&p.rect(5,d[d.length-1].bounds.y1,d[0].chart.width-10,d[0].bounds.height);p.clip();if(a&&0<
+a.length)for(e=0;e<a.length;e++)a[e].renderLabelsTicksAndTitle();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderLabelsTicksAndTitle();p.restore();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderLabelsTicksAndTitle();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderLabelsTicksAndTitle()}else{z=[];A=[];B=[];q=[];s=[];H=[];I=[];M=[];if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock.maxWidth=a[e].titleMaxWidth||g.width,a[e]._titleTextBlock.maxHeight=a[e].titleWrap?
+0.8*g.height:1.5*a[e].titleFontSize,a[e]._titleTextBlock.angle=-90);if(d&&0<d.length)for(e=0;e<d.length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock.maxWidth=d[e].titleMaxWidth||g.width,d[e]._titleTextBlock.maxHeight=d[e].titleWrap?0.8*g.height:1.5*d[e].titleFontSize,d[e]._titleTextBlock.angle=90);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock.maxWidth=b[e].titleMaxWidth||g.width,b[e]._titleTextBlock.maxHeight=b[e].titleWrap?0.8*g.height:1.5*b[e].titleFontSize,b[e]._titleTextBlock.angle=
+0);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock.maxWidth=c[e].titleMaxWidth||g.width,c[e]._titleTextBlock.maxHeight=c[e].titleWrap?0.8*g.height:1.5*c[e].titleFontSize,c[e]._titleTextBlock.angle=0);for(;4>r;){V=X=U=O=S=C=L=f=P=K=Q=N=0;if(a&&0<a.length)for(B=[],e=X=0;e<a.length;e++)B.push(Math.ceil(a[e]?a[e].createLabelsAndCalculateWidth():0)),X+=B[e],f+=a[e]?a[e].margin:0;else B.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));I.push(B);if(d&&0<d.length)for(q=
+[],e=V=0;e<d.length;e++)q.push(Math.ceil(d[e]?d[e].createLabelsAndCalculateWidth():0)),V+=q[e],L+=d[e]?d[e].margin:0;else q.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateWidth():0));M.push(q);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].lineCoordinates={},h=Math.round(g.x1+X+f),k=Math.round(g.x2-V-L>n.width-10?n.width-10:g.x2-V-L),b[e].labelAutoFit&&!x(v)&&(0<!a.length&&(h=0>b[e].labelAngle?Math.max(h,v):0===b[e].labelAngle?Math.max(h,v/2):h),0<!d.length&&(k=0<b[e].labelAngle?k-w/2:0===b[e].labelAngle?
+k-w/2:k)),b[e].lineCoordinates.x1=h,b[e].lineCoordinates.x2=k,b[e].lineCoordinates.width=Math.abs(k-h),b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.width?b[e].titleMaxWidth:b[e].lineCoordinates.width);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].lineCoordinates={},h=Math.round(g.x1+X+f),k=Math.round(g.x2-V-L>c[e].chart.width-10?c[e].chart.width-10:g.x2-V-L),c[e]&&c[e].labelAutoFit&&!x(u)&&(0<!a.length&&(h=0<c[e].labelAngle?Math.max(h,u):
+0===c[e].labelAngle?Math.max(h,u/2):h),0<!d.length&&(k-=t/2)),c[e].lineCoordinates.x1=h,c[e].lineCoordinates.x2=k,c[e].lineCoordinates.width=Math.abs(k-h),c[e].title&&(c[e]._titleTextBlock.maxWidth=0<c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.width?c[e].titleMaxWidth:c[e].lineCoordinates.width);if(b&&0<b.length)for(z=[],e=O=0;e<b.length;e++)z.push(Math.ceil(b[e]?b[e].createLabelsAndCalculateHeight():0)),O+=z[e]+b[e].margin,C+=b[e].margin;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():
+0));s.push(z);if(c&&0<c.length)for(A=[],e=U=0;e<c.length;e++)A.push(Math.ceil(c[e]?c[e].createLabelsAndCalculateHeight():0)),U+=A[e],S+=c[e].margin;else A.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));H.push(A);if(b&&0<b.length)for(e=0;e<b.length;e++)0<b[e]._labels.length&&(m=b[e]._labels[0],l=b[e]._labels[b[e]._labels.length-1],v=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),
+w=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&0<c[e]._labels.length&&(m=c[e]._labels[0],l=c[e]._labels[c[e]._labels.length-1],u=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),t=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+
+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(n.panEnabled)for(e=0;e<b.length;e++)z[e]=n.sessionVariables.axisY.height;else for(e=0;e<b.length;e++)n.sessionVariables.axisY.height=z[e];if(b&&0<b.length)for(e=b.length-1;0<=e;e--)l=Math.round(g.y2),m=Math.round(g.y2>b[e].chart.height-10?b[e].chart.height-10:g.y2),b[e].lineCoordinates.y1=l-(z[e]+b[e].margin+N),b[e].lineCoordinates.y2=l-(z[e]+b[e].margin+N),b[e].bounds={x1:h,y1:l-(z[e]+N+b[e].margin),
+x2:k,y2:m-(N+b[e].margin),width:k-h,height:z[e]},b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.width?b[e].titleMaxWidth:b[e].lineCoordinates.width),N+=z[e]+b[e].margin;if(c&&0<c.length)for(e=c.length-1;0<=e;e--)c[e]&&(l=Math.round(g.y1),m=Math.round(g.y1+(A[e]+c[e].margin+Q)),c[e].lineCoordinates.y1=m,c[e].lineCoordinates.y2=m,c[e].bounds={x1:h,y1:l+(c[e].margin+Q),x2:k,y2:m,width:k-h,height:U},c[e].title&&(c[e]._titleTextBlock.maxWidth=0<
+c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.width?c[e].titleMaxWidth:c[e].lineCoordinates.width),Q+=A[e]+c[e].margin);if(a&&0<a.length)for(e=0;e<a.length;e++){C=a[e]._labels&&0<a[e]._labels.length?a[e]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+f);l=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y2:g.y1<Math.max(C,10)?Math.max(C,10):g.y1):g.y1<Math.max(C,10)?Math.max(C,10):g.y1;k=Math.round(g.x1+X+f);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y1:g.y2-O>n.height-
+Math.max(C,10)?n.height-Math.max(C,10):g.y2-O):g.y2>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2;if(b&&0<b.length)for(C=0;C<b.length;C++)b[C]&&b[C].labelAutoFit&&(k=0>b[C].labelAngle?Math.max(k,v):0===b[C].labelAngle?Math.max(k,v/2):k,h=0>b[C].labelAngle||0===b[C].labelAngle?k-X:h);if(c&&0<c.length)for(C=0;C<c.length;C++)c[C]&&c[C].labelAutoFit&&(k=c[C].lineCoordinates.x1,h=k-X);a[e].lineCoordinates={x1:k-K,y1:l,x2:k-K,y2:m,height:Math.abs(m-l)};a[e].bounds={x1:k-(B[e]+K),y1:l,x2:k,y2:m,width:k-
+h,height:m-l};a[e].title&&(a[e]._titleTextBlock.maxWidth=0<a[e].titleMaxWidth&&a[e].titleMaxWidth<a[e].lineCoordinates.height?a[e].titleMaxWidth:a[e].lineCoordinates.height);a[e].calculateValueToPixelConversionParameters();K+=B[e]+a[e].margin}if(d&&0<d.length)for(e=0;e<d.length;e++){C=d[e]._labels&&0<d[e]._labels.length?d[e]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1-f);l=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y2:g.y1<Math.max(C,10)?Math.max(C,10):g.y1):g.y1<Math.max(C,10)?Math.max(C,
+10):g.y1;k=Math.round(g.x2-V-L);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y1:g.y2-O>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2-O):g.y2>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2;if(b&&0<b.length)for(C=0;C<b.length;C++)b[C]&&b[C].labelAutoFit&&(k=0>b[C].labelAngle?Math.max(k,v):0===b[e].labelAngle?Math.max(k,v/2):k,h=0>b[C].labelAngle||0===b[C].labelAngle?k-V:h);if(c&&0<c.length)for(C=0;C<c.length;C++)c[C]&&c[C].labelAutoFit&&(k=c[C].lineCoordinates.x2,h=k-V);d[e].lineCoordinates=
+{x1:k+P,y1:l,x2:k+P,y2:m,height:Math.abs(m-l)};d[e].bounds={x1:h,y1:l,x2:k,y2:m,width:k-h,height:m-l};d[e].title&&(d[e]._titleTextBlock.maxWidth=0<d[e].titleMaxWidth&&d[e].titleMaxWidth<d[e].lineCoordinates.height?d[e].titleMaxWidth:d[e].lineCoordinates.height);d[e].calculateValueToPixelConversionParameters();P+=q[e]+d[e].margin}if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateValueToPixelConversionParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateValueToPixelConversionParameters();
+if(0<r){if(a&&0<a.length)for(e=0;e<a.length;e++)E=I[r-1][e]===I[r][e]?!0:!1;else E=!0;if(d&&0<d.length)for(e=0;e<d.length;e++)F=M[r-1][e]===M[r][e]?!0:!1;else F=!0;if(b&&0<b.length)for(e=0;e<b.length;e++)G=s[r-1][e]===s[r][e]?!0:!1;else G=!0;if(c&&0<c.length)for(e=0;e<c.length;e++)J=H[r-1][e]===H[r][e]?!0:!1;else J=!0}if(E&&F&&G&&J)break;r++}if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderLabelsTicksAndTitle();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderLabelsTicksAndTitle();if(a&&0<a.length)for(e=
+0;e<a.length;e++)a[e].renderLabelsTicksAndTitle();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderLabelsTicksAndTitle()}n.preparePlotArea();g=n.plotArea;p.save();p.beginPath();p.rect(g.x1,g.y1,Math.abs(g.x2-g.x1),Math.abs(g.y2-g.y1));p.clip();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderStripLinesOfThicknessType("value");if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderStripLinesOfThicknessType("value");
+if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderInterlacedColors();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderInterlacedColors();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderInterlacedColors();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderInterlacedColors();p.restore();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderGrid();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderGrid();if(b&&0<
+b.length)for(e=0;e<b.length;e++)b[e].renderGrid();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderGrid();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderAxisLine();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderAxisLine();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderAxisLine();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderAxisLine();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderStripLinesOfThicknessType("pixel");if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderStripLinesOfThicknessType("pixel");
+if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderStripLinesOfThicknessType("pixel");if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderStripLinesOfThicknessType("pixel")};B.prototype.renderLabelsTicksAndTitle=function(){var a=!1,d=0,b=0,c=1,f=0;0!==this.labelAngle&&360!==this.labelAngle&&(c=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var d=[],c=0!==this.labelAngle&&
+360!==this.labelAngle?1:1.2,g,h=this.viewportMaximum,l=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(k===this._labels.length-1||g<Math.log(h/n.position)*l/c)||(d.push(n),h=n.position,g=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=d}else{for(k=0;k<this._labels.length;k++)n=
+this._labels[k],n.position<this.viewportMinimum||(n=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),d+=n);d>this.lineCoordinates.width*c&&this.labelAutoFit&&(a=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var d=[],m,h=this.viewportMaximum,l=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];
+if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(k===this._labels.length-1||m<Math.log(h/n.position)*l)||(d.push(n),h=n.position,m=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=d}else{for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||(n=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/
+180*this.labelAngle)),b+=n);b>this.lineCoordinates.height*c&&this.labelAutoFit&&(a=!0)}}if("bottom"===this._position){for(var n,k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,
+b.y<<0),this.ctx.lineTo(c,b.y+this.tickLength<<0),this.ctx.stroke()),0===n.textBlock.angle?(b.x-=n.textBlock.width/2,b.y+=this.tickLength+n.textBlock.fontSize/2):(b.x-=0>this.labelAngle?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+Math.abs(0>this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),n.textBlock.x=b.x,n.textBlock.y=b.y,n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=
+this.tickColor,c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y-this.tickLength<<0),this.ctx.stroke()),0===n.textBlock.angle?(b.x-=n.textBlock.width/2,b.y-=this.tickLength+n.textBlock.height/2):(b.x+=(n.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),b.y-=this.tickLength+(n.textBlock.height/2*Math.cos(Math.PI/
+180*this.labelAngle)+(0<this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0))),n.textBlock.x=b.x,n.textBlock.y=b.y,n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k=0;k<this._labels.length;k++)n=
+this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x-this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle?(n.textBlock.y=b.y,n.textBlock.x=b.x-n.textBlock.width*Math.cos(Math.PI/
+180*this.labelAngle)-this.tickLength-5):(n.textBlock.y=b.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),n.textBlock.x=0<this.labelAngle?b.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:b.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength),n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=
+this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%
+2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x+this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle?(n.textBlock.y=b.y,n.textBlock.x=b.x+this.tickLength+5):(n.textBlock.y=0>this.labelAngle?b.y:b.y-(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x=0<this.labelAngle?b.x+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:b.x+this.tickLength+5),n.textBlock.render(!0)));
+this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}};B.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,d,b,c=this.chart.plotArea,f=0;d=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,
+f=0;f<this._labels.length;f++)d?(d=this.getPixelCoordinatesOnAxis(this._labels[f].position),b=f+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[f+1].position),a.fillRect(Math.min(b.x,d.x),c.y1,Math.abs(b.x-d.x),Math.abs(c.y1-c.y2)),d=!1):d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,f=0;f<this._labels.length;f++)d?(b=this.getPixelCoordinatesOnAxis(this._labels[f].position),
+d=f+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[f+1].position),a.fillRect(c.x1,Math.min(b.y,d.y),Math.abs(c.x1-c.x2),Math.abs(d.y-b.y)),d=!1):d=!0;a.beginPath()};B.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){for(var d=this,b,c=0,f=0,g=!1,h=!1,l=[],k=[],h=!1,c=0;c<this.stripLines.length;c++){var m=this.stripLines[c];m._thicknessType===a&&("pixel"===a&&(m.value<this.viewportMinimum||
+m.value>this.viewportMaximum||x(m.value)||isNaN(this.range))||l.push(m))}for(c=0;c<this._stripLineLabels.length;c++)if(m=this.stripLines[c],b=this._stripLineLabels[c],!(b.position<this.viewportMinimum||b.position>this.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(b.position);if("outside"===b.stripLine.labelPlacement)if(m&&(this.ctx.strokeStyle=m.color,"pixel"===m._thicknessType&&(this.ctx.lineWidth=m.thickness)),"bottom"===this._position){var n=1===this.ctx.lineWidth%2?(a.x<<
+0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(n,a.y<<0);this.ctx.lineTo(n,a.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y+=this.tickLength+b.textBlock.fontSize/2):(a.x-=0>this.labelAngle?b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(n=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(n,
+a.y<<0),this.ctx.lineTo(n,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y-=this.tickLength+b.textBlock.height):(a.x+=(b.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),a.y-=this.tickLength+(b.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))):"left"===
+this._position?(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,n),this.ctx.lineTo(a.x-this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(a.y-=b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(b.textBlock.height-
+b.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength)):"right"===this._position&&(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,n),this.ctx.lineTo(a.x+this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x+this.tickLength+5:(a.y=0>this.labelAngle?a.y:a.y-(b.textBlock.height-b.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x+(b.textBlock.height-b.textBlock.fontSize/2-5)*Math.sin(Math.PI/
+180*this.labelAngle)+this.tickLength:a.x+this.tickLength+5));else b.textBlock.angle=-90,"bottom"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.height-3,b.textBlock.measureText(),a.x-b.textBlock.height>this.chart.plotArea.x1?x(m.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,x(m.startValue)?a.x+=b.textBlock.height-b.textBlock.fontSize/
+2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y1+b.textBlock.width+3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-b.textBlock.width-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?
+(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.height-3,b.textBlock.measureText(),a.x-b.textBlock.height>this.chart.plotArea.x1?x(m.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,x(m.startValue)?a.x+=b.textBlock.height-b.textBlock.fontSize/2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?
+this.chart.plotArea.y1+b.textBlock.width+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y2-b.textBlock.width-3):"left"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:
+this.chart.plotArea.width-3,b.textBlock.angle=0,b.textBlock.measureText(),a.y-b.textBlock.height>this.chart.plotArea.y1?x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize+3:a.y-b.textBlock.height<this.chart.plotArea.y2?a.y+=b.textBlock.fontSize/2+3:x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize+3,a.x="near"===b.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===b.stripLine.labelAlign?
+(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-b.textBlock.width/2:this.chart.plotArea.x2-b.textBlock.width-3):"right"===this._position&&(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.width-3,b.textBlock.angle=0,b.textBlock.measureText(),a.y-+b.textBlock.height>this.chart.plotArea.y1?x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize/2-3:a.y-b.textBlock.height<
+this.chart.plotArea.y2?a.y+=b.textBlock.fontSize/2+3:x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize/2+3,a.x="near"===b.stripLine.labelAlign?this.chart.plotArea.x2-b.textBlock.width-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-b.textBlock.width/2:this.chart.plotArea.x1+3);b.textBlock.x=a.x;b.textBlock.y=a.y;k.push(b)}if(!h){h=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,
+this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(c=0;c<l.length;c++)m=l[c],m.showOnTop?g||(g=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(f=0;f<l.length;f++)m=l[f],m.showOnTop&&m.render();this.ctx.restore()},m)):m.render();for(c=0;c<k.length;c++)b=k[c],b.stripLine.showOnTop?
+h||(h=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(f=0;f<k.length;f++)b=k[f],"inside"===b.stripLine.labelPlacement&&b.stripLine.showOnTop&&(d.ctx.save(),d.ctx.beginPath(),d.ctx.rect(d.chart.plotArea.x1,d.chart.plotArea.y1,d.chart.plotArea.width,d.chart.plotArea.height),d.ctx.clip(),b.textBlock.render(!0),d.ctx.restore())},b.textBlock)):"inside"===b.stripLine.labelPlacement&&b.textBlock.render(!0);this.ctx.restore();h=!0}if(h)for(h=!1,c=0;c<k.length;c++)b=k[c],b.stripLine.showOnTop?
+h||(h=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(f=0;f<k.length;f++)b=k[f],"outside"===b.stripLine.labelPlacement&&b.stripLine.showOnTop&&b.textBlock.render(!0)},b.textBlock)):"outside"===b.stripLine.labelPlacement&&b.textBlock.render(!0)}};B.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var d,b=this.chart.plotArea;a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(I(this.gridDashType,
+this.gridThickness));if("bottom"===this._position||"top"===this._position)for(c=0;c<this._labels.length;c++)this._labels[c].position<this.viewportMinimum||this._labels[c].position>this.viewportMaximum||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.x<<0)+0.5:d.x<<0,a.moveTo(d,b.y1<<0),a.lineTo(d,b.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var c=0;c<this._labels.length;c++)this._labels[c].position<this.viewportMinimum||
+this._labels[c].position>this.viewportMaximum||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.y<<0)+0.5:d.y<<0,a.moveTo(b.x1<<0,d),a.lineTo(b.x2<<0,d),a.stroke());a.restore()}};B.prototype.renderAxisLine=function(){var a=this.chart.ctx;a.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){a.lineWidth=this.lineThickness;a.strokeStyle=this.lineColor?this.lineColor:"black";a.setLineDash&&a.setLineDash(I(this.lineDashType,
+this.lineThickness));var d=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;a.beginPath();a.moveTo(this.lineCoordinates.x1,d);a.lineTo(this.lineCoordinates.x2,d);a.stroke()}}else"left"!==this._position&&"right"!==this._position||!this.lineThickness||(a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor,a.setLineDash&&a.setLineDash(I(this.lineDashType,this.lineThickness)),d=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<
+0,a.beginPath(),a.moveTo(d,this.lineCoordinates.y1),a.lineTo(d,this.lineCoordinates.y2),a.stroke());a.restore()};B.prototype.getPixelCoordinatesOnAxis=function(a){var d={};if("bottom"===this._position||"top"===this._position)d.x=this.convertValueToPixel(a),d.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)d.y=this.convertValueToPixel(a),d.x=this.lineCoordinates.x2;return d};B.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var d=0,d=0,
+d="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;return d=this.logarithmic?Math.pow(this.logarithmBase,(d-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit)*this.viewportMinimum:this.conversionParameters.minimum+(d-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit};B.prototype.convertValueToPixel=function(a){return this.logarithmic?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*Math.log(a/
+this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0};B.prototype.setViewPortRange=function(a,d){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,d);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,d)};B.prototype.getXValueAt=function(a){if(!a)return null;var d=null;"left"===this._position?d=this.convertPixelToValue(a.y):
+"bottom"===this._position&&(d=this.convertPixelToValue(a.x));return d};B.prototype.calculateValueToPixelConversionParameters=function(a){a={pixelPerUnit:null,minimum:null,reference:null};var d=this.lineCoordinates.width,b=this.lineCoordinates.height;a.minimum=this.viewportMinimum;if("bottom"===this._position||"top"===this._position)this.logarithmic?(a.lnLogarithmBase=Math.log(this.logarithmBase),a.pixelPerUnit=(this.reversed?-1:1)*d*a.lnLogarithmBase/Math.log(Math.abs(this.range))):a.pixelPerUnit=
+(this.reversed?-1:1)*d/Math.abs(this.range),a.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?(a.lnLogarithmBase=Math.log(this.logarithmBase),a.pixelPerUnit=(this.reversed?1:-1)*b*a.lnLogarithmBase/Math.log(Math.abs(this.range))):a.pixelPerUnit=(this.reversed?1:-1)*b/Math.abs(this.range),a.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=a};B.prototype.calculateAxisParameters=
+function(){if(this.logarithmic)this.calculateLogarithamicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),d=!1,b=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,c=4;"axisX"===this.type&&(c=600>this.maxWidth?8:6);var a=Math.max(c,Math.floor(this.maxWidth/
+a)),f,g,h,c=0;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(f=0;f<this.dataSeries.length;f++)"dateTime"===this.dataSeries[f].xValueType&&(b=!0);f=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin;g=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax;
+0===g-f&&(c="undefined"===typeof this.options.interval?0.4:this.options.interval,g+=c,f-=c);Infinity!==this.dataInfo.minDiff?h=this.dataInfo.minDiff:1<g-f?h=0.5*Math.abs(g-f):(h=1,b&&(d=!0))}else"axisY"===this.type&&(f=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,g=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(f)||isFinite(g)?isFinite(f)?isFinite(g)||(g=f):f=g:(g="undefined"===typeof this.options.interval?-Infinity:this.options.interval,
+f=0),0===f&&0===g?(g+=9,f=0):0===g-f?(c=Math.min(Math.abs(0.01*Math.abs(g)),5),g+=c,f-=c):f>g?(c=Math.min(Math.abs(0.01*Math.abs(g-f)),5),0<=g?f=g-c:g=f+c):(c=Math.min(Math.abs(0.01*Math.abs(g-f)),0.05),0!==g&&(g+=c),0!==f&&(f-=c)),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<f&&(f=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>g&&(g=0));c=(isNaN(this.viewportMaximum)||
+null===this.viewportMaximum?g:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?f:this.viewportMinimum);if("axisX"===this.type&&b){this.intervalType||(c/1<=a?(this.interval=1,this.intervalType="millisecond"):c/2<=a?(this.interval=2,this.intervalType="millisecond"):c/5<=a?(this.interval=5,this.intervalType="millisecond"):c/10<=a?(this.interval=10,this.intervalType="millisecond"):c/20<=a?(this.interval=20,this.intervalType="millisecond"):c/50<=a?(this.interval=50,this.intervalType=
+"millisecond"):c/100<=a?(this.interval=100,this.intervalType="millisecond"):c/200<=a?(this.interval=200,this.intervalType="millisecond"):c/250<=a?(this.interval=250,this.intervalType="millisecond"):c/300<=a?(this.interval=300,this.intervalType="millisecond"):c/400<=a?(this.interval=400,this.intervalType="millisecond"):c/500<=a?(this.interval=500,this.intervalType="millisecond"):c/(1*E.secondDuration)<=a?(this.interval=1,this.intervalType="second"):c/(2*E.secondDuration)<=a?(this.interval=2,this.intervalType=
+"second"):c/(5*E.secondDuration)<=a?(this.interval=5,this.intervalType="second"):c/(10*E.secondDuration)<=a?(this.interval=10,this.intervalType="second"):c/(15*E.secondDuration)<=a?(this.interval=15,this.intervalType="second"):c/(20*E.secondDuration)<=a?(this.interval=20,this.intervalType="second"):c/(30*E.secondDuration)<=a?(this.interval=30,this.intervalType="second"):c/(1*E.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):c/(2*E.minuteDuration)<=a?(this.interval=2,this.intervalType=
+"minute"):c/(5*E.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):c/(10*E.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):c/(15*E.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):c/(20*E.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):c/(30*E.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):c/(1*E.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):c/(2*E.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):
+c/(3*E.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):c/(6*E.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):c/(1*E.dayDuration)<=a?(this.interval=1,this.intervalType="day"):c/(2*E.dayDuration)<=a?(this.interval=2,this.intervalType="day"):c/(4*E.dayDuration)<=a?(this.interval=4,this.intervalType="day"):c/(1*E.weekDuration)<=a?(this.interval=1,this.intervalType="week"):c/(2*E.weekDuration)<=a?(this.interval=2,this.intervalType="week"):c/(3*E.weekDuration)<=a?(this.interval=
+3,this.intervalType="week"):c/(1*E.monthDuration)<=a?(this.interval=1,this.intervalType="month"):c/(2*E.monthDuration)<=a?(this.interval=2,this.intervalType="month"):c/(3*E.monthDuration)<=a?(this.interval=3,this.intervalType="month"):c/(6*E.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=c/(1*E.yearDuration)<=a?1:c/(2*E.yearDuration)<=a?2:c/(4*E.yearDuration)<=a?4:Math.floor(B.getNiceNumber(c/(a-1),!0)/E.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||
+isNaN(this.viewportMinimum))this.viewportMinimum=f-h/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=g+h/2;d?this.autoValueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString=
+"hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString="fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";c=B.getNiceNumber(c,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:B.getNiceNumber(c/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=
+"axisX"===this.type?f-h/2:Math.floor(f/this.interval)*this.interval;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?g+h/2:Math.ceil(g/this.interval)*this.interval;0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/
+(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(f=null!==this.minimum?this.minimum:this.dataInfo.min,g=null!==this.maximum?this.maximum:this.dataInfo.max,0===g-f&&(c="undefined"===typeof this.options.interval?0.4:this.options.interval,g+=c,f-=c),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1):"axisY"===this.type&&(f=null!==this.minimum?this.minimum:this.dataInfo.min,g=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(f)||
+isFinite(g)?0===f&&0===g?(g+=9,f=0):0===g-f?(c=Math.min(Math.abs(0.01*Math.abs(g)),5),g+=c,f-=c):f>g?(c=Math.min(Math.abs(0.01*Math.abs(g-f)),5),0<=g?f=g-c:g=f+c):(c=Math.min(Math.abs(0.01*Math.abs(g-f)),0.05),0!==g&&(g+=c),0!==f&&(f-=c)):(g="undefined"===typeof this.options.interval?-Infinity:this.options.interval,f=0),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<f&&(f=0),this.includeZero&&(null===
+this.maximum||isNaN(this.maximum))&&0>g&&(g=0)),"axisX"===this.type&&b){if(null===this.minimum||isNaN(this.minimum))this.minimum=f-h/2;if(null===this.maximum||isNaN(this.maximum))this.maximum=g+h/2}else this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?f-h/2:Math.floor(f/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),
+null===this.maximum&&(this.maximum="axisX"===this.type?g+h/2:Math.ceil(g/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,
+this.maximum);this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&b?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.range)){d=Math.floor(Math.abs(Math.log(this.range)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2<d)for(b=0;b<d-2;b++)this.valueFormatString+="#"}}};
+B.prototype.calculateLogarithamicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),d=Math.log(this.logarithmBase),b;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),c,f,g,h;h=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=
+this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;"axisX"===this.type?(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===f/c&&(h=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),f*=h,c/=h),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,
+0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=c&&!isFinite(f)?(f="undefined"===typeof this.options.interval?0:this.options.interval,c=1):0>=c?c=f:isFinite(f)||(f=c),1===c&&1===f?(f*=this.logarithmBase-1/this.logarithmBase,c=1):1===f/c?(h=Math.min(f*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),f*=h,c/=h):c>f?(h=Math.min(c/
+f*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=f?c=f/h:f=c*h):(h=Math.min(f/c*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==f&&(f*=h),1!==c&&(c/=h)),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<c&&(c=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&
+1>f&&(f=1));h=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);linearRange=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);this.intervalType="number";h=Math.pow(this.logarithmBase,B.getNiceNumber(Math.abs(Math.log(h)/d),!1));this.options&&0<this.options.interval?this.interval=
+this.options.interval:(this.interval=B.getNiceExponent(Math.log(h)/d/(a-1),!0),b=B.getNiceNumber(linearRange/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?c/Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(c)/d/this.interval));if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?f*Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(f)/d/
+this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceExponent(Math.ceil(Math.log(h)/d)/(a-1)),b=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===
+this.type?(c=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,1===f/c&&(h=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),f*=h,c/=h),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,
+isFinite(c)||isFinite(f)?1===c&&1===f?(f*=this.logarithmBase,c/=this.logarithmBase):1===f/c?(h=Math.pow(this.logarithmBase,this.interval),f*=h,c/=h):c>f?(h=Math.min(0.01*(c/f),5),1<=f?c=f/h:f=c*h):(h=Math.min(f/c*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==f&&(f*=h),1!==c&&(c/=h)):(f="undefined"===typeof this.options.interval?0:this.options.interval,c=1),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):
+this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<c&&(c=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>f&&(f=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?c/Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(c)/d/this.interval)),this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?
+Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?f*Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(f)/d/this.interval)),this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)),
+1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||
+this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&
+this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(d=Math.floor(this.viewportMinimum/b+0.5)*b;d<this.viewportMinimum;)d+=b;this.equidistantInterval=!1;this.intervalStartPosition=d;this.interval=b}else this.options.interval||(b=Math.ceil(this.interval),this.range>this.interval&&(this.interval=b,c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=c;if(!this.valueFormatString&&
+(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){d=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2<d)for(b=0;b<d-2;b++)this.valueFormatString+="#"}};B.getNiceExponent=function(a,d){var b=Math.floor(Math.log(a)/Math.LN10),c=a/Math.pow(10,b),c=0>b?1>=c?1:5>=c?5:10:Math.max(Math.floor(c),1);return Number((c*Math.pow(10,b)).toFixed(20))};B.getNiceNumber=function(a,d){var b=Math.floor(Math.log(a)/Math.LN10),c=a/Math.pow(10,b);return Number(((d?
+1.5>c?1:3>c?2:7>c?5:10:1>=c?1:2>=c?2:5>=c?5:10)*Math.pow(10,b)).toFixed(20))};B.prototype.getLabelStartPoint=function(){var a=E[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===
+this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+
+(7-a.getDay())),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),
+a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};U(na,M);na.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var d=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(qa(this.parent.stripLines),d=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[d]=this.options}};na.prototype.render=function(){this.ctx.save();
+var a=this.parent.getPixelCoordinatesOnAxis(this.value),d=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness);if(0<d){var b=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var c=this.ctx.globalAlpha;this.ctx.globalAlpha=b;G(this.id);var f,g,h,l;this.ctx.lineWidth=d;this.ctx.setLineDash&&this.ctx.setLineDash(I(this.lineDashType,d));if("bottom"===this.parent._position||"top"===this.parent._position)f=
+g=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,h=this.chart.plotArea.y1,l=this.chart.plotArea.y2,this.bounds={x1:f-d/2,y1:h,x2:g+d/2,y2:l};else if("left"===this.parent._position||"right"===this.parent._position)h=l=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,f=this.chart.plotArea.x1,g=this.chart.plotArea.x2,this.bounds={x1:f,y1:h-d/2,x2:g,y2:l+d/2};this.ctx.moveTo(f,h);this.ctx.lineTo(g,l);this.ctx.stroke();this.ctx.globalAlpha=c}this.ctx.restore()};U(S,M);S.prototype._initialize=function(){if(this.enabled){this.container=
+document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position="absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.display="none";var a;a='<div style=" width: auto;height: auto;min-width: 50px;';a+="line-height: auto;";a+="margin: 0px 0px 0px 0px;";a+="padding: 5px;";a+="font-family: Calibri, Arial, Georgia, serif;";a+="font-weight: normal;";
+a+="font-style: "+(u?"italic;":"normal;");a+="font-size: 14px;";a+="color: #000000;";a+="text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);";a+="text-align: left;";a+="border: 2px solid gray;";a+=u?"background: rgba(255,255,255,.9);":"background: rgb(255,255,255);";a+="text-indent: 0px;";a+="white-space: nowrap;";a+="border-radius: 5px;";a+="-moz-user-select:none;";a+="-khtml-user-select: none;";a+="-webkit-user-select: none;";a+="-ms-user-select: none;";a+="user-select: none;";u||(a+="filter: alpha(opacity = 90);",
+a+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');");a+='} "> Sample Tooltip</div>';this.container.innerHTML=a;this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};S.prototype.mouseMoveHandler=function(a,d){this._lastUpdated&&40>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(a,d))};
+S.prototype._updateToolTip=function(a,d,b){b="undefined"===typeof b?!0:b;this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var c=null,f=null,g=[],h=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){f=[];if(this.chart.axisX)for(var l=
+0;l<this.chart.axisX.length;l++){for(var h=this.chart.axisX[l].convertPixelToValue({y:d}),k=null,c=0;c<this.chart.axisX[l].dataSeries.length;c++)(k=this.chart.axisX[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));k=null}if(this.chart.axisX2)for(l=0;l<this.chart.axisX2.length;l++){h=this.chart.axisX2[l].convertPixelToValue({y:d});k=null;for(c=0;c<this.chart.axisX2[l].dataSeries.length;c++)(k=this.chart.axisX2[l].dataSeries[c].getDataPointAtX(h,
+b))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));k=null}}else{f=[];if(this.chart.axisX)for(l=0;l<this.chart.axisX.length;l++)for(h=this.chart.axisX[l].convertPixelToValue({x:a}),k=null,c=0;c<this.chart.axisX[l].dataSeries.length;c++)(k=this.chart.axisX[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));if(this.chart.axisX2)for(l=0;l<this.chart.axisX2.length;l++)for(h=
+this.chart.axisX2[l].convertPixelToValue({x:a}),k=null,c=0;c<this.chart.axisX2[l].dataSeries.length;c++)(k=this.chart.axisX2[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k))}if(0===f.length)return;f.sort(function(a,b){return a.distance-b.distance});b=f[0];for(c=0;c<f.length;c++)f[c].dataPoint.x.valueOf()===b.dataPoint.x.valueOf()&&g.push(f[c]);f=null}else{if(k=this.chart.getDataPointAtXY(a,d,b))this.currentDataPointIndex=
+k.dataPointIndex,this.currentSeriesIndex=k.dataSeries.index;else if(u)if(k=La(a,d,this.chart._eventManager.ghostCtx),0<k&&"undefined"!==typeof this.chart._eventManager.objectMap[k]){k=this.chart._eventManager.objectMap[k];if("legendItem"===k.objectType)return;this.currentSeriesIndex=k.dataSeriesIndex;this.currentDataPointIndex=0<=k.dataPointIndex?k.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){f=this.chart.data[this.currentSeriesIndex];
+k={};if(0<=this.currentDataPointIndex)c=f.dataPoints[this.currentDataPointIndex],k.dataSeries=f,k.dataPoint=c,k.index=this.currentDataPointIndex,k.distance=Math.abs(c.x-h);else{if(!this.enabled||"line"!==f.type&&"stepLine"!==f.type&&"spline"!==f.type&&"area"!==f.type&&"stepArea"!==f.type&&"splineArea"!==f.type&&"stackedArea"!==f.type&&"stackedArea100"!==f.type&&"rangeArea"!==f.type&&"rangeSplineArea"!==f.type&&"candlestick"!==f.type&&"ohlc"!==f.type)return;h=f.axisX.convertPixelToValue({x:a});k=f.getDataPointAtX(h,
+b);k.dataSeries=f;this.currentDataPointIndex=k.index;c=k.dataPoint}if(!x(k.dataPoint.y))if(k.dataSeries.axisY)if(0<k.dataPoint.y.length){for(c=b=0;c<k.dataPoint.y.length;c++)k.dataPoint.y[c]<k.dataSeries.axisY.viewportMinimum?b--:k.dataPoint.y[c]>k.dataSeries.axisY.viewportMaximum&&b++;b<k.dataPoint.y.length&&b>-k.dataPoint.y.length&&g.push(k)}else"column"===f.type||"bar"===f.type?0>k.dataPoint.y?0>k.dataSeries.axisY.viewportMinimum&&k.dataSeries.axisY.viewportMaximum>=k.dataPoint.y&&g.push(k):k.dataSeries.axisY.viewportMinimum<=
+k.dataPoint.y&&0<=k.dataSeries.axisY.viewportMaximum&&g.push(k):"bubble"===f.type?(b=this.chart._eventManager.objectMap[f.dataPointIds[k.index]].size/2,k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum-b&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum+b&&g.push(k)):(0<=k.dataSeries.type.indexOf("100")||"stackedColumn"===f.type||"stackedBar"===f.type||k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum)&&g.push(k);else g.push(k)}}if(0<g.length&&(this.highlightObjects(g),
+this.enabled))if(b="",b=this.getToolTipInnerHTML({entries:g}),null!==b){this.contentDiv.innerHTML=b;this.contentDiv.innerHTML=b;b=!1;"none"===this.container.style.display&&(b=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor=this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:
+g[0].dataPoint.color?g[0].dataPoint.color:g[0].dataSeries.color?g[0].dataSeries.color:g[0].dataSeries._colorSet[g[0].index%g[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?
+this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:u?"italic":"normal"}catch(m){}"pie"===g[0].dataSeries.type||"doughnut"===g[0].dataSeries.type||"funnel"===g[0].dataSeries.type||"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||
+"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));a+="px";d=1!==g.length||this.shared||"line"!==g[0].dataSeries.type&&
+"stepLine"!==g[0].dataSeries.type&&"spline"!==g[0].dataSeries.type&&"area"!==g[0].dataSeries.type&&"stepArea"!==g[0].dataSeries.type&&"splineArea"!==g[0].dataSeries.type?"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x):d:g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y);d=-d+10;0<d+this.container.clientHeight+5&&(d-=d+this.container.clientHeight+
+5-0);this.container.style.left=a;this.container.style.bottom=d+"px";!this.animationEnabled||b?this.disableAnimation():this.enableAnimation()}else this.hide(!1)}};S.prototype.highlightObjects=function(a){var d=this.chart.overlaidCanvasCtx;this.chart.resetOverlayedCanvas();d.clearRect(0,0,this.chart.width,this.chart.height);d.save();var b=this.chart.plotArea,c=0;d.beginPath();d.rect(b.x1,b.y1,b.x2-b.x1,b.y2-b.y1);d.clip();for(b=0;b<a.length;b++){var f=a[b];if((f=this.chart._eventManager.objectMap[f.dataSeries.dataPointIds[f.index]])&&
+f.objectType&&"dataPoint"===f.objectType){var c=this.chart.data[f.dataSeriesIndex],g=c.dataPoints[f.dataPointIndex],h=f.dataPointIndex;!1===g.highlightEnabled||!0!==c.highlightEnabled&&!0!==g.highlightEnabled||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"scatter"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type?(g=c.getMarkerProperties(h,f.x1,f.y1,this.chart.overlaidCanvasCtx),
+g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),P.drawMarkers([g]),"undefined"!==typeof f.y2&&(g=c.getMarkerProperties(h,f.x1,f.y2,this.chart.overlaidCanvasCtx),g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),P.drawMarkers([g]))):"bubble"===c.type?(g=c.getMarkerProperties(h,f.x1,f.y1,this.chart.overlaidCanvasCtx),g.size=f.size,g.color=
+"white",g.borderColor="white",d.globalAlpha=0.3,P.drawMarkers([g]),d.globalAlpha=1):"column"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"bar"===c.type||"rangeBar"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"rangeColumn"===c.type?N(d,f.x1,f.y1,f.x2,f.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===c.type||"doughnut"===c.type?Ga(d,f.center,f.radius,"white",c.type,f.startAngle,f.endAngle,0.3,f.percentInnerRadius):"candlestick"===c.type?(d.globalAlpha=1,d.strokeStyle=
+f.color,d.lineWidth=2*f.borderThickness,c=0===d.lineWidth%2?0:0.5,d.beginPath(),d.moveTo(f.x3-c,Math.min(f.y2,f.y3)),d.lineTo(f.x3-c,Math.min(f.y1,f.y4)),d.stroke(),d.beginPath(),d.moveTo(f.x3-c,Math.max(f.y1,f.y4)),d.lineTo(f.x3-c,Math.max(f.y2,f.y3)),d.stroke(),N(d,f.x1,Math.min(f.y1,f.y4),f.x2,Math.max(f.y1,f.y4),"transparent",2*f.borderThickness,f.color,!1,!1,!1,!1),d.globalAlpha=1):"ohlc"===c.type&&(d.globalAlpha=1,d.strokeStyle=f.color,d.lineWidth=2*f.borderThickness,c=0===d.lineWidth%2?0:0.5,
+d.beginPath(),d.moveTo(f.x3-c,f.y2),d.lineTo(f.x3-c,f.y3),d.stroke(),d.beginPath(),d.moveTo(f.x3,f.y1),d.lineTo(f.x1,f.y1),d.stroke(),d.beginPath(),d.moveTo(f.x3,f.y4),d.lineTo(f.x2,f.y4),d.stroke(),d.globalAlpha=1))}}d.restore();d.globalAlpha=1;d.beginPath()};S.prototype.getToolTipInnerHTML=function(a){var d=a.entries,b=null,c=null,f=null,g=0;a="";for(var h=!0,l=0;l<d.length;l++)if(d[l].dataSeries.toolTipContent||d[l].dataPoint.toolTipContent){h=!1;break}if(h&&(this.content&&"function"===typeof this.content||
+this.contentFormatter))d={chart:this.chart,toolTip:this.options,entries:d},b=this.contentFormatter?this.contentFormatter(d):this.content(d);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var k=null,m="",l=0;l<d.length;l++)if(c=d[l].dataSeries,f=d[l].dataPoint,g=d[l].index,a="",0===l&&(h&&!this.content)&&(this.chart.axisX&&0<this.chart.axisX.length?m+="undefined"!==typeof this.chart.axisX[0].labels[f.x]?this.chart.axisX[0].labels[f.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&
+(m+="undefined"!==typeof this.chart.axisX2[0].labels[f.x]?this.chart.axisX2[0].labels[f.x]:"{x}"),m+="</br>",m=this.chart.replaceKeywordsWithValue(m,f,c,g)),null!==f.toolTipContent&&("undefined"!==typeof f.toolTipContent||null!==c.options.toolTipContent)){if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===
+c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}",k=c.axisXIndex;else if("bubble"===c.type)this.chart.axisX&&
+1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&
+(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":
+""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}";null===b&&(b="");!0===this.reversed?(b=this.chart.replaceKeywordsWithValue(a,f,c,g)+b,l<d.length-1&&(b="</br>"+b)):(b+=this.chart.replaceKeywordsWithValue(a,
+f,c,g),l<d.length-1&&(b+="</br>"));c.toolTipContent=a}null!==b&&(b=m+b)}else{c=d[0].dataSeries;f=d[0].dataPoint;g=d[0].index;if(null===f.toolTipContent||"undefined"===typeof f.toolTipContent&&null===c.options.toolTipContent)return null;if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===
+c.type||"stackedArea"===c.type||"stackedArea100"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}";else if("bubble"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?
+"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("pie"===c.type||"doughnut"===c.type||"funnel"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.name?"{name}:</span>&nbsp;&nbsp;":f.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{y}";else if("rangeColumn"===c.type||"rangeBar"===
+c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:
+"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+"</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}";null===b&&(b="");b+=this.chart.replaceKeywordsWithValue(a,f,c,g)}this.content=a;return b};S.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition=
+"left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.transition="left .2s ease-out, bottom .2s ease-out")};S.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};S.prototype.hide=function(a){this.container&&(this.container.style.display="none",
+this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};S.prototype.show=function(a,d,b){this._updateToolTip(a,d,"undefined"===typeof b?!1:b)};A.prototype.getPercentAndTotal=function(a,d){var b=null,c=null,f=null;if(0<=a.type.indexOf("stacked"))c=0,b=d.x.getTime?d.x.getTime():d.x,b in a.plotUnit.yTotals&&(c=a.plotUnit.yTotals[b],f=isNaN(d.y)?0:0===c?0:100*(d.y/c));else if("pie"===a.type||"doughnut"===a.type){for(i=c=0;i<a.dataPoints.length;i++)isNaN(a.dataPoints[i].y)||
+(c+=a.dataPoints[i].y);f=isNaN(d.y)?0:100*(d.y/c)}return{percent:f,total:c}};A.prototype.replaceKeywordsWithValue=function(a,d,b,c,f){var g=this;f="undefined"===typeof f?0:f;if((0<=b.type.indexOf("stacked")||"pie"===b.type||"doughnut"===b.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",l="#total",k=this.getPercentAndTotal(b,d),l=isNaN(k.total)?l:k.total,h=isNaN(k.percent)?h:k.percent;do{k="";if(b.percentFormatString)k=b.percentFormatString;else{var k="#,##0.",m=Math.max(Math.ceil(Math.log(1/
+Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var n=0;n<m;n++)k+="#";b.percentFormatString=k}a=a.replace("#percent",da(h,k,g._cultureInfo));a=a.replace("#total",da(l,b.yValueFormatString?b.yValueFormatString:"#,##0.########",g._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=ka(a.slice(1,a.length-1));a=a.replace("#index",
+f);var e=null;try{var h=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);h&&0<h.length&&(e=ka(h[2]),a=ka(h[1]))}catch(k){}h=null;if("color"===a)return d.color?d.color:b.color?b.color:b._colorSet[c%b._colorSet.length];if(d.hasOwnProperty(a))h=d;else if(b.hasOwnProperty(a))h=b;else return"";h=h[a];null!==e&&(h=h[e]);if("x"===a)if("dateTime"===g.plotInfo.axisXValueType||"dateTime"===b.xValueType||d.x&&d.x.getTime){if(g.plotInfo.plotTypes[0].plotUnits[0].axisX&&!g.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic)return Ea(h,
+d.xValueFormatString?d.xValueFormatString:b.xValueFormatString?b.xValueFormatString:b.xValueFormatString=g.axisX&&g.axisX.autoValueFormatString?g.axisX.autoValueFormatString:"DD MMM YY",g._cultureInfo)}else return da(h,d.xValueFormatString?d.xValueFormatString:b.xValueFormatString?b.xValueFormatString:b.xValueFormatString="#,##0.########",g._cultureInfo);else return"y"===a?da(h,d.yValueFormatString?d.yValueFormatString:b.yValueFormatString?b.yValueFormatString:b.yValueFormatString="#,##0.########",
+g._cultureInfo):"z"===a?da(h,d.zValueFormatString?d.zValueFormatString:b.zValueFormatString?b.zValueFormatString:b.zValueFormatString="#,##0.########",g._cultureInfo):h})};la.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];u&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};la.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};
+la.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var d=[],b=xa(a),c=null;if((c=this.chart.getObjectAtXY(b.x,b.y,!1))&&"undefined"!==typeof this.objectMap[c])if(c=this.objectMap[c],"dataPoint"===c.objectType){var f=this.chart.data[c.dataSeriesIndex],g=f.dataPoints[c.dataPointIndex],h=c.dataPointIndex;c.eventParameter={x:b.x,y:b.y,dataPoint:g,dataSeries:f.options,dataPointIndex:h,dataSeriesIndex:f.index,chart:this.chart};c.eventContext={context:g,userContext:g,mouseover:"mouseover",
+mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(c);c=this.objectMap[f.id];c.eventParameter={x:b.x,y:b.y,dataPoint:g,dataSeries:f.options,dataPointIndex:h,dataSeriesIndex:f.index,chart:this.chart};c.eventContext={context:f,userContext:f.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(this.objectMap[f.id])}else"legendItem"===c.objectType&&(f=this.chart.data[c.dataSeriesIndex],g=null!==c.dataPointIndex?f.dataPoints[c.dataPointIndex]:null,
+c.eventParameter={x:b.x,y:b.y,dataSeries:f.options,dataPoint:g,dataPointIndex:c.dataPointIndex,dataSeriesIndex:c.dataSeriesIndex,chart:this.chart},c.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},d.push(c));f=[];for(b=0;b<this.mouseoveredObjectMaps.length;b++){g=!0;for(c=0;c<d.length;c++)if(d[c].id===this.mouseoveredObjectMaps[b].id){g=!1;break}g?this.fireEvent(this.mouseoveredObjectMaps[b],
+"mouseout",a):f.push(this.mouseoveredObjectMaps[b])}this.mouseoveredObjectMaps=f;for(b=0;b<d.length;b++){f=!1;for(c=0;c<this.mouseoveredObjectMaps.length;c++)if(d[b].id===this.mouseoveredObjectMaps[c].id){f=!0;break}f||(this.fireEvent(d[b],"mouseover",a),this.mouseoveredObjectMaps.push(d[b]));"click"===a.type?this.fireEvent(d[b],"click",a):"mousemove"===a.type&&this.fireEvent(d[b],"mousemove",a)}}};la.prototype.fireEvent=function(a,d,b){if(a&&d){var c=a.eventParameter,f=a.eventContext,g=a.eventContext.userContext;
+g&&(f&&g[f[d]])&&g[f[d]].call(g,c);"mouseout"!==d?g.cursor&&g.cursor!==b.target.style.cursor&&(b.target.style.cursor=g.cursor):(b.target.style.cursor=this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===d&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],c)}};U(oa,M);Da.prototype.animate=function(a,d,b,c,f){var g=this;this.chart.isAnimating=!0;f=f||F.easing.linear;b&&this.animations.push({startTime:(new Date).getTime()+
+(a?a:0),duration:d,animationCallback:b,onComplete:c});for(a=[];0<this.animations.length;)if(d=this.animations.shift(),b=(new Date).getTime(),c=0,d.startTime<=b&&(c=f(Math.min(b-d.startTime,d.duration),0,1,d.duration),c=Math.min(c,1),isNaN(c)||!isFinite(c))&&(c=1),1>c&&a.push(d),d.animationCallback(c),1<=c&&d.onComplete)d.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){g.animate.call(g)}):this.chart.isAnimating=!1};
+Da.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var F={yScaleAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas,f=d.animationBase;b.drawImage(c,0,0,c.width,c.height,0,f-f*a,b.canvas.width/Q,a*b.canvas.height/Q)}},xScaleAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas,f=d.animationBase;b.drawImage(c,0,0,
+c.width,c.height,f-f*a,0,a*b.canvas.width/Q,b.canvas.height/Q)}},xClipAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas;b.save();0<a&&b.drawImage(c,0,0,c.width*a,c.height,0,0,c.width*a/Q,c.height/Q);b.restore()}},fadeInAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas;b.save();b.globalAlpha=a;b.drawImage(c,0,0,c.width,c.height,0,0,b.canvas.width/Q,b.canvas.height/Q);b.restore()}},easing:{linear:function(a,d,b,c){return b*a/c+d},easeOutQuad:function(a,d,b,c){return-b*
+(a/=c)*(a-2)+d},easeOutQuart:function(a,d,b,c){return-b*((a=a/c-1)*a*a*a-1)+d},easeInQuad:function(a,d,b,c){return b*(a/=c)*a+d},easeInQuart:function(a,d,b,c){return b*(a/=c)*a*a*a+d}}},P={drawMarker:function(a,d,b,c,f,g,h,l){if(b){var k=1;b.fillStyle=g?g:"#000000";b.strokeStyle=h?h:"#000000";b.lineWidth=l?l:0;"circle"===c?(b.moveTo(a,d),b.beginPath(),b.arc(a,d,f/2,0,2*Math.PI,!1),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k))):
+"square"===c?(b.beginPath(),b.rect(a-f/2,d-f/2,f,f),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k))):"triangle"===c?(b.beginPath(),b.moveTo(a-f/2,d+f/2),b.lineTo(a+f/2,d+f/2),b.lineTo(a,d-f/2),b.closePath(),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k)),b.beginPath()):"cross"===c&&(b.strokeStyle=g,b.lineWidth=f/4,b.beginPath(),b.moveTo(a-f/2,d-f/2),b.lineTo(a+f/
+2,d+f/2),b.stroke(),b.moveTo(a+f/2,d-f/2),b.lineTo(a-f/2,d+f/2),b.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var b=a[d];P.drawMarker(b.x,b.y,b.ctx,b.type,b.size,b.color,b.borderColor,b.borderThickness)}}},Oa={Chart:A,addColorSet:function(a,d){ha[a]=d},addCultureInfo:function(a,d){pa[a]=d},formatNumber:function(a,d,b){b=b||"en";if(pa[b])return da(a,d||"#,##0.##",new oa(b));throw"Unknown Culture Name";},formatDate:function(a,d,b){b=b||"en";if(pa[b])return Ea(a,d||"DD MMM YYYY",
+new oa(b));throw"Unknown Culture Name";}};Oa.Chart.version="v1.9.8 GA";window.CanvasJS=Oa})();
+/*
+  excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
+
+  Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
+  Licensed under the Apache License, Version 2.0
+*/
+document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
+a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
+"px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
+a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;1<c&&c--;return 1>6*c?a+6*(b-a)*c:
+1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+
+v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
+c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("<g_vml_:stroke",
+' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q,
+n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
+I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]*
+b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height}
+function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
+V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
+bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
+darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",
+ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
+mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
+peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
+H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo=
+function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d,
+x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
+c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width=
+e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
+10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
+k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
+' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
+f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a=
+{};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a,
+b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize);
+m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right":
+"left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?S(this,n):T(this,n,{x:-d,y:0},
+{x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a,
+b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){};
+d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR=
+13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}();
diff --git a/charts/canvas/charts.zip b/charts/canvas/charts.zip
new file mode 100644 (file)
index 0000000..2f4881f
Binary files /dev/null and b/charts/canvas/charts.zip differ
diff --git a/charts/canvas/examples/01-line-chart/basic-line-chart.html b/charts/canvas/examples/01-line-chart/basic-line-chart.html
new file mode 100644 (file)
index 0000000..7639789
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+       window.onload = function() {\r
+               var chart = new CanvasJS.Chart("chartContainer", {\r
+                       title: {\r
+                               text: "Line Chart"\r
+                       },\r
+                       axisX: {\r
+                               interval: 10\r
+                       },\r
+                       data: [{\r
+                               type: "line",\r
+                               dataPoints: [\r
+                                 { x: 10, y: 45 },\r
+                                 { x: 20, y: 14 },\r
+                                 { x: 30, y: 20 },\r
+                                 { x: 40, y: 60 },\r
+                                 { x: 50, y: 50 },\r
+                                 { x: 60, y: 80 },\r
+                                 { x: 70, y: 40 },\r
+                                 { x: 80, y: 60 },\r
+                                 { x: 90, y: 10 },\r
+                                 { x: 100, y: 50 },\r
+                                 { x: 110, y: 40 },\r
+                                 { x: 120, y: 14 },\r
+                                 { x: 130, y: 70 },\r
+                                 { x: 140, y: 40 },\r
+                                 { x: 150, y: 90 },\r
+                               ]\r
+                       }]\r
+               });\r
+               chart.render();\r
+       }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-date-time-axis.html b/charts/canvas/examples/01-line-chart/line-chart-with-date-time-axis.html
new file mode 100644 (file)
index 0000000..f617bc3
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+\r
+      title:{\r
+      text: "Earthquakes - per month"\r
+      },\r
+       data: [\r
+      {\r
+        type: "line",\r
+\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 450 },\r
+        { x: new Date(2012, 01, 1), y: 414 },\r
+        { x: new Date(2012, 02, 1), y: 520 },\r
+        { x: new Date(2012, 03, 1), y: 460 },\r
+        { x: new Date(2012, 04, 1), y: 450 },\r
+        { x: new Date(2012, 05, 1), y: 500 },\r
+        { x: new Date(2012, 06, 1), y: 480 },\r
+        { x: new Date(2012, 07, 1), y: 480 },\r
+        { x: new Date(2012, 08, 1), y: 410 },\r
+        { x: new Date(2012, 09, 1), y: 500 },\r
+        { x: new Date(2012, 10, 1), y: 480 },\r
+        { x: new Date(2012, 11, 1), y: 510 }\r
+        ]\r
+      }\r
+      ]\r
+    });\r
+\r
+    chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-line-customization.html b/charts/canvas/examples/01-line-chart/line-chart-with-line-customization.html
new file mode 100644 (file)
index 0000000..f6ef925
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      title:{\r
+      text: "Line Chart with Different Color in a Section"\r
+      },\r
+      data: [\r
+      {\r
+        type: "line",\r
+        dataPoints: [\r
+        { x: 10, y: 71 },\r
+        { x: 20, y: 55 },\r
+        { x: 30, y: 50 },\r
+        { x: 40, y: 65, lineColor:"red" }, //**Change the lineColor here\r
+        { x: 50, y: 68 },\r
+        { x: 60, y: 28 },\r
+        { x: 70, y: 34 },\r
+        { x: 80, y: 14 },\r
+        { x: 90, y: 23},\r
+        ]\r
+      }\r
+      ]\r
+    });\r
+\r
+    chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-null(empty)-data.html b/charts/canvas/examples/01-line-chart/line-chart-with-null(empty)-data.html
new file mode 100644 (file)
index 0000000..d3c4ebf
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      title:{\r
+      text: "Line Chart with Null Data Point"  //**Change the title here\r
+      },\r
+      data: [\r
+      {\r
+        type: "line",\r
+        dataPoints: [\r
+        { x: 10, y: 71 },\r
+        { x: 20, y: 55 },\r
+        { x: 30, y: 50 },\r
+        { x: 40, y: 65 },\r
+        { x: 50, y: null }, //** null data point\r
+        { x: 60, y: 68 },\r
+        { x: 70, y: 28 },\r
+        { x: 80, y: 34 },\r
+        { x: 90, y: 14 }\r
+        ]\r
+      }\r
+      ]\r
+    });\r
+\r
+    chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-stripline.html b/charts/canvas/examples/01-line-chart/line-chart-with-stripline.html
new file mode 100644 (file)
index 0000000..f574129
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer", {\r
+               title: {\r
+                       text: "Stripline on  Axis X"\r
+               },\r
+               axisX:{\r
+                       stripLines:[\r
+                       {\r
+                               value:1940,\r
+                               color: "red"\r
+                       }\r
+                       ]\r
+               },\r
+               data: [\r
+               {\r
+                       type: "line",\r
+                       dataPoints: [\r
+                               { x: 1910, y: 5 },\r
+                               { x: 1920, y: 9 },\r
+                               { x: 1930, y: 17},\r
+                               { x: 1940, y: 32},\r
+                               { x: 1950, y: 22},\r
+                               { x: 1960, y: 14},\r
+                               { x: 1970, y: 25},\r
+                               { x: 1980, y: 18},\r
+                               { x: 1990, y: 20}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-xy-zoom-type.html b/charts/canvas/examples/01-line-chart/line-chart-with-xy-zoom-type.html
new file mode 100644 (file)
index 0000000..ebf447f
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+\r
+\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      zoomEnabled: true,\r
+      zoomType: "xy",\r
+      title:{\r
+        text: "Enable Zooming on X & Y Axis"\r
+      },\r
+      legend: {\r
+        horizontalAlign: "right",\r
+        verticalAlign: "center"\r
+      },\r
+      axisY:{\r
+        includeZero: false\r
+      },\r
+      data: data,  // random generator below\r
+\r
+   });\r
+\r
+    chart.render();\r
+  }\r
+\r
+   var limit = 1000;    //increase number of dataPoints by increasing this\r
+\r
+    var y = 0;\r
+    var data = []; var dataSeries = { type: "line" };\r
+    var dataPoints = [];\r
+    for (var i = 0; i < limit; i += 1) {\r
+        y += (Math.random() * 10 - 5);\r
+         dataPoints.push({\r
+          x: i - limit / 2,\r
+          y: y\r
+           });\r
+        }\r
+     dataSeries.dataPoints = dataPoints;\r
+     data.push(dataSeries);\r
+\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/line-chart-with-zooming.html b/charts/canvas/examples/01-line-chart/line-chart-with-zooming.html
new file mode 100644 (file)
index 0000000..c89e909
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      zoomEnabled: true,\r
+      title:{\r
+        text: "Try Zooming And Panning"\r
+      },\r
+      axisY:{\r
+        includeZero: false\r
+      },\r
+      data: data,  // random generator below\r
+\r
+   });\r
+\r
+    chart.render();\r
+  }\r
+\r
+   var limit = 1000;    //increase number of dataPoints by increasing this\r
+\r
+    var y = 0;\r
+    var data = []; var dataSeries = { type: "line" };\r
+    var dataPoints = [];\r
+    for (var i = 0; i < limit; i += 1) {\r
+        y += (Math.random() * 10 - 5);\r
+         dataPoints.push({\r
+          x: i - limit / 2,\r
+          y: y\r
+           });\r
+        }\r
+     dataSeries.dataPoints = dataPoints;\r
+     data.push(dataSeries);\r
+\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/01-line-chart/multi-series-line-chart.html b/charts/canvas/examples/01-line-chart/multi-series-line-chart.html
new file mode 100644 (file)
index 0000000..0f5b4ad
--- /dev/null
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Site Traffic",\r
+                                       fontSize: 30\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       gridColor: "Silver",\r
+                                       tickColor: "silver",\r
+                                       valueFormatString: "DD/MMM"\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               theme: "theme2",\r
+                               axisY: {\r
+                                       gridColor: "Silver",\r
+                                       tickColor: "silver"\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "center",\r
+                                       horizontalAlign: "right"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "line",\r
+                                       showInLegend: true,\r
+                                       lineThickness: 2,\r
+                                       name: "Visits",\r
+                                       markerType: "square",\r
+                                       color: "#F08080",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2010, 0, 3), y: 650 },\r
+                                       { x: new Date(2010, 0, 5), y: 700 },\r
+                                       { x: new Date(2010, 0, 7), y: 710 },\r
+                                       { x: new Date(2010, 0, 9), y: 658 },\r
+                                       { x: new Date(2010, 0, 11), y: 734 },\r
+                                       { x: new Date(2010, 0, 13), y: 963 },\r
+                                       { x: new Date(2010, 0, 15), y: 847 },\r
+                                       { x: new Date(2010, 0, 17), y: 853 },\r
+                                       { x: new Date(2010, 0, 19), y: 869 },\r
+                                       { x: new Date(2010, 0, 21), y: 943 },\r
+                                       { x: new Date(2010, 0, 23), y: 970 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "line",\r
+                                       showInLegend: true,\r
+                                       name: "Unique Visits",\r
+                                       color: "#20B2AA",\r
+                                       lineThickness: 2,\r
+\r
+                                       dataPoints: [\r
+                                       { x: new Date(2010, 0, 3), y: 510 },\r
+                                       { x: new Date(2010, 0, 5), y: 560 },\r
+                                       { x: new Date(2010, 0, 7), y: 540 },\r
+                                       { x: new Date(2010, 0, 9), y: 558 },\r
+                                       { x: new Date(2010, 0, 11), y: 544 },\r
+                                       { x: new Date(2010, 0, 13), y: 693 },\r
+                                       { x: new Date(2010, 0, 15), y: 657 },\r
+                                       { x: new Date(2010, 0, 17), y: 663 },\r
+                                       { x: new Date(2010, 0, 19), y: 639 },\r
+                                       { x: new Date(2010, 0, 21), y: 673 },\r
+                                       { x: new Date(2010, 0, 23), y: 660 }\r
+                                       ]\r
+                               }\r
+                               ],\r
+                               legend: {\r
+                                       cursor: "pointer",\r
+                                       itemclick: function (e) {\r
+                                               if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {\r
+                                                       e.dataSeries.visible = false;\r
+                                               }\r
+                                               else {\r
+                                                       e.dataSeries.visible = true;\r
+                                               }\r
+                                               chart.render();\r
+                                       }\r
+                               }\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/01-line-chart/multiple-charts-in-one-page.html b/charts/canvas/examples/01-line-chart/multiple-charts-in-one-page.html
new file mode 100644 (file)
index 0000000..e2e3462
--- /dev/null
@@ -0,0 +1,266 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer1", {\r
+                               theme: "theme2",\r
+                               title: {\r
+                                       text: "Earthquakes - per month"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       valueFormatString: "MMM",\r
+                                       interval: 1,\r
+                                       intervalType: "month"\r
+\r
+                               },\r
+                               axisY: {\r
+                                       includeZero: false\r
+\r
+                               },\r
+                               data: [{\r
+                                       type: "line",\r
+                                       //lineThickness: 3,\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 450 },\r
+                                       { x: new Date(2012, 01, 1), y: 414 },\r
+                                       { x: new Date(2012, 02, 1), y: 520, indexLabel: "highest", markerColor: "red", markerType: "triangle" },\r
+                                       { x: new Date(2012, 03, 1), y: 460 },\r
+                                       { x: new Date(2012, 04, 1), y: 450 },\r
+                                       { x: new Date(2012, 05, 1), y: 500 },\r
+                                       { x: new Date(2012, 06, 1), y: 480 },\r
+                                       { x: new Date(2012, 07, 1), y: 480 },\r
+                                       { x: new Date(2012, 08, 1), y: 410, indexLabel: "lowest", markerColor: "DarkSlateGrey", markerType: "cross" },\r
+                                       { x: new Date(2012, 09, 1), y: 500 },\r
+                                       { x: new Date(2012, 10, 1), y: 480 },\r
+                                       { x: new Date(2012, 11, 1), y: 510 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+\r
+                       var chart = new CanvasJS.Chart("chartContainer2", {\r
+                               title: {\r
+                                       text: "Share Value over a Year"\r
+                               },\r
+                               theme: "theme2",\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       valueFormatString: "MMM"\r
+                               },\r
+                               axisY: {\r
+                                       valueFormatString: "#0$"\r
+                               },\r
+                               data: [{\r
+                                       type: "line",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 01, 1), y: 71, indexLabel: "gain", markerType: "triangle", markerColor: "#6B8E23", markerSize: 12 },\r
+                                       { x: new Date(2012, 02, 1), y: 55, indexLabel: "loss", markerType: "cross", markerColor: "tomato", markerSize: 12 },\r
+                                       { x: new Date(2012, 03, 1), y: 50, indexLabel: "loss", markerType: "cross", markerColor: "tomato", markerSize: 12 },\r
+                                       { x: new Date(2012, 04, 1), y: 65, indexLabel: "gain", markerType: "triangle", markerColor: "#6B8E23", markerSize: 12 },\r
+                                       { x: new Date(2012, 05, 1), y: 85, indexLabel: "gain", markerType: "triangle", markerColor: "#6B8E23", markerSize: 12 },\r
+                                       { x: new Date(2012, 06, 1), y: 68, indexLabel: "loss", markerType: "cross", markerColor: "tomato", markerSize: 12 },\r
+                                       { x: new Date(2012, 07, 1), y: 28, indexLabel: "loss", markerType: "cross", markerColor: "tomato", markerSize: 12 },\r
+                                       { x: new Date(2012, 08, 1), y: 34, indexLabel: "gain", markerType: "triangle", markerColor: "#6B8E23", markerSize: 12 },\r
+                                       { x: new Date(2012, 09, 1), y: 24, indexLabel: "loss", markerType: "cross", markerColor: "tomato", markerSize: 12 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+\r
+                       var chart = new CanvasJS.Chart("chartContainer3", {\r
+                               title: {\r
+                                       text: "Site Traffic",\r
+                                       fontSize: 30\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+\r
+                                       gridColor: "Silver",\r
+                                       tickColor: "silver",\r
+                                       valueFormatString: "DD/MMM"\r
+\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               theme: "theme2",\r
+                               axisY: {\r
+                                       gridColor: "Silver",\r
+                                       tickColor: "silver"\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+                               data: [{\r
+                                       type: "line",\r
+                                       showInLegend: true,\r
+                                       lineThickness: 2,\r
+                                       name: "Visits",\r
+                                       markerType: "square",\r
+                                       color: "#F08080",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2010, 0, 3), y: 650 },\r
+                                       { x: new Date(2010, 0, 5), y: 700 },\r
+                                       { x: new Date(2010, 0, 7), y: 710 },\r
+                                       { x: new Date(2010, 0, 9), y: 658 },\r
+                                       { x: new Date(2010, 0, 11), y: 734 },\r
+                                       { x: new Date(2010, 0, 13), y: 963 },\r
+                                       { x: new Date(2010, 0, 15), y: 847 },\r
+                                       { x: new Date(2010, 0, 17), y: 853 },\r
+                                       { x: new Date(2010, 0, 19), y: 869 },\r
+                                       { x: new Date(2010, 0, 21), y: 943 },\r
+                                       { x: new Date(2010, 0, 23), y: 970 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "line",\r
+                                       showInLegend: true,\r
+                                       name: "Unique Visits",\r
+                                       color: "#20B2AA",\r
+                                       lineThickness: 2,\r
+\r
+                                       dataPoints: [\r
+                                       { x: new Date(2010, 0, 3), y: 510 },\r
+                                       { x: new Date(2010, 0, 5), y: 560 },\r
+                                       { x: new Date(2010, 0, 7), y: 540 },\r
+                                       { x: new Date(2010, 0, 9), y: 558 },\r
+                                       { x: new Date(2010, 0, 11), y: 544 },\r
+                                       { x: new Date(2010, 0, 13), y: 693 },\r
+                                       { x: new Date(2010, 0, 15), y: 657 },\r
+                                       { x: new Date(2010, 0, 17), y: 663 },\r
+                                       { x: new Date(2010, 0, 19), y: 639 },\r
+                                       { x: new Date(2010, 0, 21), y: 673 },\r
+                                       { x: new Date(2010, 0, 23), y: 660 }\r
+                                       ]\r
+                               }\r
+                               ],\r
+                       });\r
+\r
+                       chart.render();\r
+\r
+                       var chart = new CanvasJS.Chart("chartContainer4", {\r
+                               zoomEnabled: false,\r
+                               animationEnabled: true,\r
+                               title: {\r
+                                       text: "Mobile Phone Subscriptions"\r
+                               },\r
+                               axisY2: {\r
+                                       valueFormatString: "0.0 bn",\r
+\r
+                                       maximum: 1.2,\r
+                                       interval: .2,\r
+                                       interlacedColor: "#F5F5F5",\r
+                                       gridColor: "#D7D7D7",\r
+                                       tickColor: "#D7D7D7"\r
+                               },\r
+                               theme: "theme2",\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center",\r
+                                       fontSize: 15,\r
+                                       fontFamily: "Lucida Sans Unicode"\r
+                               },\r
+                               data: [{\r
+                                       type: "line",\r
+                                       lineThickness: 3,\r
+                                       axisYType: "secondary",\r
+                                       showInLegend: true,\r
+                                       name: "India",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2001, 0), y: 0 },\r
+                                       { x: new Date(2002, 0), y: 0.001 },\r
+                                       { x: new Date(2003, 0), y: 0.01 },\r
+                                       { x: new Date(2004, 0), y: 0.05 },\r
+                                       { x: new Date(2005, 0), y: 0.1 },\r
+                                       { x: new Date(2006, 0), y: 0.15 },\r
+                                       { x: new Date(2007, 0), y: 0.22 },\r
+                                       { x: new Date(2008, 0), y: 0.38 },\r
+                                       { x: new Date(2009, 0), y: 0.56 },\r
+                                       { x: new Date(2010, 0), y: 0.77 },\r
+                                       { x: new Date(2011, 0), y: 0.91 },\r
+                                       { x: new Date(2012, 0), y: 0.94 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "line",\r
+                                       lineThickness: 3,\r
+                                       showInLegend: true,\r
+                                       name: "China",\r
+                                       axisYType: "secondary",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2001, 00), y: 0.18 },\r
+                                       { x: new Date(2002, 00), y: 0.2 },\r
+                                       { x: new Date(2003, 0), y: 0.25 },\r
+                                       { x: new Date(2004, 0), y: 0.35 },\r
+                                       { x: new Date(2005, 0), y: 0.42 },\r
+                                       { x: new Date(2006, 0), y: 0.5 },\r
+                                       { x: new Date(2007, 0), y: 0.58 },\r
+                                       { x: new Date(2008, 0), y: 0.67 },\r
+                                       { x: new Date(2009, 0), y: 0.78 },\r
+                                       { x: new Date(2010, 0), y: 0.88 },\r
+                                       { x: new Date(2011, 0), y: 0.98 },\r
+                                       { x: new Date(2012, 0), y: 1.04 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "line",\r
+                                       lineThickness: 3,\r
+                                       showInLegend: true,\r
+                                       name: "USA",\r
+                                       axisYType: "secondary",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2001, 00), y: 0.16 },\r
+                                       { x: new Date(2002, 0), y: 0.17 },\r
+                                       { x: new Date(2003, 0), y: 0.18 },\r
+                                       { x: new Date(2004, 0), y: 0.19 },\r
+                                       { x: new Date(2005, 0), y: 0.20 },\r
+                                       { x: new Date(2006, 0), y: 0.23 },\r
+                                       { x: new Date(2007, 0), y: 0.261 },\r
+                                       { x: new Date(2008, 0), y: 0.289 },\r
+                                       { x: new Date(2009, 0), y: 0.3 },\r
+                                       { x: new Date(2010, 0), y: 0.31 },\r
+                                       { x: new Date(2011, 0), y: 0.32 },\r
+                                       { x: new Date(2012, 0), y: 0.33 }\r
+                                       ]\r
+                               }\r
+                               ],\r
+                               legend: {\r
+                                       cursor: "pointer",\r
+                                       itemclick: function (e) {\r
+                                               if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {\r
+                                                       e.dataSeries.visible = false;\r
+                                               }\r
+                                               else {\r
+                                                       e.dataSeries.visible = true;\r
+                                               }\r
+                                               chart.render();\r
+                                       }\r
+                               }\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer1" style="width: 45%; height: 300px;display: inline-block;"></div>\r
+       <div id="chartContainer2" style="width: 45%; height: 300px;display: inline-block;"></div>\r
+       <br />\r
+       <div id="chartContainer3" style="width: 45%; height: 300px;display: inline-block;"></div>\r
+       <div id="chartContainer4" style="width: 45%; height: 300px;display: inline-block;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/02-column-chart/basic-column-chart.html b/charts/canvas/examples/02-column-chart/basic-column-chart.html
new file mode 100644 (file)
index 0000000..945fc5e
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Column Chart"\r
+                               },\r
+                               data: [{\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                               { y: 45, label: "Apple" },\r
+                                               { y: 31, label: "Mango" },\r
+                                               { y: 52, label: "Pineapple" },\r
+                                               { y: 10, label: "Grapes" },\r
+                                               { y: 46, label: "Lemon" },\r
+                                               { y: 30, label: "Banana" },\r
+                                               { y: 50, label: "Watermelon" },\r
+                                               { y: 28, label: "Coconut" },\r
+                                               { y: 45, label: "Lychee" },\r
+                                               { y: 15, label: "Palm" },\r
+                                               { y: 48, label: "Orange" },\r
+                                               { y: 38, label: "Muskmelon" },\r
+                                               { y: 41, label: "Strawberry" },\r
+                                               { y: 25, label: "Kiwi" },\r
+                                               { y: 50, label: "Guava" },\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/02-column-chart/column-chart-with-index-label-customization.html b/charts/canvas/examples/02-column-chart/column-chart-with-index-label-customization.html
new file mode 100644 (file)
index 0000000..a5c2c6b
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Column Chart with Index Label and Data Point Width"\r
+                               },\r
+                               axisX: {\r
+                                       interval: 10\r
+                               },\r
+                               dataPointWidth: 60,\r
+                               data: [{\r
+                                       type: "column",\r
+                                       indexLabelLineThickness: 2,\r
+                                       dataPoints: [\r
+                                                 { x: 10, y: 230, indexLabel: "Lowest" },\r
+                                                 { x: 20, y: 710, indexLabel: "Highest" },\r
+                                                 { x: 30, y: 380 },\r
+                                                 { x: 40, y: 567 },\r
+                                                 { x: 50, y: 280 },\r
+                                                 { x: 60, y: 507 },\r
+                                                 { x: 70, y: 680 },\r
+                                                 { x: 80, y: 287 },\r
+                                                 { x: 90, y: 460 },\r
+                                                 { x: 100, y: 509 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/02-column-chart/multi-series-column-chart.html b/charts/canvas/examples/02-column-chart/multi-series-column-chart.html
new file mode 100644 (file)
index 0000000..3079cd3
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Multi-Series Column Chart"\r
+                               },\r
+                               data: [{\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 750 },\r
+                                         { x: 20, y: 714 },\r
+                                         { x: 30, y: 320 },\r
+                                         { x: 40, y: 560 },\r
+                                         { x: 50, y: 430 },\r
+                                         { x: 60, y: 500 },\r
+                                         { x: 70, y: 480 },\r
+                                         { x: 80, y: 280 },\r
+                                         { x: 90, y: 410 },\r
+                                         { x: 100, y: 500 },\r
+                                       ]\r
+                               }, {\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 250 },\r
+                                         { x: 20, y: 414 },\r
+                                         { x: 30, y: 919 },\r
+                                         { x: 40, y: 967 },\r
+                                         { x: 50, y: 678 },\r
+                                         { x: 60, y: 878 },\r
+                                         { x: 70, y: 787 },\r
+                                         { x: 80, y: 780 },\r
+                                         { x: 90, y: 803 },\r
+                                         { x: 100, y: 330 },\r
+                                       ]\r
+                               }, {\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 400 },\r
+                                         { x: 20, y: 917 },\r
+                                         { x: 30, y: 520 },\r
+                                         { x: 40, y: 804 },\r
+                                         { x: 50, y: 450 },\r
+                                         { x: 60, y: 969 },\r
+                                         { x: 70, y: 380 },\r
+                                         { x: 80, y: 839 },\r
+                                         { x: 90, y: 610 },\r
+                                         { x: 100, y: 850 },\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/03-area-chart/area-chart-with-date-time-axis.html b/charts/canvas/examples/03-area-chart/area-chart-with-date-time-axis.html
new file mode 100644 (file)
index 0000000..8b0951d
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      title: {\r
+        text: "Monthly Downloads"\r
+      },\r
+        data: [\r
+      {\r
+        type: "area",\r
+        dataPoints: [//array\r
+\r
+        { x: new Date(2012, 00, 1), y: 2600 },\r
+        { x: new Date(2012, 01, 1), y: 3800 },\r
+        { x: new Date(2012, 02, 1), y: 4300 },\r
+        { x: new Date(2012, 03, 1), y: 2900 },\r
+        { x: new Date(2012, 04, 1), y: 4100 },\r
+        { x: new Date(2012, 05, 1), y: 4500 },\r
+        { x: new Date(2012, 06, 1), y: 8600 },\r
+        { x: new Date(2012, 07, 1), y: 6400 },\r
+        { x: new Date(2012, 08, 1), y: 5300 },\r
+        { x: new Date(2012, 09, 1), y: 6000 }\r
+        ]\r
+      }\r
+      ]\r
+    });\r
+\r
+    chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/03-area-chart/area-chart-with-line-thickness.html b/charts/canvas/examples/03-area-chart/area-chart-with-line-thickness.html
new file mode 100644 (file)
index 0000000..d0706b3
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Combination chart using line thickness"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "area",\r
+                       lineThickness: 7,   //**Try various lineThickness values **//\r
+                       dataPoints: [\r
+                               { x: 10, y: 71 },\r
+                               { x: 20, y: 55},\r
+                               { x: 30, y: 50 },\r
+                               { x: 40, y: 65 },\r
+                               { x: 50, y: 95 },\r
+                               { x: 60, y: 68 },\r
+                               { x: 70, y: 28 },\r
+                               { x: 80, y: 34 },\r
+                               { x: 90, y: 14}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/03-area-chart/area-chart-with-opacity.html b/charts/canvas/examples/03-area-chart/area-chart-with-opacity.html
new file mode 100644 (file)
index 0000000..d7ab1d3
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Chart With Different Fill Opacity"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "area",\r
+                       fillOpacity: 0.3, //**Try various Opacity values **//\r
+                       dataPoints: [\r
+                               { x: 10, y: 71 },\r
+                               { x: 20, y: 55},\r
+                               { x: 30, y: 50 },\r
+                               { x: 40, y: 65 },\r
+                               { x: 50, y: 95 },\r
+                               { x: 60, y: 68 },\r
+                               { x: 70, y: 28 },\r
+                               { x: 80, y: 34 },\r
+                               { x: 90, y: 14}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title> \r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/03-area-chart/area-chart-with-xy-zoom-type.html b/charts/canvas/examples/03-area-chart/area-chart-with-xy-zoom-type.html
new file mode 100644 (file)
index 0000000..95f6a83
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+\r
+\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      zoomEnabled: true,\r
+      zoomType: "xy",\r
+      title:{\r
+        text: "Enable Zooming on X & Y Axis"\r
+      },\r
+      legend: {\r
+        horizontalAlign: "right",\r
+        verticalAlign: "center"\r
+      },\r
+      axisY:{\r
+        includeZero: false\r
+      },\r
+      data: data,  // random generator below\r
+\r
+   });\r
+\r
+    chart.render();\r
+  }\r
+\r
+   var limit = 1000;    //increase number of dataPoints by increasing this\r
+\r
+    var y = 0;\r
+    var data = []; var dataSeries = { type: "area" };\r
+    var dataPoints = [];\r
+    for (var i = 0; i < limit; i += 1) {\r
+        y += (Math.random() * 10 - 5);\r
+         dataPoints.push({\r
+          x: i - limit / 2,\r
+          y: y\r
+           });\r
+        }\r
+     dataSeries.dataPoints = dataPoints;\r
+     data.push(dataSeries);\r
+\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/03-area-chart/basic-area-chart.html b/charts/canvas/examples/03-area-chart/basic-area-chart.html
new file mode 100644 (file)
index 0000000..c7bc293
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+       window.onload = function() {\r
+               var chart = new CanvasJS.Chart("chartContainer", {\r
+                       title: {\r
+                               text: "Area Chart"\r
+                       },\r
+                       axisX: {\r
+                               interval: 10\r
+                       },\r
+                       data: [{\r
+                               type: "area",\r
+                               dataPoints: [\r
+                                 { x: 10, y: 45 },\r
+                                 { x: 20, y: 90 },\r
+                                 { x: 30, y: 70 },\r
+                                 { x: 40, y: 60 },\r
+                                 { x: 50, y: 50 },\r
+                                 { x: 60, y: 80 },\r
+                                 { x: 70, y: 90 },\r
+                                 { x: 80, y: 60 },\r
+                                 { x: 90, y: 80 },\r
+                                 { x: 100, y: 50 },\r
+                                 { x: 110, y: 40 },\r
+                                 { x: 120, y: 14 },\r
+                                 { x: 130, y: 70 },\r
+                                 { x: 140, y: 40 },\r
+                                 { x: 150, y: 90 },\r
+                               ]\r
+                       }]\r
+               });\r
+               chart.render();\r
+       }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/04-pie-chart/basic-pie-chart.html b/charts/canvas/examples/04-pie-chart/basic-pie-chart.html
new file mode 100644 (file)
index 0000000..a5e863a
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Pie Chart"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "pie",\r
+                       dataPoints: [\r
+                               { y: 4181563},\r
+                               { y: 2175498},\r
+                               { y: 3125844},\r
+                               { y: 1176121},\r
+                               { y: 1727161},\r
+                               { y: 4303364},\r
+                               { y: 1717786}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/04-pie-chart/pie-chart-with-index-label.html b/charts/canvas/examples/04-pie-chart/pie-chart-with-index-label.html
new file mode 100644 (file)
index 0000000..c03936d
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               theme: "theme2",\r
+               title:{\r
+                       text: "Gaming Consoles Sold in 2012"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "pie",\r
+                       showInLegend: true,\r
+                       toolTipContent: "{y} - #percent %",\r
+                       yValueFormatString: "#0.#,,. Million",\r
+                       legendText: "{indexLabel}",\r
+                       dataPoints: [\r
+                               {  y: 4181563, indexLabel: "PlayStation 3" },\r
+                               {  y: 2175498, indexLabel: "Wii" },\r
+                               {  y: 3125844, indexLabel: "Xbox 360" },\r
+                               {  y: 1176121, indexLabel: "Nintendo DS"},\r
+                               {  y: 1727161, indexLabel: "PSP" },\r
+                               {  y: 4303364, indexLabel: "Nintendo 3DS"},\r
+                               {  y: 1717786, indexLabel: "PS Vita"}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/05-bar-chart/bar-chart-with-stripline.html b/charts/canvas/examples/05-bar-chart/bar-chart-with-stripline.html
new file mode 100644 (file)
index 0000000..149666c
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Oil Reserves and Production "\r
+                               },\r
+                               axisY: {\r
+                                       stripLines: [{\r
+                                               value: 143650,\r
+                                               label: "Average",\r
+                                               showOnTop: true\r
+                                       }\r
+                                       ]\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "bar",\r
+\r
+                                       dataPoints: [\r
+                                               { x: 10, y: 267017, label: "Saudi Arabia" },\r
+                                               { x: 20, y: 116000, label: "Russia" },\r
+                                               { x: 30, y: 20682, label: "US" },\r
+                                               { x: 40, y: 154580, label: "Iran" },\r
+                                               { x: 50, y: 20350, label: "China" },\r
+                                               { x: 60, y: 175200, label: "Canda" },\r
+                                               { x: 70, y: 97800, label: "UAE" },\r
+                                               { x: 80, y: 297571, label: "Venezuela" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/05-bar-chart/basic-bar-chart.html b/charts/canvas/examples/05-bar-chart/basic-bar-chart.html
new file mode 100644 (file)
index 0000000..07bd651
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title:{\r
+                                       text: "Bar chart"\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "bar",\r
+\r
+                                       dataPoints: [\r
+                                       { x: 10, y: 90, label:"Apple" },\r
+                                       { x: 20, y: 70, label:"Mango" },\r
+                                       { x: 30, y: 50, label:"Orange" },\r
+                                       { x: 40, y: 60, label:"Banana" },\r
+                                       { x: 50, y: 20, label:"Pineapple" },\r
+                                       { x: 60, y: 30, label:"Pears" },\r
+                                       { x: 70, y: 35, label:"Grapes" },\r
+                                       { x: 80, y: 40, label:"Lychee" },\r
+                                       { x: 90, y: 30, label:"Jackfruit" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/06-doughnut-chart/basic-doughnut-chart.html b/charts/canvas/examples/06-doughnut-chart/basic-doughnut-chart.html
new file mode 100644 (file)
index 0000000..815a015
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Pie Chart"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "doughnut",\r
+                       dataPoints: [\r
+                               { y: 4181563},\r
+                               { y: 2175498},\r
+                               { y: 3125844},\r
+                               { y: 1176121},\r
+                               { y: 1727161},\r
+                               { y: 4303364},\r
+                               { y: 1717786}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-explode-on-click-disabled.html b/charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-explode-on-click-disabled.html
new file mode 100644 (file)
index 0000000..571a57b
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Presidential Election Results"\r
+               },\r
+                animationEnabled: true,\r
+               data: [\r
+               {\r
+                       type: "doughnut",\r
+                       startAngle: 60,\r
+                       toolTipContent: "{legendText}: {y} - <strong>#percent% </strong>",\r
+                       showInLegend: true,\r
+          explodeOnClick: false, //**Change it to true\r
+                       dataPoints: [\r
+                               {y: 65899660, indexLabel: "Barack Obama #percent%", legendText: "Barack Obama" },\r
+                               {y: 60929152, indexLabel: "Mitt Romney #percent%", legendText: "Mitt Romney" },\r
+                               {y: 2175850,  indexLabel: "Others #percent%", legendText: "Others" }\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+       }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-index-label.html b/charts/canvas/examples/06-doughnut-chart/doughnut-chart-with-index-label.html
new file mode 100644 (file)
index 0000000..3551948
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Mobile / Tablet OS Market Share, Jun 2015"\r
+                               },\r
+                               animationEnabled: true,\r
+                               theme: "theme2",\r
+                               data: [\r
+                               {\r
+                                       type: "doughnut",\r
+                                       indexLabelFontFamily: "Garamond",\r
+                                       indexLabelFontSize: 20,\r
+                                       startAngle: 0,\r
+                                       indexLabelFontColor: "dimgrey",\r
+                                       indexLabelLineColor: "darkgrey",\r
+                                       toolTipContent: "{y} %",\r
+\r
+                                       dataPoints: [\r
+                                       { y: 51.04, indexLabel: "Android {y}%" },\r
+                                       { y: 40.83, indexLabel: "iOS {y}%" },\r
+                                       { y: 3.20, indexLabel: "Java ME {y}%" },\r
+                                       { y: 1.11, indexLabel: "BlackBerry {y}%" },\r
+                                       { y: 2.29, indexLabel: "Windows {y}%" },\r
+                                       { y: 1.53, indexLabel: "Others {y}%" }\r
+\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/07-spline-chart/basic-spline-chart.html b/charts/canvas/examples/07-spline-chart/basic-spline-chart.html
new file mode 100644 (file)
index 0000000..56316ed
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Spline Chart"\r
+                               },\r
+                               data: [{\r
+                                       type: "spline",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 230 },\r
+                                         { x: 20, y: 710 },\r
+                                         { x: 30, y: 380 },\r
+                                         { x: 40, y: 567 },\r
+                                         { x: 50, y: 280 },\r
+                                         { x: 60, y: 507 },\r
+                                         { x: 70, y: 680 },\r
+                                         { x: 80, y: 287 },\r
+                                         { x: 90, y: 460 },\r
+                                         { x: 100, y: 509 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/07-spline-chart/spline-chart-with-marker-customization.html b/charts/canvas/examples/07-spline-chart/spline-chart-with-marker-customization.html
new file mode 100644 (file)
index 0000000..edcc0b1
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Spline Chart with Marker Customization"\r
+                               },\r
+                               data: [{\r
+                                       type: "spline",\r
+                                       markerSize: 10,\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 230 },\r
+                                         { x: 20, y: 710, markerType: "triangle" },\r
+                                         { x: 30, y: 380 },\r
+                                         { x: 40, y: 567, markerColor: "red" },\r
+                                         { x: 50, y: 280 },\r
+                                         { x: 60, y: 507 },\r
+                                         { x: 70, y: 680 },\r
+                                         { x: 80, y: 287 },\r
+                                         { x: 90, y: 460 },\r
+                                         { x: 100, y: 509 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/08-bubble-chart/basic-bubble-chart.html b/charts/canvas/examples/08-bubble-chart/basic-bubble-chart.html
new file mode 100644 (file)
index 0000000..80e7086
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Comparison among Countries on Fertility Rate Vs Life Expectancy in 2009"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "bubble",\r
+                                       dataPoints: [\r
+                                               { x: 78.1, y: 2.00, z: 306.77, name: "US" },\r
+                                               { x: 68.5, y: 2.15, z: 237.414, name: "Indonesia" },\r
+                                               { x: 72.5, y: 1.86, z: 193.24, name: "Brazil" },\r
+                                               { x: 76.5, y: 2.36, z: 112.24, name: "Mexico" },\r
+                                               { x: 50.9, y: 5.56, z: 154.48, name: "Nigeria" },\r
+                                               { x: 68.6, y: 1.54, z: 141.91, name: "Russia" },\r
+                                               { x: 82.9, y: 1.37, z: 127.55, name: "Japan" },\r
+                                               { x: 79.8, y: 1.36, z: 81.90, name: "Australia" },\r
+                                               { x: 72.7, y: 2.78, z: 79.71, name: "Egypt" },\r
+                                               { x: 80.1, y: 1.94, z: 61.81, name: "UK" },\r
+                                               { x: 55.8, y: 4.76, z: 39.24, name: "Kenya" },\r
+                                               { x: 81.5, y: 1.93, z: 21.95, name: "Australia" },\r
+                                               { x: 68.1, y: 4.77, z: 31.09, name: "Iraq" },\r
+                                               { x: 47.9, y: 6.42, z: 33.42, name: "Afganistan" },\r
+                                               { x: 50.3, y: 5.58, z: 18.55, name: "Angola" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/08-bubble-chart/bubble-chart-with-tooltip-customization.html b/charts/canvas/examples/08-bubble-chart/bubble-chart-with-tooltip-customization.html
new file mode 100644 (file)
index 0000000..d23b7fc
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Comparison among Countries on Fertility Rate Vs Life Expectancy in 2009"\r
+                               },\r
+                               axisX: {\r
+                                       title: "Life Expectancy",\r
+                                       maximum: 85\r
+                               },\r
+                               axisY: {\r
+                                       title: "Fertility Rate"\r
+                               },\r
+\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "left"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "bubble",\r
+                                       legendText: "Size of Bubble Represents Population",\r
+                                       showInLegend: true,\r
+                                       legendMarkerType: "circle",\r
+                                       toolTipContent: "<strong>{name}</strong> <br/> Fetility Rate: {y}<br/> Life Expectancy: {x} yrs<br/> Population: {z} mn",\r
+                                       dataPoints: [\r
+                                               { x: 78.1, y: 2.00, z: 306.77, name: "US" },\r
+                                               { x: 68.5, y: 2.15, z: 237.414, name: "Indonesia" },\r
+                                               { x: 72.5, y: 1.86, z: 193.24, name: "Brazil" },\r
+                                               { x: 76.5, y: 2.36, z: 112.24, name: "Mexico" },\r
+                                               { x: 50.9, y: 5.56, z: 154.48, name: "Nigeria" },\r
+                                               { x: 68.6, y: 1.54, z: 141.91, name: "Russia" },\r
+                                               { x: 82.9, y: 1.37, z: 127.55, name: "Japan" },\r
+                                               { x: 79.8, y: 1.36, z: 81.90, name: "Australia" },\r
+                                               { x: 72.7, y: 2.78, z: 79.71, name: "Egypt" },\r
+                                               { x: 80.1, y: 1.94, z: 61.81, name: "UK" },\r
+                                               { x: 55.8, y: 4.76, z: 39.24, name: "Kenya" },\r
+                                               { x: 81.5, y: 1.93, z: 21.95, name: "Australia" },\r
+                                               { x: 68.1, y: 4.77, z: 31.09, name: "Iraq" },\r
+                                               { x: 47.9, y: 6.42, z: 33.42, name: "Afganistan" },\r
+                                               { x: 50.3, y: 5.58, z: 18.55, name: "Angola" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/09-stacked-column-chart/basic-stacked-column-chart.html b/charts/canvas/examples/09-stacked-column-chart/basic-stacked-column-chart.html
new file mode 100644 (file)
index 0000000..84578db
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Stacked Column Chart"\r
+                               },\r
+                               axisX: {\r
+                                       interval: 10\r
+                               },\r
+                               data: [{\r
+                                       type: "stackedColumn",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 750 },\r
+                                         { x: 20, y: 714 },\r
+                                         { x: 30, y: 320 },\r
+                                         { x: 40, y: 560 },\r
+                                         { x: 50, y: 430 },\r
+                                         { x: 60, y: 500 },\r
+                                         { x: 70, y: 480 },\r
+                                         { x: 80, y: 280 },\r
+                                         { x: 90, y: 410 },\r
+                                         { x: 100, y: 500 }\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedColumn",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 250 },\r
+                                         { x: 20, y: 414 },\r
+                                         { x: 30, y: 919 },\r
+                                         { x: 40, y: 967 },\r
+                                         { x: 50, y: 678 },\r
+                                         { x: 60, y: 878 },\r
+                                         { x: 70, y: 787 },\r
+                                         { x: 80, y: 780 },\r
+                                         { x: 90, y: 803 },\r
+                                         { x: 100, y: 330 }\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedColumn",\r
+                                       dataPoints: [\r
+                                         { x: 10, y: 400 },\r
+                                         { x: 20, y: 917 },\r
+                                         { x: 30, y: 520 },\r
+                                         { x: 40, y: 804 },\r
+                                         { x: 50, y: 450 },\r
+                                         { x: 60, y: 969 },\r
+                                         { x: 70, y: 380 },\r
+                                         { x: 80, y: 839 },\r
+                                         { x: 90, y: 610 },\r
+                                         { x: 100, y: 850 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/09-stacked-column-chart/stacked-column-with-total-shown-on-top.html b/charts/canvas/examples/09-stacked-column-chart/stacked-column-with-total-shown-on-top.html
new file mode 100644 (file)
index 0000000..065243e
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Coal Reserves of Countries"\r
+                               },\r
+                               axisY: {\r
+                                       title: "Coal (bn tonnes)",\r
+                                       valueFormatString: "#0.#,.",\r
+                               },\r
+                               data: [{\r
+                                       type: "stackedColumn",\r
+                                       legendText: "Anthracite & Bituminous",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                               { y: 111338, label: "USA" },\r
+                                               { y: 49088, label: "Russia" },\r
+                                               { y: 62200, label: "China" },\r
+                                               { y: 90085, label: "India" },\r
+                                               { y: 38600, label: "Australia" },\r
+                                               { y: 25400, label: "Germany" },\r
+                                               { y: 33873, label: "Ukraine" },\r
+                                               { y: 6746, label: "Colombia" },\r
+                                               { y: 6582, label: "Canada" }\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedColumn",\r
+                                       legendText: "SubBituminous & Lignite",\r
+                                       showInLegend: "true",\r
+                                       indexLabel: "#total bn",\r
+                                       yValueFormatString: "#0.#,.",\r
+                                       indexLabelPlacement: "outside",\r
+                                       dataPoints: [\r
+                                               { y: 135305, label: "USA" },\r
+                                               { y: 107922, label: "Russia" },\r
+                                               { y: 52300, label: "China" },\r
+                                               { y: 3360, label: "India" },\r
+                                               { y: 39900, label: "Australia" },\r
+                                               { y: 3680, label: "Germany" },\r
+                                               { y: 3200, label: "Ukraine" },\r
+                                               { y: 0, label: "Colombia" },\r
+                                               { y: 6582, label: "Canada" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/10-stacked-bar-chart/basic-stacked-bar-chart.html b/charts/canvas/examples/10-stacked-bar-chart/basic-stacked-bar-chart.html
new file mode 100644 (file)
index 0000000..223180f
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      title:{\r
+      text: "Evening Sales of a Restaurant"\r
+      },\r
+\r
+      data: [\r
+      {\r
+        type: "stackedBar",\r
+         dataPoints: [\r
+        { x: new Date(2012, 01, 1), y: 71 },\r
+        { x: new Date(2012, 02, 1), y: 55},\r
+        { x: new Date(2012, 03, 1), y: 50 },\r
+        { x: new Date(2012, 04, 1), y: 65 },\r
+        { x: new Date(2012, 05, 1), y: 95 }\r
+\r
+        ]\r
+      },\r
+        {\r
+        type: "stackedBar",\r
+         dataPoints: [\r
+        { x: new Date(2012, 01, 1), y: 71 },\r
+        { x: new Date(2012, 02, 1), y: 55},\r
+        { x: new Date(2012, 03, 1), y: 50 },\r
+        { x: new Date(2012, 04, 1), y: 65 },\r
+        { x: new Date(2012, 05, 1), y: 95 }\r
+\r
+        ]\r
+      },\r
+        {\r
+        type: "stackedBar",\r
+         dataPoints: [\r
+        { x: new Date(2012, 01, 1), y: 71 },\r
+        { x: new Date(2012, 02, 1), y: 55},\r
+        { x: new Date(2012, 03, 1), y: 50 },\r
+        { x: new Date(2012, 04, 1), y: 65 },\r
+        { x: new Date(2012, 05, 1), y: 95 }\r
+\r
+        ]\r
+      },\r
+\r
+        {\r
+        type: "stackedBar",\r
+         dataPoints: [\r
+        { x: new Date(2012, 01, 1), y: 61 },\r
+        { x: new Date(2012, 02, 1), y: 75},\r
+        { x: new Date(2012, 03, 1), y: 80 },\r
+        { x: new Date(2012, 04, 1), y: 85 },\r
+        { x: new Date(2012, 05, 1), y: 105 }\r
+\r
+        ]\r
+      },\r
+        {\r
+        type: "stackedBar",\r
+         dataPoints: [\r
+        { x: new Date(2012, 01, 1), y: 20 },\r
+        { x: new Date(2012, 02, 1), y: 35},\r
+        { x: new Date(2012, 03, 1), y: 30 },\r
+        { x: new Date(2012, 04, 1), y: 45 },\r
+        { x: new Date(2012, 05, 1), y: 25 }\r
+\r
+        ]\r
+      }\r
+\r
+      ]\r
+    });\r
+\r
+    chart.render();\r
+  }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/10-stacked-bar-chart/stacked-bar-chart-with-index-label.html b/charts/canvas/examples/10-stacked-bar-chart/stacked-bar-chart-with-index-label.html
new file mode 100644 (file)
index 0000000..61c4c55
--- /dev/null
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Cost Of Pancake Ingredients, 2011"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       interval: 1,\r
+                                       labelFontSize: 10,\r
+                                       lineThickness: 0\r
+                               },\r
+                               axisY2: {\r
+                                       valueFormatString: "$ 0",\r
+                                       lineThickness: 0\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "top",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+\r
+                               data: [{\r
+                                       type: "stackedBar",\r
+                                       showInLegend: true,\r
+                                       name: "Butter (500gms)",\r
+                                       axisYType: "secondary",\r
+                                       color: "#7E8F74",\r
+                                       dataPoints: [\r
+                                               { y: 3, label: "India" },\r
+                                               { y: 5, label: "US" },\r
+                                               { y: 3, label: "Germany" },\r
+                                               { y: 6, label: "Brazil" },\r
+                                               { y: 7, label: "China" },\r
+                                               { y: 5, label: "Australia" },\r
+                                               { y: 5, label: "France" },\r
+                                               { y: 7, label: "Italy" },\r
+                                               { y: 9, label: "Singapore" },\r
+                                               { y: 8, label: "Switzerland" },\r
+                                               { y: 12, label: "Japan" }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedBar",\r
+                                       showInLegend: true,\r
+                                       name: "Flour (1kg)",\r
+                                       axisYType: "secondary",\r
+                                       color: "#F0E6A7",\r
+                                       dataPoints: [\r
+                                               { y: .5, label: "India" },\r
+                                               { y: 1.5, label: "US" },\r
+                                               { y: 1, label: "Germany" },\r
+                                               { y: 2, label: "Brazil" },\r
+                                               { y: 2, label: "China" },\r
+                                               { y: 2.5, label: "Australia" },\r
+                                               { y: 1.5, label: "France" },\r
+                                               { y: 1, label: "Italy" },\r
+                                               { y: 2, label: "Singapore" },\r
+                                               { y: 2, label: "Switzerland" },\r
+                                               { y: 3, label: "Japan" }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedBar",\r
+                                       showInLegend: true,\r
+                                       name: "Milk (2l)",\r
+                                       axisYType: "secondary",\r
+                                       color: "#EBB88A",\r
+                                       dataPoints: [\r
+                                               { y: 2, label: "India" },\r
+                                               { y: 3, label: "US" },\r
+                                               { y: 3, label: "Germany" },\r
+                                               { y: 3, label: "Brazil" },\r
+                                               { y: 4, label: "China" },\r
+                                               { y: 3, label: "Australia" },\r
+                                               { y: 4.5, label: "France" },\r
+                                               { y: 4.5, label: "Italy" },\r
+                                               { y: 6, label: "Singapore" },\r
+                                               { y: 3, label: "Switzerland" },\r
+                                               { y: 6, label: "Japan" }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedBar",\r
+                                       showInLegend: true,\r
+                                       name: "Eggs (20)",\r
+                                       axisYType: "secondary",\r
+                                       color: "#DB9079",\r
+                                       indexLabel: "$#total",\r
+                                       indexLabelPlacement: "outside",\r
+                                       dataPoints: [\r
+                                               { y: 2, label: "India" },\r
+                                               { y: 3, label: "US" },\r
+                                               { y: 6, label: "Germany" },\r
+                                               { y: 4, label: "Brazil" },\r
+                                               { y: 4, label: "China" },\r
+                                               { y: 8, label: "Australia" },\r
+                                               { y: 8, label: "France" },\r
+                                               { y: 8, label: "Italy" },\r
+                                               { y: 4, label: "Singapore" },\r
+                                               { y: 11, label: "Switzerland" },\r
+                                               { y: 6, label: "Japan" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/11-stacked-area-chart/basic -stacked-area-chart.html b/charts/canvas/examples/11-stacked-area-chart/basic -stacked-area-chart.html
new file mode 100644 (file)
index 0000000..9e79be5
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+  window.onload = function () {\r
+    var chart = new CanvasJS.Chart("chartContainer",\r
+    {\r
+      title:{\r
+        text: "Number of Persons involved in Traffic Accidents by Mode of Transport"\r
+      },\r
+      data: [\r
+      {\r
+        type: "stackedArea",\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 1100 },\r
+        { x: new Date(2012, 01, 1), y: 1200 },\r
+        { x: new Date(2012, 02, 1), y: 1000},\r
+        { x: new Date(2012, 03, 1), y: 1200 },\r
+        { x: new Date(2012, 04, 1), y: 1600 },\r
+        { x: new Date(2012, 05, 1), y: 1800 },\r
+        { x: new Date(2012, 06, 1), y: 1400 },\r
+        { x: new Date(2012, 07, 1), y: 1500 },\r
+        { x: new Date(2012, 08, 1), y: 1600 },\r
+        { x: new Date(2012, 09, 1), y: 1800 }\r
+\r
+        ]\r
+      },\r
+      {\r
+        type: "stackedArea",\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 150 },\r
+        { x: new Date(2012, 01, 1), y: 171 },\r
+        { x: new Date(2012, 02, 1), y: 155},\r
+        { x: new Date(2012, 03, 1), y: 150 },\r
+        { x: new Date(2012, 04, 1), y: 165 },\r
+        { x: new Date(2012, 05, 1), y: 195 },\r
+        { x: new Date(2012, 06, 1), y: 155 },\r
+        { x: new Date(2012, 07, 1), y: 145 },\r
+        { x: new Date(2012, 08, 1), y: 140 },\r
+        { x: new Date(2012, 09, 1), y: 151 }\r
+\r
+        ]\r
+      },\r
+      {\r
+        type: "stackedArea",\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 71 },\r
+        { x: new Date(2012, 01, 1), y: 41 },\r
+        { x: new Date(2012, 02, 1), y: 55},\r
+        { x: new Date(2012, 03, 1), y: 50 },\r
+        { x: new Date(2012, 04, 1), y: 65 },\r
+        { x: new Date(2012, 05, 1), y: 95 },\r
+        { x: new Date(2012, 06, 1), y: 45 },\r
+        { x: new Date(2012, 07, 1), y: 95 },\r
+        { x: new Date(2012, 08, 1), y: 60 },\r
+        { x: new Date(2012, 09, 1), y: 40 }\r
+\r
+        ]\r
+      },\r
+\r
+      {\r
+        type: "stackedArea",\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 861 },\r
+        { x: new Date(2012, 01, 1), y: 761 },\r
+        { x: new Date(2012, 02, 1), y: 775},\r
+        { x: new Date(2012, 03, 1), y: 680 },\r
+        { x: new Date(2012, 04, 1), y: 785 },\r
+        { x: new Date(2012, 05, 1), y: 374 },\r
+        { x: new Date(2012, 06, 1), y: 365 },\r
+        { x: new Date(2012, 07, 1), y: 455 },\r
+        { x: new Date(2012, 08, 1), y: 657 },\r
+        { x: new Date(2012, 09, 1), y: 659 }\r
+\r
+        ]\r
+      },\r
+      {\r
+        type: "stackedArea",\r
+        dataPoints: [\r
+        { x: new Date(2012, 00, 1), y: 220 },\r
+        { x: new Date(2012, 01, 1), y: 240 },\r
+        { x: new Date(2012, 02, 1), y: 295},\r
+        { x: new Date(2012, 03, 1), y: 300 },\r
+        { x: new Date(2012, 04, 1), y: 265 },\r
+        { x: new Date(2012, 05, 1), y: 235 },\r
+        { x: new Date(2012, 06, 1), y: 245 },\r
+        { x: new Date(2012, 07, 1), y: 255 },\r
+        { x: new Date(2012, 08, 1), y: 275 },\r
+        { x: new Date(2012, 09, 1), y: 290 }\r
+\r
+        ]\r
+      }\r
+\r
+      ]\r
+    });\r
+\r
+chart.render();\r
+}\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/11-stacked-area-chart/stacked-area-chart-with-shared-tooltip.html b/charts/canvas/examples/11-stacked-area-chart/stacked-area-chart-with-shared-tooltip.html
new file mode 100644 (file)
index 0000000..00563bd
--- /dev/null
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Number of Persons involved in Traffic Accidents by Mode of Transport",\r
+                                       margin: 15\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               axisX: {\r
+                                       valueFormatString: "MMM",\r
+                                       interval: 1,\r
+                                       intervalType: "month"\r
+                               },\r
+                               axisY: {\r
+                                       maximum: 3100,\r
+                                       interval: 1000\r
+                               },\r
+\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stackedArea",\r
+                                       name: "cars",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 1100 },\r
+                                       { x: new Date(2012, 01, 1), y: 1200 },\r
+                                       { x: new Date(2012, 02, 1), y: 1000 },\r
+                                       { x: new Date(2012, 03, 1), y: 1200 },\r
+                                       { x: new Date(2012, 04, 1), y: 1600 },\r
+                                       { x: new Date(2012, 05, 1), y: 1800 },\r
+                                       { x: new Date(2012, 06, 1), y: 1400 },\r
+                                       { x: new Date(2012, 07, 1), y: 1500 },\r
+                                       { x: new Date(2012, 08, 1), y: 1600 },\r
+                                       { x: new Date(2012, 09, 1), y: 1800 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea",\r
+                                       name: "trucks",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 150 },\r
+                                       { x: new Date(2012, 01, 1), y: 171 },\r
+                                       { x: new Date(2012, 02, 1), y: 155 },\r
+                                       { x: new Date(2012, 03, 1), y: 150 },\r
+                                       { x: new Date(2012, 04, 1), y: 165 },\r
+                                       { x: new Date(2012, 05, 1), y: 195 },\r
+                                       { x: new Date(2012, 06, 1), y: 155 },\r
+                                       { x: new Date(2012, 07, 1), y: 145 },\r
+                                       { x: new Date(2012, 08, 1), y: 140 },\r
+                                       { x: new Date(2012, 09, 1), y: 151 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea",\r
+                                       name: "bicycles",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 71 },\r
+                                       { x: new Date(2012, 01, 1), y: 41 },\r
+                                       { x: new Date(2012, 02, 1), y: 55 },\r
+                                       { x: new Date(2012, 03, 1), y: 50 },\r
+                                       { x: new Date(2012, 04, 1), y: 65 },\r
+                                       { x: new Date(2012, 05, 1), y: 95 },\r
+                                       { x: new Date(2012, 06, 1), y: 45 },\r
+                                       { x: new Date(2012, 07, 1), y: 95 },\r
+                                       { x: new Date(2012, 08, 1), y: 60 },\r
+                                       { x: new Date(2012, 09, 1), y: 40 }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedArea",\r
+                                       name: "motorcycles",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 861 },\r
+                                       { x: new Date(2012, 01, 1), y: 761 },\r
+                                       { x: new Date(2012, 02, 1), y: 775 },\r
+                                       { x: new Date(2012, 03, 1), y: 680 },\r
+                                       { x: new Date(2012, 04, 1), y: 785 },\r
+                                       { x: new Date(2012, 05, 1), y: 374 },\r
+                                       { x: new Date(2012, 06, 1), y: 365 },\r
+                                       { x: new Date(2012, 07, 1), y: 455 },\r
+                                       { x: new Date(2012, 08, 1), y: 657 },\r
+                                       { x: new Date(2012, 09, 1), y: 659 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea",\r
+                                       name: "pedistrians",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 220 },\r
+                                       { x: new Date(2012, 01, 1), y: 240 },\r
+                                       { x: new Date(2012, 02, 1), y: 295 },\r
+                                       { x: new Date(2012, 03, 1), y: 300 },\r
+                                       { x: new Date(2012, 04, 1), y: 265 },\r
+                                       { x: new Date(2012, 05, 1), y: 235 },\r
+                                       { x: new Date(2012, 06, 1), y: 245 },\r
+                                       { x: new Date(2012, 07, 1), y: 255 },\r
+                                       { x: new Date(2012, 08, 1), y: 275 },\r
+                                       { x: new Date(2012, 09, 1), y: 290 }\r
+\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/12-scatter-chart/basic-scatter-chart.html b/charts/canvas/examples/12-scatter-chart/basic-scatter-chart.html
new file mode 100644 (file)
index 0000000..9b54ed4
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Scatter Chart"\r
+                               },\r
+                               data: [{\r
+                                       type: "scatter",\r
+                                       dataPoints: [\r
+                                       { x: 100, y: 110 },\r
+                                       { x: 110, y: 120 },\r
+                                       { x: 130, y: 125 },\r
+                                       { x: 150, y: 128 },\r
+                                       { x: 180, y: 160 },\r
+                                       { x: 200, y: 220 },\r
+                                       { x: 207, y: 220 },\r
+                                       { x: 210, y: 220 },\r
+                                       { x: 245, y: 220 },\r
+                                       { x: 265, y: 253 },\r
+                                       { x: 285, y: 304 },\r
+                                       { x: 300, y: 403 },\r
+                                       { x: 304, y: 304 },\r
+                                       { x: 306, y: 406 },\r
+                                       { x: 310, y: 404 },\r
+                                       { x: 315, y: 510 },\r
+                                       { x: 319, y: 420 },\r
+                                       { x: 344, y: 303 },\r
+                                       { x: 374, y: 302 },\r
+                                       { x: 400, y: 821 },\r
+                                       { x: 405, y: 804 },\r
+                                       { x: 405, y: 906 },\r
+                                       { x: 423, y: 830 },\r
+                                       { x: 441, y: 930 },\r
+                                       { x: 452, y: 630 },\r
+                                       { x: 454, y: 990 },\r
+                                       { x: 466, y: 420 },\r
+                                       { x: 485, y: 820 },\r
+                                       { x: 500, y: 904 },\r
+                                       { x: 503, y: 920 },\r
+                                       { x: 507, y: 702 },\r
+                                       { x: 530, y: 904 },\r
+                                       { x: 533, y: 903 },\r
+                                       { x: 567, y: 1010 },\r
+                                       { x: 587, y: 402 },\r
+                                       { x: 600, y: 1020 },\r
+                                       { x: 604, y: 1010 },\r
+                                       { x: 604, y: 1040 },\r
+                                       { x: 609, y: 940 },\r
+                                       { x: 610, y: 940 },\r
+                                       { x: 640, y: 900 },\r
+                                       { x: 641, y: 1060 },\r
+                                       { x: 644, y: 1040 },\r
+                                       { x: 660, y: 1240 },\r
+                                       { x: 664, y: 1340 },\r
+                                       { x: 704, y: 1040 },\r
+                                       { x: 732, y: 1060 },\r
+                                       { x: 763, y: 1100 },\r
+                                       { x: 781, y: 1200 },\r
+                                       { x: 785, y: 1300 },\r
+                                       { x: 809, y: 1040 },\r
+                                       { x: 905, y: 1340 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/12-scatter-chart/multi-series-scatter-chart.html b/charts/canvas/examples/12-scatter-chart/multi-series-scatter-chart.html
new file mode 100644 (file)
index 0000000..39acd07
--- /dev/null
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Server Performance",\r
+                                       fontSize: 20\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       title: "Server Load (TPS)",\r
+                                       titleFontSize: 18\r
+\r
+                               },\r
+                               axisY: {\r
+                                       title: "Response Time (sec)",\r
+                                       titleFontSize: 16\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: 'bottom',\r
+                                       horizontalAlign: "center"\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "scatter",\r
+                                       markerType: "square",\r
+                                       toolTipContent: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span><br/><strong> Load</strong> {x} <br/><strong> Response</strong></span> {y}sec",\r
+\r
+                                       name: "Server Pluto",\r
+                                       showInLegend: true,\r
+                                       dataPoints: [\r
+\r
+                                       { x: 23, y: 4 },\r
+                                       { x: 28, y: 5 },\r
+                                       { x: 39, y: 9 },\r
+                                       { x: 34, y: 8 },\r
+                                       { x: 24, y: 3 },\r
+                                       { x: 29, y: 7 },\r
+                                       { x: 29, y: 5 },\r
+                                       { x: 23, y: 6 },\r
+                                       { x: 27, y: 7 },\r
+                                       { x: 34, y: 11 },\r
+                                       { x: 36, y: 9 },\r
+                                       { x: 33, y: 5 },\r
+                                       { x: 32, y: 8 },\r
+                                       { x: 21, y: 2 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "scatter",\r
+                                       name: "Server Mars",\r
+                                       markerType: "triangle",\r
+                                       showInLegend: true,\r
+                                       toolTipContent: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span><br/><strong> Load</strong> {x} <br/><strong> Response</strong></span> {y}sec",\r
+\r
+                                       dataPoints: [\r
+\r
+                                       { x: 24, y: 2 },\r
+                                       { x: 27, y: 3 },\r
+                                       { x: 35, y: 7 },\r
+                                       { x: 32, y: 6 },\r
+                                       { x: 29, y: 4 },\r
+                                       { x: 23, y: 5 },\r
+                                       { x: 24, y: 3 },\r
+                                       { x: 26, y: 4 },\r
+                                       { x: 24, y: 5 },\r
+                                       { x: 33, y: 7 },\r
+                                       { x: 34, y: 6 },\r
+                                       { x: 30, y: 4 },\r
+                                       { x: 37, y: 8 },\r
+                                       { x: 24, y: 2 }\r
+\r
+                                       ]\r
+                               }\r
+                               ],\r
+                               legend: {\r
+                                       cursor: "pointer",\r
+                                       itemclick: function (e) {\r
+                                               if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {\r
+                                                       e.dataSeries.visible = false;\r
+                                               }\r
+                                               else {\r
+                                                       e.dataSeries.visible = true;\r
+                                               }\r
+                                               chart.render();\r
+                                       }\r
+                               }\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/13-candlestick-chart/basic-candle-stick-chart.html b/charts/canvas/examples/13-candlestick-chart/basic-candle-stick-chart.html
new file mode 100644 (file)
index 0000000..897d13e
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Candle Stick Chart"\r
+                               },\r
+                               zoomEnabled: true,\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       title: "Prices",\r
+                                       prefix: "$ "\r
+                               },\r
+                               axisX: {\r
+                                       interval: 2,\r
+                                       intervalType: "month",\r
+                                       valueFormatString: "MMM-YY",\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "candlestick",\r
+                                       dataPoints: [\r
+                                               { x: new Date(2012, 01, 01), y: [5198, 5629, 5159, 5385] },\r
+                                               { x: new Date(2012, 02, 01), y: [5366, 5499, 5135, 5295] },\r
+                                               { x: new Date(2012, 03, 01), y: [5296, 5378, 5154, 5248] },\r
+                                               { x: new Date(2012, 04, 01), y: [5254, 5279, 4788, 4924] },\r
+                                               { x: new Date(2012, 05, 01), y: [4910, 5286, 4770, 5278] },\r
+                                               { x: new Date(2012, 06, 01), y: [5283, 5348, 5032, 5229] },\r
+                                               { x: new Date(2012, 07, 01), y: [5220, 5448, 5164, 5258] },\r
+                                               { x: new Date(2012, 08, 01), y: [5276, 5735, 5215, 5703] },\r
+                                               { x: new Date(2012, 09, 01), y: [5704, 5815, 4888, 5619] },\r
+                                               { x: new Date(2012, 10, 01), y: [5609, 5885, 5548, 5879] },\r
+                                               { x: new Date(2012, 11, 01), y: [5878, 5965, 5823, 5905] },\r
+                                               { x: new Date(2013, 00, 01), y: [5937, 6111, 5935, 6034] },\r
+                                               { x: new Date(2013, 01, 01), y: [6040, 6052, 5671, 5693] },\r
+                                               { x: new Date(2013, 02, 01), y: [5702, 5971, 5604, 5682] },\r
+                                               { x: new Date(2013, 03, 01), y: [5697, 5962, 5477, 5930] },\r
+                                               { x: new Date(2013, 04, 01), y: [5911, 6229, 5910, 5985] },\r
+                                               { x: new Date(2013, 05, 01), y: [5997, 6011, 5566, 5842] },\r
+                                               { x: new Date(2013, 06, 01), y: [5834, 6093, 5675, 5742] },\r
+                                               { x: new Date(2013, 07, 01), y: [5776, 5808, 5118, 5471] },\r
+                                               { x: new Date(2013, 08, 01), y: [5480, 6142, 5318, 5735] },\r
+                                               { x: new Date(2013, 09, 01), y: [5756, 6309, 5700, 6299] },\r
+                                               { x: new Date(2013, 10, 01), y: [6289, 6342, 5972, 6176] },\r
+                                               { x: new Date(2013, 11, 01), y: [6171, 6415, 6129, 6304] }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/13-candlestick-chart/candle-stick-chart-with-rising-color-and-tooltip-customization.html b/charts/canvas/examples/13-candlestick-chart/candle-stick-chart-with-rising-color-and-tooltip-customization.html
new file mode 100644 (file)
index 0000000..dfe1bec
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Candle Stick chart using risingColor property"\r
+               },\r
+               zoomEnabled: true,\r
+               axisY: {\r
+                       includeZero:false,\r
+                       title: "Prices",\r
+                       prefix: "$ "\r
+               },\r
+               axisX: {\r
+                       interval:2,\r
+                       intervalType: "month",\r
+                       valueFormatString: "MMM-YY",\r
+                       labelAngle: -45\r
+               },\r
+               data: [\r
+               {\r
+                       type: "candlestick",\r
+                       risingColor: "#F79B8E",\r
+                       dataPoints: [\r
+                               {x: new Date(2012,01,01),y:[5198, 5629, 5159, 5385]},\r
+                               {x: new Date(2012,02,01),y:[5366, 5499, 5135, 5295]},\r
+                               {x: new Date(2012,03,01),y:[5296, 5378, 5154, 5248]},\r
+                               {x: new Date(2012,04,01),y:[5254, 5279, 4788, 4924]},\r
+                               {x: new Date(2012,05,01),y:[4910, 5286, 4770, 5278]},\r
+                               {x: new Date(2012,06,01),y:[5283, 5348, 5032, 5229]},\r
+                               {x: new Date(2012,07,01),y:[5220, 5448, 5164, 5258]},\r
+                               {x: new Date(2012,08,01),y:[5276, 5735, 5215, 5703]},\r
+                               {x: new Date(2012,09,01),y:[5704, 5815, 4888, 5619]},\r
+                               {x: new Date(2012,10,01),y:[5609, 5885, 5548, 5879]},\r
+                               {x: new Date(2012,11,01),y:[5878, 5965, 5823, 5905]}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;">\r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/14-ohlc(stock)-chart/basic-ohlc-chart.html b/charts/canvas/examples/14-ohlc(stock)-chart/basic-ohlc-chart.html
new file mode 100644 (file)
index 0000000..5864538
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Monthly Stock Prices for 2012",\r
+                               },\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       prefix: "$",\r
+                                       title: "Prices",\r
+                               },\r
+                               axisX: {\r
+                                       interval: 1,\r
+                                       intervalType: "month",\r
+                                       valueFormatString: "MMM",\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "ohlc",\r
+                                       dataPoints: [   // Y: [Open, High ,Low, Close]\r
+                                               { x: new Date(2012, 00, 01), y: [53.65, 56.88, 50.28, 54.99] },\r
+                                               { x: new Date(2012, 01, 01), y: [55.52, 60.86, 54.97, 57.68] },\r
+                                               { x: new Date(2012, 02, 01), y: [57.84, 59.18, 55.24, 57.03] },\r
+                                               { x: new Date(2012, 03, 01), y: [57.12, 57.87, 44.45, 47.30] },\r
+                                               { x: new Date(2012, 04, 01), y: [47.37, 47.73, 41.59, 42.10] },\r
+                                               { x: new Date(2012, 05, 01), y: [41.96, 45.56, 41.40, 45.06] },\r
+                                               { x: new Date(2012, 06, 01), y: [45.46, 46.05, 37.93, 39.58] },\r
+                                               { x: new Date(2012, 07, 01), y: [39.94, 44.60, 38.97, 42.53] },\r
+                                               { x: new Date(2012, 08, 01), y: [42.38, 48.90, 41.58, 48.54] },\r
+                                               { x: new Date(2012, 09, 01), y: [49.36, 49.99, 42.58, 43.42] },\r
+                                               { x: new Date(2012, 10, 01), y: [43.82, 44.75, 41.59, 44.45] },\r
+                                               { x: new Date(2012, 11, 01), y: [44.25, 44.40, 41.18, 42.30] }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/14-ohlc(stock)-chart/ohlc-chart-with-tooltip-customization.html b/charts/canvas/examples/14-ohlc(stock)-chart/ohlc-chart-with-tooltip-customization.html
new file mode 100644 (file)
index 0000000..583ebbe
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Stock Prices for June & July 2014"\r
+                               },\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       prefix: "$ ",\r
+                                       title: "Prices"\r
+                               },\r
+                               axisX: {\r
+                                       interval: 1,\r
+                                       valueFormatString: "MMM-DD"\r
+                               },\r
+                               toolTip: {\r
+                                       content: "Date: {x} </br> <strong>Prices: </strong> </br> Open: {y[0]}, Close: {y[3]} </br>  High: {y[1]}, Low: {y[2]} "\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "ohlc",\r
+                                       color: "brown",\r
+                                       dataPoints: [   // Y: [Open, High ,Low, Close]\r
+                                               { x: new Date(2014, 05, 2), y: [184.76, 186.28, 184.67, 185.69] },\r
+                                               { x: new Date(2014, 05, 3), y: [185.55, 185.76, 184.12, 184.37] },\r
+                                               { x: new Date(2014, 05, 4), y: [184.71, 185.45, 184.20, 184.51] },\r
+                                               { x: new Date(2014, 05, 5), y: [184.66, 186.09, 183.92, 185.98] },\r
+                                               { x: new Date(2014, 05, 6), y: [186.47, 187.65, 185.90, 186.37] },\r
+                                               { x: new Date(2014, 05, 9), y: [186.22, 187.64, 185.96, 186.22] },\r
+                                               { x: new Date(2014, 05, 10), y: [186.20, 186.22, 183.82, 184.29] },\r
+                                               { x: new Date(2014, 05, 11), y: [183.64, 184.20, 182.01, 182.25] },\r
+                                               { x: new Date(2014, 05, 12), y: [182.48, 182.55, 180.91, 181.22] },\r
+                                               { x: new Date(2014, 05, 13), y: [182.00, 183.00, 181.52, 182.56] },\r
+                                               { x: new Date(2014, 05, 16), y: [182.40, 182.71, 181.24, 182.35] },\r
+                                               { x: new Date(2014, 05, 17), y: [181.90, 182.81, 181.56, 182.26] },\r
+                                               { x: new Date(2014, 05, 18), y: [182.04, 183.61, 181.79, 183.60] },\r
+                                               { x: new Date(2014, 05, 19), y: [184.12, 184.47, 182.36, 182.82] },\r
+                                               { x: new Date(2014, 05, 20), y: [182.59, 182.67, 181.40, 181.55] },\r
+                                               { x: new Date(2014, 05, 23), y: [181.92, 182.25, 181.00, 182.14] },\r
+                                               { x: new Date(2014, 05, 24), y: [181.50, 183.00, 180.65, 180.88] },\r
+                                               { x: new Date(2014, 05, 25), y: [180.25, 180.97, 180.06, 180.72] },\r
+                                               { x: new Date(2014, 05, 26), y: [180.87, 181.37, 179.27, 180.37] },\r
+                                               { x: new Date(2014, 05, 27), y: [179.77, 182.46, 179.66, 181.71] },\r
+                                               { x: new Date(2014, 05, 30), y: [181.33, 181.93, 180.26, 181.27] },\r
+                                               { x: new Date(2014, 06, 1), y: [181.70, 187.27, 181.70, 186.35] },\r
+                                               { x: new Date(2014, 06, 2), y: [186.35, 188.99, 186.17, 188.39] },\r
+                                               { x: new Date(2014, 06, 3), y: [188.39, 188.81, 187.35, 188.53] },\r
+                                               { x: new Date(2014, 06, 7), y: [187.61, 188.27, 187.44, 188.04] },\r
+                                               { x: new Date(2014, 06, 8), y: [187.65, 188.08, 186.37, 187.22] },\r
+                                               { x: new Date(2014, 06, 9), y: [187.68, 188.90, 186.89, 188.42] },\r
+                                               { x: new Date(2014, 06, 10), y: [186.44, 188.05, 186.21, 187.70] },\r
+                                               { x: new Date(2014, 06, 11), y: [187.73, 188.35, 186.70, 188.00] },\r
+                                               { x: new Date(2014, 06, 14), y: [188.53, 190.44, 188.53, 189.86] },\r
+                                               { x: new Date(2014, 06, 15), y: [189.38, 190.08, 188.21, 188.49] },\r
+                                               { x: new Date(2014, 06, 16), y: [192.20, 193.36, 190.76, 192.36] },\r
+                                               { x: new Date(2014, 06, 17), y: [192.36, 195.95, 192.00, 192.49] },\r
+                                               { x: new Date(2014, 06, 18), y: [191.96, 193.44, 190.00, 192.50] },\r
+                                               { x: new Date(2014, 06, 21), y: [191.30, 191.70, 189.25, 190.85] },\r
+                                               { x: new Date(2014, 06, 22), y: [191.56, 194.72, 191.56, 194.09] },\r
+                                               { x: new Date(2014, 06, 23), y: [194.11, 194.90, 193.57, 193.63] },\r
+                                               { x: new Date(2014, 06, 24), y: [193.95, 195.62, 193.75, 195.24] },\r
+                                               { x: new Date(2014, 06, 25), y: [195.30, 195.90, 193.79, 194.40] },\r
+                                               { x: new Date(2014, 06, 28), y: [194.30, 196.40, 193.65, 195.78] },\r
+                                               { x: new Date(2014, 06, 29), y: [195.30, 195.89, 194.54, 194.57] },\r
+                                               { x: new Date(2014, 06, 30), y: [195.20, 195.99, 192.90, 194.00] }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/15-step-line-chart/basic-step-line-chart.html b/charts/canvas/examples/15-step-line-chart/basic-step-line-chart.html
new file mode 100644 (file)
index 0000000..a79af3c
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Step Line Chart"\r
+                               },\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stepLine",\r
+                                       dataPoints: [                                   \r
+                                       { x: new Date(2012, 1), y: 8.3 },\r
+                                       { x: new Date(2012, 2), y: 8.2 },\r
+                                       { x: new Date(2012, 3), y: 8.1 },\r
+                                       { x: new Date(2012, 4), y: 8.2 },\r
+                                       { x: new Date(2012, 5), y: 8.2 },\r
+                                       { x: new Date(2012, 6), y: 8.2 },\r
+                                       { x: new Date(2012, 7), y: 8.1 },\r
+                                       { x: new Date(2012, 8), y: 7.8 },\r
+                                       { x: new Date(2012, 9), y: 7.9 },\r
+                                       { x: new Date(2012, 10), y: 7.8 },\r
+                                       { x: new Date(2012, 11), y: 7.8 },\r
+                                       { x: new Date(2013, 0), y: 7.9 },\r
+                                       { x: new Date(2013, 1), y: 7.7 },\r
+                                       { x: new Date(2013, 2), y: 7.6 },\r
+                                       { x: new Date(2013, 3), y: 7.5 }\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/15-step-line-chart/multi-series-step-line-chart.html b/charts/canvas/examples/15-step-line-chart/multi-series-step-line-chart.html
new file mode 100644 (file)
index 0000000..fab0181
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Multi-Series StepLine Chart"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       minimum: 13,\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+\r
+                               axisY2: {\r
+                                       includeZero: false,\r
+                                       minimum: 25,\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "stepLine",\r
+                                       dataPoints: [\r
+\r
+                                       { x: new Date(2008, 02), y: 15.00 },\r
+                                       { x: new Date(2008, 03), y: 14.50 },\r
+                                       { x: new Date(2008, 04), y: 14.00 },\r
+                                       { x: new Date(2008, 05), y: 14.50 },\r
+                                       { x: new Date(2008, 06), y: 14.75 },\r
+                                       { x: new Date(2008, 07), y: null },\r
+                                       { x: new Date(2008, 08), y: 15.80 },\r
+                                       { x: new Date(2008, 09), y: 17.50 }\r
+\r
+\r
+                                       ]\r
+                               },\r
+                          {\r
+                               type: "stepLine",\r
+                               axisYType: "secondary",\r
+                               dataPoints: [\r
+\r
+                               { x: new Date(2008, 02), y: 41.00 },\r
+                               { x: new Date(2008, 03), y: 43.50 },\r
+                               { x: new Date(2008, 04), y: 41.00 },\r
+                               { x: new Date(2008, 05), y: null },\r
+                               { x: new Date(2008, 06), y: 47.55 },\r
+                               { x: new Date(2008, 07), y: 45.00 },\r
+                               { x: new Date(2008, 08), y: 40.70 },\r
+                               { x: new Date(2008, 09), y: 37.00 }\r
+                               ]\r
+                          }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/16-step-area-chart/basic-step-area-chart.html b/charts/canvas/examples/16-step-area-chart/basic-step-area-chart.html
new file mode 100644 (file)
index 0000000..43de4eb
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Basic Step Line Chart"\r
+                               },\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "stepArea",\r
+                                       dataPoints: [                                   \r
+                                       { x: new Date(2012, 1), y: 8.3 },\r
+                                       { x: new Date(2012, 2), y: 8.2 },\r
+                                       { x: new Date(2012, 3), y: 8.1 },\r
+                                       { x: new Date(2012, 4), y: 8.2 },\r
+                                       { x: new Date(2012, 5), y: 8.2 },\r
+                                       { x: new Date(2012, 6), y: 8.2 },\r
+                                       { x: new Date(2012, 7), y: 8.1 },\r
+                                       { x: new Date(2012, 8), y: 7.8 },\r
+                                       { x: new Date(2012, 9), y: 7.9 },\r
+                                       { x: new Date(2012, 10), y: 7.8 },\r
+                                       { x: new Date(2012, 11), y: 7.8 },\r
+                                       { x: new Date(2013, 0), y: 7.9 },\r
+                                       { x: new Date(2013, 1), y: 7.7 },\r
+                                       { x: new Date(2013, 2), y: 7.6 },\r
+                                       { x: new Date(2013, 3), y: 7.5 }\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/17-spline-area-chart/basic-spline-area-chart.html b/charts/canvas/examples/17-spline-area-chart/basic-spline-area-chart.html
new file mode 100644 (file)
index 0000000..74e8387
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Spline Area Chart"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "splineArea",\r
+                                       dataPoints: [\r
+                                       { x: new Date(1992, 0), y: 2506000 },\r
+                                       { x: new Date(1993, 0), y: 2798000 },\r
+                                       { x: new Date(1994, 0), y: 3386000 },\r
+                                       { x: new Date(1995, 0), y: 6944000 },\r
+                                       { x: new Date(1996, 0), y: 6026000 },\r
+                                       { x: new Date(1997, 0), y: 2394000 },\r
+                                       { x: new Date(1998, 0), y: 1872000 },\r
+                                       { x: new Date(1999, 0), y: 2140000 },\r
+                                       { x: new Date(2000, 0), y: 7289000 },\r
+                                       { x: new Date(2001, 0), y: 4830000 },\r
+                                       { x: new Date(2002, 0), y: 2009000 },\r
+                                       { x: new Date(2003, 0), y: 2840000 },\r
+                                       { x: new Date(2004, 0), y: 2396000 },\r
+                                       { x: new Date(2005, 0), y: 1613000 },\r
+                                       { x: new Date(2006, 0), y: 2821000 },\r
+                                       { x: new Date(2007, 0), y: 2000000 },\r
+                                       { x: new Date(2008, 0), y: 1397000 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/17-spline-area-chart/spline-area-chart-with-stripline.html b/charts/canvas/examples/17-spline-area-chart/spline-area-chart-with-stripline.html
new file mode 100644 (file)
index 0000000..f71fdf2
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Spline Area Chart with Stripline on Axis X"\r
+                               },\r
+                               axisX: {\r
+                                       stripLines: [\r
+                                       {\r
+                                               value: 1940\r
+                                       }\r
+                                       ],\r
+                                       valueFormatString: "####"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "splineArea",\r
+                                       color: "rgba(83, 223, 128, .6)",\r
+                                       dataPoints: [\r
+                                               { x: 1910, y: 5 },\r
+                                               { x: 1920, y: 9 },\r
+                                               { x: 1930, y: 17 },\r
+                                               { x: 1940, y: 32 },\r
+                                               { x: 1950, y: 22 },\r
+                                               { x: 1960, y: 14 },\r
+                                               { x: 1970, y: 25 },\r
+                                               { x: 1980, y: 18 },\r
+                                               { x: 1990, y: 20 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/18-range-bar-chart/basic-range-bar-chart.html b/charts/canvas/examples/18-range-bar-chart/basic-range-bar-chart.html
new file mode 100644 (file)
index 0000000..94d6df4
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title: {\r
+                       text: "Delhi Temperature (1 Apr - 7 Apr) 2014"\r
+               },\r
+               axisY: {\r
+                       includeZero: false,\r
+                       interval: 2,\r
+                       valueFormatString: "#0.## Â°C"\r
+               },\r
+               axisX: {\r
+                       interval: 1,\r
+                       valueFormatString: "DD-MMM"\r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeBar",\r
+                       yValueFormatString: "#0.## Â°C",\r
+                       dataPoints: [\r
+                               {x: new Date(2014,03,1), y: [ 17,33]},  \r
+                               {x: new Date(2014,03,2), y: [ 18,35]},\r
+                               {x: new Date(2014,03,3), y: [ 18,32]},\r
+                               {x: new Date(2014,03,4), y: [ 18,32]},\r
+                               {x: new Date(2014,03,5), y: [ 20,35]},\r
+                               {x: new Date(2014,03,6), y: [ 20,38]},\r
+                               {x: new Date(2014,03,7), y: [ 21,32]}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;">\r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/18-range-bar-chart/range-bar-with-index-label.html b/charts/canvas/examples/18-range-bar-chart/range-bar-with-index-label.html
new file mode 100644 (file)
index 0000000..b79b5dc
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Employees Salary in a Company",\r
+               },              \r
+               axisY: {\r
+                       includeZero:false,\r
+                       title: "Salary in USD(Thousands)",\r
+                       interval: 10,\r
+               }, \r
+               axisX: {\r
+                       interval:10,\r
+                       title: "Departments",\r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeBar",\r
+                       showInLegend: true,\r
+                       yValueFormatString: "$#0.##K",\r
+                       indexLabel: "{y[#index]}",\r
+                       legendText: "Department wise Min and Max Salary",\r
+                       dataPoints: [   // Y: [Low, High]\r
+                               {x: 10, y:[80, 110], label: "Data Scientist"},\r
+                               {x: 20, y:[95, 141], label: "Product Manager" },\r
+                               {x: 30, y:[98, 115], label: "Web Developer" },\r
+                               {x: 40, y:[90, 160], label: "Software Engineer"},\r
+                               {x: 50, y:[100,152], label: "Quality Assurance"}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/19-range-column-chart/basic-range-column-chart.html b/charts/canvas/examples/19-range-column-chart/basic-range-column-chart.html
new file mode 100644 (file)
index 0000000..281ce44
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title: {\r
+                       text: "Basic Range Column Chart"\r
+               },\r
+               axisY: {\r
+                       includeZero: false,\r
+                       interval: 10,\r
+                       title: "Temperature (C)"\r
+               },\r
+               axisX: {\r
+                       interval: 1,\r
+                       intervalType: "month",\r
+                       valueFormatString: "MMM"\r
+                       },\r
+               data: [\r
+               {\r
+                       type: "rangeColumn",\r
+                       color: "#369EAD",\r
+                       dataPoints: [\r
+                               { x: new Date(2012,00,01), y: [-9.7, 10.4] },  // y: [Low ,High]\r
+                               { x: new Date(2012,01,01), y: [-8.7, 16.5] },\r
+                               { x: new Date(2012,02,01), y: [-3.5, 19.4] },\r
+                               { x: new Date(2012,03,01), y: [5.0, 22.6] },\r
+                               { x: new Date(2012,04,01), y: [7.9, 29.5] },\r
+                               { x: new Date(2012,05,01), y: [9.2, 34.7] },\r
+                               { x: new Date(2012,06,01), y: [7.3, 30.5] },\r
+                               { x: new Date(2012,07,01), y: [4.4, 25.5] },\r
+                               { x: new Date(2012,08,01), y: [-3.1, 20.4] },\r
+                               { x: new Date(2012,09,01), y: [-5.2, 15.4] },\r
+                               { x: new Date(2012,10,01), y: [-13.5, 9.8] },\r
+                               { x: new Date(2012,11,01), y: [-15.5, 5.8] }\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;">\r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/19-range-column-chart/range-column-with-index-label.html b/charts/canvas/examples/19-range-column-chart/range-column-with-index-label.html
new file mode 100644 (file)
index 0000000..81ce552
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Temperature Comparison of Two Cities",\r
+               },                      \r
+               exportEnabled: true,\r
+               axisY: {\r
+                       includeZero:false,          \r
+                       suffix: "°C",\r
+               },     \r
+               axisX: {\r
+                       interval:1,\r
+                       intervalType: "month",\r
+                       valueFormatString: "MMM",\r
+               },\r
+               toolTip: {\r
+                       shared: true,           \r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeColumn",                    \r
+                       name: "City 1",\r
+               indexLabel: "{y[#index]}",\r
+                       indexLabelFontSize: 12,\r
+                       yValueFormatString: "#0.## Â°C",\r
+                       showInLegend: true,\r
+                       dataPoints: [   \r
+                               {x: new Date(2013,00,01), y: [08, 20]}, \r
+                               {x: new Date(2013,01,01), y: [10, 24]}, \r
+                               {x: new Date(2013,02,01), y: [16, 29]}, \r
+                               {x: new Date(2013,03,01), y: [21, 36]}, \r
+                               {x: new Date(2013,04,01), y: [26, 39]}, \r
+                               {x: new Date(2013,05,01), y: [22, 39]}, \r
+                               {x: new Date(2013,06,01), y: [20, 35]},         \r
+                               {x: new Date(2013,07,01), y: [20, 34]},         \r
+                               {x: new Date(2013,08,01), y: [20, 34]}, \r
+                               {x: new Date(2013,09,01), y: [19, 33]}, \r
+                               {x: new Date(2013,10,01), y: [13, 28]}, \r
+                               {x: new Date(2013,11,01), y: [09, 23]}\r
+                       ]\r
+               },\r
+               {\r
+                       type: "rangeColumn",\r
+                       showInLegend: true,\r
+                       name: "City 2",\r
+               indexLabel: "{y[#index]}",\r
+                       indexLabelFontSize: 12,\r
+                       yValueFormatString: "#0.## Â°C",                        \r
+                       dataPoints: [   \r
+                               {x: new Date(2013,00,01), y: [16, 28]}, \r
+                               {x: new Date(2013,01,01), y: [18, 31]}, \r
+                               {x: new Date(2013,02,01), y: [20, 33]}, \r
+                               {x: new Date(2013,03,01), y: [22, 34]}, \r
+                               {x: new Date(2013,04,01), y: [22, 33]}, \r
+                               {x: new Date(2013,05,01), y: [20, 29]}, \r
+                               {x: new Date(2013,06,01), y: [20, 28]}, \r
+                               {x: new Date(2013,07,01), y: [20, 28]},         \r
+                               {x: new Date(2013,08,01), y: [20, 28]},         \r
+                               {x: new Date(2013,09,01), y: [20, 28]},         \r
+                               {x: new Date(2013,10,01), y: [14, 27]}, \r
+                               {x: new Date(2013,11,01), y: [11, 26]}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/20-range-area-chart/basic-range-area-chart.html b/charts/canvas/examples/20-range-area-chart/basic-range-area-chart.html
new file mode 100644 (file)
index 0000000..631b73a
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title: {\r
+                       text: "Basic Range Area Chart"\r
+               },\r
+               axisY: {\r
+                       includeZero: false\r
+               },\r
+               axisX: {\r
+                       interval: 10\r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeArea",\r
+                       dataPoints: [ \r
+                               { x: 10, y: [18.86, 40.76] }, // y: [Low, High]\r
+                               { x: 20, y: [55.95, 78.26] },\r
+                               { x: 30, y: [48.27, 72.90] },\r
+                               { x: 40, y: [67.65, 99.65] },\r
+                               { x: 50, y: [25.50, 51.26] }\r
+                       ]\r
+                       }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;">\r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/20-range-area-chart/range-area-with-null-data.html b/charts/canvas/examples/20-range-area-chart/range-area-with-null-data.html
new file mode 100644 (file)
index 0000000..71ec542
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title:{\r
+                       text: "Monthly Temperature variation in New Delhi",\r
+               },              \r
+               exportEnabled: true,\r
+                animationEnabled: true,\r
+               axisY: {\r
+                       title: "Temperature (°C)",\r
+               },     \r
+               axisX: {\r
+                       valueFormatString: "MMM",\r
+               },\r
+               toolTip: {\r
+                       content: "Date: {x} </br> <strong>Temperature: </strong> </br> Min: {y[0]}°C, Max: {y[1]}°C",\r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeSplineArea",\r
+                       indexLabel: "{y[#index]}",\r
+                       dataPoints: [  \r
+                               {x: new Date(2013,00,01), y: [08, 20]}, \r
+                               {x: new Date(2013,01,01), y: [10, 24]}, \r
+                               {x: new Date(2013,02,01), y: [16, 29]}, \r
+                               {x: new Date(2013,03,01), y: [21, 36]}, \r
+                               {x: new Date(2013,04,01), y: [26, 39]}, \r
+                               {x: new Date(2013,05,01), y: [22, 39]}, \r
+                               {x: new Date(2013,06,01), y: null},             \r
+                               {x: new Date(2013,07,01), y: [20, 34]},         \r
+                               {x: new Date(2013,08,01), y: [20, 34]}, \r
+                               {x: new Date(2013,09,01), y: [19, 33]}, \r
+                               {x: new Date(2013,10,01), y: [13, 28]}, \r
+                               {x: new Date(2013,11,01), y: [09, 23]}\r
+                       ]\r
+               }\r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/21-range-spline-area-chart/basic-range-spline-area_-chart.html b/charts/canvas/examples/21-range-spline-area-chart/basic-range-spline-area_-chart.html
new file mode 100644 (file)
index 0000000..ad9b717
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+<script type="text/javascript">\r
+window.onload = function () {\r
+       var chart = new CanvasJS.Chart("chartContainer",\r
+       {\r
+               title: {\r
+                       text: "Basic Range Spline Area Chart"\r
+               },\r
+               axisX: {\r
+          interval: 10\r
+               },\r
+               data: [\r
+               {\r
+                       type: "rangeSplineArea",          \r
+                       dataPoints: [\r
+                               { x: 10, y: [8.86, 50.76] },\r
+                               { x: 20, y: [5.95, 38.26] },\r
+                               { x: 30, y: [28.27, 52.90] },\r
+                               { x: 40, y: [57.65, 78.65] },\r
+                               { x: 50, y: [15.50, 31.26] },\r
+               { x: 60, y: [18.86, 55.76] },\r
+                               { x: 70, y: [55.95, 98.26] },\r
+                               { x: 80, y: [48.27, 72.90] },\r
+                               { x: 90, y: [67.65, 86.65] },\r
+                               { x: 100, y: [25.50, 71.26] }\r
+                       ]\r
+               }               \r
+               ]\r
+       });\r
+       chart.render();\r
+}\r
+</script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+<div id="chartContainer" style="height: 400px; width: 100%;">\r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/21-range-spline-area-chart/range-spline-area-with-line-chart.html b/charts/canvas/examples/21-range-spline-area-chart/range-spline-area-with-line-chart.html
new file mode 100644 (file)
index 0000000..7de940c
--- /dev/null
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Annual Expenses"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       prefix: "$ "\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true,\r
+                                       content: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span> <span style='\"'color: dimgrey;'\"'>${y}</span> "\r
+                               },\r
+                               legend: {\r
+                                       fontSize: 13\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "splineArea",\r
+                                       showInLegend: true,\r
+                                       name: "Salaries",\r
+                                       color: "rgba(54,158,173,.6)",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 2), y: 30000 },\r
+                                       { x: new Date(2012, 3), y: 35000 },\r
+                                       { x: new Date(2012, 4), y: 30000 },\r
+                                       { x: new Date(2012, 5), y: 30400 },\r
+                                       { x: new Date(2012, 6), y: 20900 },\r
+                                       { x: new Date(2012, 7), y: 31000 },\r
+                                       { x: new Date(2012, 8), y: 30200 },\r
+                                       { x: new Date(2012, 9), y: 30000 },\r
+                                       { x: new Date(2012, 10), y: 33000 },\r
+                                       { x: new Date(2012, 11), y: 38000 },\r
+                                       { x: new Date(2013, 0), y: 38900 },\r
+                                       { x: new Date(2013, 1), y: 39000 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "splineArea",\r
+                                       showInLegend: true,\r
+                                       name: "Office Cost",\r
+                                       color: "rgba(134,180,2,.7)",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 2), y: 20100 },\r
+                                       { x: new Date(2012, 3), y: 16000 },\r
+                                       { x: new Date(2012, 4), y: 14000 },\r
+                                       { x: new Date(2012, 5), y: 18000 },\r
+                                       { x: new Date(2012, 6), y: 18000 },\r
+                                       { x: new Date(2012, 7), y: 21000 },\r
+                                       { x: new Date(2012, 8), y: 22000 },\r
+                                       { x: new Date(2012, 9), y: 25000 },\r
+                                       { x: new Date(2012, 10), y: 23000 },\r
+                                       { x: new Date(2012, 11), y: 25000 },\r
+                                       { x: new Date(2013, 0), y: 26000 },\r
+                                       { x: new Date(2013, 1), y: 25000 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "splineArea",\r
+                                       showInLegend: true,\r
+                                       name: "Entertainment",\r
+                                       color: "rgba(194,70,66,.6)",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 2), y: 10100 },\r
+                                       { x: new Date(2012, 3), y: 6000 },\r
+                                       { x: new Date(2012, 4), y: 3400 },\r
+                                       { x: new Date(2012, 5), y: 4000 },\r
+                                       { x: new Date(2012, 6), y: 9000 },\r
+                                       { x: new Date(2012, 7), y: 3900 },\r
+                                       { x: new Date(2012, 8), y: 4200 },\r
+                                       { x: new Date(2012, 9), y: 5000 },\r
+                                       { x: new Date(2012, 10), y: 14300 },\r
+                                       { x: new Date(2012, 11), y: 12300 },\r
+                                       { x: new Date(2013, 0), y: 8300 },\r
+                                       { x: new Date(2013, 1), y: 6300 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "splineArea",\r
+                                       showInLegend: true,\r
+                                       color: "rgba(127,96,132,.6)",\r
+                                       name: "Maintenance",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 2), y: 1700 },\r
+                                       { x: new Date(2012, 3), y: 2600 },\r
+                                       { x: new Date(2012, 4), y: 1000 },\r
+                                       { x: new Date(2012, 5), y: 1400 },\r
+                                       { x: new Date(2012, 6), y: 900 },\r
+                                       { x: new Date(2012, 7), y: 1000 },\r
+                                       { x: new Date(2012, 8), y: 1200 },\r
+                                       { x: new Date(2012, 9), y: 5000 },\r
+                                       { x: new Date(2012, 10), y: 1300 },\r
+                                       { x: new Date(2012, 11), y: 2300 },\r
+                                       { x: new Date(2013, 0), y: 2800 },\r
+                                       { x: new Date(2013, 1), y: 1300 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "spline",\r
+                                       showInLegend: true,\r
+                                       color: "rgba(127,96,255,.6)",\r
+                                       name: "Average",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 2), y: 15475 },\r
+                                       { x: new Date(2012, 3), y: 14900 },\r
+                                       { x: new Date(2012, 4), y: 12100 },\r
+                                       { x: new Date(2012, 5), y: 13450 },\r
+                                       { x: new Date(2012, 6), y: 12200 },\r
+                                       { x: new Date(2012, 7), y: 14225 },\r
+                                       { x: new Date(2012, 8), y: 14400 },\r
+                                       { x: new Date(2012, 9), y: 16250 },\r
+                                       { x: new Date(2012, 10), y: 17900 },\r
+                                       { x: new Date(2012, 11), y: 19400 },\r
+                                       { x: new Date(2013, 0), y: 19000 },\r
+                                       { x: new Date(2013, 1), y: 17900 }\r
+\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/22-stacked-area-100-chart/basic-stacked-area-100-chart.html b/charts/canvas/examples/22-stacked-area-100-chart/basic-stacked-area-100-chart.html
new file mode 100644 (file)
index 0000000..5ec88bd
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Number of Persons involved in Traffic Accidents by Mode of Transport"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 1100 },\r
+                                       { x: new Date(2012, 01, 1), y: 1200 },\r
+                                       { x: new Date(2012, 02, 1), y: 1000 },\r
+                                       { x: new Date(2012, 03, 1), y: 1200 },\r
+                                       { x: new Date(2012, 04, 1), y: 1600 },\r
+                                       { x: new Date(2012, 05, 1), y: 1800 },\r
+                                       { x: new Date(2012, 06, 1), y: 1400 },\r
+                                       { x: new Date(2012, 07, 1), y: 1500 },\r
+                                       { x: new Date(2012, 08, 1), y: 1600 },\r
+                                       { x: new Date(2012, 09, 1), y: 1800 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 150 },\r
+                                       { x: new Date(2012, 01, 1), y: 171 },\r
+                                       { x: new Date(2012, 02, 1), y: 155 },\r
+                                       { x: new Date(2012, 03, 1), y: 150 },\r
+                                       { x: new Date(2012, 04, 1), y: 165 },\r
+                                       { x: new Date(2012, 05, 1), y: 195 },\r
+                                       { x: new Date(2012, 06, 1), y: 155 },\r
+                                       { x: new Date(2012, 07, 1), y: 145 },\r
+                                       { x: new Date(2012, 08, 1), y: 140 },\r
+                                       { x: new Date(2012, 09, 1), y: 151 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 71 },\r
+                                       { x: new Date(2012, 01, 1), y: 41 },\r
+                                       { x: new Date(2012, 02, 1), y: 55 },\r
+                                       { x: new Date(2012, 03, 1), y: 50 },\r
+                                       { x: new Date(2012, 04, 1), y: 65 },\r
+                                       { x: new Date(2012, 05, 1), y: 95 },\r
+                                       { x: new Date(2012, 06, 1), y: 45 },\r
+                                       { x: new Date(2012, 07, 1), y: 95 },\r
+                                       { x: new Date(2012, 08, 1), y: 60 },\r
+                                       { x: new Date(2012, 09, 1), y: 40 }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 861 },\r
+                                       { x: new Date(2012, 01, 1), y: 761 },\r
+                                       { x: new Date(2012, 02, 1), y: 775 },\r
+                                       { x: new Date(2012, 03, 1), y: 680 },\r
+                                       { x: new Date(2012, 04, 1), y: 785 },\r
+                                       { x: new Date(2012, 05, 1), y: 374 },\r
+                                       { x: new Date(2012, 06, 1), y: 365 },\r
+                                       { x: new Date(2012, 07, 1), y: 455 },\r
+                                       { x: new Date(2012, 08, 1), y: 657 },\r
+                                       { x: new Date(2012, 09, 1), y: 659 }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2012, 00, 1), y: 220 },\r
+                                       { x: new Date(2012, 01, 1), y: 240 },\r
+                                       { x: new Date(2012, 02, 1), y: 295 },\r
+                                       { x: new Date(2012, 03, 1), y: 300 },\r
+                                       { x: new Date(2012, 04, 1), y: 265 },\r
+                                       { x: new Date(2012, 05, 1), y: 235 },\r
+                                       { x: new Date(2012, 06, 1), y: 245 },\r
+                                       { x: new Date(2012, 07, 1), y: 255 },\r
+                                       { x: new Date(2012, 08, 1), y: 275 },\r
+                                       { x: new Date(2012, 09, 1), y: 290 }\r
+\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/22-stacked-area-100-chart/stacked-area-100-with-index-label.html b/charts/canvas/examples/22-stacked-area-100-chart/stacked-area-100-with-index-label.html
new file mode 100644 (file)
index 0000000..df05566
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Products Sold by ABC ltd. in 2011"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisY: {\r
+                                       title: "Sales"\r
+                               },\r
+                               axisX: {\r
+                                       title: "Seasons"\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stackedArea100",\r
+                                       name: "Mosquito Repellents",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { y: 83450, label: "spring" },\r
+                                       { y: 51240, label: "summer" },\r
+                                       { y: 64120, label: "fall" },\r
+                                       { y: 71450, label: "winter" }\r
+\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedArea100",\r
+                                       name: "Liquid Soap",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { y: 20140, label: "spring" },\r
+                                       { y: 30170, label: "summer" },\r
+                                       { y: 24410, label: "autumn" },\r
+                                       { y: 38120, label: "fall" }\r
+\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedArea100",\r
+                                       name: "Napkins",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { y: 45120, label: "spring" },\r
+                                       { y: 50350, label: "summer" },\r
+                                       { y: 48410, label: "autumn" },\r
+                                       { y: 53120, label: "fall" }\r
+\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedArea100",\r
+                                       name: "Sanitizer",\r
+                                       showInLegend: "true",\r
+                                       dataPoints: [\r
+                                       { y: 11050, label: "spring" },\r
+                                       { y: 16100, label: "summer" },\r
+                                       { y: 15010, label: "autumn" },\r
+                                       { y: 23100, label: "fall" }\r
+\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/23-stacked-bar-100-chart/basic-stacked-bar-100-chart.html b/charts/canvas/examples/23-stacked-bar-100-chart/basic-stacked-bar-100-chart.html
new file mode 100644 (file)
index 0000000..ad83f96
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Division of products Sold in Quarter."\r
+\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       dataPoints: [\r
+                                       { y: 600, label: "Water Filter" },\r
+                                       { y: 400, label: "Modern Chair" },\r
+                                       { y: 120, label: "VOIP Phone" },\r
+                                       { y: 250, label: "Microwave" },\r
+                                       { y: 120, label: "Water Filter" },\r
+                                       { y: 374, label: "Expresso Machine" },\r
+                                       { y: 350, label: "Lobby Chair" }\r
+\r
+                                       ]\r
+                               },\r
+                                {\r
+                                       type: "stackedBar100",\r
+                                       dataPoints: [\r
+                                       { y: 400, label: "Water Filter" },\r
+                                       { y: 500, label: "Modern Chair" },\r
+                                       { y: 220, label: "VOIP Phone" },\r
+                                       { y: 350, label: "Microwave" },\r
+                                       { y: 220, label: "Water Filter" },\r
+                                       { y: 474, label: "Expresso Machine" },\r
+                                       { y: 450, label: "Lobby Chair" }\r
+\r
+                                       ]\r
+                                },\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       dataPoints: [\r
+                                       { y: 300, label: "Water Filter" },\r
+                                       { y: 610, label: "Modern Chair" },\r
+                                       { y: 215, label: "VOIP Phone" },\r
+                                       { y: 221, label: "Microwave" },\r
+                                       { y: 75, label: "Water Filter" },\r
+                                       { y: 310, label: "Expresso Machine" },\r
+                                       { y: 340, label: "Lobby Chair" }\r
+\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/23-stacked-bar-100-chart/stacked-bar-100-with-index-label.html b/charts/canvas/examples/23-stacked-bar-100-chart/stacked-bar-100-with-index-label.html
new file mode 100644 (file)
index 0000000..b78c9c0
--- /dev/null
@@ -0,0 +1,188 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               theme: 'theme2',\r
+                               title: {\r
+                                       text: "Time Spent in Holiday Season"\r
+\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisY: {\r
+                                       title: "percent"\r
+                               },\r
+                               legend: {\r
+                                       horizontalAlign: 'center',\r
+                                       verticalAlign: 'bottom'\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "With Friends",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 350, label: "George" },\r
+                                       { y: 350, label: "Alex" },\r
+                                       { y: 350, label: "Mike" },\r
+                                       { y: 374, label: "Jake" },\r
+                                       { y: 320, label: "Shah" },\r
+                                       { y: 300, label: "Joe" },\r
+                                       { y: 400, label: "Fin" },\r
+                                       { y: 220, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Eating Out",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 250, label: "George" },\r
+                                       { y: 280, label: "Alex" },\r
+                                       { y: 350, label: "Mike" },\r
+                                       { y: 274, label: "Jake" },\r
+                                       { y: 320, label: "Shah" },\r
+                                       { y: 320, label: "Joe" },\r
+                                       { y: 280, label: "Fin" },\r
+                                       { y: 420, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Reading",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 350, label: "George" },\r
+                                       { y: 350, label: "Alex" },\r
+                                       { y: 350, label: "Mike" },\r
+                                       { y: 374, label: "Jake" },\r
+                                       { y: 120, label: "Shah" },\r
+                                       { y: 120, label: "Joe" },\r
+                                       { y: 400, label: "Fin" },\r
+                                       { y: 120, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Shopping",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 250, label: "George" },\r
+                                       { y: 250, label: "Alex" },\r
+                                       { y: 250, label: "Mike" },\r
+                                       { y: 274, label: "Jake" },\r
+                                       { y: 320, label: "Shah" },\r
+                                       { y: 220, label: "Joe" },\r
+                                       { y: 100, label: "Fin" },\r
+                                       { y: 420, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Fitness",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 150, label: "George" },\r
+                                       { y: 30, label: "Alex" },\r
+                                       { y: 45, label: "Mike" },\r
+                                       { y: 74, label: "Jake" },\r
+                                       { y: 64, label: "Shah" },\r
+                                       { y: 40, label: "Joe" },\r
+                                       { y: 50, label: "Fin" },\r
+                                       { y: 40, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Travel",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 150, label: "George" },\r
+                                       { y: 170, label: "Alex" },\r
+                                       { y: 150, label: "Mike" },\r
+                                       { y: 174, label: "Jake" },\r
+                                       { y: 120, label: "Shah" },\r
+                                       { y: 160, label: "Joe" },\r
+                                       { y: 100, label: "Fin" },\r
+                                       { y: 80, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Internet",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 160, label: "George" },\r
+                                       { y: 170, label: "Alex" },\r
+                                       { y: 50, label: "Mike" },\r
+                                       { y: 174, label: "Jake" },\r
+                                       { y: 104, label: "Shah" },\r
+                                       { y: 120, label: "Joe" },\r
+                                       { y: 300, label: "Fin" },\r
+                                       { y: 420, label: "Larry" }\r
+\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "stackedBar100",\r
+                                       showInLegend: true,\r
+                                       name: "Hobbies",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { y: 80, label: "George" },\r
+                                       { y: 150, label: "Alex" },\r
+                                       { y: 50, label: "Mike" },\r
+                                       { y: 74, label: "Jake" },\r
+                                       { y: 40, label: "Shah" },\r
+                                       { y: 120, label: "Joe" },\r
+                                       { y: 100, label: "Fin" },\r
+                                       { y: 120, label: "Larry" }\r
+\r
+                                       ]\r
+                               }\r
+\r
+\r
+                               ]\r
+\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/24-stacked-column-100-chart/basic-stacked-column-100-chart.html b/charts/canvas/examples/24-stacked-column-100-chart/basic-stacked-column-100-chart.html
new file mode 100644 (file)
index 0000000..c7aee36
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Number of Students in Each Room"\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "stackedColumn100",\r
+                                       dataPoints: [\r
+                                       { y: 40, label: "Cafeteria" },\r
+                                       { y: 10, label: "Lounge" },\r
+                                       { y: 72, label: "Games Room" },\r
+                                       { y: 30, label: "Lecture Hall" },\r
+                                       { y: 21, label: "Library" }\r
+                                       ]\r
+                               }, {\r
+                                       type: "stackedColumn100",\r
+                                       dataPoints: [\r
+                                       { y: 20, label: "Cafeteria" },\r
+                                       { y: 14, label: "Lounge" },\r
+                                       { y: 40, label: "Games Room" },\r
+                                       { y: 43, label: "Lecture Hall" },\r
+                                       { y: 17, label: "Library" }\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/24-stacked-column-100-chart/stacked-column-100-with-index-label.html b/charts/canvas/examples/24-stacked-column-100-chart/stacked-column-100-with-index-label.html
new file mode 100644 (file)
index 0000000..fe7cab5
--- /dev/null
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Composition of Internet Traffic in North America",\r
+                                       horizontalAlign: "right"\r
+                               },\r
+                               axisX: {\r
+                                       tickThickness: 0,\r
+                                       interval: 1,\r
+                                       intervalType: "year"\r
+                               },\r
+                               animationEnabled: true,\r
+                               toolTip: {\r
+                                       shared: true\r
+                               },\r
+                               axisY: {\r
+                                       lineThickness: 0,\r
+                                       tickThickness: 0,\r
+                                       interval: 20\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "center",\r
+                                       horizontalAlign: "left"\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       name: "Real-Time",\r
+                                       showInLegend: true,\r
+                                       type: "stackedColumn100",\r
+                                       color: "#004B8D ",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2009, 0), y: 30 },\r
+                                       { x: new Date(2010, 0), y: 40 },\r
+                                       { x: new Date(2011, 0), y: 50 },\r
+                                       { x: new Date(2012, 0), y: 60 },\r
+                                       { x: new Date(2013, 0), y: 40 },\r
+                                       { x: new Date(2014, 0), y: 50 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       name: "Web Browsing",\r
+                                       showInLegend: true,\r
+                                       type: "stackedColumn100",\r
+                                       color: "#0074D9 ",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2009, 0), y: 40 },\r
+                                       { x: new Date(2010, 0), y: 28 },\r
+                                       { x: new Date(2011, 0), y: 18 },\r
+                                       { x: new Date(2012, 0), y: 18 },\r
+                                       { x: new Date(2013, 0), y: 18 },\r
+                                       { x: new Date(2014, 0), y: 18 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       name: "File Sharing",\r
+                                       showInLegend: true,\r
+                                       type: "stackedColumn100",\r
+                                       color: "#4192D9 ",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2009, 0), y: 15 },\r
+                                       { x: new Date(2010, 0), y: 15 },\r
+                                       { x: new Date(2011, 0), y: 12 },\r
+                                       { x: new Date(2012, 0), y: 10 },\r
+                                       { x: new Date(2013, 0), y: 12 },\r
+                                       { x: new Date(2014, 0), y: 10 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       name: "Other",\r
+                                       showInLegend: true,\r
+                                       type: "stackedColumn100",\r
+                                       color: "#7ABAF2 ",\r
+                                       indexLabel: "{y}",\r
+                                       dataPoints: [\r
+                                       { x: new Date(2009, 0), y: 15 },\r
+                                       { x: new Date(2010, 0), y: 17 },\r
+                                       { x: new Date(2011, 0), y: 20 },\r
+                                       { x: new Date(2012, 0), y: 18 },\r
+                                       { x: new Date(2013, 0), y: 20 },\r
+                                       { x: new Date(2014, 0), y: 17 }\r
+                                       ]\r
+                               }\r
+\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/25 -jquery-plugin/basic-jquery-line-chart.html b/charts/canvas/examples/25 -jquery-plugin/basic-jquery-line-chart.html
new file mode 100644 (file)
index 0000000..ba73e46
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <title>CanvasJS Example - jQuery Line Chart</title>\r
+       <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>\r
+\r
+       <script src="../../jquery.canvasjs.min.js"></script>\r
+       <script type="text/javascript">\r
+               $(function () {\r
+                       $(".chartContainer").CanvasJSChart({\r
+                               title: {\r
+                                       text: "Basic JQuery Line Charts"\r
+                               },\r
+                               axisX: {\r
+                                       interval: 10\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "line", //try changing to column, area\r
+                                       dataPoints: [\r
+                                                 { x: 10, y: 450 },\r
+                                                 { x: 20, y: 414 },\r
+                                                 { x: 30, y: 520 },\r
+                                                 { x: 40, y: 460 },\r
+                                                 { x: 50, y: 450 },\r
+                                                 { x: 60, y: 500 },\r
+                                                 { x: 70, y: 480 },\r
+                                                 { x: 80, y: 480 },\r
+                                                 { x: 90, y: 410 },\r
+                                                 { x: 100, y: 500 },\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+               });\r
+       </script>\r
+</head>\r
+<body>\r
+       <div class="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/25 -jquery-plugin/multiple-charts-in-one-page.html b/charts/canvas/examples/25 -jquery-plugin/multiple-charts-in-one-page.html
new file mode 100644 (file)
index 0000000..97e0407
--- /dev/null
@@ -0,0 +1,257 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <title>CanvasJS Example - jQuery Line Chart</title>\r
+       <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>\r
+       <script src="../../jquery.canvasjs.min.js"></script>\r
+       <script type="text/javascript">\r
+               $(function () {\r
+                       //Better to construct options first and then pass it as a parameter\r
+                       var options = {\r
+                               zoomEnabled: true,\r
+                               animationEnabled: true,\r
+                               title: {\r
+                                       text: "Fertility Rate Vs Life Expectancy in different countries - 2009"\r
+                               },\r
+                               axisX: {\r
+                                       title: "Life Expectancy",\r
+                                       maximum: 85\r
+                               },\r
+                               axisY: {\r
+                                       title: "Fertility Rate"\r
+\r
+                               },\r
+\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "left"\r
+\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "bubble",\r
+                                       legendText: "Size of Bubble Represents Population",\r
+                                       showInLegend: true,\r
+                                       legendMarkerType: "circle",\r
+                                       legendMarkerColor: "grey",\r
+                                       toolTipContent: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span><br/><strong>Life Exp</strong> {x} yrs<br/> <strong>Fertility Rate</strong> {y}<br/> <strong>Population</strong> {z}mn",\r
+\r
+                                       dataPoints: [\r
+                                        { x: 78.1, y: 2.00, z: 306.77, name: "US" },\r
+                                        { x: 68.5, y: 2.15, z: 237.414, name: "Indonesia" },\r
+                                        { x: 72.5, y: 1.86, z: 193.24, name: "Brazil" },\r
+                                        { x: 76.5, y: 2.36, z: 112.24, name: "Mexico" },\r
+                                        { x: 50.9, y: 5.56, z: 154.48, name: "Nigeria" },\r
+                                        { x: 68.6, y: 1.54, z: 141.91, name: "Russia" },\r
+                                        { x: 82.9, y: 1.37, z: 127.55, name: "Japan" },\r
+                                        { x: 79.8, y: 1.36, z: 81.90, name: "Australia" },\r
+                                        { x: 72.7, y: 2.78, z: 79.71, name: "Egypt" },\r
+                                        { x: 80.1, y: 1.94, z: 61.81, name: "UK" },\r
+                                        { x: 55.8, y: 4.76, z: 39.24, name: "Kenya" },\r
+                                        { x: 81.5, y: 1.93, z: 21.95, name: "Australia" },\r
+                                        { x: 68.1, y: 4.77, z: 31.09, name: "Iraq" },\r
+                                        { x: 47.9, y: 6.42, z: 33.42, name: "Afganistan" },\r
+                                        { x: 50.3, y: 5.58, z: 18.55, name: "Angola" }\r
+\r
+\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       };\r
+                       $("#chartContainer1").CanvasJSChart(options);\r
+               });\r
+\r
+               $(function () {\r
+                       //Better to construct options first and then pass it as a parameter\r
+                       var options = {\r
+                               title: {\r
+                                       text: "Email Analysis"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisX: {\r
+                                       interval: 3\r
+                               },\r
+                               axisY: {\r
+                                       title: "Number of Messages"\r
+                               },\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+\r
+                               data: [{\r
+                                       name: "received",\r
+                                       showInLegend: true,\r
+                                       legendMarkerType: "square",\r
+                                       type: "area",\r
+                                       color: "rgba(40,175,101,0.6)",\r
+                                       markerSize: 0,\r
+\r
+                                       dataPoints: [\r
+                                       { x: new Date(2013, 0, 1, 00, 00), label: "midnight", y: 7 },\r
+                                       { x: new Date(2013, 0, 1, 01, 00), y: 8 },\r
+                                       { x: new Date(2013, 0, 1, 02, 00), y: 5 },\r
+                                       { x: new Date(2013, 0, 1, 03, 00), y: 7 },\r
+                                       { x: new Date(2013, 0, 1, 04, 00), y: 6 },\r
+                                       { x: new Date(2013, 0, 1, 05, 00), y: 8 },\r
+                                       { x: new Date(2013, 0, 1, 06, 00), y: 12 },\r
+                                       { x: new Date(2013, 0, 1, 07, 00), y: 24 },\r
+                                       { x: new Date(2013, 0, 1, 08, 00), y: 36 },\r
+                                       { x: new Date(2013, 0, 1, 09, 00), y: 35 },\r
+                                       { x: new Date(2013, 0, 1, 10, 00), y: 37 },\r
+                                       { x: new Date(2013, 0, 1, 11, 00), y: 29 },\r
+                                       { x: new Date(2013, 0, 1, 12, 00), y: 34, label: "noon" },\r
+                                       { x: new Date(2013, 0, 1, 13, 00), y: 38 },\r
+                                       { x: new Date(2013, 0, 1, 14, 00), y: 23 },\r
+                                       { x: new Date(2013, 0, 1, 15, 00), y: 31 },\r
+                                       { x: new Date(2013, 0, 1, 16, 00), y: 34 },\r
+                                       { x: new Date(2013, 0, 1, 17, 00), y: 29 },\r
+                                       { x: new Date(2013, 0, 1, 18, 00), y: 14 },\r
+                                       { x: new Date(2013, 0, 1, 19, 00), y: 12 },\r
+                                       { x: new Date(2013, 0, 1, 20, 00), y: 10 },\r
+                                       { x: new Date(2013, 0, 1, 21, 00), y: 8 },\r
+                                       { x: new Date(2013, 0, 1, 22, 00), y: 13 },\r
+                                       { x: new Date(2013, 0, 1, 23, 00), y: 11 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       name: "sent",\r
+                                       showInLegend: true,\r
+                                       legendMarkerType: "square",\r
+                                       type: "area",\r
+                                       color: "rgba(0,75,141,0.7)",\r
+                                       markerSize: 0,\r
+                                       label: "",\r
+                                       dataPoints: [\r
+\r
+                                       { x: new Date(2013, 0, 1, 00, 00), label: "midnight", y: 12 },\r
+                                       { x: new Date(2013, 0, 1, 01, 00), y: 10 },\r
+                                       { x: new Date(2013, 0, 1, 02, 00), y: 3 },\r
+                                       { x: new Date(2013, 0, 1, 03, 00), y: 5 },\r
+                                       { x: new Date(2013, 0, 1, 04, 00), y: 2 },\r
+                                       { x: new Date(2013, 0, 1, 05, 00), y: 1 },\r
+                                       { x: new Date(2013, 0, 1, 06, 00), y: 3 },\r
+                                       { x: new Date(2013, 0, 1, 07, 00), y: 6 },\r
+                                       { x: new Date(2013, 0, 1, 08, 00), y: 14 },\r
+                                       { x: new Date(2013, 0, 1, 09, 00), y: 15 },\r
+                                       { x: new Date(2013, 0, 1, 10, 00), y: 21 },\r
+                                       { x: new Date(2013, 0, 1, 11, 00), y: 24 },\r
+                                       { x: new Date(2013, 0, 1, 12, 00), y: 28, label: "noon" },\r
+                                       { x: new Date(2013, 0, 1, 13, 00), y: 26 },\r
+                                       { x: new Date(2013, 0, 1, 14, 00), y: 17 },\r
+                                       { x: new Date(2013, 0, 1, 15, 00), y: 23 },\r
+                                       { x: new Date(2013, 0, 1, 16, 00), y: 28 },\r
+                                       { x: new Date(2013, 0, 1, 17, 00), y: 22 },\r
+                                       { x: new Date(2013, 0, 1, 18, 00), y: 10 },\r
+                                       { x: new Date(2013, 0, 1, 19, 00), y: 9 },\r
+                                       { x: new Date(2013, 0, 1, 20, 00), y: 6 },\r
+                                       { x: new Date(2013, 0, 1, 21, 00), y: 4 },\r
+                                       { x: new Date(2013, 0, 1, 22, 00), y: 12 },\r
+                                       { x: new Date(2013, 0, 1, 23, 00), y: 14 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       };\r
+                       $("#chartContainer2").CanvasJSChart(options);\r
+               });\r
+\r
+               $(function () {\r
+                       //Better to construct options first and then pass it as a parameter\r
+                       var options = {\r
+                               title: {\r
+                                       text: "Cumulative App downloads on iTunes And Play Store"\r
+                               },\r
+                               animationEnabled: true,\r
+                               axisY: {\r
+                                       includeZero: false,\r
+                                       maximum: 110000,\r
+                                       valueFormatString: "#0,.",\r
+                                       suffix: " k"\r
+                               },\r
+                               axisX: {\r
+                                       title: "Months After Launch"\r
+                               },\r
+                               toolTip: {\r
+                                       shared: true,\r
+                                       content: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span> {y}"\r
+                               },\r
+\r
+                               data: [\r
+                               {\r
+                                       type: "splineArea",\r
+                                       showInLegend: true,\r
+                                       name: "iOS",\r
+                                       dataPoints: [\r
+                                       { x: 1, y: 3000 },\r
+                                       { x: 2, y: 7000 },\r
+                                       { x: 3, y: 10000 },\r
+                                       { x: 4, y: 14000 },\r
+                                       { x: 5, y: 23000 },\r
+                                       { x: 6, y: 31000 },\r
+                                       { x: 7, y: 42000 },\r
+                                       { x: 8, y: 56000 },\r
+                                       { x: 9, y: 64000 },\r
+                                       { x: 10, y: 81000 },\r
+                                       { x: 11, y: 105000 }\r
+                                       ]\r
+                               },\r
+                               {\r
+                                       type: "splineArea",\r
+                                       name: "Android",\r
+                                       showInLegend: true,\r
+                                       dataPoints: [\r
+                                       { x: 4, y: 4000 },\r
+                                       { x: 5, y: 6000 },\r
+                                       { x: 6, y: 9000 },\r
+                                       { x: 7, y: 14000 },\r
+                                       { x: 8, y: 21000 },\r
+                                       { x: 9, y: 31000 },\r
+                                       { x: 10, y: 46000 },\r
+                                       { x: 11, y: 61000 }\r
+\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       };\r
+                       $("#chartContainer3").CanvasJSChart(options);\r
+               });\r
+\r
+               $(function () {\r
+                       //Better to construct options first and then pass it as a parameter\r
+                       var options = {\r
+                               title: {\r
+                                       text: "Gaming Consoles Sold in 2012"\r
+                               },\r
+                               animationEnabled: true,\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "pie",\r
+                                       showInLegend: true,\r
+                                       toolTipContent: "{y} - <strong>#percent%</strong>",\r
+                                       dataPoints: [\r
+                                               { y: 4181563, legendText: "PS 3", indexLabel: "PlayStation 3" },\r
+                                               { y: 2175498, legendText: "Wii", indexLabel: "Wii" },\r
+                                               { y: 3125844, legendText: "360", exploded: true, indexLabel: "Xbox 360" },\r
+                                               { y: 1176121, legendText: "DS", indexLabel: "Nintendo DS" },\r
+                                               { y: 1727161, legendText: "PSP", indexLabel: "PSP" },\r
+                                               { y: 4303364, legendText: "3DS", indexLabel: "Nintendo 3DS" },\r
+                                               { y: 1717786, legendText: "Vita", indexLabel: "PS Vita" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       };\r
+                       $("#chartContainer4").CanvasJSChart(options);\r
+               });\r
+       </script>\r
+</head>\r
+<body>\r
+       <div id="chartContainer1" style="width: 45%; height: 400px;display: inline-block;"></div>\r
+       <div id="chartContainer2" style="width: 45%; height: 400px;display: inline-block;"></div><br />\r
+       <div id="chartContainer3" style="width: 45%; height: 400px;display: inline-block;"></div>\r
+       <div id="chartContainer4" style="width: 45%; height: 400px;display: inline-block;"></div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/26-some-common-options-across-all-chart-types/chart-with-animation.html b/charts/canvas/examples/26-some-common-options-across-all-chart-types/chart-with-animation.html
new file mode 100644 (file)
index 0000000..8d913c7
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer",\r
+                       {\r
+                               title: {\r
+                                       text: "Gaming Consoles Sold in 2012"\r
+                               },\r
+                               animationEnabled: true,\r
+                               animationDuration: 2000,\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       indexLabelFontSize: 20,\r
+                                       indexLabelFontFamily: "Monospace",\r
+                                       indexLabelFontColor: "darkgrey",\r
+                                       indexLabelLineColor: "darkgrey",\r
+                                       indexLabelPlacement: "outside",\r
+                                       type: "pie",\r
+                                       showInLegend: true,\r
+                                       toolTipContent: "{y} - <strong>#percent%</strong>",\r
+                                       dataPoints: [\r
+                                               { y: 4181563, legendText: "PS 3", indexLabel: "PlayStation 3" },\r
+                                               { y: 2175498, legendText: "Wii", indexLabel: "Wii" },\r
+                                               { y: 3125844, legendText: "360", exploded: true, indexLabel: "Xbox 360" },\r
+                                               { y: 1176121, legendText: "DS", indexLabel: "Nintendo DS" },\r
+                                               { y: 1727161, legendText: "PSP", indexLabel: "PSP" },\r
+                                               { y: 4303364, legendText: "3DS", indexLabel: "Nintendo 3DS" },\r
+                                               { y: 1717786, legendText: "Vita", indexLabel: "PS Vita" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/26-some-common-options-across-all-chart-types/combination-charts.html b/charts/canvas/examples/26-some-common-options-across-all-chart-types/combination-charts.html
new file mode 100644 (file)
index 0000000..43d895e
--- /dev/null
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Combination Chart"\r
+\r
+                               },\r
+                               data: [{\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                       { x: 10, y: 171 },\r
+                                       { x: 20, y: 155 },\r
+                                       { x: 30, y: 150 },\r
+                                       { x: 40, y: 165 },\r
+                                       { x: 50, y: 195 },\r
+                                       { x: 60, y: 168 },\r
+                                       { x: 70, y: 128 },\r
+                                       { x: 80, y: 134 },\r
+                                       { x: 90, y: 114 }\r
+                                       ]\r
+                               }, {\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                       { x: 10, y: 101 },\r
+                                       { x: 20, y: 105 },\r
+                                       { x: 30, y: 100 },\r
+                                       { x: 40, y: 105 },\r
+                                       { x: 50, y: 105 },\r
+                                       { x: 60, y: 108 },\r
+                                       { x: 70, y: 108 },\r
+                                       { x: 80, y: 104 },\r
+                                       { x: 90, y: 104 }\r
+                                       ]\r
+                               }, {\r
+                                       type: "area",\r
+                                       dataPoints: [\r
+                                       { x: 15, y: 17 },\r
+                                       { x: 25, y: 15 },\r
+                                       { x: 35, y: 10 },\r
+                                       { x: 45, y: 16 },\r
+                                       { x: 55, y: 15 },\r
+                                       { x: 65, y: 68 },\r
+                                       { x: 75, y: 18 },\r
+                                       { x: 85, y: 34 },\r
+                                       { x: 95, y: 14 }\r
+                                       ]\r
+                               },\r
+\r
+                               {\r
+                                       type: "line",\r
+                                       dataPoints: [\r
+                                       { x: 30, y: 71 },\r
+                                       { x: 35, y: 55 },\r
+                                       { x: 40, y: 50 },\r
+                                       { x: 45, y: 65 },\r
+                                       { x: 50, y: 95 },\r
+                                       { x: 55, y: 68 },\r
+                                       { x: 60, y: 28 },\r
+                                       { x: 65, y: 34 },\r
+                                       { x: 70, y: 14 }\r
+                                       ]\r
+                               },\r
+                                               {\r
+                                                       type: "line",\r
+                                                       dataPoints: [\r
+                                                       { x: 5, y: 171 },\r
+                                                       { x: 15, y: 105 },\r
+                                                       { x: 25, y: 90 },\r
+                                                       { x: 45, y: 65 },\r
+                                                       { x: 55, y: 75 },\r
+                                                       { x: 65, y: 68 },\r
+                                                       { x: 75, y: 28 },\r
+                                                       { x: 85, y: 34 },\r
+                                                       { x: 95, y: 84 }\r
+                                                       ]\r
+                                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/examples/26-some-common-options-across-all-chart-types/culture.html b/charts/canvas/examples/26-some-common-options-across-all-chart-types/culture.html
new file mode 100644 (file)
index 0000000..d504110
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       CanvasJS.addCultureInfo("es", {\r
+                               decimalSeparator: ",",// Observe ToolTip Number Format\r
+                               digitGroupSeparator: ".", // Observe axisY labels\r
+                               days: ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"]\r
+\r
+                       });\r
+\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               theme: "theme1",\r
+                               culture: "es",\r
+                               axisX: {\r
+                                       valueFormatString: "DDDD"\r
+                               },\r
+                               // change to "theme1"\r
+                               title: {\r
+                                       text: "Localization Demo - Days in Spanish"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "column",\r
+                                       dataPoints: [\r
+                                       //Note: month input is 0-11 in JavaScript - 05 is June\r
+                                       { x: new Date(2013, 05, 3), y: 3275.6 },\r
+                                       { x: new Date(2013, 05, 4), y: 5250.8 },\r
+                                       { x: new Date(2013, 05, 5), y: 6255.3 },\r
+                                       { x: new Date(2013, 05, 6), y: 8275.2 },\r
+                                       { x: new Date(2013, 05, 7), y: 6378.1 },\r
+                                       { x: new Date(2013, 05, 8), y: 5258.4 },\r
+                                       { x: new Date(2013, 05, 9), y: 3514.8 }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>\r
diff --git a/charts/canvas/examples/26-some-common-options-across-all-chart-types/export-chart.html b/charts/canvas/examples/26-some-common-options-across-all-chart-types/export-chart.html
new file mode 100644 (file)
index 0000000..9d660e2
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>\r
+<html>\r
+\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Top Categories of New Year's Resolution"\r
+                               },\r
+                               exportFileName: "CanvasJS Chart",\r
+                               exportEnabled: true,\r
+                               animationEnabled: true,\r
+                               legend: {\r
+                                       verticalAlign: "bottom",\r
+                                       horizontalAlign: "center"\r
+                               },\r
+                               data: [\r
+                               {\r
+                                       type: "pie",\r
+                                       showInLegend: true,\r
+                                       toolTipContent: "{legendText}: <strong>{y}%</strong>",\r
+                                       indexLabel: "{label} {y}%",\r
+                                       dataPoints: [\r
+                                               { y: 35, legendText: "Health", exploded: true, label: "Health" },\r
+                                               { y: 20, legendText: "Finance", label: "Finance" },\r
+                                               { y: 18, legendText: "Career", label: "Career" },\r
+                                               { y: 15, legendText: "Education", label: "Education" },\r
+                                               { y: 5, legendText: "Family", label: "Family" },\r
+                                               { y: 7, legendText: "Real Estate", label: "Real Estate" }\r
+                                       ]\r
+                               }\r
+                               ]\r
+                       });\r
+                       chart.render();\r
+               }\r
+       </script>\r
+\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;"></div>\r
+</body>\r
+\r
+</html>\r
diff --git a/charts/canvas/examples/26-some-common-options-across-all-chart-types/hide-and-unhide-data-series-from-legend.html b/charts/canvas/examples/26-some-common-options-across-all-chart-types/hide-and-unhide-data-series-from-legend.html
new file mode 100644 (file)
index 0000000..babc91c
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML>\r
+<html>\r
+<head>\r
+       <script type="text/javascript">\r
+               window.onload = function () {\r
+                       var chart = new CanvasJS.Chart("chartContainer", {\r
+                               title: {\r
+                                       text: "Click on legend items to hide/unhide dataseries"\r
+                               },\r
+                               legend: {\r
+                                       cursor: "pointer",\r
+                                       itemclick: function (e) {\r
+                                               if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {\r
+                                                       e.dataSeries.visible = false;\r
+                                               } else {\r
+                                                       e.dataSeries.visible = true;\r
+                                               }\r
+\r
+                                               e.chart.render();\r
+                                       }\r
+                               },\r
+                               data: [{\r
+                                       showInLegend: true,\r
+                                       type: "line",\r
+                                       dataPoints: [\r
+                                               { x: 10, y: 5 },\r
+                                               { x: 20, y: 9 },\r
+                                               { x: 30, y: 17 },\r
+                                               { x: 40, y: 32 },\r
+                                               { x: 50, y: 22 },\r
+                                               { x: 60, y: 14 },\r
+                                               { x: 70, y: 25 },\r
+                                               { x: 80, y: 18 },\r
+                                               { x: 90, y: 20 }\r
+                                       ]\r
+                               }, {\r
+                                       showInLegend: true,\r
+                                       type: "line",\r
+                                       dataPoints: [\r
+                                               { x: 10, y: 31 },\r
+                                               { x: 20, y: 35 },\r
+                                               { x: 30, y: 30 },\r
+                                               { x: 40, y: 35 },\r
+                                               { x: 50, y: 35 },\r
+                                               { x: 60, y: 38 },\r
+                                               { x: 70, y: 38 },\r
+                                               { x: 80, y: 34 },\r
+                                               { x: 90, y: 44 }\r
+                                       ]\r
+                               }, {\r
+                                       showInLegend: true,\r
+                                       type: "line",\r
+                                       dataPoints: [\r
+                                               { x: 10, y: 25 },\r
+                                               { x: 20, y: 30 },\r
+                                               { x: 30, y: 20 },\r
+                                               { x: 40, y: 45 },\r
+                                               { x: 50, y: 30 },\r
+                                               { x: 60, y: 10 },\r
+                                               { x: 70, y: 15 },\r
+                                               { x: 80, y: 18 },\r
+                                               { x: 90, y: 20 }\r
+                                       ]\r
+                               }]\r
+                       });\r
+\r
+                       chart.render();\r
+               }\r
+       </script>\r
+       <script src="../../canvasjs.min.js"></script>\r
+       <title>CanvasJS Example</title>\r
+</head>\r
+<body>\r
+       <div id="chartContainer" style="height: 400px; width: 100%;">\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/charts/canvas/instruction.txt b/charts/canvas/instruction.txt
new file mode 100644 (file)
index 0000000..93eb448
--- /dev/null
@@ -0,0 +1,4 @@
+For standalone version include canvasjs.min.js\r
+For jQuery version include jquery.canvasjs.min.js\r
+\r
+** DO NOT include both the files **
\ No newline at end of file
diff --git a/charts/canvas/jquery.canvasjs.min.js b/charts/canvas/jquery.canvasjs.min.js
new file mode 100644 (file)
index 0000000..e6b7faf
--- /dev/null
@@ -0,0 +1,649 @@
+/*
+ CanvasJS HTML5 & JavaScript Charts - v1.9.8 GA - http://canvasjs.com/ 
+ Copyright 2017 fenopix
+
+  --------------------- License Information --------------------
+ CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
+     http://canvasjs.com/license-canvasjs/
+
+*/
+(function(){function U(a,d){a.prototype=Pa(d.prototype);a.prototype.constructor=a;a.base=d.prototype}function Pa(a){function d(){}d.prototype=a;return new d}function Ha(a,d,b){"millisecond"===b?a.setMilliseconds(a.getMilliseconds()+1*d):"second"===b?a.setSeconds(a.getSeconds()+1*d):"minute"===b?a.setMinutes(a.getMinutes()+1*d):"hour"===b?a.setHours(a.getHours()+1*d):"day"===b?a.setDate(a.getDate()+1*d):"week"===b?a.setDate(a.getDate()+7*d):"month"===b?a.setMonth(a.getMonth()+1*d):"year"===b&&a.setFullYear(a.getFullYear()+
+1*d);return a}function O(a,d){var b=!1;0>a&&(b=!0,a*=-1);a=""+a;for(d=d?d:1;a.length<d;)a="0"+a;return b?"-"+a:a}function ka(a){if(!a)return a;a=a.replace(/^\s\s*/,"");for(var d=/\s/,b=a.length;d.test(a.charAt(--b)););return a.slice(0,b+1)}function Qa(a){a.roundRect=function(a,b,c,f,g,h,l,k){l&&(this.fillStyle=l);k&&(this.strokeStyle=k);"undefined"===typeof g&&(g=5);this.lineWidth=h;this.beginPath();this.moveTo(a+g,b);this.lineTo(a+c-g,b);this.quadraticCurveTo(a+c,b,a+c,b+g);this.lineTo(a+c,b+f-g);
+this.quadraticCurveTo(a+c,b+f,a+c-g,b+f);this.lineTo(a+g,b+f);this.quadraticCurveTo(a,b+f,a,b+f-g);this.lineTo(a,b+g);this.quadraticCurveTo(a,b,a+g,b);this.closePath();l&&this.fill();k&&0<h&&this.stroke()}}function ya(a,d){return a-d}function Ia(a,d){return a.x-d.x}function G(a){var d=((a&16711680)>>16).toString(16),b=((a&65280)>>8).toString(16);a=((a&255)>>0).toString(16);d=2>d.length?"0"+d:d;b=2>b.length?"0"+b:b;a=2>a.length?"0"+a:a;return"#"+d+b+a}function Ra(a,d){var b=this.length>>>0,c=Number(d)||
+0,c=0>c?Math.ceil(c):Math.floor(c);for(0>c&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}function x(a){return null===a||"undefined"===typeof a}function qa(a){a.indexOf||(a.indexOf=Ra);return a}function Ja(a,d,b){b=b||"normal";var c=a+"_"+d+"_"+b,f=Ka[c];if(isNaN(f)){try{a="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+a+"; font-size:"+d+"px; font-weight:"+b+";";if(!ba){var g=document.body;ba=document.createElement("span");
+ba.innerHTML="";var h=document.createTextNode("Mpgyi");ba.appendChild(h);g.appendChild(ba)}ba.style.display="";ba.setAttribute("style",a);f=Math.round(ba.offsetHeight);ba.style.display="none"}catch(l){f=Math.ceil(1.1*d)}f=Math.max(f,d);Ka[c]=f}return f}function I(a,d){var b=[];if(b={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[a||"solid"])for(var c=
+0;c<b.length;c++)b[c]*=d;else b=[];return b}function K(a,d,b,c){if(a.addEventListener)a.addEventListener(d,b,c||!1);else if(a.attachEvent)a.attachEvent("on"+d,function(c){c=c||window.event;c.preventDefault=c.preventDefault||function(){c.returnValue=!1};c.stopPropagation=c.stopPropagation||function(){c.cancelBubble=!0};b.call(a,c)});else return!1}function La(a,d,b){a*=Q;d*=Q;a=b.getImageData(a,d,2,2).data;d=!0;for(b=0;4>b;b++)if(a[b]!==a[b+4]|a[b]!==a[b+8]|a[b]!==a[b+12]){d=!1;break}return d?a[0]<<
+16|a[1]<<8|a[2]:0}function L(a,d,b){return a in d?d[a]:b[a]}function ra(a,d,b){if(u&&Ma){var c=a.getContext("2d");sa=c.webkitBackingStorePixelRatio||c.mozBackingStorePixelRatio||c.msBackingStorePixelRatio||c.oBackingStorePixelRatio||c.backingStorePixelRatio||1;Q=za/sa;a.width=d*Q;a.height=b*Q;za!==sa&&(a.style.width=d+"px",a.style.height=b+"px",c.scale(Q,Q))}else a.width=d,a.height=b}function Sa(a){if(!Aa){var d=!1,b=!1;"undefined"===typeof ca.Chart.creditHref?(a.creditHref="http://canvasjs.com/",
+a.creditText="CanvasJS.com"):(d=a.updateOption("creditText"),b=a.updateOption("creditHref"));if(a.creditHref&&a.creditText){a._creditLink||(a._creditLink=document.createElement("a"),a._creditLink.setAttribute("class","canvasjs-chart-credit"),a._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:2px;top:"+(a.height-14)+"px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),a._creditLink.setAttribute("tabIndex",
+-1),a._creditLink.setAttribute("target","_blank"));if(0===a.renderCount||d||b)a._creditLink.setAttribute("href",a.creditHref),a._creditLink.innerHTML=a.creditText;a._creditLink&&a.creditHref&&a.creditText?(a._creditLink.parentElement||a._canvasJSContainer.appendChild(a._creditLink),a._creditLink.style.top=a.height-14+"px"):a._creditLink.parentElement&&a._canvasJSContainer.removeChild(a._creditLink)}}}function ga(a,d){var b=document.createElement("canvas");b.setAttribute("class","canvasjs-chart-canvas");
+ra(b,a,d);u||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(b);return b}function Ba(a,d,b){if(a&&d&&b){b=b+"."+d;var c="image/"+d;a=a.toDataURL(c);var f=!1,g=document.createElement("a");g.download=b;g.href=a;g.target="_blank";if("undefined"!==typeof Blob&&new Blob){for(var h=a.replace(/^data:[a-z/]*;base64,/,""),h=atob(h),l=new ArrayBuffer(h.length),l=new Uint8Array(l),k=0;k<h.length;k++)l[k]=h.charCodeAt(k);d=new Blob([l.buffer],{type:"image/"+d});try{window.navigator.msSaveBlob(d,
+b),f=!0}catch(m){g.dataset.downloadurl=[c,g.download,g.href].join(":"),g.href=window.URL.createObjectURL(d)}}if(!f)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(n){d=window.open(),d.document.write("<img src='"+a+"'></img><div>Please right click on the image and save it to your device</div>"),d.document.close()}}}function T(a,d,b){d.getAttribute("state")!==
+b&&(d.setAttribute("state",b),d.setAttribute("type","button"),d.style.position="relative",d.style.margin="0px 0px 0px 0px",d.style.padding="3px 4px 0px 4px",d.style.cssFloat="left",d.setAttribute("title",a._cultureInfo[b+"Text"]),d.innerHTML="<img style='height:16px;' src='"+Ta[b].image+"' alt='"+a._cultureInfo[b+"Text"]+"' />")}function ta(){for(var a=null,d=0;d<arguments.length;d++)a=arguments[d],a.style&&(a.style.display="inline")}function Y(){for(var a=null,d=0;d<arguments.length;d++)(a=arguments[d])&&
+a.style&&(a.style.display="none")}function M(a,d,b,c){this._defaultsKey=a;this.parent=c;this._eventListeners=[];c={};b&&(ia[b]&&ia[b][a])&&(c=ia[b][a]);this.options=d?d:{_isPlaceholder:!0};this.setOptions(this.options,c)}function A(a,d){d=d||{};A.base.constructor.call(this,"Chart",d,d.theme?d.theme:"theme1");var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=
+!1;this.renderCount=0;this.panEnabled=this.disableToolTip=this.animatedRender=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];if(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId){this.container.innerHTML="";var c=0,f=0,c=this.options.width?this.width:0<this.container.clientWidth?this.container.clientWidth:this.width,f=this.options.height?this.height:
+0<this.container.clientHeight?this.container.clientHeight:this.height;this.width=c;this.height=f;this.x1=this.y1=0;this.x2=this.width;this.y2=this.height;this._selectedColorSet="undefined"!==typeof ha[this.colorSet]?ha[this.colorSet]:ha.colorSet1;this._canvasJSContainer=document.createElement("div");this._canvasJSContainer.setAttribute("class","canvasjs-chart-container");this._canvasJSContainer.style.position="relative";this._canvasJSContainer.style.textAlign="left";this._canvasJSContainer.style.cursor=
+"auto";u||(this._canvasJSContainer.style.height="0px");this.container.appendChild(this._canvasJSContainer);this.canvas=ga(c,f);this.canvas.style.position="absolute";this.canvas.getContext&&(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Qa(this.ctx),u?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=ga(c,f),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),
+this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this.overlaidCanvas=ga(c,f),this.overlaidCanvas.style.position="absolute",this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",this._eventManager=new la(this),K(window,"resize",function(){b._updateSize()&&b.render()}),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),this._toolBar.style.cssText=
+"position: absolute; right: 1px; top: 1px;",this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},K(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)}),K(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);Y(b._dropdownMenu)}),K(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)}),
+K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)}),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)}),this.toolTip=
+new S(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})}else window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function ua(a,d){for(var b=[],c,f=0;f<a.length;f++)if(0==f)b.push(a[0]);else{var g,h,l;l=f-1;g=0===l?0:l-1;h=l===a.length-1?l:l+1;c=Math.abs((a[h].x-a[g].x)/(0===a[h].x-a[l].x?0.01:a[h].x-a[l].x))*(d-1)/2+1;var k=
+(a[h].x-a[g].x)/c;c=(a[h].y-a[g].y)/c;b[b.length]=a[l].x>a[g].x&&0<k||a[l].x<a[g].x&&0>k?{x:a[l].x+k/3,y:a[l].y+c/3}:{x:a[l].x,y:a[l].y+c/9};l=f;g=0===l?0:l-1;h=l===a.length-1?l:l+1;c=Math.abs((a[h].x-a[g].x)/(0===a[l].x-a[g].x?0.01:a[l].x-a[g].x))*(d-1)/2+1;k=(a[h].x-a[g].x)/c;c=(a[h].y-a[g].y)/c;b[b.length]=a[l].x>a[g].x&&0<k||a[l].x<a[g].x&&0>k?{x:a[l].x-k/3,y:a[l].y-c/3}:{x:a[l].x,y:a[l].y-c/9};b[b.length]=a[f]}return b}function Na(a,d){if(null===a||"undefined"===typeof a)return d;var b=parseFloat(a.toString())*
+(0<=a.toString().indexOf("%")?d/100:1);return!isNaN(b)&&b<=d&&0<=b?b:d}function ja(a,d,b,c,f){"undefined"===typeof f&&(f=0);this._padding=f;this._x1=a;this._y1=d;this._x2=b;this._y2=c;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function W(a,d){W.base.constructor.call(this,"TextBlock",d);this.ctx=a;this._isDirty=!0;this._wrappedText=null}function ma(a,d){ma.base.constructor.call(this,"Title",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;
+this.optionsName="title";if(x(this.options.margin)&&a.options.subtitles)for(var b=a.options.subtitles,c=0;c<b.length;c++)if((x(b[c].horizontalAlign)&&"center"===this.horizontalAlign||b[c].horizontalAlign===this.horizontalAlign)&&(x(b[c].verticalAlign)&&"top"===this.verticalAlign||b[c].verticalAlign===this.verticalAlign)&&!b[c].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=
+this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function va(a,d){va.base.constructor.call(this,"Subtitle",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function wa(a,d){wa.base.constructor.call(this,"Legend",d,a.theme,a);this.chart=
+a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=Ja(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function Ca(a,d){Ca.base.constructor.call(this,d);
+this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx}function $(a,d,b,c){$.base.constructor.call(this,"DataSeries",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=b;this.noDataPointsInPlotArea=0;this.id=c;this.chart._eventManager.objectMap[c]={id:c,objectType:"dataSeries",dataSeriesIndex:b};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=
+0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function B(a,d,b,c,f){B.base.constructor.call(this,"Axis",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,
+viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===b?("left"===c||"bottom"===c?(this.optionsName="axisX",x(this.chart.sessionVariables.axisX[f])&&(this.chart.sessionVariables.axisX[f]={}),this.sessionVariables=this.chart.sessionVariables.axisX[f]):(this.optionsName="axisX2",x(this.chart.sessionVariables.axisX2[f])&&(this.chart.sessionVariables.axisX2[f]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[f]),this.options.interval||(this.intervalType=
+null),"theme2"===this.chart.theme&&x(this.options.lineThickness)&&(this.lineThickness=2)):"left"===c||"top"===c?(this.optionsName="axisY",x(this.chart.sessionVariables.axisY[f])&&(this.chart.sessionVariables.axisY[f]={}),this.sessionVariables=this.chart.sessionVariables.axisY[f]):(this.optionsName="axisY2",x(this.chart.sessionVariables.axisY2[f])&&(this.chart.sessionVariables.axisY2[f]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[f]);"undefined"===typeof this.options.titleFontSize&&
+(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=b;"axisX"!==b||d&&"undefined"!==typeof d.gridThickness||(this.gridThickness=0);this._position=c;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&
+(this.labelAngle-=360);if(this.options.stripLines&&0<this.options.stripLines.length)for(this.stripLines=[],d=0;d<this.options.stripLines.length;d++)this.stripLines.push(new na(this.chart,this.options.stripLines[d],a.theme,++this.chart._eventManager.lastObjectId,this));this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||
+null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=
+this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum")}function na(a,d,b,c,f){na.base.constructor.call(this,"StripLine",d,b,f);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=f;
+this.optionsName="stripLines";this.isOptionsInArray=!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=f.logarithmic?Math.sqrt((this.startValue.getTime?this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this.thickness=f.logarithmic?Math.log(this.endValue/this.startValue)/Math.log(f.logarithmBase):
+Math.max(this.endValue-this.startValue),this._thicknessType="value")}function S(a,d){S.base.constructor.call(this,"ToolTip",d,a.theme,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._timerId=0;this._prevY=this._prevX=NaN;this.optionsName="toolTip";this._initialize()}function la(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=
+ga(this.chart.width,this.chart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function oa(a){var d;a&&pa[a]&&(d=pa[a]);oa.base.constructor.call(this,"CultureInfo",d)}function Da(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}var z={},u=!!document.createElement("canvas").getContext,ca={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"theme1",animationEnabled:!1,animationDuration:1200,
+dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditText:"CanvasJS",interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",
+horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:u?"transparent":null,margin:5,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,
+borderColor:"black",cornerRadius:0,backgroundColor:null,margin:2,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Legend:{name:null,verticalAlign:"center",horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",cursor:null,itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null,dockInsidePlotArea:!1,reversed:!1,backgroundColor:u?"transparent":null,borderColor:u?
+"transparent":null,borderThickness:0,cornerRadius:0,maxWidth:null,maxHeight:null,markerMargin:null,itemMaxWidth:null,itemWidth:null,itemWrap:!0,itemTextFormatter:null,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},ToolTip:{enabled:!0,shared:!1,animationEnabled:!0,content:null,contentFormatter:null,reversed:!1,backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",borderColor:null,borderThickness:2,cornerRadius:5,fontSize:14,fontColor:"black",fontFamily:"Calibri, Arial, Georgia, serif;",
+fontWeight:"normal",fontStyle:"italic",publicProperties:{options:"readWrite",chart:"readOnly"}},Axis:{minimum:null,maximum:null,viewportMinimum:null,viewportMaximum:null,interval:null,intervalType:null,reversed:!1,logarithmic:!1,logarithmBase:10,title:null,titleFontColor:"black",titleFontSize:20,titleFontFamily:"arial",titleFontWeight:"normal",titleFontStyle:"normal",titleWrap:!0,titleMaxWidth:null,titleBackgroundColor:u?"transparent":null,titleBorderColor:u?"transparent":null,titleBorderThickness:0,
+titleCornerRadius:0,labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!0,labelWrap:!0,labelMaxWidth:null,labelFormatter:null,labelBackgroundColor:u?"transparent":null,labelBorderColor:u?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,prefix:"",suffix:"",includeZero:!0,tickLength:5,tickColor:"black",tickThickness:1,lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"A0A0A0",gridThickness:0,
+gridDashType:"solid",interlacedColor:u?"transparent":null,valueFormatString:null,margin:2,stripLines:[],publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},StripLine:{value:null,startValue:null,endValue:null,color:"orange",opacity:null,thickness:2,lineDashType:"solid",label:"",labelPlacement:"inside",labelAlign:"far",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:u?"transparent":null,labelBorderColor:u?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:"arial",
+labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,showOnTop:!1,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,highlightEnabled:!0,cursor:"default",indexLabel:"",indexLabelPlacement:"auto",indexLabelOrientation:"horizontal",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",
+indexLabelBackgroundColor:null,indexLabelLineColor:"gray",indexLabelLineThickness:1,indexLabelLineDashType:"solid",indexLabelMaxWidth:null,indexLabelWrap:!0,indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1,nullDataLineDashType:"dash",color:null,lineColor:null,risingColor:"white",fillOpacity:null,startAngle:0,radius:null,innerRadius:null,type:"column",xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,xValueFormatString:null,yValueFormatString:null,
+zValueFormatString:null,percentFormatString:null,showInLegend:null,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:u?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:u?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,
+y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},pa={en:{}},ha={colorSet1:"#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "),colorSet2:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},
+ia={theme1:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Subtitle:{fontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",fontSize:16,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Axis:{titleFontSize:26,titleFontColor:"#666666",titleFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",
+labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,labelFontColor:"grey",tickColor:"#BBBBBB",tickThickness:2,gridThickness:2,gridColor:"#BBBBBB",lineThickness:2,lineColor:"#BBBBBB"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineThickness:1}},
+theme2:{Chart:{colorSet:"colorSet2"},Title:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:32,fontColor:"#333333",verticalAlign:"top",margin:5},Subtitle:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:14,fontColor:"#333333",verticalAlign:"top",margin:5},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"monospace, sans-serif,arial black":"arial",titleFontWeight:"bold",labelFontFamily:u?"monospace, Courier New, Courier":"arial",labelFontSize:16,
+labelFontColor:"grey",labelFontWeight:"bold",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineColor:"grey",lineThickness:0},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"arial"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Courier New, Courier, monospace":"arial",indexLabelFontWeight:"bold",indexLabelFontSize:18,indexLabelLineThickness:1}},theme3:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:u?"Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":
+"calibri",fontSize:32,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Subtitle:{fontFamily:u?"Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":"calibri",fontSize:16,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"Verdana, Geneva, Calibri, sans-serif":"calibri",labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,
+labelFontColor:"grey",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineThickness:2,lineColor:"grey"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},DataSeries:{bevelEnabled:!0,indexLabelFontColor:"grey",indexLabelFontFamily:u?"Candara, Optima, Calibri, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineColor:"lightgrey",indexLabelLineThickness:2}}},E={numberDuration:1,yearDuration:314496E5,
+monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")},Ka={},ba=null,Ea=function(){var a=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),b="Sun Mon Tue Wed Thu Fri Sat".split(" "),c="January February March April May June July August September October November December".split(" "),
+f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,h=/[^-+\dA-Z]/g;return function(l,k,m){var n=m?m.days:d,p=m?m.months:c,e=m?m.shortDays:b,r=m?m.shortMonths:f;m="";var q=!1;l=l&&l.getTime?l:l?new Date(l):new Date;if(isNaN(l))throw SyntaxError("invalid date");"UTC:"===k.slice(0,4)&&(k=k.slice(4),q=!0);m=q?"getUTC":"get";var s=l[m+"Date"](),v=l[m+"Day"](),
+w=l[m+"Month"](),y=l[m+"FullYear"](),t=l[m+"Hours"](),u=l[m+"Minutes"](),Z=l[m+"Seconds"](),aa=l[m+"Milliseconds"](),x=q?0:l.getTimezoneOffset();return m=k.replace(a,function(a){switch(a){case "D":return s;case "DD":return O(s,2);case "DDD":return e[v];case "DDDD":return n[v];case "M":return w+1;case "MM":return O(w+1,2);case "MMM":return r[w];case "MMMM":return p[w];case "Y":return parseInt(String(y).slice(-2));case "YY":return O(String(y).slice(-2),2);case "YYY":return O(String(y).slice(-3),3);
+case "YYYY":return O(y,4);case "h":return t%12||12;case "hh":return O(t%12||12,2);case "H":return t;case "HH":return O(t,2);case "m":return u;case "mm":return O(u,2);case "s":return Z;case "ss":return O(Z,2);case "f":return String(aa).slice(0,1);case "ff":return O(String(aa).slice(0,2),2);case "fff":return O(String(aa).slice(0,3),3);case "t":return 12>t?"a":"p";case "tt":return 12>t?"am":"pm";case "T":return 12>t?"A":"P";case "TT":return 12>t?"AM":"PM";case "K":return q?"UTC":(String(l).match(g)||
+[""]).pop().replace(h,"");case "z":return(0<x?"-":"+")+Math.floor(Math.abs(x)/60);case "zz":return(0<x?"-":"+")+O(Math.floor(Math.abs(x)/60),2);case "zzz":return(0<x?"-":"+")+O(Math.floor(Math.abs(x)/60),2)+O(Math.abs(x)%60,2);default:return a.slice(1,a.length-1)}})}}(),da=function(a,d,b){if(null===a)return"";a=Number(a);var c=0>a?!0:!1;c&&(a*=-1);var f=b?b.decimalSeparator:".",g=b?b.digitGroupSeparator:",",h="";d=String(d);var h=1,l=b="",k=-1,m=[],n=[],p=0,e=0,r=0,q=!1,s=0,l=d.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);
+d=null;for(var v=0;l&&v<l.length;v++)if(d=l[v],"."===d&&0>k)k=v;else{if("%"===d)h*=100;else if("\u2030"===d){h*=1E3;continue}else if(","===d[0]&&"."===d[d.length-1]){h/=Math.pow(1E3,d.length-1);k=v+d.length-1;continue}else"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-1]||(q=!0);0>k?(m.push(d),"#"===d||"0"===d?p++:","===d&&r++):(n.push(d),"#"!==d&&"0"!==d||e++)}q&&(d=Math.floor(a),l=-Math.floor(Math.log(a)/Math.LN10+1),s=0===a?0:0===d?-(p+l):String(d).length-p,h/=Math.pow(10,s));0>k&&(k=v);h=(a*h).toFixed(e);
+d=h.split(".");h=(d[0]+"").split("");a=(d[1]+"").split("");h&&"0"===h[0]&&h.shift();for(q=l=v=e=k=0;0<m.length;)if(d=m.pop(),"#"===d||"0"===d)if(k++,k===p){var w=h,h=[];if("0"===d)for(d=p-e-(w?w.length:0);0<d;)w.unshift("0"),d--;for(;0<w.length;)b=w.pop()+b,q++,0===q%l&&(v===r&&0<w.length)&&(b=g+b)}else 0<h.length?(b=h.pop()+b,e++,q++):"0"===d&&(b="0"+b,e++,q++),0===q%l&&(v===r&&0<h.length)&&(b=g+b);else"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-1]||!/[eE][+-]*[0]+/.test(d)?","===d?(v++,l=q,q=0,0<h.length&&
+(b=g+b)):b=1<d.length&&('"'===d[0]&&'"'===d[d.length-1]||"'"===d[0]&&"'"===d[d.length-1])?d.slice(1,d.length-1)+b:d+b:(d=0>s?d.replace("+","").replace("-",""):d.replace("-",""),b+=d.replace(/[0]+/,function(a){return O(s,a.length)}));g="";for(m=!1;0<n.length;)d=n.shift(),"#"===d||"0"===d?0<a.length&&0!==Number(a.join(""))?(g+=a.shift(),m=!0):"0"===d&&(g+="0",m=!0):1<d.length&&('"'===d[0]&&'"'===d[d.length-1]||"'"===d[0]&&"'"===d[d.length-1])?g+=d.slice(1,d.length-1):"E"!==d[0]&&"e"!==d[0]||"0"!==d[d.length-
+1]||!/[eE][+-]*[0]+/.test(d)?g+=d:(d=0>s?d.replace("+","").replace("-",""):d.replace("-",""),g+=d.replace(/[0]+/,function(a){return O(s,a.length)}));b+=(m?f:"")+g;return c?"-"+b:b},xa=function(a){var d=0,b=0;a=a||window.event;a.offsetX||0===a.offsetX?(d=a.offsetX,b=a.offsetY):a.layerX||0==a.layerX?(d=a.layerX,b=a.layerY):(d=a.pageX-a.target.offsetLeft,b=a.pageY-a.target.offsetTop);return{x:d,y:b}},Ma=!0,za=window.devicePixelRatio||1,sa=1,Q=Ma?za/sa:1,Aa=window&&window.location&&window.location.href&&
+window.location.href.indexOf&&(-1!==window.location.href.indexOf("canvasjs.com")||-1!==window.location.href.indexOf("fiddle")),Ta={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAKRSURBVEiJrdY/iF1FFMfxzwnZrGISUSR/JLGIhoh/QiRNBLWxMLIWEkwbgiAoFgoW2mhlY6dgpY2IlRBRxBSKhSAKIklWJRYuMZKAhiyopAiaTY7FvRtmZ+/ed9/zHRjezLw5v/O9d86cuZGZpmURAfdn5o9DfdZNLXpjz+LziPgyIl6MiG0jPTJzZBuyDrP4BVm0P/AKbljTb4ToY/gGewYA7KyCl+1b3DUYANvwbiHw0gCAGRzBOzjTAXEOu0cC4Ch+r5x/HrpdrcZmvIDFSucMtnYCYC++6HmNDw8FKDT34ETrf639/azOr5vwRk/g5fbeuABtgC04XWk9VQLciMP4EH/3AFzErRNC7MXlQmsesSoHsGPE23hmEoBW+61K66HMXFmIMvN8myilXS36R01ub+KfYvw43ZXwYDX+AHP4BAci4pFJomfmr/ihmNofESsBImJGk7mlncrM45n5JPbhz0kAWpsv+juxaX21YIPmVJS2uNzJMS6ZNexC0d+I7fUWXLFyz2kSZlpWPvASlmqAf/FXNXf3FAF2F/1LuFifAlionB6dRuSI2IwHi6lzmXmp6xR8XY0fiIh7psAwh+3FuDkRHQVjl+a8lkXjo0kLUKH7XaV5oO86PmZ1FTzyP4K/XGl9v/zwfbW7BriiuETGCP5ch9bc9f97HF/vcFzCa5gdEPgWq+t/4v0V63oE1uF4h0DiFJ7HnSWMppDdh1dxtsPvJ2wcBNAKbsJXa0Ck5opdaBPsRNu/usba09i1KsaAVzmLt3sghrRjuK1Tf4xkegInxwy8gKf7dKMVH2QRsV5zXR/Cftyu+aKaKbbkQrsdH+PTzLzcqzkOQAVzM+7FHdiqqe2/YT4zF/t8S/sPmawyvC974vcAAAAASUVORK5CYII="},
+pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJVSURBVFiFvZe7a1RBGMV/x2hWI4JpfKCIiSBKOoOCkID/wP4BFqIIFkE02ChIiC8QDKlSiI3YqRBsBVGwUNAUdiIEUgjiAzQIIsuKJsfizsXr5t7d+8jmwLDfzHz3nLOzc7+ZxTZlGyDgZiWOCuJ9wH2gCUyuqQFgF/AGcKJNrYkBYBj40CIet+muGQi/96kM4WS7C/Tm5VUg7whJg8BkEGkCR4BDYfodsADUgP6wErO5iCtswsuJb32hdbXy8qzL5TIdmzJinHdZoZIBZcSFkGlAKs1Z3YCketZcBtouuaQNkrblMiBpBrhme7mAgU4wMCvpcFsDkq4C54DFVRTH9h+i6vlE0r5UA5ImgCuh28jB28iIs7BIVCOeStoZD64P4uPAjUTygKSx2FsK2TIwkugfk9Qkfd/E+yMWHQCeSRqx/R3gOp3LazfaS2C4B5gHDgD7U9x3E3uAH7KNpC3AHHAwTL4FHgM9GQ8vAaPA0dB/Abxqk2/gBLA9MXba9r1k/d4LfA3JtwueBeM58ucS+edXnAW23wP10N3advEi9CXizTnyN4bPS7Zn4sH/dq3t18AY4e1YLYSy3g/csj2VnFshZPuOpOeSKHCodUINuGj7YetE6je1PV9QoNPJ9StNHKodx7nRbiWrGHBGXAi5DUiqtQwtpcWK0Jubt8CltA5MEV1IfwO7+VffPwGfia5m34CT4bXujIIX0Qna1/cGMNqV/wUJE2czxD8CQ4X5Sl7Jz7SILwCDpbjKPBRMHAd+EtX4HWV5Spdc2w8kDQGPbH8py/MXMygM69/FKz4AAAAASUVORK5CYII="},
+zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAMqSURBVFiFvdfbj91TFMDxz57U6GUEMS1aYzyMtCSSDhWjCZMInpAI3khE/QHtgzdRkXgSCS8SES9epKLi0oRKNETjRahREq2KS1stdRujtDPtbA97n5zdn9+5zJxTK9k5v3POXmt991p7r71+IcaoGwkhTOIebMRqzOBTvIG3Y4zTXRmqSoyx5cAKbMJOHMFJnMZ8/jyFaXyMR7G6nb1aH22cP4BvcBxziG3GKfyTIR9D6BYg1KUghPBCDveFlb/24Av8iuUYw41YVsz5G7uxKcZ4aMEpwGt5NY3V/YbHsQ6rcAHOw/kYxigewr5CZw4fYGxBKcCLOFEYehXrMdRhr5yLETxVScsOLOkKAPfn1TYMPIvLFrShUlS2FDZm8XRHACzFAWl3R2xbqPMCYhmeLCAOYEMngAczbcTvuHYxzguIy/FesR9e6gSwU/OoPYHBHgHgviIKX2Flq7k34KhmcVnbi/PC8JX4MgMcxb118wZwdz5aISscqx7VRcox7MrPQ7i+btIAJrAkf9+bI9EPmZY2IAxiTSuAldLq4Y9+AcSUh78KP0tbAcwU35cXMD1JCIFUoGiehlqAz6TNB1f1C0DK+0h+nsNPrQC2a4bqGmlD9kOGcWt+Po6pVgDvSxfJaSkFd4UQBvoAsBYbCoB3a2flM7slA0R8iyt6rAFDeDPbm8eOTpVwGD9qVq7nLbIaZnmksPU1JtsCZMXNmpdRxFasWITzh6Xj3LCzra1OxcD2QjHiGVzdpfORnMqZio2PcF23ABdJF1Np4BPptlyPi6WzPYBzpJZtHe7A6xW9cnyP8TqA//SEIYRL8Bxul7rihvwgtVn78WcGGZXa9HGd5TDujDHuOePXNiHdKjWgZX/YbsxLx/ktqbjVzTlcjUSnvI5JrdlUVp6WesZZ6R1hRrpq9+EVTGS9jTjYAuKIouGpbcurEkIYxC051KNSamazsc+xK8b4S0VnEi/j0hqTP+M27O258egQwZuzs7pI7Mf4WQXIEDc5s9sux+5+1Py2EmP8UOq6GvWhIScxfdYjUERiAt9Jd84J6a16zf8JEKT3yCm8g1UxRv8CC4pyRhzR1uUAAAAASUVORK5CYII="},
+menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC"}};(function(){z.fSDec=function(a){for(var d="",b=0;b<a.length;b++)d+=String.fromCharCode(a[b]-111);return d};z.str={tv:[195,225,216,208,219,143,197,212,225,
+226,216,222,221],fntStr:[223,231,143,178,208,219,216,209,225,216,155,143,187,228,210,216,211,208,143,182,225,208,221,211,212,155,143,187,228,210,216,211,208,143,194,208,221,226,143,196,221,216,210,222,211,212,155,143,176,225,216,208,219,155,143,226,208,221,226,156,226,212,225,216,213],tBl:[227,212,231,227,177,208,226,212,219,216,221,212],fnt:[213,222,221,227],fSy:[213,216,219,219,194,227,232,219,212],fTx:[213,216,219,219,195,212,231,227],gr:[214,225,212,232],ct:[210,227,231],tp:[227,222,223]};delete ca[z.fSDec([178,
+215,208,225,227])][z.fSDec([210,225,212,211,216,227,183,225,212,213])];z.pro={sCH:ca[z.fSDec([178,215,208,225,227])][z.fSDec([210,225,212,211,216,227,183,225,212,213])]};z.fAWm=function(a){if("undefined"===typeof z.pro.sCH&&!Aa){var d=a[z.fSDec(z.str.ct)];d[z.fSDec(z.str.tBl)]=z.fSDec(z.str.tp);d[z.fSDec(z.str.fnt)]=11+z.fSDec(z.str.fntStr);d[z.fSDec(z.str.fSy)]=z.fSDec(z.str.gr);d[z.fSDec(z.str.fTx)](z.fSDec(z.str.tv),2,a.height-11-2)}}})();(function(){z.ckDec=function(a){for(var d="",b=0;b<a.length;b++)d+=
+String.fromCharCode(a[b]-111);return d};z.str.ckn=[206,206,210,230,217,198,226,195,225];z.str.tem=[195,225,216,208,219,143,191,212,225,216,222,211,143,215,208,226,143,180,231,223,216,225,212,211,144];z.str.ctm=[191,219,212,208,226,212,143,210,222,221,227,208,210,227,143,226,208,219,212,226,175,210,208,221,229,208,226,217,226,157,210,222,220];z.str.ltm=[213,222,225,143,219,216,210,212,221,226,212,143,222,225,143,227,225,216,208,219,143,212,231,227,212,221,227,216,222,221];z.str.ckve=[212,231,223,216,
+225,212,226,172];z.str.mco=[225,214,209,208,151,161,164,164,155,161,164,164,155,161,164,164,155,159,157,164,152];z.str.mcw=[198,215,216,227,212];z.str.mct=[225,214,209,208,151,161,162,160,155,161,168,155,164,163,155,159,157,166,152];z.str.mcr=[193,212,211];z.fNg=function(a){if(!Aa)try{var d;a:{var b=RegExp(z.ckDec(z.str.ckn)+"=.*","gi"),c=new Date,f=document.cookie.match(b),g=localStorage&&localStorage.getItem("lclStg")&&JSON.parse(localStorage.getItem("lclStg")).name.match(z.ckDec(z.str.ckn))?JSON.parse(localStorage.getItem("lclStg")):
+null;if(f&&0<f.length||g){var h,b=[],l=[],k=null;if(f)for(var m=f[0].split("; "),f=0;f<m.length;f++)b.push(m[f].split("=")[0]),l.push(m[f].split("=")[1]);g&&(k=g);h={ckVal:Number(l[0]),lSVal:k?Number(k.val):null};g=null;h&&h.ckVal&&h.lSVal?g=Math.min(h.ckVal,h.lSVal):h&&h.ckVal?g=h.ckVal:h&&h.lSVal&&(g=h.lSVal);if(2592E6<Math.round(Math.abs(g-c.getTime()))){d=!0;break a}}else{l=new Date;k=l.getTime();l.setTime(k+31536E6);var n={name:z.ckDec(z.str.ckn),val:(new Date).getTime()};document.cookie=z.ckDec(z.str.ckn)+
+"="+(new Date).getTime()+"; "+z.ckDec(z.str.ckve)+l.toUTCString()+"; path=/;";localStorage.setItem("lclStg",JSON.stringify(n))}d=!1}if(d){d=20;var p=a.plotArea.ctx;p.font="bold "+d+(u?"px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif":"px Lucida Sans Unicode");var e=z.ckDec(z.str.tem),r=p.measureText(e).width;p.fillStyle=u?z.ckDec(z.str.mco):z.ckDec(z.str.mcw);p.fillRect(a.plotArea.x2-r-8,a.plotArea.y2-2.5*d-8,r+4,2.5*d+8);p.fillStyle=u?z.ckDec(z.str.mct):z.ckDec(z.str.mcr);p.textBaseline=
+"top";p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-2.5*d-2);d=14;p.font=d+(u?"px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif":"px Lucida Sans Unicode");e=z.ckDec(z.str.ctm);r=p.measureText(e).width;p.fillStyle=u?z.ckDec(z.str.mct):z.ckDec(z.str.mcr);p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-2*d-4);e=z.ckDec(z.str.ltm);r=p.measureText(e).width;p.fillText(e,a.plotArea.x2-r-4,a.plotArea.y2-d-4)}}catch(q){}}})();M.prototype.setOptions=function(a,d){if(ca[this._defaultsKey]){var b=
+ca[this._defaultsKey],c;for(c in b)"publicProperties"!==c&&b.hasOwnProperty(c)&&(this[c]=a&&c in a?a[c]:d&&c in d?d[c]:b[c])}};M.prototype.get=function(a){var d=ca[this._defaultsKey];if("options"===a)return this.options&&this.options._isPlaceholder?null:this.options;if(d.hasOwnProperty(a)||d.publicProperties&&d.publicProperties.hasOwnProperty(a))return this[a];window.console&&window.console.log('Property "'+a+"\" doesn't exist. Please check for typo.")};M.prototype.set=function(a,d,b){b="undefined"===
+typeof b?!0:b;var c=ca[this._defaultsKey];if("options"===a)this.createUserOptions(d);else if(c.hasOwnProperty(a)||c.publicProperties&&c.publicProperties.hasOwnProperty(a)&&"readWrite"===c.publicProperties[a])this.options._isPlaceholder&&this.createUserOptions(),this.options[a]=d;else{window.console&&(c.publicProperties&&c.publicProperties.hasOwnProperty(a)&&"readOnly"===c.publicProperties[a]?window.console.log('Property "'+a+'" is read-only.'):window.console.log('Property "'+a+"\" doesn't exist. Please check for typo."));
+return}b&&(chart=this.chart||this,chart.render())};M.prototype.addTo=function(a,d,b,c){c="undefined"===typeof c?!0:c;var f=ca[this._defaultsKey];f.hasOwnProperty(a)||f.publicProperties&&f.publicProperties.hasOwnProperty(a)&&"readWrite"===f.publicProperties[a]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[a]&&(this.options[a]=[]),a=this.options[a],b="undefined"===typeof b||null===b?a.length:b,a.splice(b,0,d),c&&(chart=this.chart||this,chart.render())):window.console&&
+(f.publicProperties&&f.publicProperties.hasOwnProperty(a)&&"readOnly"===f.publicProperties[a]?window.console.log('Property "'+a+'" is read-only.'):window.console.log('Property "'+a+"\" doesn't exist. Please check for typo."))};M.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder)if(this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var d=
+this.parent.options[this.optionsName],b=d.length;this.options._isPlaceholder||(qa(d),b=d.indexOf(this.options));this.options="undefined"===typeof a?{}:a;d[b]=this.options}else this.options="undefined"===typeof a?{}:a,a=this.parent.options,this.optionsName?d=this.optionsName:(d=this._defaultsKey)&&0!==d.length?(b=d.charAt(0).toLowerCase(),1<d.length&&(b=b.concat(d.slice(1))),d=b):d=void 0,a[d]=this.options};M.prototype.remove=function(a){a="undefined"===typeof a?!0:a;if(this.isOptionsInArray){var d=
+this.parent.options[this.optionsName];qa(d);var b=d.indexOf(this.options);0<=b&&d.splice(b,1)}else delete this.parent.options[this.optionsName];a&&(chart=this.chart||this,chart.render())};M.prototype.updateOption=function(a){var d=ca[this._defaultsKey],b=this.options.theme?this.options.theme:this.chart&&this.chart.options.theme?this.chart.options.theme:"theme1",c={},f=this[a];b&&(ia[b]&&ia[b][this._defaultsKey])&&(c=ia[b][this._defaultsKey]);a in d&&(f=a in this.options?this.options[a]:c&&a in c?
+c[a]:d[a]);if(f===this[a])return!1;this[a]=f;return!0};M.prototype.trackChanges=function(a){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[a]=this.options[a]};M.prototype.isBeingTracked=function(a){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[a]?!0:!1};M.prototype.hasOptionChanged=function(a){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[a]!==this.options[a]};M.prototype.addEventListener=
+function(a,d,b){a&&d&&(this._eventListeners[a]=this._eventListeners[a]||[],this._eventListeners[a].push({context:b||this,eventHandler:d}))};M.prototype.removeEventListener=function(a,d){if(a&&d&&this._eventListeners[a])for(var b=this._eventListeners[a],c=0;c<b.length;c++)if(b[c].eventHandler===d){b[c].splice(c,1);break}};M.prototype.removeAllEventListeners=function(){this._eventListeners=[]};M.prototype.dispatchEvent=function(a,d,b){if(a&&this._eventListeners[a]){d=d||{};for(var c=this._eventListeners[a],
+f=0;f<c.length;f++)c[f].eventHandler.call(c[f].context,d)}"function"===typeof this[a]&&this[a].call(b||this.chart,d)};U(A,M);A.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.updateOption("colorSet")&&(this._selectedColorSet="undefined"!==typeof ha[this.colorSet]?
+ha[this.colorSet]:ha.colorSet1);this.updateOption("backgroundColor");this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=new oa(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&u;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.options.zoomEnabled?
+(this._zoomButton||(Y(this._zoomButton=document.createElement("button")),T(this,this._zoomButton,"pan"),this._toolBar.appendChild(this._zoomButton),K(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,T(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,T(a,a._zoomButton,"pan"));a.render()})),this._resetButton||(Y(this._resetButton=document.createElement("button")),T(this,this._resetButton,"reset"),this._toolBar.appendChild(this._resetButton),K(this._resetButton,
+"click",function(){a.toolTip.hide();a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,T(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=
+null,a.sessionVariables.axisX2[b].newViewportMaximum=null;if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();Y(a._zoomButton,a._resetButton);a._dispatchRangeEvent("rangeChanging",
+"reset");a.render();a._dispatchRangeEvent("rangeChanged","reset")}),this.overlaidCanvas.style.cursor=a._defaultCursor),this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),ta(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))):this.panEnabled=this.zoomEnabled=!1;this._menuButton?this.exportEnabled?ta(this._menuButton):Y(this._menuButton):
+this.exportEnabled&&u&&(this._menuButton=document.createElement("button"),T(this,this._menuButton,"menu"),this._toolBar.appendChild(this._menuButton),K(this._menuButton,"click",function(){"none"!==a._dropdownMenu.style.display||a._dropDownCloseTime&&500>=(new Date).getTime()-a._dropDownCloseTime.getTime()||(a._dropdownMenu.style.display="block",a._menuButton.blur(),a._dropdownMenu.focus())},!0));if(!this._dropdownMenu&&this.exportEnabled&&u){this._dropdownMenu=document.createElement("div");this._dropdownMenu.setAttribute("tabindex",
+-1);this._dropdownMenu.style.cssText="position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;";a._dropdownMenu.style.display="none";this._toolBar.appendChild(this._dropdownMenu);K(this._dropdownMenu,
+"blur",function(){Y(a._dropdownMenu);a._dropDownCloseTime=new Date},!0);var d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";d.innerHTML=this._cultureInfo.printText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){a.print();Y(a._dropdownMenu)},!0);d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";
+d.innerHTML=this._cultureInfo.saveJPGText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){Ba(a.canvas,"jpeg",a.exportFileName);Y(a._dropdownMenu)},!0);d=document.createElement("div");d.style.cssText="padding: 2px 15px 2px 10px";d.innerHTML=this._cultureInfo.savePNGText;this._dropdownMenu.appendChild(d);K(d,"mouseover",function(){this.style.backgroundColor=
+"#EEEEEE"},!0);K(d,"mouseout",function(){this.style.backgroundColor="transparent"},!0);K(d,"click",function(){Ba(a.canvas,"png",a.exportFileName);Y(a._dropdownMenu)},!0)}"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?T(a,a._zoomButton,"zoom"):T(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&T(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(var b in this.toolTip.options)this.toolTip.options.hasOwnProperty(b)&&
+this.toolTip.updateOption(b)};A.prototype._updateSize=function(){var a=0,d=0;this.options.width?a=this.width:this.width=a=0<this.container.clientWidth?this.container.clientWidth:this.width;this.options.height?d=this.height:this.height=d=0<this.container.clientHeight?this.container.clientHeight:this.height;return this.canvas.width!==a*Q||this.canvas.height!==d*Q?(ra(this.canvas,a,d),ra(this.overlaidCanvas,a,d),ra(this._eventManager.ghostCanvas,a,d),!0):!1};A.prototype._initialize=function(){this._animator?
+this._animator.cancelAllAnimations():this._animator=new Da(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.pieDoughnutClickHandler=null;this.animationRequestId&&this.cancelRequestAnimFrame.call(window,this.animationRequestId);this._updateOptions();this.animatedRender=u&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=
+[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,axisXValueType:null,plotTypes:[]};this.layoutManager=new ja(0,0,this.width,this.height,2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];var a=0;if(this.options.data)for(var d=0;d<this.options.data.length;d++)if(a++,!this.options.data[d].type||0<=A._supportedChartTypes.indexOf(this.options.data[d].type)){var b=new $(this,this.options.data[d],a-1,++this._eventManager.lastObjectId);
+null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this._selectedColorSet[b.index%this._selectedColorSet.length]],b.color=this._selectedColorSet[b.index%this._selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===b.type||"ohlc"===b.type?
+[this._selectedColorSet[0]]:this._selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(Ia):b.dataPoints.sort(Ia));this.data.push(b);var c=b.axisPlacement,f;"normal"===c?"xySwapped"===
+this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===c?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement=
+"xySwapped"):"none"==c&&("normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"));if(f&&window.console){window.console.log(f);return}}var g=this;this.addEventListener("dataAnimationIterationEnd",function(){z.fAWm&&z.fAWm(g);0!==g.axisX.length&&z.fNg&&z.fNg(g)});Sa(this);this._objectsInitialized=
+!0};A._supportedChartTypes=qa("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc rangeColumn rangeBar rangeArea rangeSplineArea pie doughnut funnel".split(" "));A.prototype.render=function(a){a&&(this.options=a);this._initialize();var d=[];for(a=0;a<this.data.length;a++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[a].axisYType||
+"primary"===this.data[a].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var b=0;b<this.options.axisY.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[b]=new B(this,this.options.axisY[b],"axisY","left",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[b]=new B(this,this.options.axisY[b],"axisY","bottom",b));this.data[a].axisY=this.axisY[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY.length?
+this.data[a].axisYIndex:0];this.axisY[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY.length?this.data[a].axisYIndex:0].dataSeries.push(this.data[a])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new B(this,this.options.axisY,"axisY","left",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new B(this,this.options.axisY,"axisY","bottom",0))),this.data[a].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[a]);
+if("secondary"===this.data[a].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(b=0;b<this.options.axisY2.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[b]=new B(this,this.options.axisY2[b],"axisY","right",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[b]=new B(this,this.options.axisY2[b],"axisY","top",b));this.data[a].axisY=this.axisY2[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY2.length?
+this.data[a].axisYIndex:0];this.axisY2[0<=this.data[a].axisYIndex&&this.data[a].axisYIndex<this.axisY2.length?this.data[a].axisYIndex:0].dataSeries.push(this.data[a])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=new B(this,this.options.axisY2,"axisY","right",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new B(this,this.options.axisY2,"axisY","top",0))),this.data[a].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[a]);
+if(!this.data[a].axisXType||"primary"===this.data[a].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(b=0;b<this.options.axisX.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[b]=new B(this,this.options.axisX[b],"axisX","bottom",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[b]=new B(this,this.options.axisX[b],"axisX","left",b));this.data[a].axisX=this.axisX[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<
+this.axisX.length?this.data[a].axisXIndex:0];this.axisX[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX.length?this.data[a].axisXIndex:0].dataSeries.push(this.data[a])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[0]=new B(this,this.options.axisX,"axisX","bottom",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new B(this,this.options.axisX,"axisX","left",0))),this.data[a].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[a]);
+if("secondary"===this.data[a].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(b=0;b<this.options.axisX2.length;b++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[b]=new B(this,this.options.axisX2[b],"axisX","top",b)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[b]=new B(this,this.options.axisX2[b],"axisX","right",b));this.data[a].axisX=this.axisX2[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX2.length?
+this.data[a].axisXIndex:0];this.axisX2[0<=this.data[a].axisXIndex&&this.data[a].axisXIndex<this.axisX2.length?this.data[a].axisXIndex:0].dataSeries.push(this.data[a])}else this.axisX2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new B(this,this.options.axisX2,"axisX","top",0)):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=new B(this,this.options.axisX2,"axisX","right",0))),this.data[a].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[a])}if(this.axisY){for(b=
+1;b<this.axisY.length;b++)"undefined"===typeof this.axisY[b].options.gridThickness&&(this.axisY[b].gridThickness=0);for(b=0;b<this.axisY.length-1;b++)"undefined"===typeof this.axisY[b].options.margin&&(this.axisY[b].margin=10)}if(this.axisY2){for(b=1;b<this.axisY2.length;b++)"undefined"===typeof this.axisY2[b].options.gridThickness&&(this.axisY2[b].gridThickness=0);for(b=0;b<this.axisY2.length-1;b++)"undefined"===typeof this.axisY2[b].options.margin&&(this.axisY2[b].margin=10)}this.axisY&&0<this.axisY.length&&
+(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(b=0;b<this.axisX.length;b++)"undefined"===typeof this.axisX[b].options.gridThickness&&(this.axisX[b].gridThickness=0);if(this.axisX2)for(b=0;b<this.axisX2.length;b++)"undefined"===typeof this.axisX2[b].options.gridThickness&&
+(this.axisX2[b].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));b=!1;if(0<this._axes.length&&(this.zoomEnabled||this.panEnabled))for(a=0;a<this._axes.length;a++)if(null!==this._axes[a].viewportMinimum||null!==this._axes[a].viewportMaximum){b=
+!0;break}b?ta(this._zoomButton,this._resetButton):(Y(this._zoomButton,this._resetButton),this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));this._processData();this.options.title&&(this.title=new ma(this,this.options.title),this.title.dockInsidePlotArea?d.push(this.title):this.title.render());if(this.options.subtitles)for(this.subtitles=[],a=0;a<this.options.subtitles.length;a++)b=new va(this,this.options.subtitles[a]),this.subtitles.push(b),b.dockInsidePlotArea?d.push(b):b.render();
+this.legend=new wa(this,this.options.legend);for(a=0;a<this.data.length;a++)(this.data[a].showInLegend||"pie"===this.data[a].type||"doughnut"===this.data[a].type)&&this.legend.dataSeries.push(this.data[a]);this.legend.dockInsidePlotArea?d.push(this.legend):this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)B.setLayoutAndRender(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace());else if("none"===
+this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(a=0;a<d.length;a++)d[a].render();var c=[];if(this.animatedRender){var f=ga(this.width,this.height);f.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}for(a=0;a<this.plotInfo.plotTypes.length;a++)for(var d=this.plotInfo.plotTypes[a],g=0;g<d.plotUnits.length;g++){var h=d.plotUnits[g],l=null;h.targetCanvas=null;this.animatedRender&&(h.targetCanvas=ga(this.width,this.height),h.targetCanvasCtx=h.targetCanvas.getContext("2d"));
+"line"===h.type?l=this.renderLine(h):"stepLine"===h.type?l=this.renderStepLine(h):"spline"===h.type?l=this.renderSpline(h):"column"===h.type?l=this.renderColumn(h):"bar"===h.type?l=this.renderBar(h):"area"===h.type?l=this.renderArea(h):"stepArea"===h.type?l=this.renderStepArea(h):"splineArea"===h.type?l=this.renderSplineArea(h):"stackedColumn"===h.type?l=this.renderStackedColumn(h):"stackedColumn100"===h.type?l=this.renderStackedColumn100(h):"stackedBar"===h.type?l=this.renderStackedBar(h):"stackedBar100"===
+h.type?l=this.renderStackedBar100(h):"stackedArea"===h.type?l=this.renderStackedArea(h):"stackedArea100"===h.type?l=this.renderStackedArea100(h):"bubble"===h.type?l=l=this.renderBubble(h):"scatter"===h.type?l=this.renderScatter(h):"pie"===h.type?this.renderPie(h):"doughnut"===h.type?this.renderPie(h):"candlestick"===h.type?l=this.renderCandlestick(h):"ohlc"===h.type?l=this.renderCandlestick(h):"rangeColumn"===h.type?l=this.renderRangeColumn(h):"rangeBar"===h.type?l=this.renderRangeBar(h):"rangeArea"===
+h.type?l=this.renderRangeArea(h):"rangeSplineArea"===h.type&&(l=this.renderRangeSplineArea(h));for(b=0;b<h.dataSeriesIndexes.length;b++)this._dataInRenderedOrder.push(this.data[h.dataSeriesIndexes[b]]);this.animatedRender&&l&&c.push(l)}this.animatedRender&&0<this._indexLabels.length&&(a=ga(this.width,this.height).getContext("2d"),c.push(this.renderIndexLabels(a)));var k=this;0<c.length?(k.disableToolTip=!0,k._animator.animate(200,k.animationDuration,function(a){k.ctx.clearRect(0,0,k.width,k.height);
+k.ctx.drawImage(f,0,0,Math.floor(k.width*Q),Math.floor(k.height*Q),0,0,k.width,k.height);for(var b=0;b<c.length;b++)l=c[b],1>a&&"undefined"!==typeof l.startTimePercent?a>=l.startTimePercent&&l.animationCallback(l.easingFunction(a-l.startTimePercent,0,1,1-l.startTimePercent),l):l.animationCallback(l.easingFunction(a,0,1,1),l);k.dispatchEvent("dataAnimationIterationEnd",{chart:k})},function(){c=[];for(var a=0;a<k.plotInfo.plotTypes.length;a++)for(var b=k.plotInfo.plotTypes[a],d=0;d<b.plotUnits.length;d++)b.plotUnits[d].targetCanvas=
+null;f=null;k.disableToolTip=!1})):(0<k._indexLabels.length&&k.renderIndexLabels(),k.dispatchEvent("dataAnimationIterationEnd",{chart:k}));this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||Y(this._zoomButton,this._resetButton);this.toolTip._updateToolTip();this.renderCount++};A.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,
+mousemove:this._plotAreaMouseMove,cursor:this.zoomEnabled?"col-resize":"move",cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};A.prototype.categoriseDataSeries=function(){for(var a="",d=0;d<this.data.length;d++)if(a=this.data[d],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=A._supportedChartTypes.indexOf(a.type)){for(var b=null,c=!1,f=null,g=!1,h=0;h<this.plotInfo.plotTypes.length;h++)if(this.plotInfo.plotTypes[h].type===a.type){c=!0;b=this.plotInfo.plotTypes[h];
+break}c||(b={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(b));for(h=0;h<b.plotUnits.length;h++)if(b.plotUnits[h].axisYType===a.axisYType&&b.plotUnits[h].axisXType===a.axisXType&&b.plotUnits[h].axisYIndex===a.axisYIndex&&b.plotUnits[h].axisXIndex===a.axisXIndex){g=!0;f=b.plotUnits[h];break}g||(f={type:a.type,previousDataSeriesCount:0,index:b.plotUnits.length,plotType:b,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===
+a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[]},b.plotUnits.push(f));b.totalDataSeries++;f.dataSeriesIndexes.push(d);a.plotUnit=f}for(d=0;d<this.plotInfo.plotTypes.length;d++)for(b=
+this.plotInfo.plotTypes[d],h=a=0;h<b.plotUnits.length;h++)b.plotUnits[h].previousDataSeriesCount=a,a+=b.plotUnits[h].dataSeriesIndexes.length};A.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var d=this.data[a];if(d.dataPoints)for(var b=d.dataPoints.length,c=0;c<b;c++)d.dataPointIds[c]=++this._eventManager.lastObjectId}};A.prototype._processData=function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var d=
+this.plotInfo.plotTypes[a],b=0;b<d.plotUnits.length;b++){var c=d.plotUnits[b];"line"===c.type||"stepLine"===c.type||"spline"===c.type||"column"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"bar"===c.type||"bubble"===c.type||"scatter"===c.type?this._processMultiseriesPlotUnit(c):"stackedColumn"===c.type||"stackedBar"===c.type||"stackedArea"===c.type?this._processStackedPlotUnit(c):"stackedColumn100"===c.type||"stackedBar100"===c.type||"stackedArea100"===c.type?this._processStacked100PlotUnit(c):
+"candlestick"!==c.type&&"ohlc"!==c.type&&"rangeColumn"!==c.type&&"rangeBar"!==c.type&&"rangeArea"!==c.type&&"rangeSplineArea"!==c.type||this._processMultiYPlotUnit(c)}};A.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var l=this.data[a.dataSeriesIndexes[h]],k=0,m=!1,n=!1,p;if("normal"===l.axisPlacement||"xySwapped"===l.axisPlacement)var e=a.axisX.sessionVariables.newViewportMinimum?
+a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,r=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;
+if(l.dataPoints[k].x&&l.dataPoints[k].x.getTime||"dateTime"===l.xValueType)g=!0;for(k=0;k<l.dataPoints.length;k++){"undefined"===typeof l.dataPoints[k].x&&(l.dataPoints[k].x=k+(a.axisX.logarithmic?1:0));l.dataPoints[k].x.getTime?(g=!0,c=l.dataPoints[k].x.getTime()):c=l.dataPoints[k].x;f=l.dataPoints[k].y;c<b.min&&(b.min=c);c>b.max&&(b.max=c);f<d.min&&(d.min=f);f>d.max&&(d.max=f);if(0<k){if(a.axisX.logarithmic){var q=c/l.dataPoints[k-1].x;1>q&&(q=1/q);b.minDiff>q&&1!==q&&(b.minDiff=q)}else q=c-l.dataPoints[k-
+1].x,0>q&&(q*=-1),b.minDiff>q&&0!==q&&(b.minDiff=q);null!==f&&null!==l.dataPoints[k-1].y&&(a.axisY.logarithmic?(q=f/l.dataPoints[k-1].y,1>q&&(q=1/q),d.minDiff>q&&1!==q&&(d.minDiff=q)):(q=f-l.dataPoints[k-1].y,0>q&&(q*=-1),d.minDiff>q&&0!==q&&(d.minDiff=q)))}if(c<e&&!m)null!==f&&(p=c);else{if(!m&&(m=!0,0<k)){k-=2;continue}if(c>r&&!n)n=!0;else if(c>r&&n)continue;l.dataPoints[k].label&&(a.axisX.labels[c]=l.dataPoints[k].label);c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===
+f?b.viewPortMin===c&&p<c&&(b.viewPortMin=p):(f<d.viewPortMin&&(d.viewPortMin=f),f>d.viewPortMax&&(d.viewPortMax=f))}}this.plotInfo.axisXValueType=l.xValueType=g?"dateTime":"number"}};A.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=[],l=[],k=Infinity,m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,e=!1,r=!1,q;if("normal"===n.axisPlacement||"xySwapped"===
+n.axisPlacement)var s=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,v=this.sessionVariables.axisX.newViewportMaximum?this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?
+this.options.axisX.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)g=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(g=!0,c=n.dataPoints[p].x.getTime()):c=n.dataPoints[p].x;x(n.dataPoints[p].y)?f=0:(f=n.dataPoints[p].y,0===m&&(k=Math.min(f,k)));c<b.min&&(b.min=c);c>b.max&&(b.max=c);if(0<p){if(a.axisX.logarithmic){var w=c/n.dataPoints[p-1].x;1>w&&(w=1/
+w);b.minDiff>w&&1!==w&&(b.minDiff=w)}else w=c-n.dataPoints[p-1].x,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w);null!==f&&null!==n.dataPoints[p-1].y&&(a.axisY.logarithmic?0<f&&(w=f/n.dataPoints[p-1].y,1>w&&(w=1/w),d.minDiff>w&&1!==w&&(d.minDiff=w)):(w=f-n.dataPoints[p-1].y,0>w&&(w*=-1),d.minDiff>w&&0!==w&&(d.minDiff=w)))}if(c<s&&!e)null!==n.dataPoints[p].y&&(q=c);else{if(!e&&(e=!0,0<p)){p-=2;continue}if(c>v&&!r)r=!0;else if(c>v&&r)continue;n.dataPoints[p].label&&(a.axisX.labels[c]=n.dataPoints[p].label);
+c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===n.dataPoints[p].y?b.viewPortMin===c&&q<c&&(b.viewPortMin=q):(a.yTotals[c]=(a.yTotals[c]?a.yTotals[c]:0)+Math.abs(f),0<=f?h[c]=h[c]?h[c]+f:f:l[c]=l[c]?l[c]+f:f)}}this.plotInfo.axisXValueType=n.xValueType=g?"dateTime":"number"}for(p in h)h.hasOwnProperty(p)&&!isNaN(p)&&(a=h[p],a<d.min&&(d.min=Math.min(a,k)),a>d.max&&(d.max=a),p<b.viewPortMin||p>b.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=Math.min(a,k)),a>d.viewPortMax&&
+(d.viewPortMax=a)));for(p in l)l.hasOwnProperty(p)&&!isNaN(p)&&(a=l[p],a<d.min&&(d.min=Math.min(a,k)),a>d.max&&(d.max=a),p<b.viewPortMin||p>b.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=Math.min(a,k)),a>d.viewPortMax&&(d.viewPortMax=a)))}};A.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g=!1,h=!1,l=!1,k=[],m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,
+e=!1,r=!1,q;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var s=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,v=this.sessionVariables.axisX.newViewportMaximum?this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:
+this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)g=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(g=!0,c=n.dataPoints[p].x.getTime()):c=n.dataPoints[p].x;f=x(n.dataPoints[p].y)?null:n.dataPoints[p].y;c<b.min&&(b.min=c);c>b.max&&(b.max=c);if(0<p){if(a.axisX.logarithmic){var w=c/n.dataPoints[p-
+1].x;1>w&&(w=1/w);b.minDiff>w&&1!==w&&(b.minDiff=w)}else w=c-n.dataPoints[p-1].x,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w);x(f)||null===n.dataPoints[p-1].y||(a.axisY.logarithmic?0<f&&(w=f/n.dataPoints[p-1].y,1>w&&(w=1/w),d.minDiff>w&&1!==w&&(d.minDiff=w)):(w=f-n.dataPoints[p-1].y,0>w&&(w*=-1),d.minDiff>w&&0!==w&&(d.minDiff=w)))}if(c<s&&!e)null!==f&&(q=c);else{if(!e&&(e=!0,0<p)){p-=2;continue}if(c>v&&!r)r=!0;else if(c>v&&r)continue;n.dataPoints[p].label&&(a.axisX.labels[c]=n.dataPoints[p].label);
+c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);null===f?b.viewPortMin===c&&q<c&&(b.viewPortMin=q):(a.yTotals[c]=(a.yTotals[c]?a.yTotals[c]:0)+Math.abs(f),0<=f?h=!0:0>f&&(l=!0),k[c]=k[c]?k[c]+Math.abs(f):Math.abs(f))}}this.plotInfo.axisXValueType=n.xValueType=g?"dateTime":"number"}a.axisY.logarithmic?(d.max=x(d.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(d.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),d.min=x(d.viewPortMin)?1:Math.min(d.viewPortMin,
+1)):h&&!l?(d.max=x(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=x(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):h&&l?(d.max=x(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=x(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99)):!h&&l&&(d.max=x(d.viewPortMax)?-1:Math.max(d.viewPortMax,-1),d.min=x(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99));d.viewPortMin=d.min;d.viewPortMax=d.max;a.dataPointYSums=k}};A.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=
+a.axisY.dataInfo,b=a.axisX.dataInfo,c,f,g,h,l=!1,k=0;k<a.dataSeriesIndexes.length;k++){var m=this.data[a.dataSeriesIndexes[k]],n=0,p=!1,e=!1,r,q,s;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var v=this.sessionVariables.axisX.newViewportMinimum?this.sessionVariables.axisX.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,w=this.sessionVariables.axisX.newViewportMaximum?
+this.sessionVariables.axisX.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(m.dataPoints[n].x&&m.dataPoints[n].x.getTime||"dateTime"===m.xValueType)l=!0;for(n=0;n<m.dataPoints.length;n++){"undefined"===typeof m.dataPoints[n].x&&(m.dataPoints[n].x=n+(a.axisX.logarithmic?1:0));m.dataPoints[n].x.getTime?(l=!0,c=m.dataPoints[n].x.getTime()):c=m.dataPoints[n].x;
+if((f=m.dataPoints[n].y)&&f.length){g=Math.min.apply(null,f);h=Math.max.apply(null,f);q=!0;for(var y=0;y<f.length;y++)null===f.k&&(q=!1);q&&(p||(s=r),r=c)}c<b.min&&(b.min=c);c>b.max&&(b.max=c);g<d.min&&(d.min=g);h>d.max&&(d.max=h);0<n&&(a.axisX.logarithmic?(q=c/m.dataPoints[n-1].x,1>q&&(q=1/q),b.minDiff>q&&1!==q&&(b.minDiff=q)):(q=c-m.dataPoints[n-1].x,0>q&&(q*=-1),b.minDiff>q&&0!==q&&(b.minDiff=q)),f&&(null!==f[0]&&m.dataPoints[n-1].y&&null!==m.dataPoints[n-1].y[0])&&(a.axisY.logarithmic?(q=f[0]/
+m.dataPoints[n-1].y[0],1>q&&(q=1/q),d.minDiff>q&&1!==q&&(d.minDiff=q)):(q=f[0]-m.dataPoints[n-1].y[0],0>q&&(q*=-1),d.minDiff>q&&0!==q&&(d.minDiff=q))));if(!(c<v)||p){if(!p&&(p=!0,0<n)){n-=2;r=s;continue}if(c>w&&!e)e=!0;else if(c>w&&e)continue;m.dataPoints[n].label&&(a.axisX.labels[c]=m.dataPoints[n].label);c<b.viewPortMin&&(b.viewPortMin=c);c>b.viewPortMax&&(b.viewPortMax=c);if(b.viewPortMin===c&&f)for(y=0;y<f.length;y++)if(null===f[y]&&r<c){b.viewPortMin=r;break}null===f?b.viewPortMin===c&&r<c&&
+(b.viewPortMin=r):(g<d.viewPortMin&&(d.viewPortMin=g),h>d.viewPortMax&&(d.viewPortMax=h))}}this.plotInfo.axisXValueType=m.xValueType=l?"dateTime":"number"}};A.prototype.getDataPointAtXY=function(a,d,b){b=b||!1;for(var c=[],f=this._dataInRenderedOrder.length-1;0<=f;f--){var g=null;(g=this._dataInRenderedOrder[f].getDataPointAtXY(a,d,b))&&c.push(g)}a=null;d=!1;for(b=0;b<c.length;b++)if("line"===c[b].dataSeries.type||"stepLine"===c[b].dataSeries.type||"area"===c[b].dataSeries.type||"stepArea"===c[b].dataSeries.type)if(f=
+L("markerSize",c[b].dataPoint,c[b].dataSeries)||8,c[b].distance<=f/2){d=!0;break}for(b=0;b<c.length;b++)d&&"line"!==c[b].dataSeries.type&&"stepLine"!==c[b].dataSeries.type&&"area"!==c[b].dataSeries.type&&"stepArea"!==c[b].dataSeries.type||(a?c[b].distance<=a.distance&&(a=c[b]):a=c[b]);return a};A.prototype.getObjectAtXY=function(a,d,b){var c=null;if(b=this.getDataPointAtXY(a,d,b||!1))c=b.dataSeries.dataPointIds[b.dataPointIndex];else if(u)c=La(a,d,this._eventManager.ghostCtx);else for(b=0;b<this.legend.items.length;b++){var f=
+this.legend.items[b];a>=f.x1&&(a<=f.x2&&d>=f.y1&&d<=f.y2)&&(c=f.id)}return c};A.prototype.getAutoFontSize=function(a,d,b){a/=400;return Math.max(10,Math.round(Math.min(this.width,this.height)*a))};A.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};A.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))};A.prototype.attachEvent=
+function(a){this._events.push(a)};A.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var d=[],b=a.changedTouches,c=b?b[0]:a,f=null;switch(a.type){case "touchstart":case "MSPointerDown":d=["mousemove","mousedown"];this._lastTouchData=xa(c);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":d=["mousemove"];break;case "touchend":case "MSPointerUp":d="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType?["mouseup",
+"click"]:["mouseup"];break;default:return}if(!(b&&1<b.length)){f=xa(c);f.time=new Date;try{var g=f.y-this._lastTouchData.y,h=f.time-this._lastTouchData.time;if(15<Math.abs(g)&&(this._lastTouchData.scroll||200>h)){this._lastTouchData.scroll=!0;var l=window.parent||window;l&&l.scrollBy&&l.scrollBy(0,-g)}}catch(k){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(b=0;b<d.length;b++)f=d[b],g=document.createEvent("MouseEvent"),
+g.initMouseEvent(f,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),c.target.dispatchEvent(g),a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault()}}};A.prototype._dispatchRangeEvent=function(a,d){var b={chart:this};b.type=a;b.trigger=d;var c=[];this.axisX&&0<this.axisX.length&&c.push("axisX");this.axisX2&&0<this.axisX2.length&&c.push("axisX2");this.axisY&&0<this.axisY.length&&c.push("axisY");this.axisY2&&0<this.axisY2.length&&c.push("axisY2");
+for(var f=0;f<c.length;f++)if(x(b[c[f]])&&(b[c[f]]=[]),"axisY"===c[f])for(var g=0;g<this.axisY.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisY2"===c[f])for(g=0;g<this.axisY2.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisX"===c[f])for(g=0;g<this.axisX.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,
+viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});else if("axisX2"===c[f])for(g=0;g<this.axisX2.length;g++)b[c[f]].push({viewportMinimum:this[c[f]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[c[f]][g].sessionVariables.newViewportMaximum});this.dispatchEvent(a,b,this)};A.prototype._mouseEventHandler=function(a){"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var d=xa(a),b=a.type,c,f;a.which?f=3==a.which:a.button&&(f=2==a.button);A.capturedEventParam&&
+(c=A.capturedEventParam,"mouseup"===b&&(A.capturedEventParam=null,c.chart.overlaidCanvas.releaseCapture?c.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",c.chart._mouseEventHandler,!1)),c.hasOwnProperty(b)&&("mouseup"!==b||c.chart.overlaidCanvas.releaseCapture?a.target===c.chart.overlaidCanvas&&c[b].call(c.context,d.x,d.y):a.target!==c.chart.overlaidCanvas&&(c.chart.isDrag=!1)));if(this.interactivityEnabled)if(this._ignoreNextEvent)this._ignoreNextEvent=
+!1;else if(a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault(),!f){if(!A.capturedEventParam&&this._events){for(var g=0;g<this._events.length;g++)if(this._events[g].hasOwnProperty(b))if(c=this._events[g],f=c.bounds,d.x>=f.x1&&d.x<=f.x2&&d.y>=f.y1&&d.y<=f.y2){c[b].call(c.context,d.x,d.y);"mousedown"===b&&!0===c.capture?(A.capturedEventParam=c,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,
+!1)):"mouseup"===b&&(c.chart.overlaidCanvas.releaseCapture?c.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else c=null;a.target.style.cursor=c&&c.cursor?c.cursor:this._defaultCursor}b=this.plotArea;if(d.x<b.x1||d.x>b.x2||d.y<b.y1||d.y>b.y2)this.toolTip&&this.toolTip.enabled?this.toolTip.hide():this.resetOverlayedCanvas();this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};A.prototype._plotAreaMouseDown=
+function(a,d){this.isDrag=!0;this.dragStartPoint={x:a,y:d}};A.prototype._plotAreaMouseUp=function(a,d){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var b=d-this.dragStartPoint.y,c=a-this.dragStartPoint.x,f=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var l=g,g=f,f=l;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(f=g=0;f<this._axes.length;f++)b=
+this._axes[f],b.logarithmic?b.viewportMinimum<b.minimum?(g=b.minimum/b.viewportMinimum,b.sessionVariables.newViewportMinimum=b.viewportMinimum*g,b.sessionVariables.newViewportMaximum=b.viewportMaximum*g,h=!0):b.viewportMaximum>b.maximum&&(g=b.viewportMaximum/b.maximum,b.sessionVariables.newViewportMinimum=b.viewportMinimum/g,b.sessionVariables.newViewportMaximum=b.viewportMaximum/g,h=!0):b.viewportMinimum<b.minimum?(g=b.minimum-b.viewportMinimum,b.sessionVariables.newViewportMinimum=b.viewportMinimum+
+g,b.sessionVariables.newViewportMaximum=b.viewportMaximum+g,h=!0):b.viewportMaximum>b.maximum&&(g=b.viewportMaximum-b.maximum,b.sessionVariables.newViewportMinimum=b.viewportMinimum-g,b.sessionVariables.newViewportMaximum=b.viewportMaximum-g,h=!0);else if((!f||2<Math.abs(c))&&(!g||2<Math.abs(b))&&this.zoomEnabled){if(!this.dragStartPoint)return;b=f?this.dragStartPoint.x:this.plotArea.x1;c=g?this.dragStartPoint.y:this.plotArea.y1;f=f?a:this.plotArea.x2;g=g?d:this.plotArea.y2;2<Math.abs(b-f)&&2<Math.abs(c-
+g)&&this._zoomPanToSelectedRegion(b,c,f,g)&&(h=!0)}h&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),h&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(ta(this._zoomButton,this._resetButton),T(this,this._zoomButton,"pan"),T(this,this._resetButton,"reset")))}}this.isDrag=!1};A.prototype._plotAreaMouseMove=function(a,d){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var b=0,c=0,f=b=null,f=
+0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=this;"xySwapped"===this.plotInfo.axisPlacement&&(b=g,g=f,f=b);b=this.dragStartPoint.x-a;c=this.dragStartPoint.y-d;2<Math.abs(b)&&8>Math.abs(b)&&(this.panEnabled||this.zoomEnabled)?this.toolTip.hide():this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,d);if((!f||2<Math.abs(b)||!g||2<Math.abs(c))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)f={x1:f?this.plotArea.x1+b:this.plotArea.x1,y1:g?this.plotArea.y1+c:this.plotArea.y1,
+x2:f?this.plotArea.x2+b:this.plotArea.x2,y2:g?this.plotArea.y2+c:this.plotArea.y2},clearTimeout(h._panTimerId),h._panTimerId=setTimeout(function(b,c,e,f){return function(){h._zoomPanToSelectedRegion(b,c,e,f,!0)&&(h._dispatchRangeEvent("rangeChanging","pan"),h.render(),h._dispatchRangeEvent("rangeChanged","pan"),h.dragStartPoint.x=a,h.dragStartPoint.y=d)}}(f.x1,f.y1,f.x2,f.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();b=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle=
+"#A89896";var c=f?this.dragStartPoint.x:this.plotArea.x1,l=g?this.dragStartPoint.y:this.plotArea.y1,k=f?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,m=g?d-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(c,l,f?a:this.plotArea.x2-this.plotArea.x1,g?d:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(c,
+l,k,m);this.overlaidCanvasCtx.globalAlpha=b}}else this.toolTip.mouseMoveHandler(a,d)};A.prototype._zoomPanToSelectedRegion=function(a,d,b,c,f){a=this.validateRegion(a,d,b,c,f);d=a.axesWithValidRange;b=a.axesRanges;if(a.isValid)for(c=0;c<d.length;c++)f=b[c],d[c].setViewPortRange(f.val1,f.val2);return a.isValid};A.prototype.validateRegion=function(a,d,b,c,f){f=f||!1;for(var g=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),l=!1,k=[],m=[],n=[],p=0;p<this.axisX.length;p++)this.axisX[p]&&
+g&&m.push(this.axisX[p]);for(p=0;p<this.axisX2.length;p++)this.axisX2[p]&&g&&m.push(this.axisX2[p]);for(p=0;p<this.axisY.length;p++)this.axisY[p]&&h&&m.push(this.axisY[p]);for(p=0;p<this.axisY2.length;p++)this.axisY2[p]&&h&&m.push(this.axisY2[p]);for(g=0;g<m.length;g++){var h=m[g],p=h.convertPixelToValue({x:a,y:d}),e=h.convertPixelToValue({x:b,y:c});if(p>e)var r=e,e=p,p=r;if(isFinite(h.dataInfo.minDiff))if(!(h.logarithmic&&e/p<Math.pow(h.dataInfo.minDiff,3)||!h.logarithmic&&Math.abs(e-p)<3*Math.abs(h.dataInfo.minDiff)||
+p<h.minimum||e>h.maximum))k.push(h),n.push({val1:p,val2:e}),l=!0;else if(!f){l=!1;break}}return{isValid:l,axesWithValidRange:k,axesRanges:n}};A.prototype.preparePlotArea=function(){var a=this.plotArea;!u&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var d=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var b=this.axisY[0];a.x1=d.x1<d.x2?d.x1:b.lineCoordinates.x1;
+a.y1=d.y1<b.lineCoordinates.y1?d.y1:b.lineCoordinates.y1;a.x2=d.x2>b.lineCoordinates.x2?d.x2:b.lineCoordinates.x2;a.y2=d.y2>d.y1?d.y2:b.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(b=this.axisY2[0],a.x1=d.x1<d.x2?d.x1:b.lineCoordinates.x1,a.y1=d.y1<b.lineCoordinates.y1?d.y1:b.lineCoordinates.y1,a.x2=d.x2>b.lineCoordinates.x2?d.x2:b.lineCoordinates.x2,a.y2=d.y2>d.y1?d.y2:b.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else d=
+this.layoutManager.getFreeSpace(),a.x1=d.x1,a.x2=d.x2,a.y1=d.y1,a.y2=d.y2,a.width=d.width,a.height=d.height;u||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new ja(a.x1,a.y1,a.x2,a.y2,2)};A.prototype.renderIndexLabels=function(a){var d=a||this.plotArea.ctx,b=this.plotArea,c=0,f=0,g=0,h=0,l=c=h=f=g=0,k=0;for(a=0;a<this._indexLabels.length;a++){var m=this._indexLabels[a],n=m.chartType.toLowerCase(),
+p,e,l=L("indexLabelFontColor",m.dataPoint,m.dataSeries),k=L("indexLabelFontSize",m.dataPoint,m.dataSeries);p=L("indexLabelFontFamily",m.dataPoint,m.dataSeries);e=L("indexLabelFontStyle",m.dataPoint,m.dataSeries);var h=L("indexLabelFontWeight",m.dataPoint,m.dataSeries),r=L("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),f=L("indexLabelMaxWidth",m.dataPoint,m.dataSeries),g=L("indexLabelWrap",m.dataPoint,m.dataSeries),q=L("indexLabelLineDashType",m.dataPoint,m.dataSeries),s=L("indexLabelLineColor",
+m.dataPoint,m.dataSeries),v=x(m.dataPoint.indexLabelLineThickness)?x(m.dataSeries.options.indexLabelLineThickness)?0:m.dataSeries.options.indexLabelLineThickness:m.dataPoint.indexLabelLineThickness,c=0<v?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,w={percent:null,total:null},y=null;if(0<=m.dataSeries.type.indexOf("stacked")||"pie"===m.dataSeries.type||"doughnut"===m.dataSeries.type)w=this.getPercentAndTotal(m.dataSeries,m.dataPoint);if(m.dataSeries.indexLabelFormatter||
+m.dataPoint.indexLabelFormatter)y={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,index:m.indexKeyword,total:w.total,percent:w.percent};var t=m.dataPoint.indexLabelFormatter?m.dataPoint.indexLabelFormatter(y):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(y):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,m.dataPoint,m.dataSeries,
+null,m.indexKeyword):null;if(null!==t&&""!==t){var w=L("indexLabelPlacement",m.dataPoint,m.dataSeries),y=L("indexLabelOrientation",m.dataPoint,m.dataSeries),D=m.direction,Z=m.dataSeries.axisX,aa=m.dataSeries.axisY,z=!1,r=new W(d,{x:0,y:0,maxWidth:f?f:0.5*this.width,maxHeight:g?5*k:1.5*k,angle:"horizontal"===y?0:-90,text:t,padding:0,backgroundColor:r,horizontalAlign:"left",fontSize:k,fontFamily:p,fontWeight:h,fontColor:l,fontStyle:e,textBaseline:"top"});r.measureText();m.dataSeries.indexLabelMaxWidth=
+r.maxWidth;if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.dataPoint.y<aa.viewportMinimum||m.dataPoint.y>aa.viewportMaximum)continue}else if(0<=n.indexOf("column")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.bounds.y1>b.y2||m.bounds.y2<b.y1)continue}else if(0<=n.indexOf("bar")){if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum||m.bounds.x1>
+b.x2||m.bounds.x2<b.x1)continue}else if(m.dataPoint.x<Z.viewportMinimum||m.dataPoint.x>Z.viewportMaximum)continue;f=h=2;"horizontal"===y?(l=r.width,k=r.height):(k=r.width,l=r.height);if("normal"===this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))w="auto",h=4;else if(0<=n.indexOf("stacked"))"auto"===w&&(w="inside");else if("bubble"===n||"scatter"===n)w="inside";p=m.point.x-l/2;"inside"!==w?(f=b.y1,g=b.y2,0<D?(e=m.point.y-k-h-c,e<f&&(e="auto"===w?Math.max(m.point.y,f)+h+c:
+f+h+c,z=e+k>m.point.y)):(e=m.point.y+h+c,e>g-k-h-c&&(e="auto"===w?Math.min(m.point.y,g)-k-h-c:g-k-h-c,z=e<m.point.y))):(f=Math.max(m.bounds.y1,b.y1),g=Math.min(m.bounds.y2,b.y2),c=0<=n.indexOf("range")?0<D?Math.max(m.bounds.y1,b.y1)+k/2+h:Math.min(m.bounds.y2,b.y2)-k/2-h:(Math.max(m.bounds.y1,b.y1)+Math.min(m.bounds.y2,b.y2))/2,0<D?(e=Math.max(m.point.y,c)-k/2,e<f&&("bubble"===n||"scatter"===n)&&(e=Math.max(m.point.y-k-h,b.y1+h))):(e=Math.min(m.point.y,c)-k/2,e>g-k-h&&("bubble"===n||"scatter"===n)&&
+(e=Math.min(m.point.y+h,b.y2-k-h))),e=Math.min(e,g-k))}else 0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("scatter")?(w="auto",f=4):0<=n.indexOf("stacked")?"auto"===w&&(w="inside"):"bubble"===n&&(w="inside"),e=m.point.y-k/2,"inside"!==w?(h=b.x1,g=b.x2,0>D?(p=m.point.x-l-f-c,p<h&&(p="auto"===w?Math.max(m.point.x,h)+f+c:h+f+c,z=p+l>m.point.x)):(p=m.point.x+f+c,p>g-l-f-c&&(p="auto"===w?Math.min(m.point.x,g)-l-f-c:g-l-f-c,z=p<m.point.x))):(h=Math.max(m.bounds.x1,b.x1),Math.min(m.bounds.x2,
+b.x2),c=0<=n.indexOf("range")?0>D?Math.max(m.bounds.x1,b.x1)+l/2+f:Math.min(m.bounds.x2,b.x2)-l/2-f:(Math.max(m.bounds.x1,b.x1)+Math.min(m.bounds.x2,b.x2))/2,p=0>D?Math.max(m.point.x,c)-l/2:Math.min(m.point.x,c)-l/2,p=Math.max(p,h));"vertical"===y&&(e+=k);r.x=p;r.y=e;r.render(!0);v&&("inside"!==w&&(0>n.indexOf("bar")&&m.point.x>b.x1&&m.point.x<b.x2||!z)&&(0>n.indexOf("column")&&m.point.y>b.y1&&m.point.y<b.y2||!z))&&(d.lineWidth=v,d.strokeStyle=s?s:"gray",d.setLineDash&&d.setLineDash(I(q,v)),d.beginPath(),
+d.moveTo(m.point.x,m.point.y),0<=n.indexOf("bar")?d.lineTo(p+(0<m.direction?0:l),e+("horizontal"===y?k:-k)/2):0<=n.indexOf("column")?d.lineTo(p+l/2,e+((0<m.direction?k:-k)+("horizontal"===y?k:-k))/2):d.lineTo(p+l/2,e+((e<m.point.y?k:-k)+("horizontal"===y?k:-k))/2),d.stroke())}}d={source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],r=L("indexLabelBackgroundColor",
+m.dataPoint,m.dataSeries),m.dataSeries.indexLabelBackgroundColor=x(r)?u?"transparent":null:r;return d};A.prototype.renderLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;d.save();var c=this.plotArea;d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();for(var c=[],f=null,g=0;g<a.dataSeriesIndexes.length;g++){var h=a.dataSeriesIndexes[g],l=this.data[h];d.lineWidth=l.lineThickness;var k=l.dataPoints,m="solid";if(d.setLineDash){var n=
+I(l.nullDataLineDashType,l.lineThickness),m=l.lineDashType,p=I(m,l.lineThickness);d.setLineDash(p)}var e=l.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:h};e=G(e);b.strokeStyle=e;b.lineWidth=0<l.lineThickness?Math.max(l.lineThickness,4):0;var e=l._colorSet,r=e=l.lineColor=l.options.lineColor?l.options.lineColor:e[0];d.strokeStyle=e;var q=!0,s=0,v,w;d.beginPath();if(0<k.length){for(var y=!1,s=0;s<k.length;s++)if(v=k[s].x.getTime?k[s].x.getTime():k[s].x,!(v<a.axisX.dataInfo.viewPortMin||
+v>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!y)))if("number"!==typeof k[s].y)0<s&&!(l.connectNullData||y||q)&&(d.stroke(),u&&b.stroke()),y=!0;else{v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(k[s].y);var t=l.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:s,x1:v,y1:w};q||y?(!q&&l.connectNullData?(d.setLineDash&&(l.options.nullDataLineDashType||m===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(d.stroke(),
+m=l.nullDataLineDashType,d.setLineDash(n)),d.lineTo(v,w),u&&b.lineTo(v,w)):(d.beginPath(),d.moveTo(v,w),u&&(b.beginPath(),b.moveTo(v,w))),y=q=!1):(d.lineTo(v,w),u&&b.lineTo(v,w),0==s%500&&(d.stroke(),d.beginPath(),d.moveTo(v,w),u&&(b.stroke(),b.beginPath(),b.moveTo(v,w))));s<k.length-1&&(r!==(k[s].lineColor||e)||m!==(k[s].lineDashType||l.lineDashType))&&(d.stroke(),d.beginPath(),d.moveTo(v,w),r=k[s].lineColor||e,d.strokeStyle=r,d.setLineDash&&(k[s].lineDashType?(m=k[s].lineDashType,d.setLineDash(I(m,
+l.lineThickness))):(m=l.lineDashType,d.setLineDash(p))));if(0<k[s].markerSize||0<l.markerSize){var D=l.getMarkerProperties(s,v,w,d),f=D.color;c.push(D);t=G(t);u&&c.push({x:v,y:w,ctx:b,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(k[s].indexLabel||l.indexLabel||k[s].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:k[s],dataSeries:l,point:{x:v,y:w},direction:0>k[s].y===a.axisY.reversed?1:-1,color:e})}d.stroke();u&&b.stroke()}}P.drawMarkers(c);
+l.markerColor=f;d.restore();d.beginPath();u&&b.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;d.save();var c=this.plotArea;d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();for(var c=[],f=null,g=0;g<a.dataSeriesIndexes.length;g++){var h=a.dataSeriesIndexes[g],
+l=this.data[h];d.lineWidth=l.lineThickness;var k=l.dataPoints,m="solid";if(d.setLineDash){var n=I(l.nullDataLineDashType,l.lineThickness),m=l.lineDashType,p=I(m,l.lineThickness);d.setLineDash(p)}var e=l.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:h};e=G(e);b.strokeStyle=e;b.lineWidth=0<l.lineThickness?Math.max(l.lineThickness,4):0;var e=l._colorSet,r=e=l.lineColor=l.options.lineColor?l.options.lineColor:e[0];d.strokeStyle=e;var q=!0,s=0,v,w;d.beginPath();if(0<k.length){for(var y=
+!1,s=0;s<k.length;s++)if(v=k[s].getTime?k[s].x.getTime():k[s].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!y)))if("number"!==typeof k[s].y)0<s&&!(l.connectNullData||y||q)&&(d.stroke(),u&&b.stroke()),y=!0;else{var t=w;v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(k[s].y);var D=l.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:s,x1:v,y1:w};q||y?(!q&&l.connectNullData?(d.setLineDash&&
+(l.options.nullDataLineDashType||m===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(d.stroke(),m=l.nullDataLineDashType,d.setLineDash(n)),d.lineTo(v,t),d.lineTo(v,w),u&&(b.lineTo(v,t),b.lineTo(v,w))):(d.beginPath(),d.moveTo(v,w),u&&(b.beginPath(),b.moveTo(v,w))),y=q=!1):(d.lineTo(v,t),u&&b.lineTo(v,t),d.lineTo(v,w),u&&b.lineTo(v,w),0==s%500&&(d.stroke(),d.beginPath(),d.moveTo(v,w),u&&(b.stroke(),b.beginPath(),b.moveTo(v,w))));s<k.length-1&&(r!==(k[s].lineColor||e)||m!==(k[s].lineDashType||
+l.lineDashType))&&(d.stroke(),d.beginPath(),d.moveTo(v,w),r=k[s].lineColor||e,d.strokeStyle=r,d.setLineDash&&(k[s].lineDashType?(m=k[s].lineDashType,d.setLineDash(I(m,l.lineThickness))):(m=l.lineDashType,d.setLineDash(p))));if(0<k[s].markerSize||0<l.markerSize)t=l.getMarkerProperties(s,v,w,d),f=t.color,c.push(t),D=G(D),u&&c.push({x:v,y:w,ctx:b,type:t.type,size:t.size,color:D,borderColor:D,borderThickness:t.borderThickness});(k[s].indexLabel||l.indexLabel||k[s].indexLabelFormatter||l.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stepLine",dataPoint:k[s],dataSeries:l,point:{x:v,y:w},direction:0>k[s].y===a.axisY.reversed?1:-1,color:e})}d.stroke();u&&b.stroke()}}P.drawMarkers(c);l.markerColor=f;d.restore();d.beginPath();u&&b.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderSpline=function(a){function d(a){a=ua(a,2);if(0<a.length){b.beginPath();u&&c.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&
+(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);u&&c.moveTo(a[0].x,a[0].y);for(var d=0;d<a.length-3;d+=3)if(b.bezierCurveTo(a[d+1].x,a[d+1].y,a[d+2].x,a[d+2].y,a[d+3].x,a[d+3].y),u&&c.bezierCurveTo(a[d+1].x,a[d+1].y,a[d+2].x,a[d+2].y,a[d+3].x,a[d+3].y),0<d&&0===d%3E3||a[d+3].newStrokeStyle||a[d+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[d+3].x,a[d+3].y),a[d+3].newStrokeStyle&&(b.strokeStyle=a[d+3].newStrokeStyle),a[d+3].newLineDashArray&&
+b.setLineDash(a[d+3].newLineDashArray),u&&(c.stroke(),c.beginPath(),c.moveTo(a[d+3].x,a[d+3].y));b.stroke();u&&c.stroke()}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var f=this.plotArea;b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();for(var f=[],g=null,h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l];b.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(b.setLineDash){var p=
+I(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,e=I(n,k.lineThickness);b.setLineDash(e)}var r=k.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:l};r=G(r);c.strokeStyle=r;c.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var r=k._colorSet,q=r=k.lineColor=k.options.lineColor?k.options.lineColor:r[0];b.strokeStyle=r;var s=0,v,w,y=[];b.beginPath();if(0<m.length)for(w=!1,s=0;s<m.length;s++)if(v=m[s].getTime?m[s].x.getTime():m[s].x,!(v<a.axisX.dataInfo.viewPortMin||
+v>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!w)))if("number"!==typeof m[s].y)0<s&&!w&&(k.connectNullData?b.setLineDash&&(0<y.length&&(k.options.nullDataLineDashType||!m[s-1].lineDashType))&&(y[y.length-1].newLineDashArray=p,n=k.nullDataLineDashType):(d(y),y=[])),w=!0;else{v=a.axisX.convertValueToPixel(v);w=a.axisY.convertValueToPixel(m[s].y);var t=k.dataPointIds[s];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:v,y1:w};y[y.length]={x:v,
+y:w};s<m.length-1&&(q!==(m[s].lineColor||r)||n!==(m[s].lineDashType||k.lineDashType))&&(q=m[s].lineColor||r,y[y.length-1].newStrokeStyle=q,b.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,y[y.length-1].newLineDashArray=I(n,k.lineThickness)):(n=k.lineDashType,y[y.length-1].newLineDashArray=e)));if(0<m[s].markerSize||0<k.markerSize){var D=k.getMarkerProperties(s,v,w,b),g=D.color;f.push(D);t=G(t);u&&f.push({x:v,y:w,ctx:c,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(m[s].indexLabel||
+k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:m[s],dataSeries:k,point:{x:v,y:w},direction:0>m[s].y===a.axisY.reversed?1:-1,color:r});w=!1}d(y)}P.drawMarkers(f);k.markerColor=g;b.restore();b.beginPath();u&&c.beginPath();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};var N=function(a,d,b,c,f,g,h,l,k,m,n,p,e){"undefined"===typeof e&&(e=1);h=h||0;l=l||"black";
+var r=15<c-d&&15<f-b?8:0.35*Math.min(c-d,f-b);a.beginPath();a.moveTo(d,b);a.save();a.fillStyle=g;a.globalAlpha=e;a.fillRect(d,b,c-d,f-b);a.globalAlpha=1;0<h&&(e=0===h%2?0:0.5,a.beginPath(),a.lineWidth=h,a.strokeStyle=l,a.moveTo(d,b),a.rect(d-e,b-e,c-d+2*e,f-b+2*e),a.stroke());a.restore();!0===k&&(a.save(),a.beginPath(),a.moveTo(d,b),a.lineTo(d+r,b+r),a.lineTo(c-r,b+r),a.lineTo(c,b),a.closePath(),h=a.createLinearGradient((c+d)/2,b+r,(c+d)/2,b),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, .4)"),
+a.fillStyle=h,a.fill(),a.restore());!0===m&&(a.save(),a.beginPath(),a.moveTo(d,f),a.lineTo(d+r,f-r),a.lineTo(c-r,f-r),a.lineTo(c,f),a.closePath(),h=a.createLinearGradient((c+d)/2,f-r,(c+d)/2,f),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, .4)"),a.fillStyle=h,a.fill(),a.restore());!0===n&&(a.save(),a.beginPath(),a.moveTo(d,b),a.lineTo(d+r,b+r),a.lineTo(d+r,f-r),a.lineTo(d,f),a.closePath(),h=a.createLinearGradient(d+r,(f+b)/2,d,(f+b)/2),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),
+a.fillStyle=h,a.fill(),a.restore());!0===p&&(a.save(),a.beginPath(),a.moveTo(c,b),a.lineTo(c-r,b+r),a.lineTo(c-r,f-r),a.lineTo(c,f),h=a.createLinearGradient(c-r,(f+b)/2,c,(f+b)/2),h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),a.fillStyle=h,h.addColorStop(0,g),h.addColorStop(1,"rgba(255, 255, 255, 0.1)"),a.fillStyle=h,a.fill(),a.closePath(),a.restore())};A.prototype.renderColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,
+c=this.plotArea,f=0,g,h,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.dataPointMinWidth=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,m=this.dataPointMaxWidth=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth=
+this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>m&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<f)&&(m=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,
+c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(c=0;c<a.dataSeriesIndexes.length;c++){var m=a.dataSeriesIndexes[c],p=this.data[m],e=p.dataPoints;if(0<e.length)for(var r=5<n&&p.bevelEnabled?!0:!1,f=0;f<e.length;f++)if(e[f].getTime?l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof e[f].y){g=a.axisX.convertValueToPixel(l);h=
+a.axisY.convertValueToPixel(e[f].y);g=a.axisX.reversed?g+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+c)*n<<0:g-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+c)*n<<0;var q=a.axisX.reversed?g-n<<0:g+n<<0,s;0<=e[f].y?s=k:(s=h,h=k);h>s&&(b=h,h=s,s=b);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,g,h,q,s,b,0,null,r&&0<=e[f].y,0>e[f].y&&r,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,
+x1:g,y1:h,x2:q,y2:s};b=G(b);u&&N(this._eventManager.ghostCtx,g,h,q,s,b,0,null,!1,!1,!1,!1);(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:e[f],dataSeries:p,point:{x:g+(q-g)/2,y:0>e[f].y===a.axisY.reversed?h:s},direction:0>e[f].y===a.axisY.reversed?1:-1,bounds:{x1:g,y1:Math.min(h,s),x2:q,y2:Math.max(h,s)},color:b})}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(k,a.axisY.bounds.y2);return{source:d,
+dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:
+this.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:
+-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():
+q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic)h[b]=q[l].y+(h[b]?h[b]:0),0<h[b]&&(k=a.axisY.convertValueToPixel(h[b]),y=f[b]?f[b]:m,f[b]=k);else if(k=a.axisY.convertValueToPixel(q[l].y),0<=q[l].y){var t=f[b]?f[b]:0;k-=t;y=m-t;f[b]=t+(y-k)}else t=g[b]?g[b]:0,y=k+t,k=m+t,g[b]=t+(y-k);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];
+N(d,v,k,w,y,b,0,null,s&&0<=q[l].y,0>q[l].y&&s,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:k,x2:w,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,k,w,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:q[l],dataSeries:r,point:{x:c,y:0<=q[l].y?k:y},direction:0>q[l].y===a.axisY.reversed?1:
+-1,bounds:{x1:v,y1:Math.min(k,y),x2:w,y2:Math.max(k,y)},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(m,a.axisY.bounds.y2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedColumn100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?
+a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
+l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=
+a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length)for(var s=5<p&&r.bevelEnabled?!0:!1,l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){c=a.axisX.convertValueToPixel(b);k=0!==a.dataPointYSums[b]?100*(q[l].y/a.dataPointYSums[b]):0;var v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic){h[b]=k+(h[b]?h[b]:0);if(0>=h[b])continue;k=a.axisY.convertValueToPixel(h[b]);
+y=f[b]?f[b]:m;f[b]=k}else if(k=a.axisY.convertValueToPixel(k),0<=q[l].y){var t=f[b]?f[b]:0;k-=t;y=m-t;f[b]=t+(y-k)}else t=g[b]?g[b]:0,y=k+t,k=m+t,g[b]=t+(y-k);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];N(d,v,k,w,y,b,0,null,s&&0<=q[l].y,0>q[l].y&&s,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:k,x2:w,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,k,w,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||
+r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:q[l],dataSeries:r,point:{x:c,y:0<=q[l].y?k:y},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:v,y1:Math.min(k,y),x2:w,y2:Math.max(k,y)},color:b})}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.min(m,a.axisY.bounds.y2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.yScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderBar=
+function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,l,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,m=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||
+(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>m&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<f)&&(m=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();
+d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(c=0;c<a.dataSeriesIndexes.length;c++){var m=a.dataSeriesIndexes[c],p=this.data[m],e=p.dataPoints;if(0<e.length){var r=5<n&&p.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(f=0;f<e.length;f++)if(e[f].getTime?l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===
+typeof e[f].y){h=a.axisX.convertValueToPixel(l);g=a.axisY.convertValueToPixel(e[f].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+c)*n<<0:h-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+c)*n<<0;var q=a.axisX.reversed?h-n<<0:h+n<<0,s;0<=e[f].y?s=k:(s=g,g=k);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,s,h,g,q,b,0,null,r,!1,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:m,
+dataPointIndex:f,x1:s,y1:h,x2:g,y2:q};b=G(b);u&&N(this._eventManager.ghostCtx,s,h,g,q,b,0,null,!1,!1,!1,!1);(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:e[f],dataSeries:p,point:{x:0<=e[f].y?g:s,y:h+(q-h)/2},direction:0>e[f].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,g),y1:h,x2:Math.max(s,g),y2:q},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(k,a.axisX.bounds.x2);return{source:d,
+dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?
+this.dataPointWidth:0.15*this.height<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,
+l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():
+q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,w=v+p<<0,y;if(a.axisY.logarithmic)h[b]=q[l].y+(h[b]?h[b]:0),0<h[b]&&(y=f[b]?f[b]:m,f[b]=k=a.axisY.convertValueToPixel(h[b]));else if(k=a.axisY.convertValueToPixel(q[l].y),0<=q[l].y){var t=f[b]?f[b]:0;y=m+t;k+=t;f[b]=t+(k-y)}else t=g[b]?g[b]:0,y=k-t,k=m-t,g[b]=t+(k-y);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];
+N(d,y,v,k,w,b,0,null,s,!1,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:y,y1:v,x2:k,y2:w};b=G(b);u&&N(this._eventManager.ghostCtx,y,v,k,w,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:q[l],dataSeries:r,point:{x:0<=q[l].y?k:y,y:c},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(y,
+k),y1:v,x2:Math.max(y,k),y2:w},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(m,a.axisX.bounds.x2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderStackedBar100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=[],g=[],h=[],l=0,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:
+0),l=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,n=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&l>n&&(l=Math.min(this.dataPointWidth?
+this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<l)&&(n=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,l));p<l&&(p=l);p>n&&(p=n);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var e=a.dataSeriesIndexes[n],r=this.data[e],
+q=r.dataPoints;if(0<q.length){var s=5<p&&r.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(l=0;l<q.length;l++)if(b=q[l].x.getTime?q[l].x.getTime():q[l].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[l].y){var c=a.axisX.convertValueToPixel(b),v;v=0!==a.dataPointYSums[b]?100*(q[l].y/a.dataPointYSums[b]):0;var w=c-a.plotType.plotUnits.length*p/2+a.index*p<<0,y=w+p<<0;if(a.axisY.logarithmic){h[b]=v+(h[b]?h[b]:0);if(0>=h[b])continue;v=f[b]?f[b]:m;f[b]=k=a.axisY.convertValueToPixel(h[b])}else if(k=
+a.axisY.convertValueToPixel(v),0<=q[l].y){var t=f[b]?f[b]:0;v=m+t;k+=t;f[b]=t+(k-v)}else t=g[b]?g[b]:0,v=k-t,k=m-t,g[b]=t+(k-v);b=q[l].color?q[l].color:r._colorSet[l%r._colorSet.length];N(d,v,w,k,y,b,0,null,s,!1,!1,!1,r.fillOpacity);b=r.dataPointIds[l];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:e,dataPointIndex:l,x1:v,y1:w,x2:k,y2:y};b=G(b);u&&N(this._eventManager.ghostCtx,v,w,k,y,b,0,null,!1,!1,!1,!1);(q[l].indexLabel||r.indexLabel||q[l].indexLabelFormatter||r.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stackedBar100",dataPoint:q[l],dataSeries:r,point:{x:0<=q[l].y?k:v,y:c},direction:0>q[l].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,k),y1:w,x2:Math.max(v,k),y2:y},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();a=Math.max(m,a.axisX.bounds.x2);return{source:d,dest:this.plotArea.ctx,animationCallback:F.xScaleAnimation,easingFunction:F.easing.easeOutQuart,animationBase:a}}};A.prototype.renderArea=function(a){function d(){t&&(0<n.lineThickness&&
+b.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?y=w:0>a.axisY.viewportMaximum?y=g.y1:0<a.axisY.viewportMinimum&&(y=f.y2),b.lineTo(q,y),b.lineTo(t.x,y),b.closePath(),b.globalAlpha=n.fillOpacity,b.fill(),b.globalAlpha=1,u&&(c.lineTo(q,y),c.lineTo(t.x,y),c.closePath(),c.fill()),b.beginPath(),b.moveTo(q,s),c.beginPath(),c.moveTo(q,s),t={x:q,y:s})}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,
+g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=!0,r=0,q,s,v,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
+y,t=null;if(0<p.length){var D=n._colorSet[r%n._colorSet.length],x=n.lineColor=n.options.lineColor||D,aa=x;b.fillStyle=D;b.strokeStyle=x;b.lineWidth=n.lineThickness;var z="solid";if(b.setLineDash){var A=I(n.nullDataLineDashType,n.lineThickness),z=n.lineDashType,R=I(z,n.lineThickness);b.setLineDash(R)}for(var J=!0;r<p.length;r++)if(v=p[r].x.getTime?p[r].x.getTime():p[r].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!J)))if("number"!==typeof p[r].y)n.connectNullData||
+(J||e)||d(),J=!0;else{q=a.axisX.convertValueToPixel(v);s=a.axisY.convertValueToPixel(p[r].y);e||J?(!e&&n.connectNullData?(b.setLineDash&&(n.options.nullDataLineDashType||z===n.lineDashType&&n.lineDashType!==n.nullDataLineDashType)&&(b.stroke(),z=n.nullDataLineDashType,b.setLineDash(A)),b.lineTo(q,s),u&&c.lineTo(q,s)):(b.beginPath(),b.moveTo(q,s),u&&(c.beginPath(),c.moveTo(q,s)),t={x:q,y:s}),J=e=!1):(b.lineTo(q,s),u&&c.lineTo(q,s),0==r%250&&d());r<p.length-1&&(aa!==(p[r].lineColor||x)||z!==(p[r].lineDashType||
+n.lineDashType))&&(d(),aa=p[r].lineColor||x,b.strokeStyle=aa,b.setLineDash&&(p[r].lineDashType?(z=p[r].lineDashType,b.setLineDash(I(z,n.lineThickness))):(z=n.lineDashType,b.setLineDash(R))));var H=n.dataPointIds[r];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:q,y1:s};0!==p[r].markerSize&&(0<p[r].markerSize||0<n.markerSize)&&(v=n.getMarkerProperties(r,q,s,b),l=v.color,h.push(v),H=G(H),u&&h.push({x:q,y:s,ctx:c,type:v.type,size:v.size,color:H,borderColor:H,
+borderThickness:v.borderThickness}));(p[r].indexLabel||n.indexLabel||p[r].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:p[r],dataSeries:n,point:{x:q,y:s},direction:0>p[r].y===a.axisY.reversed?1:-1,color:D})}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderSplineArea=
+function(a){function d(){var d=ua(y,2);if(0<d.length){if(0<n.lineThickness){b.beginPath();b.moveTo(d[0].x,d[0].y);d[0].newStrokeStyle&&(b.strokeStyle=d[0].newStrokeStyle);d[0].newLineDashArray&&b.setLineDash(d[0].newLineDashArray);for(var e=0;e<d.length-3;e+=3)if(b.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),u&&c.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),d[e+3].newStrokeStyle||d[e+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(d[e+3].x,d[e+
+3].y),d[e+3].newStrokeStyle&&(b.strokeStyle=d[e+3].newStrokeStyle),d[e+3].newLineDashArray&&b.setLineDash(d[e+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(d[0].x,d[0].y);u&&(c.beginPath(),c.moveTo(d[0].x,d[0].y));for(e=0;e<d.length-3;e+=3)b.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y),u&&c.bezierCurveTo(d[e+1].x,d[e+1].y,d[e+2].x,d[e+2].y,d[e+3].x,d[e+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?v=s:0>a.axisY.viewportMaximum?v=
+g.y1:0<a.axisY.viewportMinimum&&(v=f.y2);w={x:d[0].x,y:d[0].y};b.lineTo(d[d.length-1].x,v);b.lineTo(w.x,v);b.closePath();b.globalAlpha=n.fillOpacity;b.fill();b.globalAlpha=1;u&&(c.lineTo(d[d.length-1].x,v),c.lineTo(w.x,v),c.closePath(),c.fill())}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,
+k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=0,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v,w=null,y=[];if(0<p.length){var t=n._colorSet[e%n._colorSet.length],D=n.lineColor=n.options.lineColor||t,x=D;b.fillStyle=
+t;b.strokeStyle=D;b.lineWidth=n.lineThickness;var z="solid";if(b.setLineDash){var A=I(n.nullDataLineDashType,n.lineThickness),z=n.lineDashType,B=I(z,n.lineThickness);b.setLineDash(B)}for(q=!1;e<p.length;e++)if(r=p[e].x.getTime?p[e].x.getTime():p[e].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!q)))if("number"!==typeof p[e].y)0<e&&!q&&(n.connectNullData?b.setLineDash&&(0<y.length&&(n.options.nullDataLineDashType||!p[e-1].lineDashType))&&(y[y.length-1].newLineDashArray=
+A,z=n.nullDataLineDashType):(d(),y=[])),q=!0;else{r=a.axisX.convertValueToPixel(r);q=a.axisY.convertValueToPixel(p[e].y);var R=n.dataPointIds[e];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:e,x1:r,y1:q};y[y.length]={x:r,y:q};e<p.length-1&&(x!==(p[e].lineColor||D)||z!==(p[e].lineDashType||n.lineDashType))&&(x=p[e].lineColor||D,y[y.length-1].newStrokeStyle=x,b.setLineDash&&(p[e].lineDashType?(z=p[e].lineDashType,y[y.length-1].newLineDashArray=I(z,n.lineThickness)):
+(z=n.lineDashType,y[y.length-1].newLineDashArray=B)));if(0!==p[e].markerSize&&(0<p[e].markerSize||0<n.markerSize)){var J=n.getMarkerProperties(e,r,q,b),l=J.color;h.push(J);R=G(R);u&&h.push({x:r,y:q,ctx:c,type:J.type,size:J.size,color:R,borderColor:R,borderThickness:J.borderThickness})}(p[e].indexLabel||n.indexLabel||p[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[e],dataSeries:n,point:{x:r,y:q},direction:0>p[e].y===a.axisY.reversed?1:-1,
+color:t});q=!1}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStepArea=function(a){function d(){t&&(0<n.lineThickness&&b.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?y=w:0>a.axisY.viewportMaximum?y=g.y1:0<a.axisY.viewportMinimum&&(y=f.y2),b.lineTo(q,y),b.lineTo(t.x,y),b.closePath(),
+b.globalAlpha=n.fillOpacity,b.fill(),b.globalAlpha=1,u&&(c.lineTo(q,y),c.lineTo(t.x,y),c.closePath(),c.fill()),b.beginPath(),b.moveTo(q,s),c.beginPath(),c.moveTo(q,s),t={x:q,y:s})}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=a.axisX.lineCoordinates,g=a.axisY.lineCoordinates,h=[],l=null,k=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();u&&(c.beginPath(),c.rect(k.x1,k.y1,k.width,k.height),
+c.clip());for(k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=G(h);c.fillStyle=h;var h=[],e=!0,r=0,q,s,v,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),y,t=null,D=!1;if(0<p.length){var x=n._colorSet[r%n._colorSet.length],z=n.lineColor=n.options.lineColor||x,A=z;b.fillStyle=x;b.strokeStyle=z;b.lineWidth=n.lineThickness;var B="solid";if(b.setLineDash){var R=
+I(n.nullDataLineDashType,n.lineThickness),B=n.lineDashType,J=I(B,n.lineThickness);b.setLineDash(J)}for(;r<p.length;r++)if(v=p[r].x.getTime?p[r].x.getTime():p[r].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!D))){var H=s;"number"!==typeof p[r].y?(n.connectNullData||(D||e)||d(),D=!0):(q=a.axisX.convertValueToPixel(v),s=a.axisY.convertValueToPixel(p[r].y),e||D?(!e&&n.connectNullData?(b.setLineDash&&(n.options.nullDataLineDashType||B===n.lineDashType&&n.lineDashType!==
+n.nullDataLineDashType)&&(b.stroke(),B=n.nullDataLineDashType,b.setLineDash(R)),b.lineTo(q,H),b.lineTo(q,s),u&&(c.lineTo(q,H),c.lineTo(q,s))):(b.beginPath(),b.moveTo(q,s),u&&(c.beginPath(),c.moveTo(q,s)),t={x:q,y:s}),D=e=!1):(b.lineTo(q,H),u&&c.lineTo(q,H),b.lineTo(q,s),u&&c.lineTo(q,s),0==r%250&&d()),r<p.length-1&&(A!==(p[r].lineColor||z)||B!==(p[r].lineDashType||n.lineDashType))&&(d(),A=p[r].lineColor||z,b.strokeStyle=A,b.setLineDash&&(p[r].lineDashType?(B=p[r].lineDashType,b.setLineDash(I(B,n.lineThickness))):
+(B=n.lineDashType,b.setLineDash(J)))),H=n.dataPointIds[r],this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:q,y1:s},0!==p[r].markerSize&&(0<p[r].markerSize||0<n.markerSize)&&(v=n.getMarkerProperties(r,q,s,b),l=v.color,h.push(v),H=G(H),u&&h.push({x:q,y:s,ctx:c,type:v.type,size:v.size,color:H,borderColor:H,borderThickness:v.borderThickness})),(p[r].indexLabel||n.indexLabel||p[r].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",
+dataPoint:p[r],dataSeries:n,point:{x:q,y:s},direction:0>p[r].y===a.axisY.reversed?1:-1,color:x}))}d();P.drawMarkers(h);n.markerColor=l}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStackedArea=function(a){function d(){if(!(1>k.length)){for(0<t.lineThickness&&b.stroke();0<k.length;){var a=k.pop();b.lineTo(a.x,a.y);u&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=
+t.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();u&&(v.closePath(),v.fill(),v.beginPath());k=[]}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,f=[],g=null,h=this.plotArea,l=[],k=[],m=[],n=[],p=0,e,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;u&&v.beginPath();b.save();u&&v.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(v.beginPath(),v.rect(h.x1,h.y1,h.width,h.height),
+v.clip());for(var w=[],h=0;h<a.dataSeriesIndexes.length;h++){var y=a.dataSeriesIndexes[h],t=this.data[y],D=t.dataPoints;t.dataPointIndexes=[];for(p=0;p<D.length;p++)y=D[p].x.getTime?D[p].x.getTime():D[p].x,t.dataPointIndexes[y]=p,w[y]||(m.push(y),w[y]=!0);m.sort(ya)}for(h=0;h<a.dataSeriesIndexes.length;h++){y=a.dataSeriesIndexes[h];t=this.data[y];D=t.dataPoints;w=!0;k=[];p=t.id;this._eventManager.objectMap[p]={objectType:"dataSeries",dataSeriesIndex:y};p=G(p);v.fillStyle=p;if(0<m.length){var c=t._colorSet[0],
+x=t.lineColor=t.options.lineColor||c,z=x;b.fillStyle=c;b.strokeStyle=x;b.lineWidth=t.lineThickness;var A="solid";if(b.setLineDash){var B=I(t.nullDataLineDashType,t.lineThickness),A=t.lineDashType,R=I(A,t.lineThickness);b.setLineDash(R)}for(var J=!0,p=0;p<m.length;p++){q=m[p];var H=null,H=0<=t.dataPointIndexes[q]?D[t.dataPointIndexes[q]]:{x:q,y:null};if(!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!t.connectNullData||!J)))if("number"!==typeof H.y)t.connectNullData||(J||w)||d(),
+J=!0;else{e=a.axisX.convertValueToPixel(q);var ea=l[q]?l[q]:0;if(a.axisY.logarithmic){n[q]=H.y+(n[q]?n[q]:0);if(0>=n[q])continue;r=a.axisY.convertValueToPixel(n[q])}else r=a.axisY.convertValueToPixel(H.y),r-=ea;k.push({x:e,y:s-ea});l[q]=s-r;w||J?(!w&&t.connectNullData?(b.setLineDash&&(t.options.nullDataLineDashType||A===t.lineDashType&&t.lineDashType!==t.nullDataLineDashType)&&(b.stroke(),A=t.nullDataLineDashType,b.setLineDash(B)),b.lineTo(e,r),u&&v.lineTo(e,r)):(b.beginPath(),b.moveTo(e,r),u&&(v.beginPath(),
+v.moveTo(e,r))),J=w=!1):(b.lineTo(e,r),u&&v.lineTo(e,r),0==p%250&&(d(),b.moveTo(e,r),u&&v.moveTo(e,r),k.push({x:e,y:s-ea})));p<D.length-1&&(z!==(D[p].lineColor||x)||A!==(D[p].lineDashType||t.lineDashType))&&(d(),b.beginPath(),b.moveTo(e,r),k.push({x:e,y:s-ea}),z=D[p].lineColor||x,b.strokeStyle=z,b.setLineDash&&(D[p].lineDashType?(A=D[p].lineDashType,b.setLineDash(I(A,t.lineThickness))):(A=t.lineDashType,b.setLineDash(R))));if(0<=t.dataPointIndexes[q]){var fa=t.dataPointIds[t.dataPointIndexes[q]];
+this._eventManager.objectMap[fa]={id:fa,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:t.dataPointIndexes[q],x1:e,y1:r}}0<=t.dataPointIndexes[q]&&0!==H.markerSize&&(0<H.markerSize||0<t.markerSize)&&(q=t.getMarkerProperties(t.dataPointIndexes[q],e,r,b),g=q.color,f.push(q),markerColor=G(fa),u&&f.push({x:e,y:r,ctx:v,type:q.type,size:q.size,color:markerColor,borderColor:markerColor,borderThickness:q.borderThickness}));(H.indexLabel||t.indexLabel||H.indexLabelFormatter||t.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stackedArea",dataPoint:H,dataSeries:t,point:{x:e,y:r},direction:0>D[p].y===a.axisY.reversed?1:-1,color:c})}}d();b.moveTo(e,r);u&&v.moveTo(e,r)}delete t.dataPointIndexes;t.markerColor=g}P.drawMarkers(f);b.restore();u&&v.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderStackedArea100=function(a){function d(){for(0<t.lineThickness&&b.stroke();0<k.length;){var a=k.pop();
+b.lineTo(a.x,a.y);u&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=t.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();u&&(v.closePath(),v.fill(),v.beginPath());k=[]}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,f=this.plotArea,g=[],h=null,l=[],k=[],m=[],n=[],p=0,e,r,q,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;b.save();u&&v.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();
+u&&(v.beginPath(),v.rect(f.x1,f.y1,f.width,f.height),v.clip());for(var w=[],f=0;f<a.dataSeriesIndexes.length;f++){var y=a.dataSeriesIndexes[f],t=this.data[y],x=t.dataPoints;t.dataPointIndexes=[];for(p=0;p<x.length;p++)y=x[p].x.getTime?x[p].x.getTime():x[p].x,t.dataPointIndexes[y]=p,w[y]||(m.push(y),w[y]=!0);m.sort(ya)}for(f=0;f<a.dataSeriesIndexes.length;f++){y=a.dataSeriesIndexes[f];t=this.data[y];x=t.dataPoints;w=!0;c=t.id;this._eventManager.objectMap[c]={objectType:"dataSeries",dataSeriesIndex:y};
+c=G(c);v.fillStyle=c;k=[];if(0<m.length){var c=t._colorSet[p%t._colorSet.length],z=t.lineColor=t.options.lineColor||c,A=z;b.fillStyle=c;b.strokeStyle=z;b.lineWidth=t.lineThickness;var B="solid";if(b.setLineDash){var E=I(t.nullDataLineDashType,t.lineThickness),B=t.lineDashType,R=I(B,t.lineThickness);b.setLineDash(R)}for(var J=!0,p=0;p<m.length;p++){q=m[p];var H=null,H=0<=t.dataPointIndexes[q]?x[t.dataPointIndexes[q]]:{x:q,y:null};if(!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&
+(!t.connectNullData||!J)))if("number"!==typeof H.y)t.connectNullData||(J||w)||d(),J=!0;else{var ea;ea=0!==a.dataPointYSums[q]?100*(H.y/a.dataPointYSums[q]):0;e=a.axisX.convertValueToPixel(q);var fa=l[q]?l[q]:0;if(a.axisY.logarithmic){n[q]=ea+(n[q]?n[q]:0);if(0>=n[q])continue;r=a.axisY.convertValueToPixel(n[q])}else r=a.axisY.convertValueToPixel(ea),r-=fa;k.push({x:e,y:s-fa});l[q]=s-r;w||J?(!w&&t.connectNullData?(b.setLineDash&&(t.options.nullDataLineDashType||B===t.lineDashType&&t.lineDashType!==
+t.nullDataLineDashType)&&(b.stroke(),B=t.nullDataLineDashType,b.setLineDash(E)),b.lineTo(e,r),u&&v.lineTo(e,r)):(b.beginPath(),b.moveTo(e,r),u&&(v.beginPath(),v.moveTo(e,r))),J=w=!1):(b.lineTo(e,r),u&&v.lineTo(e,r),0==p%250&&(d(),b.moveTo(e,r),u&&v.moveTo(e,r),k.push({x:e,y:s-fa})));p<x.length-1&&(A!==(x[p].lineColor||z)||B!==(x[p].lineDashType||t.lineDashType))&&(d(),b.beginPath(),b.moveTo(e,r),k.push({x:e,y:s-fa}),A=x[p].lineColor||z,b.strokeStyle=A,b.setLineDash&&(x[p].lineDashType?(B=x[p].lineDashType,
+b.setLineDash(I(B,t.lineThickness))):(B=t.lineDashType,b.setLineDash(R))));if(0<=t.dataPointIndexes[q]){var Fa=t.dataPointIds[t.dataPointIndexes[q]];this._eventManager.objectMap[Fa]={id:Fa,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:t.dataPointIndexes[q],x1:e,y1:r}}0<=t.dataPointIndexes[q]&&0!==H.markerSize&&(0<H.markerSize||0<t.markerSize)&&(q=t.getMarkerProperties(p,e,r,b),h=q.color,g.push(q),markerColor=G(Fa),u&&g.push({x:e,y:r,ctx:v,type:q.type,size:q.size,color:markerColor,borderColor:markerColor,
+borderThickness:q.borderThickness}));(H.indexLabel||t.indexLabel||H.indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:H,dataSeries:t,point:{x:e,y:r},direction:0>x[p].y===a.axisY.reversed?1:-1,color:c})}}d();b.moveTo(e,r);u&&v.moveTo(e,r)}delete t.dataPointIndexes;t.markerColor=h}P.drawMarkers(g);b.restore();u&&v.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};
+A.prototype.renderBubble=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,c=0,f,g;d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(b.x1,b.y1,b.width,b.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var h=-Infinity,l=Infinity,k=0;k<a.dataSeriesIndexes.length;k++)for(var m=a.dataSeriesIndexes[k],n=this.data[m],
+p=n.dataPoints,e=0,c=0;c<p.length;c++)f=p[c].getTime?f=p[c].x.getTime():f=p[c].x,f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax||"undefined"===typeof p[c].z||(e=p[c].z,e>h&&(h=e),e<l&&(l=e));for(var r=25*Math.PI,b=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,r),k=0;k<a.dataSeriesIndexes.length;k++)if(m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,0<p.length)for(d.strokeStyle="#4572A7 ",c=0;c<p.length;c++)if(f=p[c].getTime?f=p[c].x.getTime():f=p[c].x,!(f<a.axisX.dataInfo.viewPortMin||
+f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[c].y){f=a.axisX.convertValueToPixel(f);g=a.axisY.convertValueToPixel(p[c].y);var e=p[c].z,q=2*Math.max(Math.sqrt((h===l?b/2:r+(b-r)/(h-l)*(e-l))/Math.PI)<<0,1),e=n.getMarkerProperties(c,d);e.size=q;d.globalAlpha=n.fillOpacity;P.drawMarker(f,g,d,e.type,e.size,e.color,e.borderColor,e.borderThickness);d.globalAlpha=1;var s=n.dataPointIds[c];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:c,x1:f,y1:g,size:q};
+q=G(s);u&&P.drawMarker(f,g,this._eventManager.ghostCtx,e.type,e.size,q,q,e.borderThickness);(p[c].indexLabel||n.indexLabel||p[c].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:p[c],dataSeries:n,point:{x:f,y:g},direction:1,bounds:{x1:f-e.size/2,y1:g-e.size/2,x2:f+e.size/2,y2:g+e.size/2},color:null})}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,
+animationBase:0}}};A.prototype.renderScatter=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,c=0,f,g;d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(b.x1,b.y1,b.width,b.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l],
+m=k.dataPoints;if(0<m.length){d.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var n=0,p=0,c=0;c<m.length;c++)if(f=m[c].getTime?f=m[c].x.getTime():f=m[c].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof m[c].y){f=a.axisX.convertValueToPixel(f);g=a.axisY.convertValueToPixel(m[c].y);var e=k.getMarkerProperties(c,f,g,d);d.globalAlpha=k.fillOpacity;P.drawMarker(e.x,e.y,e.ctx,e.type,e.size,e.color,e.borderColor,e.borderThickness);d.globalAlpha=
+1;Math.sqrt((n-f)*(n-f)+(p-g)*(p-g))<Math.min(e.size,5)&&m.length>Math.min(this.plotArea.width,this.plotArea.height)||(n=k.dataPointIds[c],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:c,x1:f,y1:g},n=G(n),u&&P.drawMarker(e.x,e.y,this._eventManager.ghostCtx,e.type,e.size,n,n,e.borderThickness),(m[c].indexLabel||k.indexLabel||m[c].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:m[c],dataSeries:k,point:{x:f,
+y:g},direction:1,bounds:{x1:f-e.size/2,y1:g-e.size/2,x2:f+e.size/2,y2:g+e.size/2},color:null}),n=f,p=g)}}}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderCandlestick=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,c=this.plotArea,f=0,g,h,l,k,m,n,f=this.dataPointMinWidth?
+this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.015*this.width;var p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth?this.dataPointWidth:0.7*c.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&
+(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));p<f&&(p=f);p>g&&(p=g);d.save();u&&b.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(b.beginPath(),b.rect(c.x1,c.y1,c.width,c.height),b.clip());for(var e=0;e<a.dataSeriesIndexes.length;e++){var r=a.dataSeriesIndexes[e],q=this.data[r],s=q.dataPoints;if(0<s.length)for(var v=5<p&&q.bevelEnabled?!0:!1,f=0;f<s.length;f++)if(s[f].getTime?n=s[f].x.getTime():n=s[f].x,!(n<a.axisX.dataInfo.viewPortMin||
+n>a.axisX.dataInfo.viewPortMax)&&null!==s[f].y&&s[f].y.length&&"number"===typeof s[f].y[0]&&"number"===typeof s[f].y[1]&&"number"===typeof s[f].y[2]&&"number"===typeof s[f].y[3]){g=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(s[f].y[0]);l=a.axisY.convertValueToPixel(s[f].y[1]);k=a.axisY.convertValueToPixel(s[f].y[2]);m=a.axisY.convertValueToPixel(s[f].y[3]);var w=g-p/2<<0,y=w+p<<0,c=s[f].color?s[f].color:q._colorSet[0],t=Math.round(Math.max(1,0.15*p)),x=0===t%2?0:0.5,z=q.dataPointIds[f];
+this._eventManager.objectMap[z]={id:z,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:f,x1:w,y1:h,x2:y,y2:l,x3:g,y3:k,x4:g,y4:m,borderThickness:t,color:c};d.strokeStyle=c;d.beginPath();d.lineWidth=t;b.lineWidth=Math.max(t,4);"candlestick"===q.type?(d.moveTo(g-x,l),d.lineTo(g-x,Math.min(h,m)),d.stroke(),d.moveTo(g-x,Math.max(h,m)),d.lineTo(g-x,k),d.stroke(),N(d,w,Math.min(h,m),y,Math.max(h,m),s[f].y[0]<=s[f].y[3]?q.risingColor:c,t,c,v,v,!1,!1,q.fillOpacity),u&&(c=G(z),b.strokeStyle=c,b.moveTo(g-
+x,l),b.lineTo(g-x,Math.min(h,m)),b.stroke(),b.moveTo(g-x,Math.max(h,m)),b.lineTo(g-x,k),b.stroke(),N(b,w,Math.min(h,m),y,Math.max(h,m),c,0,null,!1,!1,!1,!1))):"ohlc"===q.type&&(d.moveTo(g-x,l),d.lineTo(g-x,k),d.stroke(),d.beginPath(),d.moveTo(g,h),d.lineTo(w,h),d.stroke(),d.beginPath(),d.moveTo(g,m),d.lineTo(y,m),d.stroke(),u&&(c=G(z),b.strokeStyle=c,b.moveTo(g-x,l),b.lineTo(g-x,k),b.stroke(),b.beginPath(),b.moveTo(g,h),b.lineTo(w,h),b.stroke(),b.beginPath(),b.moveTo(g,m),b.lineTo(y,m),b.stroke()));
+(s[f].indexLabel||q.indexLabel||s[f].indexLabelFormatter||q.indexLabelFormatter)&&this._indexLabels.push({chartType:q.type,dataPoint:s[f],dataSeries:q,point:{x:w+(y-w)/2,y:a.axisY.reversed?k:l},direction:1,bounds:{x1:w,y1:Math.min(l,k),x2:y,y2:Math.max(l,k)},color:c})}}d.restore();u&&b.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderRangeColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;
+if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.03*this.width;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.dataPointWidth?this.dataPointWidth:0.9*(c.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<
+0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?this.dataPointWidth:-Infinity,f));l<f&&(l=f);l>g&&(l=g);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var m=
+a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints;if(0<p.length)for(var e=5<l&&n.bevelEnabled?!0:!1,f=0;f<p.length;f++)if(p[f].getTime?h=p[f].x.getTime():h=p[f].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){b=a.axisX.convertValueToPixel(h);c=a.axisY.convertValueToPixel(p[f].y[0]);g=a.axisY.convertValueToPixel(p[f].y[1]);var r=a.axisX.reversed?b+a.plotType.totalDataSeries*l/2-(a.previousDataSeriesCount+
+k)*l<<0:b-a.plotType.totalDataSeries*l/2+(a.previousDataSeriesCount+k)*l<<0,q=a.axisX.reversed?r-l<<0:r+l<<0,b=p[f].color?p[f].color:n._colorSet[f%n._colorSet.length];if(c>g){var s=c,c=g;g=s}s=n.dataPointIds[f];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:r,y1:c,x2:q,y2:g};N(d,r,c,q,g,b,0,b,e,e,!1,!1,n.fillOpacity);b=G(s);u&&N(this._eventManager.ghostCtx,r,c,q,g,b,0,null,!1,!1,!1,!1);if(p[f].indexLabel||n.indexLabel||p[f].indexLabelFormatter||
+n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:p[f],dataSeries:n,indexKeyword:0,point:{x:r+(q-r)/2,y:p[f].y[1]>=p[f].y[0]?g:c},direction:p[f].y[1]>=p[f].y[0]?-1:1,bounds:{x1:r,y1:Math.min(c,g),x2:q,y2:Math.max(c,g)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:p[f],dataSeries:n,indexKeyword:1,point:{x:r+(q-r)/2,y:p[f].y[1]>=p[f].y[0]?c:g},direction:p[f].y[1]>=p[f].y[0]?1:-1,bounds:{x1:r,y1:Math.min(c,g),x2:q,y2:Math.max(c,g)},color:b})}}d.restore();
+u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,animationBase:0}}};A.prototype.renderRangeBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,c=this.plotArea,f=0,g,h,l,f=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;g=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:
+Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var k=a.axisX.dataInfo.minDiff;isFinite(k)||(k=0.3*Math.abs(a.axisX.range));k=this.dataPointWidth?this.dataPointWidth:0.9*(c.height*(a.axisX.logarithmic?Math.log(k)/Math.log(a.axisX.range):Math.abs(k)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>g&&(f=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<f)&&(g=Math.max(this.dataPointWidth?
+this.dataPointWidth:-Infinity,f));k<f&&(k=f);k>g&&(k=g);d.save();u&&this._eventManager.ghostCtx.save();d.beginPath();d.rect(c.x1,c.y1,c.width,c.height);d.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var m=0;m<a.dataSeriesIndexes.length;m++){var n=a.dataSeriesIndexes[m],p=this.data[n],e=p.dataPoints;if(0<e.length){var r=5<k&&p.bevelEnabled?!0:!1;d.strokeStyle="#4572A7 ";for(f=0;f<e.length;f++)if(e[f].getTime?
+l=e[f].x.getTime():l=e[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&null!==e[f].y&&e[f].y.length&&"number"===typeof e[f].y[0]&&"number"===typeof e[f].y[1]){c=a.axisY.convertValueToPixel(e[f].y[0]);g=a.axisY.convertValueToPixel(e[f].y[1]);h=a.axisX.convertValueToPixel(l);h=a.axisX.reversed?h+a.plotType.totalDataSeries*k/2-(a.previousDataSeriesCount+m)*k<<0:h-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+m)*k<<0;var q=a.axisX.reversed?h-k<<0:h+k<<0;c>g&&(b=c,c=
+g,g=b);b=e[f].color?e[f].color:p._colorSet[f%p._colorSet.length];N(d,c,h,g,q,b,0,null,r,!1,!1,!1,p.fillOpacity);b=p.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:f,x1:c,y1:h,x2:g,y2:q};b=G(b);u&&N(this._eventManager.ghostCtx,c,h,g,q,b,0,null,!1,!1,!1,!1);if(e[f].indexLabel||p.indexLabel||e[f].indexLabelFormatter||p.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:e[f],dataSeries:p,indexKeyword:0,point:{x:e[f].y[1]>=
+e[f].y[0]?c:g,y:h+(q-h)/2},direction:e[f].y[1]>=e[f].y[0]?-1:1,bounds:{x1:Math.min(c,g),y1:h,x2:Math.max(c,g),y2:q},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:e[f],dataSeries:p,indexKeyword:1,point:{x:e[f].y[1]>=e[f].y[0]?g:c,y:h+(q-h)/2},direction:e[f].y[1]>=e[f].y[0]?1:-1,bounds:{x1:Math.min(c,g),y1:h,x2:Math.max(c,g),y2:q},color:b})}}}d.restore();u&&this._eventManager.ghostCtx.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:F.fadeInAnimation,easingFunction:F.easing.easeInQuad,
+animationBase:0}}};A.prototype.renderRangeArea=function(a){function d(){if(w){var a=null;0<m.lineThickness&&b.stroke();for(var d=l.length-1;0<=d;d--)a=l[d],b.lineTo(a.x,a.y),c.lineTo(a.x,a.y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;c.fill();if(0<m.lineThickness){b.beginPath();b.moveTo(a.x,a.y);for(d=0;d<l.length;d++)a=l[d],b.lineTo(a.x,a.y);b.stroke()}b.beginPath();b.moveTo(r,q);c.beginPath();c.moveTo(r,q);w={x:r,y:q};l=[];l.push({x:r,y:s})}}var b=a.targetCanvasCtx||this.plotArea.ctx;
+if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=[],g=null,h=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(c.beginPath(),c.rect(h.x1,h.y1,h.width,h.height),c.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var l=[],k=a.dataSeriesIndexes[h],m=this.data[k],n=m.dataPoints,f=m.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:k};f=G(f);c.fillStyle=f;var f=[],p=!0,e=0,r,q,s,v,w=null;if(0<n.length){var y=
+m._colorSet[e%m._colorSet.length],t=m.lineColor=m.options.lineColor||y,x=t;b.fillStyle=y;b.strokeStyle=t;b.lineWidth=m.lineThickness;var z="solid";if(b.setLineDash){var A=I(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType,B=I(z,m.lineThickness);b.setLineDash(B)}for(var E=!0;e<n.length;e++)if(v=n[e].x.getTime?n[e].x.getTime():n[e].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!E)))if(null!==n[e].y&&n[e].y.length&&"number"===typeof n[e].y[0]&&"number"===
+typeof n[e].y[1]){r=a.axisX.convertValueToPixel(v);q=a.axisY.convertValueToPixel(n[e].y[0]);s=a.axisY.convertValueToPixel(n[e].y[1]);p||E?(m.connectNullData&&!p?(b.setLineDash&&(m.options.nullDataLineDashType||z===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=B,z=m.nullDataLineDashType,b.setLineDash(A)),b.lineTo(r,q),u&&c.lineTo(r,q),l.push({x:r,y:s})):(b.beginPath(),b.moveTo(r,q),w={x:r,y:q},l=[],l.push({x:r,y:s}),u&&(c.beginPath(),c.moveTo(r,q))),E=p=
+!1):(b.lineTo(r,q),l.push({x:r,y:s}),u&&c.lineTo(r,q),0==e%250&&d());v=m.dataPointIds[e];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:e,x1:r,y1:q,y2:s};e<n.length-1&&(x!==(n[e].lineColor||t)||z!==(n[e].lineDashType||m.lineDashType))&&(d(),x=n[e].lineColor||t,l[l.length-1].newStrokeStyle=x,b.strokeStyle=x,b.setLineDash&&(n[e].lineDashType?(z=n[e].lineDashType,l[l.length-1].newLineDashArray=I(z,m.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):
+(z=m.lineDashType,l[l.length-1].newLineDashArray=B,b.setLineDash(B))));if(0!==n[e].markerSize&&(0<n[e].markerSize||0<m.markerSize)){var R=m.getMarkerProperties(e,r,s,b);f.push(R);var J=G(v);u&&f.push({x:r,y:s,ctx:c,type:R.type,size:R.size,color:J,borderColor:J,borderThickness:R.borderThickness});R=m.getMarkerProperties(e,r,q,b);g=R.color;f.push(R);J=G(v);u&&f.push({x:r,y:q,ctx:c,type:R.type,size:R.size,color:J,borderColor:J,borderThickness:R.borderThickness})}if(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||
+m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:n[e],dataSeries:m,indexKeyword:0,point:{x:r,y:q},direction:n[e].y[0]>n[e].y[1]===a.axisY.reversed?-1:1,color:y}),this._indexLabels.push({chartType:"rangeArea",dataPoint:n[e],dataSeries:m,indexKeyword:1,point:{x:r,y:s},direction:n[e].y[0]>n[e].y[1]===a.axisY.reversed?1:-1,color:y})}else E||p||d(),E=!0;d();P.drawMarkers(f);m.markerColor=g}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,
+animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};A.prototype.renderRangeSplineArea=function(a){function d(a,d){var e=ua(q,2);if(0<e.length){if(0<k.lineThickness){b.strokeStyle=d;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var f=0;f<e.length-3;f+=3){if(e[f].newStrokeStyle||e[f].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),e[f].newStrokeStyle&&(b.strokeStyle=e[f].newStrokeStyle),e[f].newLineDashArray&&b.setLineDash(e[f].newLineDashArray);
+b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}b.stroke()}b.beginPath();b.moveTo(e[0].x,e[0].y);u&&(c.beginPath(),c.moveTo(e[0].x,e[0].y));for(f=0;f<e.length-3;f+=3)b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y),u&&c.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y);e=ua(s,2);b.lineTo(s[s.length-1].x,s[s.length-1].y);for(f=e.length-1;2<f;f-=3)b.bezierCurveTo(e[f-1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y),u&&c.bezierCurveTo(e[f-
+1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y);b.closePath();b.globalAlpha=k.fillOpacity;b.fill();u&&(c.closePath(),c.fill());b.globalAlpha=1;if(0<k.lineThickness){b.strokeStyle=d;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var g=f=0;f<e.length-3;f+=3,g++){if(q[g].newStrokeStyle||q[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),q[g].newStrokeStyle&&(b.strokeStyle=q[g].newStrokeStyle),q[g].newLineDashArray&&b.setLineDash(q[g].newLineDashArray);
+b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}b.stroke()}b.beginPath()}}var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,f=[],g=null,h=this.plotArea;b.save();u&&c.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();u&&(c.beginPath(),c.rect(h.x1,h.y1,h.width,h.height),c.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],k=this.data[l],m=k.dataPoints,f=k.id;this._eventManager.objectMap[f]=
+{objectType:"dataSeries",dataSeriesIndex:l};f=G(f);c.fillStyle=f;var f=[],n=0,p,e,r,q=[],s=[];if(0<m.length){var v=k._colorSet[n%k._colorSet.length],w=k.lineColor=k.options.lineColor||v,y=w;b.fillStyle=v;b.lineWidth=k.lineThickness;var t="solid",x;if(b.setLineDash){var z=I(k.nullDataLineDashType,k.lineThickness),t=k.lineDashType;x=I(t,k.lineThickness)}for(e=!1;n<m.length;n++)if(p=m[n].x.getTime?m[n].x.getTime():m[n].x,!(p<a.axisX.dataInfo.viewPortMin||p>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||
+!e)))if(null!==m[n].y&&m[n].y.length&&"number"===typeof m[n].y[0]&&"number"===typeof m[n].y[1]){p=a.axisX.convertValueToPixel(p);e=a.axisY.convertValueToPixel(m[n].y[0]);r=a.axisY.convertValueToPixel(m[n].y[1]);var A=k.dataPointIds[n];this._eventManager.objectMap[A]={id:A,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:n,x1:p,y1:e,y2:r};q[q.length]={x:p,y:e};s[s.length]={x:p,y:r};n<m.length-1&&(y!==(m[n].lineColor||w)||t!==(m[n].lineDashType||k.lineDashType))&&(y=m[n].lineColor||w,q[q.length-
+1].newStrokeStyle=y,b.setLineDash&&(m[n].lineDashType?(t=m[n].lineDashType,q[q.length-1].newLineDashArray=I(t,k.lineThickness)):(t=k.lineDashType,q[q.length-1].newLineDashArray=x)));if(0!==m[n].markerSize&&(0<m[n].markerSize||0<k.markerSize)){var B=k.getMarkerProperties(n,p,e,b),g=B.color;f.push(B);var E=G(A);u&&f.push({x:p,y:e,ctx:c,type:B.type,size:B.size,color:E,borderColor:E,borderThickness:B.borderThickness});B=k.getMarkerProperties(n,p,r,b);f.push(B);E=G(A);u&&f.push({x:p,y:r,ctx:c,type:B.type,
+size:B.size,color:E,borderColor:E,borderThickness:B.borderThickness})}if(m[n].indexLabel||k.indexLabel||m[n].indexLabelFormatter||k.indexLabelFormatter)this._indexLabels.push({chartType:"splineArea",dataPoint:m[n],dataSeries:k,indexKeyword:0,point:{x:p,y:e},direction:m[n].y[0]<=m[n].y[1]?-1:1,color:v}),this._indexLabels.push({chartType:"splineArea",dataPoint:m[n],dataSeries:k,indexKeyword:1,point:{x:p,y:r},direction:m[n].y[0]<=m[n].y[1]?1:-1,color:v});e=!1}else 0<n&&!e&&(k.connectNullData?b.setLineDash&&
+(0<q.length&&(k.options.nullDataLineDashType||!m[n-1].lineDashType))&&(q[q.length-1].newLineDashArray=z,t=k.nullDataLineDashType):(d(x,w),q=[],s=[])),e=!0;d(x,w);P.drawMarkers(f);k.markerColor=g}}b.restore();u&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:F.xClipAnimation,easingFunction:F.easing.linear,animationBase:0}}};var Ga=function(a,d,b,c,f,g,h,l,k){if(!(0>b)){"undefined"===typeof l&&(l=1);if(!u){var m=Number((h%(2*Math.PI)).toFixed(8));Number((g%
+(2*Math.PI)).toFixed(8))===m&&(h-=1E-4)}a.save();a.globalAlpha=l;"pie"===f?(a.beginPath(),a.moveTo(d.x,d.y),a.arc(d.x,d.y,b,g,h,!1),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===f&&(a.beginPath(),a.arc(d.x,d.y,b,g,h,!1),0<=k&&a.arc(d.x,d.y,k*b,h,g,!0),a.closePath(),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};A.prototype.renderPie=function(a){function d(){if(m&&n){for(var a=0,b=0,c=0,d=0,f=0;f<n.length;f++){var g=
+n[f],h=m.dataPointIds[f],l={id:h,objectType:"dataPoint",dataPointIndex:f,dataSeriesIndex:0};r.push(l);var p={percent:null,total:null},q=null,p=k.getPercentAndTotal(m,g);if(m.indexLabelFormatter||g.indexLabelFormatter)q={chart:k.options,dataSeries:m,dataPoint:g,total:p.total,percent:p.percent};p=g.indexLabelFormatter?g.indexLabelFormatter(q):g.indexLabel?k.replaceKeywordsWithValue(g.indexLabel,g,m,f):m.indexLabelFormatter?m.indexLabelFormatter(q):m.indexLabel?k.replaceKeywordsWithValue(m.indexLabel,
+g,m,f):g.label?g.label:"";k._eventManager.objectMap[h]=l;l.center={x:t.x,y:t.y};l.y=g.y;l.radius=B;l.percentInnerRadius=F;l.indexLabelText=p;l.indexLabelPlacement=m.indexLabelPlacement;l.indexLabelLineColor=g.indexLabelLineColor?g.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:g.color?g.color:m._colorSet[f%m._colorSet.length];l.indexLabelLineThickness=x(g.indexLabelLineThickness)?m.indexLabelLineThickness:g.indexLabelLineThickness;l.indexLabelLineDashType=g.indexLabelLineDashType?
+g.indexLabelLineDashType:m.indexLabelLineDashType;l.indexLabelFontColor=g.indexLabelFontColor?g.indexLabelFontColor:m.indexLabelFontColor;l.indexLabelFontStyle=g.indexLabelFontStyle?g.indexLabelFontStyle:m.indexLabelFontStyle;l.indexLabelFontWeight=g.indexLabelFontWeight?g.indexLabelFontWeight:m.indexLabelFontWeight;l.indexLabelFontSize=g.indexLabelFontSize?g.indexLabelFontSize:m.indexLabelFontSize;l.indexLabelFontFamily=g.indexLabelFontFamily?g.indexLabelFontFamily:m.indexLabelFontFamily;l.indexLabelBackgroundColor=
+g.indexLabelBackgroundColor?g.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;l.indexLabelMaxWidth=g.indexLabelMaxWidth?g.indexLabelMaxWidth:m.indexLabelMaxWidth?m.indexLabelMaxWidth:0.33*e.width;l.indexLabelWrap="undefined"!==typeof g.indexLabelWrap?g.indexLabelWrap:m.indexLabelWrap;l.startAngle=0===f?m.startAngle?m.startAngle/180*Math.PI:0:r[f-1].endAngle;l.startAngle=(l.startAngle+2*Math.PI)%(2*Math.PI);l.endAngle=l.startAngle+
+2*Math.PI/u*Math.abs(g.y);g=(l.endAngle+l.startAngle)/2;g=(g+2*Math.PI)%(2*Math.PI);l.midAngle=g;if(l.midAngle>Math.PI/2-w&&l.midAngle<Math.PI/2+w){if(0===a||r[c].midAngle>l.midAngle)c=f;a++}else if(l.midAngle>3*Math.PI/2-w&&l.midAngle<3*Math.PI/2+w){if(0===b||r[d].midAngle>l.midAngle)d=f;b++}l.hemisphere=g>Math.PI/2&&g<=3*Math.PI/2?"left":"right";l.indexLabelTextBlock=new W(k.plotArea.ctx,{fontSize:l.indexLabelFontSize,fontFamily:l.indexLabelFontFamily,fontColor:l.indexLabelFontColor,fontStyle:l.indexLabelFontStyle,
+fontWeight:l.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:l.indexLabelBackgroundColor,maxWidth:l.indexLabelMaxWidth,maxHeight:l.indexLabelWrap?5*l.indexLabelFontSize:1.5*l.indexLabelFontSize,text:l.indexLabelText,padding:0,textBaseline:"top"});l.indexLabelTextBlock.measureText()}h=g=0;p=!1;for(f=0;f<n.length;f++)l=r[(c+f)%n.length],1<a&&(l.midAngle>Math.PI/2-w&&l.midAngle<Math.PI/2+w)&&(g<=a/2&&!p?(l.hemisphere="right",g++):(l.hemisphere="left",p=!0));p=!1;for(f=0;f<n.length;f++)l=
+r[(d+f)%n.length],1<b&&(l.midAngle>3*Math.PI/2-w&&l.midAngle<3*Math.PI/2+w)&&(h<=b/2&&!p?(l.hemisphere="left",h++):(l.hemisphere="right",p=!0))}}function b(a){var b=k.plotArea.ctx;b.clearRect(e.x1,e.y1,e.width,e.height);b.fillStyle=k.backgroundColor;b.fillRect(e.x1,e.y1,e.width,e.height);for(b=0;b<n.length;b++){var c=r[b].startAngle,d=r[b].endAngle;if(d>c){var f=0.07*B*Math.cos(r[b].midAngle),g=0.07*B*Math.sin(r[b].midAngle),l=!1;if(n[b].exploded){if(1E-9<Math.abs(r[b].center.x-(t.x+f))||1E-9<Math.abs(r[b].center.y-
+(t.y+g)))r[b].center.x=t.x+f*a,r[b].center.y=t.y+g*a,l=!0}else if(0<Math.abs(r[b].center.x-t.x)||0<Math.abs(r[b].center.y-t.y))r[b].center.x=t.x+f*(1-a),r[b].center.y=t.y+g*(1-a),l=!0;l&&(f={},f.dataSeries=m,f.dataPoint=m.dataPoints[b],f.index=b,k.toolTip.highlightObjects([f]));Ga(k.plotArea.ctx,r[b].center,r[b].radius,n[b].color?n[b].color:m._colorSet[b%m._colorSet.length],m.type,c,d,m.fillOpacity,r[b].percentInnerRadius)}}a=k.plotArea.ctx;a.save();a.fillStyle="black";a.strokeStyle="grey";a.textBaseline=
+"middle";a.lineJoin="round";for(b=b=0;b<n.length;b++)c=r[b],c.indexLabelText&&(c.indexLabelTextBlock.y-=c.indexLabelTextBlock.height/2,d=0,d="left"===c.hemisphere?"inside"!==m.indexLabelPlacement?-(c.indexLabelTextBlock.width+p):-c.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-c.indexLabelTextBlock.width/2,c.indexLabelTextBlock.x+=d,c.indexLabelTextBlock.render(!0),c.indexLabelTextBlock.x-=d,c.indexLabelTextBlock.y+=c.indexLabelTextBlock.height/2,"inside"!==c.indexLabelPlacement&&
+0<c.indexLabelLineThickness&&(d=c.center.x+B*Math.cos(c.midAngle),f=c.center.y+B*Math.sin(c.midAngle),a.strokeStyle=c.indexLabelLineColor,a.lineWidth=c.indexLabelLineThickness,a.setLineDash&&a.setLineDash(I(c.indexLabelLineDashType,c.indexLabelLineThickness)),a.beginPath(),a.moveTo(d,f),a.lineTo(c.indexLabelTextBlock.x,c.indexLabelTextBlock.y),a.lineTo(c.indexLabelTextBlock.x+("left"===c.hemisphere?-p:p),c.indexLabelTextBlock.y),a.stroke()),a.lineJoin="miter");a.save()}function c(a,b){var c=0,c=a.indexLabelTextBlock.y-
+a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-f}function f(a){for(var b=null,d=1;d<n.length;d++)if(b=(a+d+r.length)%r.length,r[b].hemisphere!==r[a].hemisphere){b=null;break}else if(r[b].indexLabelText&&b!==a&&(0>c(r[b],r[a])||("right"===r[a].hemisphere?r[b].indexLabelTextBlock.y>=r[a].indexLabelTextBlock.y:
+r[b].indexLabelTextBlock.y<=r[a].indexLabelTextBlock.y)))break;else b=null;return b}function g(a,b,d){d=(d||0)+1;if(1E3<d)return 0;b=b||0;var e=0,k=t.y-1*s,l=t.y+1*s;if(0<=a&&a<n.length){var h=r[a];if(0>b&&h.indexLabelTextBlock.y<k||0<b&&h.indexLabelTextBlock.y>l)return 0;var p=0,m=0,m=p=p=0;0>b?h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2>k&&h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+b<k&&(b=-(k-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+b))):h.indexLabelTextBlock.y+
+h.indexLabelTextBlock.height/2<k&&h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+b>l&&(b=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+b-l);b=h.indexLabelTextBlock.y+b;k=0;k="right"===h.hemisphere?t.x+Math.sqrt(Math.pow(s,2)-Math.pow(b-t.y,2)):t.x-Math.sqrt(Math.pow(s,2)-Math.pow(b-t.y,2));m=t.x+B*Math.cos(h.midAngle);p=t.y+B*Math.sin(h.midAngle);p=Math.sqrt(Math.pow(k-m,2)+Math.pow(b-p,2));m=Math.acos(B/s);p=Math.acos((s*s+B*B-p*p)/(2*B*s));b=p<m?b-h.indexLabelTextBlock.y:0;k=null;
+for(l=1;l<n.length;l++)if(k=(a-l+r.length)%r.length,r[k].hemisphere!==r[a].hemisphere){k=null;break}else if(r[k].indexLabelText&&r[k].hemisphere===r[a].hemisphere&&k!==a&&(0>c(r[k],r[a])||("right"===r[a].hemisphere?r[k].indexLabelTextBlock.y<=r[a].indexLabelTextBlock.y:r[k].indexLabelTextBlock.y>=r[a].indexLabelTextBlock.y)))break;else k=null;m=k;p=f(a);l=k=0;0>b?(l="right"===h.hemisphere?m:p,e=b,null!==l&&(m=-b,b=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-(r[l].indexLabelTextBlock.y+
+r[l].indexLabelTextBlock.height/2),b-m<q&&(k=-m,l=g(l,k,d+1),+l.toFixed(y)>+k.toFixed(y)&&(e=b>q?-(b-q):-(m-(l-k)))))):0<b&&(l="right"===h.hemisphere?p:m,e=b,null!==l&&(m=b,b=r[l].indexLabelTextBlock.y-r[l].indexLabelTextBlock.height/2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2),b-m<q&&(k=m,l=g(l,k,d+1),+l.toFixed(y)<+k.toFixed(y)&&(e=b>q?b-q:m-(k-l)))));e&&(d=h.indexLabelTextBlock.y+e,b=0,b="right"===h.hemisphere?t.x+Math.sqrt(Math.pow(s,2)-Math.pow(d-t.y,2)):t.x-Math.sqrt(Math.pow(s,
+2)-Math.pow(d-t.y,2)),h.midAngle>Math.PI/2-w&&h.midAngle<Math.PI/2+w?(k=(a-1+r.length)%r.length,k=r[k],a=r[(a+1+r.length)%r.length],"left"===h.hemisphere&&"right"===k.hemisphere&&b>k.indexLabelTextBlock.x?b=k.indexLabelTextBlock.x-15:"right"===h.hemisphere&&("left"===a.hemisphere&&b<a.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x+15)):h.midAngle>3*Math.PI/2-w&&h.midAngle<3*Math.PI/2+w&&(k=(a-1+r.length)%r.length,k=r[k],a=r[(a+1+r.length)%r.length],"right"===h.hemisphere&&"left"===k.hemisphere&&
+b<k.indexLabelTextBlock.x?b=k.indexLabelTextBlock.x+15:"left"===h.hemisphere&&("right"===a.hemisphere&&b>a.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x-15)),h.indexLabelTextBlock.y=d,h.indexLabelTextBlock.x=b,h.indexLabelAngle=Math.atan2(h.indexLabelTextBlock.y-t.y,h.indexLabelTextBlock.x-t.x))}return e}function h(){var a=k.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=a=0,d=0,l=!0,b=0;10>b&&(1>b||0<d);b++){if(m.radius||!m.radius&&
+"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&B-d<=E)l=!1;l&&(B-=d);d=0;if("inside"!==m.indexLabelPlacement){s=B*v;for(a=0;a<n.length;a++){var h=r[a];h.indexLabelTextBlock.x=t.x+s*Math.cos(h.midAngle);h.indexLabelTextBlock.y=t.y+s*Math.sin(h.midAngle);h.indexLabelAngle=h.midAngle;h.radius=B;h.percentInnerRadius=F}for(var w,u,a=0;a<n.length;a++){var h=r[a],x=f(a);if(null!==x){w=r[a];u=r[x];var z=0,z=c(w,u)-q;if(0>z){for(var A=u=0,D=0;D<n.length;D++)D!==a&&r[D].hemisphere===h.hemisphere&&
+(r[D].indexLabelTextBlock.y<h.indexLabelTextBlock.y?u++:A++);u=z/(u+A||1)*A;var A=-1*(z-u),C=D=0;"right"===h.hemisphere?(D=g(a,u),A=-1*(z-D),C=g(x,A),+C.toFixed(y)<+A.toFixed(y)&&+D.toFixed(y)<=+u.toFixed(y)&&g(a,-(A-C))):(D=g(x,u),A=-1*(z-D),C=g(a,A),+C.toFixed(y)<+A.toFixed(y)&&+D.toFixed(y)<=+u.toFixed(y)&&g(x,-(A-C)))}}}}else for(a=0;a<n.length;a++)h=r[a],s="pie"===m.type?0.7*B:0.8*B,x=t.x+s*Math.cos(h.midAngle),u=t.y+s*Math.sin(h.midAngle),h.indexLabelTextBlock.x=x,h.indexLabelTextBlock.y=u;
+for(a=0;a<n.length;a++)if(h=r[a],x=h.indexLabelTextBlock.measureText(),0!==x.height&&0!==x.width)x=x=0,"right"===h.hemisphere?(x=e.x2-(h.indexLabelTextBlock.x+h.indexLabelTextBlock.width+p),x*=-1):x=e.x1-(h.indexLabelTextBlock.x-h.indexLabelTextBlock.width-p),0<x&&(!l&&h.indexLabelText&&(u="right"===h.hemisphere?e.x2-h.indexLabelTextBlock.x:h.indexLabelTextBlock.x-e.x1,0.3*h.indexLabelTextBlock.maxWidth>u?h.indexLabelText="":h.indexLabelTextBlock.maxWidth=0.85*u,0.3*h.indexLabelTextBlock.maxWidth<
+u&&(h.indexLabelTextBlock.x-="right"===h.hemisphere?2:-2)),Math.abs(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-t.y)<B||Math.abs(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2-t.y)<B)&&(x/=Math.abs(Math.cos(h.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)),x=x=0,0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?(x=e.y2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+5),x*=-1):x=e.y1-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-5),0<x&&(!l&&h.indexLabelText&&(u=0<h.indexLabelAngle&&
+h.indexLabelAngle<Math.PI?-1:1,0===g(a,x*u)&&g(a,2*u)),Math.abs(h.indexLabelTextBlock.x-t.x)<B&&(x/=Math.abs(Math.sin(h.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)));var G=function(a,b,c){for(var d=[],e=0;d.push(r[b]),b!==c;b=(b+1+n.length)%n.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,b=-1,d=0,e=!1,g=0;g<
+n.length;g++)if(e=!1,w=r[g],w.indexLabelText){var h=f(g);if(null!==h){var k=r[h];z=0;z=c(w,k);var l;if(l=0>z){l=w.indexLabelTextBlock.x;var m=w.indexLabelTextBlock.y-w.indexLabelTextBlock.height/2,q=w.indexLabelTextBlock.y+w.indexLabelTextBlock.height/2,s=k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2,t=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width,v=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2;l=w.indexLabelTextBlock.x+w.indexLabelTextBlock.width<k.indexLabelTextBlock.x-p||
+l>t+p||m>v+p||q<s-p?!1:!0}l?(0>a&&(a=g),h!==a&&(b=h,d+=-z),0===g%Math.max(n.length/10,3)&&(e=!0)):e=!0;e&&(0<d&&0<=a&&0<=b)&&(G(d,a,b),b=a=-1,d=0)}}0<d&&G(d,a,b)})()}}function l(){k.plotArea.layoutManager.reset();k.title&&(k.title.dockInsidePlotArea||"center"===k.title.horizontalAlign&&"center"===k.title.verticalAlign)&&k.title.render();if(k.subtitles)for(var a=0;a<k.subtitles.length;a++){var b=k.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}k.legend&&
+(k.legend.dockInsidePlotArea||"center"===k.legend.horizontalAlign&&"center"===k.legend.verticalAlign)&&k.legend.render();z.fNg&&z.fNg(k)}var k=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],n=m.dataPoints,p=10,e=this.plotArea,r=[],q=2,s,v=1.3,w=20/180*Math.PI,y=6,t={x:(e.x2+e.x1)/2,y:(e.y2+e.y1)/2},u=0;a=!1;for(var A=0;A<n.length;A++)u+=Math.abs(n[A].y),!a&&("undefined"!==typeof n[A].indexLabel&&null!==n[A].indexLabel&&0<n[A].indexLabel.toString().length)&&(a=!0),
+!a&&("undefined"!==typeof n[A].label&&null!==n[A].label&&0<n[A].label.toString().length)&&(a=!0);if(0!==u){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var B="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(e.width,e.height)/2:0.92*Math.min(e.width,e.height)/2;m.radius&&(B=Na(m.radius,B));var E="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Na(m.innerRadius,B):0.7*B;m.radius=B;"doughnut"===m.type&&(m.innerRadius=E);var F=Math.min(E/B,(B-
+1)/B);this.pieDoughnutClickHandler=function(a){k.isAnimating||!x(a.dataSeries.explodeOnClick)&&!a.dataSeries.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&k._animator.animate(0,500,function(a){b(a);l()}))};d();h();h();h();h();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=k.plotArea.ctx;b.clearRect(e.x1,e.y1,e.width,e.height);b.fillStyle=k.backgroundColor;b.fillRect(e.x1,e.y1,e.width,e.height);a=
+r[0].startAngle+2*Math.PI*a;for(b=0;b<n.length;b++){var c=0===b?r[b].startAngle:d,d=c+(r[b].endAngle-r[b].startAngle),f=!1;d>a&&(d=a,f=!0);var g=n[b].color?n[b].color:m._colorSet[b%m._colorSet.length];d>c&&Ga(k.plotArea.ctx,r[b].center,r[b].radius,g,m.type,c,d,m.fillOpacity,r[b].percentInnerRadius);if(f)break}l()},function(){k.disableToolTip=!1;k._animator.animate(0,k.animatedRender?500:0,function(a){b(a);l()})})}}};A.prototype.animationRequestId=null;A.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||
+window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();A.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;A.prototype.set=function(a,d,b){b="undefined"===typeof b?!0:b;"options"===a?(this.options=d,
+b&&this.render()):A.base.set.call(this,a,d,b)};A.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var d=a.format?a.format:"png",b=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+d);Ba(this.canvas,d,b)};A.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),d=document.createElement("iframe");d.setAttribute("class","canvasjs-chart-print-frame");d.setAttribute("style","position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");
+d.style.height=this.height+"px";this._canvasJSContainer.appendChild(d);var b=this,c=d.contentWindow||d.contentDocument.document||d.contentDocument;c.document.open();c.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="'+a+'"/><body/></html>');c.document.close();setTimeout(function(){c.focus();c.print();setTimeout(function(){b._canvasJSContainer.removeChild(d)},1E3)},500)};ja.prototype.registerSpace=function(a,d){"top"===a?this._topOccupied+=
+d.height:"bottom"===a?this._bottomOccupied+=d.height:"left"===a?this._leftOccupied+=d.width:"right"===a&&(this._rightOccupied+=d.width)};ja.prototype.unRegisterSpace=function(a,d){"top"===a?this._topOccupied-=d.height:"bottom"===a?this._bottomOccupied-=d.height:"left"===a?this._leftOccupied-=d.width:"right"===a&&(this._rightOccupied-=d.width)};ja.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,
+width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};ja.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};U(W,M);W.prototype.render=function(a){a&&this.ctx.save();var d=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var b=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+b);"middle"===this.textBaseline&&(b=-this._lineHeight/
+2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var c=0,f=this.padding,g=null;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,b,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(b=0;b<this._wrappedText.lines.length;b++)g=this._wrappedText.lines[b],"right"===this.horizontalAlign?c=this.width-g.width-this.padding:"left"===this.horizontalAlign?
+c=this.padding:"center"===this.horizontalAlign&&(c=(this.width-2*this.padding)/2-g.width/2+this.padding),this.ctx.fillText(g.text,c,f),f+=g.height;this.ctx.font=d;a&&this.ctx.restore()};W.prototype.setText=function(a){this.text=a;this._isDirty=!0;this._wrappedText=null};W.prototype.measureText=function(){this._lineHeight=Ja(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,
+height:this.height}};W.prototype._getLineWithWidth=function(a,d,b){a=String(a);if(!a)return{text:"",width:0};var c=b=0,f=a.length-1,g=Infinity;for(this.ctx.font=this._getFontString();c<=f;){var g=Math.floor((c+f)/2),h=a.substr(0,g+1);b=this.ctx.measureText(h).width;if(b<d)c=g+1;else if(b>d)f=g-1;else break}b>d&&1<h.length&&(h=h.substr(0,h.length-1),b=this.ctx.measureText(h).width);d=!0;if(h.length===a.length||" "===a[h.length])d=!1;d&&(a=h.split(" "),1<a.length&&a.pop(),h=a.join(" "),b=this.ctx.measureText(h).width);
+return{text:h,width:b}};W.prototype._wrapText=function(){var a=new String(ka(String(this.text))),d=[],b=this.ctx.font,c=0,f=0;for(this.ctx.font=this._getFontString();0<a.length;){var g=this.maxHeight-2*this.padding,h=this._getLineWithWidth(a,this.maxWidth-2*this.padding,!1);h.height=this._lineHeight;d.push(h);var l=f,f=Math.max(f,h.width),c=c+h.height,a=ka(a.slice(h.text.length,a.length));g&&c>g&&(h=d.pop(),c-=h.height,f=l)}this._wrappedText={lines:d,width:f,height:c};this.width=f+2*this.padding;
+this.height=c+2*this.padding;this.ctx.font=b};W.prototype._getFontString=function(){var a;a=""+(this.fontStyle?this.fontStyle+" ":"");a+=this.fontWeight?this.fontWeight+" ":"";a+=this.fontSize?this.fontSize+"px ":"";var d=this.fontFamily?this.fontFamily+"":"";!u&&d&&(d=d.split(",")[0],"'"!==d[0]&&'"'!==d[0]&&(d="'"+d+"'"));return a+=d};U(ma,M);ma.prototype.render=function(){if(this.text){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,d=a.layoutManager.getFreeSpace(),b=d.x1,c=d.y1,f=
+0,g=0,h=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,l,k;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=d.width-4-h*("center"===this.horizontalAlign?2:1)),g=0.5*d.height-this.margin-2,f=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=d.height-4),g=0.5*d.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&
+(this.maxWidth=d.width-4),g=0.5*d.height-4));this.wrap||(g=Math.min(g,Math.max(1.5*this.fontSize,this.fontSize+2.5*this.padding)));var g=new W(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:g,cornerRadius:this.cornerRadius,
+text:this.text,padding:this.padding,textBaseline:"top"}),m=g.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(c=d.y1+2,k="top"):"bottom"===this.verticalAlign&&(c=d.y2-2-m.height,k="bottom"),"left"===this.horizontalAlign?b=d.x1+2:"center"===this.horizontalAlign?b=d.x1+d.width/2-m.width/2:"right"===this.horizontalAlign&&(b=d.x2-2-m.width-h),l=this.horizontalAlign,this.width=m.width,this.height=m.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?
+(b=d.x1+2,c=d.y2-2-(this.maxWidth/2-m.width/2),f=-90,k="left",this.width=m.height,this.height=m.width):"right"===this.horizontalAlign?(b=d.x2-2,c=d.y1+2+(this.maxWidth/2-m.width/2),f=90,k="right",this.width=m.height,this.height=m.width):"center"===this.horizontalAlign&&(c=a.y1+(a.height/2-m.height/2),b=a.x1+(a.width/2-m.width/2),k="center",this.width=m.width,this.height=m.height),l="center");g.x=b;g.y=c;g.angle=f;g.horizontalAlign=l;g.render(!0);a.layoutManager.registerSpace(k,{width:this.width+("left"===
+k||"right"===k?this.margin+2:0),height:this.height+("top"===k||"bottom"===k?this.margin+2:0)});this.bounds={x1:b,y1:c,x2:b+this.width,y2:c+this.height};this.ctx.textBaseline="top"}};U(va,M);va.prototype.render=ma.prototype.render;U(wa,M);wa.prototype.render=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,d=a.layoutManager.getFreeSpace(),b=null,c=0,f=0,g=0,h=0,l=this.markerMargin=this.chart.options.legend&&!x(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:
+0.3*this.fontSize;this.height=0;var k=[],m=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation="horizontal",b=this.verticalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:d.width,h=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*d.height):"center"===this.verticalAlign&&(this.orientation="vertical",b=this.horizontalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*d.width,h=this.maxHeight=null!==this.maxHeight?this.maxHeight:d.height);for(var n=
+0;n<this.dataSeries.length;n++){var p=this.dataSeries[n];if("pie"!==p.type&&"doughnut"!==p.type&&"funnel"!==p.type){var e=p.legendMarkerType=p.legendMarkerType?p.legendMarkerType:"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type&&"scatter"!==p.type&&"bubble"!==p.type||!p.markerType?$.getDefaultLegendMarker(p.type):p.markerType,r=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,q=p.legendMarkerColor=
+p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:p._colorSet[0],s=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,v=p.legendMarkerBorderColor?p.legendMarkerBorderColor:p.markerBorderColor,w=p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:p.markerBorderThickness?Math.max(1,Math.round(0.2*s)):0,r=this.chart.replaceKeywordsWithValue(r,p.dataPoints[0],p,n),e={markerType:e,markerColor:q,text:r,textBlock:null,chartType:p.type,markerSize:s,
+lineColor:p._colorSet[0],dataSeriesIndex:p.index,dataPointIndex:null,markerBorderColor:v,markerBorderThickness:w};k.push(e)}else for(var u=0;u<p.dataPoints.length;u++){var t=p.dataPoints[u],e=t.legendMarkerType?t.legendMarkerType:p.legendMarkerType?p.legendMarkerType:$.getDefaultLegendMarker(p.type),r=t.legendText?t.legendText:p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:t}):t.name?t.name:"DataPoint: "+(u+1),q=
+t.legendMarkerColor?t.legendMarkerColor:p.legendMarkerColor?p.legendMarkerColor:t.color?t.color:p.color?p.color:p._colorSet[u%p._colorSet.length],s=0.75*this.lineHeight,v=t.legendMarkerBorderColor?t.legendMarkerBorderColor:p.legendMarkerBorderColor?p.legendMarkerBorderColor:t.markerBorderColor?t.markerBorderColor:p.markerBorderColor,w=t.legendMarkerBorderThickness?t.legendMarkerBorderThickness:p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:t.markerBorderThickness||p.markerBorderThickness?
+Math.max(1,Math.round(0.2*s)):0,r=this.chart.replaceKeywordsWithValue(r,t,p,u),e={markerType:e,markerColor:q,text:r,textBlock:null,chartType:p.type,markerSize:s,dataSeriesIndex:n,dataPointIndex:u,markerBorderColor:v,markerBorderThickness:w};(t.showInLegend||p.showInLegend&&!1!==t.showInLegend)&&k.push(e)}}!0===this.reversed&&k.reverse();if(0<k.length){p=null;q=u=r=t=0;r=null!==this.itemWidth?null!==this.itemMaxWidth?Math.min(this.itemWidth,this.itemMaxWidth,g):this.itemMaxWidth=Math.min(this.itemWidth,
+g):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,g):this.itemMaxWidth=g;s=0===s?0.75*this.lineHeight:s;r-=s+l;for(n=0;n<k.length;n++){e=k[n];if("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType)r-=2*0.1*this.lineHeight;if(!(0>=h||"undefined"===typeof h||0>=r||"undefined"===typeof r)){if("horizontal"===this.orientation){e.textBlock=new W(this.ctx,{x:0,y:0,maxWidth:r,maxHeight:this.itemWrap?h:this.lineHeight,angle:0,text:e.text,horizontalAlign:"left",fontSize:this.fontSize,
+fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});e.textBlock.measureText();null!==this.itemWidth&&(e.textBlock.width=this.itemWidth-(s+l+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0)));if(!p||p.width+Math.round(e.textBlock.width+s+l+(0===p.width?0:this.horizontalSpacing)+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0))>g)p=
+{items:[],width:0},m.push(p),this.height+=u,u=0;u=Math.max(u,e.textBlock.height)}else e.textBlock=new W(this.ctx,{x:0,y:0,maxWidth:r,maxHeight:!0===this.itemWrap?h:1.5*this.fontSize,angle:0,text:e.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),e.textBlock.measureText(),null!==this.itemWidth&&(e.textBlock.width=this.itemWidth-(s+l+("line"===e.chartType||"spline"===e.chartType||
+"stepLine"===e.chartType?2*0.1*this.lineHeight:0))),this.height<h-this.lineHeight?(p={items:[],width:0},m.push(p)):(p=m[t],t=(t+1)%m.length),this.height+=e.textBlock.height;e.textBlock.x=p.width;e.textBlock.y=0;p.width+=Math.round(e.textBlock.width+s+l+(0===p.width?0:this.horizontalSpacing)+("line"===e.chartType||"spline"===e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0));p.items.push(e);this.width=Math.max(p.width,this.width);q=e.textBlock.width+(s+l+("line"===e.chartType||"spline"===
+e.chartType||"stepLine"===e.chartType?2*0.1*this.lineHeight:0))}}this.itemWidth=q;this.height=!1===this.itemWrap?m.length*this.lineHeight:this.height+u;this.height=Math.min(h,this.height);this.width=Math.min(g,this.width)}"top"===this.verticalAlign?(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,c=d.y1):"center"===this.verticalAlign?(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/
+2,c=d.y1+d.height/2-this.height/2):"bottom"===this.verticalAlign&&(f="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,c=d.y2-this.height);this.items=k;for(n=0;n<this.items.length;n++)e=k[n],e.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[e.id]={id:e.id,objectType:"legendItem",legendItemIndex:n,dataSeriesIndex:e.dataSeriesIndex,dataPointIndex:e.dataPointIndex};(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&
+this.ctx.roundRect(f,c,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(n=d=0;n<m.length;n++){p=m[n];for(t=u=0;t<p.items.length;t++){e=p.items[t];q=e.textBlock.x+f+(0===t?0.2*s:this.horizontalSpacing);v=c+d;r=q;this.chart.data[e.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);this.ctx.save();this.ctx.beginPath();this.ctx.rect(f,c,g,Math.max(h-h%this.lineHeight,0));this.ctx.clip();if("line"===e.chartType||"stepLine"===e.chartType||"spline"===
+e.chartType)this.ctx.strokeStyle=e.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(q-0.1*this.lineHeight,v+this.lineHeight/2),this.ctx.lineTo(q+0.85*this.lineHeight,v+this.lineHeight/2),this.ctx.stroke(),r-=0.1*this.lineHeight;P.drawMarker(q+s/2,v+this.lineHeight/2,this.ctx,e.markerType,e.markerSize,e.markerColor,e.markerBorderColor,e.markerBorderThickness);e.textBlock.x=q+l+s;if("line"===e.chartType||"stepLine"===e.chartType||"spline"===e.chartType)e.textBlock.x+=
+0.1*this.lineHeight;e.textBlock.y=Math.round(v+this.lineHeight/2);e.textBlock.render(!0);this.ctx.restore();u=0<t?Math.max(u,e.textBlock.height):e.textBlock.height;this.chart.data[e.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);q=G(e.id);this.ghostCtx.fillStyle=q;this.ghostCtx.beginPath();this.ghostCtx.fillRect(r,e.textBlock.y-this.lineHeight/2,e.textBlock.x+e.textBlock.width-r,e.textBlock.height);e.x1=this.chart._eventManager.objectMap[e.id].x1=r;e.y1=this.chart._eventManager.objectMap[e.id].y1=
+e.textBlock.y-this.lineHeight/2;e.x2=this.chart._eventManager.objectMap[e.id].x2=e.textBlock.x+e.textBlock.width;e.y2=this.chart._eventManager.objectMap[e.id].y2=e.textBlock.y+e.textBlock.height-this.lineHeight/2}d+=u}0<k.length&&a.layoutManager.registerSpace(b,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:f,y1:c,x2:f+this.width,y2:c+this.height}};U(Ca,M);Ca.prototype.render=function(){var a=this.chart.layoutManager.getFreeSpace();this.ctx.fillStyle="red";this.ctx.fillRect(a.x1,a.y1,
+a.x2,a.y2)};U($,M);$.prototype.getDefaultAxisPlacement=function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===
+a)return"xySwapped";if("pie"===a||"doughnut"===a||"funnel"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};$.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a)return"square";if("line"===
+a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a||"funnel"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a)return"triangle";window.console.log("Unknown Chart Type: "+a);return null};$.prototype.getDataPointAtX=function(a,d){if(!this.dataPoints||0===this.dataPoints.length)return null;var b={dataPoint:null,distance:Infinity,index:NaN},c=null,f=0,g=0,h=1,l=Infinity,k=0,m=0,n=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(n=
+Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1<n?Math.min(Math.max((this.dataPoints.length-1)/n*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(n=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<n?Math.min(Math.max((this.dataPoints.length-1)/n*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){g=0<h?n+f:n-f;if(0<=g&&g<this.dataPoints.length){var c=this.dataPoints[g],p=this.axisX.logarithmic?c.x>a?c.x/a:a/c.x:Math.abs(c.x-
+a);p<b.distance&&(b.dataPoint=c,b.distance=p,b.index=g);c=p;c<=l?l=c:0<h?k++:m++;if(1E3<k&&1E3<m)break}else if(0>n-f&&n+f>=this.dataPoints.length)break;-1===h?(f++,h=1):h=-1}return d||b.dataPoint.x!==a?d&&null!==b.dataPoint?b:null:b};$.prototype.getDataPointAtXY=function(a,d,b){if(!this.dataPoints||0===this.dataPoints.length||a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||d<this.chart.plotArea.y1||d>this.chart.plotArea.y2)return null;b=b||!1;var c=[],f=0,g=0,h=1,l=!1,k=Infinity,m=0,n=0,p=0;"none"!==
+this.chart.plotInfo.axisPlacement&&(p=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:d}),this.axisX.logarithmic?(g=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<g?Math.min(Math.max((this.dataPoints.length-1)/g*Math.log(p/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(g=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<g?Math.min(Math.max((this.dataPoints.length-1)/g*(p-this.dataPoints[0].x)>>0,0),this.dataPoints.length):
+0));for(;;){g=0<h?p+f:p-f;if(0<=g&&g<this.dataPoints.length){var e=this.chart._eventManager.objectMap[this.dataPointIds[g]],r=this.dataPoints[g],q=null;if(e){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":a>=e.x1&&(a<=e.x2&&d>=e.y1&&d<=e.y2)&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y1-d),Math.abs(e.y2-d))}),
+l=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=L("markerSize",r,this)||4,v=b?20:s,q=Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-d,2));q<=v&&c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q});g=Math.abs(e.x1-a);g<=k?k=g:0<h?m++:n++;q<=s/2&&(l=!0);break;case "rangeArea":case "rangeSplineArea":s=L("markerSize",r,this)||4;v=b?20:s;q=Math.min(Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-
+d,2)),Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y2-d,2)));q<=v&&c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q});g=Math.abs(e.x1-a);g<=k?k=g:0<h?m++:n++;q<=s/2&&(l=!0);break;case "bubble":s=e.size;q=Math.sqrt(Math.pow(e.x1-a,2)+Math.pow(e.y1-d,2));q<=s/2&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:q}),l=!0);break;case "pie":case "doughnut":s=e.center;v="doughnut"===this.type?e.percentInnerRadius*e.radius:0;q=Math.sqrt(Math.pow(s.x-a,2)+Math.pow(s.y-d,2));q<e.radius&&
+q>v&&(q=Math.atan2(d-s.y,a-s.x),0>q&&(q+=2*Math.PI),q=Number(((180*(q/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(e.startAngle/Math.PI)%360+360)%360).toFixed(12)),v=Number(((180*(e.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===v&&1<e.endAngle&&(v=360),s>=v&&0!==r.y&&(v+=360,q<s&&(q+=360)),q>s&&q<v&&(c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:0}),l=!0));break;case "candlestick":if(a>=e.x1-e.borderThickness/2&&a<=e.x2+e.borderThickness/2&&d>=e.y2-e.borderThickness/2&&d<=
+e.y3+e.borderThickness/2||Math.abs(e.x2-a+e.x1-a)<e.borderThickness&&d>=e.y1&&d<=e.y4)c.push({dataPoint:r,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y2-d),Math.abs(e.y3-d))}),l=!0;break;case "ohlc":if(Math.abs(e.x2-a+e.x1-a)<e.borderThickness&&d>=e.y2&&d<=e.y3||a>=e.x1&&a<=(e.x2+e.x1)/2&&d>=e.y1-e.borderThickness/2&&d<=e.y1+e.borderThickness/2||a>=(e.x1+e.x2)/2&&a<=e.x2&&d>=e.y4-e.borderThickness/2&&d<=e.y4+e.borderThickness/2)c.push({dataPoint:r,
+dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(e.x1-a),Math.abs(e.x2-a),Math.abs(e.y2-d),Math.abs(e.y3-d))}),l=!0}if(l||1E3<m&&1E3<n)break}}else if(0>p-f&&p+f>=this.dataPoints.length)break;-1===h?(f++,h=1):h=-1}a=null;for(d=0;d<c.length;d++)a?c[d].distance<=a.distance&&(a=c[d]):a=c[d];return a};$.prototype.getMarkerProperties=function(a,d,b,c){var f=this.dataPoints;return{x:d,y:b,ctx:c,type:f[a].markerType?f[a].markerType:this.markerType,size:f[a].markerSize?f[a].markerSize:this.markerSize,
+color:f[a].markerColor?f[a].markerColor:this.markerColor?this.markerColor:f[a].color?f[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],borderColor:f[a].markerBorderColor?f[a].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:f[a].markerBorderThickness?f[a].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}};U(B,M);B.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var d=this.logLabelValues[0]||
+this.intervalStartPosition;if(Math.log(this.range)/Math.log(d/this.viewportMinimum)<this.noTicks-1){for(var b=B.getNiceNumber((d-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),c=Math.ceil(this.viewportMinimum/b)*b;c<d;c+=b)c<this.viewportMinimum||this.logLabelValues.push(c);this.logLabelValues.sort(ya);this.createExtraLabelsForLog(a)}}};B.prototype.createLabels=function(){var a,d,b=0,c=0,f,g=0,h=0,c=0,l=this.interval,k=0,m,n=0.6*this.chart.height,b=!1;if(this.dataSeries&&
+0<this.dataSeries.length)for(c=0;c<this.dataSeries.length;c++)"dateTime"===this.dataSeries[c].xValueType&&(b=!0);if("axisX"===this.type&&b&&!this.logarithmic)for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),f=Ha(new Date(this.viewportMaximum),this.interval,this.intervalType),b=this.intervalStartPosition;b<f;Ha(b,l,this.intervalType))a=b.getTime(),a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,
+label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[a]?this.labels[a]:Ea(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,
+fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:b.getTime(),textBlock:a,effectiveHeight:null});else{f=this.viewportMaximum;if(this.labels){a=Math.ceil(l);for(var l=Math.ceil(this.intervalStartPosition),p=!1,b=l;b<this.viewportMaximum;b+=a)if(this.labels[b])p=!0;else{p=!1;break}p&&(this.interval=a,this.intervalStartPosition=l)}if(this.logarithmic&&!this.equidistantInterval){this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog());
+for(var e=0;e<this.logLabelValues.length;e++)b=this.logLabelValues[e],b<this.viewportMinimum||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[b]?this.labels[b]:da(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,
+borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:b,textBlock:a,effectiveHeight:null}))}for(b=this.intervalStartPosition;b<=f;b=parseFloat((this.logarithmic&&this.equidistantInterval?b*Math.pow(this.logarithmBase,this.interval):
+b+this.interval).toFixed(14)))a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:b,label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[b]?this.labels[b]:da(b,this.valueFormatString,this.chart._cultureInfo),a=new W(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,
+cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:b,textBlock:a,effectiveHeight:null})}if("bottom"===this._position||"top"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-
+2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*E[this.intervalType+"Duration"]*this.interval,g="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);
+else if("left"===this._position||"right"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*E[this.intervalType+
+"Duration"]*this.interval,this.chart.panEnabled||(g="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize;for(c=0;c<this._labels.length;c++){a=this._labels[c].textBlock;a.maxWidth=g;a.maxHeight=h;var r=a.measureText();m=r.height}f=[];p=l=0;if(this.labelAutoFit||this.options.labelAutoFit)if(x(this.labelAngle)||(this.labelAngle=(this.labelAngle%
+360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(g=0.9*k>>0,p=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;b<this._labels.length;b++){a=
+this._labels[b].textBlock;for(var q,s=a.text.split(" "),c=0;c<s.length;c++)e=s[c],this.ctx.font=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,e=this.ctx.measureText(e),e.width>p&&(q=b,p=e.width)}b=0;for(b=this.intervalStartPosition<this.viewportMinimum?1:0;b<this._labels.length;b++)if(a=this._labels[b].textBlock,r=a.measureText(),b<this._labels.length-1&&(e=b+1,d=this._labels[e].textBlock,d=d.measureText()),f.push(a.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,
+f),Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c=g*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((c-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c),s=(n-(m+a.fontSize/2)*
+Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),!x(this.options.labelWrap))this.labelWrap?x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),this.sessionVariables.labelWrap=this.labelWrap,r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?
+-25:this.sessionVariables.labelAngle):x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=g,r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=
+h,this.sessionVariables.labelWrap=this.labelWrap);else{if(x(this.options.labelWrap))if(!x(this.options.labelMaxWidth))this.options.labelMaxWidth<g?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=c):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h);else if(!x(d))if(c=r.width+d.width>>0,e=this.labelFontSize,p<g)c-2*g>l&&(l=c-2*g,c>=2*g&&c<2.2*g?(this.sessionVariables.labelMaxWidth=
+g,x(this.options.labelFontSize)&&12<e&&(e=Math.floor(12/13*e),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):c>=2.2*g&&c<2.8*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=e):c>=2.8*g&&c<3.2*g?(this.sessionVariables.labelMaxWidth=Math.max(g,p),this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&
+(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):c>=3.2*g&&c<3.6*g?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=this.labelFontSize):c>3.6*g&&c<5*g?(x(this.options.labelFontSize)&&12<e&&(e=Math.floor(12/13*e),a.measureText()),this.sessionVariables.labelFontSize=
+x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s):c>5*g&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelFontSize=e,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle));else if(q===b&&(0===q&&p+this._labels[q+1].textBlock.measureText().width-2*g>l||q===this._labels.length-1&&p+this._labels[q-
+1].textBlock.measureText().width-2*g>l||0<q&&q<this._labels.length-1&&p+this._labels[q+1].textBlock.measureText().width-2*g>l&&p+this._labels[q-1].textBlock.measureText().width-2*g>l))l=0===q?p+this._labels[q+1].textBlock.measureText().width-2*g:p+this._labels[q-1].textBlock.measureText().width-2*g,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=
+s;else if(0===l)for(this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?e:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),r=a.measureText(),c<this._labels.length-1&&(e=c+1,d=this._labels[e].textBlock,d.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,p),s),d=d.measureText(),r.width+d.width>>0>2*g&&(this.sessionVariables.labelAngle=
+-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((c-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c),s=0!=this.labelAngle?(n-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):g,this.sessionVariables.labelMaxHeight=h=this.labelWrap?(n-s*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*
+Math.abs(this.labelAngle)):1.5*this.labelFontSize,x(this.options.labelWrap))?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelMaxHeight=c<0.9*k?0.9*k:c,this.sessionVariables.labelWrap=
+this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s):(x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=h);for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,
+a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:
+this.options.labelFontSize,a.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText();else if("left"===this._position||"right"===this._position)if(g=x(this.options.labelMaxWidth)?0.3*this.chart.width>>0:this.options.labelMaxWidth,h="undefined"===typeof this.options.labelWrap||this.labelWrap?
+0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(b=0;b<this._labels.length;b++)(a=this._labels[b].textBlock,r=a.measureText(),b<this._labels.length-1&&(e=b+1,d=this._labels[e].textBlock,
+d=d.measureText()),f.push(a.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,f),c=g*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.sin(Math.PI/180*Math.abs(this.labelAngle)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)?x(this.options.labelWrap)?x(this.options.labelWrap)&&(x(this.options.labelMaxWidth)?x(d)||(k=r.height+d.height>>
+0,k-2*h>p&&(p=k-2*h,k>=2*h&&k<2.4*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):k>=2.4*h&&k<2.8*h?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):k>=2.8*h&&k<3.2*h?(this.sessionVariables.labelMaxHeight=
+h,this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>=3.2*h&&k<3.6*h?(this.sessionVariables.labelMaxHeight=c,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=
+this.labelFontSize):k>3.6*h&&k<10*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>10*h&&k<50*h&&(x(this.options.labelFontSize)&&
+12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=g,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle))):(this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:
+this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:this.labelMaxWidth?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:g,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?g:Math.min((c-h*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/
+Math.cos(Math.PI/180*Math.abs(this.labelAngle)),h),x(this.options.labelWrap))?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth>this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=c):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:g,this.sessionVariables.labelMaxHeight=
+0===this.labelAngle?h:c,x(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:c,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=g):(this.sessionVariables.labelMaxHeight=h,x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=
+this.labelWrap);for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?
+this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText();for(b=0;b<this.stripLines.length;b++){var g=this.stripLines[b],
+v;if("outside"===g.labelPlacement){h=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)v="undefined"===typeof g.options.labelWrap?this.sessionVariables.labelMaxHeight:g.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize;if("left"===this._position||"right"===this._position)v="undefined"===typeof g.options.labelWrap?this.sessionVariables.labelMaxHeight:g.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;d=x(g.options.labelBackgroundColor)?"#EEEEEE":
+g.options.labelBackgroundColor}else h="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,v="undefined"===typeof g.options.labelWrap||g.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,d=x(g.options.labelBackgroundColor)?x(g.startValue)&&0!==g.startValue?u?"transparent":null:"#EEEEEE":g.options.labelBackgroundColor;a=new W(this.ctx,{x:0,y:0,backgroundColor:d,borderColor:g.labelBorderColor,
+borderThickness:g.labelBorderThickness,cornerRadius:g.labelCornerRadius,maxWidth:g.options.labelMaxWidth?g.options.labelMaxWidth:h,maxHeight:v,angle:this.labelAngle,text:g.labelFormatter?g.labelFormatter({chart:this.chart,axis:this,stripLine:g}):g.label,horizontalAlign:"left",fontSize:"outside"===g.labelPlacement?g.options.labelFontSize?g.options.labelFontSize:this.labelFontSize:g.labelFontSize,fontFamily:"outside"===g.labelPlacement?g.options.labelFontFamily?g.options.labelFontFamily:this.labelFontFamily:
+g.labelFontFamily,fontWeight:"outside"===g.labelPlacement?g.options.fontWeight?g.options.fontWeight:this.fontWeight:g.fontWeight,fontColor:g.options.labelFontColor||g.color,fontStyle:"outside"===g.labelPlacement?g.options.fontStyle?g.options.fontStyle:this.fontWeight:g.fontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:g.value,textBlock:a,effectiveHeight:null,stripLine:g})}};B.prototype.createLabelsAndCalculateWidth=function(){var a=0,d=0;this._labels=[];this._stripLineLabels=
+[];if("left"===this._position||"right"===this._position){this.createLabels();for(d=0;d<this._labels.length;d++){var b=this._labels[d].textBlock,c=b.measureText(),f=0,f=0===this.labelAngle?c.width:c.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(c.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[d].effectiveWidth=f}for(d=0;d<this._stripLineLabels.length;d++)"outside"===this._stripLineLabels[d].stripLine.labelPlacement&&(this._stripLineLabels[d].stripLine.value>
+this.viewportMinimum&&this._stripLineLabels[d].stripLine.value<this.viewportMaximum)&&(b=this._stripLineLabels[d].textBlock,c=b.measureText(),f=0===this.labelAngle?c.width:c.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(c.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[d].effectiveWidth=f)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+5};B.prototype.createLabelsAndCalculateHeight=function(){var a=0;
+this._labels=[];this._stripLineLabels=[];var d,b=0;this.createLabels();if("bottom"===this._position||"top"===this._position){for(b=0;b<this._labels.length;b++){d=this._labels[b].textBlock;var c=d.measureText(),f=0,f=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(c.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[b].effectiveHeight=f}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&
+(d=this._stripLineLabels[b].textBlock,c=d.measureText(),f=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(c.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[b].effectiveHeight=f)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+5};B.setLayoutAndRender=function(a,d,b,c,f,g){var h,l,k,m,n=a[0]?a[0].chart:d[0].chart,p=n.ctx;if(a&&0<a.length)for(var e=0;e<a.length;e++)a[e]&&a[e].calculateAxisParameters();
+if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].calculateAxisParameters();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateAxisParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateAxisParameters();var r=0,q=0,s=0,v=0,w=0,u=0,t=0,z,A,B=l=0,E,F,G,J;E=F=G=J=!1;if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock=new W(a[e].ctx,{text:a[e].title,horizontalAlign:"center",fontSize:a[e].titleFontSize,fontFamily:a[e].titleFontFamily,fontWeight:a[e].titleFontWeight,
+fontColor:a[e].titleFontColor,fontStyle:a[e].titleFontStyle,borderColor:a[e].titleBorderColor,borderThickness:a[e].titleBorderThickness,backgroundColor:a[e].titleBackgroundColor,cornerRadius:a[e].titleCornerRadius,textBaseline:"top"}));if(d&&0<d.length)for(e=0;e<d.length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock=new W(d[e].ctx,{text:d[e].title,horizontalAlign:"center",fontSize:d[e].titleFontSize,fontFamily:d[e].titleFontFamily,fontWeight:d[e].titleFontWeight,fontColor:d[e].titleFontColor,fontStyle:d[e].titleFontStyle,
+borderColor:d[e].titleBorderColor,borderThickness:d[e].titleBorderThickness,backgroundColor:d[e].titleBackgroundColor,cornerRadius:d[e].titleCornerRadius,textBaseline:"top"}));if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock=new W(b[e].ctx,{text:b[e].title,horizontalAlign:"center",fontSize:b[e].titleFontSize,fontFamily:b[e].titleFontFamily,fontWeight:b[e].titleFontWeight,fontColor:b[e].titleFontColor,fontStyle:b[e].titleFontStyle,borderColor:b[e].titleBorderColor,borderThickness:b[e].titleBorderThickness,
+backgroundColor:b[e].titleBackgroundColor,cornerRadius:b[e].titleCornerRadius,textBaseline:"top"}));if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock=new W(c[e].ctx,{text:c[e].title,horizontalAlign:"center",fontSize:c[e].titleFontSize,fontFamily:c[e].titleFontFamily,fontWeight:c[e].titleFontWeight,fontColor:c[e].titleFontColor,fontStyle:c[e].titleFontStyle,borderColor:c[e].titleBorderColor,borderThickness:c[e].titleBorderThickness,backgroundColor:c[e].titleBackgroundColor,
+cornerRadius:c[e].titleCornerRadius,textBaseline:"top"}));if("normal"===f){var v=[],w=[],u=[],t=[],H=[],I=[],M=[],K=[];if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock.maxWidth=a[e].titleMaxWidth||g.width,a[e]._titleTextBlock.maxHeight=a[e].titleWrap?0.8*g.height:1.5*a[e].titleFontSize,a[e]._titleTextBlock.angle=0);if(d&&0<d.length)for(e=0;e<d[e].length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock.maxWidth=d[e].titleMaxWidth||g.width,d[e]._titleTextBlock.maxHeight=d[e].titleWrap?
+0.8*g.height:1.5*d[e].titleFontSize,d[e]._titleTextBlock.angle=0);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock.maxWidth=b[e].titleMaxWidth||g.height,b[e]._titleTextBlock.maxHeight=b[e].titleWrap?0.8*g.width:1.5*b[e].titleFontSize,b[e]._titleTextBlock.angle=-90);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock.maxWidth=c[e].titleMaxWidth||g.height,c[e]._titleTextBlock.maxHeight=c[e].titleWrap?0.8*g.width:1.5*c[e].titleFontSize,c[e]._titleTextBlock.angle=
+90);for(;4>r;){var N=0,Q=0,P=0,O=0,L=f=0,C=0,S=0,X=0,V=0,U=0,T=0;if(b&&0<b.length)for(u=[],e=U=0;e<b.length;e++)u.push(Math.ceil(b[e]?b[e].createLabelsAndCalculateWidth():0)),U+=u[e],C+=b[e]?b[e].margin:0;else u.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));M.push(u);if(c&&0<c.length)for(t=[],e=T=0;e<c.length;e++)t.push(Math.ceil(c[e]?c[e].createLabelsAndCalculateWidth():0)),T+=t[e],S+=c[e]?c[e].margin:0;else t.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));K.push(t);
+h=Math.round(g.x1+U+C);k=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S);if(a&&0<a.length)for(v=[],e=X=0;e<a.length;e++)a[e]&&(a[e].lineCoordinates={}),a[e].lineCoordinates.width=Math.abs(k-h),a[e].title&&(a[e]._titleTextBlock.maxWidth=0<a[e].titleMaxWidth&&a[e].titleMaxWidth<a[e].lineCoordinates.width?a[e].titleMaxWidth:a[e].lineCoordinates.width),v.push(Math.ceil(a[e]?a[e].createLabelsAndCalculateHeight():0)),X+=v[e],f+=a[e]?a[e].margin:0;else v.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():
+0));H.push(v);if(d&&0<d.length)for(w=[],e=V=0;e<d.length;e++)d[e]&&(d[e].lineCoordinates={}),d[e].lineCoordinates.width=Math.abs(k-h),d[e].title&&(d[e]._titleTextBlock.maxWidth=0<d[e].titleMaxWidth&&d[e].titleMaxWidth<d[e].lineCoordinates.width?d[e].titleMaxWidth:d[e].lineCoordinates.width),w.push(Math.ceil(d[e]?d[e].createLabelsAndCalculateHeight():0)),V+=w[e],L+=d[e]?d[e].margin:0;else w.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateHeight():0));I.push(w);if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&
+(a[e].lineCoordinates.x1=h,a[e].lineCoordinates.x2=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S),a[e]._labels&&1<a[e]._labels.length&&(l=m=0,m=a[e]._labels[1],l="dateTime"===a[e].chart.plotInfo.axisXValueType?a[e]._labels[a[e]._labels.length-2]:a[e]._labels[a[e]._labels.length-1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),s=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+
+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),a[e]&&(a[e].labelAutoFit&&!x(z)&&!x(A))&&(l=0,0<a[e].labelAngle?A+s>k&&(l+=0<a[e].labelAngle?A+s-k-T:0):0>a[e].labelAngle?z-q<h&&z-q<a[e].viewportMinimum&&(B=h-(C+a[e].tickLength+u+z-q+a[e].labelFontSize/2)):0===a[e].labelAngle&&(A+s>k&&(l=A+s/2-k-T),z-q<h&&z-q<a[e].viewportMinimum&&(B=h-C-a[e].tickLength-u-z+q/2)),a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0<a[e].labelAngle&&
+0<l?k-=l:a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0>a[e].labelAngle&&0<B?h+=B:a[e].viewportMaximum===a[e].maximum&&a[e].viewportMinimum===a[e].minimum&&0===a[e].labelAngle&&(0<B&&(h+=B),0<l&&(k-=l))),n.panEnabled?X=n.sessionVariables.axisX.height:n.sessionVariables.axisX.height=X,l=Math.round(g.y2-X-f+N),m=Math.round(g.y2),a[e].lineCoordinates.x2=k,a[e].lineCoordinates.width=k-h,a[e].lineCoordinates.y1=l,a[e].lineCoordinates.y2=l,a[e].bounds={x1:h,y1:l,x2:k,y2:m-(X+
+f-v[e]-N),width:k-h,height:m-l}),N+=v[e]+a[e].margin;if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].lineCoordinates.x1=Math.round(g.x1+U+C),d[e].lineCoordinates.x2=Math.round(g.x2-T-S>n.width-10?n.width-10:g.x2-T-S),d[e].lineCoordinates.width=Math.abs(k-h),d[e]._labels&&1<d[e]._labels.length&&(m=d[e]._labels[1],l="dateTime"===d[e].chart.plotInfo.axisXValueType?d[e]._labels[d[e]._labels.length-2]:d[e]._labels[d[e]._labels.length-1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+
+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),s=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),n.panEnabled?V=n.sessionVariables.axisX2.height:n.sessionVariables.axisX2.height=V,l=Math.round(g.y1),m=Math.round(g.y2+d[e].margin),d[e].lineCoordinates.y1=l+V+L-Q,d[e].lineCoordinates.y2=l,d[e].bounds={x1:h,y1:l+(V+L-w[e]-Q),x2:k,y2:m,width:k-
+h,height:m-l},Q+=w[e]+d[e].margin;if(b&&0<b.length)for(e=0;e<b.length;e++)C=10,b[e]&&(h=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),C=b[e]._labels&&0<b[e]._labels.length?b[e]._labels[b[e]._labels.length-1].textBlock.height/2:10,l=Math.round(g.y1+V+L<Math.max(C,10)?Math.max(C,10):g.y1+V+L),k=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),C=0<a.length?0:b[e]._labels[0].textBlock.height/2,m=Math.round(g.y2-X-f-C),b[e].lineCoordinates={x1:k-P,y1:l,x2:k-P,y2:m,height:Math.abs(m-
+l)},b[e].bounds={x1:h-(u[e]+P),y1:l,x2:k,y2:m,width:k-h,height:m-l},b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.height?b[e].titleMaxWidth:b[e].lineCoordinates.height),P+=u[e]+b[e].margin);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&(h=Math.round(a[0]?a[0].lineCoordinates.x2:d[0].lineCoordinates.x2),k=Math.round(h),C=c[e]._labels&&0<c[e]._labels.length?c[e]._labels[c[e]._labels.length-1].textBlock.height/2:0,l=Math.round(g.y1+V+L<Math.max(C,
+10)?Math.max(C,10):g.y1+V+L),C=0<a.length?0:c[e]._labels[0].textBlock.height/2,m=Math.round(g.y2-(X+f+C)),c[e].lineCoordinates={x1:h+O,y1:l,x2:h+O,y2:m,height:Math.abs(m-l)},c[e].bounds={x1:h,y1:l,x2:k+(t[e]+O),y2:m,width:k-h,height:m-l},c[e].title&&(c[e]._titleTextBlock.maxWidth=0<c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.height?c[e].titleMaxWidth:c[e].lineCoordinates.height),O+=t[e]+c[e].margin);if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&(a[e].calculateValueToPixelConversionParameters(),
+a[e]._labels&&1<a[e]._labels.length&&(z=(a[e].logarithmic?Math.log(a[e]._labels[1].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[1].position-a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1,A="dateTime"===a[e].chart.plotInfo.axisXValueType?(a[e].logarithmic?Math.log(a[e]._labels[a[e]._labels.length-2].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[a[e]._labels.length-2].position-
+a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1:(a[e].logarithmic?Math.log(a[e]._labels[a[e]._labels.length-1].position/a[e].viewportMinimum)/a[e].conversionParameters.lnLogarithmBase:a[e]._labels[a[e]._labels.length-1].position-a[e].viewportMinimum)*Math.abs(a[e].conversionParameters.pixelPerUnit)+a[e].lineCoordinates.x1));if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].calculateValueToPixelConversionParameters(),d[e]._labels&&1<d[e]._labels.length&&(z=
+(d[e].logarithmic?Math.log(d[e]._labels[1].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[1].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+d[e].lineCoordinates.x1,A="dateTime"===d[e].chart.plotInfo.axisXValueType?(d[e].logarithmic?Math.log(d[e]._labels[d[e]._labels.length-2].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[d[e]._labels.length-2].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+
+d[e].lineCoordinates.x1:(d[e].logarithmic?Math.log(d[e]._labels[d[e]._labels.length-1].position/d[e].viewportMinimum)/d[e].conversionParameters.lnLogarithmBase:d[e]._labels[d[e]._labels.length-1].position-d[e].viewportMinimum)*Math.abs(d[e].conversionParameters.pixelPerUnit)+d[e].lineCoordinates.x1);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateValueToPixelConversionParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateValueToPixelConversionParameters();if(0<r){if(a&&0<a.length)for(e=
+0;e<a.length;e++)E=H[r-1][e]===H[r][e]?!0:!1;else E=!0;if(d&&0<d.length)for(e=0;e<d.length;e++)F=I[r-1][e]===I[r][e]?!0:!1;else F=!0;if(b&&0<b.length)for(e=0;e<b.length;e++)G=M[r-1][e]===M[r][e]?!0:!1;else G=!0;if(c&&0<c.length)for(e=0;e<c.length;e++)J=K[r-1][e]===K[r][e]?!0:!1;else J=!0}if(E&&F&&G&&J)break;r++}p.save();p.beginPath();a[0]&&p.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[0].bounds.height);d[0]&&p.rect(5,d[d.length-1].bounds.y1,d[0].chart.width-10,d[0].bounds.height);p.clip();if(a&&0<
+a.length)for(e=0;e<a.length;e++)a[e].renderLabelsTicksAndTitle();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderLabelsTicksAndTitle();p.restore();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderLabelsTicksAndTitle();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderLabelsTicksAndTitle()}else{z=[];A=[];B=[];q=[];s=[];H=[];I=[];M=[];if(a&&0<a.length)for(e=0;e<a.length;e++)a[e]&&a[e].title&&(a[e]._titleTextBlock.maxWidth=a[e].titleMaxWidth||g.width,a[e]._titleTextBlock.maxHeight=a[e].titleWrap?
+0.8*g.height:1.5*a[e].titleFontSize,a[e]._titleTextBlock.angle=-90);if(d&&0<d.length)for(e=0;e<d.length;e++)d[e]&&d[e].title&&(d[e]._titleTextBlock.maxWidth=d[e].titleMaxWidth||g.width,d[e]._titleTextBlock.maxHeight=d[e].titleWrap?0.8*g.height:1.5*d[e].titleFontSize,d[e]._titleTextBlock.angle=90);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e]&&b[e].title&&(b[e]._titleTextBlock.maxWidth=b[e].titleMaxWidth||g.width,b[e]._titleTextBlock.maxHeight=b[e].titleWrap?0.8*g.height:1.5*b[e].titleFontSize,b[e]._titleTextBlock.angle=
+0);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&c[e].title&&(c[e]._titleTextBlock.maxWidth=c[e].titleMaxWidth||g.width,c[e]._titleTextBlock.maxHeight=c[e].titleWrap?0.8*g.height:1.5*c[e].titleFontSize,c[e]._titleTextBlock.angle=0);for(;4>r;){V=X=U=O=S=C=L=f=P=K=Q=N=0;if(a&&0<a.length)for(B=[],e=X=0;e<a.length;e++)B.push(Math.ceil(a[e]?a[e].createLabelsAndCalculateWidth():0)),X+=B[e],f+=a[e]?a[e].margin:0;else B.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));I.push(B);if(d&&0<d.length)for(q=
+[],e=V=0;e<d.length;e++)q.push(Math.ceil(d[e]?d[e].createLabelsAndCalculateWidth():0)),V+=q[e],L+=d[e]?d[e].margin:0;else q.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateWidth():0));M.push(q);if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].lineCoordinates={},h=Math.round(g.x1+X+f),k=Math.round(g.x2-V-L>n.width-10?n.width-10:g.x2-V-L),b[e].labelAutoFit&&!x(v)&&(0<!a.length&&(h=0>b[e].labelAngle?Math.max(h,v):0===b[e].labelAngle?Math.max(h,v/2):h),0<!d.length&&(k=0<b[e].labelAngle?k-w/2:0===b[e].labelAngle?
+k-w/2:k)),b[e].lineCoordinates.x1=h,b[e].lineCoordinates.x2=k,b[e].lineCoordinates.width=Math.abs(k-h),b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.width?b[e].titleMaxWidth:b[e].lineCoordinates.width);if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].lineCoordinates={},h=Math.round(g.x1+X+f),k=Math.round(g.x2-V-L>c[e].chart.width-10?c[e].chart.width-10:g.x2-V-L),c[e]&&c[e].labelAutoFit&&!x(u)&&(0<!a.length&&(h=0<c[e].labelAngle?Math.max(h,u):
+0===c[e].labelAngle?Math.max(h,u/2):h),0<!d.length&&(k-=t/2)),c[e].lineCoordinates.x1=h,c[e].lineCoordinates.x2=k,c[e].lineCoordinates.width=Math.abs(k-h),c[e].title&&(c[e]._titleTextBlock.maxWidth=0<c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.width?c[e].titleMaxWidth:c[e].lineCoordinates.width);if(b&&0<b.length)for(z=[],e=O=0;e<b.length;e++)z.push(Math.ceil(b[e]?b[e].createLabelsAndCalculateHeight():0)),O+=z[e]+b[e].margin,C+=b[e].margin;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():
+0));s.push(z);if(c&&0<c.length)for(A=[],e=U=0;e<c.length;e++)A.push(Math.ceil(c[e]?c[e].createLabelsAndCalculateHeight():0)),U+=A[e],S+=c[e].margin;else A.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));H.push(A);if(b&&0<b.length)for(e=0;e<b.length;e++)0<b[e]._labels.length&&(m=b[e]._labels[0],l=b[e]._labels[b[e]._labels.length-1],v=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),
+w=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(c&&0<c.length)for(e=0;e<c.length;e++)c[e]&&0<c[e]._labels.length&&(m=c[e]._labels[0],l=c[e]._labels[c[e]._labels.length-1],u=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),t=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+
+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(n.panEnabled)for(e=0;e<b.length;e++)z[e]=n.sessionVariables.axisY.height;else for(e=0;e<b.length;e++)n.sessionVariables.axisY.height=z[e];if(b&&0<b.length)for(e=b.length-1;0<=e;e--)l=Math.round(g.y2),m=Math.round(g.y2>b[e].chart.height-10?b[e].chart.height-10:g.y2),b[e].lineCoordinates.y1=l-(z[e]+b[e].margin+N),b[e].lineCoordinates.y2=l-(z[e]+b[e].margin+N),b[e].bounds={x1:h,y1:l-(z[e]+N+b[e].margin),
+x2:k,y2:m-(N+b[e].margin),width:k-h,height:z[e]},b[e].title&&(b[e]._titleTextBlock.maxWidth=0<b[e].titleMaxWidth&&b[e].titleMaxWidth<b[e].lineCoordinates.width?b[e].titleMaxWidth:b[e].lineCoordinates.width),N+=z[e]+b[e].margin;if(c&&0<c.length)for(e=c.length-1;0<=e;e--)c[e]&&(l=Math.round(g.y1),m=Math.round(g.y1+(A[e]+c[e].margin+Q)),c[e].lineCoordinates.y1=m,c[e].lineCoordinates.y2=m,c[e].bounds={x1:h,y1:l+(c[e].margin+Q),x2:k,y2:m,width:k-h,height:U},c[e].title&&(c[e]._titleTextBlock.maxWidth=0<
+c[e].titleMaxWidth&&c[e].titleMaxWidth<c[e].lineCoordinates.width?c[e].titleMaxWidth:c[e].lineCoordinates.width),Q+=A[e]+c[e].margin);if(a&&0<a.length)for(e=0;e<a.length;e++){C=a[e]._labels&&0<a[e]._labels.length?a[e]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+f);l=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y2:g.y1<Math.max(C,10)?Math.max(C,10):g.y1):g.y1<Math.max(C,10)?Math.max(C,10):g.y1;k=Math.round(g.x1+X+f);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y1:g.y2-O>n.height-
+Math.max(C,10)?n.height-Math.max(C,10):g.y2-O):g.y2>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2;if(b&&0<b.length)for(C=0;C<b.length;C++)b[C]&&b[C].labelAutoFit&&(k=0>b[C].labelAngle?Math.max(k,v):0===b[C].labelAngle?Math.max(k,v/2):k,h=0>b[C].labelAngle||0===b[C].labelAngle?k-X:h);if(c&&0<c.length)for(C=0;C<c.length;C++)c[C]&&c[C].labelAutoFit&&(k=c[C].lineCoordinates.x1,h=k-X);a[e].lineCoordinates={x1:k-K,y1:l,x2:k-K,y2:m,height:Math.abs(m-l)};a[e].bounds={x1:k-(B[e]+K),y1:l,x2:k,y2:m,width:k-
+h,height:m-l};a[e].title&&(a[e]._titleTextBlock.maxWidth=0<a[e].titleMaxWidth&&a[e].titleMaxWidth<a[e].lineCoordinates.height?a[e].titleMaxWidth:a[e].lineCoordinates.height);a[e].calculateValueToPixelConversionParameters();K+=B[e]+a[e].margin}if(d&&0<d.length)for(e=0;e<d.length;e++){C=d[e]._labels&&0<d[e]._labels.length?d[e]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1-f);l=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y2:g.y1<Math.max(C,10)?Math.max(C,10):g.y1):g.y1<Math.max(C,10)?Math.max(C,
+10):g.y1;k=Math.round(g.x2-V-L);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y1:g.y2-O>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2-O):g.y2>n.height-Math.max(C,10)?n.height-Math.max(C,10):g.y2;if(b&&0<b.length)for(C=0;C<b.length;C++)b[C]&&b[C].labelAutoFit&&(k=0>b[C].labelAngle?Math.max(k,v):0===b[e].labelAngle?Math.max(k,v/2):k,h=0>b[C].labelAngle||0===b[C].labelAngle?k-V:h);if(c&&0<c.length)for(C=0;C<c.length;C++)c[C]&&c[C].labelAutoFit&&(k=c[C].lineCoordinates.x2,h=k-V);d[e].lineCoordinates=
+{x1:k+P,y1:l,x2:k+P,y2:m,height:Math.abs(m-l)};d[e].bounds={x1:h,y1:l,x2:k,y2:m,width:k-h,height:m-l};d[e].title&&(d[e]._titleTextBlock.maxWidth=0<d[e].titleMaxWidth&&d[e].titleMaxWidth<d[e].lineCoordinates.height?d[e].titleMaxWidth:d[e].lineCoordinates.height);d[e].calculateValueToPixelConversionParameters();P+=q[e]+d[e].margin}if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].calculateValueToPixelConversionParameters();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].calculateValueToPixelConversionParameters();
+if(0<r){if(a&&0<a.length)for(e=0;e<a.length;e++)E=I[r-1][e]===I[r][e]?!0:!1;else E=!0;if(d&&0<d.length)for(e=0;e<d.length;e++)F=M[r-1][e]===M[r][e]?!0:!1;else F=!0;if(b&&0<b.length)for(e=0;e<b.length;e++)G=s[r-1][e]===s[r][e]?!0:!1;else G=!0;if(c&&0<c.length)for(e=0;e<c.length;e++)J=H[r-1][e]===H[r][e]?!0:!1;else J=!0}if(E&&F&&G&&J)break;r++}if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderLabelsTicksAndTitle();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderLabelsTicksAndTitle();if(a&&0<a.length)for(e=
+0;e<a.length;e++)a[e].renderLabelsTicksAndTitle();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderLabelsTicksAndTitle()}n.preparePlotArea();g=n.plotArea;p.save();p.beginPath();p.rect(g.x1,g.y1,Math.abs(g.x2-g.x1),Math.abs(g.y2-g.y1));p.clip();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderStripLinesOfThicknessType("value");if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderStripLinesOfThicknessType("value");
+if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderInterlacedColors();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderInterlacedColors();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderInterlacedColors();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderInterlacedColors();p.restore();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderGrid();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderGrid();if(b&&0<
+b.length)for(e=0;e<b.length;e++)b[e].renderGrid();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderGrid();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderAxisLine();if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderAxisLine();if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderAxisLine();if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderAxisLine();if(a&&0<a.length)for(e=0;e<a.length;e++)a[e].renderStripLinesOfThicknessType("pixel");if(d&&0<d.length)for(e=0;e<d.length;e++)d[e].renderStripLinesOfThicknessType("pixel");
+if(b&&0<b.length)for(e=0;e<b.length;e++)b[e].renderStripLinesOfThicknessType("pixel");if(c&&0<c.length)for(e=0;e<c.length;e++)c[e].renderStripLinesOfThicknessType("pixel")};B.prototype.renderLabelsTicksAndTitle=function(){var a=!1,d=0,b=0,c=1,f=0;0!==this.labelAngle&&360!==this.labelAngle&&(c=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var d=[],c=0!==this.labelAngle&&
+360!==this.labelAngle?1:1.2,g,h=this.viewportMaximum,l=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(k===this._labels.length-1||g<Math.log(h/n.position)*l/c)||(d.push(n),h=n.position,g=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=d}else{for(k=0;k<this._labels.length;k++)n=
+this._labels[k],n.position<this.viewportMinimum||(n=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),d+=n);d>this.lineCoordinates.width*c&&this.labelAutoFit&&(a=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var d=[],m,h=this.viewportMaximum,l=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];
+if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(k===this._labels.length-1||m<Math.log(h/n.position)*l)||(d.push(n),h=n.position,m=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=d}else{for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||(n=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/
+180*this.labelAngle)),b+=n);b>this.lineCoordinates.height*c&&this.labelAutoFit&&(a=!0)}}if("bottom"===this._position){for(var n,k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,
+b.y<<0),this.ctx.lineTo(c,b.y+this.tickLength<<0),this.ctx.stroke()),0===n.textBlock.angle?(b.x-=n.textBlock.width/2,b.y+=this.tickLength+n.textBlock.fontSize/2):(b.x-=0>this.labelAngle?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+Math.abs(0>this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),n.textBlock.x=b.x,n.textBlock.y=b.y,n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=
+this.tickColor,c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y-this.tickLength<<0),this.ctx.stroke()),0===n.textBlock.angle?(b.x-=n.textBlock.width/2,b.y-=this.tickLength+n.textBlock.height/2):(b.x+=(n.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),b.y-=this.tickLength+(n.textBlock.height/2*Math.cos(Math.PI/
+180*this.labelAngle)+(0<this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0))),n.textBlock.x=b.x,n.textBlock.y=b.y,n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k=0;k<this._labels.length;k++)n=
+this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x-this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle?(n.textBlock.y=b.y,n.textBlock.x=b.x-n.textBlock.width*Math.cos(Math.PI/
+180*this.labelAngle)-this.tickLength-5):(n.textBlock.y=b.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),n.textBlock.x=0<this.labelAngle?b.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:b.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength),n.textBlock.render(!0)));this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=
+this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(b=this.getPixelCoordinatesOnAxis(n.position),a&&0!==f++%2&&this.labelAutoFit||(this.tickThickness&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,c=1===this.ctx.lineWidth%
+2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x+this.tickLength<<0,c),this.ctx.stroke()),0===this.labelAngle?(n.textBlock.y=b.y,n.textBlock.x=b.x+this.tickLength+5):(n.textBlock.y=0>this.labelAngle?b.y:b.y-(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x=0<this.labelAngle?b.x+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:b.x+this.tickLength+5),n.textBlock.render(!0)));
+this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}};B.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,d,b,c=this.chart.plotArea,f=0;d=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,
+f=0;f<this._labels.length;f++)d?(d=this.getPixelCoordinatesOnAxis(this._labels[f].position),b=f+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[f+1].position),a.fillRect(Math.min(b.x,d.x),c.y1,Math.abs(b.x-d.x),Math.abs(c.y1-c.y2)),d=!1):d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,f=0;f<this._labels.length;f++)d?(b=this.getPixelCoordinatesOnAxis(this._labels[f].position),
+d=f+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[f+1].position),a.fillRect(c.x1,Math.min(b.y,d.y),Math.abs(c.x1-c.x2),Math.abs(d.y-b.y)),d=!1):d=!0;a.beginPath()};B.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){for(var d=this,b,c=0,f=0,g=!1,h=!1,l=[],k=[],h=!1,c=0;c<this.stripLines.length;c++){var m=this.stripLines[c];m._thicknessType===a&&("pixel"===a&&(m.value<this.viewportMinimum||
+m.value>this.viewportMaximum||x(m.value)||isNaN(this.range))||l.push(m))}for(c=0;c<this._stripLineLabels.length;c++)if(m=this.stripLines[c],b=this._stripLineLabels[c],!(b.position<this.viewportMinimum||b.position>this.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(b.position);if("outside"===b.stripLine.labelPlacement)if(m&&(this.ctx.strokeStyle=m.color,"pixel"===m._thicknessType&&(this.ctx.lineWidth=m.thickness)),"bottom"===this._position){var n=1===this.ctx.lineWidth%2?(a.x<<
+0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(n,a.y<<0);this.ctx.lineTo(n,a.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y+=this.tickLength+b.textBlock.fontSize/2):(a.x-=0>this.labelAngle?b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(n=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(n,
+a.y<<0),this.ctx.lineTo(n,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=b.textBlock.width/2,a.y-=this.tickLength+b.textBlock.height):(a.x+=(b.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),a.y-=this.tickLength+(b.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))):"left"===
+this._position?(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,n),this.ctx.lineTo(a.x-this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(a.y-=b.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:a.x-b.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(b.textBlock.height-
+b.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength)):"right"===this._position&&(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,n),this.ctx.lineTo(a.x+this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x+this.tickLength+5:(a.y=0>this.labelAngle?a.y:a.y-(b.textBlock.height-b.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x+(b.textBlock.height-b.textBlock.fontSize/2-5)*Math.sin(Math.PI/
+180*this.labelAngle)+this.tickLength:a.x+this.tickLength+5));else b.textBlock.angle=-90,"bottom"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.height-3,b.textBlock.measureText(),a.x-b.textBlock.height>this.chart.plotArea.x1?x(m.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,x(m.startValue)?a.x+=b.textBlock.height-b.textBlock.fontSize/
+2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y1+b.textBlock.width+3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y2-b.textBlock.width-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?
+(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.height-3,b.textBlock.measureText(),a.x-b.textBlock.height>this.chart.plotArea.x1?x(m.startValue)?a.x-=b.textBlock.height-b.textBlock.fontSize/2:a.x-=b.textBlock.height/2-b.textBlock.fontSize/2+3:(b.textBlock.angle=90,x(m.startValue)?a.x+=b.textBlock.height-b.textBlock.fontSize/2:a.x+=b.textBlock.height/2-b.textBlock.fontSize/2+3),a.y=-90===b.textBlock.angle?"near"===b.stripLine.labelAlign?
+this.chart.plotArea.y1+b.textBlock.width+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+b.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===b.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-b.textBlock.width)/2:this.chart.plotArea.y2-b.textBlock.width-3):"left"===this._position?(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:
+this.chart.plotArea.width-3,b.textBlock.angle=0,b.textBlock.measureText(),a.y-b.textBlock.height>this.chart.plotArea.y1?x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize+3:a.y-b.textBlock.height<this.chart.plotArea.y2?a.y+=b.textBlock.fontSize/2+3:x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize+3,a.x="near"===b.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===b.stripLine.labelAlign?
+(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-b.textBlock.width/2:this.chart.plotArea.x2-b.textBlock.width-3):"right"===this._position&&(b.textBlock.maxWidth=this.options.stripLines[c].labelMaxWidth?this.options.stripLines[c].labelMaxWidth:this.chart.plotArea.width-3,b.textBlock.angle=0,b.textBlock.measureText(),a.y-+b.textBlock.height>this.chart.plotArea.y1?x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize/2-3:a.y-b.textBlock.height<
+this.chart.plotArea.y2?a.y+=b.textBlock.fontSize/2+3:x(m.startValue)?a.y-=b.textBlock.height-b.textBlock.fontSize/2:a.y-=b.textBlock.height/2-b.textBlock.fontSize/2+3,a.x="near"===b.stripLine.labelAlign?this.chart.plotArea.x2-b.textBlock.width-3:"center"===b.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-b.textBlock.width/2:this.chart.plotArea.x1+3);b.textBlock.x=a.x;b.textBlock.y=a.y;k.push(b)}if(!h){h=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,
+this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(c=0;c<l.length;c++)m=l[c],m.showOnTop?g||(g=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(f=0;f<l.length;f++)m=l[f],m.showOnTop&&m.render();this.ctx.restore()},m)):m.render();for(c=0;c<k.length;c++)b=k[c],b.stripLine.showOnTop?
+h||(h=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(f=0;f<k.length;f++)b=k[f],"inside"===b.stripLine.labelPlacement&&b.stripLine.showOnTop&&(d.ctx.save(),d.ctx.beginPath(),d.ctx.rect(d.chart.plotArea.x1,d.chart.plotArea.y1,d.chart.plotArea.width,d.chart.plotArea.height),d.ctx.clip(),b.textBlock.render(!0),d.ctx.restore())},b.textBlock)):"inside"===b.stripLine.labelPlacement&&b.textBlock.render(!0);this.ctx.restore();h=!0}if(h)for(h=!1,c=0;c<k.length;c++)b=k[c],b.stripLine.showOnTop?
+h||(h=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(f=0;f<k.length;f++)b=k[f],"outside"===b.stripLine.labelPlacement&&b.stripLine.showOnTop&&b.textBlock.render(!0)},b.textBlock)):"outside"===b.stripLine.labelPlacement&&b.textBlock.render(!0)}};B.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var d,b=this.chart.plotArea;a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(I(this.gridDashType,
+this.gridThickness));if("bottom"===this._position||"top"===this._position)for(c=0;c<this._labels.length;c++)this._labels[c].position<this.viewportMinimum||this._labels[c].position>this.viewportMaximum||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.x<<0)+0.5:d.x<<0,a.moveTo(d,b.y1<<0),a.lineTo(d,b.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var c=0;c<this._labels.length;c++)this._labels[c].position<this.viewportMinimum||
+this._labels[c].position>this.viewportMaximum||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[c].position),d=1===a.lineWidth%2?(d.y<<0)+0.5:d.y<<0,a.moveTo(b.x1<<0,d),a.lineTo(b.x2<<0,d),a.stroke());a.restore()}};B.prototype.renderAxisLine=function(){var a=this.chart.ctx;a.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){a.lineWidth=this.lineThickness;a.strokeStyle=this.lineColor?this.lineColor:"black";a.setLineDash&&a.setLineDash(I(this.lineDashType,
+this.lineThickness));var d=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;a.beginPath();a.moveTo(this.lineCoordinates.x1,d);a.lineTo(this.lineCoordinates.x2,d);a.stroke()}}else"left"!==this._position&&"right"!==this._position||!this.lineThickness||(a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor,a.setLineDash&&a.setLineDash(I(this.lineDashType,this.lineThickness)),d=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<
+0,a.beginPath(),a.moveTo(d,this.lineCoordinates.y1),a.lineTo(d,this.lineCoordinates.y2),a.stroke());a.restore()};B.prototype.getPixelCoordinatesOnAxis=function(a){var d={};if("bottom"===this._position||"top"===this._position)d.x=this.convertValueToPixel(a),d.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)d.y=this.convertValueToPixel(a),d.x=this.lineCoordinates.x2;return d};B.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var d=0,d=0,
+d="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;return d=this.logarithmic?Math.pow(this.logarithmBase,(d-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit)*this.viewportMinimum:this.conversionParameters.minimum+(d-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit};B.prototype.convertValueToPixel=function(a){return this.logarithmic?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*Math.log(a/
+this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0};B.prototype.setViewPortRange=function(a,d){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,d);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,d)};B.prototype.getXValueAt=function(a){if(!a)return null;var d=null;"left"===this._position?d=this.convertPixelToValue(a.y):
+"bottom"===this._position&&(d=this.convertPixelToValue(a.x));return d};B.prototype.calculateValueToPixelConversionParameters=function(a){a={pixelPerUnit:null,minimum:null,reference:null};var d=this.lineCoordinates.width,b=this.lineCoordinates.height;a.minimum=this.viewportMinimum;if("bottom"===this._position||"top"===this._position)this.logarithmic?(a.lnLogarithmBase=Math.log(this.logarithmBase),a.pixelPerUnit=(this.reversed?-1:1)*d*a.lnLogarithmBase/Math.log(Math.abs(this.range))):a.pixelPerUnit=
+(this.reversed?-1:1)*d/Math.abs(this.range),a.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?(a.lnLogarithmBase=Math.log(this.logarithmBase),a.pixelPerUnit=(this.reversed?1:-1)*b*a.lnLogarithmBase/Math.log(Math.abs(this.range))):a.pixelPerUnit=(this.reversed?1:-1)*b/Math.abs(this.range),a.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=a};B.prototype.calculateAxisParameters=
+function(){if(this.logarithmic)this.calculateLogarithamicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),d=!1,b=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,c=4;"axisX"===this.type&&(c=600>this.maxWidth?8:6);var a=Math.max(c,Math.floor(this.maxWidth/
+a)),f,g,h,c=0;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(f=0;f<this.dataSeries.length;f++)"dateTime"===this.dataSeries[f].xValueType&&(b=!0);f=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin;g=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax;
+0===g-f&&(c="undefined"===typeof this.options.interval?0.4:this.options.interval,g+=c,f-=c);Infinity!==this.dataInfo.minDiff?h=this.dataInfo.minDiff:1<g-f?h=0.5*Math.abs(g-f):(h=1,b&&(d=!0))}else"axisY"===this.type&&(f=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,g=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(f)||isFinite(g)?isFinite(f)?isFinite(g)||(g=f):f=g:(g="undefined"===typeof this.options.interval?-Infinity:this.options.interval,
+f=0),0===f&&0===g?(g+=9,f=0):0===g-f?(c=Math.min(Math.abs(0.01*Math.abs(g)),5),g+=c,f-=c):f>g?(c=Math.min(Math.abs(0.01*Math.abs(g-f)),5),0<=g?f=g-c:g=f+c):(c=Math.min(Math.abs(0.01*Math.abs(g-f)),0.05),0!==g&&(g+=c),0!==f&&(f-=c)),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<f&&(f=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>g&&(g=0));c=(isNaN(this.viewportMaximum)||
+null===this.viewportMaximum?g:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?f:this.viewportMinimum);if("axisX"===this.type&&b){this.intervalType||(c/1<=a?(this.interval=1,this.intervalType="millisecond"):c/2<=a?(this.interval=2,this.intervalType="millisecond"):c/5<=a?(this.interval=5,this.intervalType="millisecond"):c/10<=a?(this.interval=10,this.intervalType="millisecond"):c/20<=a?(this.interval=20,this.intervalType="millisecond"):c/50<=a?(this.interval=50,this.intervalType=
+"millisecond"):c/100<=a?(this.interval=100,this.intervalType="millisecond"):c/200<=a?(this.interval=200,this.intervalType="millisecond"):c/250<=a?(this.interval=250,this.intervalType="millisecond"):c/300<=a?(this.interval=300,this.intervalType="millisecond"):c/400<=a?(this.interval=400,this.intervalType="millisecond"):c/500<=a?(this.interval=500,this.intervalType="millisecond"):c/(1*E.secondDuration)<=a?(this.interval=1,this.intervalType="second"):c/(2*E.secondDuration)<=a?(this.interval=2,this.intervalType=
+"second"):c/(5*E.secondDuration)<=a?(this.interval=5,this.intervalType="second"):c/(10*E.secondDuration)<=a?(this.interval=10,this.intervalType="second"):c/(15*E.secondDuration)<=a?(this.interval=15,this.intervalType="second"):c/(20*E.secondDuration)<=a?(this.interval=20,this.intervalType="second"):c/(30*E.secondDuration)<=a?(this.interval=30,this.intervalType="second"):c/(1*E.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):c/(2*E.minuteDuration)<=a?(this.interval=2,this.intervalType=
+"minute"):c/(5*E.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):c/(10*E.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):c/(15*E.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):c/(20*E.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):c/(30*E.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):c/(1*E.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):c/(2*E.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):
+c/(3*E.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):c/(6*E.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):c/(1*E.dayDuration)<=a?(this.interval=1,this.intervalType="day"):c/(2*E.dayDuration)<=a?(this.interval=2,this.intervalType="day"):c/(4*E.dayDuration)<=a?(this.interval=4,this.intervalType="day"):c/(1*E.weekDuration)<=a?(this.interval=1,this.intervalType="week"):c/(2*E.weekDuration)<=a?(this.interval=2,this.intervalType="week"):c/(3*E.weekDuration)<=a?(this.interval=
+3,this.intervalType="week"):c/(1*E.monthDuration)<=a?(this.interval=1,this.intervalType="month"):c/(2*E.monthDuration)<=a?(this.interval=2,this.intervalType="month"):c/(3*E.monthDuration)<=a?(this.interval=3,this.intervalType="month"):c/(6*E.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=c/(1*E.yearDuration)<=a?1:c/(2*E.yearDuration)<=a?2:c/(4*E.yearDuration)<=a?4:Math.floor(B.getNiceNumber(c/(a-1),!0)/E.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||
+isNaN(this.viewportMinimum))this.viewportMinimum=f-h/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=g+h/2;d?this.autoValueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString=
+"hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString="fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";c=B.getNiceNumber(c,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:B.getNiceNumber(c/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=
+"axisX"===this.type?f-h/2:Math.floor(f/this.interval)*this.interval;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?g+h/2:Math.ceil(g/this.interval)*this.interval;0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/
+(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(f=null!==this.minimum?this.minimum:this.dataInfo.min,g=null!==this.maximum?this.maximum:this.dataInfo.max,0===g-f&&(c="undefined"===typeof this.options.interval?0.4:this.options.interval,g+=c,f-=c),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1):"axisY"===this.type&&(f=null!==this.minimum?this.minimum:this.dataInfo.min,g=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(f)||
+isFinite(g)?0===f&&0===g?(g+=9,f=0):0===g-f?(c=Math.min(Math.abs(0.01*Math.abs(g)),5),g+=c,f-=c):f>g?(c=Math.min(Math.abs(0.01*Math.abs(g-f)),5),0<=g?f=g-c:g=f+c):(c=Math.min(Math.abs(0.01*Math.abs(g-f)),0.05),0!==g&&(g+=c),0!==f&&(f-=c)):(g="undefined"===typeof this.options.interval?-Infinity:this.options.interval,f=0),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<g-f?0.5*Math.abs(g-f):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<f&&(f=0),this.includeZero&&(null===
+this.maximum||isNaN(this.maximum))&&0>g&&(g=0)),"axisX"===this.type&&b){if(null===this.minimum||isNaN(this.minimum))this.minimum=f-h/2;if(null===this.maximum||isNaN(this.maximum))this.maximum=g+h/2}else this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?f-h/2:Math.floor(f/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),
+null===this.maximum&&(this.maximum="axisX"===this.type?g+h/2:Math.ceil(g/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,
+this.maximum);this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&b?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.range)){d=Math.floor(Math.abs(Math.log(this.range)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2<d)for(b=0;b<d-2;b++)this.valueFormatString+="#"}}};
+B.prototype.calculateLogarithamicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),d=Math.log(this.logarithmBase),b;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),c,f,g,h;h=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=
+this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;"axisX"===this.type?(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===f/c&&(h=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),f*=h,c/=h),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,
+0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=c&&!isFinite(f)?(f="undefined"===typeof this.options.interval?0:this.options.interval,c=1):0>=c?c=f:isFinite(f)||(f=c),1===c&&1===f?(f*=this.logarithmBase-1/this.logarithmBase,c=1):1===f/c?(h=Math.min(f*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),f*=h,c/=h):c>f?(h=Math.min(c/
+f*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=f?c=f/h:f=c*h):(h=Math.min(f/c*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==f&&(f*=h),1!==c&&(c/=h)),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<c&&(c=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&
+1>f&&(f=1));h=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);linearRange=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);this.intervalType="number";h=Math.pow(this.logarithmBase,B.getNiceNumber(Math.abs(Math.log(h)/d),!1));this.options&&0<this.options.interval?this.interval=
+this.options.interval:(this.interval=B.getNiceExponent(Math.log(h)/d/(a-1),!0),b=B.getNiceNumber(linearRange/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?c/Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(c)/d/this.interval));if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?f*Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(f)/d/
+this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceExponent(Math.ceil(Math.log(h)/d)/(a-1)),b=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===
+this.type?(c=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,1===f/c&&(h=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),f*=h,c/=h),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(c=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,
+isFinite(c)||isFinite(f)?1===c&&1===f?(f*=this.logarithmBase,c/=this.logarithmBase):1===f/c?(h=Math.pow(this.logarithmBase,this.interval),f*=h,c/=h):c>f?(h=Math.min(0.01*(c/f),5),1<=f?c=f/h:f=c*h):(h=Math.min(f/c*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==f&&(f*=h),1!==c&&(c/=h)):(f="undefined"===typeof this.options.interval?0:this.options.interval,c=1),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:f/c>this.logarithmBase?f/c*Math.pow(this.logarithmBase,0.5):
+this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<c&&(c=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>f&&(f=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?c/Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(c)/d/this.interval)),this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?
+Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?f*Math.sqrt(g):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(f)/d/this.interval)),this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)),
+1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||
+this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&
+this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(d=Math.floor(this.viewportMinimum/b+0.5)*b;d<this.viewportMinimum;)d+=b;this.equidistantInterval=!1;this.intervalStartPosition=d;this.interval=b}else this.options.interval||(b=Math.ceil(this.interval),this.range>this.interval&&(this.interval=b,c=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=c;if(!this.valueFormatString&&
+(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){d=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2<d)for(b=0;b<d-2;b++)this.valueFormatString+="#"}};B.getNiceExponent=function(a,d){var b=Math.floor(Math.log(a)/Math.LN10),c=a/Math.pow(10,b),c=0>b?1>=c?1:5>=c?5:10:Math.max(Math.floor(c),1);return Number((c*Math.pow(10,b)).toFixed(20))};B.getNiceNumber=function(a,d){var b=Math.floor(Math.log(a)/Math.LN10),c=a/Math.pow(10,b);return Number(((d?
+1.5>c?1:3>c?2:7>c?5:10:1>=c?1:2>=c?2:5>=c?5:10)*Math.pow(10,b)).toFixed(20))};B.prototype.getLabelStartPoint=function(){var a=E[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===
+this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+
+(7-a.getDay())),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),
+a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};U(na,M);na.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var d=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(qa(this.parent.stripLines),d=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[d]=this.options}};na.prototype.render=function(){this.ctx.save();
+var a=this.parent.getPixelCoordinatesOnAxis(this.value),d=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness);if(0<d){var b=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var c=this.ctx.globalAlpha;this.ctx.globalAlpha=b;G(this.id);var f,g,h,l;this.ctx.lineWidth=d;this.ctx.setLineDash&&this.ctx.setLineDash(I(this.lineDashType,d));if("bottom"===this.parent._position||"top"===this.parent._position)f=
+g=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,h=this.chart.plotArea.y1,l=this.chart.plotArea.y2,this.bounds={x1:f-d/2,y1:h,x2:g+d/2,y2:l};else if("left"===this.parent._position||"right"===this.parent._position)h=l=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,f=this.chart.plotArea.x1,g=this.chart.plotArea.x2,this.bounds={x1:f,y1:h-d/2,x2:g,y2:l+d/2};this.ctx.moveTo(f,h);this.ctx.lineTo(g,l);this.ctx.stroke();this.ctx.globalAlpha=c}this.ctx.restore()};U(S,M);S.prototype._initialize=function(){if(this.enabled){this.container=
+document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position="absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.display="none";var a;a='<div style=" width: auto;height: auto;min-width: 50px;';a+="line-height: auto;";a+="margin: 0px 0px 0px 0px;";a+="padding: 5px;";a+="font-family: Calibri, Arial, Georgia, serif;";a+="font-weight: normal;";
+a+="font-style: "+(u?"italic;":"normal;");a+="font-size: 14px;";a+="color: #000000;";a+="text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);";a+="text-align: left;";a+="border: 2px solid gray;";a+=u?"background: rgba(255,255,255,.9);":"background: rgb(255,255,255);";a+="text-indent: 0px;";a+="white-space: nowrap;";a+="border-radius: 5px;";a+="-moz-user-select:none;";a+="-khtml-user-select: none;";a+="-webkit-user-select: none;";a+="-ms-user-select: none;";a+="user-select: none;";u||(a+="filter: alpha(opacity = 90);",
+a+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');");a+='} "> Sample Tooltip</div>';this.container.innerHTML=a;this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};S.prototype.mouseMoveHandler=function(a,d){this._lastUpdated&&40>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(a,d))};
+S.prototype._updateToolTip=function(a,d,b){b="undefined"===typeof b?!0:b;this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var c=null,f=null,g=[],h=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){f=[];if(this.chart.axisX)for(var l=
+0;l<this.chart.axisX.length;l++){for(var h=this.chart.axisX[l].convertPixelToValue({y:d}),k=null,c=0;c<this.chart.axisX[l].dataSeries.length;c++)(k=this.chart.axisX[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));k=null}if(this.chart.axisX2)for(l=0;l<this.chart.axisX2.length;l++){h=this.chart.axisX2[l].convertPixelToValue({y:d});k=null;for(c=0;c<this.chart.axisX2[l].dataSeries.length;c++)(k=this.chart.axisX2[l].dataSeries[c].getDataPointAtX(h,
+b))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));k=null}}else{f=[];if(this.chart.axisX)for(l=0;l<this.chart.axisX.length;l++)for(h=this.chart.axisX[l].convertPixelToValue({x:a}),k=null,c=0;c<this.chart.axisX[l].dataSeries.length;c++)(k=this.chart.axisX[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k));if(this.chart.axisX2)for(l=0;l<this.chart.axisX2.length;l++)for(h=
+this.chart.axisX2[l].convertPixelToValue({x:a}),k=null,c=0;c<this.chart.axisX2[l].dataSeries.length;c++)(k=this.chart.axisX2[l].dataSeries[c].getDataPointAtX(h,b))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[l].dataSeries[c],null!==k.dataPoint.y&&f.push(k))}if(0===f.length)return;f.sort(function(a,b){return a.distance-b.distance});b=f[0];for(c=0;c<f.length;c++)f[c].dataPoint.x.valueOf()===b.dataPoint.x.valueOf()&&g.push(f[c]);f=null}else{if(k=this.chart.getDataPointAtXY(a,d,b))this.currentDataPointIndex=
+k.dataPointIndex,this.currentSeriesIndex=k.dataSeries.index;else if(u)if(k=La(a,d,this.chart._eventManager.ghostCtx),0<k&&"undefined"!==typeof this.chart._eventManager.objectMap[k]){k=this.chart._eventManager.objectMap[k];if("legendItem"===k.objectType)return;this.currentSeriesIndex=k.dataSeriesIndex;this.currentDataPointIndex=0<=k.dataPointIndex?k.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){f=this.chart.data[this.currentSeriesIndex];
+k={};if(0<=this.currentDataPointIndex)c=f.dataPoints[this.currentDataPointIndex],k.dataSeries=f,k.dataPoint=c,k.index=this.currentDataPointIndex,k.distance=Math.abs(c.x-h);else{if(!this.enabled||"line"!==f.type&&"stepLine"!==f.type&&"spline"!==f.type&&"area"!==f.type&&"stepArea"!==f.type&&"splineArea"!==f.type&&"stackedArea"!==f.type&&"stackedArea100"!==f.type&&"rangeArea"!==f.type&&"rangeSplineArea"!==f.type&&"candlestick"!==f.type&&"ohlc"!==f.type)return;h=f.axisX.convertPixelToValue({x:a});k=f.getDataPointAtX(h,
+b);k.dataSeries=f;this.currentDataPointIndex=k.index;c=k.dataPoint}if(!x(k.dataPoint.y))if(k.dataSeries.axisY)if(0<k.dataPoint.y.length){for(c=b=0;c<k.dataPoint.y.length;c++)k.dataPoint.y[c]<k.dataSeries.axisY.viewportMinimum?b--:k.dataPoint.y[c]>k.dataSeries.axisY.viewportMaximum&&b++;b<k.dataPoint.y.length&&b>-k.dataPoint.y.length&&g.push(k)}else"column"===f.type||"bar"===f.type?0>k.dataPoint.y?0>k.dataSeries.axisY.viewportMinimum&&k.dataSeries.axisY.viewportMaximum>=k.dataPoint.y&&g.push(k):k.dataSeries.axisY.viewportMinimum<=
+k.dataPoint.y&&0<=k.dataSeries.axisY.viewportMaximum&&g.push(k):"bubble"===f.type?(b=this.chart._eventManager.objectMap[f.dataPointIds[k.index]].size/2,k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum-b&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum+b&&g.push(k)):(0<=k.dataSeries.type.indexOf("100")||"stackedColumn"===f.type||"stackedBar"===f.type||k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum)&&g.push(k);else g.push(k)}}if(0<g.length&&(this.highlightObjects(g),
+this.enabled))if(b="",b=this.getToolTipInnerHTML({entries:g}),null!==b){this.contentDiv.innerHTML=b;this.contentDiv.innerHTML=b;b=!1;"none"===this.container.style.display&&(b=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor=this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:
+g[0].dataPoint.color?g[0].dataPoint.color:g[0].dataSeries.color?g[0].dataSeries.color:g[0].dataSeries._colorSet[g[0].index%g[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?
+this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:u?"italic":"normal"}catch(m){}"pie"===g[0].dataSeries.type||"doughnut"===g[0].dataSeries.type||"funnel"===g[0].dataSeries.type||"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||
+"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));a+="px";d=1!==g.length||this.shared||"line"!==g[0].dataSeries.type&&
+"stepLine"!==g[0].dataSeries.type&&"spline"!==g[0].dataSeries.type&&"area"!==g[0].dataSeries.type&&"stepArea"!==g[0].dataSeries.type&&"splineArea"!==g[0].dataSeries.type?"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x):d:g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y);d=-d+10;0<d+this.container.clientHeight+5&&(d-=d+this.container.clientHeight+
+5-0);this.container.style.left=a;this.container.style.bottom=d+"px";!this.animationEnabled||b?this.disableAnimation():this.enableAnimation()}else this.hide(!1)}};S.prototype.highlightObjects=function(a){var d=this.chart.overlaidCanvasCtx;this.chart.resetOverlayedCanvas();d.clearRect(0,0,this.chart.width,this.chart.height);d.save();var b=this.chart.plotArea,c=0;d.beginPath();d.rect(b.x1,b.y1,b.x2-b.x1,b.y2-b.y1);d.clip();for(b=0;b<a.length;b++){var f=a[b];if((f=this.chart._eventManager.objectMap[f.dataSeries.dataPointIds[f.index]])&&
+f.objectType&&"dataPoint"===f.objectType){var c=this.chart.data[f.dataSeriesIndex],g=c.dataPoints[f.dataPointIndex],h=f.dataPointIndex;!1===g.highlightEnabled||!0!==c.highlightEnabled&&!0!==g.highlightEnabled||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"scatter"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type?(g=c.getMarkerProperties(h,f.x1,f.y1,this.chart.overlaidCanvasCtx),
+g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),P.drawMarkers([g]),"undefined"!==typeof f.y2&&(g=c.getMarkerProperties(h,f.x1,f.y2,this.chart.overlaidCanvasCtx),g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),P.drawMarkers([g]))):"bubble"===c.type?(g=c.getMarkerProperties(h,f.x1,f.y1,this.chart.overlaidCanvasCtx),g.size=f.size,g.color=
+"white",g.borderColor="white",d.globalAlpha=0.3,P.drawMarkers([g]),d.globalAlpha=1):"column"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"bar"===c.type||"rangeBar"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"rangeColumn"===c.type?N(d,f.x1,f.y1,f.x2,f.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===c.type||"doughnut"===c.type?Ga(d,f.center,f.radius,"white",c.type,f.startAngle,f.endAngle,0.3,f.percentInnerRadius):"candlestick"===c.type?(d.globalAlpha=1,d.strokeStyle=
+f.color,d.lineWidth=2*f.borderThickness,c=0===d.lineWidth%2?0:0.5,d.beginPath(),d.moveTo(f.x3-c,Math.min(f.y2,f.y3)),d.lineTo(f.x3-c,Math.min(f.y1,f.y4)),d.stroke(),d.beginPath(),d.moveTo(f.x3-c,Math.max(f.y1,f.y4)),d.lineTo(f.x3-c,Math.max(f.y2,f.y3)),d.stroke(),N(d,f.x1,Math.min(f.y1,f.y4),f.x2,Math.max(f.y1,f.y4),"transparent",2*f.borderThickness,f.color,!1,!1,!1,!1),d.globalAlpha=1):"ohlc"===c.type&&(d.globalAlpha=1,d.strokeStyle=f.color,d.lineWidth=2*f.borderThickness,c=0===d.lineWidth%2?0:0.5,
+d.beginPath(),d.moveTo(f.x3-c,f.y2),d.lineTo(f.x3-c,f.y3),d.stroke(),d.beginPath(),d.moveTo(f.x3,f.y1),d.lineTo(f.x1,f.y1),d.stroke(),d.beginPath(),d.moveTo(f.x3,f.y4),d.lineTo(f.x2,f.y4),d.stroke(),d.globalAlpha=1))}}d.restore();d.globalAlpha=1;d.beginPath()};S.prototype.getToolTipInnerHTML=function(a){var d=a.entries,b=null,c=null,f=null,g=0;a="";for(var h=!0,l=0;l<d.length;l++)if(d[l].dataSeries.toolTipContent||d[l].dataPoint.toolTipContent){h=!1;break}if(h&&(this.content&&"function"===typeof this.content||
+this.contentFormatter))d={chart:this.chart,toolTip:this.options,entries:d},b=this.contentFormatter?this.contentFormatter(d):this.content(d);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var k=null,m="",l=0;l<d.length;l++)if(c=d[l].dataSeries,f=d[l].dataPoint,g=d[l].index,a="",0===l&&(h&&!this.content)&&(this.chart.axisX&&0<this.chart.axisX.length?m+="undefined"!==typeof this.chart.axisX[0].labels[f.x]?this.chart.axisX[0].labels[f.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&
+(m+="undefined"!==typeof this.chart.axisX2[0].labels[f.x]?this.chart.axisX2[0].labels[f.x]:"{x}"),m+="</br>",m=this.chart.replaceKeywordsWithValue(m,f,c,g)),null!==f.toolTipContent&&("undefined"!==typeof f.toolTipContent||null!==c.options.toolTipContent)){if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===
+c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}",k=c.axisXIndex;else if("bubble"===c.type)this.chart.axisX&&
+1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&
+(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)this.chart.axisX&&1<this.chart.axisX.length&&(a+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":
+""),a+=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}";null===b&&(b="");!0===this.reversed?(b=this.chart.replaceKeywordsWithValue(a,f,c,g)+b,l<d.length-1&&(b="</br>"+b)):(b+=this.chart.replaceKeywordsWithValue(a,
+f,c,g),l<d.length-1&&(b+="</br>"));c.toolTipContent=a}null!==b&&(b=m+b)}else{c=d[0].dataSeries;f=d[0].dataPoint;g=d[0].index;if(null===f.toolTipContent||"undefined"===typeof f.toolTipContent&&null===c.options.toolTipContent)return null;if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===
+c.type||"stackedArea"===c.type||"stackedArea100"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}";else if("bubble"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?
+"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("pie"===c.type||"doughnut"===c.type||"funnel"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.name?"{name}:</span>&nbsp;&nbsp;":f.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{y}";else if("rangeColumn"===c.type||"rangeBar"===
+c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)a=f.toolTipContent?f.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:
+"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(f.label?"{label}":"{x}")+"</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}";null===b&&(b="");b+=this.chart.replaceKeywordsWithValue(a,f,c,g)}this.content=a;return b};S.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition=
+"left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.transition="left .2s ease-out, bottom .2s ease-out")};S.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};S.prototype.hide=function(a){this.container&&(this.container.style.display="none",
+this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};S.prototype.show=function(a,d,b){this._updateToolTip(a,d,"undefined"===typeof b?!1:b)};A.prototype.getPercentAndTotal=function(a,d){var b=null,c=null,f=null;if(0<=a.type.indexOf("stacked"))c=0,b=d.x.getTime?d.x.getTime():d.x,b in a.plotUnit.yTotals&&(c=a.plotUnit.yTotals[b],f=isNaN(d.y)?0:0===c?0:100*(d.y/c));else if("pie"===a.type||"doughnut"===a.type){for(i=c=0;i<a.dataPoints.length;i++)isNaN(a.dataPoints[i].y)||
+(c+=a.dataPoints[i].y);f=isNaN(d.y)?0:100*(d.y/c)}return{percent:f,total:c}};A.prototype.replaceKeywordsWithValue=function(a,d,b,c,f){var g=this;f="undefined"===typeof f?0:f;if((0<=b.type.indexOf("stacked")||"pie"===b.type||"doughnut"===b.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",l="#total",k=this.getPercentAndTotal(b,d),l=isNaN(k.total)?l:k.total,h=isNaN(k.percent)?h:k.percent;do{k="";if(b.percentFormatString)k=b.percentFormatString;else{var k="#,##0.",m=Math.max(Math.ceil(Math.log(1/
+Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var n=0;n<m;n++)k+="#";b.percentFormatString=k}a=a.replace("#percent",da(h,k,g._cultureInfo));a=a.replace("#total",da(l,b.yValueFormatString?b.yValueFormatString:"#,##0.########",g._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=ka(a.slice(1,a.length-1));a=a.replace("#index",
+f);var e=null;try{var h=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);h&&0<h.length&&(e=ka(h[2]),a=ka(h[1]))}catch(k){}h=null;if("color"===a)return d.color?d.color:b.color?b.color:b._colorSet[c%b._colorSet.length];if(d.hasOwnProperty(a))h=d;else if(b.hasOwnProperty(a))h=b;else return"";h=h[a];null!==e&&(h=h[e]);if("x"===a)if("dateTime"===g.plotInfo.axisXValueType||"dateTime"===b.xValueType||d.x&&d.x.getTime){if(g.plotInfo.plotTypes[0].plotUnits[0].axisX&&!g.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic)return Ea(h,
+d.xValueFormatString?d.xValueFormatString:b.xValueFormatString?b.xValueFormatString:b.xValueFormatString=g.axisX&&g.axisX.autoValueFormatString?g.axisX.autoValueFormatString:"DD MMM YY",g._cultureInfo)}else return da(h,d.xValueFormatString?d.xValueFormatString:b.xValueFormatString?b.xValueFormatString:b.xValueFormatString="#,##0.########",g._cultureInfo);else return"y"===a?da(h,d.yValueFormatString?d.yValueFormatString:b.yValueFormatString?b.yValueFormatString:b.yValueFormatString="#,##0.########",
+g._cultureInfo):"z"===a?da(h,d.zValueFormatString?d.zValueFormatString:b.zValueFormatString?b.zValueFormatString:b.zValueFormatString="#,##0.########",g._cultureInfo):h})};la.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];u&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};la.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};
+la.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var d=[],b=xa(a),c=null;if((c=this.chart.getObjectAtXY(b.x,b.y,!1))&&"undefined"!==typeof this.objectMap[c])if(c=this.objectMap[c],"dataPoint"===c.objectType){var f=this.chart.data[c.dataSeriesIndex],g=f.dataPoints[c.dataPointIndex],h=c.dataPointIndex;c.eventParameter={x:b.x,y:b.y,dataPoint:g,dataSeries:f.options,dataPointIndex:h,dataSeriesIndex:f.index,chart:this.chart};c.eventContext={context:g,userContext:g,mouseover:"mouseover",
+mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(c);c=this.objectMap[f.id];c.eventParameter={x:b.x,y:b.y,dataPoint:g,dataSeries:f.options,dataPointIndex:h,dataSeriesIndex:f.index,chart:this.chart};c.eventContext={context:f,userContext:f.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(this.objectMap[f.id])}else"legendItem"===c.objectType&&(f=this.chart.data[c.dataSeriesIndex],g=null!==c.dataPointIndex?f.dataPoints[c.dataPointIndex]:null,
+c.eventParameter={x:b.x,y:b.y,dataSeries:f.options,dataPoint:g,dataPointIndex:c.dataPointIndex,dataSeriesIndex:c.dataSeriesIndex,chart:this.chart},c.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},d.push(c));f=[];for(b=0;b<this.mouseoveredObjectMaps.length;b++){g=!0;for(c=0;c<d.length;c++)if(d[c].id===this.mouseoveredObjectMaps[b].id){g=!1;break}g?this.fireEvent(this.mouseoveredObjectMaps[b],
+"mouseout",a):f.push(this.mouseoveredObjectMaps[b])}this.mouseoveredObjectMaps=f;for(b=0;b<d.length;b++){f=!1;for(c=0;c<this.mouseoveredObjectMaps.length;c++)if(d[b].id===this.mouseoveredObjectMaps[c].id){f=!0;break}f||(this.fireEvent(d[b],"mouseover",a),this.mouseoveredObjectMaps.push(d[b]));"click"===a.type?this.fireEvent(d[b],"click",a):"mousemove"===a.type&&this.fireEvent(d[b],"mousemove",a)}}};la.prototype.fireEvent=function(a,d,b){if(a&&d){var c=a.eventParameter,f=a.eventContext,g=a.eventContext.userContext;
+g&&(f&&g[f[d]])&&g[f[d]].call(g,c);"mouseout"!==d?g.cursor&&g.cursor!==b.target.style.cursor&&(b.target.style.cursor=g.cursor):(b.target.style.cursor=this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===d&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],c)}};U(oa,M);Da.prototype.animate=function(a,d,b,c,f){var g=this;this.chart.isAnimating=!0;f=f||F.easing.linear;b&&this.animations.push({startTime:(new Date).getTime()+
+(a?a:0),duration:d,animationCallback:b,onComplete:c});for(a=[];0<this.animations.length;)if(d=this.animations.shift(),b=(new Date).getTime(),c=0,d.startTime<=b&&(c=f(Math.min(b-d.startTime,d.duration),0,1,d.duration),c=Math.min(c,1),isNaN(c)||!isFinite(c))&&(c=1),1>c&&a.push(d),d.animationCallback(c),1<=c&&d.onComplete)d.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){g.animate.call(g)}):this.chart.isAnimating=!1};
+Da.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var F={yScaleAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas,f=d.animationBase;b.drawImage(c,0,0,c.width,c.height,0,f-f*a,b.canvas.width/Q,a*b.canvas.height/Q)}},xScaleAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas,f=d.animationBase;b.drawImage(c,0,0,
+c.width,c.height,f-f*a,0,a*b.canvas.width/Q,b.canvas.height/Q)}},xClipAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas;b.save();0<a&&b.drawImage(c,0,0,c.width*a,c.height,0,0,c.width*a/Q,c.height/Q);b.restore()}},fadeInAnimation:function(a,d){if(0!==a){var b=d.dest,c=d.source.canvas;b.save();b.globalAlpha=a;b.drawImage(c,0,0,c.width,c.height,0,0,b.canvas.width/Q,b.canvas.height/Q);b.restore()}},easing:{linear:function(a,d,b,c){return b*a/c+d},easeOutQuad:function(a,d,b,c){return-b*
+(a/=c)*(a-2)+d},easeOutQuart:function(a,d,b,c){return-b*((a=a/c-1)*a*a*a-1)+d},easeInQuad:function(a,d,b,c){return b*(a/=c)*a+d},easeInQuart:function(a,d,b,c){return b*(a/=c)*a*a*a+d}}},P={drawMarker:function(a,d,b,c,f,g,h,l){if(b){var k=1;b.fillStyle=g?g:"#000000";b.strokeStyle=h?h:"#000000";b.lineWidth=l?l:0;"circle"===c?(b.moveTo(a,d),b.beginPath(),b.arc(a,d,f/2,0,2*Math.PI,!1),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k))):
+"square"===c?(b.beginPath(),b.rect(a-f/2,d-f/2,f,f),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k))):"triangle"===c?(b.beginPath(),b.moveTo(a-f/2,d+f/2),b.lineTo(a+f/2,d+f/2),b.lineTo(a,d-f/2),b.closePath(),g&&b.fill(),l&&(h?b.stroke():(k=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=k)),b.beginPath()):"cross"===c&&(b.strokeStyle=g,b.lineWidth=f/4,b.beginPath(),b.moveTo(a-f/2,d-f/2),b.lineTo(a+f/
+2,d+f/2),b.stroke(),b.moveTo(a+f/2,d-f/2),b.lineTo(a-f/2,d+f/2),b.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var b=a[d];P.drawMarker(b.x,b.y,b.ctx,b.type,b.size,b.color,b.borderColor,b.borderThickness)}}},Oa={Chart:A,addColorSet:function(a,d){ha[a]=d},addCultureInfo:function(a,d){pa[a]=d},formatNumber:function(a,d,b){b=b||"en";if(pa[b])return da(a,d||"#,##0.##",new oa(b));throw"Unknown Culture Name";},formatDate:function(a,d,b){b=b||"en";if(pa[b])return Ea(a,d||"DD MMM YYYY",
+new oa(b));throw"Unknown Culture Name";}};Oa.Chart.version="v1.9.8 GA";window.CanvasJS=Oa})();
+/*
+  excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
+
+  Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
+  Licensed under the Apache License, Version 2.0
+*/
+document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
+a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
+"px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
+a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;1<c&&c--;return 1>6*c?a+6*(b-a)*c:
+1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+
+v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
+c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("<g_vml_:stroke",
+' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q,
+n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
+I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]*
+b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height}
+function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
+V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
+bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
+darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",
+ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
+mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
+peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
+H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo=
+function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d,
+x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
+c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width=
+e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
+10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
+k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
+' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
+f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a=
+{};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a,
+b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize);
+m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right":
+"left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?S(this,n):T(this,n,{x:-d,y:0},
+{x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a,
+b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){};
+d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR=
+13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}();
+/*
+ CanvasJS jQuery Charting Plugin - http://canvasjs.com/ 
+ Copyright 2013 fenopix
+*/
+(function(b,c,d,e){b.fn.CanvasJSChart=function(a){if(a){var b=this.first();a=new CanvasJS.Chart(this[0],a);b.children(".canvasjs-chart-container").data("canvasjsChartRef",a);a.render();return this}return this.first().children(".canvasjs-chart-container").data("canvasjsChartRef")}})(jQuery,window,document);
diff --git a/charts/canvas/license.txt b/charts/canvas/license.txt
new file mode 100644 (file)
index 0000000..597edb2
--- /dev/null
@@ -0,0 +1,9 @@
+/**\r
+* CanvasJS HTML5 & JavaScript Charts - v1.9.0 GA - http://canvasjs.com/ \r
+* Copyright 2016 fenopix\r
+\r
+*  --------------------- License Information --------------------\r
+* CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.\r
+*     http://canvasjs.com/license-canvasjs/\r
+* \r
+*/
\ No newline at end of file
diff --git a/css/power.css b/css/power.css
new file mode 100644 (file)
index 0000000..035a843
--- /dev/null
@@ -0,0 +1,61 @@
+body {
+    margin: 0;
+    padding: 0;
+}
+
+#power {
+    table-layout: fixed;
+    text-align: center;
+    margin: 0 auto;
+    border-collapse: collapse;
+    border: 1px solid black;
+}
+
+#power td {
+    width: 25%;
+    overflow: hidden;
+    height: 44px;
+}
+
+#power tr div {
+    height: 20px;
+}
+
+#double {
+    border-spacing: 0px;
+    text-align: center;
+    margin: 0;
+    height: 40px;
+    width: 100%;
+    overflow: hidden;
+}
+
+#double td {
+    height: 20px;
+}
+
+#tooltip {
+    border: 2px solid red;
+    display: none;
+}
+
+#popup {
+  width:600px;
+  height:600px;
+  position:absolute;
+  top:5%;
+  text-align: center;
+  #left:5%;
+  #margin:-50px 0 0 -100px; /* [-(height/2)px 0 0 -(width/2)px] */
+  display:none;
+}
+
+#popup2 {
+  width:600px;
+  height:600px;
+  position:absolute;
+  top:5%;
+  right:1%;
+  #margin:-50px 0 0 -100px; /* [-(height/2)px 0 0 -(width/2)px] */
+  display:none;
+}
diff --git a/footer.html b/footer.html
new file mode 100644 (file)
index 0000000..25f918c
--- /dev/null
@@ -0,0 +1,8 @@
+</td><td width="30%" valign="top">
+<div id="popup2" class="popup2">
+<iframe id="popup-iframe-mn" src="" width="600" height="400" frameBorder="0"></iframe><br>
+<iframe id="popup-iframe-yr" src="" width="600" height="400" frameBorder="0"></iframe>
+</div>
+</td></tr></table>
+</body>
+</html>
diff --git a/header.html b/header.html
new file mode 100644 (file)
index 0000000..43f79bf
--- /dev/null
@@ -0,0 +1,120 @@
+<html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
+    "http://www.w3.org/TR/html4/strict.dtd">
+<head>
+    <link rel="stylesheet" type="text/css" href="css/power.css">
+    <script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
+    <script type="text/javascript">
+
+       function refresh() {
+         $.getJSON('http://192.168.5.205:8000/json.php', function(data) {
+           for (var key in data) {
+             if (key.charAt(0) == "c") {
+               vals = data[key].split(",")
+               percent = (vals[2]/vals[3]);
+               color=getColorForPercentage(percent.toFixed(2));
+               setColor(key,color);
+               text = "<div onclick=\"javascript:showToolTip('"+key+"');\">" + key + ": " + vals[2] + " Amps </div>";
+               setText(key,text);
+              } 
+             if (key=="V") {
+               setText("V", "Line Voltage: " + (data[key]/10))
+             }
+            }
+
+         });
+       }
+
+       var percentColors = [
+           { pct: 0.0, color: { r: 0x00, g: 0xff, b: 0 } },
+           { pct: 0.5, color: { r: 0xff, g: 0xff, b: 0 } },
+           { pct: 1.0, color: { r: 0xff, g: 0x00, b: 0 } } ];
+
+       var getColorForPercentage = function(pct) {
+           for (var i = 1; i < percentColors.length - 1; i++) {
+               if (pct < percentColors[i].pct) {
+                   break;
+               }
+           }
+           var lower = percentColors[i - 1];
+           var upper = percentColors[i];
+           var range = upper.pct - lower.pct;
+           var rangePct = (pct - lower.pct) / range;
+           var pctLower = 1 - rangePct;
+           var pctUpper = rangePct;
+           var color = {
+               r: Math.floor(lower.color.r * pctLower + upper.color.r * pctUpper),
+               g: Math.floor(lower.color.g * pctLower + upper.color.g * pctUpper),
+               b: Math.floor(lower.color.b * pctLower + upper.color.b * pctUpper)
+           };
+           return 'rgb(' + [color.r, color.g, color.b].join(',') + ')';
+           // or output as hex if preferred
+       }
+
+       function sleep(delay) {
+          var start = new Date().getTime();
+          while (new Date().getTime() < start + delay);
+        }
+
+       function setColor(id,color) {
+         //console.log( document.getElementsByName("*"));
+         var x = document.getElementsByName(id);
+          var i=0;
+          for (i=0; i < x.length; i++) {
+            x[i].style.backgroundColor=color;
+           //console.log(x);
+          }
+       }
+
+       function setText(id,text) {
+         //document.getElementsByName(id).innerHTML = text
+          var x = document.getElementsByName(id);
+          var i;
+          for (i=0; i < x.length; i++) {
+            x[i].innerHTML = text;
+          }
+       }
+
+       function showToolTip(id) {
+          var currentTime = Math.ceil((new Date).getTime() / 1000);
+         var year = Math.ceil(currentTime-(365*86400));
+         var month = Math.ceil(currentTime-(30*86400));
+          var week = Math.ceil(currentTime-(7*86400));
+          var day = Math.ceil(currentTime-(1*86400));
+
+          document.getElementById('popup-iframe-yr').src = "http://192.168.5.205:8000/charts/canvas/breaker.php?t="+year+"&id="+id;
+          document.getElementById('popup-iframe-yr').style.visibility = "visible";
+          document.getElementById('popup-iframe-mn').src = "http://192.168.5.205:8000/charts/canvas/breaker.php?t="+month+"&id="+id;
+          document.getElementById('popup-iframe-mn').style.visibility = "visible";
+          document.getElementById('popup-iframe-wk').src = "http://192.168.5.205:8000/charts/canvas/breaker.php?t="+week+"&id="+id;
+          document.getElementById('popup-iframe-wk').style.visibility = "visible";
+          document.getElementById('popup-iframe-day').src = "http://192.168.5.205:8000/charts/canvas/breaker.php?t="+day+"&id="+id;
+         document.getElementById('popup-iframe-day').style.visibility = "visible";
+         document.getElementById('popup').style.display = "block";
+         document.getElementById('popup2').style.display = "block";
+        }
+
+        function hideToolTip(id) {
+          //document.getElementById(id+'-chart').src = "";
+          //document.getElementById(id+'-chart').style.visibility = "hidden";
+         //document.getElementById(id+'-chart').style.display = "none";
+        }
+
+
+    </script>
+</head>
+<body>
+<table width="100%" style="text-align: center;"><tr><td width="30%" valign="top" align="center">
+<div id="popup" class="popup">
+<iframe id="popup-iframe-day" src="" width="600" height="400" frameBorder="0"></iframe><br>
+<iframe id="popup-iframe-wk" src="" width="600" height="400" frameBorder="0"></iframe><br>
+<!--
+<iframe id="popup-iframe-mn" src="" width="600" height="400" frameBorder="0"></iframe><br>
+<iframe id="popup-iframe-yr" src="" width="600" height="400" frameBorder="0"></iframe>
+-->
+</div>
+</td><td width="30%" valign="top" align="center">
+<script type="text/javascript">
+  refresh();
+  setInterval(function() { refresh() }, 10000);
+</script>
diff --git a/index.php b/index.php
new file mode 100644 (file)
index 0000000..8094528
--- /dev/null
+++ b/index.php
@@ -0,0 +1,82 @@
+<?php
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
+function open_database($dab,$sqlquery)
+{
+
+  $mysqli = new mysqli("localhost", "USERNAME", "PASSWORD", "$dab");
+  if ($mysqli->connect_errno) {
+    echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
+  }
+
+  $result=$mysqli->query($sqlquery);
+  return($result);
+}
+
+
+$oldi=0;
+$qstring=$_SERVER['QUERY_STRING'];
+parse_str($qstring, $gem);
+if(strlen($_SERVER['HTTP_USER_AGENT']) >2) {
+  include("header.html");
+  $r=open_database("power", "select * from devices where SN='01100476'");
+  $gem = mysqli_fetch_assoc($r);
+  echo "<table border='1' id='power'>";
+  echo "<tr><td colspan=4 align='center' name='SN'>Serial Number: " .$gem['SN']."</td></tr>";
+  echo "<tr><td colspan=4 align='center' name='V'>Line Voltage: " .($gem['V']/10)."</td></tr>";
+  for ($i=1; $i<41; $i++) {
+    $r=open_database("power", "select name,alias from circuits where alias='$i' or alias='".$i."A' or alias='".$i."B'");
+    if ($i % 2 != 0) {
+      echo "<tr><td>Breaker Position $i</td>";
+    }
+    
+    if (mysqli_num_rows($r) == 0) {
+      echo "<td name='na' style='background-color: LightGrey;'>$i</td>";
+    } else {
+     while ($row = mysqli_fetch_assoc($r)) {
+       if ((strpos(($row["alias"]), "A") == TRUE) or (strpos(($row["alias"]), "B") == TRUE)) {
+         if ($oldi != $i) {
+           echo "<td><table id='double'>";
+           if (($oldi != $i) and (strpos(($row["alias"]), "B") == TRUE)) {
+             echo "<tr><td name='na'>".$i."A</td></tr><tr><td name='".$row["name"]."'>".$i."B</td></tr>";
+           } else {
+             $r2=open_database("power", "select name,alias from circuits where alias='".$i."A' or alias='".$i."B'");
+             $a = mysqli_fetch_array($r2);
+            mysqli_data_seek($r2, 1);
+             $b = mysqli_fetch_array($r2);
+             echo "<tr><td name='".$a["name"]."'>".$i."A</td></tr><tr><td name='".$b["name"]."'>".$i."B</td></tr>";
+           } 
+           echo "</table></td>";
+           $oldi=$i;
+         }
+       } else {
+         echo "<td name=\"".$row["name"]."\">".$row["alias"]."</td>";
+       }
+     }
+    }
+
+    if ($i % 2 == 0) {
+      echo "<td>Breaker Position $i</td></tr>";
+    }
+
+  }
+
+  $r=open_database("power", "select name,alias from circuits where alias is NULL");
+  echo "<tr><td align='center' colspan=4>Available Monitoring Inputs</td></tr>";
+  while ($row = mysqli_fetch_assoc($r)) {
+    echo "<tr><td align='center' colspan=4 name=\"".$row["name"]."\">".$row["name"]."</td></tr>";
+  }
+  echo "</table>";
+  include("footer.html");
+} else {
+  $r=open_database("power", "select device_id from devices where SN='".$gem['SN']."'");
+  if ($r->num_rows > 0) {
+    $r=open_database("power", "update devices set V='" . $gem['V'] . "', c1 = '". $gem['c1'] . "', c2 = '". $gem['c2'] . "', c3 = '". $gem['c3'] . "', c4 = '". $gem['c4'] . "', c5 = '". $gem['c5'] . "', c6 = '". $gem['c6'] . "', c7 = '". $gem['c7'] . "', c8 = '". $gem['c8'] . "', c9 = '". $gem['c9'] . "', c10 = '". $gem['c10'] . "', c11 = '". $gem['c11'] . "', c12 = '". $gem['c12'] . "', c13 = '". $gem['c13'] . "', c14 = '". $gem['c14'] . "', c15 = '". $gem['c15'] . "', c16 = '". $gem['c16'] . "', c17 = '". $gem['c17'] . "', c18 = '". $gem['c18'] . "', c19 = '". $gem['c19'] . "', c20 = '". $gem['c20'] . "', c21 = '". $gem['c21'] . "', c22 = '". $gem['c22'] . "', c23 = '". $gem['c23'] . "', c24 = '". $gem['c24'] . "', c25 = '". $gem['c25'] . "', c26 = '". $gem['c26'] . "', c27 = '". $gem['c27'] . "', c28 = '". $gem['c28'] . "', c29 = '". $gem['c29'] . "', c30 = '". $gem['c30'] . "', c31 = '". $gem['c31'] . "', c32 = '". $gem['c32'] . "' where SN='".$gem['SN']."'");
+  } else {
+    $r=open_database("power", "insert devices set V='" . $gem['V'] . "', c1 = '". $gem['c1'] . "', c2 = '". $gem['c2'] . "', c3 = '". $gem['c3'] . "', c4 = '". $gem['c4'] . "', c5 = '". $gem['c5'] . "', c6 = '". $gem['c6'] . "', c7 = '". $gem['c7'] . "', c8 = '". $gem['c8'] . "', c9 = '". $gem['c9'] . "', c10 = '". $gem['c10'] . "', c11 = '". $gem['c11'] . "', c12 = '". $gem['c12'] . "', c13 = '". $gem['c13'] . "', c14 = '". $gem['c14'] . "', c15 = '". $gem['c15'] . "', c16 = '". $gem['c16'] . "', c17 = '". $gem['c17'] . "', c18 = '". $gem['c18'] . "', c19 = '". $gem['c19'] . "', c20 = '". $gem['c20'] . "', c21 = '". $gem['c21'] . "', c22 = '". $gem['c22'] . "', c23 = '". $gem['c23'] . "', c24 = '". $gem['c24'] . "', c25 = '". $gem['c25'] . "', c26 = '". $gem['c26'] . "', c27 = '". $gem['c27'] . "', c28 = '". $gem['c28'] . "', c29 = '". $gem['c29'] . "', c30 = '". $gem['c30'] . "', c31 = '". $gem['c31'] . "', c32 = '". $gem['c32'] . "', SN='".$gem['SN']."'");
+  }
+}
+?>
+
+</body>
+</html>
diff --git a/js/jquery-1.7.2.js b/js/jquery-1.7.2.js
new file mode 100644 (file)
index 0000000..3774ff9
--- /dev/null
@@ -0,0 +1,9404 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Mar 21 12:46:34 2012 -0700
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+       navigator = window.navigator,
+       location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+               // The jQuery object is actually just the init constructor 'enhanced'
+               return new jQuery.fn.init( selector, context, rootjQuery );
+       },
+
+       // Map over jQuery in case of overwrite
+       _jQuery = window.jQuery,
+
+       // Map over the $ in case of overwrite
+       _$ = window.$,
+
+       // A central reference to the root jQuery(document)
+       rootjQuery,
+
+       // A simple way to check for HTML strings or ID strings
+       // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+       quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+       // Check if a string has a non-whitespace character in it
+       rnotwhite = /\S/,
+
+       // Used for trimming whitespace
+       trimLeft = /^\s+/,
+       trimRight = /\s+$/,
+
+       // Match a standalone tag
+       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+       // JSON RegExp
+       rvalidchars = /^[\],:{}\s]*$/,
+       rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+       rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+       rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+       // Useragent RegExp
+       rwebkit = /(webkit)[ \/]([\w.]+)/,
+       ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+       rmsie = /(msie) ([\w.]+)/,
+       rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+       // Matches dashed string for camelizing
+       rdashAlpha = /-([a-z]|[0-9])/ig,
+       rmsPrefix = /^-ms-/,
+
+       // Used by jQuery.camelCase as callback to replace()
+       fcamelCase = function( all, letter ) {
+               return ( letter + "" ).toUpperCase();
+       },
+
+       // Keep a UserAgent string for use with jQuery.browser
+       userAgent = navigator.userAgent,
+
+       // For matching the engine and version of the browser
+       browserMatch,
+
+       // The deferred used on DOM ready
+       readyList,
+
+       // The ready event handler
+       DOMContentLoaded,
+
+       // Save a reference to some core methods
+       toString = Object.prototype.toString,
+       hasOwn = Object.prototype.hasOwnProperty,
+       push = Array.prototype.push,
+       slice = Array.prototype.slice,
+       trim = String.prototype.trim,
+       indexOf = Array.prototype.indexOf,
+
+       // [[Class]] -> type pairs
+       class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+       constructor: jQuery,
+       init: function( selector, context, rootjQuery ) {
+               var match, elem, ret, doc;
+
+               // Handle $(""), $(null), or $(undefined)
+               if ( !selector ) {
+                       return this;
+               }
+
+               // Handle $(DOMElement)
+               if ( selector.nodeType ) {
+                       this.context = this[0] = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // The body element only exists once, optimize finding it
+               if ( selector === "body" && !context && document.body ) {
+                       this.context = document;
+                       this[0] = document.body;
+                       this.selector = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // Handle HTML strings
+               if ( typeof selector === "string" ) {
+                       // Are we dealing with HTML string or an ID?
+                       if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+                               // Assume that strings that start and end with <> are HTML and skip the regex check
+                               match = [ null, selector, null ];
+
+                       } else {
+                               match = quickExpr.exec( selector );
+                       }
+
+                       // Verify a match, and that no context was specified for #id
+                       if ( match && (match[1] || !context) ) {
+
+                               // HANDLE: $(html) -> $(array)
+                               if ( match[1] ) {
+                                       context = context instanceof jQuery ? context[0] : context;
+                                       doc = ( context ? context.ownerDocument || context : document );
+
+                                       // If a single string is passed in and it's a single tag
+                                       // just do a createElement and skip the rest
+                                       ret = rsingleTag.exec( selector );
+
+                                       if ( ret ) {
+                                               if ( jQuery.isPlainObject( context ) ) {
+                                                       selector = [ document.createElement( ret[1] ) ];
+                                                       jQuery.fn.attr.call( selector, context, true );
+
+                                               } else {
+                                                       selector = [ doc.createElement( ret[1] ) ];
+                                               }
+
+                                       } else {
+                                               ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+                                               selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+                                       }
+
+                                       return jQuery.merge( this, selector );
+
+                               // HANDLE: $("#id")
+                               } else {
+                                       elem = document.getElementById( match[2] );
+
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
+                                               // Handle the case where IE and Opera return items
+                                               // by name instead of ID
+                                               if ( elem.id !== match[2] ) {
+                                                       return rootjQuery.find( selector );
+                                               }
+
+                                               // Otherwise, we inject the element directly into the jQuery object
+                                               this.length = 1;
+                                               this[0] = elem;
+                                       }
+
+                                       this.context = document;
+                                       this.selector = selector;
+                                       return this;
+                               }
+
+                       // HANDLE: $(expr, $(...))
+                       } else if ( !context || context.jquery ) {
+                               return ( context || rootjQuery ).find( selector );
+
+                       // HANDLE: $(expr, context)
+                       // (which is just equivalent to: $(context).find(expr)
+                       } else {
+                               return this.constructor( context ).find( selector );
+                       }
+
+               // HANDLE: $(function)
+               // Shortcut for document ready
+               } else if ( jQuery.isFunction( selector ) ) {
+                       return rootjQuery.ready( selector );
+               }
+
+               if ( selector.selector !== undefined ) {
+                       this.selector = selector.selector;
+                       this.context = selector.context;
+               }
+
+               return jQuery.makeArray( selector, this );
+       },
+
+       // Start with an empty selector
+       selector: "",
+
+       // The current version of jQuery being used
+       jquery: "1.7.2",
+
+       // The default length of a jQuery object is 0
+       length: 0,
+
+       // The number of elements contained in the matched element set
+       size: function() {
+               return this.length;
+       },
+
+       toArray: function() {
+               return slice.call( this, 0 );
+       },
+
+       // Get the Nth element in the matched element set OR
+       // Get the whole matched element set as a clean array
+       get: function( num ) {
+               return num == null ?
+
+                       // Return a 'clean' array
+                       this.toArray() :
+
+                       // Return just the object
+                       ( num < 0 ? this[ this.length + num ] : this[ num ] );
+       },
+
+       // Take an array of elements and push it onto the stack
+       // (returning the new matched element set)
+       pushStack: function( elems, name, selector ) {
+               // Build a new jQuery matched element set
+               var ret = this.constructor();
+
+               if ( jQuery.isArray( elems ) ) {
+                       push.apply( ret, elems );
+
+               } else {
+                       jQuery.merge( ret, elems );
+               }
+
+               // Add the old object onto the stack (as a reference)
+               ret.prevObject = this;
+
+               ret.context = this.context;
+
+               if ( name === "find" ) {
+                       ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+               } else if ( name ) {
+                       ret.selector = this.selector + "." + name + "(" + selector + ")";
+               }
+
+               // Return the newly-formed element set
+               return ret;
+       },
+
+       // Execute a callback for every element in the matched set.
+       // (You can seed the arguments with an array of args, but this is
+       // only used internally.)
+       each: function( callback, args ) {
+               return jQuery.each( this, callback, args );
+       },
+
+       ready: function( fn ) {
+               // Attach the listeners
+               jQuery.bindReady();
+
+               // Add the callback
+               readyList.add( fn );
+
+               return this;
+       },
+
+       eq: function( i ) {
+               i = +i;
+               return i === -1 ?
+                       this.slice( i ) :
+                       this.slice( i, i + 1 );
+       },
+
+       first: function() {
+               return this.eq( 0 );
+       },
+
+       last: function() {
+               return this.eq( -1 );
+       },
+
+       slice: function() {
+               return this.pushStack( slice.apply( this, arguments ),
+                       "slice", slice.call(arguments).join(",") );
+       },
+
+       map: function( callback ) {
+               return this.pushStack( jQuery.map(this, function( elem, i ) {
+                       return callback.call( elem, i, elem );
+               }));
+       },
+
+       end: function() {
+               return this.prevObject || this.constructor(null);
+       },
+
+       // For internal use only.
+       // Behaves like an Array's method, not like a jQuery method.
+       push: push,
+       sort: [].sort,
+       splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[0] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+               target = arguments[1] || {};
+               // skip the boolean and the target
+               i = 2;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+               target = {};
+       }
+
+       // extend jQuery itself if only one argument is passed
+       if ( length === i ) {
+               target = this;
+               --i;
+       }
+
+       for ( ; i < length; i++ ) {
+               // Only deal with non-null/undefined values
+               if ( (options = arguments[ i ]) != null ) {
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && jQuery.isArray(src) ? src : [];
+
+                                       } else {
+                                               clone = src && jQuery.isPlainObject(src) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = jQuery.extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+jQuery.extend({
+       noConflict: function( deep ) {
+               if ( window.$ === jQuery ) {
+                       window.$ = _$;
+               }
+
+               if ( deep && window.jQuery === jQuery ) {
+                       window.jQuery = _jQuery;
+               }
+
+               return jQuery;
+       },
+
+       // Is the DOM ready to be used? Set to true once it occurs.
+       isReady: false,
+
+       // A counter to track how many items to wait for before
+       // the ready event fires. See #6781
+       readyWait: 1,
+
+       // Hold (or release) the ready event
+       holdReady: function( hold ) {
+               if ( hold ) {
+                       jQuery.readyWait++;
+               } else {
+                       jQuery.ready( true );
+               }
+       },
+
+       // Handle when the DOM is ready
+       ready: function( wait ) {
+               // Either a released hold or an DOMready/load event and not yet ready
+               if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+                       // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+                       if ( !document.body ) {
+                               return setTimeout( jQuery.ready, 1 );
+                       }
+
+                       // Remember that the DOM is ready
+                       jQuery.isReady = true;
+
+                       // If a normal DOM Ready event fired, decrement, and wait if need be
+                       if ( wait !== true && --jQuery.readyWait > 0 ) {
+                               return;
+                       }
+
+                       // If there are functions bound, to execute
+                       readyList.fireWith( document, [ jQuery ] );
+
+                       // Trigger any bound ready events
+                       if ( jQuery.fn.trigger ) {
+                               jQuery( document ).trigger( "ready" ).off( "ready" );
+                       }
+               }
+       },
+
+       bindReady: function() {
+               if ( readyList ) {
+                       return;
+               }
+
+               readyList = jQuery.Callbacks( "once memory" );
+
+               // Catch cases where $(document).ready() is called after the
+               // browser event has already occurred.
+               if ( document.readyState === "complete" ) {
+                       // Handle it asynchronously to allow scripts the opportunity to delay ready
+                       return setTimeout( jQuery.ready, 1 );
+               }
+
+               // Mozilla, Opera and webkit nightlies currently support this event
+               if ( document.addEventListener ) {
+                       // Use the handy event callback
+                       document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+                       // A fallback to window.onload, that will always work
+                       window.addEventListener( "load", jQuery.ready, false );
+
+               // If IE event model is used
+               } else if ( document.attachEvent ) {
+                       // ensure firing before onload,
+                       // maybe late but safe also for iframes
+                       document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+                       // A fallback to window.onload, that will always work
+                       window.attachEvent( "onload", jQuery.ready );
+
+                       // If IE and not a frame
+                       // continually check to see if the document is ready
+                       var toplevel = false;
+
+                       try {
+                               toplevel = window.frameElement == null;
+                       } catch(e) {}
+
+                       if ( document.documentElement.doScroll && toplevel ) {
+                               doScrollCheck();
+                       }
+               }
+       },
+
+       // See test/unit/core.js for details concerning isFunction.
+       // Since version 1.3, DOM methods and functions like alert
+       // aren't supported. They return false on IE (#2968).
+       isFunction: function( obj ) {
+               return jQuery.type(obj) === "function";
+       },
+
+       isArray: Array.isArray || function( obj ) {
+               return jQuery.type(obj) === "array";
+       },
+
+       isWindow: function( obj ) {
+               return obj != null && obj == obj.window;
+       },
+
+       isNumeric: function( obj ) {
+               return !isNaN( parseFloat(obj) ) && isFinite( obj );
+       },
+
+       type: function( obj ) {
+               return obj == null ?
+                       String( obj ) :
+                       class2type[ toString.call(obj) ] || "object";
+       },
+
+       isPlainObject: function( obj ) {
+               // Must be an Object.
+               // Because of IE, we also have to check the presence of the constructor property.
+               // Make sure that DOM nodes and window objects don't pass through, as well
+               if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+                       return false;
+               }
+
+               try {
+                       // Not own constructor property must be Object
+                       if ( obj.constructor &&
+                               !hasOwn.call(obj, "constructor") &&
+                               !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+                               return false;
+                       }
+               } catch ( e ) {
+                       // IE8,9 Will throw exceptions on certain host objects #9897
+                       return false;
+               }
+
+               // Own properties are enumerated firstly, so to speed up,
+               // if last one is own, then all properties are own.
+
+               var key;
+               for ( key in obj ) {}
+
+               return key === undefined || hasOwn.call( obj, key );
+       },
+
+       isEmptyObject: function( obj ) {
+               for ( var name in obj ) {
+                       return false;
+               }
+               return true;
+       },
+
+       error: function( msg ) {
+               throw new Error( msg );
+       },
+
+       parseJSON: function( data ) {
+               if ( typeof data !== "string" || !data ) {
+                       return null;
+               }
+
+               // Make sure leading/trailing whitespace is removed (IE can't handle it)
+               data = jQuery.trim( data );
+
+               // Attempt to parse using the native JSON parser first
+               if ( window.JSON && window.JSON.parse ) {
+                       return window.JSON.parse( data );
+               }
+
+               // Make sure the incoming data is actual JSON
+               // Logic borrowed from http://json.org/json2.js
+               if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+                       .replace( rvalidtokens, "]" )
+                       .replace( rvalidbraces, "")) ) {
+
+                       return ( new Function( "return " + data ) )();
+
+               }
+               jQuery.error( "Invalid JSON: " + data );
+       },
+
+       // Cross-browser xml parsing
+       parseXML: function( data ) {
+               if ( typeof data !== "string" || !data ) {
+                       return null;
+               }
+               var xml, tmp;
+               try {
+                       if ( window.DOMParser ) { // Standard
+                               tmp = new DOMParser();
+                               xml = tmp.parseFromString( data , "text/xml" );
+                       } else { // IE
+                               xml = new ActiveXObject( "Microsoft.XMLDOM" );
+                               xml.async = "false";
+                               xml.loadXML( data );
+                       }
+               } catch( e ) {
+                       xml = undefined;
+               }
+               if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+                       jQuery.error( "Invalid XML: " + data );
+               }
+               return xml;
+       },
+
+       noop: function() {},
+
+       // Evaluates a script in a global context
+       // Workarounds based on findings by Jim Driscoll
+       // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+       globalEval: function( data ) {
+               if ( data && rnotwhite.test( data ) ) {
+                       // We use execScript on Internet Explorer
+                       // We use an anonymous function so that context is window
+                       // rather than jQuery in Firefox
+                       ( window.execScript || function( data ) {
+                               window[ "eval" ].call( window, data );
+                       } )( data );
+               }
+       },
+
+       // Convert dashed to camelCase; used by the css and data modules
+       // Microsoft forgot to hump their vendor prefix (#9572)
+       camelCase: function( string ) {
+               return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+       },
+
+       nodeName: function( elem, name ) {
+               return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+       },
+
+       // args is for internal usage only
+       each: function( object, callback, args ) {
+               var name, i = 0,
+                       length = object.length,
+                       isObj = length === undefined || jQuery.isFunction( object );
+
+               if ( args ) {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.apply( object[ name ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.apply( object[ i++ ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+
+               // A special, fast, case for the most common use of each
+               } else {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               return object;
+       },
+
+       // Use native String.trim function wherever possible
+       trim: trim ?
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               trim.call( text );
+               } :
+
+               // Otherwise use our own trimming functionality
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+               },
+
+       // results is for internal usage only
+       makeArray: function( array, results ) {
+               var ret = results || [];
+
+               if ( array != null ) {
+                       // The window, strings (and functions) also have 'length'
+                       // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                       var type = jQuery.type( array );
+
+                       if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+                               push.call( ret, array );
+                       } else {
+                               jQuery.merge( ret, array );
+                       }
+               }
+
+               return ret;
+       },
+
+       inArray: function( elem, array, i ) {
+               var len;
+
+               if ( array ) {
+                       if ( indexOf ) {
+                               return indexOf.call( array, elem, i );
+                       }
+
+                       len = array.length;
+                       i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+                       for ( ; i < len; i++ ) {
+                               // Skip accessing in sparse arrays
+                               if ( i in array && array[ i ] === elem ) {
+                                       return i;
+                               }
+                       }
+               }
+
+               return -1;
+       },
+
+       merge: function( first, second ) {
+               var i = first.length,
+                       j = 0;
+
+               if ( typeof second.length === "number" ) {
+                       for ( var l = second.length; j < l; j++ ) {
+                               first[ i++ ] = second[ j ];
+                       }
+
+               } else {
+                       while ( second[j] !== undefined ) {
+                               first[ i++ ] = second[ j++ ];
+                       }
+               }
+
+               first.length = i;
+
+               return first;
+       },
+
+       grep: function( elems, callback, inv ) {
+               var ret = [], retVal;
+               inv = !!inv;
+
+               // Go through the array, only saving the items
+               // that pass the validator function
+               for ( var i = 0, length = elems.length; i < length; i++ ) {
+                       retVal = !!callback( elems[ i ], i );
+                       if ( inv !== retVal ) {
+                               ret.push( elems[ i ] );
+                       }
+               }
+
+               return ret;
+       },
+
+       // arg is for internal usage only
+       map: function( elems, callback, arg ) {
+               var value, key, ret = [],
+                       i = 0,
+                       length = elems.length,
+                       // jquery objects are treated as arrays
+                       isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+               // Go through the array, translating each of the items to their
+               if ( isArray ) {
+                       for ( ; i < length; i++ ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+
+               // Go through every key on the object,
+               } else {
+                       for ( key in elems ) {
+                               value = callback( elems[ key ], key, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+               }
+
+               // Flatten any nested arrays
+               return ret.concat.apply( [], ret );
+       },
+
+       // A global GUID counter for objects
+       guid: 1,
+
+       // Bind a function to a context, optionally partially applying any
+       // arguments.
+       proxy: function( fn, context ) {
+               if ( typeof context === "string" ) {
+                       var tmp = fn[ context ];
+                       context = fn;
+                       fn = tmp;
+               }
+
+               // Quick check to determine if target is callable, in the spec
+               // this throws a TypeError, but we will just return undefined.
+               if ( !jQuery.isFunction( fn ) ) {
+                       return undefined;
+               }
+
+               // Simulated bind
+               var args = slice.call( arguments, 2 ),
+                       proxy = function() {
+                               return fn.apply( context, args.concat( slice.call( arguments ) ) );
+                       };
+
+               // Set the guid of unique handler to the same of original handler, so it can be removed
+               proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+               return proxy;
+       },
+
+       // Mutifunctional method to get and set values to a collection
+       // The value/s can optionally be executed if it's a function
+       access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+               var exec,
+                       bulk = key == null,
+                       i = 0,
+                       length = elems.length;
+
+               // Sets many values
+               if ( key && typeof key === "object" ) {
+                       for ( i in key ) {
+                               jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+                       }
+                       chainable = 1;
+
+               // Sets one value
+               } else if ( value !== undefined ) {
+                       // Optionally, function values get executed if exec is true
+                       exec = pass === undefined && jQuery.isFunction( value );
+
+                       if ( bulk ) {
+                               // Bulk operations only iterate when executing function values
+                               if ( exec ) {
+                                       exec = fn;
+                                       fn = function( elem, key, value ) {
+                                               return exec.call( jQuery( elem ), value );
+                                       };
+
+                               // Otherwise they run against the entire set
+                               } else {
+                                       fn.call( elems, value );
+                                       fn = null;
+                               }
+                       }
+
+                       if ( fn ) {
+                               for (; i < length; i++ ) {
+                                       fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+                               }
+                       }
+
+                       chainable = 1;
+               }
+
+               return chainable ?
+                       elems :
+
+                       // Gets
+                       bulk ?
+                               fn.call( elems ) :
+                               length ? fn( elems[0], key ) : emptyGet;
+       },
+
+       now: function() {
+               return ( new Date() ).getTime();
+       },
+
+       // Use of jQuery.browser is frowned upon.
+       // More details: http://docs.jquery.com/Utilities/jQuery.browser
+       uaMatch: function( ua ) {
+               ua = ua.toLowerCase();
+
+               var match = rwebkit.exec( ua ) ||
+                       ropera.exec( ua ) ||
+                       rmsie.exec( ua ) ||
+                       ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+                       [];
+
+               return { browser: match[1] || "", version: match[2] || "0" };
+       },
+
+       sub: function() {
+               function jQuerySub( selector, context ) {
+                       return new jQuerySub.fn.init( selector, context );
+               }
+               jQuery.extend( true, jQuerySub, this );
+               jQuerySub.superclass = this;
+               jQuerySub.fn = jQuerySub.prototype = this();
+               jQuerySub.fn.constructor = jQuerySub;
+               jQuerySub.sub = this.sub;
+               jQuerySub.fn.init = function init( selector, context ) {
+                       if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+                               context = jQuerySub( context );
+                       }
+
+                       return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+               };
+               jQuerySub.fn.init.prototype = jQuerySub.fn;
+               var rootjQuerySub = jQuerySub(document);
+               return jQuerySub;
+       },
+
+       browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+       class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+       jQuery.browser[ browserMatch.browser ] = true;
+       jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+       jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+       trimLeft = /^[\s\xA0]+/;
+       trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+       DOMContentLoaded = function() {
+               document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+               jQuery.ready();
+       };
+
+} else if ( document.attachEvent ) {
+       DOMContentLoaded = function() {
+               // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+               if ( document.readyState === "complete" ) {
+                       document.detachEvent( "onreadystatechange", DOMContentLoaded );
+                       jQuery.ready();
+               }
+       };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+       if ( jQuery.isReady ) {
+               return;
+       }
+
+       try {
+               // If IE is used, use the trick by Diego Perini
+               // http://javascript.nwbox.com/IEContentLoaded/
+               document.documentElement.doScroll("left");
+       } catch(e) {
+               setTimeout( doScrollCheck, 1 );
+               return;
+       }
+
+       // and execute any waiting functions
+       jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+       var object = flagsCache[ flags ] = {},
+               i, length;
+       flags = flags.split( /\s+/ );
+       for ( i = 0, length = flags.length; i < length; i++ ) {
+               object[ flags[i] ] = true;
+       }
+       return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *     flags:  an optional list of space-separated flags that will change how
+ *                     the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ *     once:                   will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *     memory:                 will keep track of previous values and will call any callback added
+ *                                     after the list has been fired right away with the latest "memorized"
+ *                                     values (like a Deferred)
+ *
+ *     unique:                 will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *     stopOnFalse:    interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+       // Convert flags from String-formatted to Object-formatted
+       // (we check in cache first)
+       flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+       var // Actual callback list
+               list = [],
+               // Stack of fire calls for repeatable lists
+               stack = [],
+               // Last fire value (for non-forgettable lists)
+               memory,
+               // Flag to know if list was already fired
+               fired,
+               // Flag to know if list is currently firing
+               firing,
+               // First callback to fire (used internally by add and fireWith)
+               firingStart,
+               // End of the loop when firing
+               firingLength,
+               // Index of currently firing callback (modified by remove if needed)
+               firingIndex,
+               // Add one or several callbacks to the list
+               add = function( args ) {
+                       var i,
+                               length,
+                               elem,
+                               type,
+                               actual;
+                       for ( i = 0, length = args.length; i < length; i++ ) {
+                               elem = args[ i ];
+                               type = jQuery.type( elem );
+                               if ( type === "array" ) {
+                                       // Inspect recursively
+                                       add( elem );
+                               } else if ( type === "function" ) {
+                                       // Add if not in unique mode and callback is not in
+                                       if ( !flags.unique || !self.has( elem ) ) {
+                                               list.push( elem );
+                                       }
+                               }
+                       }
+               },
+               // Fire callbacks
+               fire = function( context, args ) {
+                       args = args || [];
+                       memory = !flags.memory || [ context, args ];
+                       fired = true;
+                       firing = true;
+                       firingIndex = firingStart || 0;
+                       firingStart = 0;
+                       firingLength = list.length;
+                       for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+                               if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+                                       memory = true; // Mark as halted
+                                       break;
+                               }
+                       }
+                       firing = false;
+                       if ( list ) {
+                               if ( !flags.once ) {
+                                       if ( stack && stack.length ) {
+                                               memory = stack.shift();
+                                               self.fireWith( memory[ 0 ], memory[ 1 ] );
+                                       }
+                               } else if ( memory === true ) {
+                                       self.disable();
+                               } else {
+                                       list = [];
+                               }
+                       }
+               },
+               // Actual Callbacks object
+               self = {
+                       // Add a callback or a collection of callbacks to the list
+                       add: function() {
+                               if ( list ) {
+                                       var length = list.length;
+                                       add( arguments );
+                                       // Do we need to add the callbacks to the
+                                       // current firing batch?
+                                       if ( firing ) {
+                                               firingLength = list.length;
+                                       // With memory, if we're not firing then
+                                       // we should call right away, unless previous
+                                       // firing was halted (stopOnFalse)
+                                       } else if ( memory && memory !== true ) {
+                                               firingStart = length;
+                                               fire( memory[ 0 ], memory[ 1 ] );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Remove a callback from the list
+                       remove: function() {
+                               if ( list ) {
+                                       var args = arguments,
+                                               argIndex = 0,
+                                               argLength = args.length;
+                                       for ( ; argIndex < argLength ; argIndex++ ) {
+                                               for ( var i = 0; i < list.length; i++ ) {
+                                                       if ( args[ argIndex ] === list[ i ] ) {
+                                                               // Handle firingIndex and firingLength
+                                                               if ( firing ) {
+                                                                       if ( i <= firingLength ) {
+                                                                               firingLength--;
+                                                                               if ( i <= firingIndex ) {
+                                                                                       firingIndex--;
+                                                                               }
+                                                                       }
+                                                               }
+                                                               // Remove the element
+                                                               list.splice( i--, 1 );
+                                                               // If we have some unicity property then
+                                                               // we only need to do this once
+                                                               if ( flags.unique ) {
+                                                                       break;
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                               return this;
+                       },
+                       // Control if a given callback is in the list
+                       has: function( fn ) {
+                               if ( list ) {
+                                       var i = 0,
+                                               length = list.length;
+                                       for ( ; i < length; i++ ) {
+                                               if ( fn === list[ i ] ) {
+                                                       return true;
+                                               }
+                                       }
+                               }
+                               return false;
+                       },
+                       // Remove all callbacks from the list
+                       empty: function() {
+                               list = [];
+                               return this;
+                       },
+                       // Have the list do nothing anymore
+                       disable: function() {
+                               list = stack = memory = undefined;
+                               return this;
+                       },
+                       // Is it disabled?
+                       disabled: function() {
+                               return !list;
+                       },
+                       // Lock the list in its current state
+                       lock: function() {
+                               stack = undefined;
+                               if ( !memory || memory === true ) {
+                                       self.disable();
+                               }
+                               return this;
+                       },
+                       // Is it locked?
+                       locked: function() {
+                               return !stack;
+                       },
+                       // Call all callbacks with the given context and arguments
+                       fireWith: function( context, args ) {
+                               if ( stack ) {
+                                       if ( firing ) {
+                                               if ( !flags.once ) {
+                                                       stack.push( [ context, args ] );
+                                               }
+                                       } else if ( !( flags.once && memory ) ) {
+                                               fire( context, args );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Call all the callbacks with the given arguments
+                       fire: function() {
+                               self.fireWith( this, arguments );
+                               return this;
+                       },
+                       // To know if the callbacks have already been called at least once
+                       fired: function() {
+                               return !!fired;
+                       }
+               };
+
+       return self;
+};
+
+
+
+
+var // Static reference to slice
+       sliceDeferred = [].slice;
+
+jQuery.extend({
+
+       Deferred: function( func ) {
+               var doneList = jQuery.Callbacks( "once memory" ),
+                       failList = jQuery.Callbacks( "once memory" ),
+                       progressList = jQuery.Callbacks( "memory" ),
+                       state = "pending",
+                       lists = {
+                               resolve: doneList,
+                               reject: failList,
+                               notify: progressList
+                       },
+                       promise = {
+                               done: doneList.add,
+                               fail: failList.add,
+                               progress: progressList.add,
+
+                               state: function() {
+                                       return state;
+                               },
+
+                               // Deprecated
+                               isResolved: doneList.fired,
+                               isRejected: failList.fired,
+
+                               then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+                                       deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+                                       return this;
+                               },
+                               always: function() {
+                                       deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+                                       return this;
+                               },
+                               pipe: function( fnDone, fnFail, fnProgress ) {
+                                       return jQuery.Deferred(function( newDefer ) {
+                                               jQuery.each( {
+                                                       done: [ fnDone, "resolve" ],
+                                                       fail: [ fnFail, "reject" ],
+                                                       progress: [ fnProgress, "notify" ]
+                                               }, function( handler, data ) {
+                                                       var fn = data[ 0 ],
+                                                               action = data[ 1 ],
+                                                               returned;
+                                                       if ( jQuery.isFunction( fn ) ) {
+                                                               deferred[ handler ](function() {
+                                                                       returned = fn.apply( this, arguments );
+                                                                       if ( returned && jQuery.isFunction( returned.promise ) ) {
+                                                                               returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+                                                                       } else {
+                                                                               newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+                                                                       }
+                                                               });
+                                                       } else {
+                                                               deferred[ handler ]( newDefer[ action ] );
+                                                       }
+                                               });
+                                       }).promise();
+                               },
+                               // Get a promise for this deferred
+                               // If obj is provided, the promise aspect is added to the object
+                               promise: function( obj ) {
+                                       if ( obj == null ) {
+                                               obj = promise;
+                                       } else {
+                                               for ( var key in promise ) {
+                                                       obj[ key ] = promise[ key ];
+                                               }
+                                       }
+                                       return obj;
+                               }
+                       },
+                       deferred = promise.promise({}),
+                       key;
+
+               for ( key in lists ) {
+                       deferred[ key ] = lists[ key ].fire;
+                       deferred[ key + "With" ] = lists[ key ].fireWith;
+               }
+
+               // Handle state
+               deferred.done( function() {
+                       state = "resolved";
+               }, failList.disable, progressList.lock ).fail( function() {
+                       state = "rejected";
+               }, doneList.disable, progressList.lock );
+
+               // Call given func if any
+               if ( func ) {
+                       func.call( deferred, deferred );
+               }
+
+               // All done!
+               return deferred;
+       },
+
+       // Deferred helper
+       when: function( firstParam ) {
+               var args = sliceDeferred.call( arguments, 0 ),
+                       i = 0,
+                       length = args.length,
+                       pValues = new Array( length ),
+                       count = length,
+                       pCount = length,
+                       deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+                               firstParam :
+                               jQuery.Deferred(),
+                       promise = deferred.promise();
+               function resolveFunc( i ) {
+                       return function( value ) {
+                               args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+                               if ( !( --count ) ) {
+                                       deferred.resolveWith( deferred, args );
+                               }
+                       };
+               }
+               function progressFunc( i ) {
+                       return function( value ) {
+                               pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+                               deferred.notifyWith( promise, pValues );
+                       };
+               }
+               if ( length > 1 ) {
+                       for ( ; i < length; i++ ) {
+                               if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+                                       args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+                               } else {
+                                       --count;
+                               }
+                       }
+                       if ( !count ) {
+                               deferred.resolveWith( deferred, args );
+                       }
+               } else if ( deferred !== firstParam ) {
+                       deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+               }
+               return promise;
+       }
+});
+
+
+
+
+jQuery.support = (function() {
+
+       var support,
+               all,
+               a,
+               select,
+               opt,
+               input,
+               fragment,
+               tds,
+               events,
+               eventName,
+               i,
+               isSupported,
+               div = document.createElement( "div" ),
+               documentElement = document.documentElement;
+
+       // Preliminary tests
+       div.setAttribute("className", "t");
+       div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+       all = div.getElementsByTagName( "*" );
+       a = div.getElementsByTagName( "a" )[ 0 ];
+
+       // Can't get basic test support
+       if ( !all || !all.length || !a ) {
+               return {};
+       }
+
+       // First batch of supports tests
+       select = document.createElement( "select" );
+       opt = select.appendChild( document.createElement("option") );
+       input = div.getElementsByTagName( "input" )[ 0 ];
+
+       support = {
+               // IE strips leading whitespace when .innerHTML is used
+               leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+               // Make sure that tbody elements aren't automatically inserted
+               // IE will insert them into empty tables
+               tbody: !div.getElementsByTagName("tbody").length,
+
+               // Make sure that link elements get serialized correctly by innerHTML
+               // This requires a wrapper element in IE
+               htmlSerialize: !!div.getElementsByTagName("link").length,
+
+               // Get the style information from getAttribute
+               // (IE uses .cssText instead)
+               style: /top/.test( a.getAttribute("style") ),
+
+               // Make sure that URLs aren't manipulated
+               // (IE normalizes it by default)
+               hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+               // Make sure that element opacity exists
+               // (IE uses filter instead)
+               // Use a regex to work around a WebKit issue. See #5145
+               opacity: /^0.55/.test( a.style.opacity ),
+
+               // Verify style float existence
+               // (IE uses styleFloat instead of cssFloat)
+               cssFloat: !!a.style.cssFloat,
+
+               // Make sure that if no value is specified for a checkbox
+               // that it defaults to "on".
+               // (WebKit defaults to "" instead)
+               checkOn: ( input.value === "on" ),
+
+               // Make sure that a selected-by-default option has a working selected property.
+               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+               optSelected: opt.selected,
+
+               // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+               getSetAttribute: div.className !== "t",
+
+               // Tests for enctype support on a form(#6743)
+               enctype: !!document.createElement("form").enctype,
+
+               // Makes sure cloning an html5 element does not cause problems
+               // Where outerHTML is undefined, this still works
+               html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+               // Will be defined later
+               submitBubbles: true,
+               changeBubbles: true,
+               focusinBubbles: false,
+               deleteExpando: true,
+               noCloneEvent: true,
+               inlineBlockNeedsLayout: false,
+               shrinkWrapBlocks: false,
+               reliableMarginRight: true,
+               pixelMargin: true
+       };
+
+       // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+       jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+       // Make sure checked status is properly cloned
+       input.checked = true;
+       support.noCloneChecked = input.cloneNode( true ).checked;
+
+       // Make sure that the options inside disabled selects aren't marked as disabled
+       // (WebKit marks them as disabled)
+       select.disabled = true;
+       support.optDisabled = !opt.disabled;
+
+       // Test to see if it's possible to delete an expando from an element
+       // Fails in Internet Explorer
+       try {
+               delete div.test;
+       } catch( e ) {
+               support.deleteExpando = false;
+       }
+
+       if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+               div.attachEvent( "onclick", function() {
+                       // Cloning a node shouldn't copy over any
+                       // bound event handlers (IE does this)
+                       support.noCloneEvent = false;
+               });
+               div.cloneNode( true ).fireEvent( "onclick" );
+       }
+
+       // Check if a radio maintains its value
+       // after being appended to the DOM
+       input = document.createElement("input");
+       input.value = "t";
+       input.setAttribute("type", "radio");
+       support.radioValue = input.value === "t";
+
+       input.setAttribute("checked", "checked");
+
+       // #11217 - WebKit loses check when the name is after the checked attribute
+       input.setAttribute( "name", "t" );
+
+       div.appendChild( input );
+       fragment = document.createDocumentFragment();
+       fragment.appendChild( div.lastChild );
+
+       // WebKit doesn't clone checked state correctly in fragments
+       support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+       // Check if a disconnected checkbox will retain its checked
+       // value of true after appended to the DOM (IE6/7)
+       support.appendChecked = input.checked;
+
+       fragment.removeChild( input );
+       fragment.appendChild( div );
+
+       // Technique from Juriy Zaytsev
+       // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+       // We only care about the case where non-standard event systems
+       // are used, namely in IE. Short-circuiting here helps us to
+       // avoid an eval call (in setAttribute) which can cause CSP
+       // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+       if ( div.attachEvent ) {
+               for ( i in {
+                       submit: 1,
+                       change: 1,
+                       focusin: 1
+               }) {
+                       eventName = "on" + i;
+                       isSupported = ( eventName in div );
+                       if ( !isSupported ) {
+                               div.setAttribute( eventName, "return;" );
+                               isSupported = ( typeof div[ eventName ] === "function" );
+                       }
+                       support[ i + "Bubbles" ] = isSupported;
+               }
+       }
+
+       fragment.removeChild( div );
+
+       // Null elements to avoid leaks in IE
+       fragment = select = opt = div = input = null;
+
+       // Run tests that need a body at doc ready
+       jQuery(function() {
+               var container, outer, inner, table, td, offsetSupport,
+                       marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+                       paddingMarginBorderVisibility, paddingMarginBorder,
+                       body = document.getElementsByTagName("body")[0];
+
+               if ( !body ) {
+                       // Return for frameset docs that don't have a body
+                       return;
+               }
+
+               conMarginTop = 1;
+               paddingMarginBorder = "padding:0;margin:0;border:";
+               positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+               paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+               style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+               html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
+                       "<table " + style + "' cellpadding='0' cellspacing='0'>" +
+                       "<tr><td></td></tr></table>";
+
+               container = document.createElement("div");
+               container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+               body.insertBefore( container, body.firstChild );
+
+               // Construct the test element
+               div = document.createElement("div");
+               container.appendChild( div );
+
+               // Check if table cells still have offsetWidth/Height when they are set
+               // to display:none and there are still other visible table cells in a
+               // table row; if so, offsetWidth/Height are not reliable for use when
+               // determining if an element has been hidden directly using
+               // display:none (it is still safe to use offsets if a parent element is
+               // hidden; don safety goggles and see bug #4512 for more information).
+               // (only IE 8 fails this test)
+               div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
+               tds = div.getElementsByTagName( "td" );
+               isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+               tds[ 0 ].style.display = "";
+               tds[ 1 ].style.display = "none";
+
+               // Check if empty table cells still have offsetWidth/Height
+               // (IE <= 8 fail this test)
+               support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+               // Check if div with explicit width and no margin-right incorrectly
+               // gets computed margin-right based on width of container. For more
+               // info see bug #3333
+               // Fails in WebKit before Feb 2011 nightlies
+               // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+               if ( window.getComputedStyle ) {
+                       div.innerHTML = "";
+                       marginDiv = document.createElement( "div" );
+                       marginDiv.style.width = "0";
+                       marginDiv.style.marginRight = "0";
+                       div.style.width = "2px";
+                       div.appendChild( marginDiv );
+                       support.reliableMarginRight =
+                               ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+               }
+
+               if ( typeof div.style.zoom !== "undefined" ) {
+                       // Check if natively block-level elements act like inline-block
+                       // elements when setting their display to 'inline' and giving
+                       // them layout
+                       // (IE < 8 does this)
+                       div.innerHTML = "";
+                       div.style.width = div.style.padding = "1px";
+                       div.style.border = 0;
+                       div.style.overflow = "hidden";
+                       div.style.display = "inline";
+                       div.style.zoom = 1;
+                       support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                       // Check if elements with layout shrink-wrap their children
+                       // (IE 6 does this)
+                       div.style.display = "block";
+                       div.style.overflow = "visible";
+                       div.innerHTML = "<div style='width:5px;'></div>";
+                       support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+               }
+
+               div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+               div.innerHTML = html;
+
+               outer = div.firstChild;
+               inner = outer.firstChild;
+               td = outer.nextSibling.firstChild.firstChild;
+
+               offsetSupport = {
+                       doesNotAddBorder: ( inner.offsetTop !== 5 ),
+                       doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+               };
+
+               inner.style.position = "fixed";
+               inner.style.top = "20px";
+
+               // safari subtracts parent border width here which is 5px
+               offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+               inner.style.position = inner.style.top = "";
+
+               outer.style.overflow = "hidden";
+               outer.style.position = "relative";
+
+               offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+               offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+               if ( window.getComputedStyle ) {
+                       div.style.marginTop = "1%";
+                       support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+               }
+
+               if ( typeof container.style.zoom !== "undefined" ) {
+                       container.style.zoom = 1;
+               }
+
+               body.removeChild( container );
+               marginDiv = div = container = null;
+
+               jQuery.extend( support, offsetSupport );
+       });
+
+       return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+       rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+       cache: {},
+
+       // Please use with caution
+       uuid: 0,
+
+       // Unique for each copy of jQuery on the page
+       // Non-digits removed to match rinlinejQuery
+       expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+       // The following elements throw uncatchable exceptions if you
+       // attempt to add expando properties to them.
+       noData: {
+               "embed": true,
+               // Ban all objects except for Flash (which handle expandos)
+               "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+               "applet": true
+       },
+
+       hasData: function( elem ) {
+               elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+               return !!elem && !isEmptyDataObject( elem );
+       },
+
+       data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var privateCache, thisCache, ret,
+                       internalKey = jQuery.expando,
+                       getByName = typeof name === "string",
+
+                       // We have to handle DOM nodes and JS objects differently because IE6-7
+                       // can't GC object references properly across the DOM-JS boundary
+                       isNode = elem.nodeType,
+
+                       // Only DOM nodes need the global jQuery cache; JS object data is
+                       // attached directly to the object so GC can occur automatically
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // Only defining an ID for JS objects if its cache already exists allows
+                       // the code to shortcut on the same path as a DOM node with no cache
+                       id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+                       isEvents = name === "events";
+
+               // Avoid doing any more work than we need to when trying to get data on an
+               // object that has no data at all
+               if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+                       return;
+               }
+
+               if ( !id ) {
+                       // Only DOM nodes need a new unique ID for each element since their data
+                       // ends up in the global cache
+                       if ( isNode ) {
+                               elem[ internalKey ] = id = ++jQuery.uuid;
+                       } else {
+                               id = internalKey;
+                       }
+               }
+
+               if ( !cache[ id ] ) {
+                       cache[ id ] = {};
+
+                       // Avoids exposing jQuery metadata on plain JS objects when the object
+                       // is serialized using JSON.stringify
+                       if ( !isNode ) {
+                               cache[ id ].toJSON = jQuery.noop;
+                       }
+               }
+
+               // An object can be passed to jQuery.data instead of a key/value pair; this gets
+               // shallow copied over onto the existing cache
+               if ( typeof name === "object" || typeof name === "function" ) {
+                       if ( pvt ) {
+                               cache[ id ] = jQuery.extend( cache[ id ], name );
+                       } else {
+                               cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+                       }
+               }
+
+               privateCache = thisCache = cache[ id ];
+
+               // jQuery data() is stored in a separate object inside the object's internal data
+               // cache in order to avoid key collisions between internal data and user-defined
+               // data.
+               if ( !pvt ) {
+                       if ( !thisCache.data ) {
+                               thisCache.data = {};
+                       }
+
+                       thisCache = thisCache.data;
+               }
+
+               if ( data !== undefined ) {
+                       thisCache[ jQuery.camelCase( name ) ] = data;
+               }
+
+               // Users should not attempt to inspect the internal events object using jQuery.data,
+               // it is undocumented and subject to change. But does anyone listen? No.
+               if ( isEvents && !thisCache[ name ] ) {
+                       return privateCache.events;
+               }
+
+               // Check for both converted-to-camel and non-converted data property names
+               // If a data property was specified
+               if ( getByName ) {
+
+                       // First Try to find as-is property data
+                       ret = thisCache[ name ];
+
+                       // Test for null|undefined property data
+                       if ( ret == null ) {
+
+                               // Try to find the camelCased property
+                               ret = thisCache[ jQuery.camelCase( name ) ];
+                       }
+               } else {
+                       ret = thisCache;
+               }
+
+               return ret;
+       },
+
+       removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var thisCache, i, l,
+
+                       // Reference to internal data cache key
+                       internalKey = jQuery.expando,
+
+                       isNode = elem.nodeType,
+
+                       // See jQuery.data for more information
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // See jQuery.data for more information
+                       id = isNode ? elem[ internalKey ] : internalKey;
+
+               // If there is already no cache entry for this object, there is no
+               // purpose in continuing
+               if ( !cache[ id ] ) {
+                       return;
+               }
+
+               if ( name ) {
+
+                       thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+                       if ( thisCache ) {
+
+                               // Support array or space separated string names for data keys
+                               if ( !jQuery.isArray( name ) ) {
+
+                                       // try the string as a key before any manipulation
+                                       if ( name in thisCache ) {
+                                               name = [ name ];
+                                       } else {
+
+                                               // split the camel cased version by spaces unless a key with the spaces exists
+                                               name = jQuery.camelCase( name );
+                                               if ( name in thisCache ) {
+                                                       name = [ name ];
+                                               } else {
+                                                       name = name.split( " " );
+                                               }
+                                       }
+                               }
+
+                               for ( i = 0, l = name.length; i < l; i++ ) {
+                                       delete thisCache[ name[i] ];
+                               }
+
+                               // If there is no data left in the cache, we want to continue
+                               // and let the cache object itself get destroyed
+                               if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+                                       return;
+                               }
+                       }
+               }
+
+               // See jQuery.data for more information
+               if ( !pvt ) {
+                       delete cache[ id ].data;
+
+                       // Don't destroy the parent cache unless the internal data object
+                       // had been the only thing left in it
+                       if ( !isEmptyDataObject(cache[ id ]) ) {
+                               return;
+                       }
+               }
+
+               // Browsers that fail expando deletion also refuse to delete expandos on
+               // the window, but it will allow it on all other JS objects; other browsers
+               // don't care
+               // Ensure that `cache` is not a window object #10080
+               if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+                       delete cache[ id ];
+               } else {
+                       cache[ id ] = null;
+               }
+
+               // We destroyed the cache and need to eliminate the expando on the node to avoid
+               // false lookups in the cache for entries that no longer exist
+               if ( isNode ) {
+                       // IE does not allow us to delete expando properties from nodes,
+                       // nor does it have a removeAttribute function on Document nodes;
+                       // we must handle all of these cases
+                       if ( jQuery.support.deleteExpando ) {
+                               delete elem[ internalKey ];
+                       } else if ( elem.removeAttribute ) {
+                               elem.removeAttribute( internalKey );
+                       } else {
+                               elem[ internalKey ] = null;
+                       }
+               }
+       },
+
+       // For internal use only.
+       _data: function( elem, name, data ) {
+               return jQuery.data( elem, name, data, true );
+       },
+
+       // A method for determining if a DOM node can handle the data expando
+       acceptData: function( elem ) {
+               if ( elem.nodeName ) {
+                       var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+                       if ( match ) {
+                               return !(match === true || elem.getAttribute("classid") !== match);
+                       }
+               }
+
+               return true;
+       }
+});
+
+jQuery.fn.extend({
+       data: function( key, value ) {
+               var parts, part, attr, name, l,
+                       elem = this[0],
+                       i = 0,
+                       data = null;
+
+               // Gets all values
+               if ( key === undefined ) {
+                       if ( this.length ) {
+                               data = jQuery.data( elem );
+
+                               if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+                                       attr = elem.attributes;
+                                       for ( l = attr.length; i < l; i++ ) {
+                                               name = attr[i].name;
+
+                                               if ( name.indexOf( "data-" ) === 0 ) {
+                                                       name = jQuery.camelCase( name.substring(5) );
+
+                                                       dataAttr( elem, name, data[ name ] );
+                                               }
+                                       }
+                                       jQuery._data( elem, "parsedAttrs", true );
+                               }
+                       }
+
+                       return data;
+               }
+
+               // Sets multiple values
+               if ( typeof key === "object" ) {
+                       return this.each(function() {
+                               jQuery.data( this, key );
+                       });
+               }
+
+               parts = key.split( ".", 2 );
+               parts[1] = parts[1] ? "." + parts[1] : "";
+               part = parts[1] + "!";
+
+               return jQuery.access( this, function( value ) {
+
+                       if ( value === undefined ) {
+                               data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+                               // Try to fetch any internally stored data first
+                               if ( data === undefined && elem ) {
+                                       data = jQuery.data( elem, key );
+                                       data = dataAttr( elem, key, data );
+                               }
+
+                               return data === undefined && parts[1] ?
+                                       this.data( parts[0] ) :
+                                       data;
+                       }
+
+                       parts[1] = value;
+                       this.each(function() {
+                               var self = jQuery( this );
+
+                               self.triggerHandler( "setData" + part, parts );
+                               jQuery.data( this, key, value );
+                               self.triggerHandler( "changeData" + part, parts );
+                       });
+               }, null, value, arguments.length > 1, null, false );
+       },
+
+       removeData: function( key ) {
+               return this.each(function() {
+                       jQuery.removeData( this, key );
+               });
+       }
+});
+
+function dataAttr( elem, key, data ) {
+       // If nothing was found internally, try to fetch any
+       // data from the HTML5 data-* attribute
+       if ( data === undefined && elem.nodeType === 1 ) {
+
+               var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+               data = elem.getAttribute( name );
+
+               if ( typeof data === "string" ) {
+                       try {
+                               data = data === "true" ? true :
+                               data === "false" ? false :
+                               data === "null" ? null :
+                               jQuery.isNumeric( data ) ? +data :
+                                       rbrace.test( data ) ? jQuery.parseJSON( data ) :
+                                       data;
+                       } catch( e ) {}
+
+                       // Make sure we set the data so it isn't changed later
+                       jQuery.data( elem, key, data );
+
+               } else {
+                       data = undefined;
+               }
+       }
+
+       return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+       for ( var name in obj ) {
+
+               // if the public data object is empty, the private is still empty
+               if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+                       continue;
+               }
+               if ( name !== "toJSON" ) {
+                       return false;
+               }
+       }
+
+       return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+       var deferDataKey = type + "defer",
+               queueDataKey = type + "queue",
+               markDataKey = type + "mark",
+               defer = jQuery._data( elem, deferDataKey );
+       if ( defer &&
+               ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+               ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+               // Give room for hard-coded callbacks to fire first
+               // and eventually mark/queue something else on the element
+               setTimeout( function() {
+                       if ( !jQuery._data( elem, queueDataKey ) &&
+                               !jQuery._data( elem, markDataKey ) ) {
+                               jQuery.removeData( elem, deferDataKey, true );
+                               defer.fire();
+                       }
+               }, 0 );
+       }
+}
+
+jQuery.extend({
+
+       _mark: function( elem, type ) {
+               if ( elem ) {
+                       type = ( type || "fx" ) + "mark";
+                       jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+               }
+       },
+
+       _unmark: function( force, elem, type ) {
+               if ( force !== true ) {
+                       type = elem;
+                       elem = force;
+                       force = false;
+               }
+               if ( elem ) {
+                       type = type || "fx";
+                       var key = type + "mark",
+                               count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+                       if ( count ) {
+                               jQuery._data( elem, key, count );
+                       } else {
+                               jQuery.removeData( elem, key, true );
+                               handleQueueMarkDefer( elem, type, "mark" );
+                       }
+               }
+       },
+
+       queue: function( elem, type, data ) {
+               var q;
+               if ( elem ) {
+                       type = ( type || "fx" ) + "queue";
+                       q = jQuery._data( elem, type );
+
+                       // Speed up dequeue by getting out quickly if this is just a lookup
+                       if ( data ) {
+                               if ( !q || jQuery.isArray(data) ) {
+                                       q = jQuery._data( elem, type, jQuery.makeArray(data) );
+                               } else {
+                                       q.push( data );
+                               }
+                       }
+                       return q || [];
+               }
+       },
+
+       dequeue: function( elem, type ) {
+               type = type || "fx";
+
+               var queue = jQuery.queue( elem, type ),
+                       fn = queue.shift(),
+                       hooks = {};
+
+               // If the fx queue is dequeued, always remove the progress sentinel
+               if ( fn === "inprogress" ) {
+                       fn = queue.shift();
+               }
+
+               if ( fn ) {
+                       // Add a progress sentinel to prevent the fx queue from being
+                       // automatically dequeued
+                       if ( type === "fx" ) {
+                               queue.unshift( "inprogress" );
+                       }
+
+                       jQuery._data( elem, type + ".run", hooks );
+                       fn.call( elem, function() {
+                               jQuery.dequeue( elem, type );
+                       }, hooks );
+               }
+
+               if ( !queue.length ) {
+                       jQuery.removeData( elem, type + "queue " + type + ".run", true );
+                       handleQueueMarkDefer( elem, type, "queue" );
+               }
+       }
+});
+
+jQuery.fn.extend({
+       queue: function( type, data ) {
+               var setter = 2;
+
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+                       setter--;
+               }
+
+               if ( arguments.length < setter ) {
+                       return jQuery.queue( this[0], type );
+               }
+
+               return data === undefined ?
+                       this :
+                       this.each(function() {
+                               var queue = jQuery.queue( this, type, data );
+
+                               if ( type === "fx" && queue[0] !== "inprogress" ) {
+                                       jQuery.dequeue( this, type );
+                               }
+                       });
+       },
+       dequeue: function( type ) {
+               return this.each(function() {
+                       jQuery.dequeue( this, type );
+               });
+       },
+       // Based off of the plugin by Clint Helfers, with permission.
+       // http://blindsignals.com/index.php/2009/07/jquery-delay/
+       delay: function( time, type ) {
+               time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+               type = type || "fx";
+
+               return this.queue( type, function( next, hooks ) {
+                       var timeout = setTimeout( next, time );
+                       hooks.stop = function() {
+                               clearTimeout( timeout );
+                       };
+               });
+       },
+       clearQueue: function( type ) {
+               return this.queue( type || "fx", [] );
+       },
+       // Get a promise resolved when queues of a certain type
+       // are emptied (fx is the type by default)
+       promise: function( type, object ) {
+               if ( typeof type !== "string" ) {
+                       object = type;
+                       type = undefined;
+               }
+               type = type || "fx";
+               var defer = jQuery.Deferred(),
+                       elements = this,
+                       i = elements.length,
+                       count = 1,
+                       deferDataKey = type + "defer",
+                       queueDataKey = type + "queue",
+                       markDataKey = type + "mark",
+                       tmp;
+               function resolve() {
+                       if ( !( --count ) ) {
+                               defer.resolveWith( elements, [ elements ] );
+                       }
+               }
+               while( i-- ) {
+                       if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+                                       ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+                                               jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+                                       jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+                               count++;
+                               tmp.add( resolve );
+                       }
+               }
+               resolve();
+               return defer.promise( object );
+       }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+       rspace = /\s+/,
+       rreturn = /\r/g,
+       rtype = /^(?:button|input)$/i,
+       rfocusable = /^(?:button|input|object|select|textarea)$/i,
+       rclickable = /^a(?:rea)?$/i,
+       rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+       getSetAttribute = jQuery.support.getSetAttribute,
+       nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+       attr: function( name, value ) {
+               return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+       },
+
+       removeAttr: function( name ) {
+               return this.each(function() {
+                       jQuery.removeAttr( this, name );
+               });
+       },
+
+       prop: function( name, value ) {
+               return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+       },
+
+       removeProp: function( name ) {
+               name = jQuery.propFix[ name ] || name;
+               return this.each(function() {
+                       // try/catch handles cases where IE balks (such as removing a property on window)
+                       try {
+                               this[ name ] = undefined;
+                               delete this[ name ];
+                       } catch( e ) {}
+               });
+       },
+
+       addClass: function( value ) {
+               var classNames, i, l, elem,
+                       setClass, c, cl;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).addClass( value.call(this, j, this.className) );
+                       });
+               }
+
+               if ( value && typeof value === "string" ) {
+                       classNames = value.split( rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !elem.className && classNames.length === 1 ) {
+                                               elem.className = value;
+
+                                       } else {
+                                               setClass = " " + elem.className + " ";
+
+                                               for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+                                                               setClass += classNames[ c ] + " ";
+                                                       }
+                                               }
+                                               elem.className = jQuery.trim( setClass );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       removeClass: function( value ) {
+               var classNames, i, l, elem, className, c, cl;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).removeClass( value.call(this, j, this.className) );
+                       });
+               }
+
+               if ( (value && typeof value === "string") || value === undefined ) {
+                       classNames = ( value || "" ).split( rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.nodeType === 1 && elem.className ) {
+                                       if ( value ) {
+                                               className = (" " + elem.className + " ").replace( rclass, " " );
+                                               for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       className = className.replace(" " + classNames[ c ] + " ", " ");
+                                               }
+                                               elem.className = jQuery.trim( className );
+
+                                       } else {
+                                               elem.className = "";
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       toggleClass: function( value, stateVal ) {
+               var type = typeof value,
+                       isBool = typeof stateVal === "boolean";
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( i ) {
+                               jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+                       });
+               }
+
+               return this.each(function() {
+                       if ( type === "string" ) {
+                               // toggle individual class names
+                               var className,
+                                       i = 0,
+                                       self = jQuery( this ),
+                                       state = stateVal,
+                                       classNames = value.split( rspace );
+
+                               while ( (className = classNames[ i++ ]) ) {
+                                       // check each className given, space seperated list
+                                       state = isBool ? state : !self.hasClass( className );
+                                       self[ state ? "addClass" : "removeClass" ]( className );
+                               }
+
+                       } else if ( type === "undefined" || type === "boolean" ) {
+                               if ( this.className ) {
+                                       // store className if set
+                                       jQuery._data( this, "__className__", this.className );
+                               }
+
+                               // toggle whole className
+                               this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+                       }
+               });
+       },
+
+       hasClass: function( selector ) {
+               var className = " " + selector + " ",
+                       i = 0,
+                       l = this.length;
+               for ( ; i < l; i++ ) {
+                       if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       },
+
+       val: function( value ) {
+               var hooks, ret, isFunction,
+                       elem = this[0];
+
+               if ( !arguments.length ) {
+                       if ( elem ) {
+                               hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+                               if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+                                       return ret;
+                               }
+
+                               ret = elem.value;
+
+                               return typeof ret === "string" ?
+                                       // handle most common string cases
+                                       ret.replace(rreturn, "") :
+                                       // handle cases where value is null/undef or number
+                                       ret == null ? "" : ret;
+                       }
+
+                       return;
+               }
+
+               isFunction = jQuery.isFunction( value );
+
+               return this.each(function( i ) {
+                       var self = jQuery(this), val;
+
+                       if ( this.nodeType !== 1 ) {
+                               return;
+                       }
+
+                       if ( isFunction ) {
+                               val = value.call( this, i, self.val() );
+                       } else {
+                               val = value;
+                       }
+
+                       // Treat null/undefined as ""; convert numbers to string
+                       if ( val == null ) {
+                               val = "";
+                       } else if ( typeof val === "number" ) {
+                               val += "";
+                       } else if ( jQuery.isArray( val ) ) {
+                               val = jQuery.map(val, function ( value ) {
+                                       return value == null ? "" : value + "";
+                               });
+                       }
+
+                       hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+                       // If set returns undefined, fall back to normal setting
+                       if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+                               this.value = val;
+                       }
+               });
+       }
+});
+
+jQuery.extend({
+       valHooks: {
+               option: {
+                       get: function( elem ) {
+                               // attributes.value is undefined in Blackberry 4.7 but
+                               // uses .value. See #6932
+                               var val = elem.attributes.value;
+                               return !val || val.specified ? elem.value : elem.text;
+                       }
+               },
+               select: {
+                       get: function( elem ) {
+                               var value, i, max, option,
+                                       index = elem.selectedIndex,
+                                       values = [],
+                                       options = elem.options,
+                                       one = elem.type === "select-one";
+
+                               // Nothing was selected
+                               if ( index < 0 ) {
+                                       return null;
+                               }
+
+                               // Loop through all the selected options
+                               i = one ? index : 0;
+                               max = one ? index + 1 : options.length;
+                               for ( ; i < max; i++ ) {
+                                       option = options[ i ];
+
+                                       // Don't return options that are disabled or in a disabled optgroup
+                                       if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+                                                       (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+                                               // Get the specific value for the option
+                                               value = jQuery( option ).val();
+
+                                               // We don't need an array for one selects
+                                               if ( one ) {
+                                                       return value;
+                                               }
+
+                                               // Multi-Selects return an array
+                                               values.push( value );
+                                       }
+                               }
+
+                               // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+                               if ( one && !values.length && options.length ) {
+                                       return jQuery( options[ index ] ).val();
+                               }
+
+                               return values;
+                       },
+
+                       set: function( elem, value ) {
+                               var values = jQuery.makeArray( value );
+
+                               jQuery(elem).find("option").each(function() {
+                                       this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+                               });
+
+                               if ( !values.length ) {
+                                       elem.selectedIndex = -1;
+                               }
+                               return values;
+                       }
+               }
+       },
+
+       attrFn: {
+               val: true,
+               css: true,
+               html: true,
+               text: true,
+               data: true,
+               width: true,
+               height: true,
+               offset: true
+       },
+
+       attr: function( elem, name, value, pass ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set attributes on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               if ( pass && name in jQuery.attrFn ) {
+                       return jQuery( elem )[ name ]( value );
+               }
+
+               // Fallback to prop when attributes are not supported
+               if ( typeof elem.getAttribute === "undefined" ) {
+                       return jQuery.prop( elem, name, value );
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               // All attributes are lowercase
+               // Grab necessary hook if one is defined
+               if ( notxml ) {
+                       name = name.toLowerCase();
+                       hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+               }
+
+               if ( value !== undefined ) {
+
+                       if ( value === null ) {
+                               jQuery.removeAttr( elem, name );
+                               return;
+
+                       } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               elem.setAttribute( name, "" + value );
+                               return value;
+                       }
+
+               } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+                       return ret;
+
+               } else {
+
+                       ret = elem.getAttribute( name );
+
+                       // Non-existent attributes return null, we normalize to undefined
+                       return ret === null ?
+                               undefined :
+                               ret;
+               }
+       },
+
+       removeAttr: function( elem, value ) {
+               var propName, attrNames, name, l, isBool,
+                       i = 0;
+
+               if ( value && elem.nodeType === 1 ) {
+                       attrNames = value.toLowerCase().split( rspace );
+                       l = attrNames.length;
+
+                       for ( ; i < l; i++ ) {
+                               name = attrNames[ i ];
+
+                               if ( name ) {
+                                       propName = jQuery.propFix[ name ] || name;
+                                       isBool = rboolean.test( name );
+
+                                       // See #9699 for explanation of this approach (setting first, then removal)
+                                       // Do not do this for boolean attributes (see #10870)
+                                       if ( !isBool ) {
+                                               jQuery.attr( elem, name, "" );
+                                       }
+                                       elem.removeAttribute( getSetAttribute ? name : propName );
+
+                                       // Set corresponding property to false for boolean attributes
+                                       if ( isBool && propName in elem ) {
+                                               elem[ propName ] = false;
+                                       }
+                               }
+                       }
+               }
+       },
+
+       attrHooks: {
+               type: {
+                       set: function( elem, value ) {
+                               // We can't allow the type property to be changed (since it causes problems in IE)
+                               if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+                                       jQuery.error( "type property can't be changed" );
+                               } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+                                       // Setting the type on a radio button after the value resets the value in IE6-9
+                                       // Reset value to it's default in case type is set after value
+                                       // This is for element creation
+                                       var val = elem.value;
+                                       elem.setAttribute( "type", value );
+                                       if ( val ) {
+                                               elem.value = val;
+                                       }
+                                       return value;
+                               }
+                       }
+               },
+               // Use the value property for back compat
+               // Use the nodeHook for button elements in IE6/7 (#1954)
+               value: {
+                       get: function( elem, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.get( elem, name );
+                               }
+                               return name in elem ?
+                                       elem.value :
+                                       null;
+                       },
+                       set: function( elem, value, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.set( elem, value, name );
+                               }
+                               // Does not return so that setAttribute is also used
+                               elem.value = value;
+                       }
+               }
+       },
+
+       propFix: {
+               tabindex: "tabIndex",
+               readonly: "readOnly",
+               "for": "htmlFor",
+               "class": "className",
+               maxlength: "maxLength",
+               cellspacing: "cellSpacing",
+               cellpadding: "cellPadding",
+               rowspan: "rowSpan",
+               colspan: "colSpan",
+               usemap: "useMap",
+               frameborder: "frameBorder",
+               contenteditable: "contentEditable"
+       },
+
+       prop: function( elem, name, value ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set properties on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               if ( notxml ) {
+                       // Fix name and attach hooks
+                       name = jQuery.propFix[ name ] || name;
+                       hooks = jQuery.propHooks[ name ];
+               }
+
+               if ( value !== undefined ) {
+                       if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               return ( elem[ name ] = value );
+                       }
+
+               } else {
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+                               return ret;
+
+                       } else {
+                               return elem[ name ];
+                       }
+               }
+       },
+
+       propHooks: {
+               tabIndex: {
+                       get: function( elem ) {
+                               // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+                               // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                               var attributeNode = elem.getAttributeNode("tabindex");
+
+                               return attributeNode && attributeNode.specified ?
+                                       parseInt( attributeNode.value, 10 ) :
+                                       rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+                                               0 :
+                                               undefined;
+                       }
+               }
+       }
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+       get: function( elem, name ) {
+               // Align boolean attributes with corresponding properties
+               // Fall back to attribute presence where some booleans are not supported
+               var attrNode,
+                       property = jQuery.prop( elem, name );
+               return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+                       name.toLowerCase() :
+                       undefined;
+       },
+       set: function( elem, value, name ) {
+               var propName;
+               if ( value === false ) {
+                       // Remove boolean attributes when set to false
+                       jQuery.removeAttr( elem, name );
+               } else {
+                       // value is true since we know at this point it's type boolean and not false
+                       // Set boolean attributes to the same name and set the DOM property
+                       propName = jQuery.propFix[ name ] || name;
+                       if ( propName in elem ) {
+                               // Only set the IDL specifically if it already exists on the element
+                               elem[ propName ] = true;
+                       }
+
+                       elem.setAttribute( name, name.toLowerCase() );
+               }
+               return name;
+       }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+       fixSpecified = {
+               name: true,
+               id: true,
+               coords: true
+       };
+
+       // Use this for any attribute in IE6/7
+       // This fixes almost every IE6/7 issue
+       nodeHook = jQuery.valHooks.button = {
+               get: function( elem, name ) {
+                       var ret;
+                       ret = elem.getAttributeNode( name );
+                       return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+                               ret.nodeValue :
+                               undefined;
+               },
+               set: function( elem, value, name ) {
+                       // Set the existing or create a new attribute node
+                       var ret = elem.getAttributeNode( name );
+                       if ( !ret ) {
+                               ret = document.createAttribute( name );
+                               elem.setAttributeNode( ret );
+                       }
+                       return ( ret.nodeValue = value + "" );
+               }
+       };
+
+       // Apply the nodeHook to tabindex
+       jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+       // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+       // This is for removals
+       jQuery.each([ "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       set: function( elem, value ) {
+                               if ( value === "" ) {
+                                       elem.setAttribute( name, "auto" );
+                                       return value;
+                               }
+                       }
+               });
+       });
+
+       // Set contenteditable to false on removals(#10429)
+       // Setting to empty string throws an error as an invalid value
+       jQuery.attrHooks.contenteditable = {
+               get: nodeHook.get,
+               set: function( elem, value, name ) {
+                       if ( value === "" ) {
+                               value = "false";
+                       }
+                       nodeHook.set( elem, value, name );
+               }
+       };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+       jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       get: function( elem ) {
+                               var ret = elem.getAttribute( name, 2 );
+                               return ret === null ? undefined : ret;
+                       }
+               });
+       });
+}
+
+if ( !jQuery.support.style ) {
+       jQuery.attrHooks.style = {
+               get: function( elem ) {
+                       // Return undefined in the case of empty string
+                       // Normalize to lowercase since IE uppercases css property names
+                       return elem.style.cssText.toLowerCase() || undefined;
+               },
+               set: function( elem, value ) {
+                       return ( elem.style.cssText = "" + value );
+               }
+       };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+       jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+               get: function( elem ) {
+                       var parent = elem.parentNode;
+
+                       if ( parent ) {
+                               parent.selectedIndex;
+
+                               // Make sure that it also works with optgroups, see #5701
+                               if ( parent.parentNode ) {
+                                       parent.parentNode.selectedIndex;
+                               }
+                       }
+                       return null;
+               }
+       });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+       jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+       jQuery.each([ "radio", "checkbox" ], function() {
+               jQuery.valHooks[ this ] = {
+                       get: function( elem ) {
+                               // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+                               return elem.getAttribute("value") === null ? "on" : elem.value;
+                       }
+               };
+       });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+       jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+               set: function( elem, value ) {
+                       if ( jQuery.isArray( value ) ) {
+                               return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+                       }
+               }
+       });
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+       rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+       rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
+       rkeyEvent = /^key/,
+       rmouseEvent = /^(?:mouse|contextmenu)|click/,
+       rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+       rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+       quickParse = function( selector ) {
+               var quick = rquickIs.exec( selector );
+               if ( quick ) {
+                       //   0  1    2   3
+                       // [ _, tag, id, class ]
+                       quick[1] = ( quick[1] || "" ).toLowerCase();
+                       quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+               }
+               return quick;
+       },
+       quickIs = function( elem, m ) {
+               var attrs = elem.attributes || {};
+               return (
+                       (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+                       (!m[2] || (attrs.id || {}).value === m[2]) &&
+                       (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+               );
+       },
+       hoverHack = function( events ) {
+               return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+       };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+       add: function( elem, types, handler, data, selector ) {
+
+               var elemData, eventHandle, events,
+                       t, tns, type, namespaces, handleObj,
+                       handleObjIn, quick, handlers, special;
+
+               // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+               if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+                       return;
+               }
+
+               // Caller can pass in an object of custom data in lieu of the handler
+               if ( handler.handler ) {
+                       handleObjIn = handler;
+                       handler = handleObjIn.handler;
+                       selector = handleObjIn.selector;
+               }
+
+               // Make sure that the handler has a unique ID, used to find/remove it later
+               if ( !handler.guid ) {
+                       handler.guid = jQuery.guid++;
+               }
+
+               // Init the element's event structure and main handler, if this is the first
+               events = elemData.events;
+               if ( !events ) {
+                       elemData.events = events = {};
+               }
+               eventHandle = elemData.handle;
+               if ( !eventHandle ) {
+                       elemData.handle = eventHandle = function( e ) {
+                               // Discard the second event of a jQuery.event.trigger() and
+                               // when an event is called after a page has unloaded
+                               return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+                                       jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+                                       undefined;
+                       };
+                       // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+                       eventHandle.elem = elem;
+               }
+
+               // Handle multiple events separated by a space
+               // jQuery(...).bind("mouseover mouseout", fn);
+               types = jQuery.trim( hoverHack(types) ).split( " " );
+               for ( t = 0; t < types.length; t++ ) {
+
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = tns[1];
+                       namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+                       // If event changes its type, use the special event handlers for the changed type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // If selector defined, determine special event api type, otherwise given type
+                       type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                       // Update special based on newly reset type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // handleObj is passed to all event handlers
+                       handleObj = jQuery.extend({
+                               type: type,
+                               origType: tns[1],
+                               data: data,
+                               handler: handler,
+                               guid: handler.guid,
+                               selector: selector,
+                               quick: selector && quickParse( selector ),
+                               namespace: namespaces.join(".")
+                       }, handleObjIn );
+
+                       // Init the event handler queue if we're the first
+                       handlers = events[ type ];
+                       if ( !handlers ) {
+                               handlers = events[ type ] = [];
+                               handlers.delegateCount = 0;
+
+                               // Only use addEventListener/attachEvent if the special events handler returns false
+                               if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                                       // Bind the global event handler to the element
+                                       if ( elem.addEventListener ) {
+                                               elem.addEventListener( type, eventHandle, false );
+
+                                       } else if ( elem.attachEvent ) {
+                                               elem.attachEvent( "on" + type, eventHandle );
+                                       }
+                               }
+                       }
+
+                       if ( special.add ) {
+                               special.add.call( elem, handleObj );
+
+                               if ( !handleObj.handler.guid ) {
+                                       handleObj.handler.guid = handler.guid;
+                               }
+                       }
+
+                       // Add to the element's handler list, delegates in front
+                       if ( selector ) {
+                               handlers.splice( handlers.delegateCount++, 0, handleObj );
+                       } else {
+                               handlers.push( handleObj );
+                       }
+
+                       // Keep track of which events have ever been used, for event optimization
+                       jQuery.event.global[ type ] = true;
+               }
+
+               // Nullify elem to prevent memory leaks in IE
+               elem = null;
+       },
+
+       global: {},
+
+       // Detach an event or set of events from an element
+       remove: function( elem, types, handler, selector, mappedTypes ) {
+
+               var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+                       t, tns, type, origType, namespaces, origCount,
+                       j, events, special, handle, eventType, handleObj;
+
+               if ( !elemData || !(events = elemData.events) ) {
+                       return;
+               }
+
+               // Once for each type.namespace in types; type may be omitted
+               types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+               for ( t = 0; t < types.length; t++ ) {
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = origType = tns[1];
+                       namespaces = tns[2];
+
+                       // Unbind all events (on this namespace, if provided) for the element
+                       if ( !type ) {
+                               for ( type in events ) {
+                                       jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+                               }
+                               continue;
+                       }
+
+                       special = jQuery.event.special[ type ] || {};
+                       type = ( selector? special.delegateType : special.bindType ) || type;
+                       eventType = events[ type ] || [];
+                       origCount = eventType.length;
+                       namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+                       // Remove matching events
+                       for ( j = 0; j < eventType.length; j++ ) {
+                               handleObj = eventType[ j ];
+
+                               if ( ( mappedTypes || origType === handleObj.origType ) &&
+                                        ( !handler || handler.guid === handleObj.guid ) &&
+                                        ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+                                        ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+                                       eventType.splice( j--, 1 );
+
+                                       if ( handleObj.selector ) {
+                                               eventType.delegateCount--;
+                                       }
+                                       if ( special.remove ) {
+                                               special.remove.call( elem, handleObj );
+                                       }
+                               }
+                       }
+
+                       // Remove generic event handler if we removed something and no more handlers exist
+                       // (avoids potential for endless recursion during removal of special event handlers)
+                       if ( eventType.length === 0 && origCount !== eventType.length ) {
+                               if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+                                       jQuery.removeEvent( elem, type, elemData.handle );
+                               }
+
+                               delete events[ type ];
+                       }
+               }
+
+               // Remove the expando if it's no longer used
+               if ( jQuery.isEmptyObject( events ) ) {
+                       handle = elemData.handle;
+                       if ( handle ) {
+                               handle.elem = null;
+                       }
+
+                       // removeData also checks for emptiness and clears the expando if empty
+                       // so use it instead of delete
+                       jQuery.removeData( elem, [ "events", "handle" ], true );
+               }
+       },
+
+       // Events that are safe to short-circuit if no handlers are attached.
+       // Native DOM events should not be added, they may have inline handlers.
+       customEvent: {
+               "getData": true,
+               "setData": true,
+               "changeData": true
+       },
+
+       trigger: function( event, data, elem, onlyHandlers ) {
+               // Don't do events on text and comment nodes
+               if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+                       return;
+               }
+
+               // Event object or event type
+               var type = event.type || event,
+                       namespaces = [],
+                       cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+               // focus/blur morphs to focusin/out; ensure we're not firing them right now
+               if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+                       return;
+               }
+
+               if ( type.indexOf( "!" ) >= 0 ) {
+                       // Exclusive events trigger only for the exact event (no namespaces)
+                       type = type.slice(0, -1);
+                       exclusive = true;
+               }
+
+               if ( type.indexOf( "." ) >= 0 ) {
+                       // Namespaced trigger; create a regexp to match event type in handle()
+                       namespaces = type.split(".");
+                       type = namespaces.shift();
+                       namespaces.sort();
+               }
+
+               if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+                       // No jQuery handlers for this event type, and it can't have inline handlers
+                       return;
+               }
+
+               // Caller can pass in an Event, Object, or just an event type string
+               event = typeof event === "object" ?
+                       // jQuery.Event object
+                       event[ jQuery.expando ] ? event :
+                       // Object literal
+                       new jQuery.Event( type, event ) :
+                       // Just the event type (string)
+                       new jQuery.Event( type );
+
+               event.type = type;
+               event.isTrigger = true;
+               event.exclusive = exclusive;
+               event.namespace = namespaces.join( "." );
+               event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+               ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+               // Handle a global trigger
+               if ( !elem ) {
+
+                       // TODO: Stop taunting the data cache; remove global events and always attach to document
+                       cache = jQuery.cache;
+                       for ( i in cache ) {
+                               if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+                                       jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+                               }
+                       }
+                       return;
+               }
+
+               // Clean up the event in case it is being reused
+               event.result = undefined;
+               if ( !event.target ) {
+                       event.target = elem;
+               }
+
+               // Clone any incoming data and prepend the event, creating the handler arg list
+               data = data != null ? jQuery.makeArray( data ) : [];
+               data.unshift( event );
+
+               // Allow special events to draw outside the lines
+               special = jQuery.event.special[ type ] || {};
+               if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+                       return;
+               }
+
+               // Determine event propagation path in advance, per W3C events spec (#9951)
+               // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+               eventPath = [[ elem, special.bindType || type ]];
+               if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+                       bubbleType = special.delegateType || type;
+                       cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+                       old = null;
+                       for ( ; cur; cur = cur.parentNode ) {
+                               eventPath.push([ cur, bubbleType ]);
+                               old = cur;
+                       }
+
+                       // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                       if ( old && old === elem.ownerDocument ) {
+                               eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+                       }
+               }
+
+               // Fire handlers on the event path
+               for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+                       cur = eventPath[i][0];
+                       event.type = eventPath[i][1];
+
+                       handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+                       if ( handle ) {
+                               handle.apply( cur, data );
+                       }
+                       // Note that this is a bare JS function and not a jQuery handler
+                       handle = ontype && cur[ ontype ];
+                       if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+                               event.preventDefault();
+                       }
+               }
+               event.type = type;
+
+               // If nobody prevented the default action, do it now
+               if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+                       if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+                               !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+                               // Call a native DOM method on the target with the same name name as the event.
+                               // Can't use an .isFunction() check here because IE6/7 fails that test.
+                               // Don't do default actions on window, that's where global variables be (#6170)
+                               // IE<9 dies on focus/blur to hidden element (#1486)
+                               if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+                                       // Don't re-trigger an onFOO event when we call its FOO() method
+                                       old = elem[ ontype ];
+
+                                       if ( old ) {
+                                               elem[ ontype ] = null;
+                                       }
+
+                                       // Prevent re-triggering of the same event, since we already bubbled it above
+                                       jQuery.event.triggered = type;
+                                       elem[ type ]();
+                                       jQuery.event.triggered = undefined;
+
+                                       if ( old ) {
+                                               elem[ ontype ] = old;
+                                       }
+                               }
+                       }
+               }
+
+               return event.result;
+       },
+
+       dispatch: function( event ) {
+
+               // Make a writable jQuery.Event from the native event object
+               event = jQuery.event.fix( event || window.event );
+
+               var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+                       delegateCount = handlers.delegateCount,
+                       args = [].slice.call( arguments, 0 ),
+                       run_all = !event.exclusive && !event.namespace,
+                       special = jQuery.event.special[ event.type ] || {},
+                       handlerQueue = [],
+                       i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
+
+               // Use the fix-ed jQuery.Event rather than the (read-only) native event
+               args[0] = event;
+               event.delegateTarget = this;
+
+               // Call the preDispatch hook for the mapped type, and let it bail if desired
+               if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+                       return;
+               }
+
+               // Determine handlers that should run if there are delegated events
+               // Avoid non-left-click bubbling in Firefox (#3861)
+               if ( delegateCount && !(event.button && event.type === "click") ) {
+
+                       // Pregenerate a single jQuery object for reuse with .is()
+                       jqcur = jQuery(this);
+                       jqcur.context = this.ownerDocument || this;
+
+                       for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+                               // Don't process events on disabled elements (#6911, #8165)
+                               if ( cur.disabled !== true ) {
+                                       selMatch = {};
+                                       matches = [];
+                                       jqcur[0] = cur;
+                                       for ( i = 0; i < delegateCount; i++ ) {
+                                               handleObj = handlers[ i ];
+                                               sel = handleObj.selector;
+
+                                               if ( selMatch[ sel ] === undefined ) {
+                                                       selMatch[ sel ] = (
+                                                               handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
+                                                       );
+                                               }
+                                               if ( selMatch[ sel ] ) {
+                                                       matches.push( handleObj );
+                                               }
+                                       }
+                                       if ( matches.length ) {
+                                               handlerQueue.push({ elem: cur, matches: matches });
+                                       }
+                               }
+                       }
+               }
+
+               // Add the remaining (directly-bound) handlers
+               if ( handlers.length > delegateCount ) {
+                       handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+               }
+
+               // Run delegates first; they may want to stop propagation beneath us
+               for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+                       matched = handlerQueue[ i ];
+                       event.currentTarget = matched.elem;
+
+                       for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+                               handleObj = matched.matches[ j ];
+
+                               // Triggered event must either 1) be non-exclusive and have no namespace, or
+                               // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+                               if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+                                       event.data = handleObj.data;
+                                       event.handleObj = handleObj;
+
+                                       ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+                                                       .apply( matched.elem, args );
+
+                                       if ( ret !== undefined ) {
+                                               event.result = ret;
+                                               if ( ret === false ) {
+                                                       event.preventDefault();
+                                                       event.stopPropagation();
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               // Call the postDispatch hook for the mapped type
+               if ( special.postDispatch ) {
+                       special.postDispatch.call( this, event );
+               }
+
+               return event.result;
+       },
+
+       // Includes some event props shared by KeyEvent and MouseEvent
+       // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+       props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+       fixHooks: {},
+
+       keyHooks: {
+               props: "char charCode key keyCode".split(" "),
+               filter: function( event, original ) {
+
+                       // Add which for key events
+                       if ( event.which == null ) {
+                               event.which = original.charCode != null ? original.charCode : original.keyCode;
+                       }
+
+                       return event;
+               }
+       },
+
+       mouseHooks: {
+               props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+               filter: function( event, original ) {
+                       var eventDoc, doc, body,
+                               button = original.button,
+                               fromElement = original.fromElement;
+
+                       // Calculate pageX/Y if missing and clientX/Y available
+                       if ( event.pageX == null && original.clientX != null ) {
+                               eventDoc = event.target.ownerDocument || document;
+                               doc = eventDoc.documentElement;
+                               body = eventDoc.body;
+
+                               event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                               event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+                       }
+
+                       // Add relatedTarget, if necessary
+                       if ( !event.relatedTarget && fromElement ) {
+                               event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+                       }
+
+                       // Add which for click: 1 === left; 2 === middle; 3 === right
+                       // Note: button is not normalized, so don't use it
+                       if ( !event.which && button !== undefined ) {
+                               event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+                       }
+
+                       return event;
+               }
+       },
+
+       fix: function( event ) {
+               if ( event[ jQuery.expando ] ) {
+                       return event;
+               }
+
+               // Create a writable copy of the event object and normalize some properties
+               var i, prop,
+                       originalEvent = event,
+                       fixHook = jQuery.event.fixHooks[ event.type ] || {},
+                       copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+               event = jQuery.Event( originalEvent );
+
+               for ( i = copy.length; i; ) {
+                       prop = copy[ --i ];
+                       event[ prop ] = originalEvent[ prop ];
+               }
+
+               // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+               if ( !event.target ) {
+                       event.target = originalEvent.srcElement || document;
+               }
+
+               // Target should not be a text node (#504, Safari)
+               if ( event.target.nodeType === 3 ) {
+                       event.target = event.target.parentNode;
+               }
+
+               // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
+               if ( event.metaKey === undefined ) {
+                       event.metaKey = event.ctrlKey;
+               }
+
+               return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+       },
+
+       special: {
+               ready: {
+                       // Make sure the ready event is setup
+                       setup: jQuery.bindReady
+               },
+
+               load: {
+                       // Prevent triggered image.load events from bubbling to window.load
+                       noBubble: true
+               },
+
+               focus: {
+                       delegateType: "focusin"
+               },
+               blur: {
+                       delegateType: "focusout"
+               },
+
+               beforeunload: {
+                       setup: function( data, namespaces, eventHandle ) {
+                               // We only want to do this special case on windows
+                               if ( jQuery.isWindow( this ) ) {
+                                       this.onbeforeunload = eventHandle;
+                               }
+                       },
+
+                       teardown: function( namespaces, eventHandle ) {
+                               if ( this.onbeforeunload === eventHandle ) {
+                                       this.onbeforeunload = null;
+                               }
+                       }
+               }
+       },
+
+       simulate: function( type, elem, event, bubble ) {
+               // Piggyback on a donor event to simulate a different one.
+               // Fake originalEvent to avoid donor's stopPropagation, but if the
+               // simulated event prevents default then we do the same on the donor.
+               var e = jQuery.extend(
+                       new jQuery.Event(),
+                       event,
+                       { type: type,
+                               isSimulated: true,
+                               originalEvent: {}
+                       }
+               );
+               if ( bubble ) {
+                       jQuery.event.trigger( e, null, elem );
+               } else {
+                       jQuery.event.dispatch.call( elem, e );
+               }
+               if ( e.isDefaultPrevented() ) {
+                       event.preventDefault();
+               }
+       }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+       function( elem, type, handle ) {
+               if ( elem.removeEventListener ) {
+                       elem.removeEventListener( type, handle, false );
+               }
+       } :
+       function( elem, type, handle ) {
+               if ( elem.detachEvent ) {
+                       elem.detachEvent( "on" + type, handle );
+               }
+       };
+
+jQuery.Event = function( src, props ) {
+       // Allow instantiation without the 'new' keyword
+       if ( !(this instanceof jQuery.Event) ) {
+               return new jQuery.Event( src, props );
+       }
+
+       // Event object
+       if ( src && src.type ) {
+               this.originalEvent = src;
+               this.type = src.type;
+
+               // Events bubbling up the document may have been marked as prevented
+               // by a handler lower down the tree; reflect the correct value.
+               this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+                       src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+       // Event type
+       } else {
+               this.type = src;
+       }
+
+       // Put explicitly provided properties onto the event object
+       if ( props ) {
+               jQuery.extend( this, props );
+       }
+
+       // Create a timestamp if incoming event doesn't have one
+       this.timeStamp = src && src.timeStamp || jQuery.now();
+
+       // Mark it as fixed
+       this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+       return false;
+}
+function returnTrue() {
+       return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+       preventDefault: function() {
+               this.isDefaultPrevented = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+
+               // if preventDefault exists run it on the original event
+               if ( e.preventDefault ) {
+                       e.preventDefault();
+
+               // otherwise set the returnValue property of the original event to false (IE)
+               } else {
+                       e.returnValue = false;
+               }
+       },
+       stopPropagation: function() {
+               this.isPropagationStopped = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+               // if stopPropagation exists run it on the original event
+               if ( e.stopPropagation ) {
+                       e.stopPropagation();
+               }
+               // otherwise set the cancelBubble property of the original event to true (IE)
+               e.cancelBubble = true;
+       },
+       stopImmediatePropagation: function() {
+               this.isImmediatePropagationStopped = returnTrue;
+               this.stopPropagation();
+       },
+       isDefaultPrevented: returnFalse,
+       isPropagationStopped: returnFalse,
+       isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
+}, function( orig, fix ) {
+       jQuery.event.special[ orig ] = {
+               delegateType: fix,
+               bindType: fix,
+
+               handle: function( event ) {
+                       var target = this,
+                               related = event.relatedTarget,
+                               handleObj = event.handleObj,
+                               selector = handleObj.selector,
+                               ret;
+
+                       // For mousenter/leave call the handler if related is outside the target.
+                       // NB: No relatedTarget if the mouse left/entered the browser window
+                       if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+                               event.type = handleObj.origType;
+                               ret = handleObj.handler.apply( this, arguments );
+                               event.type = fix;
+                       }
+                       return ret;
+               }
+       };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+       jQuery.event.special.submit = {
+               setup: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Lazy-add a submit handler when a descendant form may potentially be submitted
+                       jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+                               // Node name check avoids a VML-related crash in IE (#9807)
+                               var elem = e.target,
+                                       form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+                               if ( form && !form._submit_attached ) {
+                                       jQuery.event.add( form, "submit._submit", function( event ) {
+                                               event._submit_bubble = true;
+                                       });
+                                       form._submit_attached = true;
+                               }
+                       });
+                       // return undefined since we don't need an event listener
+               },
+               
+               postDispatch: function( event ) {
+                       // If form was submitted by the user, bubble the event up the tree
+                       if ( event._submit_bubble ) {
+                               delete event._submit_bubble;
+                               if ( this.parentNode && !event.isTrigger ) {
+                                       jQuery.event.simulate( "submit", this.parentNode, event, true );
+                               }
+                       }
+               },
+
+               teardown: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+                       jQuery.event.remove( this, "._submit" );
+               }
+       };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+       jQuery.event.special.change = {
+
+               setup: function() {
+
+                       if ( rformElems.test( this.nodeName ) ) {
+                               // IE doesn't fire change on a check/radio until blur; trigger it on click
+                               // after a propertychange. Eat the blur-change in special.change.handle.
+                               // This still fires onchange a second time for check/radio after blur.
+                               if ( this.type === "checkbox" || this.type === "radio" ) {
+                                       jQuery.event.add( this, "propertychange._change", function( event ) {
+                                               if ( event.originalEvent.propertyName === "checked" ) {
+                                                       this._just_changed = true;
+                                               }
+                                       });
+                                       jQuery.event.add( this, "click._change", function( event ) {
+                                               if ( this._just_changed && !event.isTrigger ) {
+                                                       this._just_changed = false;
+                                                       jQuery.event.simulate( "change", this, event, true );
+                                               }
+                                       });
+                               }
+                               return false;
+                       }
+                       // Delegated event; lazy-add a change handler on descendant inputs
+                       jQuery.event.add( this, "beforeactivate._change", function( e ) {
+                               var elem = e.target;
+
+                               if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
+                                       jQuery.event.add( elem, "change._change", function( event ) {
+                                               if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+                                                       jQuery.event.simulate( "change", this.parentNode, event, true );
+                                               }
+                                       });
+                                       elem._change_attached = true;
+                               }
+                       });
+               },
+
+               handle: function( event ) {
+                       var elem = event.target;
+
+                       // Swallow native change events from checkbox/radio, we already triggered them above
+                       if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+                               return event.handleObj.handler.apply( this, arguments );
+                       }
+               },
+
+               teardown: function() {
+                       jQuery.event.remove( this, "._change" );
+
+                       return rformElems.test( this.nodeName );
+               }
+       };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+       jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+               // Attach a single capturing handler while someone wants focusin/focusout
+               var attaches = 0,
+                       handler = function( event ) {
+                               jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+                       };
+
+               jQuery.event.special[ fix ] = {
+                       setup: function() {
+                               if ( attaches++ === 0 ) {
+                                       document.addEventListener( orig, handler, true );
+                               }
+                       },
+                       teardown: function() {
+                               if ( --attaches === 0 ) {
+                                       document.removeEventListener( orig, handler, true );
+                               }
+                       }
+               };
+       });
+}
+
+jQuery.fn.extend({
+
+       on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+               var origFn, type;
+
+               // Types can be a map of types/handlers
+               if ( typeof types === "object" ) {
+                       // ( types-Object, selector, data )
+                       if ( typeof selector !== "string" ) { // && selector != null
+                               // ( types-Object, data )
+                               data = data || selector;
+                               selector = undefined;
+                       }
+                       for ( type in types ) {
+                               this.on( type, selector, data, types[ type ], one );
+                       }
+                       return this;
+               }
+
+               if ( data == null && fn == null ) {
+                       // ( types, fn )
+                       fn = selector;
+                       data = selector = undefined;
+               } else if ( fn == null ) {
+                       if ( typeof selector === "string" ) {
+                               // ( types, selector, fn )
+                               fn = data;
+                               data = undefined;
+                       } else {
+                               // ( types, data, fn )
+                               fn = data;
+                               data = selector;
+                               selector = undefined;
+                       }
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               } else if ( !fn ) {
+                       return this;
+               }
+
+               if ( one === 1 ) {
+                       origFn = fn;
+                       fn = function( event ) {
+                               // Can use an empty set, since event contains the info
+                               jQuery().off( event );
+                               return origFn.apply( this, arguments );
+                       };
+                       // Use same guid so caller can remove using origFn
+                       fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+               }
+               return this.each( function() {
+                       jQuery.event.add( this, types, fn, data, selector );
+               });
+       },
+       one: function( types, selector, data, fn ) {
+               return this.on( types, selector, data, fn, 1 );
+       },
+       off: function( types, selector, fn ) {
+               if ( types && types.preventDefault && types.handleObj ) {
+                       // ( event )  dispatched jQuery.Event
+                       var handleObj = types.handleObj;
+                       jQuery( types.delegateTarget ).off(
+                               handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+                               handleObj.selector,
+                               handleObj.handler
+                       );
+                       return this;
+               }
+               if ( typeof types === "object" ) {
+                       // ( types-object [, selector] )
+                       for ( var type in types ) {
+                               this.off( type, selector, types[ type ] );
+                       }
+                       return this;
+               }
+               if ( selector === false || typeof selector === "function" ) {
+                       // ( types [, fn] )
+                       fn = selector;
+                       selector = undefined;
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               }
+               return this.each(function() {
+                       jQuery.event.remove( this, types, fn, selector );
+               });
+       },
+
+       bind: function( types, data, fn ) {
+               return this.on( types, null, data, fn );
+       },
+       unbind: function( types, fn ) {
+               return this.off( types, null, fn );
+       },
+
+       live: function( types, data, fn ) {
+               jQuery( this.context ).on( types, this.selector, data, fn );
+               return this;
+       },
+       die: function( types, fn ) {
+               jQuery( this.context ).off( types, this.selector || "**", fn );
+               return this;
+       },
+
+       delegate: function( selector, types, data, fn ) {
+               return this.on( types, selector, data, fn );
+       },
+       undelegate: function( selector, types, fn ) {
+               // ( namespace ) or ( selector, types [, fn] )
+               return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
+       },
+
+       trigger: function( type, data ) {
+               return this.each(function() {
+                       jQuery.event.trigger( type, data, this );
+               });
+       },
+       triggerHandler: function( type, data ) {
+               if ( this[0] ) {
+                       return jQuery.event.trigger( type, data, this[0], true );
+               }
+       },
+
+       toggle: function( fn ) {
+               // Save reference to arguments for access in closure
+               var args = arguments,
+                       guid = fn.guid || jQuery.guid++,
+                       i = 0,
+                       toggler = function( event ) {
+                               // Figure out which function to execute
+                               var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+                               jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+                               // Make sure that clicks stop
+                               event.preventDefault();
+
+                               // and execute the function
+                               return args[ lastToggle ].apply( this, arguments ) || false;
+                       };
+
+               // link all the functions, so any of them can unbind this click handler
+               toggler.guid = guid;
+               while ( i < args.length ) {
+                       args[ i++ ].guid = guid;
+               }
+
+               return this.click( toggler );
+       },
+
+       hover: function( fnOver, fnOut ) {
+               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+       }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+       "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+       "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+       // Handle event binding
+       jQuery.fn[ name ] = function( data, fn ) {
+               if ( fn == null ) {
+                       fn = data;
+                       data = null;
+               }
+
+               return arguments.length > 0 ?
+                       this.on( name, null, data, fn ) :
+                       this.trigger( name );
+       };
+
+       if ( jQuery.attrFn ) {
+               jQuery.attrFn[ name ] = true;
+       }
+
+       if ( rkeyEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+       }
+
+       if ( rmouseEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+       }
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+       expando = "sizcache" + (Math.random() + '').replace('.', ''),
+       done = 0,
+       toString = Object.prototype.toString,
+       hasDuplicate = false,
+       baseHasDuplicate = true,
+       rBackslash = /\\/g,
+       rReturn = /\r\n/g,
+       rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+       baseHasDuplicate = false;
+       return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+       results = results || [];
+       context = context || document;
+
+       var origContext = context;
+
+       if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+               return [];
+       }
+
+       if ( !selector || typeof selector !== "string" ) {
+               return results;
+       }
+
+       var m, set, checkSet, extra, ret, cur, pop, i,
+               prune = true,
+               contextXML = Sizzle.isXML( context ),
+               parts = [],
+               soFar = selector;
+
+       // Reset the position of the chunker regexp (start from head)
+       do {
+               chunker.exec( "" );
+               m = chunker.exec( soFar );
+
+               if ( m ) {
+                       soFar = m[3];
+
+                       parts.push( m[1] );
+
+                       if ( m[2] ) {
+                               extra = m[3];
+                               break;
+                       }
+               }
+       } while ( m );
+
+       if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+               if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+                       set = posProcess( parts[0] + parts[1], context, seed );
+
+               } else {
+                       set = Expr.relative[ parts[0] ] ?
+                               [ context ] :
+                               Sizzle( parts.shift(), context );
+
+                       while ( parts.length ) {
+                               selector = parts.shift();
+
+                               if ( Expr.relative[ selector ] ) {
+                                       selector += parts.shift();
+                               }
+
+                               set = posProcess( selector, set, seed );
+                       }
+               }
+
+       } else {
+               // Take a shortcut and set the context if the root selector is an ID
+               // (but not if it'll be faster if the inner selector is an ID)
+               if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+                               Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+                       ret = Sizzle.find( parts.shift(), context, contextXML );
+                       context = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set )[0] :
+                               ret.set[0];
+               }
+
+               if ( context ) {
+                       ret = seed ?
+                               { expr: parts.pop(), set: makeArray(seed) } :
+                               Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+                       set = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set ) :
+                               ret.set;
+
+                       if ( parts.length > 0 ) {
+                               checkSet = makeArray( set );
+
+                       } else {
+                               prune = false;
+                       }
+
+                       while ( parts.length ) {
+                               cur = parts.pop();
+                               pop = cur;
+
+                               if ( !Expr.relative[ cur ] ) {
+                                       cur = "";
+                               } else {
+                                       pop = parts.pop();
+                               }
+
+                               if ( pop == null ) {
+                                       pop = context;
+                               }
+
+                               Expr.relative[ cur ]( checkSet, pop, contextXML );
+                       }
+
+               } else {
+                       checkSet = parts = [];
+               }
+       }
+
+       if ( !checkSet ) {
+               checkSet = set;
+       }
+
+       if ( !checkSet ) {
+               Sizzle.error( cur || selector );
+       }
+
+       if ( toString.call(checkSet) === "[object Array]" ) {
+               if ( !prune ) {
+                       results.push.apply( results, checkSet );
+
+               } else if ( context && context.nodeType === 1 ) {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+                                       results.push( set[i] );
+                               }
+                       }
+
+               } else {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+                                       results.push( set[i] );
+                               }
+                       }
+               }
+
+       } else {
+               makeArray( checkSet, results );
+       }
+
+       if ( extra ) {
+               Sizzle( extra, origContext, results, seed );
+               Sizzle.uniqueSort( results );
+       }
+
+       return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+       if ( sortOrder ) {
+               hasDuplicate = baseHasDuplicate;
+               results.sort( sortOrder );
+
+               if ( hasDuplicate ) {
+                       for ( var i = 1; i < results.length; i++ ) {
+                               if ( results[i] === results[ i - 1 ] ) {
+                                       results.splice( i--, 1 );
+                               }
+                       }
+               }
+       }
+
+       return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+       return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+       return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+       var set, i, len, match, type, left;
+
+       if ( !expr ) {
+               return [];
+       }
+
+       for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+               type = Expr.order[i];
+
+               if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+                       left = match[1];
+                       match.splice( 1, 1 );
+
+                       if ( left.substr( left.length - 1 ) !== "\\" ) {
+                               match[1] = (match[1] || "").replace( rBackslash, "" );
+                               set = Expr.find[ type ]( match, context, isXML );
+
+                               if ( set != null ) {
+                                       expr = expr.replace( Expr.match[ type ], "" );
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       if ( !set ) {
+               set = typeof context.getElementsByTagName !== "undefined" ?
+                       context.getElementsByTagName( "*" ) :
+                       [];
+       }
+
+       return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+       var match, anyFound,
+               type, found, item, filter, left,
+               i, pass,
+               old = expr,
+               result = [],
+               curLoop = set,
+               isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+       while ( expr && set.length ) {
+               for ( type in Expr.filter ) {
+                       if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+                               filter = Expr.filter[ type ];
+                               left = match[1];
+
+                               anyFound = false;
+
+                               match.splice(1,1);
+
+                               if ( left.substr( left.length - 1 ) === "\\" ) {
+                                       continue;
+                               }
+
+                               if ( curLoop === result ) {
+                                       result = [];
+                               }
+
+                               if ( Expr.preFilter[ type ] ) {
+                                       match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+                                       if ( !match ) {
+                                               anyFound = found = true;
+
+                                       } else if ( match === true ) {
+                                               continue;
+                                       }
+                               }
+
+                               if ( match ) {
+                                       for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+                                               if ( item ) {
+                                                       found = filter( item, match, i, curLoop );
+                                                       pass = not ^ found;
+
+                                                       if ( inplace && found != null ) {
+                                                               if ( pass ) {
+                                                                       anyFound = true;
+
+                                                               } else {
+                                                                       curLoop[i] = false;
+                                                               }
+
+                                                       } else if ( pass ) {
+                                                               result.push( item );
+                                                               anyFound = true;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               if ( found !== undefined ) {
+                                       if ( !inplace ) {
+                                               curLoop = result;
+                                       }
+
+                                       expr = expr.replace( Expr.match[ type ], "" );
+
+                                       if ( !anyFound ) {
+                                               return [];
+                                       }
+
+                                       break;
+                               }
+                       }
+               }
+
+               // Improper expression
+               if ( expr === old ) {
+                       if ( anyFound == null ) {
+                               Sizzle.error( expr );
+
+                       } else {
+                               break;
+                       }
+               }
+
+               old = expr;
+       }
+
+       return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+       throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Utility function for retreiving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+var getText = Sizzle.getText = function( elem ) {
+    var i, node,
+               nodeType = elem.nodeType,
+               ret = "";
+
+       if ( nodeType ) {
+               if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+                       // Use textContent || innerText for elements
+                       if ( typeof elem.textContent === 'string' ) {
+                               return elem.textContent;
+                       } else if ( typeof elem.innerText === 'string' ) {
+                               // Replace IE's carriage returns
+                               return elem.innerText.replace( rReturn, '' );
+                       } else {
+                               // Traverse it's children
+                               for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+                                       ret += getText( elem );
+                               }
+                       }
+               } else if ( nodeType === 3 || nodeType === 4 ) {
+                       return elem.nodeValue;
+               }
+       } else {
+
+               // If no nodeType, this is expected to be an array
+               for ( i = 0; (node = elem[i]); i++ ) {
+                       // Do not traverse comment nodes
+                       if ( node.nodeType !== 8 ) {
+                               ret += getText( node );
+                       }
+               }
+       }
+       return ret;
+};
+
+var Expr = Sizzle.selectors = {
+       order: [ "ID", "NAME", "TAG" ],
+
+       match: {
+               ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+               ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+               TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+               CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+               POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+               PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+       },
+
+       leftMatch: {},
+
+       attrMap: {
+               "class": "className",
+               "for": "htmlFor"
+       },
+
+       attrHandle: {
+               href: function( elem ) {
+                       return elem.getAttribute( "href" );
+               },
+               type: function( elem ) {
+                       return elem.getAttribute( "type" );
+               }
+       },
+
+       relative: {
+               "+": function(checkSet, part){
+                       var isPartStr = typeof part === "string",
+                               isTag = isPartStr && !rNonWord.test( part ),
+                               isPartStrNotTag = isPartStr && !isTag;
+
+                       if ( isTag ) {
+                               part = part.toLowerCase();
+                       }
+
+                       for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+                               if ( (elem = checkSet[i]) ) {
+                                       while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+                                       checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+                                               elem || false :
+                                               elem === part;
+                               }
+                       }
+
+                       if ( isPartStrNotTag ) {
+                               Sizzle.filter( part, checkSet, true );
+                       }
+               },
+
+               ">": function( checkSet, part ) {
+                       var elem,
+                               isPartStr = typeof part === "string",
+                               i = 0,
+                               l = checkSet.length;
+
+                       if ( isPartStr && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               var parent = elem.parentNode;
+                                               checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+                                       }
+                               }
+
+                       } else {
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               checkSet[i] = isPartStr ?
+                                                       elem.parentNode :
+                                                       elem.parentNode === part;
+                                       }
+                               }
+
+                               if ( isPartStr ) {
+                                       Sizzle.filter( part, checkSet, true );
+                               }
+                       }
+               },
+
+               "": function(checkSet, part, isXML){
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+               },
+
+               "~": function( checkSet, part, isXML ) {
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+               }
+       },
+
+       find: {
+               ID: function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+                               // Check parentNode to catch when Blackberry 4.6 returns
+                               // nodes that are no longer in the document #6963
+                               return m && m.parentNode ? [m] : [];
+                       }
+               },
+
+               NAME: function( match, context ) {
+                       if ( typeof context.getElementsByName !== "undefined" ) {
+                               var ret = [],
+                                       results = context.getElementsByName( match[1] );
+
+                               for ( var i = 0, l = results.length; i < l; i++ ) {
+                                       if ( results[i].getAttribute("name") === match[1] ) {
+                                               ret.push( results[i] );
+                                       }
+                               }
+
+                               return ret.length === 0 ? null : ret;
+                       }
+               },
+
+               TAG: function( match, context ) {
+                       if ( typeof context.getElementsByTagName !== "undefined" ) {
+                               return context.getElementsByTagName( match[1] );
+                       }
+               }
+       },
+       preFilter: {
+               CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+                       match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+                       if ( isXML ) {
+                               return match;
+                       }
+
+                       for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+                               if ( elem ) {
+                                       if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+                                               if ( !inplace ) {
+                                                       result.push( elem );
+                                               }
+
+                                       } else if ( inplace ) {
+                                               curLoop[i] = false;
+                                       }
+                               }
+                       }
+
+                       return false;
+               },
+
+               ID: function( match ) {
+                       return match[1].replace( rBackslash, "" );
+               },
+
+               TAG: function( match, curLoop ) {
+                       return match[1].replace( rBackslash, "" ).toLowerCase();
+               },
+
+               CHILD: function( match ) {
+                       if ( match[1] === "nth" ) {
+                               if ( !match[2] ) {
+                                       Sizzle.error( match[0] );
+                               }
+
+                               match[2] = match[2].replace(/^\+|\s*/g, '');
+
+                               // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+                               var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+                                       match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+                                       !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+                               // calculate the numbers (first)n+(last) including if they are negative
+                               match[2] = (test[1] + (test[2] || 1)) - 0;
+                               match[3] = test[3] - 0;
+                       }
+                       else if ( match[2] ) {
+                               Sizzle.error( match[0] );
+                       }
+
+                       // TODO: Move to normal caching system
+                       match[0] = done++;
+
+                       return match;
+               },
+
+               ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+                       var name = match[1] = match[1].replace( rBackslash, "" );
+
+                       if ( !isXML && Expr.attrMap[name] ) {
+                               match[1] = Expr.attrMap[name];
+                       }
+
+                       // Handle if an un-quoted value was used
+                       match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+                       if ( match[2] === "~=" ) {
+                               match[4] = " " + match[4] + " ";
+                       }
+
+                       return match;
+               },
+
+               PSEUDO: function( match, curLoop, inplace, result, not ) {
+                       if ( match[1] === "not" ) {
+                               // If we're dealing with a complex expression, or a simple one
+                               if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+                                       match[3] = Sizzle(match[3], null, null, curLoop);
+
+                               } else {
+                                       var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+                                       if ( !inplace ) {
+                                               result.push.apply( result, ret );
+                                       }
+
+                                       return false;
+                               }
+
+                       } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+                               return true;
+                       }
+
+                       return match;
+               },
+
+               POS: function( match ) {
+                       match.unshift( true );
+
+                       return match;
+               }
+       },
+
+       filters: {
+               enabled: function( elem ) {
+                       return elem.disabled === false && elem.type !== "hidden";
+               },
+
+               disabled: function( elem ) {
+                       return elem.disabled === true;
+               },
+
+               checked: function( elem ) {
+                       return elem.checked === true;
+               },
+
+               selected: function( elem ) {
+                       // Accessing this property makes selected-by-default
+                       // options in Safari work properly
+                       if ( elem.parentNode ) {
+                               elem.parentNode.selectedIndex;
+                       }
+
+                       return elem.selected === true;
+               },
+
+               parent: function( elem ) {
+                       return !!elem.firstChild;
+               },
+
+               empty: function( elem ) {
+                       return !elem.firstChild;
+               },
+
+               has: function( elem, i, match ) {
+                       return !!Sizzle( match[3], elem ).length;
+               },
+
+               header: function( elem ) {
+                       return (/h\d/i).test( elem.nodeName );
+               },
+
+               text: function( elem ) {
+                       var attr = elem.getAttribute( "type" ), type = elem.type;
+                       // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+                       // use getAttribute instead to test this case
+                       return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+               },
+
+               radio: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+               },
+
+               checkbox: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+               },
+
+               file: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+               },
+
+               password: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+               },
+
+               submit: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return (name === "input" || name === "button") && "submit" === elem.type;
+               },
+
+               image: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+               },
+
+               reset: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return (name === "input" || name === "button") && "reset" === elem.type;
+               },
+
+               button: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return name === "input" && "button" === elem.type || name === "button";
+               },
+
+               input: function( elem ) {
+                       return (/input|select|textarea|button/i).test( elem.nodeName );
+               },
+
+               focus: function( elem ) {
+                       return elem === elem.ownerDocument.activeElement;
+               }
+       },
+       setFilters: {
+               first: function( elem, i ) {
+                       return i === 0;
+               },
+
+               last: function( elem, i, match, array ) {
+                       return i === array.length - 1;
+               },
+
+               even: function( elem, i ) {
+                       return i % 2 === 0;
+               },
+
+               odd: function( elem, i ) {
+                       return i % 2 === 1;
+               },
+
+               lt: function( elem, i, match ) {
+                       return i < match[3] - 0;
+               },
+
+               gt: function( elem, i, match ) {
+                       return i > match[3] - 0;
+               },
+
+               nth: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               },
+
+               eq: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               }
+       },
+       filter: {
+               PSEUDO: function( elem, match, i, array ) {
+                       var name = match[1],
+                               filter = Expr.filters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+
+                       } else if ( name === "contains" ) {
+                               return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+                       } else if ( name === "not" ) {
+                               var not = match[3];
+
+                               for ( var j = 0, l = not.length; j < l; j++ ) {
+                                       if ( not[j] === elem ) {
+                                               return false;
+                                       }
+                               }
+
+                               return true;
+
+                       } else {
+                               Sizzle.error( name );
+                       }
+               },
+
+               CHILD: function( elem, match ) {
+                       var first, last,
+                               doneName, parent, cache,
+                               count, diff,
+                               type = match[1],
+                               node = elem;
+
+                       switch ( type ) {
+                               case "only":
+                               case "first":
+                                       while ( (node = node.previousSibling) ) {
+                                               if ( node.nodeType === 1 ) {
+                                                       return false;
+                                               }
+                                       }
+
+                                       if ( type === "first" ) {
+                                               return true;
+                                       }
+
+                                       node = elem;
+
+                                       /* falls through */
+                               case "last":
+                                       while ( (node = node.nextSibling) ) {
+                                               if ( node.nodeType === 1 ) {
+                                                       return false;
+                                               }
+                                       }
+
+                                       return true;
+
+                               case "nth":
+                                       first = match[2];
+                                       last = match[3];
+
+                                       if ( first === 1 && last === 0 ) {
+                                               return true;
+                                       }
+
+                                       doneName = match[0];
+                                       parent = elem.parentNode;
+
+                                       if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+                                               count = 0;
+
+                                               for ( node = parent.firstChild; node; node = node.nextSibling ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               node.nodeIndex = ++count;
+                                                       }
+                                               }
+
+                                               parent[ expando ] = doneName;
+                                       }
+
+                                       diff = elem.nodeIndex - last;
+
+                                       if ( first === 0 ) {
+                                               return diff === 0;
+
+                                       } else {
+                                               return ( diff % first === 0 && diff / first >= 0 );
+                                       }
+                       }
+               },
+
+               ID: function( elem, match ) {
+                       return elem.nodeType === 1 && elem.getAttribute("id") === match;
+               },
+
+               TAG: function( elem, match ) {
+                       return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+               },
+
+               CLASS: function( elem, match ) {
+                       return (" " + (elem.className || elem.getAttribute("class")) + " ")
+                               .indexOf( match ) > -1;
+               },
+
+               ATTR: function( elem, match ) {
+                       var name = match[1],
+                               result = Sizzle.attr ?
+                                       Sizzle.attr( elem, name ) :
+                                       Expr.attrHandle[ name ] ?
+                                       Expr.attrHandle[ name ]( elem ) :
+                                       elem[ name ] != null ?
+                                               elem[ name ] :
+                                               elem.getAttribute( name ),
+                               value = result + "",
+                               type = match[2],
+                               check = match[4];
+
+                       return result == null ?
+                               type === "!=" :
+                               !type && Sizzle.attr ?
+                               result != null :
+                               type === "=" ?
+                               value === check :
+                               type === "*=" ?
+                               value.indexOf(check) >= 0 :
+                               type === "~=" ?
+                               (" " + value + " ").indexOf(check) >= 0 :
+                               !check ?
+                               value && result !== false :
+                               type === "!=" ?
+                               value !== check :
+                               type === "^=" ?
+                               value.indexOf(check) === 0 :
+                               type === "$=" ?
+                               value.substr(value.length - check.length) === check :
+                               type === "|=" ?
+                               value === check || value.substr(0, check.length + 1) === check + "-" :
+                               false;
+               },
+
+               POS: function( elem, match, i, array ) {
+                       var name = match[2],
+                               filter = Expr.setFilters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+                       }
+               }
+       }
+};
+
+var origPOS = Expr.match.POS,
+       fescape = function(all, num){
+               return "\\" + (num - 0 + 1);
+       };
+
+for ( var type in Expr.match ) {
+       Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+       Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+// Expose origPOS
+// "global" as in regardless of relation to brackets/parens
+Expr.match.globalPOS = origPOS;
+
+var makeArray = function( array, results ) {
+       array = Array.prototype.slice.call( array, 0 );
+
+       if ( results ) {
+               results.push.apply( results, array );
+               return results;
+       }
+
+       return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+       Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+       makeArray = function( array, results ) {
+               var i = 0,
+                       ret = results || [];
+
+               if ( toString.call(array) === "[object Array]" ) {
+                       Array.prototype.push.apply( ret, array );
+
+               } else {
+                       if ( typeof array.length === "number" ) {
+                               for ( var l = array.length; i < l; i++ ) {
+                                       ret.push( array[i] );
+                               }
+
+                       } else {
+                               for ( ; array[i]; i++ ) {
+                                       ret.push( array[i] );
+                               }
+                       }
+               }
+
+               return ret;
+       };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+       sortOrder = function( a, b ) {
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+                       return a.compareDocumentPosition ? -1 : 1;
+               }
+
+               return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+       };
+
+} else {
+       sortOrder = function( a, b ) {
+               // The nodes are identical, we can exit early
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+
+               // Fallback to using sourceIndex (in IE) if it's available on both nodes
+               } else if ( a.sourceIndex && b.sourceIndex ) {
+                       return a.sourceIndex - b.sourceIndex;
+               }
+
+               var al, bl,
+                       ap = [],
+                       bp = [],
+                       aup = a.parentNode,
+                       bup = b.parentNode,
+                       cur = aup;
+
+               // If the nodes are siblings (or identical) we can do a quick check
+               if ( aup === bup ) {
+                       return siblingCheck( a, b );
+
+               // If no parents were found then the nodes are disconnected
+               } else if ( !aup ) {
+                       return -1;
+
+               } else if ( !bup ) {
+                       return 1;
+               }
+
+               // Otherwise they're somewhere else in the tree so we need
+               // to build up a full list of the parentNodes for comparison
+               while ( cur ) {
+                       ap.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               cur = bup;
+
+               while ( cur ) {
+                       bp.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               al = ap.length;
+               bl = bp.length;
+
+               // Start walking down the tree looking for a discrepancy
+               for ( var i = 0; i < al && i < bl; i++ ) {
+                       if ( ap[i] !== bp[i] ) {
+                               return siblingCheck( ap[i], bp[i] );
+                       }
+               }
+
+               // We ended someplace up the tree so do a sibling check
+               return i === al ?
+                       siblingCheck( a, bp[i], -1 ) :
+                       siblingCheck( ap[i], b, 1 );
+       };
+
+       siblingCheck = function( a, b, ret ) {
+               if ( a === b ) {
+                       return ret;
+               }
+
+               var cur = a.nextSibling;
+
+               while ( cur ) {
+                       if ( cur === b ) {
+                               return -1;
+                       }
+
+                       cur = cur.nextSibling;
+               }
+
+               return 1;
+       };
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+       // We're going to inject a fake input element with a specified name
+       var form = document.createElement("div"),
+               id = "script" + (new Date()).getTime(),
+               root = document.documentElement;
+
+       form.innerHTML = "<a name='" + id + "'/>";
+
+       // Inject it into the root element, check its status, and remove it quickly
+       root.insertBefore( form, root.firstChild );
+
+       // The workaround has to do additional checks after a getElementById
+       // Which slows things down for other browsers (hence the branching)
+       if ( document.getElementById( id ) ) {
+               Expr.find.ID = function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+
+                               return m ?
+                                       m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+                                               [m] :
+                                               undefined :
+                                       [];
+                       }
+               };
+
+               Expr.filter.ID = function( elem, match ) {
+                       var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+                       return elem.nodeType === 1 && node && node.nodeValue === match;
+               };
+       }
+
+       root.removeChild( form );
+
+       // release memory in IE
+       root = form = null;
+})();
+
+(function(){
+       // Check to see if the browser returns only elements
+       // when doing getElementsByTagName("*")
+
+       // Create a fake element
+       var div = document.createElement("div");
+       div.appendChild( document.createComment("") );
+
+       // Make sure no comments are found
+       if ( div.getElementsByTagName("*").length > 0 ) {
+               Expr.find.TAG = function( match, context ) {
+                       var results = context.getElementsByTagName( match[1] );
+
+                       // Filter out possible comments
+                       if ( match[1] === "*" ) {
+                               var tmp = [];
+
+                               for ( var i = 0; results[i]; i++ ) {
+                                       if ( results[i].nodeType === 1 ) {
+                                               tmp.push( results[i] );
+                                       }
+                               }
+
+                               results = tmp;
+                       }
+
+                       return results;
+               };
+       }
+
+       // Check to see if an attribute returns normalized href attributes
+       div.innerHTML = "<a href='#'></a>";
+
+       if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+                       div.firstChild.getAttribute("href") !== "#" ) {
+
+               Expr.attrHandle.href = function( elem ) {
+                       return elem.getAttribute( "href", 2 );
+               };
+       }
+
+       // release memory in IE
+       div = null;
+})();
+
+if ( document.querySelectorAll ) {
+       (function(){
+               var oldSizzle = Sizzle,
+                       div = document.createElement("div"),
+                       id = "__sizzle__";
+
+               div.innerHTML = "<p class='TEST'></p>";
+
+               // Safari can't handle uppercase or unicode characters when
+               // in quirks mode.
+               if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+                       return;
+               }
+
+               Sizzle = function( query, context, extra, seed ) {
+                       context = context || document;
+
+                       // Only use querySelectorAll on non-XML documents
+                       // (ID selectors don't work in non-HTML documents)
+                       if ( !seed && !Sizzle.isXML(context) ) {
+                               // See if we find a selector to speed up
+                               var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+
+                               if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+                                       // Speed-up: Sizzle("TAG")
+                                       if ( match[1] ) {
+                                               return makeArray( context.getElementsByTagName( query ), extra );
+
+                                       // Speed-up: Sizzle(".CLASS")
+                                       } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+                                               return makeArray( context.getElementsByClassName( match[2] ), extra );
+                                       }
+                               }
+
+                               if ( context.nodeType === 9 ) {
+                                       // Speed-up: Sizzle("body")
+                                       // The body element only exists once, optimize finding it
+                                       if ( query === "body" && context.body ) {
+                                               return makeArray( [ context.body ], extra );
+
+                                       // Speed-up: Sizzle("#ID")
+                                       } else if ( match && match[3] ) {
+                                               var elem = context.getElementById( match[3] );
+
+                                               // Check parentNode to catch when Blackberry 4.6 returns
+                                               // nodes that are no longer in the document #6963
+                                               if ( elem && elem.parentNode ) {
+                                                       // Handle the case where IE and Opera return items
+                                                       // by name instead of ID
+                                                       if ( elem.id === match[3] ) {
+                                                               return makeArray( [ elem ], extra );
+                                                       }
+
+                                               } else {
+                                                       return makeArray( [], extra );
+                                               }
+                                       }
+
+                                       try {
+                                               return makeArray( context.querySelectorAll(query), extra );
+                                       } catch(qsaError) {}
+
+                               // qSA works strangely on Element-rooted queries
+                               // We can work around this by specifying an extra ID on the root
+                               // and working up from there (Thanks to Andrew Dupont for the technique)
+                               // IE 8 doesn't work on object elements
+                               } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+                                       var oldContext = context,
+                                               old = context.getAttribute( "id" ),
+                                               nid = old || id,
+                                               hasParent = context.parentNode,
+                                               relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+                                       if ( !old ) {
+                                               context.setAttribute( "id", nid );
+                                       } else {
+                                               nid = nid.replace( /'/g, "\\$&" );
+                                       }
+                                       if ( relativeHierarchySelector && hasParent ) {
+                                               context = context.parentNode;
+                                       }
+
+                                       try {
+                                               if ( !relativeHierarchySelector || hasParent ) {
+                                                       return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+                                               }
+
+                                       } catch(pseudoError) {
+                                       } finally {
+                                               if ( !old ) {
+                                                       oldContext.removeAttribute( "id" );
+                                               }
+                                       }
+                               }
+                       }
+
+                       return oldSizzle(query, context, extra, seed);
+               };
+
+               for ( var prop in oldSizzle ) {
+                       Sizzle[ prop ] = oldSizzle[ prop ];
+               }
+
+               // release memory in IE
+               div = null;
+       })();
+}
+
+(function(){
+       var html = document.documentElement,
+               matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+       if ( matches ) {
+               // Check to see if it's possible to do matchesSelector
+               // on a disconnected node (IE 9 fails this)
+               var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+                       pseudoWorks = false;
+
+               try {
+                       // This should fail with an exception
+                       // Gecko does not error, returns false instead
+                       matches.call( document.documentElement, "[test!='']:sizzle" );
+
+               } catch( pseudoError ) {
+                       pseudoWorks = true;
+               }
+
+               Sizzle.matchesSelector = function( node, expr ) {
+                       // Make sure that attribute selectors are quoted
+                       expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+                       if ( !Sizzle.isXML( node ) ) {
+                               try {
+                                       if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+                                               var ret = matches.call( node, expr );
+
+                                               // IE 9's matchesSelector returns false on disconnected nodes
+                                               if ( ret || !disconnectedMatch ||
+                                                               // As well, disconnected nodes are said to be in a document
+                                                               // fragment in IE 9, so check for that
+                                                               node.document && node.document.nodeType !== 11 ) {
+                                                       return ret;
+                                               }
+                                       }
+                               } catch(e) {}
+                       }
+
+                       return Sizzle(expr, null, null, [node]).length > 0;
+               };
+       }
+})();
+
+(function(){
+       var div = document.createElement("div");
+
+       div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+       // Opera can't find a second classname (in 9.6)
+       // Also, make sure that getElementsByClassName actually exists
+       if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+               return;
+       }
+
+       // Safari caches class attributes, doesn't catch changes (in 3.2)
+       div.lastChild.className = "e";
+
+       if ( div.getElementsByClassName("e").length === 1 ) {
+               return;
+       }
+
+       Expr.order.splice(1, 0, "CLASS");
+       Expr.find.CLASS = function( match, context, isXML ) {
+               if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+                       return context.getElementsByClassName(match[1]);
+               }
+       };
+
+       // release memory in IE
+       div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem[ expando ] === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 && !isXML ){
+                                       elem[ expando ] = doneName;
+                                       elem.sizset = i;
+                               }
+
+                               if ( elem.nodeName.toLowerCase() === cur ) {
+                                       match = elem;
+                                       break;
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem[ expando ] === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !isXML ) {
+                                               elem[ expando ] = doneName;
+                                               elem.sizset = i;
+                                       }
+
+                                       if ( typeof cur !== "string" ) {
+                                               if ( elem === cur ) {
+                                                       match = true;
+                                                       break;
+                                               }
+
+                                       } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+                                               match = elem;
+                                               break;
+                                       }
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+if ( document.documentElement.contains ) {
+       Sizzle.contains = function( a, b ) {
+               return a !== b && (a.contains ? a.contains(b) : true);
+       };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+       Sizzle.contains = function( a, b ) {
+               return !!(a.compareDocumentPosition(b) & 16);
+       };
+
+} else {
+       Sizzle.contains = function() {
+               return false;
+       };
+}
+
+Sizzle.isXML = function( elem ) {
+       // documentElement is verified for cases where it doesn't yet exist
+       // (such as loading iframes in IE - #4833)
+       var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+       return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+       var match,
+               tmpSet = [],
+               later = "",
+               root = context.nodeType ? [context] : context;
+
+       // Position selectors must be done after the filter
+       // And so must :not(positional) so we move all PSEUDOs to the end
+       while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+               later += match[0];
+               selector = selector.replace( Expr.match.PSEUDO, "" );
+       }
+
+       selector = Expr.relative[selector] ? selector + "*" : selector;
+
+       for ( var i = 0, l = root.length; i < l; i++ ) {
+               Sizzle( selector, root[i], tmpSet, seed );
+       }
+
+       return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+Sizzle.selectors.attrMap = {};
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+       rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+       // Note: This RegExp should be improved, or likely pulled from Sizzle
+       rmultiselector = /,/,
+       isSimple = /^.[^:#\[\.,]*$/,
+       slice = Array.prototype.slice,
+       POS = jQuery.expr.match.globalPOS,
+       // methods guaranteed to produce a unique set when starting from a unique set
+       guaranteedUnique = {
+               children: true,
+               contents: true,
+               next: true,
+               prev: true
+       };
+
+jQuery.fn.extend({
+       find: function( selector ) {
+               var self = this,
+                       i, l;
+
+               if ( typeof selector !== "string" ) {
+                       return jQuery( selector ).filter(function() {
+                               for ( i = 0, l = self.length; i < l; i++ ) {
+                                       if ( jQuery.contains( self[ i ], this ) ) {
+                                               return true;
+                                       }
+                               }
+                       });
+               }
+
+               var ret = this.pushStack( "", "find", selector ),
+                       length, n, r;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       length = ret.length;
+                       jQuery.find( selector, this[i], ret );
+
+                       if ( i > 0 ) {
+                               // Make sure that the results are unique
+                               for ( n = length; n < ret.length; n++ ) {
+                                       for ( r = 0; r < length; r++ ) {
+                                               if ( ret[r] === ret[n] ) {
+                                                       ret.splice(n--, 1);
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       has: function( target ) {
+               var targets = jQuery( target );
+               return this.filter(function() {
+                       for ( var i = 0, l = targets.length; i < l; i++ ) {
+                               if ( jQuery.contains( this, targets[i] ) ) {
+                                       return true;
+                               }
+                       }
+               });
+       },
+
+       not: function( selector ) {
+               return this.pushStack( winnow(this, selector, false), "not", selector);
+       },
+
+       filter: function( selector ) {
+               return this.pushStack( winnow(this, selector, true), "filter", selector );
+       },
+
+       is: function( selector ) {
+               return !!selector && (
+                       typeof selector === "string" ?
+                               // If this is a positional selector, check membership in the returned set
+                               // so $("p:first").is("p:last") won't return true for a doc with two "p".
+                               POS.test( selector ) ?
+                                       jQuery( selector, this.context ).index( this[0] ) >= 0 :
+                                       jQuery.filter( selector, this ).length > 0 :
+                               this.filter( selector ).length > 0 );
+       },
+
+       closest: function( selectors, context ) {
+               var ret = [], i, l, cur = this[0];
+
+               // Array (deprecated as of jQuery 1.7)
+               if ( jQuery.isArray( selectors ) ) {
+                       var level = 1;
+
+                       while ( cur && cur.ownerDocument && cur !== context ) {
+                               for ( i = 0; i < selectors.length; i++ ) {
+
+                                       if ( jQuery( cur ).is( selectors[ i ] ) ) {
+                                               ret.push({ selector: selectors[ i ], elem: cur, level: level });
+                                       }
+                               }
+
+                               cur = cur.parentNode;
+                               level++;
+                       }
+
+                       return ret;
+               }
+
+               // String
+               var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+                               jQuery( selectors, context || this.context ) :
+                               0;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       cur = this[i];
+
+                       while ( cur ) {
+                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                                       ret.push( cur );
+                                       break;
+
+                               } else {
+                                       cur = cur.parentNode;
+                                       if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+               return this.pushStack( ret, "closest", selectors );
+       },
+
+       // Determine the position of an element within
+       // the matched set of elements
+       index: function( elem ) {
+
+               // No argument, return index in parent
+               if ( !elem ) {
+                       return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+               }
+
+               // index in selector
+               if ( typeof elem === "string" ) {
+                       return jQuery.inArray( this[0], jQuery( elem ) );
+               }
+
+               // Locate the position of the desired element
+               return jQuery.inArray(
+                       // If it receives a jQuery object, the first element is used
+                       elem.jquery ? elem[0] : elem, this );
+       },
+
+       add: function( selector, context ) {
+               var set = typeof selector === "string" ?
+                               jQuery( selector, context ) :
+                               jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+                       all = jQuery.merge( this.get(), set );
+
+               return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+                       all :
+                       jQuery.unique( all ) );
+       },
+
+       andSelf: function() {
+               return this.add( this.prevObject );
+       }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+       return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+       parent: function( elem ) {
+               var parent = elem.parentNode;
+               return parent && parent.nodeType !== 11 ? parent : null;
+       },
+       parents: function( elem ) {
+               return jQuery.dir( elem, "parentNode" );
+       },
+       parentsUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "parentNode", until );
+       },
+       next: function( elem ) {
+               return jQuery.nth( elem, 2, "nextSibling" );
+       },
+       prev: function( elem ) {
+               return jQuery.nth( elem, 2, "previousSibling" );
+       },
+       nextAll: function( elem ) {
+               return jQuery.dir( elem, "nextSibling" );
+       },
+       prevAll: function( elem ) {
+               return jQuery.dir( elem, "previousSibling" );
+       },
+       nextUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "nextSibling", until );
+       },
+       prevUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "previousSibling", until );
+       },
+       siblings: function( elem ) {
+               return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+       },
+       children: function( elem ) {
+               return jQuery.sibling( elem.firstChild );
+       },
+       contents: function( elem ) {
+               return jQuery.nodeName( elem, "iframe" ) ?
+                       elem.contentDocument || elem.contentWindow.document :
+                       jQuery.makeArray( elem.childNodes );
+       }
+}, function( name, fn ) {
+       jQuery.fn[ name ] = function( until, selector ) {
+               var ret = jQuery.map( this, fn, until );
+
+               if ( !runtil.test( name ) ) {
+                       selector = until;
+               }
+
+               if ( selector && typeof selector === "string" ) {
+                       ret = jQuery.filter( selector, ret );
+               }
+
+               ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+               if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+                       ret = ret.reverse();
+               }
+
+               return this.pushStack( ret, name, slice.call( arguments ).join(",") );
+       };
+});
+
+jQuery.extend({
+       filter: function( expr, elems, not ) {
+               if ( not ) {
+                       expr = ":not(" + expr + ")";
+               }
+
+               return elems.length === 1 ?
+                       jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+                       jQuery.find.matches(expr, elems);
+       },
+
+       dir: function( elem, dir, until ) {
+               var matched = [],
+                       cur = elem[ dir ];
+
+               while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+                       if ( cur.nodeType === 1 ) {
+                               matched.push( cur );
+                       }
+                       cur = cur[dir];
+               }
+               return matched;
+       },
+
+       nth: function( cur, result, dir, elem ) {
+               result = result || 1;
+               var num = 0;
+
+               for ( ; cur; cur = cur[dir] ) {
+                       if ( cur.nodeType === 1 && ++num === result ) {
+                               break;
+                       }
+               }
+
+               return cur;
+       },
+
+       sibling: function( n, elem ) {
+               var r = [];
+
+               for ( ; n; n = n.nextSibling ) {
+                       if ( n.nodeType === 1 && n !== elem ) {
+                               r.push( n );
+                       }
+               }
+
+               return r;
+       }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+       // Can't pass null or undefined to indexOf in Firefox 4
+       // Set to 0 to skip string check
+       qualifier = qualifier || 0;
+
+       if ( jQuery.isFunction( qualifier ) ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       var retVal = !!qualifier.call( elem, i, elem );
+                       return retVal === keep;
+               });
+
+       } else if ( qualifier.nodeType ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       return ( elem === qualifier ) === keep;
+               });
+
+       } else if ( typeof qualifier === "string" ) {
+               var filtered = jQuery.grep(elements, function( elem ) {
+                       return elem.nodeType === 1;
+               });
+
+               if ( isSimple.test( qualifier ) ) {
+                       return jQuery.filter(qualifier, filtered, !keep);
+               } else {
+                       qualifier = jQuery.filter( qualifier, filtered );
+               }
+       }
+
+       return jQuery.grep(elements, function( elem, i ) {
+               return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+       });
+}
+
+
+
+
+function createSafeFragment( document ) {
+       var list = nodeNames.split( "|" ),
+       safeFrag = document.createDocumentFragment();
+
+       if ( safeFrag.createElement ) {
+               while ( list.length ) {
+                       safeFrag.createElement(
+                               list.pop()
+                       );
+               }
+       }
+       return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+               "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+       rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+       rleadingWhitespace = /^\s+/,
+       rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+       rtagName = /<([\w:]+)/,
+       rtbody = /<tbody/i,
+       rhtml = /<|&#?\w+;/,
+       rnoInnerhtml = /<(?:script|style)/i,
+       rnocache = /<(?:script|object|embed|option|style)/i,
+       rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+       // checked="checked" or checked
+       rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+       rscriptType = /\/(java|ecma)script/i,
+       rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+       wrapMap = {
+               option: [ 1, "<select multiple='multiple'>", "</select>" ],
+               legend: [ 1, "<fieldset>", "</fieldset>" ],
+               thead: [ 1, "<table>", "</table>" ],
+               tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+               td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+               col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+               area: [ 1, "<map>", "</map>" ],
+               _default: [ 0, "", "" ]
+       },
+       safeFragment = createSafeFragment( document );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+       wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+       text: function( value ) {
+               return jQuery.access( this, function( value ) {
+                       return value === undefined ?
+                               jQuery.text( this ) :
+                               this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+               }, null, value, arguments.length );
+       },
+
+       wrapAll: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapAll( html.call(this, i) );
+                       });
+               }
+
+               if ( this[0] ) {
+                       // The elements to wrap the target around
+                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+                       if ( this[0].parentNode ) {
+                               wrap.insertBefore( this[0] );
+                       }
+
+                       wrap.map(function() {
+                               var elem = this;
+
+                               while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+                                       elem = elem.firstChild;
+                               }
+
+                               return elem;
+                       }).append( this );
+               }
+
+               return this;
+       },
+
+       wrapInner: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapInner( html.call(this, i) );
+                       });
+               }
+
+               return this.each(function() {
+                       var self = jQuery( this ),
+                               contents = self.contents();
+
+                       if ( contents.length ) {
+                               contents.wrapAll( html );
+
+                       } else {
+                               self.append( html );
+                       }
+               });
+       },
+
+       wrap: function( html ) {
+               var isFunction = jQuery.isFunction( html );
+
+               return this.each(function(i) {
+                       jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+               });
+       },
+
+       unwrap: function() {
+               return this.parent().each(function() {
+                       if ( !jQuery.nodeName( this, "body" ) ) {
+                               jQuery( this ).replaceWith( this.childNodes );
+                       }
+               }).end();
+       },
+
+       append: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.appendChild( elem );
+                       }
+               });
+       },
+
+       prepend: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.insertBefore( elem, this.firstChild );
+                       }
+               });
+       },
+
+       before: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this );
+                       });
+               } else if ( arguments.length ) {
+                       var set = jQuery.clean( arguments );
+                       set.push.apply( set, this.toArray() );
+                       return this.pushStack( set, "before", arguments );
+               }
+       },
+
+       after: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this.nextSibling );
+                       });
+               } else if ( arguments.length ) {
+                       var set = this.pushStack( this, "after", arguments );
+                       set.push.apply( set, jQuery.clean(arguments) );
+                       return set;
+               }
+       },
+
+       // keepData is for internal use only--do not document
+       remove: function( selector, keepData ) {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+                               if ( !keepData && elem.nodeType === 1 ) {
+                                       jQuery.cleanData( elem.getElementsByTagName("*") );
+                                       jQuery.cleanData( [ elem ] );
+                               }
+
+                               if ( elem.parentNode ) {
+                                       elem.parentNode.removeChild( elem );
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       empty: function() {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       // Remove element nodes and prevent memory leaks
+                       if ( elem.nodeType === 1 ) {
+                               jQuery.cleanData( elem.getElementsByTagName("*") );
+                       }
+
+                       // Remove any remaining nodes
+                       while ( elem.firstChild ) {
+                               elem.removeChild( elem.firstChild );
+                       }
+               }
+
+               return this;
+       },
+
+       clone: function( dataAndEvents, deepDataAndEvents ) {
+               dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+               deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+               return this.map( function () {
+                       return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+               });
+       },
+
+       html: function( value ) {
+               return jQuery.access( this, function( value ) {
+                       var elem = this[0] || {},
+                               i = 0,
+                               l = this.length;
+
+                       if ( value === undefined ) {
+                               return elem.nodeType === 1 ?
+                                       elem.innerHTML.replace( rinlinejQuery, "" ) :
+                                       null;
+                       }
+
+
+                       if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+                               ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+                               !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+                               value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+                               try {
+                                       for (; i < l; i++ ) {
+                                               // Remove element nodes and prevent memory leaks
+                                               elem = this[i] || {};
+                                               if ( elem.nodeType === 1 ) {
+                                                       jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+                                                       elem.innerHTML = value;
+                                               }
+                                       }
+
+                                       elem = 0;
+
+                               // If using innerHTML throws an exception, use the fallback method
+                               } catch(e) {}
+                       }
+
+                       if ( elem ) {
+                               this.empty().append( value );
+                       }
+               }, null, value, arguments.length );
+       },
+
+       replaceWith: function( value ) {
+               if ( this[0] && this[0].parentNode ) {
+                       // Make sure that the elements are removed from the DOM before they are inserted
+                       // this can help fix replacing a parent with child elements
+                       if ( jQuery.isFunction( value ) ) {
+                               return this.each(function(i) {
+                                       var self = jQuery(this), old = self.html();
+                                       self.replaceWith( value.call( this, i, old ) );
+                               });
+                       }
+
+                       if ( typeof value !== "string" ) {
+                               value = jQuery( value ).detach();
+                       }
+
+                       return this.each(function() {
+                               var next = this.nextSibling,
+                                       parent = this.parentNode;
+
+                               jQuery( this ).remove();
+
+                               if ( next ) {
+                                       jQuery(next).before( value );
+                               } else {
+                                       jQuery(parent).append( value );
+                               }
+                       });
+               } else {
+                       return this.length ?
+                               this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+                               this;
+               }
+       },
+
+       detach: function( selector ) {
+               return this.remove( selector, true );
+       },
+
+       domManip: function( args, table, callback ) {
+               var results, first, fragment, parent,
+                       value = args[0],
+                       scripts = [];
+
+               // We can't cloneNode fragments that contain checked, in WebKit
+               if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+                       return this.each(function() {
+                               jQuery(this).domManip( args, table, callback, true );
+                       });
+               }
+
+               if ( jQuery.isFunction(value) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               args[0] = value.call(this, i, table ? self.html() : undefined);
+                               self.domManip( args, table, callback );
+                       });
+               }
+
+               if ( this[0] ) {
+                       parent = value && value.parentNode;
+
+                       // If we're in a fragment, just use that instead of building a new one
+                       if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+                               results = { fragment: parent };
+
+                       } else {
+                               results = jQuery.buildFragment( args, this, scripts );
+                       }
+
+                       fragment = results.fragment;
+
+                       if ( fragment.childNodes.length === 1 ) {
+                               first = fragment = fragment.firstChild;
+                       } else {
+                               first = fragment.firstChild;
+                       }
+
+                       if ( first ) {
+                               table = table && jQuery.nodeName( first, "tr" );
+
+                               for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+                                       callback.call(
+                                               table ?
+                                                       root(this[i], first) :
+                                                       this[i],
+                                               // Make sure that we do not leak memory by inadvertently discarding
+                                               // the original fragment (which might have attached data) instead of
+                                               // using it; in addition, use the original fragment object for the last
+                                               // item instead of first because it can end up being emptied incorrectly
+                                               // in certain situations (Bug #8070).
+                                               // Fragments from the fragment cache must always be cloned and never used
+                                               // in place.
+                                               results.cacheable || ( l > 1 && i < lastIndex ) ?
+                                                       jQuery.clone( fragment, true, true ) :
+                                                       fragment
+                                       );
+                               }
+                       }
+
+                       if ( scripts.length ) {
+                               jQuery.each( scripts, function( i, elem ) {
+                                       if ( elem.src ) {
+                                               jQuery.ajax({
+                                                       type: "GET",
+                                                       global: false,
+                                                       url: elem.src,
+                                                       async: false,
+                                                       dataType: "script"
+                                               });
+                                       } else {
+                                               jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+                                       }
+
+                                       if ( elem.parentNode ) {
+                                               elem.parentNode.removeChild( elem );
+                                       }
+                               });
+                       }
+               }
+
+               return this;
+       }
+});
+
+function root( elem, cur ) {
+       return jQuery.nodeName(elem, "table") ?
+               (elem.getElementsByTagName("tbody")[0] ||
+               elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+               elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+       if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+               return;
+       }
+
+       var type, i, l,
+               oldData = jQuery._data( src ),
+               curData = jQuery._data( dest, oldData ),
+               events = oldData.events;
+
+       if ( events ) {
+               delete curData.handle;
+               curData.events = {};
+
+               for ( type in events ) {
+                       for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+                               jQuery.event.add( dest, type, events[ type ][ i ] );
+                       }
+               }
+       }
+
+       // make the cloned public data object a copy from the original
+       if ( curData.data ) {
+               curData.data = jQuery.extend( {}, curData.data );
+       }
+}
+
+function cloneFixAttributes( src, dest ) {
+       var nodeName;
+
+       // We do not need to do anything for non-Elements
+       if ( dest.nodeType !== 1 ) {
+               return;
+       }
+
+       // clearAttributes removes the attributes, which we don't want,
+       // but also removes the attachEvent events, which we *do* want
+       if ( dest.clearAttributes ) {
+               dest.clearAttributes();
+       }
+
+       // mergeAttributes, in contrast, only merges back on the
+       // original attributes, not the events
+       if ( dest.mergeAttributes ) {
+               dest.mergeAttributes( src );
+       }
+
+       nodeName = dest.nodeName.toLowerCase();
+
+       // IE6-8 fail to clone children inside object elements that use
+       // the proprietary classid attribute value (rather than the type
+       // attribute) to identify the type of content to display
+       if ( nodeName === "object" ) {
+               dest.outerHTML = src.outerHTML;
+
+       } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+               // IE6-8 fails to persist the checked state of a cloned checkbox
+               // or radio button. Worse, IE6-7 fail to give the cloned element
+               // a checked appearance if the defaultChecked value isn't also set
+               if ( src.checked ) {
+                       dest.defaultChecked = dest.checked = src.checked;
+               }
+
+               // IE6-7 get confused and end up setting the value of a cloned
+               // checkbox/radio button to an empty string instead of "on"
+               if ( dest.value !== src.value ) {
+                       dest.value = src.value;
+               }
+
+       // IE6-8 fails to return the selected option to the default selected
+       // state when cloning options
+       } else if ( nodeName === "option" ) {
+               dest.selected = src.defaultSelected;
+
+       // IE6-8 fails to set the defaultValue to the correct value when
+       // cloning other types of input fields
+       } else if ( nodeName === "input" || nodeName === "textarea" ) {
+               dest.defaultValue = src.defaultValue;
+
+       // IE blanks contents when cloning scripts
+       } else if ( nodeName === "script" && dest.text !== src.text ) {
+               dest.text = src.text;
+       }
+
+       // Event data gets referenced instead of copied if the expando
+       // gets copied too
+       dest.removeAttribute( jQuery.expando );
+
+       // Clear flags for bubbling special change/submit events, they must
+       // be reattached when the newly cloned events are first activated
+       dest.removeAttribute( "_submit_attached" );
+       dest.removeAttribute( "_change_attached" );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+       var fragment, cacheable, cacheresults, doc,
+       first = args[ 0 ];
+
+       // nodes may contain either an explicit document object,
+       // a jQuery collection or context object.
+       // If nodes[0] contains a valid object to assign to doc
+       if ( nodes && nodes[0] ) {
+               doc = nodes[0].ownerDocument || nodes[0];
+       }
+
+       // Ensure that an attr object doesn't incorrectly stand in as a document object
+       // Chrome and Firefox seem to allow this to occur and will throw exception
+       // Fixes #8950
+       if ( !doc.createDocumentFragment ) {
+               doc = document;
+       }
+
+       // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+       // Cloning options loses the selected state, so don't cache them
+       // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+       // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+       // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+       if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
+               first.charAt(0) === "<" && !rnocache.test( first ) &&
+               (jQuery.support.checkClone || !rchecked.test( first )) &&
+               (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+               cacheable = true;
+
+               cacheresults = jQuery.fragments[ first ];
+               if ( cacheresults && cacheresults !== 1 ) {
+                       fragment = cacheresults;
+               }
+       }
+
+       if ( !fragment ) {
+               fragment = doc.createDocumentFragment();
+               jQuery.clean( args, doc, fragment, scripts );
+       }
+
+       if ( cacheable ) {
+               jQuery.fragments[ first ] = cacheresults ? fragment : 1;
+       }
+
+       return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+       appendTo: "append",
+       prependTo: "prepend",
+       insertBefore: "before",
+       insertAfter: "after",
+       replaceAll: "replaceWith"
+}, function( name, original ) {
+       jQuery.fn[ name ] = function( selector ) {
+               var ret = [],
+                       insert = jQuery( selector ),
+                       parent = this.length === 1 && this[0].parentNode;
+
+               if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+                       insert[ original ]( this[0] );
+                       return this;
+
+               } else {
+                       for ( var i = 0, l = insert.length; i < l; i++ ) {
+                               var elems = ( i > 0 ? this.clone(true) : this ).get();
+                               jQuery( insert[i] )[ original ]( elems );
+                               ret = ret.concat( elems );
+                       }
+
+                       return this.pushStack( ret, name, insert.selector );
+               }
+       };
+});
+
+function getAll( elem ) {
+       if ( typeof elem.getElementsByTagName !== "undefined" ) {
+               return elem.getElementsByTagName( "*" );
+
+       } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+               return elem.querySelectorAll( "*" );
+
+       } else {
+               return [];
+       }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+       if ( elem.type === "checkbox" || elem.type === "radio" ) {
+               elem.defaultChecked = elem.checked;
+       }
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+       var nodeName = ( elem.nodeName || "" ).toLowerCase();
+       if ( nodeName === "input" ) {
+               fixDefaultChecked( elem );
+       // Skip scripts, get other children
+       } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
+               jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+       }
+}
+
+// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
+function shimCloneNode( elem ) {
+       var div = document.createElement( "div" );
+       safeFragment.appendChild( div );
+
+       div.innerHTML = elem.outerHTML;
+       return div.firstChild;
+}
+
+jQuery.extend({
+       clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+               var srcElements,
+                       destElements,
+                       i,
+                       // IE<=8 does not properly clone detached, unknown element nodes
+                       clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
+                               elem.cloneNode( true ) :
+                               shimCloneNode( elem );
+
+               if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+                               (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+                       // IE copies events bound via attachEvent when using cloneNode.
+                       // Calling detachEvent on the clone will also remove the events
+                       // from the original. In order to get around this, we use some
+                       // proprietary methods to clear the events. Thanks to MooTools
+                       // guys for this hotness.
+
+                       cloneFixAttributes( elem, clone );
+
+                       // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+                       srcElements = getAll( elem );
+                       destElements = getAll( clone );
+
+                       // Weird iteration because IE will replace the length property
+                       // with an element if you are cloning the body and one of the
+                       // elements on the page has a name or id of "length"
+                       for ( i = 0; srcElements[i]; ++i ) {
+                               // Ensure that the destination node is not null; Fixes #9587
+                               if ( destElements[i] ) {
+                                       cloneFixAttributes( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               // Copy the events from the original to the clone
+               if ( dataAndEvents ) {
+                       cloneCopyEvent( elem, clone );
+
+                       if ( deepDataAndEvents ) {
+                               srcElements = getAll( elem );
+                               destElements = getAll( clone );
+
+                               for ( i = 0; srcElements[i]; ++i ) {
+                                       cloneCopyEvent( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               srcElements = destElements = null;
+
+               // Return the cloned set
+               return clone;
+       },
+
+       clean: function( elems, context, fragment, scripts ) {
+               var checkScriptType, script, j,
+                               ret = [];
+
+               context = context || document;
+
+               // !context.createElement fails in IE with an error but returns typeof 'object'
+               if ( typeof context.createElement === "undefined" ) {
+                       context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+               }
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( typeof elem === "number" ) {
+                               elem += "";
+                       }
+
+                       if ( !elem ) {
+                               continue;
+                       }
+
+                       // Convert html string into DOM nodes
+                       if ( typeof elem === "string" ) {
+                               if ( !rhtml.test( elem ) ) {
+                                       elem = context.createTextNode( elem );
+                               } else {
+                                       // Fix "XHTML"-style tags in all browsers
+                                       elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+                                       // Trim whitespace, otherwise indexOf won't work as expected
+                                       var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
+                                               wrap = wrapMap[ tag ] || wrapMap._default,
+                                               depth = wrap[0],
+                                               div = context.createElement("div"),
+                                               safeChildNodes = safeFragment.childNodes,
+                                               remove;
+
+                                       // Append wrapper element to unknown element safe doc fragment
+                                       if ( context === document ) {
+                                               // Use the fragment we've already created for this document
+                                               safeFragment.appendChild( div );
+                                       } else {
+                                               // Use a fragment created with the owner document
+                                               createSafeFragment( context ).appendChild( div );
+                                       }
+
+                                       // Go to html and back, then peel off extra wrappers
+                                       div.innerHTML = wrap[1] + elem + wrap[2];
+
+                                       // Move to the right depth
+                                       while ( depth-- ) {
+                                               div = div.lastChild;
+                                       }
+
+                                       // Remove IE's autoinserted <tbody> from table fragments
+                                       if ( !jQuery.support.tbody ) {
+
+                                               // String was a <table>, *may* have spurious <tbody>
+                                               var hasBody = rtbody.test(elem),
+                                                       tbody = tag === "table" && !hasBody ?
+                                                               div.firstChild && div.firstChild.childNodes :
+
+                                                               // String was a bare <thead> or <tfoot>
+                                                               wrap[1] === "<table>" && !hasBody ?
+                                                                       div.childNodes :
+                                                                       [];
+
+                                               for ( j = tbody.length - 1; j >= 0 ; --j ) {
+                                                       if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+                                                               tbody[ j ].parentNode.removeChild( tbody[ j ] );
+                                                       }
+                                               }
+                                       }
+
+                                       // IE completely kills leading whitespace when innerHTML is used
+                                       if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+                                               div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+                                       }
+
+                                       elem = div.childNodes;
+
+                                       // Clear elements from DocumentFragment (safeFragment or otherwise)
+                                       // to avoid hoarding elements. Fixes #11356
+                                       if ( div ) {
+                                               div.parentNode.removeChild( div );
+
+                                               // Guard against -1 index exceptions in FF3.6
+                                               if ( safeChildNodes.length > 0 ) {
+                                                       remove = safeChildNodes[ safeChildNodes.length - 1 ];
+
+                                                       if ( remove && remove.parentNode ) {
+                                                               remove.parentNode.removeChild( remove );
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+
+                       // Resets defaultChecked for any radios and checkboxes
+                       // about to be appended to the DOM in IE 6/7 (#8060)
+                       var len;
+                       if ( !jQuery.support.appendChecked ) {
+                               if ( elem[0] && typeof (len = elem.length) === "number" ) {
+                                       for ( j = 0; j < len; j++ ) {
+                                               findInputs( elem[j] );
+                                       }
+                               } else {
+                                       findInputs( elem );
+                               }
+                       }
+
+                       if ( elem.nodeType ) {
+                               ret.push( elem );
+                       } else {
+                               ret = jQuery.merge( ret, elem );
+                       }
+               }
+
+               if ( fragment ) {
+                       checkScriptType = function( elem ) {
+                               return !elem.type || rscriptType.test( elem.type );
+                       };
+                       for ( i = 0; ret[i]; i++ ) {
+                               script = ret[i];
+                               if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
+                                       scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
+
+                               } else {
+                                       if ( script.nodeType === 1 ) {
+                                               var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
+
+                                               ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                       }
+                                       fragment.appendChild( script );
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       cleanData: function( elems ) {
+               var data, id,
+                       cache = jQuery.cache,
+                       special = jQuery.event.special,
+                       deleteExpando = jQuery.support.deleteExpando;
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+                               continue;
+                       }
+
+                       id = elem[ jQuery.expando ];
+
+                       if ( id ) {
+                               data = cache[ id ];
+
+                               if ( data && data.events ) {
+                                       for ( var type in data.events ) {
+                                               if ( special[ type ] ) {
+                                                       jQuery.event.remove( elem, type );
+
+                                               // This is a shortcut to avoid jQuery.event.remove's overhead
+                                               } else {
+                                                       jQuery.removeEvent( elem, type, data.handle );
+                                               }
+                                       }
+
+                                       // Null the DOM reference to avoid IE6/7/8 leak (#7054)
+                                       if ( data.handle ) {
+                                               data.handle.elem = null;
+                                       }
+                               }
+
+                               if ( deleteExpando ) {
+                                       delete elem[ jQuery.expando ];
+
+                               } else if ( elem.removeAttribute ) {
+                                       elem.removeAttribute( jQuery.expando );
+                               }
+
+                               delete cache[ id ];
+                       }
+               }
+       }
+});
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+       ropacity = /opacity=([^)]*)/,
+       // fixed for IE9, see #8346
+       rupper = /([A-Z]|^ms)/g,
+       rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
+       rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
+       rrelNum = /^([\-+])=([\-+.\de]+)/,
+       rmargin = /^margin/,
+
+       cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+
+       // order is important!
+       cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+
+       curCSS,
+
+       getComputedStyle,
+       currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+       return jQuery.access( this, function( elem, name, value ) {
+               return value !== undefined ?
+                       jQuery.style( elem, name, value ) :
+                       jQuery.css( elem, name );
+       }, name, value, arguments.length > 1 );
+};
+
+jQuery.extend({
+       // Add in style property hooks for overriding the default
+       // behavior of getting and setting a style property
+       cssHooks: {
+               opacity: {
+                       get: function( elem, computed ) {
+                               if ( computed ) {
+                                       // We should always get a number back from opacity
+                                       var ret = curCSS( elem, "opacity" );
+                                       return ret === "" ? "1" : ret;
+
+                               } else {
+                                       return elem.style.opacity;
+                               }
+                       }
+               }
+       },
+
+       // Exclude the following css properties to add px
+       cssNumber: {
+               "fillOpacity": true,
+               "fontWeight": true,
+               "lineHeight": true,
+               "opacity": true,
+               "orphans": true,
+               "widows": true,
+               "zIndex": true,
+               "zoom": true
+       },
+
+       // Add in properties whose names you wish to fix before
+       // setting or getting the value
+       cssProps: {
+               // normalize float css property
+               "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+       },
+
+       // Get and set the style property on a DOM Node
+       style: function( elem, name, value, extra ) {
+               // Don't set styles on text and comment nodes
+               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                       return;
+               }
+
+               // Make sure that we're working with the right name
+               var ret, type, origName = jQuery.camelCase( name ),
+                       style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+               name = jQuery.cssProps[ origName ] || origName;
+
+               // Check if we're setting a value
+               if ( value !== undefined ) {
+                       type = typeof value;
+
+                       // convert relative number strings (+= or -=) to relative numbers. #7345
+                       if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+                               value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+                               // Fixes bug #9237
+                               type = "number";
+                       }
+
+                       // Make sure that NaN and null values aren't set. See: #7116
+                       if ( value == null || type === "number" && isNaN( value ) ) {
+                               return;
+                       }
+
+                       // If a number was passed in, add 'px' to the (except for certain CSS properties)
+                       if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+                               value += "px";
+                       }
+
+                       // If a hook was provided, use that value, otherwise just set the specified value
+                       if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+                               // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+                               // Fixes bug #5509
+                               try {
+                                       style[ name ] = value;
+                               } catch(e) {}
+                       }
+
+               } else {
+                       // If a hook was provided get the non-computed value from there
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                               return ret;
+                       }
+
+                       // Otherwise just get the value from the style object
+                       return style[ name ];
+               }
+       },
+
+       css: function( elem, name, extra ) {
+               var ret, hooks;
+
+               // Make sure that we're working with the right name
+               name = jQuery.camelCase( name );
+               hooks = jQuery.cssHooks[ name ];
+               name = jQuery.cssProps[ name ] || name;
+
+               // cssFloat needs a special treatment
+               if ( name === "cssFloat" ) {
+                       name = "float";
+               }
+
+               // If a hook was provided get the computed value from there
+               if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+                       return ret;
+
+               // Otherwise, if a way to get the computed value exists, use that
+               } else if ( curCSS ) {
+                       return curCSS( elem, name );
+               }
+       },
+
+       // A method for quickly swapping in/out CSS properties to get correct calculations
+       swap: function( elem, options, callback ) {
+               var old = {},
+                       ret, name;
+
+               // Remember the old values, and insert the new ones
+               for ( name in options ) {
+                       old[ name ] = elem.style[ name ];
+                       elem.style[ name ] = options[ name ];
+               }
+
+               ret = callback.call( elem );
+
+               // Revert the old values
+               for ( name in options ) {
+                       elem.style[ name ] = old[ name ];
+               }
+
+               return ret;
+       }
+});
+
+// DEPRECATED in 1.3, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+       getComputedStyle = function( elem, name ) {
+               var ret, defaultView, computedStyle, width,
+                       style = elem.style;
+
+               name = name.replace( rupper, "-$1" ).toLowerCase();
+
+               if ( (defaultView = elem.ownerDocument.defaultView) &&
+                               (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+
+                       ret = computedStyle.getPropertyValue( name );
+                       if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+                               ret = jQuery.style( elem, name );
+                       }
+               }
+
+               // A tribute to the "awesome hack by Dean Edwards"
+               // WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
+               // which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+               if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
+                       width = style.width;
+                       style.width = ret;
+                       ret = computedStyle.width;
+                       style.width = width;
+               }
+
+               return ret;
+       };
+}
+
+if ( document.documentElement.currentStyle ) {
+       currentStyle = function( elem, name ) {
+               var left, rsLeft, uncomputed,
+                       ret = elem.currentStyle && elem.currentStyle[ name ],
+                       style = elem.style;
+
+               // Avoid setting ret to empty string here
+               // so we don't default to auto
+               if ( ret == null && style && (uncomputed = style[ name ]) ) {
+                       ret = uncomputed;
+               }
+
+               // From the awesome hack by Dean Edwards
+               // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+               // If we're not dealing with a regular pixel number
+               // but a number that has a weird ending, we need to convert it to pixels
+               if ( rnumnonpx.test( ret ) ) {
+
+                       // Remember the original values
+                       left = style.left;
+                       rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+                       // Put in the new values to get a computed value out
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = elem.currentStyle.left;
+                       }
+                       style.left = name === "fontSize" ? "1em" : ret;
+                       ret = style.pixelLeft + "px";
+
+                       // Revert the changed values
+                       style.left = left;
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = rsLeft;
+                       }
+               }
+
+               return ret === "" ? "auto" : ret;
+       };
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWidthOrHeight( elem, name, extra ) {
+
+       // Start with offset property
+       var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+               i = name === "width" ? 1 : 0,
+               len = 4;
+
+       if ( val > 0 ) {
+               if ( extra !== "border" ) {
+                       for ( ; i < len; i += 2 ) {
+                               if ( !extra ) {
+                                       val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+                               }
+                               if ( extra === "margin" ) {
+                                       val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;
+                               } else {
+                                       val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+                               }
+                       }
+               }
+
+               return val + "px";
+       }
+
+       // Fall back to computed then uncomputed css if necessary
+       val = curCSS( elem, name );
+       if ( val < 0 || val == null ) {
+               val = elem.style[ name ];
+       }
+
+       // Computed unit is not pixels. Stop here and return.
+       if ( rnumnonpx.test(val) ) {
+               return val;
+       }
+
+       // Normalize "", auto, and prepare for extra
+       val = parseFloat( val ) || 0;
+
+       // Add padding, border, margin
+       if ( extra ) {
+               for ( ; i < len; i += 2 ) {
+                       val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+                       if ( extra !== "padding" ) {
+                               val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+                       }
+                       if ( extra === "margin" ) {
+                               val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;
+                       }
+               }
+       }
+
+       return val + "px";
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+       jQuery.cssHooks[ name ] = {
+               get: function( elem, computed, extra ) {
+                       if ( computed ) {
+                               if ( elem.offsetWidth !== 0 ) {
+                                       return getWidthOrHeight( elem, name, extra );
+                               } else {
+                                       return jQuery.swap( elem, cssShow, function() {
+                                               return getWidthOrHeight( elem, name, extra );
+                                       });
+                               }
+                       }
+               },
+
+               set: function( elem, value ) {
+                       return rnum.test( value ) ?
+                               value + "px" :
+                               value;
+               }
+       };
+});
+
+if ( !jQuery.support.opacity ) {
+       jQuery.cssHooks.opacity = {
+               get: function( elem, computed ) {
+                       // IE uses filters for opacity
+                       return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+                               ( parseFloat( RegExp.$1 ) / 100 ) + "" :
+                               computed ? "1" : "";
+               },
+
+               set: function( elem, value ) {
+                       var style = elem.style,
+                               currentStyle = elem.currentStyle,
+                               opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+                               filter = currentStyle && currentStyle.filter || style.filter || "";
+
+                       // IE has trouble with opacity if it does not have layout
+                       // Force it by setting the zoom level
+                       style.zoom = 1;
+
+                       // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+                       if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+                               // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+                               // if "filter:" is present at all, clearType is disabled, we want to avoid this
+                               // style.removeAttribute is IE Only, but so apparently is this code path...
+                               style.removeAttribute( "filter" );
+
+                               // if there there is no filter style applied in a css rule, we are done
+                               if ( currentStyle && !currentStyle.filter ) {
+                                       return;
+                               }
+                       }
+
+                       // otherwise, set new filter values
+                       style.filter = ralpha.test( filter ) ?
+                               filter.replace( ralpha, opacity ) :
+                               filter + " " + opacity;
+               }
+       };
+}
+
+jQuery(function() {
+       // This hook cannot be added until DOM ready because the support test
+       // for it is not run until after DOM ready
+       if ( !jQuery.support.reliableMarginRight ) {
+               jQuery.cssHooks.marginRight = {
+                       get: function( elem, computed ) {
+                               // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                               // Work around by temporarily setting element display to inline-block
+                               return jQuery.swap( elem, { "display": "inline-block" }, function() {
+                                       if ( computed ) {
+                                               return curCSS( elem, "margin-right" );
+                                       } else {
+                                               return elem.style.marginRight;
+                                       }
+                               });
+                       }
+               };
+       }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.hidden = function( elem ) {
+               var width = elem.offsetWidth,
+                       height = elem.offsetHeight;
+
+               return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+       };
+
+       jQuery.expr.filters.visible = function( elem ) {
+               return !jQuery.expr.filters.hidden( elem );
+       };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+       margin: "",
+       padding: "",
+       border: "Width"
+}, function( prefix, suffix ) {
+
+       jQuery.cssHooks[ prefix + suffix ] = {
+               expand: function( value ) {
+                       var i,
+
+                               // assumes a single number if not a string
+                               parts = typeof value === "string" ? value.split(" ") : [ value ],
+                               expanded = {};
+
+                       for ( i = 0; i < 4; i++ ) {
+                               expanded[ prefix + cssExpand[ i ] + suffix ] =
+                                       parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+                       }
+
+                       return expanded;
+               }
+       };
+});
+
+
+
+
+var r20 = /%20/g,
+       rbracket = /\[\]$/,
+       rCRLF = /\r?\n/g,
+       rhash = /#.*$/,
+       rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+       rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+       // #7653, #8125, #8152: local protocol detection
+       rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+       rnoContent = /^(?:GET|HEAD)$/,
+       rprotocol = /^\/\//,
+       rquery = /\?/,
+       rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+       rselectTextarea = /^(?:select|textarea)/i,
+       rspacesAjax = /\s+/,
+       rts = /([?&])_=[^&]*/,
+       rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+       // Keep a copy of the old load method
+       _load = jQuery.fn.load,
+
+       /* Prefilters
+        * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+        * 2) These are called:
+        *    - BEFORE asking for a transport
+        *    - AFTER param serialization (s.data is a string if s.processData is true)
+        * 3) key is the dataType
+        * 4) the catchall symbol "*" can be used
+        * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+        */
+       prefilters = {},
+
+       /* Transports bindings
+        * 1) key is the dataType
+        * 2) the catchall symbol "*" can be used
+        * 3) selection will start with transport dataType and THEN go to "*" if needed
+        */
+       transports = {},
+
+       // Document location
+       ajaxLocation,
+
+       // Document location segments
+       ajaxLocParts,
+
+       // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+       allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+       ajaxLocation = location.href;
+} catch( e ) {
+       // Use the href attribute of an A element
+       // since IE will modify it given document.location
+       ajaxLocation = document.createElement( "a" );
+       ajaxLocation.href = "";
+       ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+       // dataTypeExpression is optional and defaults to "*"
+       return function( dataTypeExpression, func ) {
+
+               if ( typeof dataTypeExpression !== "string" ) {
+                       func = dataTypeExpression;
+                       dataTypeExpression = "*";
+               }
+
+               if ( jQuery.isFunction( func ) ) {
+                       var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+                               i = 0,
+                               length = dataTypes.length,
+                               dataType,
+                               list,
+                               placeBefore;
+
+                       // For each dataType in the dataTypeExpression
+                       for ( ; i < length; i++ ) {
+                               dataType = dataTypes[ i ];
+                               // We control if we're asked to add before
+                               // any existing element
+                               placeBefore = /^\+/.test( dataType );
+                               if ( placeBefore ) {
+                                       dataType = dataType.substr( 1 ) || "*";
+                               }
+                               list = structure[ dataType ] = structure[ dataType ] || [];
+                               // then we add to the structure accordingly
+                               list[ placeBefore ? "unshift" : "push" ]( func );
+                       }
+               }
+       };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+               dataType /* internal */, inspected /* internal */ ) {
+
+       dataType = dataType || options.dataTypes[ 0 ];
+       inspected = inspected || {};
+
+       inspected[ dataType ] = true;
+
+       var list = structure[ dataType ],
+               i = 0,
+               length = list ? list.length : 0,
+               executeOnly = ( structure === prefilters ),
+               selection;
+
+       for ( ; i < length && ( executeOnly || !selection ); i++ ) {
+               selection = list[ i ]( options, originalOptions, jqXHR );
+               // If we got redirected to another dataType
+               // we try there if executing only and not done already
+               if ( typeof selection === "string" ) {
+                       if ( !executeOnly || inspected[ selection ] ) {
+                               selection = undefined;
+                       } else {
+                               options.dataTypes.unshift( selection );
+                               selection = inspectPrefiltersOrTransports(
+                                               structure, options, originalOptions, jqXHR, selection, inspected );
+                       }
+               }
+       }
+       // If we're only executing or nothing was selected
+       // we try the catchall dataType if not done already
+       if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+               selection = inspectPrefiltersOrTransports(
+                               structure, options, originalOptions, jqXHR, "*", inspected );
+       }
+       // unnecessary when only executing (prefilters)
+       // but it'll be ignored by the caller in that case
+       return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+       var key, deep,
+               flatOptions = jQuery.ajaxSettings.flatOptions || {};
+       for ( key in src ) {
+               if ( src[ key ] !== undefined ) {
+                       ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+               }
+       }
+       if ( deep ) {
+               jQuery.extend( true, target, deep );
+       }
+}
+
+jQuery.fn.extend({
+       load: function( url, params, callback ) {
+               if ( typeof url !== "string" && _load ) {
+                       return _load.apply( this, arguments );
+
+               // Don't do a request if no elements are being requested
+               } else if ( !this.length ) {
+                       return this;
+               }
+
+               var off = url.indexOf( " " );
+               if ( off >= 0 ) {
+                       var selector = url.slice( off, url.length );
+                       url = url.slice( 0, off );
+               }
+
+               // Default to a GET request
+               var type = "GET";
+
+               // If the second parameter was provided
+               if ( params ) {
+                       // If it's a function
+                       if ( jQuery.isFunction( params ) ) {
+                               // We assume that it's the callback
+                               callback = params;
+                               params = undefined;
+
+                       // Otherwise, build a param string
+                       } else if ( typeof params === "object" ) {
+                               params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+                               type = "POST";
+                       }
+               }
+
+               var self = this;
+
+               // Request the remote document
+               jQuery.ajax({
+                       url: url,
+                       type: type,
+                       dataType: "html",
+                       data: params,
+                       // Complete callback (responseText is used internally)
+                       complete: function( jqXHR, status, responseText ) {
+                               // Store the response as specified by the jqXHR object
+                               responseText = jqXHR.responseText;
+                               // If successful, inject the HTML into all the matched elements
+                               if ( jqXHR.isResolved() ) {
+                                       // #4825: Get the actual response in case
+                                       // a dataFilter is present in ajaxSettings
+                                       jqXHR.done(function( r ) {
+                                               responseText = r;
+                                       });
+                                       // See if a selector was specified
+                                       self.html( selector ?
+                                               // Create a dummy div to hold the results
+                                               jQuery("<div>")
+                                                       // inject the contents of the document in, removing the scripts
+                                                       // to avoid any 'Permission Denied' errors in IE
+                                                       .append(responseText.replace(rscript, ""))
+
+                                                       // Locate the specified elements
+                                                       .find(selector) :
+
+                                               // If not, just inject the full result
+                                               responseText );
+                               }
+
+                               if ( callback ) {
+                                       self.each( callback, [ responseText, status, jqXHR ] );
+                               }
+                       }
+               });
+
+               return this;
+       },
+
+       serialize: function() {
+               return jQuery.param( this.serializeArray() );
+       },
+
+       serializeArray: function() {
+               return this.map(function(){
+                       return this.elements ? jQuery.makeArray( this.elements ) : this;
+               })
+               .filter(function(){
+                       return this.name && !this.disabled &&
+                               ( this.checked || rselectTextarea.test( this.nodeName ) ||
+                                       rinput.test( this.type ) );
+               })
+               .map(function( i, elem ){
+                       var val = jQuery( this ).val();
+
+                       return val == null ?
+                               null :
+                               jQuery.isArray( val ) ?
+                                       jQuery.map( val, function( val, i ){
+                                               return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+                                       }) :
+                                       { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+               }).get();
+       }
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+       jQuery.fn[ o ] = function( f ){
+               return this.on( o, f );
+       };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+       jQuery[ method ] = function( url, data, callback, type ) {
+               // shift arguments if data argument was omitted
+               if ( jQuery.isFunction( data ) ) {
+                       type = type || callback;
+                       callback = data;
+                       data = undefined;
+               }
+
+               return jQuery.ajax({
+                       type: method,
+                       url: url,
+                       data: data,
+                       success: callback,
+                       dataType: type
+               });
+       };
+});
+
+jQuery.extend({
+
+       getScript: function( url, callback ) {
+               return jQuery.get( url, undefined, callback, "script" );
+       },
+
+       getJSON: function( url, data, callback ) {
+               return jQuery.get( url, data, callback, "json" );
+       },
+
+       // Creates a full fledged settings object into target
+       // with both ajaxSettings and settings fields.
+       // If target is omitted, writes into ajaxSettings.
+       ajaxSetup: function( target, settings ) {
+               if ( settings ) {
+                       // Building a settings object
+                       ajaxExtend( target, jQuery.ajaxSettings );
+               } else {
+                       // Extending ajaxSettings
+                       settings = target;
+                       target = jQuery.ajaxSettings;
+               }
+               ajaxExtend( target, settings );
+               return target;
+       },
+
+       ajaxSettings: {
+               url: ajaxLocation,
+               isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+               global: true,
+               type: "GET",
+               contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+               processData: true,
+               async: true,
+               /*
+               timeout: 0,
+               data: null,
+               dataType: null,
+               username: null,
+               password: null,
+               cache: null,
+               traditional: false,
+               headers: {},
+               */
+
+               accepts: {
+                       xml: "application/xml, text/xml",
+                       html: "text/html",
+                       text: "text/plain",
+                       json: "application/json, text/javascript",
+                       "*": allTypes
+               },
+
+               contents: {
+                       xml: /xml/,
+                       html: /html/,
+                       json: /json/
+               },
+
+               responseFields: {
+                       xml: "responseXML",
+                       text: "responseText"
+               },
+
+               // List of data converters
+               // 1) key format is "source_type destination_type" (a single space in-between)
+               // 2) the catchall symbol "*" can be used for source_type
+               converters: {
+
+                       // Convert anything to text
+                       "* text": window.String,
+
+                       // Text to html (true = no transformation)
+                       "text html": true,
+
+                       // Evaluate text as a json expression
+                       "text json": jQuery.parseJSON,
+
+                       // Parse text as xml
+                       "text xml": jQuery.parseXML
+               },
+
+               // For options that shouldn't be deep extended:
+               // you can add your own custom options here if
+               // and when you create one that shouldn't be
+               // deep extended (see ajaxExtend)
+               flatOptions: {
+                       context: true,
+                       url: true
+               }
+       },
+
+       ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+       ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+       // Main method
+       ajax: function( url, options ) {
+
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
+                       options = url;
+                       url = undefined;
+               }
+
+               // Force options to be an object
+               options = options || {};
+
+               var // Create the final options object
+                       s = jQuery.ajaxSetup( {}, options ),
+                       // Callbacks context
+                       callbackContext = s.context || s,
+                       // Context for global events
+                       // It's the callbackContext if one was provided in the options
+                       // and if it's a DOM node or a jQuery collection
+                       globalEventContext = callbackContext !== s &&
+                               ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+                                               jQuery( callbackContext ) : jQuery.event,
+                       // Deferreds
+                       deferred = jQuery.Deferred(),
+                       completeDeferred = jQuery.Callbacks( "once memory" ),
+                       // Status-dependent callbacks
+                       statusCode = s.statusCode || {},
+                       // ifModified key
+                       ifModifiedKey,
+                       // Headers (they are sent all at once)
+                       requestHeaders = {},
+                       requestHeadersNames = {},
+                       // Response headers
+                       responseHeadersString,
+                       responseHeaders,
+                       // transport
+                       transport,
+                       // timeout handle
+                       timeoutTimer,
+                       // Cross-domain detection vars
+                       parts,
+                       // The jqXHR state
+                       state = 0,
+                       // To know if global events are to be dispatched
+                       fireGlobals,
+                       // Loop variable
+                       i,
+                       // Fake xhr
+                       jqXHR = {
+
+                               readyState: 0,
+
+                               // Caches the header
+                               setRequestHeader: function( name, value ) {
+                                       if ( !state ) {
+                                               var lname = name.toLowerCase();
+                                               name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+                                               requestHeaders[ name ] = value;
+                                       }
+                                       return this;
+                               },
+
+                               // Raw string
+                               getAllResponseHeaders: function() {
+                                       return state === 2 ? responseHeadersString : null;
+                               },
+
+                               // Builds headers hashtable if needed
+                               getResponseHeader: function( key ) {
+                                       var match;
+                                       if ( state === 2 ) {
+                                               if ( !responseHeaders ) {
+                                                       responseHeaders = {};
+                                                       while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                               responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+                                                       }
+                                               }
+                                               match = responseHeaders[ key.toLowerCase() ];
+                                       }
+                                       return match === undefined ? null : match;
+                               },
+
+                               // Overrides response content-type header
+                               overrideMimeType: function( type ) {
+                                       if ( !state ) {
+                                               s.mimeType = type;
+                                       }
+                                       return this;
+                               },
+
+                               // Cancel the request
+                               abort: function( statusText ) {
+                                       statusText = statusText || "abort";
+                                       if ( transport ) {
+                                               transport.abort( statusText );
+                                       }
+                                       done( 0, statusText );
+                                       return this;
+                               }
+                       };
+
+               // Callback for when everything is done
+               // It is defined here because jslint complains if it is declared
+               // at the end of the function (which would be more logical and readable)
+               function done( status, nativeStatusText, responses, headers ) {
+
+                       // Called once
+                       if ( state === 2 ) {
+                               return;
+                       }
+
+                       // State is "done" now
+                       state = 2;
+
+                       // Clear timeout if it exists
+                       if ( timeoutTimer ) {
+                               clearTimeout( timeoutTimer );
+                       }
+
+                       // Dereference transport for early garbage collection
+                       // (no matter how long the jqXHR object will be used)
+                       transport = undefined;
+
+                       // Cache response headers
+                       responseHeadersString = headers || "";
+
+                       // Set readyState
+                       jqXHR.readyState = status > 0 ? 4 : 0;
+
+                       var isSuccess,
+                               success,
+                               error,
+                               statusText = nativeStatusText,
+                               response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+                               lastModified,
+                               etag;
+
+                       // If successful, handle type chaining
+                       if ( status >= 200 && status < 300 || status === 304 ) {
+
+                               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                               if ( s.ifModified ) {
+
+                                       if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+                                               jQuery.lastModified[ ifModifiedKey ] = lastModified;
+                                       }
+                                       if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+                                               jQuery.etag[ ifModifiedKey ] = etag;
+                                       }
+                               }
+
+                               // If not modified
+                               if ( status === 304 ) {
+
+                                       statusText = "notmodified";
+                                       isSuccess = true;
+
+                               // If we have data
+                               } else {
+
+                                       try {
+                                               success = ajaxConvert( s, response );
+                                               statusText = "success";
+                                               isSuccess = true;
+                                       } catch(e) {
+                                               // We have a parsererror
+                                               statusText = "parsererror";
+                                               error = e;
+                                       }
+                               }
+                       } else {
+                               // We extract error from statusText
+                               // then normalize statusText and status for non-aborts
+                               error = statusText;
+                               if ( !statusText || status ) {
+                                       statusText = "error";
+                                       if ( status < 0 ) {
+                                               status = 0;
+                                       }
+                               }
+                       }
+
+                       // Set data for the fake xhr object
+                       jqXHR.status = status;
+                       jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+                       // Success/Error
+                       if ( isSuccess ) {
+                               deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                       } else {
+                               deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                       }
+
+                       // Status-dependent callbacks
+                       jqXHR.statusCode( statusCode );
+                       statusCode = undefined;
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+                                               [ jqXHR, s, isSuccess ? success : error ] );
+                       }
+
+                       // Complete
+                       completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+                               // Handle the global AJAX counter
+                               if ( !( --jQuery.active ) ) {
+                                       jQuery.event.trigger( "ajaxStop" );
+                               }
+                       }
+               }
+
+               // Attach deferreds
+               deferred.promise( jqXHR );
+               jqXHR.success = jqXHR.done;
+               jqXHR.error = jqXHR.fail;
+               jqXHR.complete = completeDeferred.add;
+
+               // Status-dependent callbacks
+               jqXHR.statusCode = function( map ) {
+                       if ( map ) {
+                               var tmp;
+                               if ( state < 2 ) {
+                                       for ( tmp in map ) {
+                                               statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+                                       }
+                               } else {
+                                       tmp = map[ jqXHR.status ];
+                                       jqXHR.then( tmp, tmp );
+                               }
+                       }
+                       return this;
+               };
+
+               // Remove hash character (#7531: and string promotion)
+               // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+               // We also use the url parameter if available
+               s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+               // Extract dataTypes list
+               s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+               // Determine if a cross-domain request is in order
+               if ( s.crossDomain == null ) {
+                       parts = rurl.exec( s.url.toLowerCase() );
+                       s.crossDomain = !!( parts &&
+                               ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+                                       ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+                                               ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+                       );
+               }
+
+               // Convert data if not already a string
+               if ( s.data && s.processData && typeof s.data !== "string" ) {
+                       s.data = jQuery.param( s.data, s.traditional );
+               }
+
+               // Apply prefilters
+               inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+               // If request was aborted inside a prefilter, stop there
+               if ( state === 2 ) {
+                       return false;
+               }
+
+               // We can fire global events as of now if asked to
+               fireGlobals = s.global;
+
+               // Uppercase the type
+               s.type = s.type.toUpperCase();
+
+               // Determine if request has content
+               s.hasContent = !rnoContent.test( s.type );
+
+               // Watch for a new set of requests
+               if ( fireGlobals && jQuery.active++ === 0 ) {
+                       jQuery.event.trigger( "ajaxStart" );
+               }
+
+               // More options handling for requests with no content
+               if ( !s.hasContent ) {
+
+                       // If data is available, append data to url
+                       if ( s.data ) {
+                               s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+                               // #9682: remove data so that it's not used in an eventual retry
+                               delete s.data;
+                       }
+
+                       // Get ifModifiedKey before adding the anti-cache parameter
+                       ifModifiedKey = s.url;
+
+                       // Add anti-cache in url if needed
+                       if ( s.cache === false ) {
+
+                               var ts = jQuery.now(),
+                                       // try replacing _= if it is there
+                                       ret = s.url.replace( rts, "$1_=" + ts );
+
+                               // if nothing was replaced, add timestamp to the end
+                               s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+                       }
+               }
+
+               // Set the correct header, if data is being sent
+               if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+                       jqXHR.setRequestHeader( "Content-Type", s.contentType );
+               }
+
+               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+               if ( s.ifModified ) {
+                       ifModifiedKey = ifModifiedKey || s.url;
+                       if ( jQuery.lastModified[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+                       }
+                       if ( jQuery.etag[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+                       }
+               }
+
+               // Set the Accepts header for the server, depending on the dataType
+               jqXHR.setRequestHeader(
+                       "Accept",
+                       s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+                               s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                               s.accepts[ "*" ]
+               );
+
+               // Check for headers option
+               for ( i in s.headers ) {
+                       jqXHR.setRequestHeader( i, s.headers[ i ] );
+               }
+
+               // Allow custom headers/mimetypes and early abort
+               if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+                               // Abort if not done already
+                               jqXHR.abort();
+                               return false;
+
+               }
+
+               // Install callbacks on deferreds
+               for ( i in { success: 1, error: 1, complete: 1 } ) {
+                       jqXHR[ i ]( s[ i ] );
+               }
+
+               // Get transport
+               transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+               // If no transport, we auto-abort
+               if ( !transport ) {
+                       done( -1, "No Transport" );
+               } else {
+                       jqXHR.readyState = 1;
+                       // Send global event
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+                       }
+                       // Timeout
+                       if ( s.async && s.timeout > 0 ) {
+                               timeoutTimer = setTimeout( function(){
+                                       jqXHR.abort( "timeout" );
+                               }, s.timeout );
+                       }
+
+                       try {
+                               state = 1;
+                               transport.send( requestHeaders, done );
+                       } catch (e) {
+                               // Propagate exception as error if not done
+                               if ( state < 2 ) {
+                                       done( -1, e );
+                               // Simply rethrow otherwise
+                               } else {
+                                       throw e;
+                               }
+                       }
+               }
+
+               return jqXHR;
+       },
+
+       // Serialize an array of form elements or a set of
+       // key/values into a query string
+       param: function( a, traditional ) {
+               var s = [],
+                       add = function( key, value ) {
+                               // If value is a function, invoke it and return its value
+                               value = jQuery.isFunction( value ) ? value() : value;
+                               s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+                       };
+
+               // Set traditional to true for jQuery <= 1.3.2 behavior.
+               if ( traditional === undefined ) {
+                       traditional = jQuery.ajaxSettings.traditional;
+               }
+
+               // If an array was passed in, assume that it is an array of form elements.
+               if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+                       // Serialize the form elements
+                       jQuery.each( a, function() {
+                               add( this.name, this.value );
+                       });
+
+               } else {
+                       // If traditional, encode the "old" way (the way 1.3.2 or older
+                       // did it), otherwise encode params recursively.
+                       for ( var prefix in a ) {
+                               buildParams( prefix, a[ prefix ], traditional, add );
+                       }
+               }
+
+               // Return the resulting serialization
+               return s.join( "&" ).replace( r20, "+" );
+       }
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+       if ( jQuery.isArray( obj ) ) {
+               // Serialize array item.
+               jQuery.each( obj, function( i, v ) {
+                       if ( traditional || rbracket.test( prefix ) ) {
+                               // Treat each array item as a scalar.
+                               add( prefix, v );
+
+                       } else {
+                               // If array item is non-scalar (array or object), encode its
+                               // numeric index to resolve deserialization ambiguity issues.
+                               // Note that rack (as of 1.0.0) can't currently deserialize
+                               // nested arrays properly, and attempting to do so may cause
+                               // a server error. Possible fixes are to modify rack's
+                               // deserialization algorithm or to provide an option or flag
+                               // to force array serialization to be shallow.
+                               buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+                       }
+               });
+
+       } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+               // Serialize object item.
+               for ( var name in obj ) {
+                       buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+               }
+
+       } else {
+               // Serialize scalar item.
+               add( prefix, obj );
+       }
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+       // Counter for holding the number of active queries
+       active: 0,
+
+       // Last-Modified header cache for next request
+       lastModified: {},
+       etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+       var contents = s.contents,
+               dataTypes = s.dataTypes,
+               responseFields = s.responseFields,
+               ct,
+               type,
+               finalDataType,
+               firstDataType;
+
+       // Fill responseXXX fields
+       for ( type in responseFields ) {
+               if ( type in responses ) {
+                       jqXHR[ responseFields[type] ] = responses[ type ];
+               }
+       }
+
+       // Remove auto dataType and get content-type in the process
+       while( dataTypes[ 0 ] === "*" ) {
+               dataTypes.shift();
+               if ( ct === undefined ) {
+                       ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+               }
+       }
+
+       // Check if we're dealing with a known content-type
+       if ( ct ) {
+               for ( type in contents ) {
+                       if ( contents[ type ] && contents[ type ].test( ct ) ) {
+                               dataTypes.unshift( type );
+                               break;
+                       }
+               }
+       }
+
+       // Check to see if we have a response for the expected dataType
+       if ( dataTypes[ 0 ] in responses ) {
+               finalDataType = dataTypes[ 0 ];
+       } else {
+               // Try convertible dataTypes
+               for ( type in responses ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+                               finalDataType = type;
+                               break;
+                       }
+                       if ( !firstDataType ) {
+                               firstDataType = type;
+                       }
+               }
+               // Or just use first one
+               finalDataType = finalDataType || firstDataType;
+       }
+
+       // If we found a dataType
+       // We add the dataType to the list if needed
+       // and return the corresponding response
+       if ( finalDataType ) {
+               if ( finalDataType !== dataTypes[ 0 ] ) {
+                       dataTypes.unshift( finalDataType );
+               }
+               return responses[ finalDataType ];
+       }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+       // Apply the dataFilter if provided
+       if ( s.dataFilter ) {
+               response = s.dataFilter( response, s.dataType );
+       }
+
+       var dataTypes = s.dataTypes,
+               converters = {},
+               i,
+               key,
+               length = dataTypes.length,
+               tmp,
+               // Current and previous dataTypes
+               current = dataTypes[ 0 ],
+               prev,
+               // Conversion expression
+               conversion,
+               // Conversion function
+               conv,
+               // Conversion functions (transitive conversion)
+               conv1,
+               conv2;
+
+       // For each dataType in the chain
+       for ( i = 1; i < length; i++ ) {
+
+               // Create converters map
+               // with lowercased keys
+               if ( i === 1 ) {
+                       for ( key in s.converters ) {
+                               if ( typeof key === "string" ) {
+                                       converters[ key.toLowerCase() ] = s.converters[ key ];
+                               }
+                       }
+               }
+
+               // Get the dataTypes
+               prev = current;
+               current = dataTypes[ i ];
+
+               // If current is auto dataType, update it to prev
+               if ( current === "*" ) {
+                       current = prev;
+               // If no auto and dataTypes are actually different
+               } else if ( prev !== "*" && prev !== current ) {
+
+                       // Get the converter
+                       conversion = prev + " " + current;
+                       conv = converters[ conversion ] || converters[ "* " + current ];
+
+                       // If there is no direct converter, search transitively
+                       if ( !conv ) {
+                               conv2 = undefined;
+                               for ( conv1 in converters ) {
+                                       tmp = conv1.split( " " );
+                                       if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+                                               conv2 = converters[ tmp[1] + " " + current ];
+                                               if ( conv2 ) {
+                                                       conv1 = converters[ conv1 ];
+                                                       if ( conv1 === true ) {
+                                                               conv = conv2;
+                                                       } else if ( conv2 === true ) {
+                                                               conv = conv1;
+                                                       }
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+                       // If we found no converter, dispatch an error
+                       if ( !( conv || conv2 ) ) {
+                               jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+                       }
+                       // If found converter is not an equivalence
+                       if ( conv !== true ) {
+                               // Convert with 1 or 2 converters accordingly
+                               response = conv ? conv( response ) : conv2( conv1(response) );
+                       }
+               }
+       }
+       return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+       jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+       jsonp: "callback",
+       jsonpCallback: function() {
+               return jQuery.expando + "_" + ( jsc++ );
+       }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+       var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
+
+       if ( s.dataTypes[ 0 ] === "jsonp" ||
+               s.jsonp !== false && ( jsre.test( s.url ) ||
+                               inspectData && jsre.test( s.data ) ) ) {
+
+               var responseContainer,
+                       jsonpCallback = s.jsonpCallback =
+                               jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+                       previous = window[ jsonpCallback ],
+                       url = s.url,
+                       data = s.data,
+                       replace = "$1" + jsonpCallback + "$2";
+
+               if ( s.jsonp !== false ) {
+                       url = url.replace( jsre, replace );
+                       if ( s.url === url ) {
+                               if ( inspectData ) {
+                                       data = data.replace( jsre, replace );
+                               }
+                               if ( s.data === data ) {
+                                       // Add callback manually
+                                       url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+                               }
+                       }
+               }
+
+               s.url = url;
+               s.data = data;
+
+               // Install callback
+               window[ jsonpCallback ] = function( response ) {
+                       responseContainer = [ response ];
+               };
+
+               // Clean-up function
+               jqXHR.always(function() {
+                       // Set callback back to previous value
+                       window[ jsonpCallback ] = previous;
+                       // Call if it was a function and we have a response
+                       if ( responseContainer && jQuery.isFunction( previous ) ) {
+                               window[ jsonpCallback ]( responseContainer[ 0 ] );
+                       }
+               });
+
+               // Use data converter to retrieve json after script execution
+               s.converters["script json"] = function() {
+                       if ( !responseContainer ) {
+                               jQuery.error( jsonpCallback + " was not called" );
+                       }
+                       return responseContainer[ 0 ];
+               };
+
+               // force json dataType
+               s.dataTypes[ 0 ] = "json";
+
+               // Delegate to script
+               return "script";
+       }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+       accepts: {
+               script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+       },
+       contents: {
+               script: /javascript|ecmascript/
+       },
+       converters: {
+               "text script": function( text ) {
+                       jQuery.globalEval( text );
+                       return text;
+               }
+       }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+       if ( s.cache === undefined ) {
+               s.cache = false;
+       }
+       if ( s.crossDomain ) {
+               s.type = "GET";
+               s.global = false;
+       }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+       // This transport only deals with cross domain requests
+       if ( s.crossDomain ) {
+
+               var script,
+                       head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+               return {
+
+                       send: function( _, callback ) {
+
+                               script = document.createElement( "script" );
+
+                               script.async = "async";
+
+                               if ( s.scriptCharset ) {
+                                       script.charset = s.scriptCharset;
+                               }
+
+                               script.src = s.url;
+
+                               // Attach handlers for all browsers
+                               script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+                                       if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+                                               // Handle memory leak in IE
+                                               script.onload = script.onreadystatechange = null;
+
+                                               // Remove the script
+                                               if ( head && script.parentNode ) {
+                                                       head.removeChild( script );
+                                               }
+
+                                               // Dereference the script
+                                               script = undefined;
+
+                                               // Callback if not abort
+                                               if ( !isAbort ) {
+                                                       callback( 200, "success" );
+                                               }
+                                       }
+                               };
+                               // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                               // This arises when a base node is used (#2709 and #4378).
+                               head.insertBefore( script, head.firstChild );
+                       },
+
+                       abort: function() {
+                               if ( script ) {
+                                       script.onload( 0, 1 );
+                               }
+                       }
+               };
+       }
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+       xhrOnUnloadAbort = window.ActiveXObject ? function() {
+               // Abort all pending requests
+               for ( var key in xhrCallbacks ) {
+                       xhrCallbacks[ key ]( 0, 1 );
+               }
+       } : false,
+       xhrId = 0,
+       xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+       try {
+               return new window.XMLHttpRequest();
+       } catch( e ) {}
+}
+
+function createActiveXHR() {
+       try {
+               return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+       } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+       /* Microsoft failed to properly
+        * implement the XMLHttpRequest in IE7 (can't request local files),
+        * so we use the ActiveXObject when it is available
+        * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+        * we need a fallback.
+        */
+       function() {
+               return !this.isLocal && createStandardXHR() || createActiveXHR();
+       } :
+       // For all other browsers, use the standard XMLHttpRequest object
+       createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+       jQuery.extend( jQuery.support, {
+               ajax: !!xhr,
+               cors: !!xhr && ( "withCredentials" in xhr )
+       });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+       jQuery.ajaxTransport(function( s ) {
+               // Cross domain only allowed if supported through XMLHttpRequest
+               if ( !s.crossDomain || jQuery.support.cors ) {
+
+                       var callback;
+
+                       return {
+                               send: function( headers, complete ) {
+
+                                       // Get a new xhr
+                                       var xhr = s.xhr(),
+                                               handle,
+                                               i;
+
+                                       // Open the socket
+                                       // Passing null username, generates a login popup on Opera (#2865)
+                                       if ( s.username ) {
+                                               xhr.open( s.type, s.url, s.async, s.username, s.password );
+                                       } else {
+                                               xhr.open( s.type, s.url, s.async );
+                                       }
+
+                                       // Apply custom fields if provided
+                                       if ( s.xhrFields ) {
+                                               for ( i in s.xhrFields ) {
+                                                       xhr[ i ] = s.xhrFields[ i ];
+                                               }
+                                       }
+
+                                       // Override mime type if needed
+                                       if ( s.mimeType && xhr.overrideMimeType ) {
+                                               xhr.overrideMimeType( s.mimeType );
+                                       }
+
+                                       // X-Requested-With header
+                                       // For cross-domain requests, seeing as conditions for a preflight are
+                                       // akin to a jigsaw puzzle, we simply never set it to be sure.
+                                       // (it can always be set on a per-request basis or even using ajaxSetup)
+                                       // For same-domain requests, won't change header if already provided.
+                                       if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+                                               headers[ "X-Requested-With" ] = "XMLHttpRequest";
+                                       }
+
+                                       // Need an extra try/catch for cross domain requests in Firefox 3
+                                       try {
+                                               for ( i in headers ) {
+                                                       xhr.setRequestHeader( i, headers[ i ] );
+                                               }
+                                       } catch( _ ) {}
+
+                                       // Do send the request
+                                       // This may raise an exception which is actually
+                                       // handled in jQuery.ajax (so no try/catch here)
+                                       xhr.send( ( s.hasContent && s.data ) || null );
+
+                                       // Listener
+                                       callback = function( _, isAbort ) {
+
+                                               var status,
+                                                       statusText,
+                                                       responseHeaders,
+                                                       responses,
+                                                       xml;
+
+                                               // Firefox throws exceptions when accessing properties
+                                               // of an xhr when a network error occured
+                                               // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+                                               try {
+
+                                                       // Was never called and is aborted or complete
+                                                       if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+                                                               // Only called once
+                                                               callback = undefined;
+
+                                                               // Do not keep as active anymore
+                                                               if ( handle ) {
+                                                                       xhr.onreadystatechange = jQuery.noop;
+                                                                       if ( xhrOnUnloadAbort ) {
+                                                                               delete xhrCallbacks[ handle ];
+                                                                       }
+                                                               }
+
+                                                               // If it's an abort
+                                                               if ( isAbort ) {
+                                                                       // Abort it manually if needed
+                                                                       if ( xhr.readyState !== 4 ) {
+                                                                               xhr.abort();
+                                                                       }
+                                                               } else {
+                                                                       status = xhr.status;
+                                                                       responseHeaders = xhr.getAllResponseHeaders();
+                                                                       responses = {};
+                                                                       xml = xhr.responseXML;
+
+                                                                       // Construct response list
+                                                                       if ( xml && xml.documentElement /* #4958 */ ) {
+                                                                               responses.xml = xml;
+                                                                       }
+
+                                                                       // When requesting binary data, IE6-9 will throw an exception
+                                                                       // on any attempt to access responseText (#11426)
+                                                                       try {
+                                                                               responses.text = xhr.responseText;
+                                                                       } catch( _ ) {
+                                                                       }
+
+                                                                       // Firefox throws an exception when accessing
+                                                                       // statusText for faulty cross-domain requests
+                                                                       try {
+                                                                               statusText = xhr.statusText;
+                                                                       } catch( e ) {
+                                                                               // We normalize with Webkit giving an empty statusText
+                                                                               statusText = "";
+                                                                       }
+
+                                                                       // Filter status for non standard behaviors
+
+                                                                       // If the request is local and we have data: assume a success
+                                                                       // (success with no data won't get notified, that's the best we
+                                                                       // can do given current implementations)
+                                                                       if ( !status && s.isLocal && !s.crossDomain ) {
+                                                                               status = responses.text ? 200 : 404;
+                                                                       // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                       } else if ( status === 1223 ) {
+                                                                               status = 204;
+                                                                       }
+                                                               }
+                                                       }
+                                               } catch( firefoxAccessException ) {
+                                                       if ( !isAbort ) {
+                                                               complete( -1, firefoxAccessException );
+                                                       }
+                                               }
+
+                                               // Call complete if needed
+                                               if ( responses ) {
+                                                       complete( status, statusText, responses, responseHeaders );
+                                               }
+                                       };
+
+                                       // if we're in sync mode or it's in cache
+                                       // and has been retrieved directly (IE6 & IE7)
+                                       // we need to manually fire the callback
+                                       if ( !s.async || xhr.readyState === 4 ) {
+                                               callback();
+                                       } else {
+                                               handle = ++xhrId;
+                                               if ( xhrOnUnloadAbort ) {
+                                                       // Create the active xhrs callbacks list if needed
+                                                       // and attach the unload handler
+                                                       if ( !xhrCallbacks ) {
+                                                               xhrCallbacks = {};
+                                                               jQuery( window ).unload( xhrOnUnloadAbort );
+                                                       }
+                                                       // Add to list of active xhrs callbacks
+                                                       xhrCallbacks[ handle ] = callback;
+                                               }
+                                               xhr.onreadystatechange = callback;
+                                       }
+                               },
+
+                               abort: function() {
+                                       if ( callback ) {
+                                               callback(0,1);
+                                       }
+                               }
+                       };
+               }
+       });
+}
+
+
+
+
+var elemdisplay = {},
+       iframe, iframeDoc,
+       rfxtypes = /^(?:toggle|show|hide)$/,
+       rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+       timerId,
+       fxAttrs = [
+               // height animations
+               [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+               // width animations
+               [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+               // opacity animations
+               [ "opacity" ]
+       ],
+       fxNow;
+
+jQuery.fn.extend({
+       show: function( speed, easing, callback ) {
+               var elem, display;
+
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("show", 3), speed, easing, callback );
+
+               } else {
+                       for ( var i = 0, j = this.length; i < j; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       // Reset the inline display of this element to learn if it is
+                                       // being hidden by cascaded rules or not
+                                       if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+                                               display = elem.style.display = "";
+                                       }
+
+                                       // Set elements which have been overridden with display: none
+                                       // in a stylesheet to whatever the default browser style is
+                                       // for such an element
+                                       if ( (display === "" && jQuery.css(elem, "display") === "none") ||
+                                               !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+                                               jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+                                       }
+                               }
+                       }
+
+                       // Set the display of most of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       if ( display === "" || display === "none" ) {
+                                               elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
+                                       }
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       hide: function( speed, easing, callback ) {
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("hide", 3), speed, easing, callback);
+
+               } else {
+                       var elem, display,
+                               i = 0,
+                               j = this.length;
+
+                       for ( ; i < j; i++ ) {
+                               elem = this[i];
+                               if ( elem.style ) {
+                                       display = jQuery.css( elem, "display" );
+
+                                       if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
+                                               jQuery._data( elem, "olddisplay", display );
+                                       }
+                               }
+                       }
+
+                       // Set the display of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               if ( this[i].style ) {
+                                       this[i].style.display = "none";
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       // Save the old toggle function
+       _toggle: jQuery.fn.toggle,
+
+       toggle: function( fn, fn2, callback ) {
+               var bool = typeof fn === "boolean";
+
+               if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+                       this._toggle.apply( this, arguments );
+
+               } else if ( fn == null || bool ) {
+                       this.each(function() {
+                               var state = bool ? fn : jQuery(this).is(":hidden");
+                               jQuery(this)[ state ? "show" : "hide" ]();
+                       });
+
+               } else {
+                       this.animate(genFx("toggle", 3), fn, fn2, callback);
+               }
+
+               return this;
+       },
+
+       fadeTo: function( speed, to, easing, callback ) {
+               return this.filter(":hidden").css("opacity", 0).show().end()
+                                       .animate({opacity: to}, speed, easing, callback);
+       },
+
+       animate: function( prop, speed, easing, callback ) {
+               var optall = jQuery.speed( speed, easing, callback );
+
+               if ( jQuery.isEmptyObject( prop ) ) {
+                       return this.each( optall.complete, [ false ] );
+               }
+
+               // Do not change referenced properties as per-property easing will be lost
+               prop = jQuery.extend( {}, prop );
+
+               function doAnimation() {
+                       // XXX 'this' does not always have a nodeName when running the
+                       // test suite
+
+                       if ( optall.queue === false ) {
+                               jQuery._mark( this );
+                       }
+
+                       var opt = jQuery.extend( {}, optall ),
+                               isElement = this.nodeType === 1,
+                               hidden = isElement && jQuery(this).is(":hidden"),
+                               name, val, p, e, hooks, replace,
+                               parts, start, end, unit,
+                               method;
+
+                       // will store per property easing and be used to determine when an animation is complete
+                       opt.animatedProperties = {};
+
+                       // first pass over propertys to expand / normalize
+                       for ( p in prop ) {
+                               name = jQuery.camelCase( p );
+                               if ( p !== name ) {
+                                       prop[ name ] = prop[ p ];
+                                       delete prop[ p ];
+                               }
+
+                               if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
+                                       replace = hooks.expand( prop[ name ] );
+                                       delete prop[ name ];
+
+                                       // not quite $.extend, this wont overwrite keys already present.
+                                       // also - reusing 'p' from above because we have the correct "name"
+                                       for ( p in replace ) {
+                                               if ( ! ( p in prop ) ) {
+                                                       prop[ p ] = replace[ p ];
+                                               }
+                                       }
+                               }
+                       }
+
+                       for ( name in prop ) {
+                               val = prop[ name ];
+                               // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+                               if ( jQuery.isArray( val ) ) {
+                                       opt.animatedProperties[ name ] = val[ 1 ];
+                                       val = prop[ name ] = val[ 0 ];
+                               } else {
+                                       opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+                               }
+
+                               if ( val === "hide" && hidden || val === "show" && !hidden ) {
+                                       return opt.complete.call( this );
+                               }
+
+                               if ( isElement && ( name === "height" || name === "width" ) ) {
+                                       // Make sure that nothing sneaks out
+                                       // Record all 3 overflow attributes because IE does not
+                                       // change the overflow attribute when overflowX and
+                                       // overflowY are set to the same value
+                                       opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+                                       // Set display property to inline-block for height/width
+                                       // animations on inline elements that are having width/height animated
+                                       if ( jQuery.css( this, "display" ) === "inline" &&
+                                                       jQuery.css( this, "float" ) === "none" ) {
+
+                                               // inline-level elements accept inline-block;
+                                               // block-level elements need to be inline with layout
+                                               if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
+                                                       this.style.display = "inline-block";
+
+                                               } else {
+                                                       this.style.zoom = 1;
+                                               }
+                                       }
+                               }
+                       }
+
+                       if ( opt.overflow != null ) {
+                               this.style.overflow = "hidden";
+                       }
+
+                       for ( p in prop ) {
+                               e = new jQuery.fx( this, opt, p );
+                               val = prop[ p ];
+
+                               if ( rfxtypes.test( val ) ) {
+
+                                       // Tracks whether to show or hide based on private
+                                       // data attached to the element
+                                       method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
+                                       if ( method ) {
+                                               jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
+                                               e[ method ]();
+                                       } else {
+                                               e[ val ]();
+                                       }
+
+                               } else {
+                                       parts = rfxnum.exec( val );
+                                       start = e.cur();
+
+                                       if ( parts ) {
+                                               end = parseFloat( parts[2] );
+                                               unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+                                               // We need to compute starting value
+                                               if ( unit !== "px" ) {
+                                                       jQuery.style( this, p, (end || 1) + unit);
+                                                       start = ( (end || 1) / e.cur() ) * start;
+                                                       jQuery.style( this, p, start + unit);
+                                               }
+
+                                               // If a +=/-= token was provided, we're doing a relative animation
+                                               if ( parts[1] ) {
+                                                       end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
+                                               }
+
+                                               e.custom( start, end, unit );
+
+                                       } else {
+                                               e.custom( start, val, "" );
+                                       }
+                               }
+                       }
+
+                       // For JS strict compliance
+                       return true;
+               }
+
+               return optall.queue === false ?
+                       this.each( doAnimation ) :
+                       this.queue( optall.queue, doAnimation );
+       },
+
+       stop: function( type, clearQueue, gotoEnd ) {
+               if ( typeof type !== "string" ) {
+                       gotoEnd = clearQueue;
+                       clearQueue = type;
+                       type = undefined;
+               }
+               if ( clearQueue && type !== false ) {
+                       this.queue( type || "fx", [] );
+               }
+
+               return this.each(function() {
+                       var index,
+                               hadTimers = false,
+                               timers = jQuery.timers,
+                               data = jQuery._data( this );
+
+                       // clear marker counters if we know they won't be
+                       if ( !gotoEnd ) {
+                               jQuery._unmark( true, this );
+                       }
+
+                       function stopQueue( elem, data, index ) {
+                               var hooks = data[ index ];
+                               jQuery.removeData( elem, index, true );
+                               hooks.stop( gotoEnd );
+                       }
+
+                       if ( type == null ) {
+                               for ( index in data ) {
+                                       if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
+                                               stopQueue( this, data, index );
+                                       }
+                               }
+                       } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
+                               stopQueue( this, data, index );
+                       }
+
+                       for ( index = timers.length; index--; ) {
+                               if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+                                       if ( gotoEnd ) {
+
+                                               // force the next step to be the last
+                                               timers[ index ]( true );
+                                       } else {
+                                               timers[ index ].saveState();
+                                       }
+                                       hadTimers = true;
+                                       timers.splice( index, 1 );
+                               }
+                       }
+
+                       // start the next in the queue if the last step wasn't forced
+                       // timers currently will call their complete callbacks, which will dequeue
+                       // but only if they were gotoEnd
+                       if ( !( gotoEnd && hadTimers ) ) {
+                               jQuery.dequeue( this, type );
+                       }
+               });
+       }
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+       setTimeout( clearFxNow, 0 );
+       return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+       fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+       var obj = {};
+
+       jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
+               obj[ this ] = type;
+       });
+
+       return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+       slideDown: genFx( "show", 1 ),
+       slideUp: genFx( "hide", 1 ),
+       slideToggle: genFx( "toggle", 1 ),
+       fadeIn: { opacity: "show" },
+       fadeOut: { opacity: "hide" },
+       fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return this.animate( props, speed, easing, callback );
+       };
+});
+
+jQuery.extend({
+       speed: function( speed, easing, fn ) {
+               var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+                       complete: fn || !fn && easing ||
+                               jQuery.isFunction( speed ) && speed,
+                       duration: speed,
+                       easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+               };
+
+               opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+                       opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+               // normalize opt.queue - true/undefined/null -> "fx"
+               if ( opt.queue == null || opt.queue === true ) {
+                       opt.queue = "fx";
+               }
+
+               // Queueing
+               opt.old = opt.complete;
+
+               opt.complete = function( noUnmark ) {
+                       if ( jQuery.isFunction( opt.old ) ) {
+                               opt.old.call( this );
+                       }
+
+                       if ( opt.queue ) {
+                               jQuery.dequeue( this, opt.queue );
+                       } else if ( noUnmark !== false ) {
+                               jQuery._unmark( this );
+                       }
+               };
+
+               return opt;
+       },
+
+       easing: {
+               linear: function( p ) {
+                       return p;
+               },
+               swing: function( p ) {
+                       return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
+               }
+       },
+
+       timers: [],
+
+       fx: function( elem, options, prop ) {
+               this.options = options;
+               this.elem = elem;
+               this.prop = prop;
+
+               options.orig = options.orig || {};
+       }
+
+});
+
+jQuery.fx.prototype = {
+       // Simple function for setting a style value
+       update: function() {
+               if ( this.options.step ) {
+                       this.options.step.call( this.elem, this.now, this );
+               }
+
+               ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
+       },
+
+       // Get the current size
+       cur: function() {
+               if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
+                       return this.elem[ this.prop ];
+               }
+
+               var parsed,
+                       r = jQuery.css( this.elem, this.prop );
+               // Empty strings, null, undefined and "auto" are converted to 0,
+               // complex values such as "rotate(1rad)" are returned as is,
+               // simple values such as "10px" are parsed to Float.
+               return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+       },
+
+       // Start an animation from one number to another
+       custom: function( from, to, unit ) {
+               var self = this,
+                       fx = jQuery.fx;
+
+               this.startTime = fxNow || createFxNow();
+               this.end = to;
+               this.now = this.start = from;
+               this.pos = this.state = 0;
+               this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+
+               function t( gotoEnd ) {
+                       return self.step( gotoEnd );
+               }
+
+               t.queue = this.options.queue;
+               t.elem = this.elem;
+               t.saveState = function() {
+                       if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
+                               if ( self.options.hide ) {
+                                       jQuery._data( self.elem, "fxshow" + self.prop, self.start );
+                               } else if ( self.options.show ) {
+                                       jQuery._data( self.elem, "fxshow" + self.prop, self.end );
+                               }
+                       }
+               };
+
+               if ( t() && jQuery.timers.push(t) && !timerId ) {
+                       timerId = setInterval( fx.tick, fx.interval );
+               }
+       },
+
+       // Simple 'show' function
+       show: function() {
+               var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
+
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
+               this.options.show = true;
+
+               // Begin the animation
+               // Make sure that we start at a small width/height to avoid any flash of content
+               if ( dataShow !== undefined ) {
+                       // This show is picking up where a previous hide or show left off
+                       this.custom( this.cur(), dataShow );
+               } else {
+                       this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
+               }
+
+               // Start by showing the element
+               jQuery( this.elem ).show();
+       },
+
+       // Simple 'hide' function
+       hide: function() {
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
+               this.options.hide = true;
+
+               // Begin the animation
+               this.custom( this.cur(), 0 );
+       },
+
+       // Each step of an animation
+       step: function( gotoEnd ) {
+               var p, n, complete,
+                       t = fxNow || createFxNow(),
+                       done = true,
+                       elem = this.elem,
+                       options = this.options;
+
+               if ( gotoEnd || t >= options.duration + this.startTime ) {
+                       this.now = this.end;
+                       this.pos = this.state = 1;
+                       this.update();
+
+                       options.animatedProperties[ this.prop ] = true;
+
+                       for ( p in options.animatedProperties ) {
+                               if ( options.animatedProperties[ p ] !== true ) {
+                                       done = false;
+                               }
+                       }
+
+                       if ( done ) {
+                               // Reset the overflow
+                               if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+                                       jQuery.each( [ "", "X", "Y" ], function( index, value ) {
+                                               elem.style[ "overflow" + value ] = options.overflow[ index ];
+                                       });
+                               }
+
+                               // Hide the element if the "hide" operation was done
+                               if ( options.hide ) {
+                                       jQuery( elem ).hide();
+                               }
+
+                               // Reset the properties, if the item has been hidden or shown
+                               if ( options.hide || options.show ) {
+                                       for ( p in options.animatedProperties ) {
+                                               jQuery.style( elem, p, options.orig[ p ] );
+                                               jQuery.removeData( elem, "fxshow" + p, true );
+                                               // Toggle data is no longer needed
+                                               jQuery.removeData( elem, "toggle" + p, true );
+                                       }
+                               }
+
+                               // Execute the complete function
+                               // in the event that the complete function throws an exception
+                               // we must ensure it won't be called twice. #5684
+
+                               complete = options.complete;
+                               if ( complete ) {
+
+                                       options.complete = false;
+                                       complete.call( elem );
+                               }
+                       }
+
+                       return false;
+
+               } else {
+                       // classical easing cannot be used with an Infinity duration
+                       if ( options.duration == Infinity ) {
+                               this.now = t;
+                       } else {
+                               n = t - this.startTime;
+                               this.state = n / options.duration;
+
+                               // Perform the easing function, defaults to swing
+                               this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
+                               this.now = this.start + ( (this.end - this.start) * this.pos );
+                       }
+                       // Perform the next step of the animation
+                       this.update();
+               }
+
+               return true;
+       }
+};
+
+jQuery.extend( jQuery.fx, {
+       tick: function() {
+               var timer,
+                       timers = jQuery.timers,
+                       i = 0;
+
+               for ( ; i < timers.length; i++ ) {
+                       timer = timers[ i ];
+                       // Checks the timer has not already been removed
+                       if ( !timer() && timers[ i ] === timer ) {
+                               timers.splice( i--, 1 );
+                       }
+               }
+
+               if ( !timers.length ) {
+                       jQuery.fx.stop();
+               }
+       },
+
+       interval: 13,
+
+       stop: function() {
+               clearInterval( timerId );
+               timerId = null;
+       },
+
+       speeds: {
+               slow: 600,
+               fast: 200,
+               // Default speed
+               _default: 400
+       },
+
+       step: {
+               opacity: function( fx ) {
+                       jQuery.style( fx.elem, "opacity", fx.now );
+               },
+
+               _default: function( fx ) {
+                       if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+                               fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+                       } else {
+                               fx.elem[ fx.prop ] = fx.now;
+                       }
+               }
+       }
+});
+
+// Ensure props that can't be negative don't go there on undershoot easing
+jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
+       // exclude marginTop, marginLeft, marginBottom and marginRight from this list
+       if ( prop.indexOf( "margin" ) ) {
+               jQuery.fx.step[ prop ] = function( fx ) {
+                       jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
+               };
+       }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.animated = function( elem ) {
+               return jQuery.grep(jQuery.timers, function( fn ) {
+                       return elem === fn.elem;
+               }).length;
+       };
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+       if ( !elemdisplay[ nodeName ] ) {
+
+               var body = document.body,
+                       elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+                       display = elem.css( "display" );
+               elem.remove();
+
+               // If the simple way fails,
+               // get element's real default display by attaching it to a temp iframe
+               if ( display === "none" || display === "" ) {
+                       // No iframe to use yet, so create it
+                       if ( !iframe ) {
+                               iframe = document.createElement( "iframe" );
+                               iframe.frameBorder = iframe.width = iframe.height = 0;
+                       }
+
+                       body.appendChild( iframe );
+
+                       // Create a cacheable copy of the iframe document on first call.
+                       // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+                       // document to it; WebKit & Firefox won't allow reusing the iframe document.
+                       if ( !iframeDoc || !iframe.createElement ) {
+                               iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+                               iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
+                               iframeDoc.close();
+                       }
+
+                       elem = iframeDoc.createElement( nodeName );
+
+                       iframeDoc.body.appendChild( elem );
+
+                       display = jQuery.css( elem, "display" );
+                       body.removeChild( iframe );
+               }
+
+               // Store the correct default display
+               elemdisplay[ nodeName ] = display;
+       }
+
+       return elemdisplay[ nodeName ];
+}
+
+
+
+
+var getOffset,
+       rtable = /^t(?:able|d|h)$/i,
+       rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+       getOffset = function( elem, doc, docElem, box ) {
+               try {
+                       box = elem.getBoundingClientRect();
+               } catch(e) {}
+
+               // Make sure we're not dealing with a disconnected DOM node
+               if ( !box || !jQuery.contains( docElem, elem ) ) {
+                       return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+               }
+
+               var body = doc.body,
+                       win = getWindow( doc ),
+                       clientTop  = docElem.clientTop  || body.clientTop  || 0,
+                       clientLeft = docElem.clientLeft || body.clientLeft || 0,
+                       scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+                       scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+                       top  = box.top  + scrollTop  - clientTop,
+                       left = box.left + scrollLeft - clientLeft;
+
+               return { top: top, left: left };
+       };
+
+} else {
+       getOffset = function( elem, doc, docElem ) {
+               var computedStyle,
+                       offsetParent = elem.offsetParent,
+                       prevOffsetParent = elem,
+                       body = doc.body,
+                       defaultView = doc.defaultView,
+                       prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+                       top = elem.offsetTop,
+                       left = elem.offsetLeft;
+
+               while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+                       if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+                               break;
+                       }
+
+                       computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+                       top  -= elem.scrollTop;
+                       left -= elem.scrollLeft;
+
+                       if ( elem === offsetParent ) {
+                               top  += elem.offsetTop;
+                               left += elem.offsetLeft;
+
+                               if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+                                       top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                                       left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                               }
+
+                               prevOffsetParent = offsetParent;
+                               offsetParent = elem.offsetParent;
+                       }
+
+                       if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+                               top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                               left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                       }
+
+                       prevComputedStyle = computedStyle;
+               }
+
+               if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+                       top  += body.offsetTop;
+                       left += body.offsetLeft;
+               }
+
+               if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+                       top  += Math.max( docElem.scrollTop, body.scrollTop );
+                       left += Math.max( docElem.scrollLeft, body.scrollLeft );
+               }
+
+               return { top: top, left: left };
+       };
+}
+
+jQuery.fn.offset = function( options ) {
+       if ( arguments.length ) {
+               return options === undefined ?
+                       this :
+                       this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+       }
+
+       var elem = this[0],
+               doc = elem && elem.ownerDocument;
+
+       if ( !doc ) {
+               return null;
+       }
+
+       if ( elem === doc.body ) {
+               return jQuery.offset.bodyOffset( elem );
+       }
+
+       return getOffset( elem, doc, doc.documentElement );
+};
+
+jQuery.offset = {
+
+       bodyOffset: function( body ) {
+               var top = body.offsetTop,
+                       left = body.offsetLeft;
+
+               if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+                       top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+                       left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+               }
+
+               return { top: top, left: left };
+       },
+
+       setOffset: function( elem, options, i ) {
+               var position = jQuery.css( elem, "position" );
+
+               // set position first, in-case top/left are set even on static elem
+               if ( position === "static" ) {
+                       elem.style.position = "relative";
+               }
+
+               var curElem = jQuery( elem ),
+                       curOffset = curElem.offset(),
+                       curCSSTop = jQuery.css( elem, "top" ),
+                       curCSSLeft = jQuery.css( elem, "left" ),
+                       calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+                       props = {}, curPosition = {}, curTop, curLeft;
+
+               // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+               if ( calculatePosition ) {
+                       curPosition = curElem.position();
+                       curTop = curPosition.top;
+                       curLeft = curPosition.left;
+               } else {
+                       curTop = parseFloat( curCSSTop ) || 0;
+                       curLeft = parseFloat( curCSSLeft ) || 0;
+               }
+
+               if ( jQuery.isFunction( options ) ) {
+                       options = options.call( elem, i, curOffset );
+               }
+
+               if ( options.top != null ) {
+                       props.top = ( options.top - curOffset.top ) + curTop;
+               }
+               if ( options.left != null ) {
+                       props.left = ( options.left - curOffset.left ) + curLeft;
+               }
+
+               if ( "using" in options ) {
+                       options.using.call( elem, props );
+               } else {
+                       curElem.css( props );
+               }
+       }
+};
+
+
+jQuery.fn.extend({
+
+       position: function() {
+               if ( !this[0] ) {
+                       return null;
+               }
+
+               var elem = this[0],
+
+               // Get *real* offsetParent
+               offsetParent = this.offsetParent(),
+
+               // Get correct offsets
+               offset       = this.offset(),
+               parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+               // Subtract element margins
+               // note: when an element has margin: auto the offsetLeft and marginLeft
+               // are the same in Safari causing offset.left to incorrectly be 0
+               offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+               offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+               // Add offsetParent borders
+               parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+               parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+               // Subtract the two offsets
+               return {
+                       top:  offset.top  - parentOffset.top,
+                       left: offset.left - parentOffset.left
+               };
+       },
+
+       offsetParent: function() {
+               return this.map(function() {
+                       var offsetParent = this.offsetParent || document.body;
+                       while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+                               offsetParent = offsetParent.offsetParent;
+                       }
+                       return offsetParent;
+               });
+       }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+       var top = /Y/.test( prop );
+
+       jQuery.fn[ method ] = function( val ) {
+               return jQuery.access( this, function( elem, method, val ) {
+                       var win = getWindow( elem );
+
+                       if ( val === undefined ) {
+                               return win ? (prop in win) ? win[ prop ] :
+                                       jQuery.support.boxModel && win.document.documentElement[ method ] ||
+                                               win.document.body[ method ] :
+                                       elem[ method ];
+                       }
+
+                       if ( win ) {
+                               win.scrollTo(
+                                       !top ? val : jQuery( win ).scrollLeft(),
+                                        top ? val : jQuery( win ).scrollTop()
+                               );
+
+                       } else {
+                               elem[ method ] = val;
+                       }
+               }, method, val, arguments.length, null );
+       };
+});
+
+function getWindow( elem ) {
+       return jQuery.isWindow( elem ) ?
+               elem :
+               elem.nodeType === 9 ?
+                       elem.defaultView || elem.parentWindow :
+                       false;
+}
+
+
+
+
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+       var clientProp = "client" + name,
+               scrollProp = "scroll" + name,
+               offsetProp = "offset" + name;
+
+       // innerHeight and innerWidth
+       jQuery.fn[ "inner" + name ] = function() {
+               var elem = this[0];
+               return elem ?
+                       elem.style ?
+                       parseFloat( jQuery.css( elem, type, "padding" ) ) :
+                       this[ type ]() :
+                       null;
+       };
+
+       // outerHeight and outerWidth
+       jQuery.fn[ "outer" + name ] = function( margin ) {
+               var elem = this[0];
+               return elem ?
+                       elem.style ?
+                       parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
+                       this[ type ]() :
+                       null;
+       };
+
+       jQuery.fn[ type ] = function( value ) {
+               return jQuery.access( this, function( elem, type, value ) {
+                       var doc, docElemProp, orig, ret;
+
+                       if ( jQuery.isWindow( elem ) ) {
+                               // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+                               doc = elem.document;
+                               docElemProp = doc.documentElement[ clientProp ];
+                               return jQuery.support.boxModel && docElemProp ||
+                                       doc.body && doc.body[ clientProp ] || docElemProp;
+                       }
+
+                       // Get document width or height
+                       if ( elem.nodeType === 9 ) {
+                               // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+                               doc = elem.documentElement;
+
+                               // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
+                               // so we can't use max, as it'll choose the incorrect offset[Width/Height]
+                               // instead we use the correct client[Width/Height]
+                               // support:IE6
+                               if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
+                                       return doc[ clientProp ];
+                               }
+
+                               return Math.max(
+                                       elem.body[ scrollProp ], doc[ scrollProp ],
+                                       elem.body[ offsetProp ], doc[ offsetProp ]
+                               );
+                       }
+
+                       // Get width or height on the element
+                       if ( value === undefined ) {
+                               orig = jQuery.css( elem, type );
+                               ret = parseFloat( orig );
+                               return jQuery.isNumeric( ret ) ? ret : orig;
+                       }
+
+                       // Set the width or height on the element
+                       jQuery( elem ).css( type, value );
+               }, type, value, arguments.length, null );
+       };
+});
+
+
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+       define( "jquery", [], function () { return jQuery; } );
+}
+
+
+
+})( window );
diff --git a/js/jquery-3.1.1.js b/js/jquery-3.1.1.js
new file mode 100644 (file)
index 0000000..072e308
--- /dev/null
@@ -0,0 +1,10220 @@
+/*!
+ * jQuery JavaScript Library v3.1.1
+ * https://jquery.com/
+ *
+ * Includes Sizzle.js
+ * https://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * https://jquery.org/license
+ *
+ * Date: 2016-09-22T22:30Z
+ */
+( function( global, factory ) {
+
+       "use strict";
+
+       if ( typeof module === "object" && typeof module.exports === "object" ) {
+
+               // For CommonJS and CommonJS-like environments where a proper `window`
+               // is present, execute the factory and get jQuery.
+               // For environments that do not have a `window` with a `document`
+               // (such as Node.js), expose a factory as module.exports.
+               // This accentuates the need for the creation of a real `window`.
+               // e.g. var jQuery = require("jquery")(window);
+               // See ticket #14549 for more info.
+               module.exports = global.document ?
+                       factory( global, true ) :
+                       function( w ) {
+                               if ( !w.document ) {
+                                       throw new Error( "jQuery requires a window with a document" );
+                               }
+                               return factory( w );
+                       };
+       } else {
+               factory( global );
+       }
+
+// Pass this if window is not defined yet
+} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
+// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
+// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
+// enough that all such attempts are guarded in a try block.
+"use strict";
+
+var arr = [];
+
+var document = window.document;
+
+var getProto = Object.getPrototypeOf;
+
+var slice = arr.slice;
+
+var concat = arr.concat;
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var fnToString = hasOwn.toString;
+
+var ObjectFunctionString = fnToString.call( Object );
+
+var support = {};
+
+
+
+       function DOMEval( code, doc ) {
+               doc = doc || document;
+
+               var script = doc.createElement( "script" );
+
+               script.text = code;
+               doc.head.appendChild( script ).parentNode.removeChild( script );
+       }
+/* global Symbol */
+// Defining this global in .eslintrc.json would create a danger of using the global
+// unguarded in another place, it seems safer to define global only for this module
+
+
+
+var
+       version = "3.1.1",
+
+       // Define a local copy of jQuery
+       jQuery = function( selector, context ) {
+
+               // The jQuery object is actually just the init constructor 'enhanced'
+               // Need init if jQuery is called (just allow error to be thrown if not included)
+               return new jQuery.fn.init( selector, context );
+       },
+
+       // Support: Android <=4.0 only
+       // Make sure we trim BOM and NBSP
+       rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+       // Matches dashed string for camelizing
+       rmsPrefix = /^-ms-/,
+       rdashAlpha = /-([a-z])/g,
+
+       // Used by jQuery.camelCase as callback to replace()
+       fcamelCase = function( all, letter ) {
+               return letter.toUpperCase();
+       };
+
+jQuery.fn = jQuery.prototype = {
+
+       // The current version of jQuery being used
+       jquery: version,
+
+       constructor: jQuery,
+
+       // The default length of a jQuery object is 0
+       length: 0,
+
+       toArray: function() {
+               return slice.call( this );
+       },
+
+       // Get the Nth element in the matched element set OR
+       // Get the whole matched element set as a clean array
+       get: function( num ) {
+
+               // Return all the elements in a clean array
+               if ( num == null ) {
+                       return slice.call( this );
+               }
+
+               // Return just the one element from the set
+               return num < 0 ? this[ num + this.length ] : this[ num ];
+       },
+
+       // Take an array of elements and push it onto the stack
+       // (returning the new matched element set)
+       pushStack: function( elems ) {
+
+               // Build a new jQuery matched element set
+               var ret = jQuery.merge( this.constructor(), elems );
+
+               // Add the old object onto the stack (as a reference)
+               ret.prevObject = this;
+
+               // Return the newly-formed element set
+               return ret;
+       },
+
+       // Execute a callback for every element in the matched set.
+       each: function( callback ) {
+               return jQuery.each( this, callback );
+       },
+
+       map: function( callback ) {
+               return this.pushStack( jQuery.map( this, function( elem, i ) {
+                       return callback.call( elem, i, elem );
+               } ) );
+       },
+
+       slice: function() {
+               return this.pushStack( slice.apply( this, arguments ) );
+       },
+
+       first: function() {
+               return this.eq( 0 );
+       },
+
+       last: function() {
+               return this.eq( -1 );
+       },
+
+       eq: function( i ) {
+               var len = this.length,
+                       j = +i + ( i < 0 ? len : 0 );
+               return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
+       },
+
+       end: function() {
+               return this.prevObject || this.constructor();
+       },
+
+       // For internal use only.
+       // Behaves like an Array's method, not like a jQuery method.
+       push: push,
+       sort: arr.sort,
+       splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[ 0 ] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+
+               // Skip the boolean and the target
+               target = arguments[ i ] || {};
+               i++;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+               target = {};
+       }
+
+       // Extend jQuery itself if only one argument is passed
+       if ( i === length ) {
+               target = this;
+               i--;
+       }
+
+       for ( ; i < length; i++ ) {
+
+               // Only deal with non-null/undefined values
+               if ( ( options = arguments[ i ] ) != null ) {
+
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+                                       ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
+
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && jQuery.isArray( src ) ? src : [];
+
+                                       } else {
+                                               clone = src && jQuery.isPlainObject( src ) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = jQuery.extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+jQuery.extend( {
+
+       // Unique for each copy of jQuery on the page
+       expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+       // Assume jQuery is ready without the ready module
+       isReady: true,
+
+       error: function( msg ) {
+               throw new Error( msg );
+       },
+
+       noop: function() {},
+
+       isFunction: function( obj ) {
+               return jQuery.type( obj ) === "function";
+       },
+
+       isArray: Array.isArray,
+
+       isWindow: function( obj ) {
+               return obj != null && obj === obj.window;
+       },
+
+       isNumeric: function( obj ) {
+
+               // As of jQuery 3.0, isNumeric is limited to
+               // strings and numbers (primitives or objects)
+               // that can be coerced to finite numbers (gh-2662)
+               var type = jQuery.type( obj );
+               return ( type === "number" || type === "string" ) &&
+
+                       // parseFloat NaNs numeric-cast false positives ("")
+                       // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+                       // subtraction forces infinities to NaN
+                       !isNaN( obj - parseFloat( obj ) );
+       },
+
+       isPlainObject: function( obj ) {
+               var proto, Ctor;
+
+               // Detect obvious negatives
+               // Use toString instead of jQuery.type to catch host objects
+               if ( !obj || toString.call( obj ) !== "[object Object]" ) {
+                       return false;
+               }
+
+               proto = getProto( obj );
+
+               // Objects with no prototype (e.g., `Object.create( null )`) are plain
+               if ( !proto ) {
+                       return true;
+               }
+
+               // Objects with prototype are plain iff they were constructed by a global Object function
+               Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
+               return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
+       },
+
+       isEmptyObject: function( obj ) {
+
+               /* eslint-disable no-unused-vars */
+               // See https://github.com/eslint/eslint/issues/6125
+               var name;
+
+               for ( name in obj ) {
+                       return false;
+               }
+               return true;
+       },
+
+       type: function( obj ) {
+               if ( obj == null ) {
+                       return obj + "";
+               }
+
+               // Support: Android <=2.3 only (functionish RegExp)
+               return typeof obj === "object" || typeof obj === "function" ?
+                       class2type[ toString.call( obj ) ] || "object" :
+                       typeof obj;
+       },
+
+       // Evaluates a script in a global context
+       globalEval: function( code ) {
+               DOMEval( code );
+       },
+
+       // Convert dashed to camelCase; used by the css and data modules
+       // Support: IE <=9 - 11, Edge 12 - 13
+       // Microsoft forgot to hump their vendor prefix (#9572)
+       camelCase: function( string ) {
+               return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+       },
+
+       nodeName: function( elem, name ) {
+               return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+       },
+
+       each: function( obj, callback ) {
+               var length, i = 0;
+
+               if ( isArrayLike( obj ) ) {
+                       length = obj.length;
+                       for ( ; i < length; i++ ) {
+                               if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+                                       break;
+                               }
+                       }
+               } else {
+                       for ( i in obj ) {
+                               if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+                                       break;
+                               }
+                       }
+               }
+
+               return obj;
+       },
+
+       // Support: Android <=4.0 only
+       trim: function( text ) {
+               return text == null ?
+                       "" :
+                       ( text + "" ).replace( rtrim, "" );
+       },
+
+       // results is for internal usage only
+       makeArray: function( arr, results ) {
+               var ret = results || [];
+
+               if ( arr != null ) {
+                       if ( isArrayLike( Object( arr ) ) ) {
+                               jQuery.merge( ret,
+                                       typeof arr === "string" ?
+                                       [ arr ] : arr
+                               );
+                       } else {
+                               push.call( ret, arr );
+                       }
+               }
+
+               return ret;
+       },
+
+       inArray: function( elem, arr, i ) {
+               return arr == null ? -1 : indexOf.call( arr, elem, i );
+       },
+
+       // Support: Android <=4.0 only, PhantomJS 1 only
+       // push.apply(_, arraylike) throws on ancient WebKit
+       merge: function( first, second ) {
+               var len = +second.length,
+                       j = 0,
+                       i = first.length;
+
+               for ( ; j < len; j++ ) {
+                       first[ i++ ] = second[ j ];
+               }
+
+               first.length = i;
+
+               return first;
+       },
+
+       grep: function( elems, callback, invert ) {
+               var callbackInverse,
+                       matches = [],
+                       i = 0,
+                       length = elems.length,
+                       callbackExpect = !invert;
+
+               // Go through the array, only saving the items
+               // that pass the validator function
+               for ( ; i < length; i++ ) {
+                       callbackInverse = !callback( elems[ i ], i );
+                       if ( callbackInverse !== callbackExpect ) {
+                               matches.push( elems[ i ] );
+                       }
+               }
+
+               return matches;
+       },
+
+       // arg is for internal usage only
+       map: function( elems, callback, arg ) {
+               var length, value,
+                       i = 0,
+                       ret = [];
+
+               // Go through the array, translating each of the items to their new values
+               if ( isArrayLike( elems ) ) {
+                       length = elems.length;
+                       for ( ; i < length; i++ ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret.push( value );
+                               }
+                       }
+
+               // Go through every key on the object,
+               } else {
+                       for ( i in elems ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret.push( value );
+                               }
+                       }
+               }
+
+               // Flatten any nested arrays
+               return concat.apply( [], ret );
+       },
+
+       // A global GUID counter for objects
+       guid: 1,
+
+       // Bind a function to a context, optionally partially applying any
+       // arguments.
+       proxy: function( fn, context ) {
+               var tmp, args, proxy;
+
+               if ( typeof context === "string" ) {
+                       tmp = fn[ context ];
+                       context = fn;
+                       fn = tmp;
+               }
+
+               // Quick check to determine if target is callable, in the spec
+               // this throws a TypeError, but we will just return undefined.
+               if ( !jQuery.isFunction( fn ) ) {
+                       return undefined;
+               }
+
+               // Simulated bind
+               args = slice.call( arguments, 2 );
+               proxy = function() {
+                       return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+               };
+
+               // Set the guid of unique handler to the same of original handler, so it can be removed
+               proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+               return proxy;
+       },
+
+       now: Date.now,
+
+       // jQuery.support is not used in Core but other projects attach their
+       // properties to it so it needs to exist.
+       support: support
+} );
+
+if ( typeof Symbol === "function" ) {
+       jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+function( i, name ) {
+       class2type[ "[object " + name + "]" ] = name.toLowerCase();
+} );
+
+function isArrayLike( obj ) {
+
+       // Support: real iOS 8.2 only (not reproducible in simulator)
+       // `in` check used to prevent JIT error (gh-2145)
+       // hasOwn isn't used here due to false negatives
+       // regarding Nodelist length in IE
+       var length = !!obj && "length" in obj && obj.length,
+               type = jQuery.type( obj );
+
+       if ( type === "function" || jQuery.isWindow( obj ) ) {
+               return false;
+       }
+
+       return type === "array" || length === 0 ||
+               typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.3.3
+ * https://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2016-08-08
+ */
+(function( window ) {
+
+var i,
+       support,
+       Expr,
+       getText,
+       isXML,
+       tokenize,
+       compile,
+       select,
+       outermostContext,
+       sortInput,
+       hasDuplicate,
+
+       // Local document vars
+       setDocument,
+       document,
+       docElem,
+       documentIsHTML,
+       rbuggyQSA,
+       rbuggyMatches,
+       matches,
+       contains,
+
+       // Instance-specific data
+       expando = "sizzle" + 1 * new Date(),
+       preferredDoc = window.document,
+       dirruns = 0,
+       done = 0,
+       classCache = createCache(),
+       tokenCache = createCache(),
+       compilerCache = createCache(),
+       sortOrder = function( a, b ) {
+               if ( a === b ) {
+                       hasDuplicate = true;
+               }
+               return 0;
+       },
+
+       // Instance methods
+       hasOwn = ({}).hasOwnProperty,
+       arr = [],
+       pop = arr.pop,
+       push_native = arr.push,
+       push = arr.push,
+       slice = arr.slice,
+       // Use a stripped-down indexOf as it's faster than native
+       // https://jsperf.com/thor-indexof-vs-for/5
+       indexOf = function( list, elem ) {
+               var i = 0,
+                       len = list.length;
+               for ( ; i < len; i++ ) {
+                       if ( list[i] === elem ) {
+                               return i;
+                       }
+               }
+               return -1;
+       },
+
+       booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+       // Regular expressions
+
+       // http://www.w3.org/TR/css3-selectors/#whitespace
+       whitespace = "[\\x20\\t\\r\\n\\f]",
+
+       // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+       identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
+
+       // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+       attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+               // Operator (capture 2)
+               "*([*^$|!~]?=)" + whitespace +
+               // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+               "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+               "*\\]",
+
+       pseudos = ":(" + identifier + ")(?:\\((" +
+               // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+               // 1. quoted (capture 3; capture 4 or capture 5)
+               "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+               // 2. simple (capture 6)
+               "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+               // 3. anything else (capture 2)
+               ".*" +
+               ")\\)|)",
+
+       // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+       rwhitespace = new RegExp( whitespace + "+", "g" ),
+       rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+       rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+       rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+       rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+       rpseudo = new RegExp( pseudos ),
+       ridentifier = new RegExp( "^" + identifier + "$" ),
+
+       matchExpr = {
+               "ID": new RegExp( "^#(" + identifier + ")" ),
+               "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
+               "TAG": new RegExp( "^(" + identifier + "|[*])" ),
+               "ATTR": new RegExp( "^" + attributes ),
+               "PSEUDO": new RegExp( "^" + pseudos ),
+               "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+                       "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+                       "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+               "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+               // For use in libraries implementing .is()
+               // We use this for POS matching in `select`
+               "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+                       whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+       },
+
+       rinputs = /^(?:input|select|textarea|button)$/i,
+       rheader = /^h\d$/i,
+
+       rnative = /^[^{]+\{\s*\[native \w/,
+
+       // Easily-parseable/retrievable ID or TAG or CLASS selectors
+       rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+       rsibling = /[+~]/,
+
+       // CSS escapes
+       // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+       runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+       funescape = function( _, escaped, escapedWhitespace ) {
+               var high = "0x" + escaped - 0x10000;
+               // NaN means non-codepoint
+               // Support: Firefox<24
+               // Workaround erroneous numeric interpretation of +"0x"
+               return high !== high || escapedWhitespace ?
+                       escaped :
+                       high < 0 ?
+                               // BMP codepoint
+                               String.fromCharCode( high + 0x10000 ) :
+                               // Supplemental Plane codepoint (surrogate pair)
+                               String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+       },
+
+       // CSS string/identifier serialization
+       // https://drafts.csswg.org/cssom/#common-serializing-idioms
+       rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
+       fcssescape = function( ch, asCodePoint ) {
+               if ( asCodePoint ) {
+
+                       // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+                       if ( ch === "\0" ) {
+                               return "\uFFFD";
+                       }
+
+                       // Control characters and (dependent upon position) numbers get escaped as code points
+                       return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+               }
+
+               // Other potentially-special ASCII characters get backslash-escaped
+               return "\\" + ch;
+       },
+
+       // Used for iframes
+       // See setDocument()
+       // Removing the function wrapper causes a "Permission Denied"
+       // error in IE
+       unloadHandler = function() {
+               setDocument();
+       },
+
+       disabledAncestor = addCombinator(
+               function( elem ) {
+                       return elem.disabled === true && ("form" in elem || "label" in elem);
+               },
+               { dir: "parentNode", next: "legend" }
+       );
+
+// Optimize for push.apply( _, NodeList )
+try {
+       push.apply(
+               (arr = slice.call( preferredDoc.childNodes )),
+               preferredDoc.childNodes
+       );
+       // Support: Android<4.0
+       // Detect silently failing push.apply
+       arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+       push = { apply: arr.length ?
+
+               // Leverage slice if possible
+               function( target, els ) {
+                       push_native.apply( target, slice.call(els) );
+               } :
+
+               // Support: IE<9
+               // Otherwise append directly
+               function( target, els ) {
+                       var j = target.length,
+                               i = 0;
+                       // Can't trust NodeList.length
+                       while ( (target[j++] = els[i++]) ) {}
+                       target.length = j - 1;
+               }
+       };
+}
+
+function Sizzle( selector, context, results, seed ) {
+       var m, i, elem, nid, match, groups, newSelector,
+               newContext = context && context.ownerDocument,
+
+               // nodeType defaults to 9, since context defaults to document
+               nodeType = context ? context.nodeType : 9;
+
+       results = results || [];
+
+       // Return early from calls with invalid selector or context
+       if ( typeof selector !== "string" || !selector ||
+               nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+               return results;
+       }
+
+       // Try to shortcut find operations (as opposed to filters) in HTML documents
+       if ( !seed ) {
+
+               if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+                       setDocument( context );
+               }
+               context = context || document;
+
+               if ( documentIsHTML ) {
+
+                       // If the selector is sufficiently simple, try using a "get*By*" DOM method
+                       // (excepting DocumentFragment context, where the methods don't exist)
+                       if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+
+                               // ID selector
+                               if ( (m = match[1]) ) {
+
+                                       // Document context
+                                       if ( nodeType === 9 ) {
+                                               if ( (elem = context.getElementById( m )) ) {
+
+                                                       // Support: IE, Opera, Webkit
+                                                       // TODO: identify versions
+                                                       // getElementById can match elements by name instead of ID
+                                                       if ( elem.id === m ) {
+                                                               results.push( elem );
+                                                               return results;
+                                                       }
+                                               } else {
+                                                       return results;
+                                               }
+
+                                       // Element context
+                                       } else {
+
+                                               // Support: IE, Opera, Webkit
+                                               // TODO: identify versions
+                                               // getElementById can match elements by name instead of ID
+                                               if ( newContext && (elem = newContext.getElementById( m )) &&
+                                                       contains( context, elem ) &&
+                                                       elem.id === m ) {
+
+                                                       results.push( elem );
+                                                       return results;
+                                               }
+                                       }
+
+                               // Type selector
+                               } else if ( match[2] ) {
+                                       push.apply( results, context.getElementsByTagName( selector ) );
+                                       return results;
+
+                               // Class selector
+                               } else if ( (m = match[3]) && support.getElementsByClassName &&
+                                       context.getElementsByClassName ) {
+
+                                       push.apply( results, context.getElementsByClassName( m ) );
+                                       return results;
+                               }
+                       }
+
+                       // Take advantage of querySelectorAll
+                       if ( support.qsa &&
+                               !compilerCache[ selector + " " ] &&
+                               (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+
+                               if ( nodeType !== 1 ) {
+                                       newContext = context;
+                                       newSelector = selector;
+
+                               // qSA looks outside Element context, which is not what we want
+                               // Thanks to Andrew Dupont for this workaround technique
+                               // Support: IE <=8
+                               // Exclude object elements
+                               } else if ( context.nodeName.toLowerCase() !== "object" ) {
+
+                                       // Capture the context ID, setting it first if necessary
+                                       if ( (nid = context.getAttribute( "id" )) ) {
+                                               nid = nid.replace( rcssescape, fcssescape );
+                                       } else {
+                                               context.setAttribute( "id", (nid = expando) );
+                                       }
+
+                                       // Prefix every selector in the list
+                                       groups = tokenize( selector );
+                                       i = groups.length;
+                                       while ( i-- ) {
+                                               groups[i] = "#" + nid + " " + toSelector( groups[i] );
+                                       }
+                                       newSelector = groups.join( "," );
+
+                                       // Expand context for sibling selectors
+                                       newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+                                               context;
+                               }
+
+                               if ( newSelector ) {
+                                       try {
+                                               push.apply( results,
+                                                       newContext.querySelectorAll( newSelector )
+                                               );
+                                               return results;
+                                       } catch ( qsaError ) {
+                                       } finally {
+                                               if ( nid === expando ) {
+                                                       context.removeAttribute( "id" );
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
+       // All others
+       return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {function(string, object)} Returns the Object data after storing it on itself with
+ *     property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *     deleting the oldest entry
+ */
+function createCache() {
+       var keys = [];
+
+       function cache( key, value ) {
+               // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+               if ( keys.push( key + " " ) > Expr.cacheLength ) {
+                       // Only keep the most recent entries
+                       delete cache[ keys.shift() ];
+               }
+               return (cache[ key + " " ] = value);
+       }
+       return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+       fn[ expando ] = true;
+       return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created element and returns a boolean result
+ */
+function assert( fn ) {
+       var el = document.createElement("fieldset");
+
+       try {
+               return !!fn( el );
+       } catch (e) {
+               return false;
+       } finally {
+               // Remove from its parent by default
+               if ( el.parentNode ) {
+                       el.parentNode.removeChild( el );
+               }
+               // release memory in IE
+               el = null;
+       }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+       var arr = attrs.split("|"),
+               i = arr.length;
+
+       while ( i-- ) {
+               Expr.attrHandle[ arr[i] ] = handler;
+       }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+       var cur = b && a,
+               diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+                       a.sourceIndex - b.sourceIndex;
+
+       // Use IE sourceIndex if available on both nodes
+       if ( diff ) {
+               return diff;
+       }
+
+       // Check if b follows a
+       if ( cur ) {
+               while ( (cur = cur.nextSibling) ) {
+                       if ( cur === b ) {
+                               return -1;
+                       }
+               }
+       }
+
+       return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+       return function( elem ) {
+               var name = elem.nodeName.toLowerCase();
+               return name === "input" && elem.type === type;
+       };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+       return function( elem ) {
+               var name = elem.nodeName.toLowerCase();
+               return (name === "input" || name === "button") && elem.type === type;
+       };
+}
+
+/**
+ * Returns a function to use in pseudos for :enabled/:disabled
+ * @param {Boolean} disabled true for :disabled; false for :enabled
+ */
+function createDisabledPseudo( disabled ) {
+
+       // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+       return function( elem ) {
+
+               // Only certain elements can match :enabled or :disabled
+               // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
+               // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
+               if ( "form" in elem ) {
+
+                       // Check for inherited disabledness on relevant non-disabled elements:
+                       // * listed form-associated elements in a disabled fieldset
+                       //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
+                       //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
+                       // * option elements in a disabled optgroup
+                       //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
+                       // All such elements have a "form" property.
+                       if ( elem.parentNode && elem.disabled === false ) {
+
+                               // Option elements defer to a parent optgroup if present
+                               if ( "label" in elem ) {
+                                       if ( "label" in elem.parentNode ) {
+                                               return elem.parentNode.disabled === disabled;
+                                       } else {
+                                               return elem.disabled === disabled;
+                                       }
+                               }
+
+                               // Support: IE 6 - 11
+                               // Use the isDisabled shortcut property to check for disabled fieldset ancestors
+                               return elem.isDisabled === disabled ||
+
+                                       // Where there is no isDisabled, check manually
+                                       /* jshint -W018 */
+                                       elem.isDisabled !== !disabled &&
+                                               disabledAncestor( elem ) === disabled;
+                       }
+
+                       return elem.disabled === disabled;
+
+               // Try to winnow out elements that can't be disabled before trusting the disabled property.
+               // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
+               // even exist on them, let alone have a boolean value.
+               } else if ( "label" in elem ) {
+                       return elem.disabled === disabled;
+               }
+
+               // Remaining elements are neither :enabled nor :disabled
+               return false;
+       };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+       return markFunction(function( argument ) {
+               argument = +argument;
+               return markFunction(function( seed, matches ) {
+                       var j,
+                               matchIndexes = fn( [], seed.length, argument ),
+                               i = matchIndexes.length;
+
+                       // Match elements found at the specified indexes
+                       while ( i-- ) {
+                               if ( seed[ (j = matchIndexes[i]) ] ) {
+                                       seed[j] = !(matches[j] = seed[j]);
+                               }
+                       }
+               });
+       });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+       return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+       // documentElement is verified for cases where it doesn't yet exist
+       // (such as loading iframes in IE - #4833)
+       var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+       return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+       var hasCompare, subWindow,
+               doc = node ? node.ownerDocument || node : preferredDoc;
+
+       // Return early if doc is invalid or already selected
+       if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+               return document;
+       }
+
+       // Update global variables
+       document = doc;
+       docElem = document.documentElement;
+       documentIsHTML = !isXML( document );
+
+       // Support: IE 9-11, Edge
+       // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
+       if ( preferredDoc !== document &&
+               (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
+
+               // Support: IE 11, Edge
+               if ( subWindow.addEventListener ) {
+                       subWindow.addEventListener( "unload", unloadHandler, false );
+
+               // Support: IE 9 - 10 only
+               } else if ( subWindow.attachEvent ) {
+                       subWindow.attachEvent( "onunload", unloadHandler );
+               }
+       }
+
+       /* Attributes
+       ---------------------------------------------------------------------- */
+
+       // Support: IE<8
+       // Verify that getAttribute really returns attributes and not properties
+       // (excepting IE8 booleans)
+       support.attributes = assert(function( el ) {
+               el.className = "i";
+               return !el.getAttribute("className");
+       });
+
+       /* getElement(s)By*
+       ---------------------------------------------------------------------- */
+
+       // Check if getElementsByTagName("*") returns only elements
+       support.getElementsByTagName = assert(function( el ) {
+               el.appendChild( document.createComment("") );
+               return !el.getElementsByTagName("*").length;
+       });
+
+       // Support: IE<9
+       support.getElementsByClassName = rnative.test( document.getElementsByClassName );
+
+       // Support: IE<10
+       // Check if getElementById returns elements by name
+       // The broken getElementById methods don't pick up programmatically-set names,
+       // so use a roundabout getElementsByName test
+       support.getById = assert(function( el ) {
+               docElem.appendChild( el ).id = expando;
+               return !document.getElementsByName || !document.getElementsByName( expando ).length;
+       });
+
+       // ID filter and find
+       if ( support.getById ) {
+               Expr.filter["ID"] = function( id ) {
+                       var attrId = id.replace( runescape, funescape );
+                       return function( elem ) {
+                               return elem.getAttribute("id") === attrId;
+                       };
+               };
+               Expr.find["ID"] = function( id, context ) {
+                       if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+                               var elem = context.getElementById( id );
+                               return elem ? [ elem ] : [];
+                       }
+               };
+       } else {
+               Expr.filter["ID"] =  function( id ) {
+                       var attrId = id.replace( runescape, funescape );
+                       return function( elem ) {
+                               var node = typeof elem.getAttributeNode !== "undefined" &&
+                                       elem.getAttributeNode("id");
+                               return node && node.value === attrId;
+                       };
+               };
+
+               // Support: IE 6 - 7 only
+               // getElementById is not reliable as a find shortcut
+               Expr.find["ID"] = function( id, context ) {
+                       if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+                               var node, i, elems,
+                                       elem = context.getElementById( id );
+
+                               if ( elem ) {
+
+                                       // Verify the id attribute
+                                       node = elem.getAttributeNode("id");
+                                       if ( node && node.value === id ) {
+                                               return [ elem ];
+                                       }
+
+                                       // Fall back on getElementsByName
+                                       elems = context.getElementsByName( id );
+                                       i = 0;
+                                       while ( (elem = elems[i++]) ) {
+                                               node = elem.getAttributeNode("id");
+                                               if ( node && node.value === id ) {
+                                                       return [ elem ];
+                                               }
+                                       }
+                               }
+
+                               return [];
+                       }
+               };
+       }
+
+       // Tag
+       Expr.find["TAG"] = support.getElementsByTagName ?
+               function( tag, context ) {
+                       if ( typeof context.getElementsByTagName !== "undefined" ) {
+                               return context.getElementsByTagName( tag );
+
+                       // DocumentFragment nodes don't have gEBTN
+                       } else if ( support.qsa ) {
+                               return context.querySelectorAll( tag );
+                       }
+               } :
+
+               function( tag, context ) {
+                       var elem,
+                               tmp = [],
+                               i = 0,
+                               // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+                               results = context.getElementsByTagName( tag );
+
+                       // Filter out possible comments
+                       if ( tag === "*" ) {
+                               while ( (elem = results[i++]) ) {
+                                       if ( elem.nodeType === 1 ) {
+                                               tmp.push( elem );
+                                       }
+                               }
+
+                               return tmp;
+                       }
+                       return results;
+               };
+
+       // Class
+       Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+               if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
+                       return context.getElementsByClassName( className );
+               }
+       };
+
+       /* QSA/matchesSelector
+       ---------------------------------------------------------------------- */
+
+       // QSA and matchesSelector support
+
+       // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+       rbuggyMatches = [];
+
+       // qSa(:focus) reports false when true (Chrome 21)
+       // We allow this because of a bug in IE8/9 that throws an error
+       // whenever `document.activeElement` is accessed on an iframe
+       // So, we allow :focus to pass through QSA all the time to avoid the IE error
+       // See https://bugs.jquery.com/ticket/13378
+       rbuggyQSA = [];
+
+       if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
+               // Build QSA regex
+               // Regex strategy adopted from Diego Perini
+               assert(function( el ) {
+                       // Select is set to empty string on purpose
+                       // This is to test IE's treatment of not explicitly
+                       // setting a boolean content attribute,
+                       // since its presence should be enough
+                       // https://bugs.jquery.com/ticket/12359
+                       docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
+                               "<select id='" + expando + "-\r\\' msallowcapture=''>" +
+                               "<option selected=''></option></select>";
+
+                       // Support: IE8, Opera 11-12.16
+                       // Nothing should be selected when empty strings follow ^= or $= or *=
+                       // The test attribute must be unknown in Opera but "safe" for WinRT
+                       // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+                       if ( el.querySelectorAll("[msallowcapture^='']").length ) {
+                               rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+                       }
+
+                       // Support: IE8
+                       // Boolean attributes and "value" are not treated correctly
+                       if ( !el.querySelectorAll("[selected]").length ) {
+                               rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+                       }
+
+                       // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
+                       if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+                               rbuggyQSA.push("~=");
+                       }
+
+                       // Webkit/Opera - :checked should return selected option elements
+                       // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                       // IE8 throws error here and will not see later tests
+                       if ( !el.querySelectorAll(":checked").length ) {
+                               rbuggyQSA.push(":checked");
+                       }
+
+                       // Support: Safari 8+, iOS 8+
+                       // https://bugs.webkit.org/show_bug.cgi?id=136851
+                       // In-page `selector#id sibling-combinator selector` fails
+                       if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
+                               rbuggyQSA.push(".#.+[+~]");
+                       }
+               });
+
+               assert(function( el ) {
+                       el.innerHTML = "<a href='' disabled='disabled'></a>" +
+                               "<select disabled='disabled'><option/></select>";
+
+                       // Support: Windows 8 Native Apps
+                       // The type and name attributes are restricted during .innerHTML assignment
+                       var input = document.createElement("input");
+                       input.setAttribute( "type", "hidden" );
+                       el.appendChild( input ).setAttribute( "name", "D" );
+
+                       // Support: IE8
+                       // Enforce case-sensitivity of name attribute
+                       if ( el.querySelectorAll("[name=d]").length ) {
+                               rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+                       }
+
+                       // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+                       // IE8 throws error here and will not see later tests
+                       if ( el.querySelectorAll(":enabled").length !== 2 ) {
+                               rbuggyQSA.push( ":enabled", ":disabled" );
+                       }
+
+                       // Support: IE9-11+
+                       // IE's :disabled selector does not pick up the children of disabled fieldsets
+                       docElem.appendChild( el ).disabled = true;
+                       if ( el.querySelectorAll(":disabled").length !== 2 ) {
+                               rbuggyQSA.push( ":enabled", ":disabled" );
+                       }
+
+                       // Opera 10-11 does not throw on post-comma invalid pseudos
+                       el.querySelectorAll("*,:x");
+                       rbuggyQSA.push(",.*:");
+               });
+       }
+
+       if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+               docElem.webkitMatchesSelector ||
+               docElem.mozMatchesSelector ||
+               docElem.oMatchesSelector ||
+               docElem.msMatchesSelector) )) ) {
+
+               assert(function( el ) {
+                       // Check to see if it's possible to do matchesSelector
+                       // on a disconnected node (IE 9)
+                       support.disconnectedMatch = matches.call( el, "*" );
+
+                       // This should fail with an exception
+                       // Gecko does not error, returns false instead
+                       matches.call( el, "[s!='']:x" );
+                       rbuggyMatches.push( "!=", pseudos );
+               });
+       }
+
+       rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+       rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+       /* Contains
+       ---------------------------------------------------------------------- */
+       hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+       // Element contains another
+       // Purposefully self-exclusive
+       // As in, an element does not contain itself
+       contains = hasCompare || rnative.test( docElem.contains ) ?
+               function( a, b ) {
+                       var adown = a.nodeType === 9 ? a.documentElement : a,
+                               bup = b && b.parentNode;
+                       return a === bup || !!( bup && bup.nodeType === 1 && (
+                               adown.contains ?
+                                       adown.contains( bup ) :
+                                       a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+                       ));
+               } :
+               function( a, b ) {
+                       if ( b ) {
+                               while ( (b = b.parentNode) ) {
+                                       if ( b === a ) {
+                                               return true;
+                                       }
+                               }
+                       }
+                       return false;
+               };
+
+       /* Sorting
+       ---------------------------------------------------------------------- */
+
+       // Document order sorting
+       sortOrder = hasCompare ?
+       function( a, b ) {
+
+               // Flag for duplicate removal
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               // Sort on method existence if only one input has compareDocumentPosition
+               var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+               if ( compare ) {
+                       return compare;
+               }
+
+               // Calculate position if both inputs belong to the same document
+               compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+                       a.compareDocumentPosition( b ) :
+
+                       // Otherwise we know they are disconnected
+                       1;
+
+               // Disconnected nodes
+               if ( compare & 1 ||
+                       (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+                       // Choose the first element that is related to our preferred document
+                       if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+                               return -1;
+                       }
+                       if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+                               return 1;
+                       }
+
+                       // Maintain original order
+                       return sortInput ?
+                               ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+                               0;
+               }
+
+               return compare & 4 ? -1 : 1;
+       } :
+       function( a, b ) {
+               // Exit early if the nodes are identical
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               var cur,
+                       i = 0,
+                       aup = a.parentNode,
+                       bup = b.parentNode,
+                       ap = [ a ],
+                       bp = [ b ];
+
+               // Parentless nodes are either documents or disconnected
+               if ( !aup || !bup ) {
+                       return a === document ? -1 :
+                               b === document ? 1 :
+                               aup ? -1 :
+                               bup ? 1 :
+                               sortInput ?
+                               ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+                               0;
+
+               // If the nodes are siblings, we can do a quick check
+               } else if ( aup === bup ) {
+                       return siblingCheck( a, b );
+               }
+
+               // Otherwise we need full lists of their ancestors for comparison
+               cur = a;
+               while ( (cur = cur.parentNode) ) {
+                       ap.unshift( cur );
+               }
+               cur = b;
+               while ( (cur = cur.parentNode) ) {
+                       bp.unshift( cur );
+               }
+
+               // Walk down the tree looking for a discrepancy
+               while ( ap[i] === bp[i] ) {
+                       i++;
+               }
+
+               return i ?
+                       // Do a sibling check if the nodes have a common ancestor
+                       siblingCheck( ap[i], bp[i] ) :
+
+                       // Otherwise nodes in our document sort first
+                       ap[i] === preferredDoc ? -1 :
+                       bp[i] === preferredDoc ? 1 :
+                       0;
+       };
+
+       return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+       return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+       // Set document vars if needed
+       if ( ( elem.ownerDocument || elem ) !== document ) {
+               setDocument( elem );
+       }
+
+       // Make sure that attribute selectors are quoted
+       expr = expr.replace( rattributeQuotes, "='$1']" );
+
+       if ( support.matchesSelector && documentIsHTML &&
+               !compilerCache[ expr + " " ] &&
+               ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+               ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+               try {
+                       var ret = matches.call( elem, expr );
+
+                       // IE 9's matchesSelector returns false on disconnected nodes
+                       if ( ret || support.disconnectedMatch ||
+                                       // As well, disconnected nodes are said to be in a document
+                                       // fragment in IE 9
+                                       elem.document && elem.document.nodeType !== 11 ) {
+                               return ret;
+                       }
+               } catch (e) {}
+       }
+
+       return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+       // Set document vars if needed
+       if ( ( context.ownerDocument || context ) !== document ) {
+               setDocument( context );
+       }
+       return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+       // Set document vars if needed
+       if ( ( elem.ownerDocument || elem ) !== document ) {
+               setDocument( elem );
+       }
+
+       var fn = Expr.attrHandle[ name.toLowerCase() ],
+               // Don't get fooled by Object.prototype properties (jQuery #13807)
+               val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+                       fn( elem, name, !documentIsHTML ) :
+                       undefined;
+
+       return val !== undefined ?
+               val :
+               support.attributes || !documentIsHTML ?
+                       elem.getAttribute( name ) :
+                       (val = elem.getAttributeNode(name)) && val.specified ?
+                               val.value :
+                               null;
+};
+
+Sizzle.escape = function( sel ) {
+       return (sel + "").replace( rcssescape, fcssescape );
+};
+
+Sizzle.error = function( msg ) {
+       throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+       var elem,
+               duplicates = [],
+               j = 0,
+               i = 0;
+
+       // Unless we *know* we can detect duplicates, assume their presence
+       hasDuplicate = !support.detectDuplicates;
+       sortInput = !support.sortStable && results.slice( 0 );
+       results.sort( sortOrder );
+
+       if ( hasDuplicate ) {
+               while ( (elem = results[i++]) ) {
+                       if ( elem === results[ i ] ) {
+                               j = duplicates.push( i );
+                       }
+               }
+               while ( j-- ) {
+                       results.splice( duplicates[ j ], 1 );
+               }
+       }
+
+       // Clear input after sorting to release objects
+       // See https://github.com/jquery/sizzle/pull/225
+       sortInput = null;
+
+       return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+       var node,
+               ret = "",
+               i = 0,
+               nodeType = elem.nodeType;
+
+       if ( !nodeType ) {
+               // If no nodeType, this is expected to be an array
+               while ( (node = elem[i++]) ) {
+                       // Do not traverse comment nodes
+                       ret += getText( node );
+               }
+       } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+               // Use textContent for elements
+               // innerText usage removed for consistency of new lines (jQuery #11153)
+               if ( typeof elem.textContent === "string" ) {
+                       return elem.textContent;
+               } else {
+                       // Traverse its children
+                       for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                               ret += getText( elem );
+                       }
+               }
+       } else if ( nodeType === 3 || nodeType === 4 ) {
+               return elem.nodeValue;
+       }
+       // Do not include comment or processing instruction nodes
+
+       return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+       // Can be adjusted by the user
+       cacheLength: 50,
+
+       createPseudo: markFunction,
+
+       match: matchExpr,
+
+       attrHandle: {},
+
+       find: {},
+
+       relative: {
+               ">": { dir: "parentNode", first: true },
+               " ": { dir: "parentNode" },
+               "+": { dir: "previousSibling", first: true },
+               "~": { dir: "previousSibling" }
+       },
+
+       preFilter: {
+               "ATTR": function( match ) {
+                       match[1] = match[1].replace( runescape, funescape );
+
+                       // Move the given value to match[3] whether quoted or unquoted
+                       match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+                       if ( match[2] === "~=" ) {
+                               match[3] = " " + match[3] + " ";
+                       }
+
+                       return match.slice( 0, 4 );
+               },
+
+               "CHILD": function( match ) {
+                       /* matches from matchExpr["CHILD"]
+                               1 type (only|nth|...)
+                               2 what (child|of-type)
+                               3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+                               4 xn-component of xn+y argument ([+-]?\d*n|)
+                               5 sign of xn-component
+                               6 x of xn-component
+                               7 sign of y-component
+                               8 y of y-component
+                       */
+                       match[1] = match[1].toLowerCase();
+
+                       if ( match[1].slice( 0, 3 ) === "nth" ) {
+                               // nth-* requires argument
+                               if ( !match[3] ) {
+                                       Sizzle.error( match[0] );
+                               }
+
+                               // numeric x and y parameters for Expr.filter.CHILD
+                               // remember that false/true cast respectively to 0/1
+                               match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+                               match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+                       // other types prohibit arguments
+                       } else if ( match[3] ) {
+                               Sizzle.error( match[0] );
+                       }
+
+                       return match;
+               },
+
+               "PSEUDO": function( match ) {
+                       var excess,
+                               unquoted = !match[6] && match[2];
+
+                       if ( matchExpr["CHILD"].test( match[0] ) ) {
+                               return null;
+                       }
+
+                       // Accept quoted arguments as-is
+                       if ( match[3] ) {
+                               match[2] = match[4] || match[5] || "";
+
+                       // Strip excess characters from unquoted arguments
+                       } else if ( unquoted && rpseudo.test( unquoted ) &&
+                               // Get excess from tokenize (recursively)
+                               (excess = tokenize( unquoted, true )) &&
+                               // advance to the next closing parenthesis
+                               (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+                               // excess is a negative index
+                               match[0] = match[0].slice( 0, excess );
+                               match[2] = unquoted.slice( 0, excess );
+                       }
+
+                       // Return only captures needed by the pseudo filter method (type and argument)
+                       return match.slice( 0, 3 );
+               }
+       },
+
+       filter: {
+
+               "TAG": function( nodeNameSelector ) {
+                       var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+                       return nodeNameSelector === "*" ?
+                               function() { return true; } :
+                               function( elem ) {
+                                       return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+                               };
+               },
+
+               "CLASS": function( className ) {
+                       var pattern = classCache[ className + " " ];
+
+                       return pattern ||
+                               (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+                               classCache( className, function( elem ) {
+                                       return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+                               });
+               },
+
+               "ATTR": function( name, operator, check ) {
+                       return function( elem ) {
+                               var result = Sizzle.attr( elem, name );
+
+                               if ( result == null ) {
+                                       return operator === "!=";
+                               }
+                               if ( !operator ) {
+                                       return true;
+                               }
+
+                               result += "";
+
+                               return operator === "=" ? result === check :
+                                       operator === "!=" ? result !== check :
+                                       operator === "^=" ? check && result.indexOf( check ) === 0 :
+                                       operator === "*=" ? check && result.indexOf( check ) > -1 :
+                                       operator === "$=" ? check && result.slice( -check.length ) === check :
+                                       operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+                                       operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+                                       false;
+                       };
+               },
+
+               "CHILD": function( type, what, argument, first, last ) {
+                       var simple = type.slice( 0, 3 ) !== "nth",
+                               forward = type.slice( -4 ) !== "last",
+                               ofType = what === "of-type";
+
+                       return first === 1 && last === 0 ?
+
+                               // Shortcut for :nth-*(n)
+                               function( elem ) {
+                                       return !!elem.parentNode;
+                               } :
+
+                               function( elem, context, xml ) {
+                                       var cache, uniqueCache, outerCache, node, nodeIndex, start,
+                                               dir = simple !== forward ? "nextSibling" : "previousSibling",
+                                               parent = elem.parentNode,
+                                               name = ofType && elem.nodeName.toLowerCase(),
+                                               useCache = !xml && !ofType,
+                                               diff = false;
+
+                                       if ( parent ) {
+
+                                               // :(first|last|only)-(child|of-type)
+                                               if ( simple ) {
+                                                       while ( dir ) {
+                                                               node = elem;
+                                                               while ( (node = node[ dir ]) ) {
+                                                                       if ( ofType ?
+                                                                               node.nodeName.toLowerCase() === name :
+                                                                               node.nodeType === 1 ) {
+
+                                                                               return false;
+                                                                       }
+                                                               }
+                                                               // Reverse direction for :only-* (if we haven't yet done so)
+                                                               start = dir = type === "only" && !start && "nextSibling";
+                                                       }
+                                                       return true;
+                                               }
+
+                                               start = [ forward ? parent.firstChild : parent.lastChild ];
+
+                                               // non-xml :nth-child(...) stores cache data on `parent`
+                                               if ( forward && useCache ) {
+
+                                                       // Seek `elem` from a previously-cached index
+
+                                                       // ...in a gzip-friendly way
+                                                       node = parent;
+                                                       outerCache = node[ expando ] || (node[ expando ] = {});
+
+                                                       // Support: IE <9 only
+                                                       // Defend against cloned attroperties (jQuery gh-1709)
+                                                       uniqueCache = outerCache[ node.uniqueID ] ||
+                                                               (outerCache[ node.uniqueID ] = {});
+
+                                                       cache = uniqueCache[ type ] || [];
+                                                       nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+                                                       diff = nodeIndex && cache[ 2 ];
+                                                       node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+                                                       while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+                                                               // Fallback to seeking `elem` from the start
+                                                               (diff = nodeIndex = 0) || start.pop()) ) {
+
+                                                               // When found, cache indexes on `parent` and break
+                                                               if ( node.nodeType === 1 && ++diff && node === elem ) {
+                                                                       uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
+                                                                       break;
+                                                               }
+                                                       }
+
+                                               } else {
+                                                       // Use previously-cached element index if available
+                                                       if ( useCache ) {
+                                                               // ...in a gzip-friendly way
+                                                               node = elem;
+                                                               outerCache = node[ expando ] || (node[ expando ] = {});
+
+                                                               // Support: IE <9 only
+                                                               // Defend against cloned attroperties (jQuery gh-1709)
+                                                               uniqueCache = outerCache[ node.uniqueID ] ||
+                                                                       (outerCache[ node.uniqueID ] = {});
+
+                                                               cache = uniqueCache[ type ] || [];
+                                                               nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+                                                               diff = nodeIndex;
+                                                       }
+
+                                                       // xml :nth-child(...)
+                                                       // or :nth-last-child(...) or :nth(-last)?-of-type(...)
+                                                       if ( diff === false ) {
+                                                               // Use the same loop as above to seek `elem` from the start
+                                                               while ( (node = ++nodeIndex && node && node[ dir ] ||
+                                                                       (diff = nodeIndex = 0) || start.pop()) ) {
+
+                                                                       if ( ( ofType ?
+                                                                               node.nodeName.toLowerCase() === name :
+                                                                               node.nodeType === 1 ) &&
+                                                                               ++diff ) {
+
+                                                                               // Cache the index of each encountered element
+                                                                               if ( useCache ) {
+                                                                                       outerCache = node[ expando ] || (node[ expando ] = {});
+
+                                                                                       // Support: IE <9 only
+                                                                                       // Defend against cloned attroperties (jQuery gh-1709)
+                                                                                       uniqueCache = outerCache[ node.uniqueID ] ||
+                                                                                               (outerCache[ node.uniqueID ] = {});
+
+                                                                                       uniqueCache[ type ] = [ dirruns, diff ];
+                                                                               }
+
+                                                                               if ( node === elem ) {
+                                                                                       break;
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+
+                                               // Incorporate the offset, then check against cycle size
+                                               diff -= last;
+                                               return diff === first || ( diff % first === 0 && diff / first >= 0 );
+                                       }
+                               };
+               },
+
+               "PSEUDO": function( pseudo, argument ) {
+                       // pseudo-class names are case-insensitive
+                       // http://www.w3.org/TR/selectors/#pseudo-classes
+                       // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+                       // Remember that setFilters inherits from pseudos
+                       var args,
+                               fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+                                       Sizzle.error( "unsupported pseudo: " + pseudo );
+
+                       // The user may use createPseudo to indicate that
+                       // arguments are needed to create the filter function
+                       // just as Sizzle does
+                       if ( fn[ expando ] ) {
+                               return fn( argument );
+                       }
+
+                       // But maintain support for old signatures
+                       if ( fn.length > 1 ) {
+                               args = [ pseudo, pseudo, "", argument ];
+                               return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+                                       markFunction(function( seed, matches ) {
+                                               var idx,
+                                                       matched = fn( seed, argument ),
+                                                       i = matched.length;
+                                               while ( i-- ) {
+                                                       idx = indexOf( seed, matched[i] );
+                                                       seed[ idx ] = !( matches[ idx ] = matched[i] );
+                                               }
+                                       }) :
+                                       function( elem ) {
+                                               return fn( elem, 0, args );
+                                       };
+                       }
+
+                       return fn;
+               }
+       },
+
+       pseudos: {
+               // Potentially complex pseudos
+               "not": markFunction(function( selector ) {
+                       // Trim the selector passed to compile
+                       // to avoid treating leading and trailing
+                       // spaces as combinators
+                       var input = [],
+                               results = [],
+                               matcher = compile( selector.replace( rtrim, "$1" ) );
+
+                       return matcher[ expando ] ?
+                               markFunction(function( seed, matches, context, xml ) {
+                                       var elem,
+                                               unmatched = matcher( seed, null, xml, [] ),
+                                               i = seed.length;
+
+                                       // Match elements unmatched by `matcher`
+                                       while ( i-- ) {
+                                               if ( (elem = unmatched[i]) ) {
+                                                       seed[i] = !(matches[i] = elem);
+                                               }
+                                       }
+                               }) :
+                               function( elem, context, xml ) {
+                                       input[0] = elem;
+                                       matcher( input, null, xml, results );
+                                       // Don't keep the element (issue #299)
+                                       input[0] = null;
+                                       return !results.pop();
+                               };
+               }),
+
+               "has": markFunction(function( selector ) {
+                       return function( elem ) {
+                               return Sizzle( selector, elem ).length > 0;
+                       };
+               }),
+
+               "contains": markFunction(function( text ) {
+                       text = text.replace( runescape, funescape );
+                       return function( elem ) {
+                               return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+                       };
+               }),
+
+               // "Whether an element is represented by a :lang() selector
+               // is based solely on the element's language value
+               // being equal to the identifier C,
+               // or beginning with the identifier C immediately followed by "-".
+               // The matching of C against the element's language value is performed case-insensitively.
+               // The identifier C does not have to be a valid language name."
+               // http://www.w3.org/TR/selectors/#lang-pseudo
+               "lang": markFunction( function( lang ) {
+                       // lang value must be a valid identifier
+                       if ( !ridentifier.test(lang || "") ) {
+                               Sizzle.error( "unsupported lang: " + lang );
+                       }
+                       lang = lang.replace( runescape, funescape ).toLowerCase();
+                       return function( elem ) {
+                               var elemLang;
+                               do {
+                                       if ( (elemLang = documentIsHTML ?
+                                               elem.lang :
+                                               elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+                                               elemLang = elemLang.toLowerCase();
+                                               return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+                                       }
+                               } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+                               return false;
+                       };
+               }),
+
+               // Miscellaneous
+               "target": function( elem ) {
+                       var hash = window.location && window.location.hash;
+                       return hash && hash.slice( 1 ) === elem.id;
+               },
+
+               "root": function( elem ) {
+                       return elem === docElem;
+               },
+
+               "focus": function( elem ) {
+                       return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+               },
+
+               // Boolean properties
+               "enabled": createDisabledPseudo( false ),
+               "disabled": createDisabledPseudo( true ),
+
+               "checked": function( elem ) {
+                       // In CSS3, :checked should return both checked and selected elements
+                       // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                       var nodeName = elem.nodeName.toLowerCase();
+                       return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+               },
+
+               "selected": function( elem ) {
+                       // Accessing this property makes selected-by-default
+                       // options in Safari work properly
+                       if ( elem.parentNode ) {
+                               elem.parentNode.selectedIndex;
+                       }
+
+                       return elem.selected === true;
+               },
+
+               // Contents
+               "empty": function( elem ) {
+                       // http://www.w3.org/TR/selectors/#empty-pseudo
+                       // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+                       //   but not by others (comment: 8; processing instruction: 7; etc.)
+                       // nodeType < 6 works because attributes (2) do not appear as children
+                       for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                               if ( elem.nodeType < 6 ) {
+                                       return false;
+                               }
+                       }
+                       return true;
+               },
+
+               "parent": function( elem ) {
+                       return !Expr.pseudos["empty"]( elem );
+               },
+
+               // Element/input types
+               "header": function( elem ) {
+                       return rheader.test( elem.nodeName );
+               },
+
+               "input": function( elem ) {
+                       return rinputs.test( elem.nodeName );
+               },
+
+               "button": function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return name === "input" && elem.type === "button" || name === "button";
+               },
+
+               "text": function( elem ) {
+                       var attr;
+                       return elem.nodeName.toLowerCase() === "input" &&
+                               elem.type === "text" &&
+
+                               // Support: IE<8
+                               // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+                               ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+               },
+
+               // Position-in-collection
+               "first": createPositionalPseudo(function() {
+                       return [ 0 ];
+               }),
+
+               "last": createPositionalPseudo(function( matchIndexes, length ) {
+                       return [ length - 1 ];
+               }),
+
+               "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       return [ argument < 0 ? argument + length : argument ];
+               }),
+
+               "even": createPositionalPseudo(function( matchIndexes, length ) {
+                       var i = 0;
+                       for ( ; i < length; i += 2 ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "odd": createPositionalPseudo(function( matchIndexes, length ) {
+                       var i = 1;
+                       for ( ; i < length; i += 2 ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       var i = argument < 0 ? argument + length : argument;
+                       for ( ; --i >= 0; ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       var i = argument < 0 ? argument + length : argument;
+                       for ( ; ++i < length; ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               })
+       }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+       Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+       Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+       var matched, match, tokens, type,
+               soFar, groups, preFilters,
+               cached = tokenCache[ selector + " " ];
+
+       if ( cached ) {
+               return parseOnly ? 0 : cached.slice( 0 );
+       }
+
+       soFar = selector;
+       groups = [];
+       preFilters = Expr.preFilter;
+
+       while ( soFar ) {
+
+               // Comma and first run
+               if ( !matched || (match = rcomma.exec( soFar )) ) {
+                       if ( match ) {
+                               // Don't consume trailing commas as valid
+                               soFar = soFar.slice( match[0].length ) || soFar;
+                       }
+                       groups.push( (tokens = []) );
+               }
+
+               matched = false;
+
+               // Combinators
+               if ( (match = rcombinators.exec( soFar )) ) {
+                       matched = match.shift();
+                       tokens.push({
+                               value: matched,
+                               // Cast descendant combinators to space
+                               type: match[0].replace( rtrim, " " )
+                       });
+                       soFar = soFar.slice( matched.length );
+               }
+
+               // Filters
+               for ( type in Expr.filter ) {
+                       if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+                               (match = preFilters[ type ]( match ))) ) {
+                               matched = match.shift();
+                               tokens.push({
+                                       value: matched,
+                                       type: type,
+                                       matches: match
+                               });
+                               soFar = soFar.slice( matched.length );
+                       }
+               }
+
+               if ( !matched ) {
+                       break;
+               }
+       }
+
+       // Return the length of the invalid excess
+       // if we're just parsing
+       // Otherwise, throw an error or return tokens
+       return parseOnly ?
+               soFar.length :
+               soFar ?
+                       Sizzle.error( selector ) :
+                       // Cache the tokens
+                       tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+       var i = 0,
+               len = tokens.length,
+               selector = "";
+       for ( ; i < len; i++ ) {
+               selector += tokens[i].value;
+       }
+       return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+       var dir = combinator.dir,
+               skip = combinator.next,
+               key = skip || dir,
+               checkNonElements = base && key === "parentNode",
+               doneName = done++;
+
+       return combinator.first ?
+               // Check against closest ancestor/preceding element
+               function( elem, context, xml ) {
+                       while ( (elem = elem[ dir ]) ) {
+                               if ( elem.nodeType === 1 || checkNonElements ) {
+                                       return matcher( elem, context, xml );
+                               }
+                       }
+                       return false;
+               } :
+
+               // Check against all ancestor/preceding elements
+               function( elem, context, xml ) {
+                       var oldCache, uniqueCache, outerCache,
+                               newCache = [ dirruns, doneName ];
+
+                       // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+                       if ( xml ) {
+                               while ( (elem = elem[ dir ]) ) {
+                                       if ( elem.nodeType === 1 || checkNonElements ) {
+                                               if ( matcher( elem, context, xml ) ) {
+                                                       return true;
+                                               }
+                                       }
+                               }
+                       } else {
+                               while ( (elem = elem[ dir ]) ) {
+                                       if ( elem.nodeType === 1 || checkNonElements ) {
+                                               outerCache = elem[ expando ] || (elem[ expando ] = {});
+
+                                               // Support: IE <9 only
+                                               // Defend against cloned attroperties (jQuery gh-1709)
+                                               uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
+
+                                               if ( skip && skip === elem.nodeName.toLowerCase() ) {
+                                                       elem = elem[ dir ] || elem;
+                                               } else if ( (oldCache = uniqueCache[ key ]) &&
+                                                       oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+                                                       // Assign to newCache so results back-propagate to previous elements
+                                                       return (newCache[ 2 ] = oldCache[ 2 ]);
+                                               } else {
+                                                       // Reuse newcache so results back-propagate to previous elements
+                                                       uniqueCache[ key ] = newCache;
+
+                                                       // A match means we're done; a fail means we have to keep checking
+                                                       if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+                                                               return true;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+                       return false;
+               };
+}
+
+function elementMatcher( matchers ) {
+       return matchers.length > 1 ?
+               function( elem, context, xml ) {
+                       var i = matchers.length;
+                       while ( i-- ) {
+                               if ( !matchers[i]( elem, context, xml ) ) {
+                                       return false;
+                               }
+                       }
+                       return true;
+               } :
+               matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+       var i = 0,
+               len = contexts.length;
+       for ( ; i < len; i++ ) {
+               Sizzle( selector, contexts[i], results );
+       }
+       return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+       var elem,
+               newUnmatched = [],
+               i = 0,
+               len = unmatched.length,
+               mapped = map != null;
+
+       for ( ; i < len; i++ ) {
+               if ( (elem = unmatched[i]) ) {
+                       if ( !filter || filter( elem, context, xml ) ) {
+                               newUnmatched.push( elem );
+                               if ( mapped ) {
+                                       map.push( i );
+                               }
+                       }
+               }
+       }
+
+       return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+       if ( postFilter && !postFilter[ expando ] ) {
+               postFilter = setMatcher( postFilter );
+       }
+       if ( postFinder && !postFinder[ expando ] ) {
+               postFinder = setMatcher( postFinder, postSelector );
+       }
+       return markFunction(function( seed, results, context, xml ) {
+               var temp, i, elem,
+                       preMap = [],
+                       postMap = [],
+                       preexisting = results.length,
+
+                       // Get initial elements from seed or context
+                       elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+                       // Prefilter to get matcher input, preserving a map for seed-results synchronization
+                       matcherIn = preFilter && ( seed || !selector ) ?
+                               condense( elems, preMap, preFilter, context, xml ) :
+                               elems,
+
+                       matcherOut = matcher ?
+                               // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+                               postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+                                       // ...intermediate processing is necessary
+                                       [] :
+
+                                       // ...otherwise use results directly
+                                       results :
+                               matcherIn;
+
+               // Find primary matches
+               if ( matcher ) {
+                       matcher( matcherIn, matcherOut, context, xml );
+               }
+
+               // Apply postFilter
+               if ( postFilter ) {
+                       temp = condense( matcherOut, postMap );
+                       postFilter( temp, [], context, xml );
+
+                       // Un-match failing elements by moving them back to matcherIn
+                       i = temp.length;
+                       while ( i-- ) {
+                               if ( (elem = temp[i]) ) {
+                                       matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+                               }
+                       }
+               }
+
+               if ( seed ) {
+                       if ( postFinder || preFilter ) {
+                               if ( postFinder ) {
+                                       // Get the final matcherOut by condensing this intermediate into postFinder contexts
+                                       temp = [];
+                                       i = matcherOut.length;
+                                       while ( i-- ) {
+                                               if ( (elem = matcherOut[i]) ) {
+                                                       // Restore matcherIn since elem is not yet a final match
+                                                       temp.push( (matcherIn[i] = elem) );
+                                               }
+                                       }
+                                       postFinder( null, (matcherOut = []), temp, xml );
+                               }
+
+                               // Move matched elements from seed to results to keep them synchronized
+                               i = matcherOut.length;
+                               while ( i-- ) {
+                                       if ( (elem = matcherOut[i]) &&
+                                               (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+                                               seed[temp] = !(results[temp] = elem);
+                                       }
+                               }
+                       }
+
+               // Add elements to results, through postFinder if defined
+               } else {
+                       matcherOut = condense(
+                               matcherOut === results ?
+                                       matcherOut.splice( preexisting, matcherOut.length ) :
+                                       matcherOut
+                       );
+                       if ( postFinder ) {
+                               postFinder( null, results, matcherOut, xml );
+                       } else {
+                               push.apply( results, matcherOut );
+                       }
+               }
+       });
+}
+
+function matcherFromTokens( tokens ) {
+       var checkContext, matcher, j,
+               len = tokens.length,
+               leadingRelative = Expr.relative[ tokens[0].type ],
+               implicitRelative = leadingRelative || Expr.relative[" "],
+               i = leadingRelative ? 1 : 0,
+
+               // The foundational matcher ensures that elements are reachable from top-level context(s)
+               matchContext = addCombinator( function( elem ) {
+                       return elem === checkContext;
+               }, implicitRelative, true ),
+               matchAnyContext = addCombinator( function( elem ) {
+                       return indexOf( checkContext, elem ) > -1;
+               }, implicitRelative, true ),
+               matchers = [ function( elem, context, xml ) {
+                       var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+                               (checkContext = context).nodeType ?
+                                       matchContext( elem, context, xml ) :
+                                       matchAnyContext( elem, context, xml ) );
+                       // Avoid hanging onto element (issue #299)
+                       checkContext = null;
+                       return ret;
+               } ];
+
+       for ( ; i < len; i++ ) {
+               if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+                       matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+               } else {
+                       matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+                       // Return special upon seeing a positional matcher
+                       if ( matcher[ expando ] ) {
+                               // Find the next relative operator (if any) for proper handling
+                               j = ++i;
+                               for ( ; j < len; j++ ) {
+                                       if ( Expr.relative[ tokens[j].type ] ) {
+                                               break;
+                                       }
+                               }
+                               return setMatcher(
+                                       i > 1 && elementMatcher( matchers ),
+                                       i > 1 && toSelector(
+                                               // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+                                               tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+                                       ).replace( rtrim, "$1" ),
+                                       matcher,
+                                       i < j && matcherFromTokens( tokens.slice( i, j ) ),
+                                       j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+                                       j < len && toSelector( tokens )
+                               );
+                       }
+                       matchers.push( matcher );
+               }
+       }
+
+       return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+       var bySet = setMatchers.length > 0,
+               byElement = elementMatchers.length > 0,
+               superMatcher = function( seed, context, xml, results, outermost ) {
+                       var elem, j, matcher,
+                               matchedCount = 0,
+                               i = "0",
+                               unmatched = seed && [],
+                               setMatched = [],
+                               contextBackup = outermostContext,
+                               // We must always have either seed elements or outermost context
+                               elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+                               // Use integer dirruns iff this is the outermost matcher
+                               dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+                               len = elems.length;
+
+                       if ( outermost ) {
+                               outermostContext = context === document || context || outermost;
+                       }
+
+                       // Add elements passing elementMatchers directly to results
+                       // Support: IE<9, Safari
+                       // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+                       for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+                               if ( byElement && elem ) {
+                                       j = 0;
+                                       if ( !context && elem.ownerDocument !== document ) {
+                                               setDocument( elem );
+                                               xml = !documentIsHTML;
+                                       }
+                                       while ( (matcher = elementMatchers[j++]) ) {
+                                               if ( matcher( elem, context || document, xml) ) {
+                                                       results.push( elem );
+                                                       break;
+                                               }
+                                       }
+                                       if ( outermost ) {
+                                               dirruns = dirrunsUnique;
+                                       }
+                               }
+
+                               // Track unmatched elements for set filters
+                               if ( bySet ) {
+                                       // They will have gone through all possible matchers
+                                       if ( (elem = !matcher && elem) ) {
+                                               matchedCount--;
+                                       }
+
+                                       // Lengthen the array for every element, matched or not
+                                       if ( seed ) {
+                                               unmatched.push( elem );
+                                       }
+                               }
+                       }
+
+                       // `i` is now the count of elements visited above, and adding it to `matchedCount`
+                       // makes the latter nonnegative.
+                       matchedCount += i;
+
+                       // Apply set filters to unmatched elements
+                       // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+                       // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+                       // no element matchers and no seed.
+                       // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+                       // case, which will result in a "00" `matchedCount` that differs from `i` but is also
+                       // numerically zero.
+                       if ( bySet && i !== matchedCount ) {
+                               j = 0;
+                               while ( (matcher = setMatchers[j++]) ) {
+                                       matcher( unmatched, setMatched, context, xml );
+                               }
+
+                               if ( seed ) {
+                                       // Reintegrate element matches to eliminate the need for sorting
+                                       if ( matchedCount > 0 ) {
+                                               while ( i-- ) {
+                                                       if ( !(unmatched[i] || setMatched[i]) ) {
+                                                               setMatched[i] = pop.call( results );
+                                                       }
+                                               }
+                                       }
+
+                                       // Discard index placeholder values to get only actual matches
+                                       setMatched = condense( setMatched );
+                               }
+
+                               // Add matches to results
+                               push.apply( results, setMatched );
+
+                               // Seedless set matches succeeding multiple successful matchers stipulate sorting
+                               if ( outermost && !seed && setMatched.length > 0 &&
+                                       ( matchedCount + setMatchers.length ) > 1 ) {
+
+                                       Sizzle.uniqueSort( results );
+                               }
+                       }
+
+                       // Override manipulation of globals by nested matchers
+                       if ( outermost ) {
+                               dirruns = dirrunsUnique;
+                               outermostContext = contextBackup;
+                       }
+
+                       return unmatched;
+               };
+
+       return bySet ?
+               markFunction( superMatcher ) :
+               superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+       var i,
+               setMatchers = [],
+               elementMatchers = [],
+               cached = compilerCache[ selector + " " ];
+
+       if ( !cached ) {
+               // Generate a function of recursive functions that can be used to check each element
+               if ( !match ) {
+                       match = tokenize( selector );
+               }
+               i = match.length;
+               while ( i-- ) {
+                       cached = matcherFromTokens( match[i] );
+                       if ( cached[ expando ] ) {
+                               setMatchers.push( cached );
+                       } else {
+                               elementMatchers.push( cached );
+                       }
+               }
+
+               // Cache the compiled function
+               cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+               // Save selector and tokenization
+               cached.selector = selector;
+       }
+       return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ *  selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ *  selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+       var i, tokens, token, type, find,
+               compiled = typeof selector === "function" && selector,
+               match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+       results = results || [];
+
+       // Try to minimize operations if there is only one selector in the list and no seed
+       // (the latter of which guarantees us context)
+       if ( match.length === 1 ) {
+
+               // Reduce context if the leading compound selector is an ID
+               tokens = match[0] = match[0].slice( 0 );
+               if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+                               context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
+
+                       context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+                       if ( !context ) {
+                               return results;
+
+                       // Precompiled matchers will still verify ancestry, so step up a level
+                       } else if ( compiled ) {
+                               context = context.parentNode;
+                       }
+
+                       selector = selector.slice( tokens.shift().value.length );
+               }
+
+               // Fetch a seed set for right-to-left matching
+               i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+               while ( i-- ) {
+                       token = tokens[i];
+
+                       // Abort if we hit a combinator
+                       if ( Expr.relative[ (type = token.type) ] ) {
+                               break;
+                       }
+                       if ( (find = Expr.find[ type ]) ) {
+                               // Search, expanding context for leading sibling combinators
+                               if ( (seed = find(
+                                       token.matches[0].replace( runescape, funescape ),
+                                       rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+                               )) ) {
+
+                                       // If seed is empty or no tokens remain, we can return early
+                                       tokens.splice( i, 1 );
+                                       selector = seed.length && toSelector( tokens );
+                                       if ( !selector ) {
+                                               push.apply( results, seed );
+                                               return results;
+                                       }
+
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       // Compile and execute a filtering function if one is not provided
+       // Provide `match` to avoid retokenization if we modified the selector above
+       ( compiled || compile( selector, match ) )(
+               seed,
+               context,
+               !documentIsHTML,
+               results,
+               !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
+       );
+       return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( el ) {
+       // Should return 1, but returns 4 (following)
+       return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( el ) {
+       el.innerHTML = "<a href='#'></a>";
+       return el.firstChild.getAttribute("href") === "#" ;
+}) ) {
+       addHandle( "type|href|height|width", function( elem, name, isXML ) {
+               if ( !isXML ) {
+                       return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+               }
+       });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( el ) {
+       el.innerHTML = "<input/>";
+       el.firstChild.setAttribute( "value", "" );
+       return el.firstChild.getAttribute( "value" ) === "";
+}) ) {
+       addHandle( "value", function( elem, name, isXML ) {
+               if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+                       return elem.defaultValue;
+               }
+       });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( el ) {
+       return el.getAttribute("disabled") == null;
+}) ) {
+       addHandle( booleans, function( elem, name, isXML ) {
+               var val;
+               if ( !isXML ) {
+                       return elem[ name ] === true ? name.toLowerCase() :
+                                       (val = elem.getAttributeNode( name )) && val.specified ?
+                                       val.value :
+                               null;
+               }
+       });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+
+// Deprecated
+jQuery.expr[ ":" ] = jQuery.expr.pseudos;
+jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+jQuery.escapeSelector = Sizzle.escape;
+
+
+
+
+var dir = function( elem, dir, until ) {
+       var matched = [],
+               truncate = until !== undefined;
+
+       while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
+               if ( elem.nodeType === 1 ) {
+                       if ( truncate && jQuery( elem ).is( until ) ) {
+                               break;
+                       }
+                       matched.push( elem );
+               }
+       }
+       return matched;
+};
+
+
+var siblings = function( n, elem ) {
+       var matched = [];
+
+       for ( ; n; n = n.nextSibling ) {
+               if ( n.nodeType === 1 && n !== elem ) {
+                       matched.push( n );
+               }
+       }
+
+       return matched;
+};
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+       if ( jQuery.isFunction( qualifier ) ) {
+               return jQuery.grep( elements, function( elem, i ) {
+                       return !!qualifier.call( elem, i, elem ) !== not;
+               } );
+       }
+
+       // Single element
+       if ( qualifier.nodeType ) {
+               return jQuery.grep( elements, function( elem ) {
+                       return ( elem === qualifier ) !== not;
+               } );
+       }
+
+       // Arraylike of elements (jQuery, arguments, Array)
+       if ( typeof qualifier !== "string" ) {
+               return jQuery.grep( elements, function( elem ) {
+                       return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
+               } );
+       }
+
+       // Simple selector that can be filtered directly, removing non-Elements
+       if ( risSimple.test( qualifier ) ) {
+               return jQuery.filter( qualifier, elements, not );
+       }
+
+       // Complex selector, compare the two sets, removing non-Elements
+       qualifier = jQuery.filter( qualifier, elements );
+       return jQuery.grep( elements, function( elem ) {
+               return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
+       } );
+}
+
+jQuery.filter = function( expr, elems, not ) {
+       var elem = elems[ 0 ];
+
+       if ( not ) {
+               expr = ":not(" + expr + ")";
+       }
+
+       if ( elems.length === 1 && elem.nodeType === 1 ) {
+               return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
+       }
+
+       return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+               return elem.nodeType === 1;
+       } ) );
+};
+
+jQuery.fn.extend( {
+       find: function( selector ) {
+               var i, ret,
+                       len = this.length,
+                       self = this;
+
+               if ( typeof selector !== "string" ) {
+                       return this.pushStack( jQuery( selector ).filter( function() {
+                               for ( i = 0; i < len; i++ ) {
+                                       if ( jQuery.contains( self[ i ], this ) ) {
+                                               return true;
+                                       }
+                               }
+                       } ) );
+               }
+
+               ret = this.pushStack( [] );
+
+               for ( i = 0; i < len; i++ ) {
+                       jQuery.find( selector, self[ i ], ret );
+               }
+
+               return len > 1 ? jQuery.uniqueSort( ret ) : ret;
+       },
+       filter: function( selector ) {
+               return this.pushStack( winnow( this, selector || [], false ) );
+       },
+       not: function( selector ) {
+               return this.pushStack( winnow( this, selector || [], true ) );
+       },
+       is: function( selector ) {
+               return !!winnow(
+                       this,
+
+                       // If this is a positional/relative selector, check membership in the returned set
+                       // so $("p:first").is("p:last") won't return true for a doc with two "p".
+                       typeof selector === "string" && rneedsContext.test( selector ) ?
+                               jQuery( selector ) :
+                               selector || [],
+                       false
+               ).length;
+       }
+} );
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+       // A simple way to check for HTML strings
+       // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+       // Strict HTML recognition (#11290: must start with <)
+       // Shortcut simple #id case for speed
+       rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
+
+       init = jQuery.fn.init = function( selector, context, root ) {
+               var match, elem;
+
+               // HANDLE: $(""), $(null), $(undefined), $(false)
+               if ( !selector ) {
+                       return this;
+               }
+
+               // Method init() accepts an alternate rootjQuery
+               // so migrate can support jQuery.sub (gh-2101)
+               root = root || rootjQuery;
+
+               // Handle HTML strings
+               if ( typeof selector === "string" ) {
+                       if ( selector[ 0 ] === "<" &&
+                               selector[ selector.length - 1 ] === ">" &&
+                               selector.length >= 3 ) {
+
+                               // Assume that strings that start and end with <> are HTML and skip the regex check
+                               match = [ null, selector, null ];
+
+                       } else {
+                               match = rquickExpr.exec( selector );
+                       }
+
+                       // Match html or make sure no context is specified for #id
+                       if ( match && ( match[ 1 ] || !context ) ) {
+
+                               // HANDLE: $(html) -> $(array)
+                               if ( match[ 1 ] ) {
+                                       context = context instanceof jQuery ? context[ 0 ] : context;
+
+                                       // Option to run scripts is true for back-compat
+                                       // Intentionally let the error be thrown if parseHTML is not present
+                                       jQuery.merge( this, jQuery.parseHTML(
+                                               match[ 1 ],
+                                               context && context.nodeType ? context.ownerDocument || context : document,
+                                               true
+                                       ) );
+
+                                       // HANDLE: $(html, props)
+                                       if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
+                                               for ( match in context ) {
+
+                                                       // Properties of context are called as methods if possible
+                                                       if ( jQuery.isFunction( this[ match ] ) ) {
+                                                               this[ match ]( context[ match ] );
+
+                                                       // ...and otherwise set as attributes
+                                                       } else {
+                                                               this.attr( match, context[ match ] );
+                                                       }
+                                               }
+                                       }
+
+                                       return this;
+
+                               // HANDLE: $(#id)
+                               } else {
+                                       elem = document.getElementById( match[ 2 ] );
+
+                                       if ( elem ) {
+
+                                               // Inject the element directly into the jQuery object
+                                               this[ 0 ] = elem;
+                                               this.length = 1;
+                                       }
+                                       return this;
+                               }
+
+                       // HANDLE: $(expr, $(...))
+                       } else if ( !context || context.jquery ) {
+                               return ( context || root ).find( selector );
+
+                       // HANDLE: $(expr, context)
+                       // (which is just equivalent to: $(context).find(expr)
+                       } else {
+                               return this.constructor( context ).find( selector );
+                       }
+
+               // HANDLE: $(DOMElement)
+               } else if ( selector.nodeType ) {
+                       this[ 0 ] = selector;
+                       this.length = 1;
+                       return this;
+
+               // HANDLE: $(function)
+               // Shortcut for document ready
+               } else if ( jQuery.isFunction( selector ) ) {
+                       return root.ready !== undefined ?
+                               root.ready( selector ) :
+
+                               // Execute immediately if ready is not present
+                               selector( jQuery );
+               }
+
+               return jQuery.makeArray( selector, this );
+       };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+       // Methods guaranteed to produce a unique set when starting from a unique set
+       guaranteedUnique = {
+               children: true,
+               contents: true,
+               next: true,
+               prev: true
+       };
+
+jQuery.fn.extend( {
+       has: function( target ) {
+               var targets = jQuery( target, this ),
+                       l = targets.length;
+
+               return this.filter( function() {
+                       var i = 0;
+                       for ( ; i < l; i++ ) {
+                               if ( jQuery.contains( this, targets[ i ] ) ) {
+                                       return true;
+                               }
+                       }
+               } );
+       },
+
+       closest: function( selectors, context ) {
+               var cur,
+                       i = 0,
+                       l = this.length,
+                       matched = [],
+                       targets = typeof selectors !== "string" && jQuery( selectors );
+
+               // Positional selectors never match, since there's no _selection_ context
+               if ( !rneedsContext.test( selectors ) ) {
+                       for ( ; i < l; i++ ) {
+                               for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
+
+                                       // Always skip document fragments
+                                       if ( cur.nodeType < 11 && ( targets ?
+                                               targets.index( cur ) > -1 :
+
+                                               // Don't pass non-elements to Sizzle
+                                               cur.nodeType === 1 &&
+                                                       jQuery.find.matchesSelector( cur, selectors ) ) ) {
+
+                                               matched.push( cur );
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
+       },
+
+       // Determine the position of an element within the set
+       index: function( elem ) {
+
+               // No argument, return index in parent
+               if ( !elem ) {
+                       return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+               }
+
+               // Index in selector
+               if ( typeof elem === "string" ) {
+                       return indexOf.call( jQuery( elem ), this[ 0 ] );
+               }
+
+               // Locate the position of the desired element
+               return indexOf.call( this,
+
+                       // If it receives a jQuery object, the first element is used
+                       elem.jquery ? elem[ 0 ] : elem
+               );
+       },
+
+       add: function( selector, context ) {
+               return this.pushStack(
+                       jQuery.uniqueSort(
+                               jQuery.merge( this.get(), jQuery( selector, context ) )
+                       )
+               );
+       },
+
+       addBack: function( selector ) {
+               return this.add( selector == null ?
+                       this.prevObject : this.prevObject.filter( selector )
+               );
+       }
+} );
+
+function sibling( cur, dir ) {
+       while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
+       return cur;
+}
+
+jQuery.each( {
+       parent: function( elem ) {
+               var parent = elem.parentNode;
+               return parent && parent.nodeType !== 11 ? parent : null;
+       },
+       parents: function( elem ) {
+               return dir( elem, "parentNode" );
+       },
+       parentsUntil: function( elem, i, until ) {
+               return dir( elem, "parentNode", until );
+       },
+       next: function( elem ) {
+               return sibling( elem, "nextSibling" );
+       },
+       prev: function( elem ) {
+               return sibling( elem, "previousSibling" );
+       },
+       nextAll: function( elem ) {
+               return dir( elem, "nextSibling" );
+       },
+       prevAll: function( elem ) {
+               return dir( elem, "previousSibling" );
+       },
+       nextUntil: function( elem, i, until ) {
+               return dir( elem, "nextSibling", until );
+       },
+       prevUntil: function( elem, i, until ) {
+               return dir( elem, "previousSibling", until );
+       },
+       siblings: function( elem ) {
+               return siblings( ( elem.parentNode || {} ).firstChild, elem );
+       },
+       children: function( elem ) {
+               return siblings( elem.firstChild );
+       },
+       contents: function( elem ) {
+               return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+       }
+}, function( name, fn ) {
+       jQuery.fn[ name ] = function( until, selector ) {
+               var matched = jQuery.map( this, fn, until );
+
+               if ( name.slice( -5 ) !== "Until" ) {
+                       selector = until;
+               }
+
+               if ( selector && typeof selector === "string" ) {
+                       matched = jQuery.filter( selector, matched );
+               }
+
+               if ( this.length > 1 ) {
+
+                       // Remove duplicates
+                       if ( !guaranteedUnique[ name ] ) {
+                               jQuery.uniqueSort( matched );
+                       }
+
+                       // Reverse order for parents* and prev-derivatives
+                       if ( rparentsprev.test( name ) ) {
+                               matched.reverse();
+                       }
+               }
+
+               return this.pushStack( matched );
+       };
+} );
+var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
+
+
+
+// Convert String-formatted options into Object-formatted ones
+function createOptions( options ) {
+       var object = {};
+       jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
+               object[ flag ] = true;
+       } );
+       return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *     options: an optional list of space-separated options that will change how
+ *                     the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *     once:                   will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *     memory:                 will keep track of previous values and will call any callback added
+ *                                     after the list has been fired right away with the latest "memorized"
+ *                                     values (like a Deferred)
+ *
+ *     unique:                 will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *     stopOnFalse:    interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+       // Convert options from String-formatted to Object-formatted if needed
+       // (we check in cache first)
+       options = typeof options === "string" ?
+               createOptions( options ) :
+               jQuery.extend( {}, options );
+
+       var // Flag to know if list is currently firing
+               firing,
+
+               // Last fire value for non-forgettable lists
+               memory,
+
+               // Flag to know if list was already fired
+               fired,
+
+               // Flag to prevent firing
+               locked,
+
+               // Actual callback list
+               list = [],
+
+               // Queue of execution data for repeatable lists
+               queue = [],
+
+               // Index of currently firing callback (modified by add/remove as needed)
+               firingIndex = -1,
+
+               // Fire callbacks
+               fire = function() {
+
+                       // Enforce single-firing
+                       locked = options.once;
+
+                       // Execute callbacks for all pending executions,
+                       // respecting firingIndex overrides and runtime changes
+                       fired = firing = true;
+                       for ( ; queue.length; firingIndex = -1 ) {
+                               memory = queue.shift();
+                               while ( ++firingIndex < list.length ) {
+
+                                       // Run callback and check for early termination
+                                       if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
+                                               options.stopOnFalse ) {
+
+                                               // Jump to end and forget the data so .add doesn't re-fire
+                                               firingIndex = list.length;
+                                               memory = false;
+                                       }
+                               }
+                       }
+
+                       // Forget the data if we're done with it
+                       if ( !options.memory ) {
+                               memory = false;
+                       }
+
+                       firing = false;
+
+                       // Clean up if we're done firing for good
+                       if ( locked ) {
+
+                               // Keep an empty list if we have data for future add calls
+                               if ( memory ) {
+                                       list = [];
+
+                               // Otherwise, this object is spent
+                               } else {
+                                       list = "";
+                               }
+                       }
+               },
+
+               // Actual Callbacks object
+               self = {
+
+                       // Add a callback or a collection of callbacks to the list
+                       add: function() {
+                               if ( list ) {
+
+                                       // If we have memory from a past run, we should fire after adding
+                                       if ( memory && !firing ) {
+                                               firingIndex = list.length - 1;
+                                               queue.push( memory );
+                                       }
+
+                                       ( function add( args ) {
+                                               jQuery.each( args, function( _, arg ) {
+                                                       if ( jQuery.isFunction( arg ) ) {
+                                                               if ( !options.unique || !self.has( arg ) ) {
+                                                                       list.push( arg );
+                                                               }
+                                                       } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
+
+                                                               // Inspect recursively
+                                                               add( arg );
+                                                       }
+                                               } );
+                                       } )( arguments );
+
+                                       if ( memory && !firing ) {
+                                               fire();
+                                       }
+                               }
+                               return this;
+                       },
+
+                       // Remove a callback from the list
+                       remove: function() {
+                               jQuery.each( arguments, function( _, arg ) {
+                                       var index;
+                                       while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+                                               list.splice( index, 1 );
+
+                                               // Handle firing indexes
+                                               if ( index <= firingIndex ) {
+                                                       firingIndex--;
+                                               }
+                                       }
+                               } );
+                               return this;
+                       },
+
+                       // Check if a given callback is in the list.
+                       // If no argument is given, return whether or not list has callbacks attached.
+                       has: function( fn ) {
+                               return fn ?
+                                       jQuery.inArray( fn, list ) > -1 :
+                                       list.length > 0;
+                       },
+
+                       // Remove all callbacks from the list
+                       empty: function() {
+                               if ( list ) {
+                                       list = [];
+                               }
+                               return this;
+                       },
+
+                       // Disable .fire and .add
+                       // Abort any current/pending executions
+                       // Clear all callbacks and values
+                       disable: function() {
+                               locked = queue = [];
+                               list = memory = "";
+                               return this;
+                       },
+                       disabled: function() {
+                               return !list;
+                       },
+
+                       // Disable .fire
+                       // Also disable .add unless we have memory (since it would have no effect)
+                       // Abort any pending executions
+                       lock: function() {
+                               locked = queue = [];
+                               if ( !memory && !firing ) {
+                                       list = memory = "";
+                               }
+                               return this;
+                       },
+                       locked: function() {
+                               return !!locked;
+                       },
+
+                       // Call all callbacks with the given context and arguments
+                       fireWith: function( context, args ) {
+                               if ( !locked ) {
+                                       args = args || [];
+                                       args = [ context, args.slice ? args.slice() : args ];
+                                       queue.push( args );
+                                       if ( !firing ) {
+                                               fire();
+                                       }
+                               }
+                               return this;
+                       },
+
+                       // Call all the callbacks with the given arguments
+                       fire: function() {
+                               self.fireWith( this, arguments );
+                               return this;
+                       },
+
+                       // To know if the callbacks have already been called at least once
+                       fired: function() {
+                               return !!fired;
+                       }
+               };
+
+       return self;
+};
+
+
+function Identity( v ) {
+       return v;
+}
+function Thrower( ex ) {
+       throw ex;
+}
+
+function adoptValue( value, resolve, reject ) {
+       var method;
+
+       try {
+
+               // Check for promise aspect first to privilege synchronous behavior
+               if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
+                       method.call( value ).done( resolve ).fail( reject );
+
+               // Other thenables
+               } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
+                       method.call( value, resolve, reject );
+
+               // Other non-thenables
+               } else {
+
+                       // Support: Android 4.0 only
+                       // Strict mode functions invoked without .call/.apply get global-object context
+                       resolve.call( undefined, value );
+               }
+
+       // For Promises/A+, convert exceptions into rejections
+       // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
+       // Deferred#then to conditionally suppress rejection.
+       } catch ( value ) {
+
+               // Support: Android 4.0 only
+               // Strict mode functions invoked without .call/.apply get global-object context
+               reject.call( undefined, value );
+       }
+}
+
+jQuery.extend( {
+
+       Deferred: function( func ) {
+               var tuples = [
+
+                               // action, add listener, callbacks,
+                               // ... .then handlers, argument index, [final state]
+                               [ "notify", "progress", jQuery.Callbacks( "memory" ),
+                                       jQuery.Callbacks( "memory" ), 2 ],
+                               [ "resolve", "done", jQuery.Callbacks( "once memory" ),
+                                       jQuery.Callbacks( "once memory" ), 0, "resolved" ],
+                               [ "reject", "fail", jQuery.Callbacks( "once memory" ),
+                                       jQuery.Callbacks( "once memory" ), 1, "rejected" ]
+                       ],
+                       state = "pending",
+                       promise = {
+                               state: function() {
+                                       return state;
+                               },
+                               always: function() {
+                                       deferred.done( arguments ).fail( arguments );
+                                       return this;
+                               },
+                               "catch": function( fn ) {
+                                       return promise.then( null, fn );
+                               },
+
+                               // Keep pipe for back-compat
+                               pipe: function( /* fnDone, fnFail, fnProgress */ ) {
+                                       var fns = arguments;
+
+                                       return jQuery.Deferred( function( newDefer ) {
+                                               jQuery.each( tuples, function( i, tuple ) {
+
+                                                       // Map tuples (progress, done, fail) to arguments (done, fail, progress)
+                                                       var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
+
+                                                       // deferred.progress(function() { bind to newDefer or newDefer.notify })
+                                                       // deferred.done(function() { bind to newDefer or newDefer.resolve })
+                                                       // deferred.fail(function() { bind to newDefer or newDefer.reject })
+                                                       deferred[ tuple[ 1 ] ]( function() {
+                                                               var returned = fn && fn.apply( this, arguments );
+                                                               if ( returned && jQuery.isFunction( returned.promise ) ) {
+                                                                       returned.promise()
+                                                                               .progress( newDefer.notify )
+                                                                               .done( newDefer.resolve )
+                                                                               .fail( newDefer.reject );
+                                                               } else {
+                                                                       newDefer[ tuple[ 0 ] + "With" ](
+                                                                               this,
+                                                                               fn ? [ returned ] : arguments
+                                                                       );
+                                                               }
+                                                       } );
+                                               } );
+                                               fns = null;
+                                       } ).promise();
+                               },
+                               then: function( onFulfilled, onRejected, onProgress ) {
+                                       var maxDepth = 0;
+                                       function resolve( depth, deferred, handler, special ) {
+                                               return function() {
+                                                       var that = this,
+                                                               args = arguments,
+                                                               mightThrow = function() {
+                                                                       var returned, then;
+
+                                                                       // Support: Promises/A+ section 2.3.3.3.3
+                                                                       // https://promisesaplus.com/#point-59
+                                                                       // Ignore double-resolution attempts
+                                                                       if ( depth < maxDepth ) {
+                                                                               return;
+                                                                       }
+
+                                                                       returned = handler.apply( that, args );
+
+                                                                       // Support: Promises/A+ section 2.3.1
+                                                                       // https://promisesaplus.com/#point-48
+                                                                       if ( returned === deferred.promise() ) {
+                                                                               throw new TypeError( "Thenable self-resolution" );
+                                                                       }
+
+                                                                       // Support: Promises/A+ sections 2.3.3.1, 3.5
+                                                                       // https://promisesaplus.com/#point-54
+                                                                       // https://promisesaplus.com/#point-75
+                                                                       // Retrieve `then` only once
+                                                                       then = returned &&
+
+                                                                               // Support: Promises/A+ section 2.3.4
+                                                                               // https://promisesaplus.com/#point-64
+                                                                               // Only check objects and functions for thenability
+                                                                               ( typeof returned === "object" ||
+                                                                                       typeof returned === "function" ) &&
+                                                                               returned.then;
+
+                                                                       // Handle a returned thenable
+                                                                       if ( jQuery.isFunction( then ) ) {
+
+                                                                               // Special processors (notify) just wait for resolution
+                                                                               if ( special ) {
+                                                                                       then.call(
+                                                                                               returned,
+                                                                                               resolve( maxDepth, deferred, Identity, special ),
+                                                                                               resolve( maxDepth, deferred, Thrower, special )
+                                                                                       );
+
+                                                                               // Normal processors (resolve) also hook into progress
+                                                                               } else {
+
+                                                                                       // ...and disregard older resolution values
+                                                                                       maxDepth++;
+
+                                                                                       then.call(
+                                                                                               returned,
+                                                                                               resolve( maxDepth, deferred, Identity, special ),
+                                                                                               resolve( maxDepth, deferred, Thrower, special ),
+                                                                                               resolve( maxDepth, deferred, Identity,
+                                                                                                       deferred.notifyWith )
+                                                                                       );
+                                                                               }
+
+                                                                       // Handle all other returned values
+                                                                       } else {
+
+                                                                               // Only substitute handlers pass on context
+                                                                               // and multiple values (non-spec behavior)
+                                                                               if ( handler !== Identity ) {
+                                                                                       that = undefined;
+                                                                                       args = [ returned ];
+                                                                               }
+
+                                                                               // Process the value(s)
+                                                                               // Default process is resolve
+                                                                               ( special || deferred.resolveWith )( that, args );
+                                                                       }
+                                                               },
+
+                                                               // Only normal processors (resolve) catch and reject exceptions
+                                                               process = special ?
+                                                                       mightThrow :
+                                                                       function() {
+                                                                               try {
+                                                                                       mightThrow();
+                                                                               } catch ( e ) {
+
+                                                                                       if ( jQuery.Deferred.exceptionHook ) {
+                                                                                               jQuery.Deferred.exceptionHook( e,
+                                                                                                       process.stackTrace );
+                                                                                       }
+
+                                                                                       // Support: Promises/A+ section 2.3.3.3.4.1
+                                                                                       // https://promisesaplus.com/#point-61
+                                                                                       // Ignore post-resolution exceptions
+                                                                                       if ( depth + 1 >= maxDepth ) {
+
+                                                                                               // Only substitute handlers pass on context
+                                                                                               // and multiple values (non-spec behavior)
+                                                                                               if ( handler !== Thrower ) {
+                                                                                                       that = undefined;
+                                                                                                       args = [ e ];
+                                                                                               }
+
+                                                                                               deferred.rejectWith( that, args );
+                                                                                       }
+                                                                               }
+                                                                       };
+
+                                                       // Support: Promises/A+ section 2.3.3.3.1
+                                                       // https://promisesaplus.com/#point-57
+                                                       // Re-resolve promises immediately to dodge false rejection from
+                                                       // subsequent errors
+                                                       if ( depth ) {
+                                                               process();
+                                                       } else {
+
+                                                               // Call an optional hook to record the stack, in case of exception
+                                                               // since it's otherwise lost when execution goes async
+                                                               if ( jQuery.Deferred.getStackHook ) {
+                                                                       process.stackTrace = jQuery.Deferred.getStackHook();
+                                                               }
+                                                               window.setTimeout( process );
+                                                       }
+                                               };
+                                       }
+
+                                       return jQuery.Deferred( function( newDefer ) {
+
+                                               // progress_handlers.add( ... )
+                                               tuples[ 0 ][ 3 ].add(
+                                                       resolve(
+                                                               0,
+                                                               newDefer,
+                                                               jQuery.isFunction( onProgress ) ?
+                                                                       onProgress :
+                                                                       Identity,
+                                                               newDefer.notifyWith
+                                                       )
+                                               );
+
+                                               // fulfilled_handlers.add( ... )
+                                               tuples[ 1 ][ 3 ].add(
+                                                       resolve(
+                                                               0,
+                                                               newDefer,
+                                                               jQuery.isFunction( onFulfilled ) ?
+                                                                       onFulfilled :
+                                                                       Identity
+                                                       )
+                                               );
+
+                                               // rejected_handlers.add( ... )
+                                               tuples[ 2 ][ 3 ].add(
+                                                       resolve(
+                                                               0,
+                                                               newDefer,
+                                                               jQuery.isFunction( onRejected ) ?
+                                                                       onRejected :
+                                                                       Thrower
+                                                       )
+                                               );
+                                       } ).promise();
+                               },
+
+                               // Get a promise for this deferred
+                               // If obj is provided, the promise aspect is added to the object
+                               promise: function( obj ) {
+                                       return obj != null ? jQuery.extend( obj, promise ) : promise;
+                               }
+                       },
+                       deferred = {};
+
+               // Add list-specific methods
+               jQuery.each( tuples, function( i, tuple ) {
+                       var list = tuple[ 2 ],
+                               stateString = tuple[ 5 ];
+
+                       // promise.progress = list.add
+                       // promise.done = list.add
+                       // promise.fail = list.add
+                       promise[ tuple[ 1 ] ] = list.add;
+
+                       // Handle state
+                       if ( stateString ) {
+                               list.add(
+                                       function() {
+
+                                               // state = "resolved" (i.e., fulfilled)
+                                               // state = "rejected"
+                                               state = stateString;
+                                       },
+
+                                       // rejected_callbacks.disable
+                                       // fulfilled_callbacks.disable
+                                       tuples[ 3 - i ][ 2 ].disable,
+
+                                       // progress_callbacks.lock
+                                       tuples[ 0 ][ 2 ].lock
+                               );
+                       }
+
+                       // progress_handlers.fire
+                       // fulfilled_handlers.fire
+                       // rejected_handlers.fire
+                       list.add( tuple[ 3 ].fire );
+
+                       // deferred.notify = function() { deferred.notifyWith(...) }
+                       // deferred.resolve = function() { deferred.resolveWith(...) }
+                       // deferred.reject = function() { deferred.rejectWith(...) }
+                       deferred[ tuple[ 0 ] ] = function() {
+                               deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
+                               return this;
+                       };
+
+                       // deferred.notifyWith = list.fireWith
+                       // deferred.resolveWith = list.fireWith
+                       // deferred.rejectWith = list.fireWith
+                       deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
+               } );
+
+               // Make the deferred a promise
+               promise.promise( deferred );
+
+               // Call given func if any
+               if ( func ) {
+                       func.call( deferred, deferred );
+               }
+
+               // All done!
+               return deferred;
+       },
+
+       // Deferred helper
+       when: function( singleValue ) {
+               var
+
+                       // count of uncompleted subordinates
+                       remaining = arguments.length,
+
+                       // count of unprocessed arguments
+                       i = remaining,
+
+                       // subordinate fulfillment data
+                       resolveContexts = Array( i ),
+                       resolveValues = slice.call( arguments ),
+
+                       // the master Deferred
+                       master = jQuery.Deferred(),
+
+                       // subordinate callback factory
+                       updateFunc = function( i ) {
+                               return function( value ) {
+                                       resolveContexts[ i ] = this;
+                                       resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+                                       if ( !( --remaining ) ) {
+                                               master.resolveWith( resolveContexts, resolveValues );
+                                       }
+                               };
+                       };
+
+               // Single- and empty arguments are adopted like Promise.resolve
+               if ( remaining <= 1 ) {
+                       adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
+
+                       // Use .then() to unwrap secondary thenables (cf. gh-3000)
+                       if ( master.state() === "pending" ||
+                               jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
+
+                               return master.then();
+                       }
+               }
+
+               // Multiple arguments are aggregated like Promise.all array elements
+               while ( i-- ) {
+                       adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
+               }
+
+               return master.promise();
+       }
+} );
+
+
+// These usually indicate a programmer mistake during development,
+// warn about them ASAP rather than swallowing them by default.
+var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
+
+jQuery.Deferred.exceptionHook = function( error, stack ) {
+
+       // Support: IE 8 - 9 only
+       // Console exists when dev tools are open, which can happen at any time
+       if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
+               window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
+       }
+};
+
+
+
+
+jQuery.readyException = function( error ) {
+       window.setTimeout( function() {
+               throw error;
+       } );
+};
+
+
+
+
+// The deferred used on DOM ready
+var readyList = jQuery.Deferred();
+
+jQuery.fn.ready = function( fn ) {
+
+       readyList
+               .then( fn )
+
+               // Wrap jQuery.readyException in a function so that the lookup
+               // happens at the time of error handling instead of callback
+               // registration.
+               .catch( function( error ) {
+                       jQuery.readyException( error );
+               } );
+
+       return this;
+};
+
+jQuery.extend( {
+
+       // Is the DOM ready to be used? Set to true once it occurs.
+       isReady: false,
+
+       // A counter to track how many items to wait for before
+       // the ready event fires. See #6781
+       readyWait: 1,
+
+       // Hold (or release) the ready event
+       holdReady: function( hold ) {
+               if ( hold ) {
+                       jQuery.readyWait++;
+               } else {
+                       jQuery.ready( true );
+               }
+       },
+
+       // Handle when the DOM is ready
+       ready: function( wait ) {
+
+               // Abort if there are pending holds or we're already ready
+               if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+                       return;
+               }
+
+               // Remember that the DOM is ready
+               jQuery.isReady = true;
+
+               // If a normal DOM Ready event fired, decrement, and wait if need be
+               if ( wait !== true && --jQuery.readyWait > 0 ) {
+                       return;
+               }
+
+               // If there are functions bound, to execute
+               readyList.resolveWith( document, [ jQuery ] );
+       }
+} );
+
+jQuery.ready.then = readyList.then;
+
+// The ready event handler and self cleanup method
+function completed() {
+       document.removeEventListener( "DOMContentLoaded", completed );
+       window.removeEventListener( "load", completed );
+       jQuery.ready();
+}
+
+// Catch cases where $(document).ready() is called
+// after the browser event has already occurred.
+// Support: IE <=9 - 10 only
+// Older IE sometimes signals "interactive" too soon
+if ( document.readyState === "complete" ||
+       ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
+
+       // Handle it asynchronously to allow scripts the opportunity to delay ready
+       window.setTimeout( jQuery.ready );
+
+} else {
+
+       // Use the handy event callback
+       document.addEventListener( "DOMContentLoaded", completed );
+
+       // A fallback to window.onload, that will always work
+       window.addEventListener( "load", completed );
+}
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+       var i = 0,
+               len = elems.length,
+               bulk = key == null;
+
+       // Sets many values
+       if ( jQuery.type( key ) === "object" ) {
+               chainable = true;
+               for ( i in key ) {
+                       access( elems, fn, i, key[ i ], true, emptyGet, raw );
+               }
+
+       // Sets one value
+       } else if ( value !== undefined ) {
+               chainable = true;
+
+               if ( !jQuery.isFunction( value ) ) {
+                       raw = true;
+               }
+
+               if ( bulk ) {
+
+                       // Bulk operations run against the entire set
+                       if ( raw ) {
+                               fn.call( elems, value );
+                               fn = null;
+
+                       // ...except when executing function values
+                       } else {
+                               bulk = fn;
+                               fn = function( elem, key, value ) {
+                                       return bulk.call( jQuery( elem ), value );
+                               };
+                       }
+               }
+
+               if ( fn ) {
+                       for ( ; i < len; i++ ) {
+                               fn(
+                                       elems[ i ], key, raw ?
+                                       value :
+                                       value.call( elems[ i ], i, fn( elems[ i ], key ) )
+                               );
+                       }
+               }
+       }
+
+       if ( chainable ) {
+               return elems;
+       }
+
+       // Gets
+       if ( bulk ) {
+               return fn.call( elems );
+       }
+
+       return len ? fn( elems[ 0 ], key ) : emptyGet;
+};
+var acceptData = function( owner ) {
+
+       // Accepts only:
+       //  - Node
+       //    - Node.ELEMENT_NODE
+       //    - Node.DOCUMENT_NODE
+       //  - Object
+       //    - Any
+       return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+
+
+function Data() {
+       this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+
+       cache: function( owner ) {
+
+               // Check if the owner object already has a cache
+               var value = owner[ this.expando ];
+
+               // If not, create one
+               if ( !value ) {
+                       value = {};
+
+                       // We can accept data for non-element nodes in modern browsers,
+                       // but we should not, see #8335.
+                       // Always return an empty object.
+                       if ( acceptData( owner ) ) {
+
+                               // If it is a node unlikely to be stringify-ed or looped over
+                               // use plain assignment
+                               if ( owner.nodeType ) {
+                                       owner[ this.expando ] = value;
+
+                               // Otherwise secure it in a non-enumerable property
+                               // configurable must be true to allow the property to be
+                               // deleted when data is removed
+                               } else {
+                                       Object.defineProperty( owner, this.expando, {
+                                               value: value,
+                                               configurable: true
+                                       } );
+                               }
+                       }
+               }
+
+               return value;
+       },
+       set: function( owner, data, value ) {
+               var prop,
+                       cache = this.cache( owner );
+
+               // Handle: [ owner, key, value ] args
+               // Always use camelCase key (gh-2257)
+               if ( typeof data === "string" ) {
+                       cache[ jQuery.camelCase( data ) ] = value;
+
+               // Handle: [ owner, { properties } ] args
+               } else {
+
+                       // Copy the properties one-by-one to the cache object
+                       for ( prop in data ) {
+                               cache[ jQuery.camelCase( prop ) ] = data[ prop ];
+                       }
+               }
+               return cache;
+       },
+       get: function( owner, key ) {
+               return key === undefined ?
+                       this.cache( owner ) :
+
+                       // Always use camelCase key (gh-2257)
+                       owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];
+       },
+       access: function( owner, key, value ) {
+
+               // In cases where either:
+               //
+               //   1. No key was specified
+               //   2. A string key was specified, but no value provided
+               //
+               // Take the "read" path and allow the get method to determine
+               // which value to return, respectively either:
+               //
+               //   1. The entire cache object
+               //   2. The data stored at the key
+               //
+               if ( key === undefined ||
+                               ( ( key && typeof key === "string" ) && value === undefined ) ) {
+
+                       return this.get( owner, key );
+               }
+
+               // When the key is not a string, or both a key and value
+               // are specified, set or extend (existing objects) with either:
+               //
+               //   1. An object of properties
+               //   2. A key and value
+               //
+               this.set( owner, key, value );
+
+               // Since the "set" path can have two possible entry points
+               // return the expected data based on which path was taken[*]
+               return value !== undefined ? value : key;
+       },
+       remove: function( owner, key ) {
+               var i,
+                       cache = owner[ this.expando ];
+
+               if ( cache === undefined ) {
+                       return;
+               }
+
+               if ( key !== undefined ) {
+
+                       // Support array or space separated string of keys
+                       if ( jQuery.isArray( key ) ) {
+
+                               // If key is an array of keys...
+                               // We always set camelCase keys, so remove that.
+                               key = key.map( jQuery.camelCase );
+                       } else {
+                               key = jQuery.camelCase( key );
+
+                               // If a key with the spaces exists, use it.
+                               // Otherwise, create an array by matching non-whitespace
+                               key = key in cache ?
+                                       [ key ] :
+                                       ( key.match( rnothtmlwhite ) || [] );
+                       }
+
+                       i = key.length;
+
+                       while ( i-- ) {
+                               delete cache[ key[ i ] ];
+                       }
+               }
+
+               // Remove the expando if there's no more data
+               if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
+
+                       // Support: Chrome <=35 - 45
+                       // Webkit & Blink performance suffers when deleting properties
+                       // from DOM nodes, so set to undefined instead
+                       // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
+                       if ( owner.nodeType ) {
+                               owner[ this.expando ] = undefined;
+                       } else {
+                               delete owner[ this.expando ];
+                       }
+               }
+       },
+       hasData: function( owner ) {
+               var cache = owner[ this.expando ];
+               return cache !== undefined && !jQuery.isEmptyObject( cache );
+       }
+};
+var dataPriv = new Data();
+
+var dataUser = new Data();
+
+
+
+//     Implementation Summary
+//
+//     1. Enforce API surface and semantic compatibility with 1.9.x branch
+//     2. Improve the module's maintainability by reducing the storage
+//             paths to a single mechanism.
+//     3. Use the same single mechanism to support "private" and "user" data.
+//     4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+//     5. Avoid exposing implementation details on user objects (eg. expando properties)
+//     6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+       rmultiDash = /[A-Z]/g;
+
+function getData( data ) {
+       if ( data === "true" ) {
+               return true;
+       }
+
+       if ( data === "false" ) {
+               return false;
+       }
+
+       if ( data === "null" ) {
+               return null;
+       }
+
+       // Only convert to a number if it doesn't change the string
+       if ( data === +data + "" ) {
+               return +data;
+       }
+
+       if ( rbrace.test( data ) ) {
+               return JSON.parse( data );
+       }
+
+       return data;
+}
+
+function dataAttr( elem, key, data ) {
+       var name;
+
+       // If nothing was found internally, try to fetch any
+       // data from the HTML5 data-* attribute
+       if ( data === undefined && elem.nodeType === 1 ) {
+               name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
+               data = elem.getAttribute( name );
+
+               if ( typeof data === "string" ) {
+                       try {
+                               data = getData( data );
+                       } catch ( e ) {}
+
+                       // Make sure we set the data so it isn't changed later
+                       dataUser.set( elem, key, data );
+               } else {
+                       data = undefined;
+               }
+       }
+       return data;
+}
+
+jQuery.extend( {
+       hasData: function( elem ) {
+               return dataUser.hasData( elem ) || dataPriv.hasData( elem );
+       },
+
+       data: function( elem, name, data ) {
+               return dataUser.access( elem, name, data );
+       },
+
+       removeData: function( elem, name ) {
+               dataUser.remove( elem, name );
+       },
+
+       // TODO: Now that all calls to _data and _removeData have been replaced
+       // with direct calls to dataPriv methods, these can be deprecated.
+       _data: function( elem, name, data ) {
+               return dataPriv.access( elem, name, data );
+       },
+
+       _removeData: function( elem, name ) {
+               dataPriv.remove( elem, name );
+       }
+} );
+
+jQuery.fn.extend( {
+       data: function( key, value ) {
+               var i, name, data,
+                       elem = this[ 0 ],
+                       attrs = elem && elem.attributes;
+
+               // Gets all values
+               if ( key === undefined ) {
+                       if ( this.length ) {
+                               data = dataUser.get( elem );
+
+                               if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
+                                       i = attrs.length;
+                                       while ( i-- ) {
+
+                                               // Support: IE 11 only
+                                               // The attrs elements can be null (#14894)
+                                               if ( attrs[ i ] ) {
+                                                       name = attrs[ i ].name;
+                                                       if ( name.indexOf( "data-" ) === 0 ) {
+                                                               name = jQuery.camelCase( name.slice( 5 ) );
+                                                               dataAttr( elem, name, data[ name ] );
+                                                       }
+                                               }
+                                       }
+                                       dataPriv.set( elem, "hasDataAttrs", true );
+                               }
+                       }
+
+                       return data;
+               }
+
+               // Sets multiple values
+               if ( typeof key === "object" ) {
+                       return this.each( function() {
+                               dataUser.set( this, key );
+                       } );
+               }
+
+               return access( this, function( value ) {
+                       var data;
+
+                       // The calling jQuery object (element matches) is not empty
+                       // (and therefore has an element appears at this[ 0 ]) and the
+                       // `value` parameter was not undefined. An empty jQuery object
+                       // will result in `undefined` for elem = this[ 0 ] which will
+                       // throw an exception if an attempt to read a data cache is made.
+                       if ( elem && value === undefined ) {
+
+                               // Attempt to get data from the cache
+                               // The key will always be camelCased in Data
+                               data = dataUser.get( elem, key );
+                               if ( data !== undefined ) {
+                                       return data;
+                               }
+
+                               // Attempt to "discover" the data in
+                               // HTML5 custom data-* attrs
+                               data = dataAttr( elem, key );
+                               if ( data !== undefined ) {
+                                       return data;
+                               }
+
+                               // We tried really hard, but the data doesn't exist.
+                               return;
+                       }
+
+                       // Set the data...
+                       this.each( function() {
+
+                               // We always store the camelCased key
+                               dataUser.set( this, key, value );
+                       } );
+               }, null, value, arguments.length > 1, null, true );
+       },
+
+       removeData: function( key ) {
+               return this.each( function() {
+                       dataUser.remove( this, key );
+               } );
+       }
+} );
+
+
+jQuery.extend( {
+       queue: function( elem, type, data ) {
+               var queue;
+
+               if ( elem ) {
+                       type = ( type || "fx" ) + "queue";
+                       queue = dataPriv.get( elem, type );
+
+                       // Speed up dequeue by getting out quickly if this is just a lookup
+                       if ( data ) {
+                               if ( !queue || jQuery.isArray( data ) ) {
+                                       queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+                               } else {
+                                       queue.push( data );
+                               }
+                       }
+                       return queue || [];
+               }
+       },
+
+       dequeue: function( elem, type ) {
+               type = type || "fx";
+
+               var queue = jQuery.queue( elem, type ),
+                       startLength = queue.length,
+                       fn = queue.shift(),
+                       hooks = jQuery._queueHooks( elem, type ),
+                       next = function() {
+                               jQuery.dequeue( elem, type );
+                       };
+
+               // If the fx queue is dequeued, always remove the progress sentinel
+               if ( fn === "inprogress" ) {
+                       fn = queue.shift();
+                       startLength--;
+               }
+
+               if ( fn ) {
+
+                       // Add a progress sentinel to prevent the fx queue from being
+                       // automatically dequeued
+                       if ( type === "fx" ) {
+                               queue.unshift( "inprogress" );
+                       }
+
+                       // Clear up the last queue stop function
+                       delete hooks.stop;
+                       fn.call( elem, next, hooks );
+               }
+
+               if ( !startLength && hooks ) {
+                       hooks.empty.fire();
+               }
+       },
+
+       // Not public - generate a queueHooks object, or return the current one
+       _queueHooks: function( elem, type ) {
+               var key = type + "queueHooks";
+               return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+                       empty: jQuery.Callbacks( "once memory" ).add( function() {
+                               dataPriv.remove( elem, [ type + "queue", key ] );
+                       } )
+               } );
+       }
+} );
+
+jQuery.fn.extend( {
+       queue: function( type, data ) {
+               var setter = 2;
+
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+                       setter--;
+               }
+
+               if ( arguments.length < setter ) {
+                       return jQuery.queue( this[ 0 ], type );
+               }
+
+               return data === undefined ?
+                       this :
+                       this.each( function() {
+                               var queue = jQuery.queue( this, type, data );
+
+                               // Ensure a hooks for this queue
+                               jQuery._queueHooks( this, type );
+
+                               if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
+                                       jQuery.dequeue( this, type );
+                               }
+                       } );
+       },
+       dequeue: function( type ) {
+               return this.each( function() {
+                       jQuery.dequeue( this, type );
+               } );
+       },
+       clearQueue: function( type ) {
+               return this.queue( type || "fx", [] );
+       },
+
+       // Get a promise resolved when queues of a certain type
+       // are emptied (fx is the type by default)
+       promise: function( type, obj ) {
+               var tmp,
+                       count = 1,
+                       defer = jQuery.Deferred(),
+                       elements = this,
+                       i = this.length,
+                       resolve = function() {
+                               if ( !( --count ) ) {
+                                       defer.resolveWith( elements, [ elements ] );
+                               }
+                       };
+
+               if ( typeof type !== "string" ) {
+                       obj = type;
+                       type = undefined;
+               }
+               type = type || "fx";
+
+               while ( i-- ) {
+                       tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
+                       if ( tmp && tmp.empty ) {
+                               count++;
+                               tmp.empty.add( resolve );
+                       }
+               }
+               resolve();
+               return defer.promise( obj );
+       }
+} );
+var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
+
+var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
+
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHiddenWithinTree = function( elem, el ) {
+
+               // isHiddenWithinTree might be called from jQuery#filter function;
+               // in that case, element will be second argument
+               elem = el || elem;
+
+               // Inline style trumps all
+               return elem.style.display === "none" ||
+                       elem.style.display === "" &&
+
+                       // Otherwise, check computed style
+                       // Support: Firefox <=43 - 45
+                       // Disconnected elements can have computed display: none, so first confirm that elem is
+                       // in the document.
+                       jQuery.contains( elem.ownerDocument, elem ) &&
+
+                       jQuery.css( elem, "display" ) === "none";
+       };
+
+var swap = function( elem, options, callback, args ) {
+       var ret, name,
+               old = {};
+
+       // Remember the old values, and insert the new ones
+       for ( name in options ) {
+               old[ name ] = elem.style[ name ];
+               elem.style[ name ] = options[ name ];
+       }
+
+       ret = callback.apply( elem, args || [] );
+
+       // Revert the old values
+       for ( name in options ) {
+               elem.style[ name ] = old[ name ];
+       }
+
+       return ret;
+};
+
+
+
+
+function adjustCSS( elem, prop, valueParts, tween ) {
+       var adjusted,
+               scale = 1,
+               maxIterations = 20,
+               currentValue = tween ?
+                       function() {
+                               return tween.cur();
+                       } :
+                       function() {
+                               return jQuery.css( elem, prop, "" );
+                       },
+               initial = currentValue(),
+               unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+               // Starting value computation is required for potential unit mismatches
+               initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+                       rcssNum.exec( jQuery.css( elem, prop ) );
+
+       if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+
+               // Trust units reported by jQuery.css
+               unit = unit || initialInUnit[ 3 ];
+
+               // Make sure we update the tween properties later on
+               valueParts = valueParts || [];
+
+               // Iteratively approximate from a nonzero starting point
+               initialInUnit = +initial || 1;
+
+               do {
+
+                       // If previous iteration zeroed out, double until we get *something*.
+                       // Use string for doubling so we don't accidentally see scale as unchanged below
+                       scale = scale || ".5";
+
+                       // Adjust and apply
+                       initialInUnit = initialInUnit / scale;
+                       jQuery.style( elem, prop, initialInUnit + unit );
+
+               // Update scale, tolerating zero or NaN from tween.cur()
+               // Break the loop if scale is unchanged or perfect, or if we've just had enough.
+               } while (
+                       scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
+               );
+       }
+
+       if ( valueParts ) {
+               initialInUnit = +initialInUnit || +initial || 0;
+
+               // Apply relative offset (+=/-=) if specified
+               adjusted = valueParts[ 1 ] ?
+                       initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+                       +valueParts[ 2 ];
+               if ( tween ) {
+                       tween.unit = unit;
+                       tween.start = initialInUnit;
+                       tween.end = adjusted;
+               }
+       }
+       return adjusted;
+}
+
+
+var defaultDisplayMap = {};
+
+function getDefaultDisplay( elem ) {
+       var temp,
+               doc = elem.ownerDocument,
+               nodeName = elem.nodeName,
+               display = defaultDisplayMap[ nodeName ];
+
+       if ( display ) {
+               return display;
+       }
+
+       temp = doc.body.appendChild( doc.createElement( nodeName ) );
+       display = jQuery.css( temp, "display" );
+
+       temp.parentNode.removeChild( temp );
+
+       if ( display === "none" ) {
+               display = "block";
+       }
+       defaultDisplayMap[ nodeName ] = display;
+
+       return display;
+}
+
+function showHide( elements, show ) {
+       var display, elem,
+               values = [],
+               index = 0,
+               length = elements.length;
+
+       // Determine new display value for elements that need to change
+       for ( ; index < length; index++ ) {
+               elem = elements[ index ];
+               if ( !elem.style ) {
+                       continue;
+               }
+
+               display = elem.style.display;
+               if ( show ) {
+
+                       // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
+                       // check is required in this first loop unless we have a nonempty display value (either
+                       // inline or about-to-be-restored)
+                       if ( display === "none" ) {
+                               values[ index ] = dataPriv.get( elem, "display" ) || null;
+                               if ( !values[ index ] ) {
+                                       elem.style.display = "";
+                               }
+                       }
+                       if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
+                               values[ index ] = getDefaultDisplay( elem );
+                       }
+               } else {
+                       if ( display !== "none" ) {
+                               values[ index ] = "none";
+
+                               // Remember what we're overwriting
+                               dataPriv.set( elem, "display", display );
+                       }
+               }
+       }
+
+       // Set the display of the elements in a second loop to avoid constant reflow
+       for ( index = 0; index < length; index++ ) {
+               if ( values[ index ] != null ) {
+                       elements[ index ].style.display = values[ index ];
+               }
+       }
+
+       return elements;
+}
+
+jQuery.fn.extend( {
+       show: function() {
+               return showHide( this, true );
+       },
+       hide: function() {
+               return showHide( this );
+       },
+       toggle: function( state ) {
+               if ( typeof state === "boolean" ) {
+                       return state ? this.show() : this.hide();
+               }
+
+               return this.each( function() {
+                       if ( isHiddenWithinTree( this ) ) {
+                               jQuery( this ).show();
+                       } else {
+                               jQuery( this ).hide();
+                       }
+               } );
+       }
+} );
+var rcheckableType = ( /^(?:checkbox|radio)$/i );
+
+var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
+
+var rscriptType = ( /^$|\/(?:java|ecma)script/i );
+
+
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+       // Support: IE <=9 only
+       option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+       // XHTML parsers do not magically insert elements in the
+       // same way that tag soup parsers do. So we cannot shorten
+       // this by omitting <tbody> or other required elements.
+       thead: [ 1, "<table>", "</table>" ],
+       col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+       tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+       td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+       _default: [ 0, "", "" ]
+};
+
+// Support: IE <=9 only
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+
+function getAll( context, tag ) {
+
+       // Support: IE <=9 - 11 only
+       // Use typeof to avoid zero-argument method invocation on host objects (#15151)
+       var ret;
+
+       if ( typeof context.getElementsByTagName !== "undefined" ) {
+               ret = context.getElementsByTagName( tag || "*" );
+
+       } else if ( typeof context.querySelectorAll !== "undefined" ) {
+               ret = context.querySelectorAll( tag || "*" );
+
+       } else {
+               ret = [];
+       }
+
+       if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
+               return jQuery.merge( [ context ], ret );
+       }
+
+       return ret;
+}
+
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+       var i = 0,
+               l = elems.length;
+
+       for ( ; i < l; i++ ) {
+               dataPriv.set(
+                       elems[ i ],
+                       "globalEval",
+                       !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+               );
+       }
+}
+
+
+var rhtml = /<|&#?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+       var elem, tmp, tag, wrap, contains, j,
+               fragment = context.createDocumentFragment(),
+               nodes = [],
+               i = 0,
+               l = elems.length;
+
+       for ( ; i < l; i++ ) {
+               elem = elems[ i ];
+
+               if ( elem || elem === 0 ) {
+
+                       // Add nodes directly
+                       if ( jQuery.type( elem ) === "object" ) {
+
+                               // Support: Android <=4.0 only, PhantomJS 1 only
+                               // push.apply(_, arraylike) throws on ancient WebKit
+                               jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+                       // Convert non-html into a text node
+                       } else if ( !rhtml.test( elem ) ) {
+                               nodes.push( context.createTextNode( elem ) );
+
+                       // Convert html into DOM nodes
+                       } else {
+                               tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+                               // Deserialize a standard representation
+                               tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+                               wrap = wrapMap[ tag ] || wrapMap._default;
+                               tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+                               // Descend through wrappers to the right content
+                               j = wrap[ 0 ];
+                               while ( j-- ) {
+                                       tmp = tmp.lastChild;
+                               }
+
+                               // Support: Android <=4.0 only, PhantomJS 1 only
+                               // push.apply(_, arraylike) throws on ancient WebKit
+                               jQuery.merge( nodes, tmp.childNodes );
+
+                               // Remember the top-level container
+                               tmp = fragment.firstChild;
+
+                               // Ensure the created nodes are orphaned (#12392)
+                               tmp.textContent = "";
+                       }
+               }
+       }
+
+       // Remove wrapper from fragment
+       fragment.textContent = "";
+
+       i = 0;
+       while ( ( elem = nodes[ i++ ] ) ) {
+
+               // Skip elements already in the context collection (trac-4087)
+               if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+                       if ( ignored ) {
+                               ignored.push( elem );
+                       }
+                       continue;
+               }
+
+               contains = jQuery.contains( elem.ownerDocument, elem );
+
+               // Append to fragment
+               tmp = getAll( fragment.appendChild( elem ), "script" );
+
+               // Preserve script evaluation history
+               if ( contains ) {
+                       setGlobalEval( tmp );
+               }
+
+               // Capture executables
+               if ( scripts ) {
+                       j = 0;
+                       while ( ( elem = tmp[ j++ ] ) ) {
+                               if ( rscriptType.test( elem.type || "" ) ) {
+                                       scripts.push( elem );
+                               }
+                       }
+               }
+       }
+
+       return fragment;
+}
+
+
+( function() {
+       var fragment = document.createDocumentFragment(),
+               div = fragment.appendChild( document.createElement( "div" ) ),
+               input = document.createElement( "input" );
+
+       // Support: Android 4.0 - 4.3 only
+       // Check state lost if the name is set (#11217)
+       // Support: Windows Web Apps (WWA)
+       // `name` and `type` must use .setAttribute for WWA (#14901)
+       input.setAttribute( "type", "radio" );
+       input.setAttribute( "checked", "checked" );
+       input.setAttribute( "name", "t" );
+
+       div.appendChild( input );
+
+       // Support: Android <=4.1 only
+       // Older WebKit doesn't clone checked state correctly in fragments
+       support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+       // Support: IE <=11 only
+       // Make sure textarea (and checkbox) defaultValue is properly cloned
+       div.innerHTML = "<textarea>x</textarea>";
+       support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+} )();
+var documentElement = document.documentElement;
+
+
+
+var
+       rkeyEvent = /^key/,
+       rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+       rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+function returnTrue() {
+       return true;
+}
+
+function returnFalse() {
+       return false;
+}
+
+// Support: IE <=9 only
+// See #13393 for more info
+function safeActiveElement() {
+       try {
+               return document.activeElement;
+       } catch ( err ) { }
+}
+
+function on( elem, types, selector, data, fn, one ) {
+       var origFn, type;
+
+       // Types can be a map of types/handlers
+       if ( typeof types === "object" ) {
+
+               // ( types-Object, selector, data )
+               if ( typeof selector !== "string" ) {
+
+                       // ( types-Object, data )
+                       data = data || selector;
+                       selector = undefined;
+               }
+               for ( type in types ) {
+                       on( elem, type, selector, data, types[ type ], one );
+               }
+               return elem;
+       }
+
+       if ( data == null && fn == null ) {
+
+               // ( types, fn )
+               fn = selector;
+               data = selector = undefined;
+       } else if ( fn == null ) {
+               if ( typeof selector === "string" ) {
+
+                       // ( types, selector, fn )
+                       fn = data;
+                       data = undefined;
+               } else {
+
+                       // ( types, data, fn )
+                       fn = data;
+                       data = selector;
+                       selector = undefined;
+               }
+       }
+       if ( fn === false ) {
+               fn = returnFalse;
+       } else if ( !fn ) {
+               return elem;
+       }
+
+       if ( one === 1 ) {
+               origFn = fn;
+               fn = function( event ) {
+
+                       // Can use an empty set, since event contains the info
+                       jQuery().off( event );
+                       return origFn.apply( this, arguments );
+               };
+
+               // Use same guid so caller can remove using origFn
+               fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+       }
+       return elem.each( function() {
+               jQuery.event.add( this, types, fn, data, selector );
+       } );
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+       global: {},
+
+       add: function( elem, types, handler, data, selector ) {
+
+               var handleObjIn, eventHandle, tmp,
+                       events, t, handleObj,
+                       special, handlers, type, namespaces, origType,
+                       elemData = dataPriv.get( elem );
+
+               // Don't attach events to noData or text/comment nodes (but allow plain objects)
+               if ( !elemData ) {
+                       return;
+               }
+
+               // Caller can pass in an object of custom data in lieu of the handler
+               if ( handler.handler ) {
+                       handleObjIn = handler;
+                       handler = handleObjIn.handler;
+                       selector = handleObjIn.selector;
+               }
+
+               // Ensure that invalid selectors throw exceptions at attach time
+               // Evaluate against documentElement in case elem is a non-element node (e.g., document)
+               if ( selector ) {
+                       jQuery.find.matchesSelector( documentElement, selector );
+               }
+
+               // Make sure that the handler has a unique ID, used to find/remove it later
+               if ( !handler.guid ) {
+                       handler.guid = jQuery.guid++;
+               }
+
+               // Init the element's event structure and main handler, if this is the first
+               if ( !( events = elemData.events ) ) {
+                       events = elemData.events = {};
+               }
+               if ( !( eventHandle = elemData.handle ) ) {
+                       eventHandle = elemData.handle = function( e ) {
+
+                               // Discard the second event of a jQuery.event.trigger() and
+                               // when an event is called after a page has unloaded
+                               return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+                                       jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+                       };
+               }
+
+               // Handle multiple events separated by a space
+               types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
+               t = types.length;
+               while ( t-- ) {
+                       tmp = rtypenamespace.exec( types[ t ] ) || [];
+                       type = origType = tmp[ 1 ];
+                       namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+                       // There *must* be a type, no attaching namespace-only handlers
+                       if ( !type ) {
+                               continue;
+                       }
+
+                       // If event changes its type, use the special event handlers for the changed type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // If selector defined, determine special event api type, otherwise given type
+                       type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                       // Update special based on newly reset type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // handleObj is passed to all event handlers
+                       handleObj = jQuery.extend( {
+                               type: type,
+                               origType: origType,
+                               data: data,
+                               handler: handler,
+                               guid: handler.guid,
+                               selector: selector,
+                               needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+                               namespace: namespaces.join( "." )
+                       }, handleObjIn );
+
+                       // Init the event handler queue if we're the first
+                       if ( !( handlers = events[ type ] ) ) {
+                               handlers = events[ type ] = [];
+                               handlers.delegateCount = 0;
+
+                               // Only use addEventListener if the special events handler returns false
+                               if ( !special.setup ||
+                                       special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
+                                       if ( elem.addEventListener ) {
+                                               elem.addEventListener( type, eventHandle );
+                                       }
+                               }
+                       }
+
+                       if ( special.add ) {
+                               special.add.call( elem, handleObj );
+
+                               if ( !handleObj.handler.guid ) {
+                                       handleObj.handler.guid = handler.guid;
+                               }
+                       }
+
+                       // Add to the element's handler list, delegates in front
+                       if ( selector ) {
+                               handlers.splice( handlers.delegateCount++, 0, handleObj );
+                       } else {
+                               handlers.push( handleObj );
+                       }
+
+                       // Keep track of which events have ever been used, for event optimization
+                       jQuery.event.global[ type ] = true;
+               }
+
+       },
+
+       // Detach an event or set of events from an element
+       remove: function( elem, types, handler, selector, mappedTypes ) {
+
+               var j, origCount, tmp,
+                       events, t, handleObj,
+                       special, handlers, type, namespaces, origType,
+                       elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
+
+               if ( !elemData || !( events = elemData.events ) ) {
+                       return;
+               }
+
+               // Once for each type.namespace in types; type may be omitted
+               types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
+               t = types.length;
+               while ( t-- ) {
+                       tmp = rtypenamespace.exec( types[ t ] ) || [];
+                       type = origType = tmp[ 1 ];
+                       namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+                       // Unbind all events (on this namespace, if provided) for the element
+                       if ( !type ) {
+                               for ( type in events ) {
+                                       jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+                               }
+                               continue;
+                       }
+
+                       special = jQuery.event.special[ type ] || {};
+                       type = ( selector ? special.delegateType : special.bindType ) || type;
+                       handlers = events[ type ] || [];
+                       tmp = tmp[ 2 ] &&
+                               new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
+
+                       // Remove matching events
+                       origCount = j = handlers.length;
+                       while ( j-- ) {
+                               handleObj = handlers[ j ];
+
+                               if ( ( mappedTypes || origType === handleObj.origType ) &&
+                                       ( !handler || handler.guid === handleObj.guid ) &&
+                                       ( !tmp || tmp.test( handleObj.namespace ) ) &&
+                                       ( !selector || selector === handleObj.selector ||
+                                               selector === "**" && handleObj.selector ) ) {
+                                       handlers.splice( j, 1 );
+
+                                       if ( handleObj.selector ) {
+                                               handlers.delegateCount--;
+                                       }
+                                       if ( special.remove ) {
+                                               special.remove.call( elem, handleObj );
+                                       }
+                               }
+                       }
+
+                       // Remove generic event handler if we removed something and no more handlers exist
+                       // (avoids potential for endless recursion during removal of special event handlers)
+                       if ( origCount && !handlers.length ) {
+                               if ( !special.teardown ||
+                                       special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
+                                       jQuery.removeEvent( elem, type, elemData.handle );
+                               }
+
+                               delete events[ type ];
+                       }
+               }
+
+               // Remove data and the expando if it's no longer used
+               if ( jQuery.isEmptyObject( events ) ) {
+                       dataPriv.remove( elem, "handle events" );
+               }
+       },
+
+       dispatch: function( nativeEvent ) {
+
+               // Make a writable jQuery.Event from the native event object
+               var event = jQuery.event.fix( nativeEvent );
+
+               var i, j, ret, matched, handleObj, handlerQueue,
+                       args = new Array( arguments.length ),
+                       handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
+                       special = jQuery.event.special[ event.type ] || {};
+
+               // Use the fix-ed jQuery.Event rather than the (read-only) native event
+               args[ 0 ] = event;
+
+               for ( i = 1; i < arguments.length; i++ ) {
+                       args[ i ] = arguments[ i ];
+               }
+
+               event.delegateTarget = this;
+
+               // Call the preDispatch hook for the mapped type, and let it bail if desired
+               if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+                       return;
+               }
+
+               // Determine handlers
+               handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+               // Run delegates first; they may want to stop propagation beneath us
+               i = 0;
+               while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
+                       event.currentTarget = matched.elem;
+
+                       j = 0;
+                       while ( ( handleObj = matched.handlers[ j++ ] ) &&
+                               !event.isImmediatePropagationStopped() ) {
+
+                               // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+                               // a subset or equal to those in the bound event (both can have no namespace).
+                               if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
+
+                                       event.handleObj = handleObj;
+                                       event.data = handleObj.data;
+
+                                       ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
+                                               handleObj.handler ).apply( matched.elem, args );
+
+                                       if ( ret !== undefined ) {
+                                               if ( ( event.result = ret ) === false ) {
+                                                       event.preventDefault();
+                                                       event.stopPropagation();
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               // Call the postDispatch hook for the mapped type
+               if ( special.postDispatch ) {
+                       special.postDispatch.call( this, event );
+               }
+
+               return event.result;
+       },
+
+       handlers: function( event, handlers ) {
+               var i, handleObj, sel, matchedHandlers, matchedSelectors,
+                       handlerQueue = [],
+                       delegateCount = handlers.delegateCount,
+                       cur = event.target;
+
+               // Find delegate handlers
+               if ( delegateCount &&
+
+                       // Support: IE <=9
+                       // Black-hole SVG <use> instance trees (trac-13180)
+                       cur.nodeType &&
+
+                       // Support: Firefox <=42
+                       // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
+                       // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
+                       // Support: IE 11 only
+                       // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
+                       !( event.type === "click" && event.button >= 1 ) ) {
+
+                       for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+                               // Don't check non-elements (#13208)
+                               // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+                               if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
+                                       matchedHandlers = [];
+                                       matchedSelectors = {};
+                                       for ( i = 0; i < delegateCount; i++ ) {
+                                               handleObj = handlers[ i ];
+
+                                               // Don't conflict with Object.prototype properties (#13203)
+                                               sel = handleObj.selector + " ";
+
+                                               if ( matchedSelectors[ sel ] === undefined ) {
+                                                       matchedSelectors[ sel ] = handleObj.needsContext ?
+                                                               jQuery( sel, this ).index( cur ) > -1 :
+                                                               jQuery.find( sel, this, null, [ cur ] ).length;
+                                               }
+                                               if ( matchedSelectors[ sel ] ) {
+                                                       matchedHandlers.push( handleObj );
+                                               }
+                                       }
+                                       if ( matchedHandlers.length ) {
+                                               handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
+                                       }
+                               }
+                       }
+               }
+
+               // Add the remaining (directly-bound) handlers
+               cur = this;
+               if ( delegateCount < handlers.length ) {
+                       handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
+               }
+
+               return handlerQueue;
+       },
+
+       addProp: function( name, hook ) {
+               Object.defineProperty( jQuery.Event.prototype, name, {
+                       enumerable: true,
+                       configurable: true,
+
+                       get: jQuery.isFunction( hook ) ?
+                               function() {
+                                       if ( this.originalEvent ) {
+                                                       return hook( this.originalEvent );
+                                       }
+                               } :
+                               function() {
+                                       if ( this.originalEvent ) {
+                                                       return this.originalEvent[ name ];
+                                       }
+                               },
+
+                       set: function( value ) {
+                               Object.defineProperty( this, name, {
+                                       enumerable: true,
+                                       configurable: true,
+                                       writable: true,
+                                       value: value
+                               } );
+                       }
+               } );
+       },
+
+       fix: function( originalEvent ) {
+               return originalEvent[ jQuery.expando ] ?
+                       originalEvent :
+                       new jQuery.Event( originalEvent );
+       },
+
+       special: {
+               load: {
+
+                       // Prevent triggered image.load events from bubbling to window.load
+                       noBubble: true
+               },
+               focus: {
+
+                       // Fire native event if possible so blur/focus sequence is correct
+                       trigger: function() {
+                               if ( this !== safeActiveElement() && this.focus ) {
+                                       this.focus();
+                                       return false;
+                               }
+                       },
+                       delegateType: "focusin"
+               },
+               blur: {
+                       trigger: function() {
+                               if ( this === safeActiveElement() && this.blur ) {
+                                       this.blur();
+                                       return false;
+                               }
+                       },
+                       delegateType: "focusout"
+               },
+               click: {
+
+                       // For checkbox, fire native event so checked state will be right
+                       trigger: function() {
+                               if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+                                       this.click();
+                                       return false;
+                               }
+                       },
+
+                       // For cross-browser consistency, don't fire native .click() on links
+                       _default: function( event ) {
+                               return jQuery.nodeName( event.target, "a" );
+                       }
+               },
+
+               beforeunload: {
+                       postDispatch: function( event ) {
+
+                               // Support: Firefox 20+
+                               // Firefox doesn't alert if the returnValue field is not set.
+                               if ( event.result !== undefined && event.originalEvent ) {
+                                       event.originalEvent.returnValue = event.result;
+                               }
+                       }
+               }
+       }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+
+       // This "if" is needed for plain objects
+       if ( elem.removeEventListener ) {
+               elem.removeEventListener( type, handle );
+       }
+};
+
+jQuery.Event = function( src, props ) {
+
+       // Allow instantiation without the 'new' keyword
+       if ( !( this instanceof jQuery.Event ) ) {
+               return new jQuery.Event( src, props );
+       }
+
+       // Event object
+       if ( src && src.type ) {
+               this.originalEvent = src;
+               this.type = src.type;
+
+               // Events bubbling up the document may have been marked as prevented
+               // by a handler lower down the tree; reflect the correct value.
+               this.isDefaultPrevented = src.defaultPrevented ||
+                               src.defaultPrevented === undefined &&
+
+                               // Support: Android <=2.3 only
+                               src.returnValue === false ?
+                       returnTrue :
+                       returnFalse;
+
+               // Create target properties
+               // Support: Safari <=6 - 7 only
+               // Target should not be a text node (#504, #13143)
+               this.target = ( src.target && src.target.nodeType === 3 ) ?
+                       src.target.parentNode :
+                       src.target;
+
+               this.currentTarget = src.currentTarget;
+               this.relatedTarget = src.relatedTarget;
+
+       // Event type
+       } else {
+               this.type = src;
+       }
+
+       // Put explicitly provided properties onto the event object
+       if ( props ) {
+               jQuery.extend( this, props );
+       }
+
+       // Create a timestamp if incoming event doesn't have one
+       this.timeStamp = src && src.timeStamp || jQuery.now();
+
+       // Mark it as fixed
+       this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+       constructor: jQuery.Event,
+       isDefaultPrevented: returnFalse,
+       isPropagationStopped: returnFalse,
+       isImmediatePropagationStopped: returnFalse,
+       isSimulated: false,
+
+       preventDefault: function() {
+               var e = this.originalEvent;
+
+               this.isDefaultPrevented = returnTrue;
+
+               if ( e && !this.isSimulated ) {
+                       e.preventDefault();
+               }
+       },
+       stopPropagation: function() {
+               var e = this.originalEvent;
+
+               this.isPropagationStopped = returnTrue;
+
+               if ( e && !this.isSimulated ) {
+                       e.stopPropagation();
+               }
+       },
+       stopImmediatePropagation: function() {
+               var e = this.originalEvent;
+
+               this.isImmediatePropagationStopped = returnTrue;
+
+               if ( e && !this.isSimulated ) {
+                       e.stopImmediatePropagation();
+               }
+
+               this.stopPropagation();
+       }
+};
+
+// Includes all common event props including KeyEvent and MouseEvent specific props
+jQuery.each( {
+       altKey: true,
+       bubbles: true,
+       cancelable: true,
+       changedTouches: true,
+       ctrlKey: true,
+       detail: true,
+       eventPhase: true,
+       metaKey: true,
+       pageX: true,
+       pageY: true,
+       shiftKey: true,
+       view: true,
+       "char": true,
+       charCode: true,
+       key: true,
+       keyCode: true,
+       button: true,
+       buttons: true,
+       clientX: true,
+       clientY: true,
+       offsetX: true,
+       offsetY: true,
+       pointerId: true,
+       pointerType: true,
+       screenX: true,
+       screenY: true,
+       targetTouches: true,
+       toElement: true,
+       touches: true,
+
+       which: function( event ) {
+               var button = event.button;
+
+               // Add which for key events
+               if ( event.which == null && rkeyEvent.test( event.type ) ) {
+                       return event.charCode != null ? event.charCode : event.keyCode;
+               }
+
+               // Add which for click: 1 === left; 2 === middle; 3 === right
+               if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
+                       if ( button & 1 ) {
+                               return 1;
+                       }
+
+                       if ( button & 2 ) {
+                               return 3;
+                       }
+
+                       if ( button & 4 ) {
+                               return 2;
+                       }
+
+                       return 0;
+               }
+
+               return event.which;
+       }
+}, jQuery.event.addProp );
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+jQuery.each( {
+       mouseenter: "mouseover",
+       mouseleave: "mouseout",
+       pointerenter: "pointerover",
+       pointerleave: "pointerout"
+}, function( orig, fix ) {
+       jQuery.event.special[ orig ] = {
+               delegateType: fix,
+               bindType: fix,
+
+               handle: function( event ) {
+                       var ret,
+                               target = this,
+                               related = event.relatedTarget,
+                               handleObj = event.handleObj;
+
+                       // For mouseenter/leave call the handler if related is outside the target.
+                       // NB: No relatedTarget if the mouse left/entered the browser window
+                       if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
+                               event.type = handleObj.origType;
+                               ret = handleObj.handler.apply( this, arguments );
+                               event.type = fix;
+                       }
+                       return ret;
+               }
+       };
+} );
+
+jQuery.fn.extend( {
+
+       on: function( types, selector, data, fn ) {
+               return on( this, types, selector, data, fn );
+       },
+       one: function( types, selector, data, fn ) {
+               return on( this, types, selector, data, fn, 1 );
+       },
+       off: function( types, selector, fn ) {
+               var handleObj, type;
+               if ( types && types.preventDefault && types.handleObj ) {
+
+                       // ( event )  dispatched jQuery.Event
+                       handleObj = types.handleObj;
+                       jQuery( types.delegateTarget ).off(
+                               handleObj.namespace ?
+                                       handleObj.origType + "." + handleObj.namespace :
+                                       handleObj.origType,
+                               handleObj.selector,
+                               handleObj.handler
+                       );
+                       return this;
+               }
+               if ( typeof types === "object" ) {
+
+                       // ( types-object [, selector] )
+                       for ( type in types ) {
+                               this.off( type, selector, types[ type ] );
+                       }
+                       return this;
+               }
+               if ( selector === false || typeof selector === "function" ) {
+
+                       // ( types [, fn] )
+                       fn = selector;
+                       selector = undefined;
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               }
+               return this.each( function() {
+                       jQuery.event.remove( this, types, fn, selector );
+               } );
+       }
+} );
+
+
+var
+
+       /* eslint-disable max-len */
+
+       // See https://github.com/eslint/eslint/issues/3229
+       rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
+
+       /* eslint-enable */
+
+       // Support: IE <=10 - 11, Edge 12 - 13
+       // In IE/Edge using regex groups here causes severe slowdowns.
+       // See https://connect.microsoft.com/IE/feedback/details/1736512/
+       rnoInnerhtml = /<script|<style|<link/i,
+
+       // checked="checked" or checked
+       rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+       rscriptTypeMasked = /^true\/(.*)/,
+       rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
+
+function manipulationTarget( elem, content ) {
+       if ( jQuery.nodeName( elem, "table" ) &&
+               jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
+
+               return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
+       }
+
+       return elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+       elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
+       return elem;
+}
+function restoreScript( elem ) {
+       var match = rscriptTypeMasked.exec( elem.type );
+
+       if ( match ) {
+               elem.type = match[ 1 ];
+       } else {
+               elem.removeAttribute( "type" );
+       }
+
+       return elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+       var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+       if ( dest.nodeType !== 1 ) {
+               return;
+       }
+
+       // 1. Copy private data: events, handlers, etc.
+       if ( dataPriv.hasData( src ) ) {
+               pdataOld = dataPriv.access( src );
+               pdataCur = dataPriv.set( dest, pdataOld );
+               events = pdataOld.events;
+
+               if ( events ) {
+                       delete pdataCur.handle;
+                       pdataCur.events = {};
+
+                       for ( type in events ) {
+                               for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+                                       jQuery.event.add( dest, type, events[ type ][ i ] );
+                               }
+                       }
+               }
+       }
+
+       // 2. Copy user data
+       if ( dataUser.hasData( src ) ) {
+               udataOld = dataUser.access( src );
+               udataCur = jQuery.extend( {}, udataOld );
+
+               dataUser.set( dest, udataCur );
+       }
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+       var nodeName = dest.nodeName.toLowerCase();
+
+       // Fails to persist the checked state of a cloned checkbox or radio button.
+       if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+               dest.checked = src.checked;
+
+       // Fails to return the selected option to the default selected state when cloning options
+       } else if ( nodeName === "input" || nodeName === "textarea" ) {
+               dest.defaultValue = src.defaultValue;
+       }
+}
+
+function domManip( collection, args, callback, ignored ) {
+
+       // Flatten any nested arrays
+       args = concat.apply( [], args );
+
+       var fragment, first, scripts, hasScripts, node, doc,
+               i = 0,
+               l = collection.length,
+               iNoClone = l - 1,
+               value = args[ 0 ],
+               isFunction = jQuery.isFunction( value );
+
+       // We can't cloneNode fragments that contain checked, in WebKit
+       if ( isFunction ||
+                       ( l > 1 && typeof value === "string" &&
+                               !support.checkClone && rchecked.test( value ) ) ) {
+               return collection.each( function( index ) {
+                       var self = collection.eq( index );
+                       if ( isFunction ) {
+                               args[ 0 ] = value.call( this, index, self.html() );
+                       }
+                       domManip( self, args, callback, ignored );
+               } );
+       }
+
+       if ( l ) {
+               fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
+               first = fragment.firstChild;
+
+               if ( fragment.childNodes.length === 1 ) {
+                       fragment = first;
+               }
+
+               // Require either new content or an interest in ignored elements to invoke the callback
+               if ( first || ignored ) {
+                       scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+                       hasScripts = scripts.length;
+
+                       // Use the original fragment for the last item
+                       // instead of the first because it can end up
+                       // being emptied incorrectly in certain situations (#8070).
+                       for ( ; i < l; i++ ) {
+                               node = fragment;
+
+                               if ( i !== iNoClone ) {
+                                       node = jQuery.clone( node, true, true );
+
+                                       // Keep references to cloned scripts for later restoration
+                                       if ( hasScripts ) {
+
+                                               // Support: Android <=4.0 only, PhantomJS 1 only
+                                               // push.apply(_, arraylike) throws on ancient WebKit
+                                               jQuery.merge( scripts, getAll( node, "script" ) );
+                                       }
+                               }
+
+                               callback.call( collection[ i ], node, i );
+                       }
+
+                       if ( hasScripts ) {
+                               doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+                               // Reenable scripts
+                               jQuery.map( scripts, restoreScript );
+
+                               // Evaluate executable scripts on first document insertion
+                               for ( i = 0; i < hasScripts; i++ ) {
+                                       node = scripts[ i ];
+                                       if ( rscriptType.test( node.type || "" ) &&
+                                               !dataPriv.access( node, "globalEval" ) &&
+                                               jQuery.contains( doc, node ) ) {
+
+                                               if ( node.src ) {
+
+                                                       // Optional AJAX dependency, but won't run scripts if not present
+                                                       if ( jQuery._evalUrl ) {
+                                                               jQuery._evalUrl( node.src );
+                                                       }
+                                               } else {
+                                                       DOMEval( node.textContent.replace( rcleanScript, "" ), doc );
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
+       return collection;
+}
+
+function remove( elem, selector, keepData ) {
+       var node,
+               nodes = selector ? jQuery.filter( selector, elem ) : elem,
+               i = 0;
+
+       for ( ; ( node = nodes[ i ] ) != null; i++ ) {
+               if ( !keepData && node.nodeType === 1 ) {
+                       jQuery.cleanData( getAll( node ) );
+               }
+
+               if ( node.parentNode ) {
+                       if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
+                               setGlobalEval( getAll( node, "script" ) );
+                       }
+                       node.parentNode.removeChild( node );
+               }
+       }
+
+       return elem;
+}
+
+jQuery.extend( {
+       htmlPrefilter: function( html ) {
+               return html.replace( rxhtmlTag, "<$1></$2>" );
+       },
+
+       clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+               var i, l, srcElements, destElements,
+                       clone = elem.cloneNode( true ),
+                       inPage = jQuery.contains( elem.ownerDocument, elem );
+
+               // Fix IE cloning issues
+               if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+                               !jQuery.isXMLDoc( elem ) ) {
+
+                       // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
+                       destElements = getAll( clone );
+                       srcElements = getAll( elem );
+
+                       for ( i = 0, l = srcElements.length; i < l; i++ ) {
+                               fixInput( srcElements[ i ], destElements[ i ] );
+                       }
+               }
+
+               // Copy the events from the original to the clone
+               if ( dataAndEvents ) {
+                       if ( deepDataAndEvents ) {
+                               srcElements = srcElements || getAll( elem );
+                               destElements = destElements || getAll( clone );
+
+                               for ( i = 0, l = srcElements.length; i < l; i++ ) {
+                                       cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+                               }
+                       } else {
+                               cloneCopyEvent( elem, clone );
+                       }
+               }
+
+               // Preserve script evaluation history
+               destElements = getAll( clone, "script" );
+               if ( destElements.length > 0 ) {
+                       setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+               }
+
+               // Return the cloned set
+               return clone;
+       },
+
+       cleanData: function( elems ) {
+               var data, elem, type,
+                       special = jQuery.event.special,
+                       i = 0;
+
+               for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
+                       if ( acceptData( elem ) ) {
+                               if ( ( data = elem[ dataPriv.expando ] ) ) {
+                                       if ( data.events ) {
+                                               for ( type in data.events ) {
+                                                       if ( special[ type ] ) {
+                                                               jQuery.event.remove( elem, type );
+
+                                                       // This is a shortcut to avoid jQuery.event.remove's overhead
+                                                       } else {
+                                                               jQuery.removeEvent( elem, type, data.handle );
+                                                       }
+                                               }
+                                       }
+
+                                       // Support: Chrome <=35 - 45+
+                                       // Assign undefined instead of using delete, see Data#remove
+                                       elem[ dataPriv.expando ] = undefined;
+                               }
+                               if ( elem[ dataUser.expando ] ) {
+
+                                       // Support: Chrome <=35 - 45+
+                                       // Assign undefined instead of using delete, see Data#remove
+                                       elem[ dataUser.expando ] = undefined;
+                               }
+                       }
+               }
+       }
+} );
+
+jQuery.fn.extend( {
+       detach: function( selector ) {
+               return remove( this, selector, true );
+       },
+
+       remove: function( selector ) {
+               return remove( this, selector );
+       },
+
+       text: function( value ) {
+               return access( this, function( value ) {
+                       return value === undefined ?
+                               jQuery.text( this ) :
+                               this.empty().each( function() {
+                                       if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+                                               this.textContent = value;
+                                       }
+                               } );
+               }, null, value, arguments.length );
+       },
+
+       append: function() {
+               return domManip( this, arguments, function( elem ) {
+                       if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+                               var target = manipulationTarget( this, elem );
+                               target.appendChild( elem );
+                       }
+               } );
+       },
+
+       prepend: function() {
+               return domManip( this, arguments, function( elem ) {
+                       if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+                               var target = manipulationTarget( this, elem );
+                               target.insertBefore( elem, target.firstChild );
+                       }
+               } );
+       },
+
+       before: function() {
+               return domManip( this, arguments, function( elem ) {
+                       if ( this.parentNode ) {
+                               this.parentNode.insertBefore( elem, this );
+                       }
+               } );
+       },
+
+       after: function() {
+               return domManip( this, arguments, function( elem ) {
+                       if ( this.parentNode ) {
+                               this.parentNode.insertBefore( elem, this.nextSibling );
+                       }
+               } );
+       },
+
+       empty: function() {
+               var elem,
+                       i = 0;
+
+               for ( ; ( elem = this[ i ] ) != null; i++ ) {
+                       if ( elem.nodeType === 1 ) {
+
+                               // Prevent memory leaks
+                               jQuery.cleanData( getAll( elem, false ) );
+
+                               // Remove any remaining nodes
+                               elem.textContent = "";
+                       }
+               }
+
+               return this;
+       },
+
+       clone: function( dataAndEvents, deepDataAndEvents ) {
+               dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+               deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+               return this.map( function() {
+                       return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+               } );
+       },
+
+       html: function( value ) {
+               return access( this, function( value ) {
+                       var elem = this[ 0 ] || {},
+                               i = 0,
+                               l = this.length;
+
+                       if ( value === undefined && elem.nodeType === 1 ) {
+                               return elem.innerHTML;
+                       }
+
+                       // See if we can take a shortcut and just use innerHTML
+                       if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+                               !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+                               value = jQuery.htmlPrefilter( value );
+
+                               try {
+                                       for ( ; i < l; i++ ) {
+                                               elem = this[ i ] || {};
+
+                                               // Remove element nodes and prevent memory leaks
+                                               if ( elem.nodeType === 1 ) {
+                                                       jQuery.cleanData( getAll( elem, false ) );
+                                                       elem.innerHTML = value;
+                                               }
+                                       }
+
+                                       elem = 0;
+
+                               // If using innerHTML throws an exception, use the fallback method
+                               } catch ( e ) {}
+                       }
+
+                       if ( elem ) {
+                               this.empty().append( value );
+                       }
+               }, null, value, arguments.length );
+       },
+
+       replaceWith: function() {
+               var ignored = [];
+
+               // Make the changes, replacing each non-ignored context element with the new content
+               return domManip( this, arguments, function( elem ) {
+                       var parent = this.parentNode;
+
+                       if ( jQuery.inArray( this, ignored ) < 0 ) {
+                               jQuery.cleanData( getAll( this ) );
+                               if ( parent ) {
+                                       parent.replaceChild( elem, this );
+                               }
+                       }
+
+               // Force callback invocation
+               }, ignored );
+       }
+} );
+
+jQuery.each( {
+       appendTo: "append",
+       prependTo: "prepend",
+       insertBefore: "before",
+       insertAfter: "after",
+       replaceAll: "replaceWith"
+}, function( name, original ) {
+       jQuery.fn[ name ] = function( selector ) {
+               var elems,
+                       ret = [],
+                       insert = jQuery( selector ),
+                       last = insert.length - 1,
+                       i = 0;
+
+               for ( ; i <= last; i++ ) {
+                       elems = i === last ? this : this.clone( true );
+                       jQuery( insert[ i ] )[ original ]( elems );
+
+                       // Support: Android <=4.0 only, PhantomJS 1 only
+                       // .get() because push.apply(_, arraylike) throws on ancient WebKit
+                       push.apply( ret, elems.get() );
+               }
+
+               return this.pushStack( ret );
+       };
+} );
+var rmargin = ( /^margin/ );
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+var getStyles = function( elem ) {
+
+               // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
+               // IE throws on elements created in popups
+               // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+               var view = elem.ownerDocument.defaultView;
+
+               if ( !view || !view.opener ) {
+                       view = window;
+               }
+
+               return view.getComputedStyle( elem );
+       };
+
+
+
+( function() {
+
+       // Executing both pixelPosition & boxSizingReliable tests require only one layout
+       // so they're executed at the same time to save the second computation.
+       function computeStyleTests() {
+
+               // This is a singleton, we need to execute it only once
+               if ( !div ) {
+                       return;
+               }
+
+               div.style.cssText =
+                       "box-sizing:border-box;" +
+                       "position:relative;display:block;" +
+                       "margin:auto;border:1px;padding:1px;" +
+                       "top:1%;width:50%";
+               div.innerHTML = "";
+               documentElement.appendChild( container );
+
+               var divStyle = window.getComputedStyle( div );
+               pixelPositionVal = divStyle.top !== "1%";
+
+               // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
+               reliableMarginLeftVal = divStyle.marginLeft === "2px";
+               boxSizingReliableVal = divStyle.width === "4px";
+
+               // Support: Android 4.0 - 4.3 only
+               // Some styles come back with percentage values, even though they shouldn't
+               div.style.marginRight = "50%";
+               pixelMarginRightVal = divStyle.marginRight === "4px";
+
+               documentElement.removeChild( container );
+
+               // Nullify the div so it wouldn't be stored in the memory and
+               // it will also be a sign that checks already performed
+               div = null;
+       }
+
+       var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
+               container = document.createElement( "div" ),
+               div = document.createElement( "div" );
+
+       // Finish early in limited (non-browser) environments
+       if ( !div.style ) {
+               return;
+       }
+
+       // Support: IE <=9 - 11 only
+       // Style of cloned element affects source element cloned (#8908)
+       div.style.backgroundClip = "content-box";
+       div.cloneNode( true ).style.backgroundClip = "";
+       support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+       container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
+               "padding:0;margin-top:1px;position:absolute";
+       container.appendChild( div );
+
+       jQuery.extend( support, {
+               pixelPosition: function() {
+                       computeStyleTests();
+                       return pixelPositionVal;
+               },
+               boxSizingReliable: function() {
+                       computeStyleTests();
+                       return boxSizingReliableVal;
+               },
+               pixelMarginRight: function() {
+                       computeStyleTests();
+                       return pixelMarginRightVal;
+               },
+               reliableMarginLeft: function() {
+                       computeStyleTests();
+                       return reliableMarginLeftVal;
+               }
+       } );
+} )();
+
+
+function curCSS( elem, name, computed ) {
+       var width, minWidth, maxWidth, ret,
+               style = elem.style;
+
+       computed = computed || getStyles( elem );
+
+       // Support: IE <=9 only
+       // getPropertyValue is only needed for .css('filter') (#12537)
+       if ( computed ) {
+               ret = computed.getPropertyValue( name ) || computed[ name ];
+
+               if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+                       ret = jQuery.style( elem, name );
+               }
+
+               // A tribute to the "awesome hack by Dean Edwards"
+               // Android Browser returns percentage for some values,
+               // but width seems to be reliably pixels.
+               // This is against the CSSOM draft spec:
+               // https://drafts.csswg.org/cssom/#resolved-values
+               if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+                       // Remember the original values
+                       width = style.width;
+                       minWidth = style.minWidth;
+                       maxWidth = style.maxWidth;
+
+                       // Put in the new values to get a computed value out
+                       style.minWidth = style.maxWidth = style.width = ret;
+                       ret = computed.width;
+
+                       // Revert the changed values
+                       style.width = width;
+                       style.minWidth = minWidth;
+                       style.maxWidth = maxWidth;
+               }
+       }
+
+       return ret !== undefined ?
+
+               // Support: IE <=9 - 11 only
+               // IE returns zIndex value as an integer.
+               ret + "" :
+               ret;
+}
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+
+       // Define the hook, we'll check on the first run if it's really needed.
+       return {
+               get: function() {
+                       if ( conditionFn() ) {
+
+                               // Hook not needed (or it's not possible to use it due
+                               // to missing dependency), remove it.
+                               delete this.get;
+                               return;
+                       }
+
+                       // Hook needed; redefine it so that the support test is not executed again.
+                       return ( this.get = hookFn ).apply( this, arguments );
+               }
+       };
+}
+
+
+var
+
+       // Swappable if display is none or starts with table
+       // except "table", "table-cell", or "table-caption"
+       // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+       rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+       cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+       cssNormalTransform = {
+               letterSpacing: "0",
+               fontWeight: "400"
+       },
+
+       cssPrefixes = [ "Webkit", "Moz", "ms" ],
+       emptyStyle = document.createElement( "div" ).style;
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( name ) {
+
+       // Shortcut for names that are not vendor prefixed
+       if ( name in emptyStyle ) {
+               return name;
+       }
+
+       // Check for vendor prefixed names
+       var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
+               i = cssPrefixes.length;
+
+       while ( i-- ) {
+               name = cssPrefixes[ i ] + capName;
+               if ( name in emptyStyle ) {
+                       return name;
+               }
+       }
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+
+       // Any relative (+/-) values have already been
+       // normalized at this point
+       var matches = rcssNum.exec( value );
+       return matches ?
+
+               // Guard against undefined "subtract", e.g., when used as in cssHooks
+               Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
+               value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+       var i,
+               val = 0;
+
+       // If we already have the right measurement, avoid augmentation
+       if ( extra === ( isBorderBox ? "border" : "content" ) ) {
+               i = 4;
+
+       // Otherwise initialize for horizontal or vertical properties
+       } else {
+               i = name === "width" ? 1 : 0;
+       }
+
+       for ( ; i < 4; i += 2 ) {
+
+               // Both box models exclude margin, so add it if we want it
+               if ( extra === "margin" ) {
+                       val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+               }
+
+               if ( isBorderBox ) {
+
+                       // border-box includes padding, so remove it if we want content
+                       if ( extra === "content" ) {
+                               val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+                       }
+
+                       // At this point, extra isn't border nor margin, so remove border
+                       if ( extra !== "margin" ) {
+                               val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+                       }
+               } else {
+
+                       // At this point, extra isn't content, so add padding
+                       val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+                       // At this point, extra isn't content nor padding, so add border
+                       if ( extra !== "padding" ) {
+                               val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+                       }
+               }
+       }
+
+       return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+       // Start with offset property, which is equivalent to the border-box value
+       var val,
+               valueIsBorderBox = true,
+               styles = getStyles( elem ),
+               isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+       // Support: IE <=11 only
+       // Running getBoundingClientRect on a disconnected node
+       // in IE throws an error.
+       if ( elem.getClientRects().length ) {
+               val = elem.getBoundingClientRect()[ name ];
+       }
+
+       // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+       // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+       // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+       if ( val <= 0 || val == null ) {
+
+               // Fall back to computed then uncomputed css if necessary
+               val = curCSS( elem, name, styles );
+               if ( val < 0 || val == null ) {
+                       val = elem.style[ name ];
+               }
+
+               // Computed unit is not pixels. Stop here and return.
+               if ( rnumnonpx.test( val ) ) {
+                       return val;
+               }
+
+               // Check for style in case a browser which returns unreliable values
+               // for getComputedStyle silently falls back to the reliable elem.style
+               valueIsBorderBox = isBorderBox &&
+                       ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+               // Normalize "", auto, and prepare for extra
+               val = parseFloat( val ) || 0;
+       }
+
+       // Use the active box-sizing model to add/subtract irrelevant styles
+       return ( val +
+               augmentWidthOrHeight(
+                       elem,
+                       name,
+                       extra || ( isBorderBox ? "border" : "content" ),
+                       valueIsBorderBox,
+                       styles
+               )
+       ) + "px";
+}
+
+jQuery.extend( {
+
+       // Add in style property hooks for overriding the default
+       // behavior of getting and setting a style property
+       cssHooks: {
+               opacity: {
+                       get: function( elem, computed ) {
+                               if ( computed ) {
+
+                                       // We should always get a number back from opacity
+                                       var ret = curCSS( elem, "opacity" );
+                                       return ret === "" ? "1" : ret;
+                               }
+                       }
+               }
+       },
+
+       // Don't automatically add "px" to these possibly-unitless properties
+       cssNumber: {
+               "animationIterationCount": true,
+               "columnCount": true,
+               "fillOpacity": true,
+               "flexGrow": true,
+               "flexShrink": true,
+               "fontWeight": true,
+               "lineHeight": true,
+               "opacity": true,
+               "order": true,
+               "orphans": true,
+               "widows": true,
+               "zIndex": true,
+               "zoom": true
+       },
+
+       // Add in properties whose names you wish to fix before
+       // setting or getting the value
+       cssProps: {
+               "float": "cssFloat"
+       },
+
+       // Get and set the style property on a DOM Node
+       style: function( elem, name, value, extra ) {
+
+               // Don't set styles on text and comment nodes
+               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                       return;
+               }
+
+               // Make sure that we're working with the right name
+               var ret, type, hooks,
+                       origName = jQuery.camelCase( name ),
+                       style = elem.style;
+
+               name = jQuery.cssProps[ origName ] ||
+                       ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+               // Gets hook for the prefixed version, then unprefixed version
+               hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+               // Check if we're setting a value
+               if ( value !== undefined ) {
+                       type = typeof value;
+
+                       // Convert "+=" or "-=" to relative numbers (#7345)
+                       if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
+                               value = adjustCSS( elem, name, ret );
+
+                               // Fixes bug #9237
+                               type = "number";
+                       }
+
+                       // Make sure that null and NaN values aren't set (#7116)
+                       if ( value == null || value !== value ) {
+                               return;
+                       }
+
+                       // If a number was passed in, add the unit (except for certain CSS properties)
+                       if ( type === "number" ) {
+                               value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
+                       }
+
+                       // background-* props affect original clone's values
+                       if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+                               style[ name ] = "inherit";
+                       }
+
+                       // If a hook was provided, use that value, otherwise just set the specified value
+                       if ( !hooks || !( "set" in hooks ) ||
+                               ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
+
+                               style[ name ] = value;
+                       }
+
+               } else {
+
+                       // If a hook was provided get the non-computed value from there
+                       if ( hooks && "get" in hooks &&
+                               ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
+
+                               return ret;
+                       }
+
+                       // Otherwise just get the value from the style object
+                       return style[ name ];
+               }
+       },
+
+       css: function( elem, name, extra, styles ) {
+               var val, num, hooks,
+                       origName = jQuery.camelCase( name );
+
+               // Make sure that we're working with the right name
+               name = jQuery.cssProps[ origName ] ||
+                       ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+               // Try prefixed name followed by the unprefixed name
+               hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+               // If a hook was provided get the computed value from there
+               if ( hooks && "get" in hooks ) {
+                       val = hooks.get( elem, true, extra );
+               }
+
+               // Otherwise, if a way to get the computed value exists, use that
+               if ( val === undefined ) {
+                       val = curCSS( elem, name, styles );
+               }
+
+               // Convert "normal" to computed value
+               if ( val === "normal" && name in cssNormalTransform ) {
+                       val = cssNormalTransform[ name ];
+               }
+
+               // Make numeric if forced or a qualifier was provided and val looks numeric
+               if ( extra === "" || extra ) {
+                       num = parseFloat( val );
+                       return extra === true || isFinite( num ) ? num || 0 : val;
+               }
+               return val;
+       }
+} );
+
+jQuery.each( [ "height", "width" ], function( i, name ) {
+       jQuery.cssHooks[ name ] = {
+               get: function( elem, computed, extra ) {
+                       if ( computed ) {
+
+                               // Certain elements can have dimension info if we invisibly show them
+                               // but it must have a current display style that would benefit
+                               return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
+
+                                       // Support: Safari 8+
+                                       // Table columns in Safari have non-zero offsetWidth & zero
+                                       // getBoundingClientRect().width unless display is changed.
+                                       // Support: IE <=11 only
+                                       // Running getBoundingClientRect on a disconnected node
+                                       // in IE throws an error.
+                                       ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
+                                               swap( elem, cssShow, function() {
+                                                       return getWidthOrHeight( elem, name, extra );
+                                               } ) :
+                                               getWidthOrHeight( elem, name, extra );
+                       }
+               },
+
+               set: function( elem, value, extra ) {
+                       var matches,
+                               styles = extra && getStyles( elem ),
+                               subtract = extra && augmentWidthOrHeight(
+                                       elem,
+                                       name,
+                                       extra,
+                                       jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+                                       styles
+                               );
+
+                       // Convert to pixels if value adjustment is needed
+                       if ( subtract && ( matches = rcssNum.exec( value ) ) &&
+                               ( matches[ 3 ] || "px" ) !== "px" ) {
+
+                               elem.style[ name ] = value;
+                               value = jQuery.css( elem, name );
+                       }
+
+                       return setPositiveNumber( elem, value, subtract );
+               }
+       };
+} );
+
+jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
+       function( elem, computed ) {
+               if ( computed ) {
+                       return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
+                               elem.getBoundingClientRect().left -
+                                       swap( elem, { marginLeft: 0 }, function() {
+                                               return elem.getBoundingClientRect().left;
+                                       } )
+                               ) + "px";
+               }
+       }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each( {
+       margin: "",
+       padding: "",
+       border: "Width"
+}, function( prefix, suffix ) {
+       jQuery.cssHooks[ prefix + suffix ] = {
+               expand: function( value ) {
+                       var i = 0,
+                               expanded = {},
+
+                               // Assumes a single number if not a string
+                               parts = typeof value === "string" ? value.split( " " ) : [ value ];
+
+                       for ( ; i < 4; i++ ) {
+                               expanded[ prefix + cssExpand[ i ] + suffix ] =
+                                       parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+                       }
+
+                       return expanded;
+               }
+       };
+
+       if ( !rmargin.test( prefix ) ) {
+               jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+       }
+} );
+
+jQuery.fn.extend( {
+       css: function( name, value ) {
+               return access( this, function( elem, name, value ) {
+                       var styles, len,
+                               map = {},
+                               i = 0;
+
+                       if ( jQuery.isArray( name ) ) {
+                               styles = getStyles( elem );
+                               len = name.length;
+
+                               for ( ; i < len; i++ ) {
+                                       map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+                               }
+
+                               return map;
+                       }
+
+                       return value !== undefined ?
+                               jQuery.style( elem, name, value ) :
+                               jQuery.css( elem, name );
+               }, name, value, arguments.length > 1 );
+       }
+} );
+
+
+function Tween( elem, options, prop, end, easing ) {
+       return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+       constructor: Tween,
+       init: function( elem, options, prop, end, easing, unit ) {
+               this.elem = elem;
+               this.prop = prop;
+               this.easing = easing || jQuery.easing._default;
+               this.options = options;
+               this.start = this.now = this.cur();
+               this.end = end;
+               this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+       },
+       cur: function() {
+               var hooks = Tween.propHooks[ this.prop ];
+
+               return hooks && hooks.get ?
+                       hooks.get( this ) :
+                       Tween.propHooks._default.get( this );
+       },
+       run: function( percent ) {
+               var eased,
+                       hooks = Tween.propHooks[ this.prop ];
+
+               if ( this.options.duration ) {
+                       this.pos = eased = jQuery.easing[ this.easing ](
+                               percent, this.options.duration * percent, 0, 1, this.options.duration
+                       );
+               } else {
+                       this.pos = eased = percent;
+               }
+               this.now = ( this.end - this.start ) * eased + this.start;
+
+               if ( this.options.step ) {
+                       this.options.step.call( this.elem, this.now, this );
+               }
+
+               if ( hooks && hooks.set ) {
+                       hooks.set( this );
+               } else {
+                       Tween.propHooks._default.set( this );
+               }
+               return this;
+       }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+       _default: {
+               get: function( tween ) {
+                       var result;
+
+                       // Use a property on the element directly when it is not a DOM element,
+                       // or when there is no matching style property that exists.
+                       if ( tween.elem.nodeType !== 1 ||
+                               tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
+                               return tween.elem[ tween.prop ];
+                       }
+
+                       // Passing an empty string as a 3rd parameter to .css will automatically
+                       // attempt a parseFloat and fallback to a string if the parse fails.
+                       // Simple values such as "10px" are parsed to Float;
+                       // complex values such as "rotate(1rad)" are returned as-is.
+                       result = jQuery.css( tween.elem, tween.prop, "" );
+
+                       // Empty strings, null, undefined and "auto" are converted to 0.
+                       return !result || result === "auto" ? 0 : result;
+               },
+               set: function( tween ) {
+
+                       // Use step hook for back compat.
+                       // Use cssHook if its there.
+                       // Use .style if available and use plain properties where available.
+                       if ( jQuery.fx.step[ tween.prop ] ) {
+                               jQuery.fx.step[ tween.prop ]( tween );
+                       } else if ( tween.elem.nodeType === 1 &&
+                               ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+                                       jQuery.cssHooks[ tween.prop ] ) ) {
+                               jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+                       } else {
+                               tween.elem[ tween.prop ] = tween.now;
+                       }
+               }
+       }
+};
+
+// Support: IE <=9 only
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+       set: function( tween ) {
+               if ( tween.elem.nodeType && tween.elem.parentNode ) {
+                       tween.elem[ tween.prop ] = tween.now;
+               }
+       }
+};
+
+jQuery.easing = {
+       linear: function( p ) {
+               return p;
+       },
+       swing: function( p ) {
+               return 0.5 - Math.cos( p * Math.PI ) / 2;
+       },
+       _default: "swing"
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+       fxNow, timerId,
+       rfxtypes = /^(?:toggle|show|hide)$/,
+       rrun = /queueHooks$/;
+
+function raf() {
+       if ( timerId ) {
+               window.requestAnimationFrame( raf );
+               jQuery.fx.tick();
+       }
+}
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+       window.setTimeout( function() {
+               fxNow = undefined;
+       } );
+       return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+       var which,
+               i = 0,
+               attrs = { height: type };
+
+       // If we include width, step value is 1 to do all cssExpand values,
+       // otherwise step value is 2 to skip over Left and Right
+       includeWidth = includeWidth ? 1 : 0;
+       for ( ; i < 4; i += 2 - includeWidth ) {
+               which = cssExpand[ i ];
+               attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+       }
+
+       if ( includeWidth ) {
+               attrs.opacity = attrs.width = type;
+       }
+
+       return attrs;
+}
+
+function createTween( value, prop, animation ) {
+       var tween,
+               collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
+               index = 0,
+               length = collection.length;
+       for ( ; index < length; index++ ) {
+               if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
+
+                       // We're done with this property
+                       return tween;
+               }
+       }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+       var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
+               isBox = "width" in props || "height" in props,
+               anim = this,
+               orig = {},
+               style = elem.style,
+               hidden = elem.nodeType && isHiddenWithinTree( elem ),
+               dataShow = dataPriv.get( elem, "fxshow" );
+
+       // Queue-skipping animations hijack the fx hooks
+       if ( !opts.queue ) {
+               hooks = jQuery._queueHooks( elem, "fx" );
+               if ( hooks.unqueued == null ) {
+                       hooks.unqueued = 0;
+                       oldfire = hooks.empty.fire;
+                       hooks.empty.fire = function() {
+                               if ( !hooks.unqueued ) {
+                                       oldfire();
+                               }
+                       };
+               }
+               hooks.unqueued++;
+
+               anim.always( function() {
+
+                       // Ensure the complete handler is called before this completes
+                       anim.always( function() {
+                               hooks.unqueued--;
+                               if ( !jQuery.queue( elem, "fx" ).length ) {
+                                       hooks.empty.fire();
+                               }
+                       } );
+               } );
+       }
+
+       // Detect show/hide animations
+       for ( prop in props ) {
+               value = props[ prop ];
+               if ( rfxtypes.test( value ) ) {
+                       delete props[ prop ];
+                       toggle = toggle || value === "toggle";
+                       if ( value === ( hidden ? "hide" : "show" ) ) {
+
+                               // Pretend to be hidden if this is a "show" and
+                               // there is still data from a stopped show/hide
+                               if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+                                       hidden = true;
+
+                               // Ignore all other no-op show/hide data
+                               } else {
+                                       continue;
+                               }
+                       }
+                       orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+               }
+       }
+
+       // Bail out if this is a no-op like .hide().hide()
+       propTween = !jQuery.isEmptyObject( props );
+       if ( !propTween && jQuery.isEmptyObject( orig ) ) {
+               return;
+       }
+
+       // Restrict "overflow" and "display" styles during box animations
+       if ( isBox && elem.nodeType === 1 ) {
+
+               // Support: IE <=9 - 11, Edge 12 - 13
+               // Record all 3 overflow attributes because IE does not infer the shorthand
+               // from identically-valued overflowX and overflowY
+               opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+               // Identify a display type, preferring old show/hide data over the CSS cascade
+               restoreDisplay = dataShow && dataShow.display;
+               if ( restoreDisplay == null ) {
+                       restoreDisplay = dataPriv.get( elem, "display" );
+               }
+               display = jQuery.css( elem, "display" );
+               if ( display === "none" ) {
+                       if ( restoreDisplay ) {
+                               display = restoreDisplay;
+                       } else {
+
+                               // Get nonempty value(s) by temporarily forcing visibility
+                               showHide( [ elem ], true );
+                               restoreDisplay = elem.style.display || restoreDisplay;
+                               display = jQuery.css( elem, "display" );
+                               showHide( [ elem ] );
+                       }
+               }
+
+               // Animate inline elements as inline-block
+               if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
+                       if ( jQuery.css( elem, "float" ) === "none" ) {
+
+                               // Restore the original display value at the end of pure show/hide animations
+                               if ( !propTween ) {
+                                       anim.done( function() {
+                                               style.display = restoreDisplay;
+                                       } );
+                                       if ( restoreDisplay == null ) {
+                                               display = style.display;
+                                               restoreDisplay = display === "none" ? "" : display;
+                                       }
+                               }
+                               style.display = "inline-block";
+                       }
+               }
+       }
+
+       if ( opts.overflow ) {
+               style.overflow = "hidden";
+               anim.always( function() {
+                       style.overflow = opts.overflow[ 0 ];
+                       style.overflowX = opts.overflow[ 1 ];
+                       style.overflowY = opts.overflow[ 2 ];
+               } );
+       }
+
+       // Implement show/hide animations
+       propTween = false;
+       for ( prop in orig ) {
+
+               // General show/hide setup for this element animation
+               if ( !propTween ) {
+                       if ( dataShow ) {
+                               if ( "hidden" in dataShow ) {
+                                       hidden = dataShow.hidden;
+                               }
+                       } else {
+                               dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
+                       }
+
+                       // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
+                       if ( toggle ) {
+                               dataShow.hidden = !hidden;
+                       }
+
+                       // Show elements before animating them
+                       if ( hidden ) {
+                               showHide( [ elem ], true );
+                       }
+
+                       /* eslint-disable no-loop-func */
+
+                       anim.done( function() {
+
+                       /* eslint-enable no-loop-func */
+
+                               // The final step of a "hide" animation is actually hiding the element
+                               if ( !hidden ) {
+                                       showHide( [ elem ] );
+                               }
+                               dataPriv.remove( elem, "fxshow" );
+                               for ( prop in orig ) {
+                                       jQuery.style( elem, prop, orig[ prop ] );
+                               }
+                       } );
+               }
+
+               // Per-property setup
+               propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+               if ( !( prop in dataShow ) ) {
+                       dataShow[ prop ] = propTween.start;
+                       if ( hidden ) {
+                               propTween.end = propTween.start;
+                               propTween.start = 0;
+                       }
+               }
+       }
+}
+
+function propFilter( props, specialEasing ) {
+       var index, name, easing, value, hooks;
+
+       // camelCase, specialEasing and expand cssHook pass
+       for ( index in props ) {
+               name = jQuery.camelCase( index );
+               easing = specialEasing[ name ];
+               value = props[ index ];
+               if ( jQuery.isArray( value ) ) {
+                       easing = value[ 1 ];
+                       value = props[ index ] = value[ 0 ];
+               }
+
+               if ( index !== name ) {
+                       props[ name ] = value;
+                       delete props[ index ];
+               }
+
+               hooks = jQuery.cssHooks[ name ];
+               if ( hooks && "expand" in hooks ) {
+                       value = hooks.expand( value );
+                       delete props[ name ];
+
+                       // Not quite $.extend, this won't overwrite existing keys.
+                       // Reusing 'index' because we have the correct "name"
+                       for ( index in value ) {
+                               if ( !( index in props ) ) {
+                                       props[ index ] = value[ index ];
+                                       specialEasing[ index ] = easing;
+                               }
+                       }
+               } else {
+                       specialEasing[ name ] = easing;
+               }
+       }
+}
+
+function Animation( elem, properties, options ) {
+       var result,
+               stopped,
+               index = 0,
+               length = Animation.prefilters.length,
+               deferred = jQuery.Deferred().always( function() {
+
+                       // Don't match elem in the :animated selector
+                       delete tick.elem;
+               } ),
+               tick = function() {
+                       if ( stopped ) {
+                               return false;
+                       }
+                       var currentTime = fxNow || createFxNow(),
+                               remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+
+                               // Support: Android 2.3 only
+                               // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+                               temp = remaining / animation.duration || 0,
+                               percent = 1 - temp,
+                               index = 0,
+                               length = animation.tweens.length;
+
+                       for ( ; index < length; index++ ) {
+                               animation.tweens[ index ].run( percent );
+                       }
+
+                       deferred.notifyWith( elem, [ animation, percent, remaining ] );
+
+                       if ( percent < 1 && length ) {
+                               return remaining;
+                       } else {
+                               deferred.resolveWith( elem, [ animation ] );
+                               return false;
+                       }
+               },
+               animation = deferred.promise( {
+                       elem: elem,
+                       props: jQuery.extend( {}, properties ),
+                       opts: jQuery.extend( true, {
+                               specialEasing: {},
+                               easing: jQuery.easing._default
+                       }, options ),
+                       originalProperties: properties,
+                       originalOptions: options,
+                       startTime: fxNow || createFxNow(),
+                       duration: options.duration,
+                       tweens: [],
+                       createTween: function( prop, end ) {
+                               var tween = jQuery.Tween( elem, animation.opts, prop, end,
+                                               animation.opts.specialEasing[ prop ] || animation.opts.easing );
+                               animation.tweens.push( tween );
+                               return tween;
+                       },
+                       stop: function( gotoEnd ) {
+                               var index = 0,
+
+                                       // If we are going to the end, we want to run all the tweens
+                                       // otherwise we skip this part
+                                       length = gotoEnd ? animation.tweens.length : 0;
+                               if ( stopped ) {
+                                       return this;
+                               }
+                               stopped = true;
+                               for ( ; index < length; index++ ) {
+                                       animation.tweens[ index ].run( 1 );
+                               }
+
+                               // Resolve when we played the last frame; otherwise, reject
+                               if ( gotoEnd ) {
+                                       deferred.notifyWith( elem, [ animation, 1, 0 ] );
+                                       deferred.resolveWith( elem, [ animation, gotoEnd ] );
+                               } else {
+                                       deferred.rejectWith( elem, [ animation, gotoEnd ] );
+                               }
+                               return this;
+                       }
+               } ),
+               props = animation.props;
+
+       propFilter( props, animation.opts.specialEasing );
+
+       for ( ; index < length; index++ ) {
+               result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
+               if ( result ) {
+                       if ( jQuery.isFunction( result.stop ) ) {
+                               jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
+                                       jQuery.proxy( result.stop, result );
+                       }
+                       return result;
+               }
+       }
+
+       jQuery.map( props, createTween, animation );
+
+       if ( jQuery.isFunction( animation.opts.start ) ) {
+               animation.opts.start.call( elem, animation );
+       }
+
+       jQuery.fx.timer(
+               jQuery.extend( tick, {
+                       elem: elem,
+                       anim: animation,
+                       queue: animation.opts.queue
+               } )
+       );
+
+       // attach callbacks from options
+       return animation.progress( animation.opts.progress )
+               .done( animation.opts.done, animation.opts.complete )
+               .fail( animation.opts.fail )
+               .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+       tweeners: {
+               "*": [ function( prop, value ) {
+                       var tween = this.createTween( prop, value );
+                       adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
+                       return tween;
+               } ]
+       },
+
+       tweener: function( props, callback ) {
+               if ( jQuery.isFunction( props ) ) {
+                       callback = props;
+                       props = [ "*" ];
+               } else {
+                       props = props.match( rnothtmlwhite );
+               }
+
+               var prop,
+                       index = 0,
+                       length = props.length;
+
+               for ( ; index < length; index++ ) {
+                       prop = props[ index ];
+                       Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
+                       Animation.tweeners[ prop ].unshift( callback );
+               }
+       },
+
+       prefilters: [ defaultPrefilter ],
+
+       prefilter: function( callback, prepend ) {
+               if ( prepend ) {
+                       Animation.prefilters.unshift( callback );
+               } else {
+                       Animation.prefilters.push( callback );
+               }
+       }
+} );
+
+jQuery.speed = function( speed, easing, fn ) {
+       var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+               complete: fn || !fn && easing ||
+                       jQuery.isFunction( speed ) && speed,
+               duration: speed,
+               easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+       };
+
+       // Go to the end state if fx are off or if document is hidden
+       if ( jQuery.fx.off || document.hidden ) {
+               opt.duration = 0;
+
+       } else {
+               if ( typeof opt.duration !== "number" ) {
+                       if ( opt.duration in jQuery.fx.speeds ) {
+                               opt.duration = jQuery.fx.speeds[ opt.duration ];
+
+                       } else {
+                               opt.duration = jQuery.fx.speeds._default;
+                       }
+               }
+       }
+
+       // Normalize opt.queue - true/undefined/null -> "fx"
+       if ( opt.queue == null || opt.queue === true ) {
+               opt.queue = "fx";
+       }
+
+       // Queueing
+       opt.old = opt.complete;
+
+       opt.complete = function() {
+               if ( jQuery.isFunction( opt.old ) ) {
+                       opt.old.call( this );
+               }
+
+               if ( opt.queue ) {
+                       jQuery.dequeue( this, opt.queue );
+               }
+       };
+
+       return opt;
+};
+
+jQuery.fn.extend( {
+       fadeTo: function( speed, to, easing, callback ) {
+
+               // Show any hidden elements after setting opacity to 0
+               return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
+
+                       // Animate to the value specified
+                       .end().animate( { opacity: to }, speed, easing, callback );
+       },
+       animate: function( prop, speed, easing, callback ) {
+               var empty = jQuery.isEmptyObject( prop ),
+                       optall = jQuery.speed( speed, easing, callback ),
+                       doAnimation = function() {
+
+                               // Operate on a copy of prop so per-property easing won't be lost
+                               var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+                               // Empty animations, or finishing resolves immediately
+                               if ( empty || dataPriv.get( this, "finish" ) ) {
+                                       anim.stop( true );
+                               }
+                       };
+                       doAnimation.finish = doAnimation;
+
+               return empty || optall.queue === false ?
+                       this.each( doAnimation ) :
+                       this.queue( optall.queue, doAnimation );
+       },
+       stop: function( type, clearQueue, gotoEnd ) {
+               var stopQueue = function( hooks ) {
+                       var stop = hooks.stop;
+                       delete hooks.stop;
+                       stop( gotoEnd );
+               };
+
+               if ( typeof type !== "string" ) {
+                       gotoEnd = clearQueue;
+                       clearQueue = type;
+                       type = undefined;
+               }
+               if ( clearQueue && type !== false ) {
+                       this.queue( type || "fx", [] );
+               }
+
+               return this.each( function() {
+                       var dequeue = true,
+                               index = type != null && type + "queueHooks",
+                               timers = jQuery.timers,
+                               data = dataPriv.get( this );
+
+                       if ( index ) {
+                               if ( data[ index ] && data[ index ].stop ) {
+                                       stopQueue( data[ index ] );
+                               }
+                       } else {
+                               for ( index in data ) {
+                                       if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+                                               stopQueue( data[ index ] );
+                                       }
+                               }
+                       }
+
+                       for ( index = timers.length; index--; ) {
+                               if ( timers[ index ].elem === this &&
+                                       ( type == null || timers[ index ].queue === type ) ) {
+
+                                       timers[ index ].anim.stop( gotoEnd );
+                                       dequeue = false;
+                                       timers.splice( index, 1 );
+                               }
+                       }
+
+                       // Start the next in the queue if the last step wasn't forced.
+                       // Timers currently will call their complete callbacks, which
+                       // will dequeue but only if they were gotoEnd.
+                       if ( dequeue || !gotoEnd ) {
+                               jQuery.dequeue( this, type );
+                       }
+               } );
+       },
+       finish: function( type ) {
+               if ( type !== false ) {
+                       type = type || "fx";
+               }
+               return this.each( function() {
+                       var index,
+                               data = dataPriv.get( this ),
+                               queue = data[ type + "queue" ],
+                               hooks = data[ type + "queueHooks" ],
+                               timers = jQuery.timers,
+                               length = queue ? queue.length : 0;
+
+                       // Enable finishing flag on private data
+                       data.finish = true;
+
+                       // Empty the queue first
+                       jQuery.queue( this, type, [] );
+
+                       if ( hooks && hooks.stop ) {
+                               hooks.stop.call( this, true );
+                       }
+
+                       // Look for any active animations, and finish them
+                       for ( index = timers.length; index--; ) {
+                               if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+                                       timers[ index ].anim.stop( true );
+                                       timers.splice( index, 1 );
+                               }
+                       }
+
+                       // Look for any animations in the old queue and finish them
+                       for ( index = 0; index < length; index++ ) {
+                               if ( queue[ index ] && queue[ index ].finish ) {
+                                       queue[ index ].finish.call( this );
+                               }
+                       }
+
+                       // Turn off finishing flag
+                       delete data.finish;
+               } );
+       }
+} );
+
+jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
+       var cssFn = jQuery.fn[ name ];
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return speed == null || typeof speed === "boolean" ?
+                       cssFn.apply( this, arguments ) :
+                       this.animate( genFx( name, true ), speed, easing, callback );
+       };
+} );
+
+// Generate shortcuts for custom animations
+jQuery.each( {
+       slideDown: genFx( "show" ),
+       slideUp: genFx( "hide" ),
+       slideToggle: genFx( "toggle" ),
+       fadeIn: { opacity: "show" },
+       fadeOut: { opacity: "hide" },
+       fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return this.animate( props, speed, easing, callback );
+       };
+} );
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+       var timer,
+               i = 0,
+               timers = jQuery.timers;
+
+       fxNow = jQuery.now();
+
+       for ( ; i < timers.length; i++ ) {
+               timer = timers[ i ];
+
+               // Checks the timer has not already been removed
+               if ( !timer() && timers[ i ] === timer ) {
+                       timers.splice( i--, 1 );
+               }
+       }
+
+       if ( !timers.length ) {
+               jQuery.fx.stop();
+       }
+       fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+       jQuery.timers.push( timer );
+       if ( timer() ) {
+               jQuery.fx.start();
+       } else {
+               jQuery.timers.pop();
+       }
+};
+
+jQuery.fx.interval = 13;
+jQuery.fx.start = function() {
+       if ( !timerId ) {
+               timerId = window.requestAnimationFrame ?
+                       window.requestAnimationFrame( raf ) :
+                       window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
+       }
+};
+
+jQuery.fx.stop = function() {
+       if ( window.cancelAnimationFrame ) {
+               window.cancelAnimationFrame( timerId );
+       } else {
+               window.clearInterval( timerId );
+       }
+
+       timerId = null;
+};
+
+jQuery.fx.speeds = {
+       slow: 600,
+       fast: 200,
+
+       // Default speed
+       _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+       time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+       type = type || "fx";
+
+       return this.queue( type, function( next, hooks ) {
+               var timeout = window.setTimeout( next, time );
+               hooks.stop = function() {
+                       window.clearTimeout( timeout );
+               };
+       } );
+};
+
+
+( function() {
+       var input = document.createElement( "input" ),
+               select = document.createElement( "select" ),
+               opt = select.appendChild( document.createElement( "option" ) );
+
+       input.type = "checkbox";
+
+       // Support: Android <=4.3 only
+       // Default value for a checkbox should be "on"
+       support.checkOn = input.value !== "";
+
+       // Support: IE <=11 only
+       // Must access selectedIndex to make default options select
+       support.optSelected = opt.selected;
+
+       // Support: IE <=11 only
+       // An input loses its value after becoming a radio
+       input = document.createElement( "input" );
+       input.value = "t";
+       input.type = "radio";
+       support.radioValue = input.value === "t";
+} )();
+
+
+var boolHook,
+       attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend( {
+       attr: function( name, value ) {
+               return access( this, jQuery.attr, name, value, arguments.length > 1 );
+       },
+
+       removeAttr: function( name ) {
+               return this.each( function() {
+                       jQuery.removeAttr( this, name );
+               } );
+       }
+} );
+
+jQuery.extend( {
+       attr: function( elem, name, value ) {
+               var ret, hooks,
+                       nType = elem.nodeType;
+
+               // Don't get/set attributes on text, comment and attribute nodes
+               if ( nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               // Fallback to prop when attributes are not supported
+               if ( typeof elem.getAttribute === "undefined" ) {
+                       return jQuery.prop( elem, name, value );
+               }
+
+               // Attribute hooks are determined by the lowercase version
+               // Grab necessary hook if one is defined
+               if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+                       hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
+                               ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
+               }
+
+               if ( value !== undefined ) {
+                       if ( value === null ) {
+                               jQuery.removeAttr( elem, name );
+                               return;
+                       }
+
+                       if ( hooks && "set" in hooks &&
+                               ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+                               return ret;
+                       }
+
+                       elem.setAttribute( name, value + "" );
+                       return value;
+               }
+
+               if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+                       return ret;
+               }
+
+               ret = jQuery.find.attr( elem, name );
+
+               // Non-existent attributes return null, we normalize to undefined
+               return ret == null ? undefined : ret;
+       },
+
+       attrHooks: {
+               type: {
+                       set: function( elem, value ) {
+                               if ( !support.radioValue && value === "radio" &&
+                                       jQuery.nodeName( elem, "input" ) ) {
+                                       var val = elem.value;
+                                       elem.setAttribute( "type", value );
+                                       if ( val ) {
+                                               elem.value = val;
+                                       }
+                                       return value;
+                               }
+                       }
+               }
+       },
+
+       removeAttr: function( elem, value ) {
+               var name,
+                       i = 0,
+
+                       // Attribute names can contain non-HTML whitespace characters
+                       // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
+                       attrNames = value && value.match( rnothtmlwhite );
+
+               if ( attrNames && elem.nodeType === 1 ) {
+                       while ( ( name = attrNames[ i++ ] ) ) {
+                               elem.removeAttribute( name );
+                       }
+               }
+       }
+} );
+
+// Hooks for boolean attributes
+boolHook = {
+       set: function( elem, value, name ) {
+               if ( value === false ) {
+
+                       // Remove boolean attributes when set to false
+                       jQuery.removeAttr( elem, name );
+               } else {
+                       elem.setAttribute( name, name );
+               }
+               return name;
+       }
+};
+
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+       var getter = attrHandle[ name ] || jQuery.find.attr;
+
+       attrHandle[ name ] = function( elem, name, isXML ) {
+               var ret, handle,
+                       lowercaseName = name.toLowerCase();
+
+               if ( !isXML ) {
+
+                       // Avoid an infinite loop by temporarily removing this function from the getter
+                       handle = attrHandle[ lowercaseName ];
+                       attrHandle[ lowercaseName ] = ret;
+                       ret = getter( elem, name, isXML ) != null ?
+                               lowercaseName :
+                               null;
+                       attrHandle[ lowercaseName ] = handle;
+               }
+               return ret;
+       };
+} );
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button)$/i,
+       rclickable = /^(?:a|area)$/i;
+
+jQuery.fn.extend( {
+       prop: function( name, value ) {
+               return access( this, jQuery.prop, name, value, arguments.length > 1 );
+       },
+
+       removeProp: function( name ) {
+               return this.each( function() {
+                       delete this[ jQuery.propFix[ name ] || name ];
+               } );
+       }
+} );
+
+jQuery.extend( {
+       prop: function( elem, name, value ) {
+               var ret, hooks,
+                       nType = elem.nodeType;
+
+               // Don't get/set properties on text, comment and attribute nodes
+               if ( nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+
+                       // Fix name and attach hooks
+                       name = jQuery.propFix[ name ] || name;
+                       hooks = jQuery.propHooks[ name ];
+               }
+
+               if ( value !== undefined ) {
+                       if ( hooks && "set" in hooks &&
+                               ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+                               return ret;
+                       }
+
+                       return ( elem[ name ] = value );
+               }
+
+               if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+                       return ret;
+               }
+
+               return elem[ name ];
+       },
+
+       propHooks: {
+               tabIndex: {
+                       get: function( elem ) {
+
+                               // Support: IE <=9 - 11 only
+                               // elem.tabIndex doesn't always return the
+                               // correct value when it hasn't been explicitly set
+                               // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                               // Use proper attribute retrieval(#12072)
+                               var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+                               if ( tabindex ) {
+                                       return parseInt( tabindex, 10 );
+                               }
+
+                               if (
+                                       rfocusable.test( elem.nodeName ) ||
+                                       rclickable.test( elem.nodeName ) &&
+                                       elem.href
+                               ) {
+                                       return 0;
+                               }
+
+                               return -1;
+                       }
+               }
+       },
+
+       propFix: {
+               "for": "htmlFor",
+               "class": "className"
+       }
+} );
+
+// Support: IE <=11 only
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
+// eslint rule "no-unused-expressions" is disabled for this code
+// since it considers such accessions noop
+if ( !support.optSelected ) {
+       jQuery.propHooks.selected = {
+               get: function( elem ) {
+
+                       /* eslint no-unused-expressions: "off" */
+
+                       var parent = elem.parentNode;
+                       if ( parent && parent.parentNode ) {
+                               parent.parentNode.selectedIndex;
+                       }
+                       return null;
+               },
+               set: function( elem ) {
+
+                       /* eslint no-unused-expressions: "off" */
+
+                       var parent = elem.parentNode;
+                       if ( parent ) {
+                               parent.selectedIndex;
+
+                               if ( parent.parentNode ) {
+                                       parent.parentNode.selectedIndex;
+                               }
+                       }
+               }
+       };
+}
+
+jQuery.each( [
+       "tabIndex",
+       "readOnly",
+       "maxLength",
+       "cellSpacing",
+       "cellPadding",
+       "rowSpan",
+       "colSpan",
+       "useMap",
+       "frameBorder",
+       "contentEditable"
+], function() {
+       jQuery.propFix[ this.toLowerCase() ] = this;
+} );
+
+
+
+
+       // Strip and collapse whitespace according to HTML spec
+       // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
+       function stripAndCollapse( value ) {
+               var tokens = value.match( rnothtmlwhite ) || [];
+               return tokens.join( " " );
+       }
+
+
+function getClass( elem ) {
+       return elem.getAttribute && elem.getAttribute( "class" ) || "";
+}
+
+jQuery.fn.extend( {
+       addClass: function( value ) {
+               var classes, elem, cur, curValue, clazz, j, finalValue,
+                       i = 0;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each( function( j ) {
+                               jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
+                       } );
+               }
+
+               if ( typeof value === "string" && value ) {
+                       classes = value.match( rnothtmlwhite ) || [];
+
+                       while ( ( elem = this[ i++ ] ) ) {
+                               curValue = getClass( elem );
+                               cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
+
+                               if ( cur ) {
+                                       j = 0;
+                                       while ( ( clazz = classes[ j++ ] ) ) {
+                                               if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+                                                       cur += clazz + " ";
+                                               }
+                                       }
+
+                                       // Only assign if different to avoid unneeded rendering.
+                                       finalValue = stripAndCollapse( cur );
+                                       if ( curValue !== finalValue ) {
+                                               elem.setAttribute( "class", finalValue );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       removeClass: function( value ) {
+               var classes, elem, cur, curValue, clazz, j, finalValue,
+                       i = 0;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each( function( j ) {
+                               jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
+                       } );
+               }
+
+               if ( !arguments.length ) {
+                       return this.attr( "class", "" );
+               }
+
+               if ( typeof value === "string" && value ) {
+                       classes = value.match( rnothtmlwhite ) || [];
+
+                       while ( ( elem = this[ i++ ] ) ) {
+                               curValue = getClass( elem );
+
+                               // This expression is here for better compressibility (see addClass)
+                               cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
+
+                               if ( cur ) {
+                                       j = 0;
+                                       while ( ( clazz = classes[ j++ ] ) ) {
+
+                                               // Remove *all* instances
+                                               while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
+                                                       cur = cur.replace( " " + clazz + " ", " " );
+                                               }
+                                       }
+
+                                       // Only assign if different to avoid unneeded rendering.
+                                       finalValue = stripAndCollapse( cur );
+                                       if ( curValue !== finalValue ) {
+                                               elem.setAttribute( "class", finalValue );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       toggleClass: function( value, stateVal ) {
+               var type = typeof value;
+
+               if ( typeof stateVal === "boolean" && type === "string" ) {
+                       return stateVal ? this.addClass( value ) : this.removeClass( value );
+               }
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each( function( i ) {
+                               jQuery( this ).toggleClass(
+                                       value.call( this, i, getClass( this ), stateVal ),
+                                       stateVal
+                               );
+                       } );
+               }
+
+               return this.each( function() {
+                       var className, i, self, classNames;
+
+                       if ( type === "string" ) {
+
+                               // Toggle individual class names
+                               i = 0;
+                               self = jQuery( this );
+                               classNames = value.match( rnothtmlwhite ) || [];
+
+                               while ( ( className = classNames[ i++ ] ) ) {
+
+                                       // Check each className given, space separated list
+                                       if ( self.hasClass( className ) ) {
+                                               self.removeClass( className );
+                                       } else {
+                                               self.addClass( className );
+                                       }
+                               }
+
+                       // Toggle whole class name
+                       } else if ( value === undefined || type === "boolean" ) {
+                               className = getClass( this );
+                               if ( className ) {
+
+                                       // Store className if set
+                                       dataPriv.set( this, "__className__", className );
+                               }
+
+                               // If the element has a class name or if we're passed `false`,
+                               // then remove the whole classname (if there was one, the above saved it).
+                               // Otherwise bring back whatever was previously saved (if anything),
+                               // falling back to the empty string if nothing was stored.
+                               if ( this.setAttribute ) {
+                                       this.setAttribute( "class",
+                                               className || value === false ?
+                                               "" :
+                                               dataPriv.get( this, "__className__" ) || ""
+                                       );
+                               }
+                       }
+               } );
+       },
+
+       hasClass: function( selector ) {
+               var className, elem,
+                       i = 0;
+
+               className = " " + selector + " ";
+               while ( ( elem = this[ i++ ] ) ) {
+                       if ( elem.nodeType === 1 &&
+                               ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
+                                       return true;
+                       }
+               }
+
+               return false;
+       }
+} );
+
+
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend( {
+       val: function( value ) {
+               var hooks, ret, isFunction,
+                       elem = this[ 0 ];
+
+               if ( !arguments.length ) {
+                       if ( elem ) {
+                               hooks = jQuery.valHooks[ elem.type ] ||
+                                       jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+                               if ( hooks &&
+                                       "get" in hooks &&
+                                       ( ret = hooks.get( elem, "value" ) ) !== undefined
+                               ) {
+                                       return ret;
+                               }
+
+                               ret = elem.value;
+
+                               // Handle most common string cases
+                               if ( typeof ret === "string" ) {
+                                       return ret.replace( rreturn, "" );
+                               }
+
+                               // Handle cases where value is null/undef or number
+                               return ret == null ? "" : ret;
+                       }
+
+                       return;
+               }
+
+               isFunction = jQuery.isFunction( value );
+
+               return this.each( function( i ) {
+                       var val;
+
+                       if ( this.nodeType !== 1 ) {
+                               return;
+                       }
+
+                       if ( isFunction ) {
+                               val = value.call( this, i, jQuery( this ).val() );
+                       } else {
+                               val = value;
+                       }
+
+                       // Treat null/undefined as ""; convert numbers to string
+                       if ( val == null ) {
+                               val = "";
+
+                       } else if ( typeof val === "number" ) {
+                               val += "";
+
+                       } else if ( jQuery.isArray( val ) ) {
+                               val = jQuery.map( val, function( value ) {
+                                       return value == null ? "" : value + "";
+                               } );
+                       }
+
+                       hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+                       // If set returns undefined, fall back to normal setting
+                       if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
+                               this.value = val;
+                       }
+               } );
+       }
+} );
+
+jQuery.extend( {
+       valHooks: {
+               option: {
+                       get: function( elem ) {
+
+                               var val = jQuery.find.attr( elem, "value" );
+                               return val != null ?
+                                       val :
+
+                                       // Support: IE <=10 - 11 only
+                                       // option.text throws exceptions (#14686, #14858)
+                                       // Strip and collapse whitespace
+                                       // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
+                                       stripAndCollapse( jQuery.text( elem ) );
+                       }
+               },
+               select: {
+                       get: function( elem ) {
+                               var value, option, i,
+                                       options = elem.options,
+                                       index = elem.selectedIndex,
+                                       one = elem.type === "select-one",
+                                       values = one ? null : [],
+                                       max = one ? index + 1 : options.length;
+
+                               if ( index < 0 ) {
+                                       i = max;
+
+                               } else {
+                                       i = one ? index : 0;
+                               }
+
+                               // Loop through all the selected options
+                               for ( ; i < max; i++ ) {
+                                       option = options[ i ];
+
+                                       // Support: IE <=9 only
+                                       // IE8-9 doesn't update selected after form reset (#2551)
+                                       if ( ( option.selected || i === index ) &&
+
+                                                       // Don't return options that are disabled or in a disabled optgroup
+                                                       !option.disabled &&
+                                                       ( !option.parentNode.disabled ||
+                                                               !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+                                               // Get the specific value for the option
+                                               value = jQuery( option ).val();
+
+                                               // We don't need an array for one selects
+                                               if ( one ) {
+                                                       return value;
+                                               }
+
+                                               // Multi-Selects return an array
+                                               values.push( value );
+                                       }
+                               }
+
+                               return values;
+                       },
+
+                       set: function( elem, value ) {
+                               var optionSet, option,
+                                       options = elem.options,
+                                       values = jQuery.makeArray( value ),
+                                       i = options.length;
+
+                               while ( i-- ) {
+                                       option = options[ i ];
+
+                                       /* eslint-disable no-cond-assign */
+
+                                       if ( option.selected =
+                                               jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
+                                       ) {
+                                               optionSet = true;
+                                       }
+
+                                       /* eslint-enable no-cond-assign */
+                               }
+
+                               // Force browsers to behave consistently when non-matching value is set
+                               if ( !optionSet ) {
+                                       elem.selectedIndex = -1;
+                               }
+                               return values;
+                       }
+               }
+       }
+} );
+
+// Radios and checkboxes getter/setter
+jQuery.each( [ "radio", "checkbox" ], function() {
+       jQuery.valHooks[ this ] = {
+               set: function( elem, value ) {
+                       if ( jQuery.isArray( value ) ) {
+                               return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
+                       }
+               }
+       };
+       if ( !support.checkOn ) {
+               jQuery.valHooks[ this ].get = function( elem ) {
+                       return elem.getAttribute( "value" ) === null ? "on" : elem.value;
+               };
+       }
+} );
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
+
+jQuery.extend( jQuery.event, {
+
+       trigger: function( event, data, elem, onlyHandlers ) {
+
+               var i, cur, tmp, bubbleType, ontype, handle, special,
+                       eventPath = [ elem || document ],
+                       type = hasOwn.call( event, "type" ) ? event.type : event,
+                       namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
+
+               cur = tmp = elem = elem || document;
+
+               // Don't do events on text and comment nodes
+               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+                       return;
+               }
+
+               // focus/blur morphs to focusin/out; ensure we're not firing them right now
+               if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+                       return;
+               }
+
+               if ( type.indexOf( "." ) > -1 ) {
+
+                       // Namespaced trigger; create a regexp to match event type in handle()
+                       namespaces = type.split( "." );
+                       type = namespaces.shift();
+                       namespaces.sort();
+               }
+               ontype = type.indexOf( ":" ) < 0 && "on" + type;
+
+               // Caller can pass in a jQuery.Event object, Object, or just an event type string
+               event = event[ jQuery.expando ] ?
+                       event :
+                       new jQuery.Event( type, typeof event === "object" && event );
+
+               // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+               event.isTrigger = onlyHandlers ? 2 : 3;
+               event.namespace = namespaces.join( "." );
+               event.rnamespace = event.namespace ?
+                       new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
+                       null;
+
+               // Clean up the event in case it is being reused
+               event.result = undefined;
+               if ( !event.target ) {
+                       event.target = elem;
+               }
+
+               // Clone any incoming data and prepend the event, creating the handler arg list
+               data = data == null ?
+                       [ event ] :
+                       jQuery.makeArray( data, [ event ] );
+
+               // Allow special events to draw outside the lines
+               special = jQuery.event.special[ type ] || {};
+               if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+                       return;
+               }
+
+               // Determine event propagation path in advance, per W3C events spec (#9951)
+               // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+               if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+                       bubbleType = special.delegateType || type;
+                       if ( !rfocusMorph.test( bubbleType + type ) ) {
+                               cur = cur.parentNode;
+                       }
+                       for ( ; cur; cur = cur.parentNode ) {
+                               eventPath.push( cur );
+                               tmp = cur;
+                       }
+
+                       // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                       if ( tmp === ( elem.ownerDocument || document ) ) {
+                               eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+                       }
+               }
+
+               // Fire handlers on the event path
+               i = 0;
+               while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
+
+                       event.type = i > 1 ?
+                               bubbleType :
+                               special.bindType || type;
+
+                       // jQuery handler
+                       handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
+                               dataPriv.get( cur, "handle" );
+                       if ( handle ) {
+                               handle.apply( cur, data );
+                       }
+
+                       // Native handler
+                       handle = ontype && cur[ ontype ];
+                       if ( handle && handle.apply && acceptData( cur ) ) {
+                               event.result = handle.apply( cur, data );
+                               if ( event.result === false ) {
+                                       event.preventDefault();
+                               }
+                       }
+               }
+               event.type = type;
+
+               // If nobody prevented the default action, do it now
+               if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+                       if ( ( !special._default ||
+                               special._default.apply( eventPath.pop(), data ) === false ) &&
+                               acceptData( elem ) ) {
+
+                               // Call a native DOM method on the target with the same name as the event.
+                               // Don't do default actions on window, that's where global variables be (#6170)
+                               if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+                                       // Don't re-trigger an onFOO event when we call its FOO() method
+                                       tmp = elem[ ontype ];
+
+                                       if ( tmp ) {
+                                               elem[ ontype ] = null;
+                                       }
+
+                                       // Prevent re-triggering of the same event, since we already bubbled it above
+                                       jQuery.event.triggered = type;
+                                       elem[ type ]();
+                                       jQuery.event.triggered = undefined;
+
+                                       if ( tmp ) {
+                                               elem[ ontype ] = tmp;
+                                       }
+                               }
+                       }
+               }
+
+               return event.result;
+       },
+
+       // Piggyback on a donor event to simulate a different one
+       // Used only for `focus(in | out)` events
+       simulate: function( type, elem, event ) {
+               var e = jQuery.extend(
+                       new jQuery.Event(),
+                       event,
+                       {
+                               type: type,
+                               isSimulated: true
+                       }
+               );
+
+               jQuery.event.trigger( e, null, elem );
+       }
+
+} );
+
+jQuery.fn.extend( {
+
+       trigger: function( type, data ) {
+               return this.each( function() {
+                       jQuery.event.trigger( type, data, this );
+               } );
+       },
+       triggerHandler: function( type, data ) {
+               var elem = this[ 0 ];
+               if ( elem ) {
+                       return jQuery.event.trigger( type, data, elem, true );
+               }
+       }
+} );
+
+
+jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
+       "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+       "change select submit keydown keypress keyup contextmenu" ).split( " " ),
+       function( i, name ) {
+
+       // Handle event binding
+       jQuery.fn[ name ] = function( data, fn ) {
+               return arguments.length > 0 ?
+                       this.on( name, null, data, fn ) :
+                       this.trigger( name );
+       };
+} );
+
+jQuery.fn.extend( {
+       hover: function( fnOver, fnOut ) {
+               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+       }
+} );
+
+
+
+
+support.focusin = "onfocusin" in window;
+
+
+// Support: Firefox <=44
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
+if ( !support.focusin ) {
+       jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+               // Attach a single capturing handler on the document while someone wants focusin/focusout
+               var handler = function( event ) {
+                       jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
+               };
+
+               jQuery.event.special[ fix ] = {
+                       setup: function() {
+                               var doc = this.ownerDocument || this,
+                                       attaches = dataPriv.access( doc, fix );
+
+                               if ( !attaches ) {
+                                       doc.addEventListener( orig, handler, true );
+                               }
+                               dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
+                       },
+                       teardown: function() {
+                               var doc = this.ownerDocument || this,
+                                       attaches = dataPriv.access( doc, fix ) - 1;
+
+                               if ( !attaches ) {
+                                       doc.removeEventListener( orig, handler, true );
+                                       dataPriv.remove( doc, fix );
+
+                               } else {
+                                       dataPriv.access( doc, fix, attaches );
+                               }
+                       }
+               };
+       } );
+}
+var location = window.location;
+
+var nonce = jQuery.now();
+
+var rquery = ( /\?/ );
+
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+       var xml;
+       if ( !data || typeof data !== "string" ) {
+               return null;
+       }
+
+       // Support: IE 9 - 11 only
+       // IE throws on parseFromString with invalid input.
+       try {
+               xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
+       } catch ( e ) {
+               xml = undefined;
+       }
+
+       if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+               jQuery.error( "Invalid XML: " + data );
+       }
+       return xml;
+};
+
+
+var
+       rbracket = /\[\]$/,
+       rCRLF = /\r?\n/g,
+       rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+       rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+       var name;
+
+       if ( jQuery.isArray( obj ) ) {
+
+               // Serialize array item.
+               jQuery.each( obj, function( i, v ) {
+                       if ( traditional || rbracket.test( prefix ) ) {
+
+                               // Treat each array item as a scalar.
+                               add( prefix, v );
+
+                       } else {
+
+                               // Item is non-scalar (array or object), encode its numeric index.
+                               buildParams(
+                                       prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
+                                       v,
+                                       traditional,
+                                       add
+                               );
+                       }
+               } );
+
+       } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+
+               // Serialize object item.
+               for ( name in obj ) {
+                       buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+               }
+
+       } else {
+
+               // Serialize scalar item.
+               add( prefix, obj );
+       }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+       var prefix,
+               s = [],
+               add = function( key, valueOrFunction ) {
+
+                       // If value is a function, invoke it and use its return value
+                       var value = jQuery.isFunction( valueOrFunction ) ?
+                               valueOrFunction() :
+                               valueOrFunction;
+
+                       s[ s.length ] = encodeURIComponent( key ) + "=" +
+                               encodeURIComponent( value == null ? "" : value );
+               };
+
+       // If an array was passed in, assume that it is an array of form elements.
+       if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+
+               // Serialize the form elements
+               jQuery.each( a, function() {
+                       add( this.name, this.value );
+               } );
+
+       } else {
+
+               // If traditional, encode the "old" way (the way 1.3.2 or older
+               // did it), otherwise encode params recursively.
+               for ( prefix in a ) {
+                       buildParams( prefix, a[ prefix ], traditional, add );
+               }
+       }
+
+       // Return the resulting serialization
+       return s.join( "&" );
+};
+
+jQuery.fn.extend( {
+       serialize: function() {
+               return jQuery.param( this.serializeArray() );
+       },
+       serializeArray: function() {
+               return this.map( function() {
+
+                       // Can add propHook for "elements" to filter or add form elements
+                       var elements = jQuery.prop( this, "elements" );
+                       return elements ? jQuery.makeArray( elements ) : this;
+               } )
+               .filter( function() {
+                       var type = this.type;
+
+                       // Use .is( ":disabled" ) so that fieldset[disabled] works
+                       return this.name && !jQuery( this ).is( ":disabled" ) &&
+                               rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+                               ( this.checked || !rcheckableType.test( type ) );
+               } )
+               .map( function( i, elem ) {
+                       var val = jQuery( this ).val();
+
+                       if ( val == null ) {
+                               return null;
+                       }
+
+                       if ( jQuery.isArray( val ) ) {
+                               return jQuery.map( val, function( val ) {
+                                       return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+                               } );
+                       }
+
+                       return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+               } ).get();
+       }
+} );
+
+
+var
+       r20 = /%20/g,
+       rhash = /#.*$/,
+       rantiCache = /([?&])_=[^&]*/,
+       rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+
+       // #7653, #8125, #8152: local protocol detection
+       rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+       rnoContent = /^(?:GET|HEAD)$/,
+       rprotocol = /^\/\//,
+
+       /* Prefilters
+        * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+        * 2) These are called:
+        *    - BEFORE asking for a transport
+        *    - AFTER param serialization (s.data is a string if s.processData is true)
+        * 3) key is the dataType
+        * 4) the catchall symbol "*" can be used
+        * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+        */
+       prefilters = {},
+
+       /* Transports bindings
+        * 1) key is the dataType
+        * 2) the catchall symbol "*" can be used
+        * 3) selection will start with transport dataType and THEN go to "*" if needed
+        */
+       transports = {},
+
+       // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+       allTypes = "*/".concat( "*" ),
+
+       // Anchor tag for parsing the document origin
+       originAnchor = document.createElement( "a" );
+       originAnchor.href = location.href;
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+       // dataTypeExpression is optional and defaults to "*"
+       return function( dataTypeExpression, func ) {
+
+               if ( typeof dataTypeExpression !== "string" ) {
+                       func = dataTypeExpression;
+                       dataTypeExpression = "*";
+               }
+
+               var dataType,
+                       i = 0,
+                       dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
+
+               if ( jQuery.isFunction( func ) ) {
+
+                       // For each dataType in the dataTypeExpression
+                       while ( ( dataType = dataTypes[ i++ ] ) ) {
+
+                               // Prepend if requested
+                               if ( dataType[ 0 ] === "+" ) {
+                                       dataType = dataType.slice( 1 ) || "*";
+                                       ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
+
+                               // Otherwise append
+                               } else {
+                                       ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
+                               }
+                       }
+               }
+       };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+       var inspected = {},
+               seekingTransport = ( structure === transports );
+
+       function inspect( dataType ) {
+               var selected;
+               inspected[ dataType ] = true;
+               jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+                       var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+                       if ( typeof dataTypeOrTransport === "string" &&
+                               !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+
+                               options.dataTypes.unshift( dataTypeOrTransport );
+                               inspect( dataTypeOrTransport );
+                               return false;
+                       } else if ( seekingTransport ) {
+                               return !( selected = dataTypeOrTransport );
+                       }
+               } );
+               return selected;
+       }
+
+       return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+       var key, deep,
+               flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+       for ( key in src ) {
+               if ( src[ key ] !== undefined ) {
+                       ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+               }
+       }
+       if ( deep ) {
+               jQuery.extend( true, target, deep );
+       }
+
+       return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+       var ct, type, finalDataType, firstDataType,
+               contents = s.contents,
+               dataTypes = s.dataTypes;
+
+       // Remove auto dataType and get content-type in the process
+       while ( dataTypes[ 0 ] === "*" ) {
+               dataTypes.shift();
+               if ( ct === undefined ) {
+                       ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
+               }
+       }
+
+       // Check if we're dealing with a known content-type
+       if ( ct ) {
+               for ( type in contents ) {
+                       if ( contents[ type ] && contents[ type ].test( ct ) ) {
+                               dataTypes.unshift( type );
+                               break;
+                       }
+               }
+       }
+
+       // Check to see if we have a response for the expected dataType
+       if ( dataTypes[ 0 ] in responses ) {
+               finalDataType = dataTypes[ 0 ];
+       } else {
+
+               // Try convertible dataTypes
+               for ( type in responses ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
+                               finalDataType = type;
+                               break;
+                       }
+                       if ( !firstDataType ) {
+                               firstDataType = type;
+                       }
+               }
+
+               // Or just use first one
+               finalDataType = finalDataType || firstDataType;
+       }
+
+       // If we found a dataType
+       // We add the dataType to the list if needed
+       // and return the corresponding response
+       if ( finalDataType ) {
+               if ( finalDataType !== dataTypes[ 0 ] ) {
+                       dataTypes.unshift( finalDataType );
+               }
+               return responses[ finalDataType ];
+       }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+       var conv2, current, conv, tmp, prev,
+               converters = {},
+
+               // Work with a copy of dataTypes in case we need to modify it for conversion
+               dataTypes = s.dataTypes.slice();
+
+       // Create converters map with lowercased keys
+       if ( dataTypes[ 1 ] ) {
+               for ( conv in s.converters ) {
+                       converters[ conv.toLowerCase() ] = s.converters[ conv ];
+               }
+       }
+
+       current = dataTypes.shift();
+
+       // Convert to each sequential dataType
+       while ( current ) {
+
+               if ( s.responseFields[ current ] ) {
+                       jqXHR[ s.responseFields[ current ] ] = response;
+               }
+
+               // Apply the dataFilter if provided
+               if ( !prev && isSuccess && s.dataFilter ) {
+                       response = s.dataFilter( response, s.dataType );
+               }
+
+               prev = current;
+               current = dataTypes.shift();
+
+               if ( current ) {
+
+                       // There's only work to do if current dataType is non-auto
+                       if ( current === "*" ) {
+
+                               current = prev;
+
+                       // Convert response if prev dataType is non-auto and differs from current
+                       } else if ( prev !== "*" && prev !== current ) {
+
+                               // Seek a direct converter
+                               conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+                               // If none found, seek a pair
+                               if ( !conv ) {
+                                       for ( conv2 in converters ) {
+
+                                               // If conv2 outputs current
+                                               tmp = conv2.split( " " );
+                                               if ( tmp[ 1 ] === current ) {
+
+                                                       // If prev can be converted to accepted input
+                                                       conv = converters[ prev + " " + tmp[ 0 ] ] ||
+                                                               converters[ "* " + tmp[ 0 ] ];
+                                                       if ( conv ) {
+
+                                                               // Condense equivalence converters
+                                                               if ( conv === true ) {
+                                                                       conv = converters[ conv2 ];
+
+                                                               // Otherwise, insert the intermediate dataType
+                                                               } else if ( converters[ conv2 ] !== true ) {
+                                                                       current = tmp[ 0 ];
+                                                                       dataTypes.unshift( tmp[ 1 ] );
+                                                               }
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               // Apply converter (if not an equivalence)
+                               if ( conv !== true ) {
+
+                                       // Unless errors are allowed to bubble, catch and return them
+                                       if ( conv && s.throws ) {
+                                               response = conv( response );
+                                       } else {
+                                               try {
+                                                       response = conv( response );
+                                               } catch ( e ) {
+                                                       return {
+                                                               state: "parsererror",
+                                                               error: conv ? e : "No conversion from " + prev + " to " + current
+                                                       };
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
+       return { state: "success", data: response };
+}
+
+jQuery.extend( {
+
+       // Counter for holding the number of active queries
+       active: 0,
+
+       // Last-Modified header cache for next request
+       lastModified: {},
+       etag: {},
+
+       ajaxSettings: {
+               url: location.href,
+               type: "GET",
+               isLocal: rlocalProtocol.test( location.protocol ),
+               global: true,
+               processData: true,
+               async: true,
+               contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+
+               /*
+               timeout: 0,
+               data: null,
+               dataType: null,
+               username: null,
+               password: null,
+               cache: null,
+               throws: false,
+               traditional: false,
+               headers: {},
+               */
+
+               accepts: {
+                       "*": allTypes,
+                       text: "text/plain",
+                       html: "text/html",
+                       xml: "application/xml, text/xml",
+                       json: "application/json, text/javascript"
+               },
+
+               contents: {
+                       xml: /\bxml\b/,
+                       html: /\bhtml/,
+                       json: /\bjson\b/
+               },
+
+               responseFields: {
+                       xml: "responseXML",
+                       text: "responseText",
+                       json: "responseJSON"
+               },
+
+               // Data converters
+               // Keys separate source (or catchall "*") and destination types with a single space
+               converters: {
+
+                       // Convert anything to text
+                       "* text": String,
+
+                       // Text to html (true = no transformation)
+                       "text html": true,
+
+                       // Evaluate text as a json expression
+                       "text json": JSON.parse,
+
+                       // Parse text as xml
+                       "text xml": jQuery.parseXML
+               },
+
+               // For options that shouldn't be deep extended:
+               // you can add your own custom options here if
+               // and when you create one that shouldn't be
+               // deep extended (see ajaxExtend)
+               flatOptions: {
+                       url: true,
+                       context: true
+               }
+       },
+
+       // Creates a full fledged settings object into target
+       // with both ajaxSettings and settings fields.
+       // If target is omitted, writes into ajaxSettings.
+       ajaxSetup: function( target, settings ) {
+               return settings ?
+
+                       // Building a settings object
+                       ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+                       // Extending ajaxSettings
+                       ajaxExtend( jQuery.ajaxSettings, target );
+       },
+
+       ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+       ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+       // Main method
+       ajax: function( url, options ) {
+
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
+                       options = url;
+                       url = undefined;
+               }
+
+               // Force options to be an object
+               options = options || {};
+
+               var transport,
+
+                       // URL without anti-cache param
+                       cacheURL,
+
+                       // Response headers
+                       responseHeadersString,
+                       responseHeaders,
+
+                       // timeout handle
+                       timeoutTimer,
+
+                       // Url cleanup var
+                       urlAnchor,
+
+                       // Request state (becomes false upon send and true upon completion)
+                       completed,
+
+                       // To know if global events are to be dispatched
+                       fireGlobals,
+
+                       // Loop variable
+                       i,
+
+                       // uncached part of the url
+                       uncached,
+
+                       // Create the final options object
+                       s = jQuery.ajaxSetup( {}, options ),
+
+                       // Callbacks context
+                       callbackContext = s.context || s,
+
+                       // Context for global events is callbackContext if it is a DOM node or jQuery collection
+                       globalEventContext = s.context &&
+                               ( callbackContext.nodeType || callbackContext.jquery ) ?
+                                       jQuery( callbackContext ) :
+                                       jQuery.event,
+
+                       // Deferreds
+                       deferred = jQuery.Deferred(),
+                       completeDeferred = jQuery.Callbacks( "once memory" ),
+
+                       // Status-dependent callbacks
+                       statusCode = s.statusCode || {},
+
+                       // Headers (they are sent all at once)
+                       requestHeaders = {},
+                       requestHeadersNames = {},
+
+                       // Default abort message
+                       strAbort = "canceled",
+
+                       // Fake xhr
+                       jqXHR = {
+                               readyState: 0,
+
+                               // Builds headers hashtable if needed
+                               getResponseHeader: function( key ) {
+                                       var match;
+                                       if ( completed ) {
+                                               if ( !responseHeaders ) {
+                                                       responseHeaders = {};
+                                                       while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                               responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
+                                                       }
+                                               }
+                                               match = responseHeaders[ key.toLowerCase() ];
+                                       }
+                                       return match == null ? null : match;
+                               },
+
+                               // Raw string
+                               getAllResponseHeaders: function() {
+                                       return completed ? responseHeadersString : null;
+                               },
+
+                               // Caches the header
+                               setRequestHeader: function( name, value ) {
+                                       if ( completed == null ) {
+                                               name = requestHeadersNames[ name.toLowerCase() ] =
+                                                       requestHeadersNames[ name.toLowerCase() ] || name;
+                                               requestHeaders[ name ] = value;
+                                       }
+                                       return this;
+                               },
+
+                               // Overrides response content-type header
+                               overrideMimeType: function( type ) {
+                                       if ( completed == null ) {
+                                               s.mimeType = type;
+                                       }
+                                       return this;
+                               },
+
+                               // Status-dependent callbacks
+                               statusCode: function( map ) {
+                                       var code;
+                                       if ( map ) {
+                                               if ( completed ) {
+
+                                                       // Execute the appropriate callbacks
+                                                       jqXHR.always( map[ jqXHR.status ] );
+                                               } else {
+
+                                                       // Lazy-add the new callbacks in a way that preserves old ones
+                                                       for ( code in map ) {
+                                                               statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+                                                       }
+                                               }
+                                       }
+                                       return this;
+                               },
+
+                               // Cancel the request
+                               abort: function( statusText ) {
+                                       var finalText = statusText || strAbort;
+                                       if ( transport ) {
+                                               transport.abort( finalText );
+                                       }
+                                       done( 0, finalText );
+                                       return this;
+                               }
+                       };
+
+               // Attach deferreds
+               deferred.promise( jqXHR );
+
+               // Add protocol if not provided (prefilters might expect it)
+               // Handle falsy url in the settings object (#10093: consistency with old signature)
+               // We also use the url parameter if available
+               s.url = ( ( url || s.url || location.href ) + "" )
+                       .replace( rprotocol, location.protocol + "//" );
+
+               // Alias method option to type as per ticket #12004
+               s.type = options.method || options.type || s.method || s.type;
+
+               // Extract dataTypes list
+               s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
+
+               // A cross-domain request is in order when the origin doesn't match the current origin.
+               if ( s.crossDomain == null ) {
+                       urlAnchor = document.createElement( "a" );
+
+                       // Support: IE <=8 - 11, Edge 12 - 13
+                       // IE throws exception on accessing the href property if url is malformed,
+                       // e.g. http://example.com:80x/
+                       try {
+                               urlAnchor.href = s.url;
+
+                               // Support: IE <=8 - 11 only
+                               // Anchor's host property isn't correctly set when s.url is relative
+                               urlAnchor.href = urlAnchor.href;
+                               s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
+                                       urlAnchor.protocol + "//" + urlAnchor.host;
+                       } catch ( e ) {
+
+                               // If there is an error parsing the URL, assume it is crossDomain,
+                               // it can be rejected by the transport if it is invalid
+                               s.crossDomain = true;
+                       }
+               }
+
+               // Convert data if not already a string
+               if ( s.data && s.processData && typeof s.data !== "string" ) {
+                       s.data = jQuery.param( s.data, s.traditional );
+               }
+
+               // Apply prefilters
+               inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+               // If request was aborted inside a prefilter, stop there
+               if ( completed ) {
+                       return jqXHR;
+               }
+
+               // We can fire global events as of now if asked to
+               // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+               fireGlobals = jQuery.event && s.global;
+
+               // Watch for a new set of requests
+               if ( fireGlobals && jQuery.active++ === 0 ) {
+                       jQuery.event.trigger( "ajaxStart" );
+               }
+
+               // Uppercase the type
+               s.type = s.type.toUpperCase();
+
+               // Determine if request has content
+               s.hasContent = !rnoContent.test( s.type );
+
+               // Save the URL in case we're toying with the If-Modified-Since
+               // and/or If-None-Match header later on
+               // Remove hash to simplify url manipulation
+               cacheURL = s.url.replace( rhash, "" );
+
+               // More options handling for requests with no content
+               if ( !s.hasContent ) {
+
+                       // Remember the hash so we can put it back
+                       uncached = s.url.slice( cacheURL.length );
+
+                       // If data is available, append data to url
+                       if ( s.data ) {
+                               cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
+
+                               // #9682: remove data so that it's not used in an eventual retry
+                               delete s.data;
+                       }
+
+                       // Add or update anti-cache param if needed
+                       if ( s.cache === false ) {
+                               cacheURL = cacheURL.replace( rantiCache, "$1" );
+                               uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
+                       }
+
+                       // Put hash and anti-cache on the URL that will be requested (gh-1732)
+                       s.url = cacheURL + uncached;
+
+               // Change '%20' to '+' if this is encoded form body content (gh-2658)
+               } else if ( s.data && s.processData &&
+                       ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
+                       s.data = s.data.replace( r20, "+" );
+               }
+
+               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+               if ( s.ifModified ) {
+                       if ( jQuery.lastModified[ cacheURL ] ) {
+                               jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+                       }
+                       if ( jQuery.etag[ cacheURL ] ) {
+                               jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+                       }
+               }
+
+               // Set the correct header, if data is being sent
+               if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+                       jqXHR.setRequestHeader( "Content-Type", s.contentType );
+               }
+
+               // Set the Accepts header for the server, depending on the dataType
+               jqXHR.setRequestHeader(
+                       "Accept",
+                       s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
+                               s.accepts[ s.dataTypes[ 0 ] ] +
+                                       ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                               s.accepts[ "*" ]
+               );
+
+               // Check for headers option
+               for ( i in s.headers ) {
+                       jqXHR.setRequestHeader( i, s.headers[ i ] );
+               }
+
+               // Allow custom headers/mimetypes and early abort
+               if ( s.beforeSend &&
+                       ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
+
+                       // Abort if not done already and return
+                       return jqXHR.abort();
+               }
+
+               // Aborting is no longer a cancellation
+               strAbort = "abort";
+
+               // Install callbacks on deferreds
+               completeDeferred.add( s.complete );
+               jqXHR.done( s.success );
+               jqXHR.fail( s.error );
+
+               // Get transport
+               transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+               // If no transport, we auto-abort
+               if ( !transport ) {
+                       done( -1, "No Transport" );
+               } else {
+                       jqXHR.readyState = 1;
+
+                       // Send global event
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+                       }
+
+                       // If request was aborted inside ajaxSend, stop there
+                       if ( completed ) {
+                               return jqXHR;
+                       }
+
+                       // Timeout
+                       if ( s.async && s.timeout > 0 ) {
+                               timeoutTimer = window.setTimeout( function() {
+                                       jqXHR.abort( "timeout" );
+                               }, s.timeout );
+                       }
+
+                       try {
+                               completed = false;
+                               transport.send( requestHeaders, done );
+                       } catch ( e ) {
+
+                               // Rethrow post-completion exceptions
+                               if ( completed ) {
+                                       throw e;
+                               }
+
+                               // Propagate others as results
+                               done( -1, e );
+                       }
+               }
+
+               // Callback for when everything is done
+               function done( status, nativeStatusText, responses, headers ) {
+                       var isSuccess, success, error, response, modified,
+                               statusText = nativeStatusText;
+
+                       // Ignore repeat invocations
+                       if ( completed ) {
+                               return;
+                       }
+
+                       completed = true;
+
+                       // Clear timeout if it exists
+                       if ( timeoutTimer ) {
+                               window.clearTimeout( timeoutTimer );
+                       }
+
+                       // Dereference transport for early garbage collection
+                       // (no matter how long the jqXHR object will be used)
+                       transport = undefined;
+
+                       // Cache response headers
+                       responseHeadersString = headers || "";
+
+                       // Set readyState
+                       jqXHR.readyState = status > 0 ? 4 : 0;
+
+                       // Determine if successful
+                       isSuccess = status >= 200 && status < 300 || status === 304;
+
+                       // Get response data
+                       if ( responses ) {
+                               response = ajaxHandleResponses( s, jqXHR, responses );
+                       }
+
+                       // Convert no matter what (that way responseXXX fields are always set)
+                       response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+                       // If successful, handle type chaining
+                       if ( isSuccess ) {
+
+                               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                               if ( s.ifModified ) {
+                                       modified = jqXHR.getResponseHeader( "Last-Modified" );
+                                       if ( modified ) {
+                                               jQuery.lastModified[ cacheURL ] = modified;
+                                       }
+                                       modified = jqXHR.getResponseHeader( "etag" );
+                                       if ( modified ) {
+                                               jQuery.etag[ cacheURL ] = modified;
+                                       }
+                               }
+
+                               // if no content
+                               if ( status === 204 || s.type === "HEAD" ) {
+                                       statusText = "nocontent";
+
+                               // if not modified
+                               } else if ( status === 304 ) {
+                                       statusText = "notmodified";
+
+                               // If we have data, let's convert it
+                               } else {
+                                       statusText = response.state;
+                                       success = response.data;
+                                       error = response.error;
+                                       isSuccess = !error;
+                               }
+                       } else {
+
+                               // Extract error from statusText and normalize for non-aborts
+                               error = statusText;
+                               if ( status || !statusText ) {
+                                       statusText = "error";
+                                       if ( status < 0 ) {
+                                               status = 0;
+                                       }
+                               }
+                       }
+
+                       // Set data for the fake xhr object
+                       jqXHR.status = status;
+                       jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+                       // Success/Error
+                       if ( isSuccess ) {
+                               deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                       } else {
+                               deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                       }
+
+                       // Status-dependent callbacks
+                       jqXHR.statusCode( statusCode );
+                       statusCode = undefined;
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+                                       [ jqXHR, s, isSuccess ? success : error ] );
+                       }
+
+                       // Complete
+                       completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+
+                               // Handle the global AJAX counter
+                               if ( !( --jQuery.active ) ) {
+                                       jQuery.event.trigger( "ajaxStop" );
+                               }
+                       }
+               }
+
+               return jqXHR;
+       },
+
+       getJSON: function( url, data, callback ) {
+               return jQuery.get( url, data, callback, "json" );
+       },
+
+       getScript: function( url, callback ) {
+               return jQuery.get( url, undefined, callback, "script" );
+       }
+} );
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+       jQuery[ method ] = function( url, data, callback, type ) {
+
+               // Shift arguments if data argument was omitted
+               if ( jQuery.isFunction( data ) ) {
+                       type = type || callback;
+                       callback = data;
+                       data = undefined;
+               }
+
+               // The url can be an options object (which then must have .url)
+               return jQuery.ajax( jQuery.extend( {
+                       url: url,
+                       type: method,
+                       dataType: type,
+                       data: data,
+                       success: callback
+               }, jQuery.isPlainObject( url ) && url ) );
+       };
+} );
+
+
+jQuery._evalUrl = function( url ) {
+       return jQuery.ajax( {
+               url: url,
+
+               // Make this explicit, since user can override this through ajaxSetup (#11264)
+               type: "GET",
+               dataType: "script",
+               cache: true,
+               async: false,
+               global: false,
+               "throws": true
+       } );
+};
+
+
+jQuery.fn.extend( {
+       wrapAll: function( html ) {
+               var wrap;
+
+               if ( this[ 0 ] ) {
+                       if ( jQuery.isFunction( html ) ) {
+                               html = html.call( this[ 0 ] );
+                       }
+
+                       // The elements to wrap the target around
+                       wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+                       if ( this[ 0 ].parentNode ) {
+                               wrap.insertBefore( this[ 0 ] );
+                       }
+
+                       wrap.map( function() {
+                               var elem = this;
+
+                               while ( elem.firstElementChild ) {
+                                       elem = elem.firstElementChild;
+                               }
+
+                               return elem;
+                       } ).append( this );
+               }
+
+               return this;
+       },
+
+       wrapInner: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each( function( i ) {
+                               jQuery( this ).wrapInner( html.call( this, i ) );
+                       } );
+               }
+
+               return this.each( function() {
+                       var self = jQuery( this ),
+                               contents = self.contents();
+
+                       if ( contents.length ) {
+                               contents.wrapAll( html );
+
+                       } else {
+                               self.append( html );
+                       }
+               } );
+       },
+
+       wrap: function( html ) {
+               var isFunction = jQuery.isFunction( html );
+
+               return this.each( function( i ) {
+                       jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
+               } );
+       },
+
+       unwrap: function( selector ) {
+               this.parent( selector ).not( "body" ).each( function() {
+                       jQuery( this ).replaceWith( this.childNodes );
+               } );
+               return this;
+       }
+} );
+
+
+jQuery.expr.pseudos.hidden = function( elem ) {
+       return !jQuery.expr.pseudos.visible( elem );
+};
+jQuery.expr.pseudos.visible = function( elem ) {
+       return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
+};
+
+
+
+
+jQuery.ajaxSettings.xhr = function() {
+       try {
+               return new window.XMLHttpRequest();
+       } catch ( e ) {}
+};
+
+var xhrSuccessStatus = {
+
+               // File protocol always yields status code 0, assume 200
+               0: 200,
+
+               // Support: IE <=9 only
+               // #1450: sometimes IE returns 1223 when it should be 204
+               1223: 204
+       },
+       xhrSupported = jQuery.ajaxSettings.xhr();
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport( function( options ) {
+       var callback, errorCallback;
+
+       // Cross domain only allowed if supported through XMLHttpRequest
+       if ( support.cors || xhrSupported && !options.crossDomain ) {
+               return {
+                       send: function( headers, complete ) {
+                               var i,
+                                       xhr = options.xhr();
+
+                               xhr.open(
+                                       options.type,
+                                       options.url,
+                                       options.async,
+                                       options.username,
+                                       options.password
+                               );
+
+                               // Apply custom fields if provided
+                               if ( options.xhrFields ) {
+                                       for ( i in options.xhrFields ) {
+                                               xhr[ i ] = options.xhrFields[ i ];
+                                       }
+                               }
+
+                               // Override mime type if needed
+                               if ( options.mimeType && xhr.overrideMimeType ) {
+                                       xhr.overrideMimeType( options.mimeType );
+                               }
+
+                               // X-Requested-With header
+                               // For cross-domain requests, seeing as conditions for a preflight are
+                               // akin to a jigsaw puzzle, we simply never set it to be sure.
+                               // (it can always be set on a per-request basis or even using ajaxSetup)
+                               // For same-domain requests, won't change header if already provided.
+                               if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
+                                       headers[ "X-Requested-With" ] = "XMLHttpRequest";
+                               }
+
+                               // Set headers
+                               for ( i in headers ) {
+                                       xhr.setRequestHeader( i, headers[ i ] );
+                               }
+
+                               // Callback
+                               callback = function( type ) {
+                                       return function() {
+                                               if ( callback ) {
+                                                       callback = errorCallback = xhr.onload =
+                                                               xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
+
+                                                       if ( type === "abort" ) {
+                                                               xhr.abort();
+                                                       } else if ( type === "error" ) {
+
+                                                               // Support: IE <=9 only
+                                                               // On a manual native abort, IE9 throws
+                                                               // errors on any property access that is not readyState
+                                                               if ( typeof xhr.status !== "number" ) {
+                                                                       complete( 0, "error" );
+                                                               } else {
+                                                                       complete(
+
+                                                                               // File: protocol always yields status 0; see #8605, #14207
+                                                                               xhr.status,
+                                                                               xhr.statusText
+                                                                       );
+                                                               }
+                                                       } else {
+                                                               complete(
+                                                                       xhrSuccessStatus[ xhr.status ] || xhr.status,
+                                                                       xhr.statusText,
+
+                                                                       // Support: IE <=9 only
+                                                                       // IE9 has no XHR2 but throws on binary (trac-11426)
+                                                                       // For XHR2 non-text, let the caller handle it (gh-2498)
+                                                                       ( xhr.responseType || "text" ) !== "text"  ||
+                                                                       typeof xhr.responseText !== "string" ?
+                                                                               { binary: xhr.response } :
+                                                                               { text: xhr.responseText },
+                                                                       xhr.getAllResponseHeaders()
+                                                               );
+                                                       }
+                                               }
+                                       };
+                               };
+
+                               // Listen to events
+                               xhr.onload = callback();
+                               errorCallback = xhr.onerror = callback( "error" );
+
+                               // Support: IE 9 only
+                               // Use onreadystatechange to replace onabort
+                               // to handle uncaught aborts
+                               if ( xhr.onabort !== undefined ) {
+                                       xhr.onabort = errorCallback;
+                               } else {
+                                       xhr.onreadystatechange = function() {
+
+                                               // Check readyState before timeout as it changes
+                                               if ( xhr.readyState === 4 ) {
+
+                                                       // Allow onerror to be called first,
+                                                       // but that will not handle a native abort
+                                                       // Also, save errorCallback to a variable
+                                                       // as xhr.onerror cannot be accessed
+                                                       window.setTimeout( function() {
+                                                               if ( callback ) {
+                                                                       errorCallback();
+                                                               }
+                                                       } );
+                                               }
+                                       };
+                               }
+
+                               // Create the abort callback
+                               callback = callback( "abort" );
+
+                               try {
+
+                                       // Do send the request (this may raise an exception)
+                                       xhr.send( options.hasContent && options.data || null );
+                               } catch ( e ) {
+
+                                       // #14683: Only rethrow if this hasn't been notified as an error yet
+                                       if ( callback ) {
+                                               throw e;
+                                       }
+                               }
+                       },
+
+                       abort: function() {
+                               if ( callback ) {
+                                       callback();
+                               }
+                       }
+               };
+       }
+} );
+
+
+
+
+// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
+jQuery.ajaxPrefilter( function( s ) {
+       if ( s.crossDomain ) {
+               s.contents.script = false;
+       }
+} );
+
+// Install script dataType
+jQuery.ajaxSetup( {
+       accepts: {
+               script: "text/javascript, application/javascript, " +
+                       "application/ecmascript, application/x-ecmascript"
+       },
+       contents: {
+               script: /\b(?:java|ecma)script\b/
+       },
+       converters: {
+               "text script": function( text ) {
+                       jQuery.globalEval( text );
+                       return text;
+               }
+       }
+} );
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+       if ( s.cache === undefined ) {
+               s.cache = false;
+       }
+       if ( s.crossDomain ) {
+               s.type = "GET";
+       }
+} );
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+
+       // This transport only deals with cross domain requests
+       if ( s.crossDomain ) {
+               var script, callback;
+               return {
+                       send: function( _, complete ) {
+                               script = jQuery( "<script>" ).prop( {
+                                       charset: s.scriptCharset,
+                                       src: s.url
+                               } ).on(
+                                       "load error",
+                                       callback = function( evt ) {
+                                               script.remove();
+                                               callback = null;
+                                               if ( evt ) {
+                                                       complete( evt.type === "error" ? 404 : 200, evt.type );
+                                               }
+                                       }
+                               );
+
+                               // Use native DOM manipulation to avoid our domManip AJAX trickery
+                               document.head.appendChild( script[ 0 ] );
+                       },
+                       abort: function() {
+                               if ( callback ) {
+                                       callback();
+                               }
+                       }
+               };
+       }
+} );
+
+
+
+
+var oldCallbacks = [],
+       rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup( {
+       jsonp: "callback",
+       jsonpCallback: function() {
+               var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+               this[ callback ] = true;
+               return callback;
+       }
+} );
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+       var callbackName, overwritten, responseContainer,
+               jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+                       "url" :
+                       typeof s.data === "string" &&
+                               ( s.contentType || "" )
+                                       .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
+                               rjsonp.test( s.data ) && "data"
+               );
+
+       // Handle iff the expected data type is "jsonp" or we have a parameter to set
+       if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+               // Get callback name, remembering preexisting value associated with it
+               callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+                       s.jsonpCallback() :
+                       s.jsonpCallback;
+
+               // Insert callback into url or form data
+               if ( jsonProp ) {
+                       s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+               } else if ( s.jsonp !== false ) {
+                       s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+               }
+
+               // Use data converter to retrieve json after script execution
+               s.converters[ "script json" ] = function() {
+                       if ( !responseContainer ) {
+                               jQuery.error( callbackName + " was not called" );
+                       }
+                       return responseContainer[ 0 ];
+               };
+
+               // Force json dataType
+               s.dataTypes[ 0 ] = "json";
+
+               // Install callback
+               overwritten = window[ callbackName ];
+               window[ callbackName ] = function() {
+                       responseContainer = arguments;
+               };
+
+               // Clean-up function (fires after converters)
+               jqXHR.always( function() {
+
+                       // If previous value didn't exist - remove it
+                       if ( overwritten === undefined ) {
+                               jQuery( window ).removeProp( callbackName );
+
+                       // Otherwise restore preexisting value
+                       } else {
+                               window[ callbackName ] = overwritten;
+                       }
+
+                       // Save back as free
+                       if ( s[ callbackName ] ) {
+
+                               // Make sure that re-using the options doesn't screw things around
+                               s.jsonpCallback = originalSettings.jsonpCallback;
+
+                               // Save the callback name for future use
+                               oldCallbacks.push( callbackName );
+                       }
+
+                       // Call if it was a function and we have a response
+                       if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+                               overwritten( responseContainer[ 0 ] );
+                       }
+
+                       responseContainer = overwritten = undefined;
+               } );
+
+               // Delegate to script
+               return "script";
+       }
+} );
+
+
+
+
+// Support: Safari 8 only
+// In Safari 8 documents created via document.implementation.createHTMLDocument
+// collapse sibling forms: the second one becomes a child of the first one.
+// Because of that, this security measure has to be disabled in Safari 8.
+// https://bugs.webkit.org/show_bug.cgi?id=137337
+support.createHTMLDocument = ( function() {
+       var body = document.implementation.createHTMLDocument( "" ).body;
+       body.innerHTML = "<form></form><form></form>";
+       return body.childNodes.length === 2;
+} )();
+
+
+// Argument "data" should be string of html
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+       if ( typeof data !== "string" ) {
+               return [];
+       }
+       if ( typeof context === "boolean" ) {
+               keepScripts = context;
+               context = false;
+       }
+
+       var base, parsed, scripts;
+
+       if ( !context ) {
+
+               // Stop scripts or inline event handlers from being executed immediately
+               // by using document.implementation
+               if ( support.createHTMLDocument ) {
+                       context = document.implementation.createHTMLDocument( "" );
+
+                       // Set the base href for the created document
+                       // so any parsed elements with URLs
+                       // are based on the document's URL (gh-2965)
+                       base = context.createElement( "base" );
+                       base.href = document.location.href;
+                       context.head.appendChild( base );
+               } else {
+                       context = document;
+               }
+       }
+
+       parsed = rsingleTag.exec( data );
+       scripts = !keepScripts && [];
+
+       // Single tag
+       if ( parsed ) {
+               return [ context.createElement( parsed[ 1 ] ) ];
+       }
+
+       parsed = buildFragment( [ data ], context, scripts );
+
+       if ( scripts && scripts.length ) {
+               jQuery( scripts ).remove();
+       }
+
+       return jQuery.merge( [], parsed.childNodes );
+};
+
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+       var selector, type, response,
+               self = this,
+               off = url.indexOf( " " );
+
+       if ( off > -1 ) {
+               selector = stripAndCollapse( url.slice( off ) );
+               url = url.slice( 0, off );
+       }
+
+       // If it's a function
+       if ( jQuery.isFunction( params ) ) {
+
+               // We assume that it's the callback
+               callback = params;
+               params = undefined;
+
+       // Otherwise, build a param string
+       } else if ( params && typeof params === "object" ) {
+               type = "POST";
+       }
+
+       // If we have elements to modify, make the request
+       if ( self.length > 0 ) {
+               jQuery.ajax( {
+                       url: url,
+
+                       // If "type" variable is undefined, then "GET" method will be used.
+                       // Make value of this field explicit since
+                       // user can override it through ajaxSetup method
+                       type: type || "GET",
+                       dataType: "html",
+                       data: params
+               } ).done( function( responseText ) {
+
+                       // Save response for use in complete callback
+                       response = arguments;
+
+                       self.html( selector ?
+
+                               // If a selector was specified, locate the right elements in a dummy div
+                               // Exclude scripts to avoid IE 'Permission Denied' errors
+                               jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+                               // Otherwise use the full result
+                               responseText );
+
+               // If the request succeeds, this function gets "data", "status", "jqXHR"
+               // but they are ignored because response was set above.
+               // If it fails, this function gets "jqXHR", "status", "error"
+               } ).always( callback && function( jqXHR, status ) {
+                       self.each( function() {
+                               callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
+                       } );
+               } );
+       }
+
+       return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [
+       "ajaxStart",
+       "ajaxStop",
+       "ajaxComplete",
+       "ajaxError",
+       "ajaxSuccess",
+       "ajaxSend"
+], function( i, type ) {
+       jQuery.fn[ type ] = function( fn ) {
+               return this.on( type, fn );
+       };
+} );
+
+
+
+
+jQuery.expr.pseudos.animated = function( elem ) {
+       return jQuery.grep( jQuery.timers, function( fn ) {
+               return elem === fn.elem;
+       } ).length;
+};
+
+
+
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+       return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+       setOffset: function( elem, options, i ) {
+               var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+                       position = jQuery.css( elem, "position" ),
+                       curElem = jQuery( elem ),
+                       props = {};
+
+               // Set position first, in-case top/left are set even on static elem
+               if ( position === "static" ) {
+                       elem.style.position = "relative";
+               }
+
+               curOffset = curElem.offset();
+               curCSSTop = jQuery.css( elem, "top" );
+               curCSSLeft = jQuery.css( elem, "left" );
+               calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+                       ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
+
+               // Need to be able to calculate position if either
+               // top or left is auto and position is either absolute or fixed
+               if ( calculatePosition ) {
+                       curPosition = curElem.position();
+                       curTop = curPosition.top;
+                       curLeft = curPosition.left;
+
+               } else {
+                       curTop = parseFloat( curCSSTop ) || 0;
+                       curLeft = parseFloat( curCSSLeft ) || 0;
+               }
+
+               if ( jQuery.isFunction( options ) ) {
+
+                       // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
+                       options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
+               }
+
+               if ( options.top != null ) {
+                       props.top = ( options.top - curOffset.top ) + curTop;
+               }
+               if ( options.left != null ) {
+                       props.left = ( options.left - curOffset.left ) + curLeft;
+               }
+
+               if ( "using" in options ) {
+                       options.using.call( elem, props );
+
+               } else {
+                       curElem.css( props );
+               }
+       }
+};
+
+jQuery.fn.extend( {
+       offset: function( options ) {
+
+               // Preserve chaining for setter
+               if ( arguments.length ) {
+                       return options === undefined ?
+                               this :
+                               this.each( function( i ) {
+                                       jQuery.offset.setOffset( this, options, i );
+                               } );
+               }
+
+               var docElem, win, rect, doc,
+                       elem = this[ 0 ];
+
+               if ( !elem ) {
+                       return;
+               }
+
+               // Support: IE <=11 only
+               // Running getBoundingClientRect on a
+               // disconnected node in IE throws an error
+               if ( !elem.getClientRects().length ) {
+                       return { top: 0, left: 0 };
+               }
+
+               rect = elem.getBoundingClientRect();
+
+               // Make sure element is not hidden (display: none)
+               if ( rect.width || rect.height ) {
+                       doc = elem.ownerDocument;
+                       win = getWindow( doc );
+                       docElem = doc.documentElement;
+
+                       return {
+                               top: rect.top + win.pageYOffset - docElem.clientTop,
+                               left: rect.left + win.pageXOffset - docElem.clientLeft
+                       };
+               }
+
+               // Return zeros for disconnected and hidden elements (gh-2310)
+               return rect;
+       },
+
+       position: function() {
+               if ( !this[ 0 ] ) {
+                       return;
+               }
+
+               var offsetParent, offset,
+                       elem = this[ 0 ],
+                       parentOffset = { top: 0, left: 0 };
+
+               // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+               // because it is its only offset parent
+               if ( jQuery.css( elem, "position" ) === "fixed" ) {
+
+                       // Assume getBoundingClientRect is there when computed position is fixed
+                       offset = elem.getBoundingClientRect();
+
+               } else {
+
+                       // Get *real* offsetParent
+                       offsetParent = this.offsetParent();
+
+                       // Get correct offsets
+                       offset = this.offset();
+                       if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+                               parentOffset = offsetParent.offset();
+                       }
+
+                       // Add offsetParent borders
+                       parentOffset = {
+                               top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),
+                               left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )
+                       };
+               }
+
+               // Subtract parent offsets and element margins
+               return {
+                       top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+                       left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+               };
+       },
+
+       // This method will return documentElement in the following cases:
+       // 1) For the element inside the iframe without offsetParent, this method will return
+       //    documentElement of the parent window
+       // 2) For the hidden or detached element
+       // 3) For body or html element, i.e. in case of the html node - it will return itself
+       //
+       // but those exceptions were never presented as a real life use-cases
+       // and might be considered as more preferable results.
+       //
+       // This logic, however, is not guaranteed and can change at any point in the future
+       offsetParent: function() {
+               return this.map( function() {
+                       var offsetParent = this.offsetParent;
+
+                       while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
+                               offsetParent = offsetParent.offsetParent;
+                       }
+
+                       return offsetParent || documentElement;
+               } );
+       }
+} );
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+       var top = "pageYOffset" === prop;
+
+       jQuery.fn[ method ] = function( val ) {
+               return access( this, function( elem, method, val ) {
+                       var win = getWindow( elem );
+
+                       if ( val === undefined ) {
+                               return win ? win[ prop ] : elem[ method ];
+                       }
+
+                       if ( win ) {
+                               win.scrollTo(
+                                       !top ? val : win.pageXOffset,
+                                       top ? val : win.pageYOffset
+                               );
+
+                       } else {
+                               elem[ method ] = val;
+                       }
+               }, method, val, arguments.length );
+       };
+} );
+
+// Support: Safari <=7 - 9.1, Chrome <=37 - 49
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+       jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+               function( elem, computed ) {
+                       if ( computed ) {
+                               computed = curCSS( elem, prop );
+
+                               // If curCSS returns percentage, fallback to offset
+                               return rnumnonpx.test( computed ) ?
+                                       jQuery( elem ).position()[ prop ] + "px" :
+                                       computed;
+                       }
+               }
+       );
+} );
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+       jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
+               function( defaultExtra, funcName ) {
+
+               // Margin is only for outerHeight, outerWidth
+               jQuery.fn[ funcName ] = function( margin, value ) {
+                       var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+                               extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+                       return access( this, function( elem, type, value ) {
+                               var doc;
+
+                               if ( jQuery.isWindow( elem ) ) {
+
+                                       // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
+                                       return funcName.indexOf( "outer" ) === 0 ?
+                                               elem[ "inner" + name ] :
+                                               elem.document.documentElement[ "client" + name ];
+                               }
+
+                               // Get document width or height
+                               if ( elem.nodeType === 9 ) {
+                                       doc = elem.documentElement;
+
+                                       // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+                                       // whichever is greatest
+                                       return Math.max(
+                                               elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+                                               elem.body[ "offset" + name ], doc[ "offset" + name ],
+                                               doc[ "client" + name ]
+                                       );
+                               }
+
+                               return value === undefined ?
+
+                                       // Get width or height on the element, requesting but not forcing parseFloat
+                                       jQuery.css( elem, type, extra ) :
+
+                                       // Set width or height on the element
+                                       jQuery.style( elem, type, value, extra );
+                       }, type, chainable ? margin : undefined, chainable );
+               };
+       } );
+} );
+
+
+jQuery.fn.extend( {
+
+       bind: function( types, data, fn ) {
+               return this.on( types, null, data, fn );
+       },
+       unbind: function( types, fn ) {
+               return this.off( types, null, fn );
+       },
+
+       delegate: function( selector, types, data, fn ) {
+               return this.on( types, selector, data, fn );
+       },
+       undelegate: function( selector, types, fn ) {
+
+               // ( namespace ) or ( selector, types [, fn] )
+               return arguments.length === 1 ?
+                       this.off( selector, "**" ) :
+                       this.off( types, selector || "**", fn );
+       }
+} );
+
+jQuery.parseJSON = JSON.parse;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+       define( "jquery", [], function() {
+               return jQuery;
+       } );
+}
+
+
+
+
+var
+
+       // Map over jQuery in case of overwrite
+       _jQuery = window.jQuery,
+
+       // Map over the $ in case of overwrite
+       _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+       if ( window.$ === jQuery ) {
+               window.$ = _$;
+       }
+
+       if ( deep && window.jQuery === jQuery ) {
+               window.jQuery = _jQuery;
+       }
+
+       return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( !noGlobal ) {
+       window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+
+return jQuery;
+} );
diff --git a/js/jquery.sparkline.js b/js/jquery.sparkline.js
new file mode 100644 (file)
index 0000000..3ffb051
--- /dev/null
@@ -0,0 +1,3001 @@
+/**
+*
+* jquery.sparkline.js
+*
+* v2.0
+* (c) Splunk, Inc
+* Contact: Gareth Watts (gareth@splunk.com)
+* http://omnipotent.net/jquery.sparkline/
+*
+* Generates inline sparkline charts from data supplied either to the method
+* or inline in HTML
+*
+* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
+* (Firefox 2.0+, Safari, Opera, etc)
+*
+* License: New BSD License
+*
+* Copyright (c) 2012, Splunk Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+*     * Redistributions of source code must retain the above copyright notice,
+*       this list of conditions and the following disclaimer.
+*     * Redistributions in binary form must reproduce the above copyright notice,
+*       this list of conditions and the following disclaimer in the documentation
+*       and/or other materials provided with the distribution.
+*     * Neither the name of Splunk Inc nor the names of its contributors may
+*       be used to endorse or promote products derived from this software without
+*       specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*
+* Usage:
+*  $(selector).sparkline(values, options)
+*
+* If values is undefined or set to 'html' then the data values are read from the specified tag:
+*   <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
+*   $('.sparkline').sparkline();
+* There must be no spaces in the enclosed data set
+*
+* Otherwise values must be an array of numbers or null values
+*    <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
+*    $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
+*    $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
+*
+* Values can also be specified in an HTML comment, or as a values attribute:
+*    <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
+*    <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
+*    $('.sparkline').sparkline();
+*
+* For line charts, x values can also be specified:
+*   <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
+*    $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
+*
+* By default, options should be passed in as teh second argument to the sparkline function:
+*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
+*
+* Options can also be set by passing them on the tag itself.  This feature is disabled by default though
+* as there's a slight performance overhead:
+*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
+*   <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
+* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
+*
+* Supported options:
+*   lineColor - Color of the line used for the chart
+*   fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
+*   width - Width of the chart - Defaults to 3 times the number of values in pixels
+*   height - Height of the chart - Defaults to the height of the containing element
+*   chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
+*   chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
+*   chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
+*   chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
+*   chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
+*   composite - If true then don't erase any existing chart attached to the tag, but draw
+*           another chart over the top - Note that width and height are ignored if an
+*           existing chart is detected.
+*   tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
+*   enableTagOptions - Whether to check tags for sparkline options
+*   tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
+*   disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
+*           hidden dom element, avoding a browser reflow
+*   disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
+*       making the plugin perform much like it did in 1.x
+*   disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
+*   disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
+*       defaults to false (highlights enabled)
+*   highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
+*   tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
+*   tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
+*   tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
+*   tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
+*   tooltipFormatter  - Optional callback that allows you to override the HTML displayed in the tooltip
+*       callback is given arguments of (sparkline, options, fields)
+*   tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
+*   tooltipFormat - A format string or SPFormat object  (or an array thereof for multiple entries)
+*       to control the format of the tooltip
+*   tooltipPrefix - A string to prepend to each field displayed in a tooltip
+*   tooltipSuffix - A string to append to each field displayed in a tooltip
+*   tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
+*   tooltipValueLookups - An object or range map to map field values to tooltip strings
+*       (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
+*   numberFormatter - Optional callback for formatting numbers in tooltips
+*   numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
+*   numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
+*   numberDigitGroupCount - Number of digits between group separator - Defaults to 3
+*
+* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
+* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
+*    line - Line chart.  Options:
+*       spotColor - Set to '' to not end each line in a circular spot
+*       minSpotColor - If set, color of spot at minimum value
+*       maxSpotColor - If set, color of spot at maximum value
+*       spotRadius - Radius in pixels
+*       lineWidth - Width of line in pixels
+*       normalRangeMin
+*       normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
+*                      or expected range of values
+*       normalRangeColor - Color to use for the above bar
+*       drawNormalOnTop - Draw the normal range above the chart fill color if true
+*       defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
+*       highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
+*       highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
+*       valueSpots - Specify which points to draw spots on, and in which color.  Accepts a range map
+*
+*   bar - Bar chart.  Options:
+*       barColor - Color of bars for postive values
+*       negBarColor - Color of bars for negative values
+*       zeroColor - Color of bars with zero values
+*       nullColor - Color of bars with null values - Defaults to omitting the bar entirely
+*       barWidth - Width of bars in pixels
+*       colorMap - Optional mappnig of values to colors to override the *BarColor values above
+*                  can be an Array of values to control the color of individual bars or a range map
+*                  to specify colors for individual ranges of values
+*       barSpacing - Gap between bars in pixels
+*       zeroAxis - Centers the y-axis around zero if true
+*
+*   tristate - Charts values of win (>0), lose (<0) or draw (=0)
+*       posBarColor - Color of win values
+*       negBarColor - Color of lose values
+*       zeroBarColor - Color of draw values
+*       barWidth - Width of bars in pixels
+*       barSpacing - Gap between bars in pixels
+*       colorMap - Optional mappnig of values to colors to override the *BarColor values above
+*                  can be an Array of values to control the color of individual bars or a range map
+*                  to specify colors for individual ranges of values
+*
+*   discrete - Options:
+*       lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
+*       thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
+*       thresholdColor
+*
+*   bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
+*       options:
+*       targetColor - The color of the vertical target marker
+*       targetWidth - The width of the target marker in pixels
+*       performanceColor - The color of the performance measure horizontal bar
+*       rangeColors - Colors to use for each qualitative range background color
+*
+*   pie - Pie chart. Options:
+*       sliceColors - An array of colors to use for pie slices
+*       offset - Angle in degrees to offset the first slice - Try -90 or +90
+*       borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
+*       borderColor - Color to use for the pie chart border - Defaults to #000
+*
+*   box - Box plot. Options:
+*       raw - Set to true to supply pre-computed plot points as values
+*             values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
+*             When set to false you can supply any number of values and the box plot will
+*             be computed for you.  Default is false.
+*       showOutliers - Set to true (default) to display outliers as circles
+*       outlierIRQ - Interquartile range used to determine outliers.  Default 1.5
+*       boxLineColor - Outline color of the box
+*       boxFillColor - Fill color for the box
+*       whiskerColor - Line color used for whiskers
+*       outlierLineColor - Outline color of outlier circles
+*       outlierFillColor - Fill color of the outlier circles
+*       spotRadius - Radius of outlier circles
+*       medianColor - Line color of the median line
+*       target - Draw a target cross hair at the supplied value (default undefined)
+*
+*
+*
+*   Examples:
+*   $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
+*   $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
+*   $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
+*   $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
+*   $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
+*   $('#pie').sparkline([1,1,2], { type:'pie' });
+*/
+
+/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
+
+(function ($) {
+    'use strict';
+
+    var UNSET_OPTION = {},
+        getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
+        remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
+        MouseHandler, Tooltip, barHighlightMixin,
+        line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
+         VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
+
+    /**
+     * Default configuration settings
+     */
+    getDefaults = function () {
+        return {
+            // Settings common to most/all chart types
+            common: {
+                type: 'line',
+                lineColor: '#00f',
+                fillColor: '#cdf',
+                defaultPixelsPerValue: 3,
+                width: 'auto',
+                height: 'auto',
+                composite: false,
+                tagValuesAttribute: 'values',
+                tagOptionsPrefix: 'spark',
+                enableTagOptions: false,
+                enableHighlight: true,
+                highlightLighten: 1.4,
+                tooltipSkipNull: true,
+                tooltipPrefix: '',
+                tooltipSuffix: '',
+                disableHiddenCheck: false,
+                numberFormatter: false,
+                numberDigitGroupCount: 3,
+                numberDigitGroupSep: ',',
+                numberDecimalMark: '.',
+                disableTooltips: false,
+                disableInteraction: false
+            },
+            // Defaults for line charts
+            line: {
+                spotColor: '#f80',
+                highlightSpotColor: '#5f5',
+                highlightLineColor: '#f22',
+                spotRadius: 1.5,
+                minSpotColor: '#f80',
+                maxSpotColor: '#f80',
+                lineWidth: 1,
+                normalRangeMin: undefined,
+                normalRangeMax: undefined,
+                normalRangeColor: '#ccc',
+                drawNormalOnTop: false,
+                chartRangeMin: undefined,
+                chartRangeMax: undefined,
+                chartRangeMinX: undefined,
+                chartRangeMaxX: undefined,
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')
+            },
+            // Defaults for bar charts
+            bar: {
+                barColor: '#3366cc',
+                negBarColor: '#f44',
+                stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+                    '#dd4477', '#0099c6', '#990099'],
+                zeroColor: undefined,
+                nullColor: undefined,
+                zeroAxis: true,
+                barWidth: 4,
+                barSpacing: 1,
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                chartRangeClip: false,
+                colorMap: undefined,
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')
+            },
+            // Defaults for tristate charts
+            tristate: {
+                barWidth: 4,
+                barSpacing: 1,
+                posBarColor: '#6f6',
+                negBarColor: '#f44',
+                zeroBarColor: '#999',
+                colorMap: {},
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),
+                tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
+            },
+            // Defaults for discrete charts
+            discrete: {
+                lineHeight: 'auto',
+                thresholdColor: undefined,
+                thresholdValue: 0,
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                chartRangeClip: false,
+                tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
+            },
+            // Defaults for bullet charts
+            bullet: {
+                targetColor: '#f33',
+                targetWidth: 3, // width of the target bar in pixels
+                performanceColor: '#33f',
+                rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
+                base: undefined, // set this to a number to change the base start number
+                tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
+                tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
+            },
+            // Defaults for pie charts
+            pie: {
+                offset: 0,
+                sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+                    '#dd4477', '#0099c6', '#990099'],
+                borderWidth: 0,
+                borderColor: '#000',
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')
+            },
+            // Defaults for box plots
+            box: {
+                raw: false,
+                boxLineColor: '#000',
+                boxFillColor: '#cdf',
+                whiskerColor: '#000',
+                outlierLineColor: '#333',
+                outlierFillColor: '#fff',
+                medianColor: '#f00',
+                showOutliers: true,
+                outlierIQR: 1.5,
+                spotRadius: 1.5,
+                target: undefined,
+                targetColor: '#4a2',
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
+                tooltipFormatFieldlistKey: 'field',
+                tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
+                    uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
+                    lw: 'Left Whisker', rw: 'Right Whisker'} }
+            }
+        };
+    };
+
+    // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
+    defaultStyles = '.jqstooltip { ' +
+            'position: absolute;' +
+            'left: 0px;' +
+            'top: 0px;' +
+            'visibility: hidden;' +
+            'background: rgb(0, 0, 0) transparent;' +
+            'background-color: rgba(0,0,0,0.6);' +
+            'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
+            '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
+            'color: white;' +
+            'font: 10px arial, san serif;' +
+            'text-align: left;' +
+            'white-space: nowrap;' +
+            'padding: 5px;' +
+            'border: 1px solid white;' +
+            '}' +
+            '.jqsfield { ' +
+            'color: white;' +
+            'font: 10px arial, san serif;' +
+            'text-align: left;' +
+            '}';
+
+    initStyles = function() {
+        addCSS(defaultStyles);
+    };
+
+    $(initStyles);
+
+    /**
+     * Utilities
+     */
+
+    createClass = function (/* [baseclass, [mixin, ...]], definition */) {
+        var Class, args;
+        Class = function () {
+            this.init.apply(this, arguments);
+        };
+        if (arguments.length > 1) {
+            if (arguments[0]) {
+                Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
+                Class._super = arguments[0].prototype;
+            } else {
+                Class.prototype = arguments[arguments.length - 1];
+            }
+            if (arguments.length > 2) {
+                args = Array.prototype.slice.call(arguments, 1, -1);
+                args.unshift(Class.prototype);
+                $.extend.apply($, args);
+            }
+        } else {
+            Class.prototype = arguments[0];
+        }
+        Class.prototype.cls = Class;
+        return Class;
+    };
+
+    /**
+     * Wraps a format string for tooltips
+     * {{x}}
+     * {{x.2}
+     * {{x:months}}
+     */
+    $.SPFormatClass = SPFormat = createClass({
+        fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
+        precre: /(\w+)\.(\d+)/,
+
+        init: function (format, fclass) {
+            this.format = format;
+            this.fclass = fclass;
+        },
+
+        render: function (fieldset, lookups, options) {
+            var self = this,
+                fields = fieldset,
+                match, token, lookupkey, fieldvalue, prec;
+            return this.format.replace(this.fre, function () {
+                var lookup;
+                token = arguments[1];
+                lookupkey = arguments[3];
+                match = self.precre.exec(token);
+                if (match) {
+                    prec = match[2];
+                    token = match[1];
+                } else {
+                    prec = false;
+                }
+                fieldvalue = fields[token];
+                if (fieldvalue === undefined) {
+                    return '';
+                }
+                if (lookupkey && lookups && lookups[lookupkey]) {
+                    lookup = lookups[lookupkey];
+                    if (lookup.get) { // RangeMap
+                        return lookups[lookupkey].get(fieldvalue) || fieldvalue;
+                    } else {
+                        return lookups[lookupkey][fieldvalue] || fieldvalue;
+                    }
+                }
+                if (isNumber(fieldvalue)) {
+                    if (options.get('numberFormatter')) {
+                        fieldvalue = options.get('numberFormatter')(fieldvalue);
+                    } else {
+                        fieldvalue = formatNumber(fieldvalue, prec,
+                            options.get('numberDigitGroupCount'),
+                            options.get('numberDigitGroupSep'),
+                            options.get('numberDecimalMark'));
+                    }
+                }
+                return fieldvalue;
+            });
+        }
+    });
+
+    // convience method to avoid needing the new operator
+    $.spformat = function(format, fclass) {
+        return new SPFormat(format, fclass);
+    };
+
+    clipval = function (val, min, max) {
+        if (val < min) {
+            return min;
+        }
+        if (val > max) {
+            return max;
+        }
+        return val;
+    };
+
+    quartile = function (values, q) {
+        var vl;
+        if (q === 2) {
+            vl = Math.floor(values.length / 2);
+            return values.length % 2 ? values[vl] : (values[vl] + values[vl + 1]) / 2;
+        } else {
+            vl = Math.floor(values.length / 4);
+            return values.length % 2 ? (values[vl * q] + values[vl * q + 1]) / 2 : values[vl * q];
+        }
+    };
+
+    normalizeValue = function (val) {
+        var nf;
+        switch (val) {
+            case 'undefined':
+                val = undefined;
+                break;
+            case 'null':
+                val = null;
+                break;
+            case 'true':
+                val = true;
+                break;
+            case 'false':
+                val = false;
+                break;
+            default:
+                nf = parseFloat(val);
+                if (val == nf) {
+                    val = nf;
+                }
+        }
+        return val;
+    };
+
+    normalizeValues = function (vals) {
+        var i, result = [];
+        for (i = vals.length; i--;) {
+            result[i] = normalizeValue(vals[i]);
+        }
+        return result;
+    };
+
+    remove = function (vals, filter) {
+        var i, vl, result = [];
+        for (i = 0, vl = vals.length; i < vl; i++) {
+            if (vals[i] !== filter) {
+                result.push(vals[i]);
+            }
+        }
+        return result;
+    };
+
+    isNumber = function (num) {
+        return !isNaN(parseFloat(num)) && isFinite(num);
+    };
+
+    formatNumber = function (num, prec, groupsize, groupsep, decsep) {
+        var p, i;
+        num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
+        p = (p = $.inArray('.', num)) < 0 ? num.length : p;
+        if (p < num.length) {
+            num[p] = decsep;
+        }
+        for (i = p - groupsize; i > 0; i -= groupsize) {
+            num.splice(i, 0, groupsep);
+        }
+        return num.join('');
+    };
+
+    // determine if all values of an array match a value
+    // returns true if the array is empty
+    all = function (val, arr, ignoreNull) {
+        var i;
+        for (i = arr.length; i--; ) {
+            if (arr[i] !== val || (!ignoreNull && val === null)) {
+                return false;
+            }
+        }
+        return true;
+    };
+
+    // sums the numeric values in an array, ignoring other values
+    sum = function (vals) {
+        var total = 0, i;
+        for (i = vals.length; i--;) {
+            total += typeof vals[i] === 'number' ? vals[i] : 0;
+        }
+        return total;
+    };
+
+    ensureArray = function (val) {
+        return $.isArray(val) ? val : [val];
+    };
+
+    // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
+    addCSS = function(css) {
+        var tag;
+        //if ('\v' == 'v') /* ie only */ {
+        if (document.createStyleSheet) {
+            document.createStyleSheet().cssText = css;
+        } else {
+            tag = document.createElement('style');
+            tag.type = 'text/css';
+            document.getElementsByTagName('head')[0].appendChild(tag);
+            tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
+        }
+    };
+
+    // Provide a cross-browser interface to a few simple drawing primitives
+    $.fn.simpledraw = function (width, height, useExisting, interact) {
+        var target, mhandler;
+        if (useExisting && (target = this.data('_jqs_vcanvas'))) {
+            return target;
+        }
+        if (width === undefined) {
+            width = $(this).innerWidth();
+        }
+        if (height === undefined) {
+            height = $(this).innerHeight();
+        }
+        if ($.browser.hasCanvas) {
+            target = new VCanvas_canvas(width, height, this, interact);
+        } else if ($.browser.msie) {
+            target = new VCanvas_vml(width, height, this);
+        } else {
+            return false;
+        }
+        mhandler = $(this).data('_jqs_mhandler');
+        if (mhandler) {
+            mhandler.registerCanvas(target);
+        }
+        return target;
+    };
+
+    $.fn.cleardraw = function () {
+        var target = this.data('_jqs_vcanvas');
+        if (target) {
+            target.reset();
+        }
+    };
+
+    $.RangeMapClass = RangeMap = createClass({
+        init: function (map) {
+            var key, range, rangelist = [];
+            for (key in map) {
+                if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
+                    range = key.split(':');
+                    range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
+                    range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
+                    range[2] = map[key];
+                    rangelist.push(range);
+                }
+            }
+            this.map = map;
+            this.rangelist = rangelist || false;
+        },
+
+        get: function (value) {
+            var rangelist = this.rangelist,
+                i, range, result;
+            if ((result = this.map[value]) !== undefined) {
+                return result;
+            }
+            if (rangelist) {
+                for (i = rangelist.length; i--;) {
+                    range = rangelist[i];
+                    if (range[0] <= value && range[1] >= value) {
+                        return range[2];
+                    }
+                }
+            }
+            return undefined;
+        }
+    });
+
+    // Convenience function
+    $.range_map = function(map) {
+        return new RangeMap(map);
+    };
+
+    MouseHandler = createClass({
+        init: function (el, options) {
+            var $el = $(el);
+            this.$el = $el;
+            this.options = options;
+            this.currentPageX = 0;
+            this.currentPageY = 0;
+            this.el = el;
+            this.splist = [];
+            this.tooltip = null;
+            this.over = false;
+            this.displayTooltips = !options.get('disableTooltips');
+            this.highlightEnabled = !options.get('disableHighlight');
+        },
+
+        registerSparkline: function (sp) {
+            this.splist.push(sp);
+            if (this.over) {
+                this.updateDisplay();
+            }
+        },
+
+        registerCanvas: function (canvas) {
+            var $canvas = $(canvas.canvas);
+            this.canvas = canvas;
+            this.$canvas = $canvas;
+            $canvas.mouseenter($.proxy(this.mouseenter, this));
+            $canvas.mouseleave($.proxy(this.mouseleave, this));
+            $canvas.click($.proxy(this.mouseclick, this));
+        },
+
+        reset: function (removeTooltip) {
+            this.splist = [];
+            if (this.tooltip && removeTooltip) {
+                this.tooltip.remove();
+                this.tooltip = undefined;
+            }
+        },
+
+        mouseclick: function (e) {
+            var clickEvent = $.Event('sparklineClick');
+            clickEvent.originalEvent = e;
+            clickEvent.sparklines = this.splist;
+            this.$el.trigger(clickEvent);
+        },
+
+        mouseenter: function (e) {
+            $(document.body).unbind('mousemove.jqs');
+            $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
+            this.over = true;
+            this.currentPageX = e.pageX;
+            this.currentPageY = e.pageY;
+            this.currentEl = e.target;
+            if (!this.tooltip && this.displayTooltips) {
+                this.tooltip = new Tooltip(this.options);
+                this.tooltip.updatePosition(e.pageX, e.pageY);
+            }
+            this.updateDisplay();
+        },
+
+        mouseleave: function () {
+            $(document.body).unbind('mousemove.jqs');
+            var splist = this.splist,
+                 spcount = splist.length,
+                 needsRefresh = false,
+                 sp, i;
+            this.over = false;
+            this.currentEl = null;
+
+            if (this.tooltip) {
+                this.tooltip.remove();
+                this.tooltip = null;
+            }
+
+            for (i = 0; i < spcount; i++) {
+                sp = splist[i];
+                if (sp.clearRegionHighlight()) {
+                    needsRefresh = true;
+                }
+            }
+
+            if (needsRefresh) {
+                this.canvas.render();
+            }
+        },
+
+        mousemove: function (e) {
+            this.currentPageX = e.pageX;
+            this.currentPageY = e.pageY;
+            this.currentEl = e.target;
+            if (this.tooltip) {
+                this.tooltip.updatePosition(e.pageX, e.pageY);
+            }
+            this.updateDisplay();
+        },
+
+        updateDisplay: function () {
+            var splist = this.splist,
+                 spcount = splist.length,
+                 needsRefresh = false,
+                 offset = this.$canvas.offset(),
+                 localX = this.currentPageX - offset.left,
+                 localY = this.currentPageY - offset.top,
+                 tooltiphtml, sp, i, result, changeEvent;
+            if (!this.over) {
+                return;
+            }
+            for (i = 0; i < spcount; i++) {
+                sp = splist[i];
+                result = sp.setRegionHighlight(this.currentEl, localX, localY);
+                if (result) {
+                    needsRefresh = true;
+                }
+            }
+            if (needsRefresh) {
+                changeEvent = $.Event('sparklineRegionChange');
+                changeEvent.sparklines = this.splist;
+                this.$el.trigger(changeEvent);
+                if (this.tooltip) {
+                    tooltiphtml = '';
+                    for (i = 0; i < spcount; i++) {
+                        sp = splist[i];
+                        tooltiphtml += sp.getCurrentRegionTooltip();
+                    }
+                    this.tooltip.setContent(tooltiphtml);
+                }
+                if (!this.disableHighlight) {
+                    this.canvas.render();
+                }
+            }
+            if (result === null) {
+                this.mouseleave();
+            }
+        }
+    });
+
+
+    Tooltip = createClass({
+        sizeStyle: 'position: static !important;' +
+            'display: block !important;' +
+            'visibility: hidden !important;' +
+            'float: left !important;',
+
+        init: function (options) {
+            var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
+                sizetipStyle = this.sizeStyle,
+                offset;
+            this.container = options.get('tooltipContainer') || document.body;
+            this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
+            this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
+            // remove any previous lingering tooltip
+            $('#jqssizetip').remove();
+            $('#jqstooltip').remove();
+            this.sizetip = $('<div/>', {
+                id: 'jqssizetip',
+                style: sizetipStyle,
+                'class': tooltipClassname
+            });
+            this.tooltip = $('<div/>', {
+                id: 'jqstooltip',
+                'class': tooltipClassname
+            }).appendTo(this.container);
+            // account for the container's location
+            offset = this.tooltip.offset();
+            this.offsetLeft = offset.left;
+            this.offsetTop = offset.top;
+            this.hidden = true;
+            $(window).unbind('resize.jqs scroll.jqs');
+            $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
+            this.updateWindowDims();
+        },
+
+        updateWindowDims: function () {
+            this.scrollTop = $(window).scrollTop();
+            this.scrollLeft = $(window).scrollLeft();
+            this.scrollRight = this.scrollLeft + $(window).width();
+            this.updatePosition();
+        },
+
+        getSize: function (content) {
+            this.sizetip.html(content).appendTo(this.container);
+            this.width = this.sizetip.width() + 1;
+            this.height = this.sizetip.height();
+            this.sizetip.remove();
+        },
+
+        setContent: function (content) {
+            if (!content) {
+                this.tooltip.css('visibility', 'hidden');
+                this.hidden = true;
+                return;
+            }
+            this.getSize(content);
+            this.tooltip.html(content)
+                .css({
+                    'width': this.width,
+                    'height': this.height,
+                    'visibility': 'visible'
+                });
+            if (this.hidden) {
+                this.hidden = false;
+                this.updatePosition();
+            }
+        },
+
+        updatePosition: function (x, y) {
+            if (x === undefined) {
+                if (this.mousex === undefined) {
+                    return;
+                }
+                x = this.mousex - this.offsetLeft;
+                y = this.mousey - this.offsetTop;
+
+            } else {
+                this.mousex = x = x - this.offsetLeft;
+                this.mousey = y = y - this.offsetTop;
+            }
+            if (!this.height || !this.width || this.hidden) {
+                return;
+            }
+
+            y -= this.height + this.tooltipOffsetY;
+            x += this.tooltipOffsetX;
+
+            if (y < this.scrollTop) {
+                y = this.scrollTop;
+            }
+            if (x < this.scrollLeft) {
+                x = this.scrollLeft;
+            } else if (x + this.width > this.scrollRight) {
+                x = this.scrollRight - this.width;
+            }
+
+            this.tooltip.css({
+                'left': x,
+                'top': y
+            });
+        },
+
+        remove: function () {
+            this.tooltip.remove();
+            this.sizetip.remove();
+            this.sizetip = this.tooltip = undefined;
+            $(window).unbind('resize.jqs scroll.jqs');
+        }
+    });
+
+    pending = [];
+    $.fn.sparkline = function (userValues, userOptions) {
+        return this.each(function () {
+            var options = new $.fn.sparkline.options(this, userOptions),
+                 $this = $(this),
+                 render, i;
+            render = function () {
+                var values, width, height, tmp, mhandler, sp, vals;
+                if (userValues === 'html' || userValues === undefined) {
+                    vals = this.getAttribute(options.get('tagValuesAttribute'));
+                    if (vals === undefined || vals === null) {
+                        vals = $this.html();
+                    }
+                    values = vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g, '').split(',');
+                } else {
+                    values = userValues;
+                }
+
+                width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
+                if (options.get('height') === 'auto') {
+                    if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
+                        // must be a better way to get the line height
+                        tmp = document.createElement('span');
+                        tmp.innerHTML = 'a';
+                        $this.html(tmp);
+                        height = $(tmp).innerHeight() || $(tmp).height();
+                        $(tmp).remove();
+                        tmp = null;
+                    }
+                } else {
+                    height = options.get('height');
+                }
+
+                if (!options.get('disableInteraction')) {
+                    mhandler = $.data(this, '_jqs_mhandler');
+                    if (!mhandler) {
+                        mhandler = new MouseHandler(this, options);
+                        $.data(this, '_jqs_mhandler', mhandler);
+                    } else if (!options.get('composite')) {
+                        mhandler.reset();
+                    }
+                } else {
+                    mhandler = false;
+                }
+
+                if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
+                    if (!$.data(this, '_jqs_errnotify')) {
+                        alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
+                        $.data(this, '_jqs_errnotify', true);
+                    }
+                    return;
+                }
+
+                sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
+
+                sp.render();
+
+                if (mhandler) {
+                    mhandler.registerSparkline(sp);
+                }
+            };
+            // jQuery 1.3.0 completely changed the meaning of :hidden :-/
+            if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || ($.fn.jquery < '1.3.0' && $(this).parents().is(':hidden')) || !$(this).parents('body').length) {
+                if (!options.get('composite') && $.data(this, '_jqs_pending')) {
+                    // remove any existing references to the element
+                    for (i = pending.length; i; i--) {
+                        if (pending[i - 1][0] == this) {
+                            pending.splice(i - 1, 1);
+                        }
+                    }
+                }
+                pending.push([this, render]);
+                $.data(this, '_jqs_pending', true);
+            } else {
+                render.call(this);
+            }
+        });
+    };
+
+    $.fn.sparkline.defaults = getDefaults();
+
+
+    $.sparkline_display_visible = function () {
+        var el, i, pl;
+        var done = [];
+        for (i = 0, pl = pending.length; i < pl; i++) {
+            el = pending[i][0];
+            if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
+                pending[i][1].call(el);
+                $.data(pending[i][0], '_jqs_pending', false);
+                done.push(i);
+            } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
+                // element has been inserted and removed from the DOM
+                // If it was not yet inserted into the dom then the .data request
+                // will return true.
+                // removing from the dom causes the data to be removed.
+                $.data(pending[i][0], '_jqs_pending', false);
+                done.push(i);
+            }
+        }
+        for (i = done.length; i; i--) {
+            pending.splice(done[i - 1], 1);
+        }
+    };
+
+
+    /**
+     * User option handler
+     */
+    $.fn.sparkline.options = createClass({
+        init: function (tag, userOptions) {
+            var extendedOptions, defaults, base, tagOptionType;
+            this.userOptions = userOptions = userOptions || {};
+            this.tag = tag;
+            this.tagValCache = {};
+            defaults = $.fn.sparkline.defaults;
+            base = defaults.common;
+            this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
+
+            tagOptionType = this.getTagSetting('type');
+            if (tagOptionType === UNSET_OPTION) {
+                extendedOptions = defaults[userOptions.type || base.type];
+            } else {
+                extendedOptions = defaults[tagOptionType];
+            }
+            this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
+        },
+
+
+        getTagSetting: function (key) {
+            var prefix = this.tagOptionsPrefix,
+                val, i, pairs, keyval;
+            if (prefix === false || prefix === undefined) {
+                return UNSET_OPTION;
+            }
+            if (this.tagValCache.hasOwnProperty(key)) {
+                val = this.tagValCache.key;
+            } else {
+                val = this.tag.getAttribute(prefix + key);
+                if (val === undefined || val === null) {
+                    val = UNSET_OPTION;
+                } else if (val.substr(0, 1) === '[') {
+                    val = val.substr(1, val.length - 2).split(',');
+                    for (i = val.length; i--;) {
+                        val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
+                    }
+                } else if (val.substr(0, 1) === '{') {
+                    pairs = val.substr(1, val.length - 2).split(',');
+                    val = {};
+                    for (i = pairs.length; i--;) {
+                        keyval = pairs[i].split(':', 2);
+                        val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
+                    }
+                } else {
+                    val = normalizeValue(val);
+                }
+                this.tagValCache.key = val;
+            }
+            return val;
+        },
+
+        get: function (key, defaultval) {
+            var tagOption = this.getTagSetting(key),
+                result;
+            if (tagOption !== UNSET_OPTION) {
+                return tagOption;
+            }
+            return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
+        }
+    });
+
+
+    $.fn.sparkline._base = createClass({
+        disabled: false,
+
+        init: function (el, values, options, width, height) {
+            this.el = el;
+            this.$el = $(el);
+            this.values = values;
+            this.options = options;
+            this.width = width;
+            this.height = height;
+            this.currentRegion = undefined;
+        },
+
+        /**
+         * Setup the canvas
+         */
+        initTarget: function () {
+            var interactive = !this.options.get('disableInteraction');
+            if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
+                this.disabled = true;
+            } else {
+                this.canvasWidth = this.target.pixelWidth;
+                this.canvasHeight = this.target.pixelHeight;
+            }
+        },
+
+        /**
+         * Actually render the chart to the canvas
+         */
+        render: function () {
+            if (this.disabled) {
+                this.el.innerHTML = '';
+                return false;
+            }
+            return true;
+        },
+
+        /**
+         * Return a region id for a given x/y co-ordinate
+         */
+        getRegion: function (x, y) {
+        },
+
+        /**
+         * Highlight an item based on the moused-over x,y co-ordinate
+         */
+        setRegionHighlight: function (el, x, y) {
+            var currentRegion = this.currentRegion,
+                highlightEnabled = !this.options.get('disableHighlight'),
+                newRegion;
+            if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
+                return null;
+            }
+            newRegion = this.getRegion(el, x, y);
+            if (currentRegion !== newRegion) {
+                if (currentRegion !== undefined && highlightEnabled) {
+                    this.removeHighlight();
+                }
+                this.currentRegion = newRegion;
+                if (newRegion !== undefined && highlightEnabled) {
+                    this.renderHighlight();
+                }
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Reset any currently highlighted item
+         */
+        clearRegionHighlight: function () {
+            if (this.currentRegion !== undefined) {
+                this.removeHighlight();
+                this.currentRegion = undefined;
+                return true;
+            }
+            return false;
+        },
+
+        renderHighlight: function () {
+            this.changeHighlight(true);
+        },
+
+        removeHighlight: function () {
+            this.changeHighlight(false);
+        },
+
+        changeHighlight: function (highlight)  {},
+
+        /**
+         * Fetch the HTML to display as a tooltip
+         */
+        getCurrentRegionTooltip: function () {
+            var options = this.options,
+                header = '',
+                entries = [],
+                fields, formats, formatlen, fclass, text, i,
+                showFields, showFieldsKey, newFields, fv,
+                formatter, format, fieldlen, j;
+            if (this.currentRegion === undefined) {
+                return '';
+            }
+            fields = this.getCurrentRegionFields();
+            formatter = options.get('tooltipFormatter');
+            if (formatter) {
+                return formatter(this, options, fields);
+            }
+            if (options.get('tooltipChartTitle')) {
+                header += '<div class="jqs jqstitle">' + options.get('tooltipChartTitle') + '</div>\n';
+            }
+            formats = this.options.get('tooltipFormat');
+            if (!formats) {
+                return '';
+            }
+            if (!$.isArray(formats)) {
+                formats = [formats];
+            }
+            if (!$.isArray(fields)) {
+                fields = [fields];
+            }
+            showFields = this.options.get('tooltipFormatFieldlist');
+            showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
+            if (showFields && showFieldsKey) {
+                // user-selected ordering of fields
+                newFields = [];
+                for (i = fields.length; i--;) {
+                    fv = fields[i][showFieldsKey];
+                    if ((j = $.inArray(fv, showFields)) != -1) {
+                        newFields[j] = fields[i];
+                    }
+                }
+                fields = newFields;
+            }
+            formatlen = formats.length;
+            fieldlen = fields.length;
+            for (i = 0; i < formatlen; i++) {
+                format = formats[i];
+                if (typeof format === 'string') {
+                    format = new SPFormat(format);
+                }
+                fclass = format.fclass || 'jqsfield';
+                for (j = 0; j < fieldlen; j++) {
+                    if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
+                        $.extend(fields[j], {
+                            prefix: options.get('tooltipPrefix'),
+                            suffix: options.get('tooltipSuffix')
+                        });
+                        text = format.render(fields[j], options.get('tooltipValueLookups'), options);
+                        entries.push('<div class="' + fclass + '">' + text + '</div>');
+                    }
+                }
+            }
+            if (entries.length) {
+                return header + entries.join('\n');
+            }
+            return '';
+        },
+
+        getCurrentRegionFields: function () {},
+
+        calcHighlightColor: function (color, options) {
+            var highlightColor = options.get('highlightColor'),
+                lighten = options.get('highlightLighten'),
+                parse, mult, rgbnew, i;
+            if (highlightColor) {
+                return highlightColor;
+            }
+            if (lighten) {
+                // extract RGB values
+                parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
+                if (parse) {
+                    rgbnew = [];
+                    mult = color.length === 4 ? 16 : 1;
+                    for (i = 0; i < 3; i++) {
+                        rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);
+                    }
+                    return 'rgb(' + rgbnew.join(',') + ')';
+                }
+
+            }
+            return color;
+        }
+
+    });
+
+    barHighlightMixin = {
+        changeHighlight: function (highlight) {
+            var currentRegion = this.currentRegion,
+                target = this.target,
+                shapeids = this.regionShapes[currentRegion],
+                newShapes;
+            // will be null if the region value was null
+            if (shapeids) {
+                newShapes = this.renderRegion(currentRegion, highlight);
+                if ($.isArray(newShapes) || $.isArray(shapeids)) {
+                    target.replaceWithShapes(shapeids, newShapes);
+                    this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {
+                        return newShape.id;
+                    });
+                } else {
+                    target.replaceWithShape(shapeids, newShapes);
+                    this.regionShapes[currentRegion] = newShapes.id;
+                }
+            }
+        },
+
+        render: function () {
+            var values = this.values,
+                target = this.target,
+                regionShapes = this.regionShapes,
+                shapes, ids, i, j;
+
+            if (!this.cls._super.render.call(this)) {
+                return;
+            }
+            for (i = values.length; i--;) {
+                shapes = this.renderRegion(i);
+                if (shapes) {
+                    if ($.isArray(shapes)) {
+                        ids = [];
+                        for (j = shapes.length; j--;) {
+                            shapes[j].append();
+                            ids.push(shapes[j].id);
+                        }
+                        regionShapes[i] = ids;
+                    } else {
+                        shapes.append();
+                        regionShapes[i] = shapes.id; // store just the shapeid
+                    }
+                } else {
+                    // null value
+                    regionShapes[i] = null;
+                }
+            }
+            target.render();
+        }
+    };
+
+    /**
+     * Line charts
+     */
+    $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {
+        type: 'line',
+
+        init: function (el, values, options, width, height) {
+            line._super.init.call(this, el, values, options, width, height);
+            this.vertices = [];
+            this.regionMap = [];
+            this.xvalues = [];
+            this.yvalues = [];
+            this.yminmax = [];
+            this.hightlightSpotId = null;
+            this.lastShapeId = null;
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            var i,
+                regionMap = this.regionMap; // maps regions to value positions
+            for (i = regionMap.length; i--;) {
+                if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {
+                    return regionMap[i][2];
+                }
+            }
+            return undefined;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.yvalues[currentRegion] === null,
+                x: this.xvalues[currentRegion],
+                y: this.yvalues[currentRegion],
+                color: this.options.get('lineColor'),
+                fillColor: this.options.get('fillColor'),
+                offset: currentRegion
+            };
+        },
+
+        renderHighlight: function () {
+            var currentRegion = this.currentRegion,
+                target = this.target,
+                vertex = this.vertices[currentRegion],
+                options = this.options,
+                spotRadius = options.get('spotRadius'),
+                highlightSpotColor = options.get('highlightSpotColor'),
+                highlightLineColor = options.get('highlightLineColor'),
+                highlightSpot, highlightLine;
+
+            if (!vertex) {
+                return;
+            }
+            if (spotRadius && highlightSpotColor) {
+                highlightSpot = target.drawCircle(vertex[0], vertex[1],
+                    spotRadius, undefined, highlightSpotColor);
+                this.highlightSpotId = highlightSpot.id;
+                target.insertAfterShape(this.lastShapeId, highlightSpot);
+            }
+            if (highlightLineColor) {
+                highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],
+                    this.canvasTop + this.canvasHeight, highlightLineColor);
+                this.highlightLineId = highlightLine.id;
+                target.insertAfterShape(this.lastShapeId, highlightLine);
+            }
+        },
+
+        removeHighlight: function () {
+            var target = this.target;
+            if (this.highlightSpotId) {
+                target.removeShapeId(this.highlightSpotId);
+                this.highlightSpotId = null;
+            }
+            if (this.highlightLineId) {
+                target.removeShapeId(this.highlightLineId);
+                this.highlightLineId = null;
+            }
+        },
+
+        scanValues: function () {
+            var values = this.values,
+                valcount = values.length,
+                xvalues = this.xvalues,
+                yvalues = this.yvalues,
+                yminmax = this.yminmax,
+                i, val, isStr, isArray, sp;
+            for (i = 0; i < valcount; i++) {
+                val = values[i];
+                isStr = typeof(values[i]) === 'string';
+                isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;
+                sp = isStr && values[i].split(':');
+                if (isStr && sp.length === 2) { // x:y
+                    xvalues.push(Number(sp[0]));
+                    yvalues.push(Number(sp[1]));
+                    yminmax.push(Number(sp[1]));
+                } else if (isArray) {
+                    xvalues.push(val[0]);
+                    yvalues.push(val[1]);
+                    yminmax.push(val[1]);
+                } else {
+                    xvalues.push(i);
+                    if (values[i] === null || values[i] === 'null') {
+                        yvalues.push(null);
+                    } else {
+                        yvalues.push(Number(val));
+                        yminmax.push(Number(val));
+                    }
+                }
+            }
+            if (this.options.get('xvalues')) {
+                xvalues = this.options.get('xvalues');
+            }
+
+            this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);
+            this.miny = this.minyorg = Math.min.apply(Math, yminmax);
+
+            this.maxx = Math.max.apply(Math, xvalues);
+            this.minx = Math.min.apply(Math, xvalues);
+
+            this.xvalues = xvalues;
+            this.yvalues = yvalues;
+            this.yminmax = yminmax;
+
+        },
+
+        processRangeOptions: function () {
+            var options = this.options,
+                normalRangeMin = options.get('normalRangeMin'),
+                normalRangeMax = options.get('normalRangeMax');
+
+            if (normalRangeMin !== undefined) {
+                if (normalRangeMin < this.miny) {
+                    this.miny = normalRangeMin;
+                }
+                if (normalRangeMax > this.maxy) {
+                    this.maxy = normalRangeMax;
+                }
+            }
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {
+                this.miny = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {
+                this.maxy = options.get('chartRangeMax');
+            }
+            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
+                this.minx = options.get('chartRangeMinX');
+            }
+            if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {
+                this.maxx = options.get('chartRangeMaxX');
+            }
+
+        },
+
+        drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {
+            var normalRangeMin = this.options.get('normalRangeMin'),
+                normalRangeMax = this.options.get('normalRangeMax'),
+                ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),
+                height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);
+            this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();
+        },
+
+        render: function () {
+            var options = this.options,
+                target = this.target,
+                canvasWidth = this.canvasWidth,
+                canvasHeight = this.canvasHeight,
+                vertices = this.vertices,
+                spotRadius = options.get('spotRadius'),
+                regionMap = this.regionMap,
+                rangex, rangey, yvallast,
+                canvasTop, canvasLeft,
+                vertex, path, paths, x, y, xnext, xpos, xposnext,
+                last, next, yvalcount, lineShapes, fillShapes, plen,
+                valueSpots, color, xvalues, yvalues, i;
+
+            if (!line._super.render.call(this)) {
+                return;
+            }
+
+            this.scanValues();
+            this.processRangeOptions();
+
+            xvalues = this.xvalues;
+            yvalues = this.yvalues;
+
+            if (!this.yminmax.length || this.yvalues.length < 2) {
+                // empty or all null valuess
+                return;
+            }
+
+            canvasTop = canvasLeft = 0;
+
+            rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;
+            rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;
+            yvallast = this.yvalues.length - 1;
+
+            if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {
+                spotRadius = 0;
+            }
+            if (spotRadius) {
+                // adjust the canvas size as required so that spots will fit
+                if (options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {
+                    canvasHeight -= Math.ceil(spotRadius);
+                }
+                if (options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {
+                    canvasHeight -= Math.ceil(spotRadius);
+                    canvasTop += Math.ceil(spotRadius);
+                }
+                if ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy)) {
+                    canvasLeft += Math.ceil(spotRadius);
+                    canvasWidth -= Math.ceil(spotRadius);
+                }
+                if (options.get('spotColor') ||
+                    (options.get('minSpotColor') || options.get('maxSpotColor') &&
+                        (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
+                    canvasWidth -= Math.ceil(spotRadius);
+                }
+            }
+
+
+            canvasHeight--;
+
+            if (options.get('normalRangeMin') && !options.get('drawNormalOnTop')) {
+                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+            }
+
+            path = [];
+            paths = [path];
+            last = next = null;
+            yvalcount = yvalues.length;
+            for (i = 0; i < yvalcount; i++) {
+                x = xvalues[i];
+                xnext = xvalues[i + 1];
+                y = yvalues[i];
+                xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));
+                xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;
+                next = xpos + ((xposnext - xpos) / 2);
+                regionMap[i] = [last || 0, next, i];
+                last = next;
+                if (y === null) {
+                    if (i) {
+                        if (yvalues[i - 1] !== null) {
+                            path = [];
+                            paths.push(path);
+                            vertices.push(null);
+                        }
+                    }
+                } else {
+                    if (y < this.miny) {
+                        y = this.miny;
+                    }
+                    if (y > this.maxy) {
+                        y = this.maxy;
+                    }
+                    if (!path.length) {
+                        // previous value was null
+                        path.push([xpos, canvasTop + canvasHeight]);
+                    }
+                    vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];
+                    path.push(vertex);
+                    vertices.push(vertex);
+                }
+            }
+
+            lineShapes = [];
+            fillShapes = [];
+            plen = paths.length;
+            for (i = 0; i < plen; i++) {
+                path = paths[i];
+                if (path.length) {
+                    if (options.get('fillColor')) {
+                        path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);
+                        fillShapes.push(path.slice(0));
+                        path.pop();
+                    }
+                    // if there's only a single point in this path, then we want to display it
+                    // as a vertical line which means we keep path[0]  as is
+                    if (path.length > 2) {
+                        // else we want the first value
+                        path[0] = [path[0][0], path[1][1]];
+                    }
+                    lineShapes.push(path);
+                }
+            }
+
+            // draw the fill first, then optionally the normal range, then the line on top of that
+            plen = fillShapes.length;
+            for (i = 0; i < plen; i++) {
+                target.drawShape(fillShapes[i],
+                    options.get('fillColor'), options.get('fillColor')).append();
+            }
+
+            if (options.get('normalRangeMin') && options.get('drawNormalOnTop')) {
+                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+            }
+
+            plen = lineShapes.length;
+            for (i = 0; i < plen; i++) {
+                target.drawShape(lineShapes[i], options.get('lineColor'), undefined,
+                    options.get('lineWidth')).append();
+            }
+
+            if (spotRadius && options.get('valueSpots')) {
+                valueSpots = options.get('valueSpots');
+                if (valueSpots.get === undefined) {
+                    valueSpots = new RangeMap(valueSpots);
+                }
+                for (i = 0; i < yvalcount; i++) {
+                    color = valueSpots.get(yvalues[i]);
+                    if (color) {
+                        target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),
+                            canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),
+                            spotRadius, undefined,
+                            color).append();
+                    }
+                }
+
+            }
+            if (spotRadius && options.get('spotColor')) {
+                target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),
+                    canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),
+                    spotRadius, undefined,
+                    options.get('spotColor')).append();
+            }
+            if (this.maxy !== this.minyorg) {
+                if (spotRadius && options.get('minSpotColor')) {
+                    x = xvalues[$.inArray(this.minyorg, yvalues)];
+                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),
+                        spotRadius, undefined,
+                        options.get('minSpotColor')).append();
+                }
+                if (spotRadius && options.get('maxSpotColor')) {
+                    x = xvalues[$.inArray(this.maxyorg, yvalues)];
+                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),
+                        spotRadius, undefined,
+                        options.get('maxSpotColor')).append();
+                }
+            }
+
+            this.lastShapeId = target.getLastShapeId();
+            this.canvasTop = canvasTop;
+            target.render();
+        }
+    });
+
+    /**
+     * Bar charts
+     */
+    $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'bar',
+
+        init: function (el, values, options, width, height) {
+            var barWidth = parseInt(options.get('barWidth'), 10),
+                barSpacing = parseInt(options.get('barSpacing'), 10),
+                chartRangeMin = options.get('chartRangeMin'),
+                chartRangeMax = options.get('chartRangeMax'),
+                chartRangeClip = options.get('chartRangeClip'),
+                stackMin = Infinity,
+                stackMax = -Infinity,
+                isStackString, groupMin, groupMax, stackRanges,
+                numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,
+                stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;
+            bar._super.init.call(this, el, values, options, width, height);
+
+            // scan values to determine whether to stack bars
+            for (i = 0, vlen = values.length; i < vlen; i++) {
+                val = values[i];
+                isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;
+                if (isStackString || $.isArray(val)) {
+                    stacked = true;
+                    if (isStackString) {
+                        val = values[i] = normalizeValues(val.split(':'));
+                    }
+                    val = remove(val, null); // min/max will treat null as zero
+                    groupMin = Math.min.apply(Math, val);
+                    groupMax = Math.max.apply(Math, val);
+                    if (groupMin < stackMin) {
+                        stackMin = groupMin;
+                    }
+                    if (groupMax > stackMax) {
+                        stackMax = groupMax;
+                    }
+                }
+            }
+
+            this.stacked = stacked;
+            this.regionShapes = {};
+            this.barWidth = barWidth;
+            this.barSpacing = barSpacing;
+            this.totalBarWidth = barWidth + barSpacing;
+            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+            this.initTarget();
+
+            if (chartRangeClip) {
+                clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;
+                clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;
+            }
+
+            numValues = [];
+            stackRanges = stacked ? [] : numValues;
+            var stackTotals = [];
+            var stackRangesNeg = [];
+            for (i = 0, vlen = values.length; i < vlen; i++) {
+                if (stacked) {
+                    vlist = values[i];
+                    values[i] = svals = [];
+                    stackTotals[i] = 0;
+                    stackRanges[i] = stackRangesNeg[i] = 0;
+                    for (j = 0, slen = vlist.length; j < slen; j++) {
+                        val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];
+                        if (val !== null) {
+                            if (val > 0) {
+                                stackTotals[i] += val;
+                            }
+                            if (stackMin < 0 && stackMax > 0) {
+                                if (val < 0) {
+                                    stackRangesNeg[i] += Math.abs(val);
+                                } else {
+                                    stackRanges[i] += val;
+                                }
+                            } else {
+                                stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));
+                            }
+                            numValues.push(val);
+                        }
+                    }
+                } else {
+                    val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];
+                    val = values[i] = normalizeValue(val);
+                    if (val !== null) {
+                        numValues.push(val);
+                    }
+                }
+            }
+            this.max = max = Math.max.apply(Math, numValues);
+            this.min = min = Math.min.apply(Math, numValues);
+            this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;
+            this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;
+
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {
+                min = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {
+                max = options.get('chartRangeMax');
+            }
+
+            this.zeroAxis = zeroAxis = options.get('zeroAxis', true);
+            if (min <= 0 && max >= 0 && zeroAxis) {
+                xaxisOffset = 0;
+            } else if (zeroAxis == false) {
+                xaxisOffset = min;
+            } else if (min > 0) {
+                xaxisOffset = min;
+            } else {
+                xaxisOffset = max;
+            }
+            this.xaxisOffset = xaxisOffset;
+
+            range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;
+
+            // as we plot zero/min values a single pixel line, we add a pixel to all other
+            // values - Reduce the effective canvas size to suit
+            this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;
+
+            if (min < xaxisOffset) {
+                yMaxCalc = (stacked && max >= 0) ? stackMax : max;
+                yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;
+                if (yoffset !== Math.ceil(yoffset)) {
+                    this.canvasHeightEf -= 2;
+                    yoffset = Math.ceil(yoffset);
+                }
+            } else {
+                yoffset = this.canvasHeight;
+            }
+            this.yoffset = yoffset;
+
+            if ($.isArray(options.get('colorMap'))) {
+                this.colorMapByIndex = options.get('colorMap');
+                this.colorMapByValue = null;
+            } else {
+                this.colorMapByIndex = null;
+                this.colorMapByValue = options.get('colorMap');
+                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+                    this.colorMapByValue = new RangeMap(this.colorMapByValue);
+                }
+            }
+
+            this.range = range;
+        },
+
+        getRegion: function (el, x, y) {
+            var result = Math.floor(x / this.totalBarWidth);
+            return (result < 0 || result >= this.values.length) ? undefined : result;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion,
+                values = ensureArray(this.values[currentRegion]),
+                result = [],
+                value, i;
+            for (i = values.length; i--;) {
+                value = values[i];
+                result.push({
+                    isNull: value === null,
+                    value: value,
+                    color: this.calcColor(i, value, currentRegion),
+                    offset: currentRegion
+                });
+            }
+            return result;
+        },
+
+        calcColor: function (stacknum, value, valuenum) {
+            var colorMapByIndex = this.colorMapByIndex,
+                colorMapByValue = this.colorMapByValue,
+                options = this.options,
+                color, newColor;
+            if (this.stacked) {
+                color = options.get('stackedBarColor');
+            } else {
+                color = (value < 0) ? options.get('negBarColor') : options.get('barColor');
+            }
+            if (value === 0 && options.get('zeroColor') !== undefined) {
+                color = options.get('zeroColor');
+            }
+            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+                color = newColor;
+            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+                color = colorMapByIndex[valuenum];
+            }
+            return $.isArray(color) ? color[stacknum % color.length] : color;
+        },
+
+        /**
+         * Render bar(s) for a region
+         */
+        renderRegion: function (valuenum, highlight) {
+            var vals = this.values[valuenum],
+                options = this.options,
+                xaxisOffset = this.xaxisOffset,
+                result = [],
+                range = this.range,
+                stacked = this.stacked,
+                target = this.target,
+                x = valuenum * this.totalBarWidth,
+                canvasHeightEf = this.canvasHeightEf,
+                yoffset = this.yoffset,
+                y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;
+
+            vals = $.isArray(vals) ? vals : [vals];
+            valcount = vals.length;
+            val = vals[0];
+            isNull = all(null, vals);
+            allMin = all(xaxisOffset, vals, true);
+
+            if (isNull) {
+                if (options.get('nullColor')) {
+                    color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);
+                    y = (yoffset > 0) ? yoffset - 1 : yoffset;
+                    return target.drawRect(x, y, this.barWidth - 1, 0, color, color);
+                } else {
+                    return undefined;
+                }
+            }
+            yoffsetNeg = yoffset;
+            for (i = 0; i < valcount; i++) {
+                val = vals[i];
+
+                if (stacked && val === xaxisOffset) {
+                    if (!allMin || minPlotted) {
+                        continue;
+                    }
+                    minPlotted = true;
+                }
+
+                if (range > 0) {
+                    height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;
+                } else {
+                    height = 1;
+                }
+                if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {
+                    y = yoffsetNeg;
+                    yoffsetNeg += height;
+                } else {
+                    y = yoffset - height;
+                    yoffset -= height;
+                }
+                color = this.calcColor(i, val, valuenum);
+                if (highlight) {
+                    color = this.calcHighlightColor(color, options);
+                }
+                result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));
+            }
+            if (result.length === 1) {
+                return result[0];
+            }
+            return result;
+        }
+    });
+
+    /**
+     * Tristate charts
+     */
+    $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'tristate',
+
+        init: function (el, values, options, width, height) {
+            var barWidth = parseInt(options.get('barWidth'), 10),
+                barSpacing = parseInt(options.get('barSpacing'), 10);
+            tristate._super.init.call(this, el, values, options, width, height);
+
+            this.regionShapes = {};
+            this.barWidth = barWidth;
+            this.barSpacing = barSpacing;
+            this.totalBarWidth = barWidth + barSpacing;
+            this.values = $.map(values, Number);
+            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+            if ($.isArray(options.get('colorMap'))) {
+                this.colorMapByIndex = options.get('colorMap');
+                this.colorMapByValue = null;
+            } else {
+                this.colorMapByIndex = null;
+                this.colorMapByValue = options.get('colorMap');
+                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+                    this.colorMapByValue = new RangeMap(this.colorMapByValue);
+                }
+            }
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            return Math.floor(x / this.totalBarWidth);
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.values[currentRegion] === undefined,
+                value: this.values[currentRegion],
+                color: this.calcColor(this.values[currentRegion], currentRegion),
+                offset: currentRegion
+            };
+        },
+
+        calcColor: function (value, valuenum) {
+            var values = this.values,
+                options = this.options,
+                colorMapByIndex = this.colorMapByIndex,
+                colorMapByValue = this.colorMapByValue,
+                color, newColor;
+
+            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+                color = newColor;
+            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+                color = colorMapByIndex[valuenum];
+            } else if (values[valuenum] < 0) {
+                color = options.get('negBarColor');
+            } else if (values[valuenum] > 0) {
+                color = options.get('posBarColor');
+            } else {
+                color = options.get('zeroBarColor');
+            }
+            return color;
+        },
+
+        renderRegion: function (valuenum, highlight) {
+            var values = this.values,
+                options = this.options,
+                target = this.target,
+                canvasHeight, height, halfHeight,
+                x, y, color;
+
+            canvasHeight = target.pixelHeight;
+            halfHeight = Math.round(canvasHeight / 2);
+
+            x = valuenum * this.totalBarWidth;
+            if (values[valuenum] < 0) {
+                y = halfHeight;
+                height = halfHeight - 1;
+            } else if (values[valuenum] > 0) {
+                y = 0;
+                height = halfHeight - 1;
+            } else {
+                y = halfHeight - 1;
+                height = 2;
+            }
+            color = this.calcColor(values[valuenum], valuenum);
+            if (color === null) {
+                return;
+            }
+            if (highlight) {
+                color = this.calcHighlightColor(color, options);
+            }
+            return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);
+        }
+    });
+
+    /**
+     * Discrete charts
+     */
+    $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'discrete',
+
+        init: function (el, values, options, width, height) {
+            discrete._super.init.call(this, el, values, options, width, height);
+
+            this.regionShapes = {};
+            this.values = values = $.map(values, Number);
+            this.min = Math.min.apply(Math, values);
+            this.max = Math.max.apply(Math, values);
+            this.range = this.max - this.min;
+            this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;
+            this.interval = Math.floor(width / values.length);
+            this.itemWidth = width / values.length;
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {
+                this.min = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {
+                this.max = options.get('chartRangeMax');
+            }
+            this.initTarget();
+            if (this.target) {
+                this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');
+            }
+        },
+
+        getRegion: function (el, x, y) {
+            return Math.floor(x / this.itemWidth);
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.values[currentRegion] === undefined,
+                value: this.values[currentRegion],
+                offset: currentRegion
+            };
+        },
+
+        renderRegion: function (valuenum, highlight) {
+            var values = this.values,
+                options = this.options,
+                min = this.min,
+                max = this.max,
+                range = this.range,
+                interval = this.interval,
+                target = this.target,
+                canvasHeight = this.canvasHeight,
+                lineHeight = this.lineHeight,
+                pheight = canvasHeight - lineHeight,
+                ytop, val, color, x;
+
+            val = clipval(values[valuenum], min, max);
+            x = valuenum * interval;
+            ytop = Math.round(pheight - pheight * ((val - min) / range));
+            color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');
+            if (highlight) {
+                color = this.calcHighlightColor(color, options);
+            }
+            return target.drawLine(x, ytop, x, ytop + lineHeight, color);
+        }
+    });
+
+    /**
+     * Bullet charts
+     */
+    $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {
+        type: 'bullet',
+
+        init: function (el, values, options, width, height) {
+            var min, max;
+            bullet._super.init.call(this, el, values, options, width, height);
+
+            // values: target, performance, range1, range2, range3
+            values = $.map(values, Number);
+            min = Math.min.apply(Math, values);
+            max = Math.max.apply(Math, values);
+            if (options.get('base') === undefined) {
+                min = min < 0 ? min : 0;
+            } else {
+                min = options.get('base');
+            }
+            this.min = min;
+            this.max = max;
+            this.range = max - min;
+            this.shapes = {};
+            this.valueShapes = {};
+            this.regiondata = {};
+            this.width = width = options.get('width') === 'auto' ? '4.0em' : width;
+            this.target = this.$el.simpledraw(width, height, options.get('composite'));
+            if (!values.length) {
+                this.disabled = true;
+            }
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            var shapeid = this.target.getShapeAt(el, x, y);
+            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                fieldkey: currentRegion.substr(0, 1),
+                value: this.values[currentRegion.substr(1)],
+                region: currentRegion
+            };
+        },
+
+        changeHighlight: function (highlight) {
+            var currentRegion = this.currentRegion,
+                shapeid = this.valueShapes[currentRegion],
+                shape;
+            delete this.shapes[shapeid];
+            switch (currentRegion.substr(0, 1)) {
+                case 'r':
+                    shape = this.renderRange(currentRegion.substr(1), highlight);
+                    break;
+                case 'p':
+                    shape = this.renderPerformance(highlight);
+                    break;
+                case 't':
+                    shape = this.renderTarget(highlight);
+                    break;
+            }
+            this.valueShapes[currentRegion] = shape.id;
+            this.shapes[shape.id] = currentRegion;
+            this.target.replaceWithShape(shapeid, shape);
+        },
+
+        renderRange: function (rn, highlight) {
+            var rangeval = this.values[rn],
+                rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),
+                color = this.options.get('rangeColors')[rn - 2];
+            if (highlight) {
+                color = this.calcHighlightColor(color, this.options);
+            }
+            return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);
+        },
+
+        renderPerformance: function (highlight) {
+            var perfval = this.values[1],
+                perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),
+                color = this.options.get('performanceColor');
+            if (highlight) {
+                color = this.calcHighlightColor(color, this.options);
+            }
+            return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,
+                Math.round(this.canvasHeight * 0.4) - 1, color, color);
+        },
+
+        renderTarget: function (highlight) {
+            var targetval = this.values[0],
+                x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),
+                targettop = Math.round(this.canvasHeight * 0.10),
+                targetheight = this.canvasHeight - (targettop * 2),
+                color = this.options.get('targetColor');
+            if (highlight) {
+                color = this.calcHighlightColor(color, this.options);
+            }
+            return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);
+        },
+
+        render: function () {
+            var vlen = this.values.length,
+                target = this.target,
+                i, shape;
+            if (!bullet._super.render.call(this)) {
+                return;
+            }
+            for (i = 2; i < vlen; i++) {
+                shape = this.renderRange(i).append();
+                this.shapes[shape.id] = 'r' + i;
+                this.valueShapes['r' + i] = shape.id;
+            }
+            shape = this.renderPerformance().append();
+            this.shapes[shape.id] = 'p1';
+            this.valueShapes.p1 = shape.id;
+            shape = this.renderTarget().append();
+            this.shapes[shape.id] = 't0';
+            this.valueShapes.t0 = shape.id;
+            target.render();
+        }
+    });
+
+    /**
+     * Pie charts
+     */
+    $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {
+        type: 'pie',
+
+        init: function (el, values, options, width, height) {
+            var total = 0, i;
+
+            pie._super.init.call(this, el, values, options, width, height);
+
+            this.shapes = {}; // map shape ids to value offsets
+            this.valueShapes = {}; // maps value offsets to shape ids
+            this.values = values = $.map(values, Number);
+
+            if (options.get('width') === 'auto') {
+                this.width = this.height;
+            }
+
+            if (values.length > 0) {
+                for (i = values.length; i--;) {
+                    total += values[i];
+                }
+            }
+            this.total = total;
+            this.initTarget();
+            this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);
+        },
+
+        getRegion: function (el, x, y) {
+            var shapeid = this.target.getShapeAt(el, x, y);
+            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.values[currentRegion] === undefined,
+                value: this.values[currentRegion],
+                percent: this.values[currentRegion] / this.total * 100,
+                color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],
+                offset: currentRegion
+            };
+        },
+
+        changeHighlight: function (highlight) {
+            var currentRegion = this.currentRegion,
+                 newslice = this.renderSlice(currentRegion, highlight),
+                 shapeid = this.valueShapes[currentRegion];
+            delete this.shapes[shapeid];
+            this.target.replaceWithShape(shapeid, newslice);
+            this.valueShapes[currentRegion] = newslice.id;
+            this.shapes[newslice.id] = currentRegion;
+        },
+
+        renderSlice: function (valuenum, highlight) {
+            var target = this.target,
+                options = this.options,
+                radius = this.radius,
+                borderWidth = options.get('borderWidth'),
+                offset = options.get('offset'),
+                circle = 2 * Math.PI,
+                values = this.values,
+                total = this.total,
+                next = offset ? (2*Math.PI)*(offset/360) : 0,
+                start, end, i, vlen, color;
+
+            vlen = values.length;
+            for (i = 0; i < vlen; i++) {
+                start = next;
+                end = next;
+                if (total > 0) {  // avoid divide by zero
+                    end = next + (circle * (values[i] / total));
+                }
+                if (valuenum === i) {
+                    color = options.get('sliceColors')[i % options.get('sliceColors').length];
+                    if (highlight) {
+                        color = this.calcHighlightColor(color, options);
+                    }
+
+                    return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);
+                }
+                next = end;
+            }
+        },
+
+        render: function () {
+            var target = this.target,
+                values = this.values,
+                options = this.options,
+                radius = this.radius,
+                borderWidth = options.get('borderWidth'),
+                shape, i;
+
+            if (!pie._super.render.call(this)) {
+                return;
+            }
+            if (borderWidth) {
+                target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),
+                    options.get('borderColor'), undefined, borderWidth).append();
+            }
+            for (i = values.length; i--;) {
+                shape = this.renderSlice(i).append();
+                this.valueShapes[i] = shape.id; // store just the shapeid
+                this.shapes[shape.id] = i;
+            }
+            target.render();
+        }
+    });
+
+    /**
+     * Box plots
+     */
+    $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {
+        type: 'box',
+
+        init: function (el, values, options, width, height) {
+            box._super.init.call(this, el, values, options, width, height);
+            this.values = $.map(values, Number);
+            this.width = options.get('width') === 'auto' ? '4.0em' : width;
+            this.initTarget();
+            if (!this.values.length) {
+                this.disabled = 1;
+            }
+        },
+
+        /**
+         * Simulate a single region
+         */
+        getRegion: function () {
+            return 1;
+        },
+
+        getCurrentRegionFields: function () {
+            var result = [
+                { field: 'lq', value: this.quartiles[0] },
+                { field: 'med', value: this.quartiles[1] },
+                { field: 'uq', value: this.quartiles[2] },
+                { field: 'lo', value: this.loutlier },
+                { field: 'ro', value: this.routlier }
+            ];
+            if (this.lwhisker !== undefined) {
+                result.push({ field: 'lw', value: this.lwhisker});
+            }
+            if (this.rwhisker !== undefined) {
+                result.push({ field: 'rw', value: this.rwhisker});
+            }
+            return result;
+        },
+
+        render: function () {
+            var target = this.target,
+                values = this.values,
+                vlen = values.length,
+                options = this.options,
+                canvasWidth = this.canvasWidth,
+                canvasHeight = this.canvasHeight,
+                minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),
+                maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),
+                canvasLeft = 0,
+                lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,
+                size, unitSize;
+
+            if (!box._super.render.call(this)) {
+                return;
+            }
+
+            if (options.get('raw')) {
+                if (options.get('showOutliers') && values.length > 5) {
+                    loutlier = values[0];
+                    lwhisker = values[1];
+                    q1 = values[2];
+                    q2 = values[3];
+                    q3 = values[4];
+                    rwhisker = values[5];
+                    routlier = values[6];
+                } else {
+                    lwhisker = values[0];
+                    q1 = values[1];
+                    q2 = values[2];
+                    q3 = values[3];
+                    rwhisker = values[4];
+                }
+            } else {
+                values.sort(function (a, b) { return a - b; });
+                q1 = quartile(values, 1);
+                q2 = quartile(values, 2);
+                q3 = quartile(values, 3);
+                iqr = q3 - q1;
+                if (options.get('showOutliers')) {
+                    lwhisker = rwhisker = undefined;
+                    for (i = 0; i < vlen; i++) {
+                        if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {
+                            lwhisker = values[i];
+                        }
+                        if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {
+                            rwhisker = values[i];
+                        }
+                    }
+                    loutlier = values[0];
+                    routlier = values[vlen - 1];
+                } else {
+                    lwhisker = values[0];
+                    rwhisker = values[vlen - 1];
+                }
+            }
+            this.quartiles = [q1, q2, q3];
+            this.lwhisker = lwhisker;
+            this.rwhisker = rwhisker;
+            this.loutlier = loutlier;
+            this.routlier = routlier;
+
+            unitSize = canvasWidth / (maxValue - minValue + 1);
+            if (options.get('showOutliers')) {
+                canvasLeft = Math.ceil(options.get('spotRadius'));
+                canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));
+                unitSize = canvasWidth / (maxValue - minValue + 1);
+                if (loutlier < lwhisker) {
+                    target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,
+                        canvasHeight / 2,
+                        options.get('spotRadius'),
+                        options.get('outlierLineColor'),
+                        options.get('outlierFillColor')).append();
+                }
+                if (routlier > rwhisker) {
+                    target.drawCircle((routlier - minValue) * unitSize + canvasLeft,
+                        canvasHeight / 2,
+                        options.get('spotRadius'),
+                        options.get('outlierLineColor'),
+                        options.get('outlierFillColor')).append();
+                }
+            }
+
+            // box
+            target.drawRect(
+                Math.round((q1 - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight * 0.1),
+                Math.round((q3 - q1) * unitSize),
+                Math.round(canvasHeight * 0.8),
+                options.get('boxLineColor'),
+                options.get('boxFillColor')).append();
+            // left whisker
+            target.drawLine(
+                Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 2),
+                Math.round((q1 - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 2),
+                options.get('lineColor')).append();
+            target.drawLine(
+                Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 4),
+                Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight - canvasHeight / 4),
+                options.get('whiskerColor')).append();
+            // right whisker
+            target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 2),
+                Math.round((q3 - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 2),
+                options.get('lineColor')).append();
+            target.drawLine(
+                Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight / 4),
+                Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight - canvasHeight / 4),
+                options.get('whiskerColor')).append();
+            // median line
+            target.drawLine(
+                Math.round((q2 - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight * 0.1),
+                Math.round((q2 - minValue) * unitSize + canvasLeft),
+                Math.round(canvasHeight * 0.9),
+                options.get('medianColor')).append();
+            if (options.get('target')) {
+                size = Math.ceil(options.get('spotRadius'));
+                target.drawLine(
+                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
+                    Math.round((canvasHeight / 2) - size),
+                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
+                    Math.round((canvasHeight / 2) + size),
+                    options.get('targetColor')).append();
+                target.drawLine(
+                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),
+                    Math.round(canvasHeight / 2),
+                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),
+                    Math.round(canvasHeight / 2),
+                    options.get('targetColor')).append();
+            }
+            target.render();
+        }
+    });
+
+    // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier
+    // This is accessible as $(foo).simpledraw()
+
+    if ($.browser.msie && !document.namespaces.v) {
+        document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
+    }
+
+    if ($.browser.hasCanvas === undefined) {
+        $.browser.hasCanvas = document.createElement('canvas').getContext !== undefined;
+    }
+
+    VShape = createClass({
+        init: function (target, id, type, args) {
+            this.target = target;
+            this.id = id;
+            this.type = type;
+            this.args = args;
+        },
+        append: function () {
+            this.target.appendShape(this);
+            return this;
+        }
+    });
+
+    VCanvas_base = createClass({
+        _pxregex: /(\d+)(px)?\s*$/i,
+
+        init: function (width, height, target) {
+            if (!width) {
+                return;
+            }
+            this.width = width;
+            this.height = height;
+            this.target = target;
+            this.lastShapeId = null;
+            if (target[0]) {
+                target = target[0];
+            }
+            $.data(target, '_jqs_vcanvas', this);
+        },
+
+        drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {
+            return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);
+        },
+
+        drawShape: function (path, lineColor, fillColor, lineWidth) {
+            return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);
+        },
+
+        drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {
+            return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);
+        },
+
+        drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+            return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);
+        },
+
+        drawRect: function (x, y, width, height, lineColor, fillColor) {
+            return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);
+        },
+
+        getElement: function () {
+            return this.canvas;
+        },
+
+        /**
+         * Return the most recently inserted shape id
+         */
+        getLastShapeId: function () {
+            return this.lastShapeId;
+        },
+
+        /**
+         * Clear and reset the canvas
+         */
+        reset: function () {
+            alert('reset not implemented');
+        },
+
+        _insert: function (el, target) {
+            $(target).html(el);
+        },
+
+        /**
+         * Calculate the pixel dimensions of the canvas
+         */
+        _calculatePixelDims: function (width, height, canvas) {
+            // XXX This should probably be a configurable option
+            var match;
+            match = this._pxregex.exec(height);
+            if (match) {
+                this.pixelHeight = match[1];
+            } else {
+                this.pixelHeight = $(canvas).height();
+            }
+            match = this._pxregex.exec(width);
+            if (match) {
+                this.pixelWidth = match[1];
+            } else {
+                this.pixelWidth = $(canvas).width();
+            }
+        },
+
+        /**
+         * Generate a shape object and id for later rendering
+         */
+        _genShape: function (shapetype, shapeargs) {
+            var id = shapeCount++;
+            shapeargs.unshift(id);
+            return new VShape(this, id, shapetype, shapeargs);
+        },
+
+        /**
+         * Add a shape to the end of the render queue
+         */
+        appendShape: function (shape) {
+            alert('appendShape not implemented');
+        },
+
+        /**
+         * Replace one shape with another
+         */
+        replaceWithShape: function (shapeid, shape) {
+            alert('replaceWithShape not implemented');
+        },
+
+        /**
+         * Insert one shape after another in the render queue
+         */
+        insertAfterShape: function (shapeid, shape) {
+            alert('insertAfterShape not implemented');
+        },
+
+        /**
+         * Remove a shape from the queue
+         */
+        removeShapeId: function (shapeid) {
+            alert('removeShapeId not implemented');
+        },
+
+        /**
+         * Find a shape at the specified x/y co-ordinates
+         */
+        getShapeAt: function (el, x, y) {
+            alert('getShapeAt not implemented');
+        },
+
+        /**
+         * Render all queued shapes onto the canvas
+         */
+        render: function () {
+            alert('render not implemented');
+        }
+    });
+
+    VCanvas_canvas = createClass(VCanvas_base, {
+        init: function (width, height, target, interact) {
+            VCanvas_canvas._super.init.call(this, width, height, target);
+            this.canvas = document.createElement('canvas');
+            if (target[0]) {
+                target = target[0];
+            }
+            $.data(target, '_jqs_vcanvas', this);
+            $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });
+            this._insert(this.canvas, target);
+            this._calculatePixelDims(width, height, this.canvas);
+            this.canvas.width = this.pixelWidth;
+            this.canvas.height = this.pixelHeight;
+            this.interact = interact;
+            this.shapes = {};
+            this.shapeseq = [];
+            this.currentTargetShapeId = undefined;
+            $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});
+        },
+
+        _getContext: function (lineColor, fillColor, lineWidth) {
+            var context = this.canvas.getContext('2d');
+            if (lineColor !== undefined) {
+                context.strokeStyle = lineColor;
+            }
+            context.lineWidth = lineWidth === undefined ? 1 : lineWidth;
+            if (fillColor !== undefined) {
+                context.fillStyle = fillColor;
+            }
+            return context;
+        },
+
+        reset: function () {
+            var context = this._getContext();
+            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
+            this.shapes = {};
+            this.shapeseq = [];
+            this.currentTargetShapeId = undefined;
+        },
+
+        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
+            var context = this._getContext(lineColor, fillColor, lineWidth),
+                i, plen;
+            context.beginPath();
+            context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);
+            for (i = 1, plen = path.length; i < plen; i++) {
+                context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines
+            }
+            if (lineColor !== undefined) {
+                context.stroke();
+            }
+            if (fillColor !== undefined) {
+                context.fill();
+            }
+            if (this.targetX !== undefined && this.targetY !== undefined &&
+                context.isPointInPath(this.targetX, this.targetY)) {
+                this.currentTargetShapeId = shapeid;
+            }
+        },
+
+        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
+            var context = this._getContext(lineColor, fillColor, lineWidth);
+            context.beginPath();
+            context.arc(x, y, radius, 0, 2 * Math.PI, false);
+            if (this.targetX !== undefined && this.targetY !== undefined &&
+                context.isPointInPath(this.targetX, this.targetY)) {
+                this.currentTargetShapeId = shapeid;
+            }
+            if (lineColor !== undefined) {
+                context.stroke();
+            }
+            if (fillColor !== undefined) {
+                context.fill();
+            }
+        },
+
+        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+            var context = this._getContext(lineColor, fillColor);
+            context.beginPath();
+            context.moveTo(x, y);
+            context.arc(x, y, radius, startAngle, endAngle, false);
+            context.lineTo(x, y);
+            context.closePath();
+            if (lineColor !== undefined) {
+                context.stroke();
+            }
+            if (fillColor) {
+                context.fill();
+            }
+            if (this.targetX !== undefined && this.targetY !== undefined &&
+                context.isPointInPath(this.targetX, this.targetY)) {
+                this.currentTargetShapeId = shapeid;
+            }
+        },
+
+        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
+            return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);
+        },
+
+        appendShape: function (shape) {
+            this.shapes[shape.id] = shape;
+            this.shapeseq.push(shape.id);
+            this.lastShapeId = shape.id;
+            return shape.id;
+        },
+
+        replaceWithShape: function (shapeid, shape) {
+            var shapeseq = this.shapeseq,
+                i;
+            this.shapes[shape.id] = shape;
+            for (i = shapeseq.length; i--;) {
+                if (shapeseq[i] == shapeid) {
+                    shapeseq[i] = shape.id;
+                }
+            }
+            delete this.shapes[shapeid];
+        },
+
+        replaceWithShapes: function (shapeids, shapes) {
+            var shapeseq = this.shapeseq,
+                shapemap = {},
+                sid, i, first;
+
+            for (i = shapeids.length; i--;) {
+                shapemap[shapeids[i]] = true;
+            }
+            for (i = shapeseq.length; i--;) {
+                sid = shapeseq[i];
+                if (shapemap[sid]) {
+                    shapeseq.splice(i, 1);
+                    delete this.shapes[sid];
+                    first = i;
+                }
+            }
+            for (i = shapes.length; i--;) {
+                shapeseq.splice(first, 0, shapes[i].id);
+                this.shapes[shapes[i].id] = shapes[i];
+            }
+
+        },
+
+        insertAfterShape: function (shapeid, shape) {
+            var shapeseq = this.shapeseq,
+                i;
+            for (i = shapeseq.length; i--;) {
+                if (shapeseq[i] === shapeid) {
+                    shapeseq.splice(i + 1, 0, shape.id);
+                    this.shapes[shape.id] = shape;
+                    return;
+                }
+            }
+        },
+
+        removeShapeId: function (shapeid) {
+            var shapeseq = this.shapeseq,
+                i;
+            for (i = shapeseq.length; i--;) {
+                if (shapeseq[i] === shapeid) {
+                    shapeseq.splice(i, 1);
+                    break;
+                }
+            }
+            delete this.shapes[shapeid];
+        },
+
+        getShapeAt: function (el, x, y) {
+            this.targetX = x;
+            this.targetY = y;
+            this.render();
+            return this.currentTargetShapeId;
+        },
+
+        render: function () {
+            var shapeseq = this.shapeseq,
+                shapes = this.shapes,
+                shapeCount = shapeseq.length,
+                context = this._getContext(),
+                shapeid, shape, i;
+            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
+            for (i = 0; i < shapeCount; i++) {
+                shapeid = shapeseq[i];
+                shape = shapes[shapeid];
+                this['_draw' + shape.type].apply(this, shape.args);
+            }
+            if (!this.interact) {
+                // not interactive so no need to keep the shapes array
+                this.shapes = {};
+                this.shapeseq = [];
+            }
+        }
+
+    });
+
+    VCanvas_vml = createClass(VCanvas_base, {
+        init: function (width, height, target) {
+            var groupel;
+            VCanvas_vml._super.init.call(this, width, height, target);
+            if (target[0]) {
+                target = target[0];
+            }
+            $.data(target, '_jqs_vcanvas', this);
+            this.canvas = document.createElement('span');
+            $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});
+            this._insert(this.canvas, target);
+            this._calculatePixelDims(width, height, this.canvas);
+            this.canvas.width = this.pixelWidth;
+            this.canvas.height = this.pixelHeight;
+            groupel = '<v:group coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '"' +
+                    ' style="position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;"></v:group>';
+            this.canvas.insertAdjacentHTML('beforeEnd', groupel);
+            this.group = $(this.canvas).children()[0];
+            this.rendered = false;
+            this.prerender = '';
+        },
+
+        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
+            var vpath = [],
+                initial, stroke, fill, closed, vel, plen, i;
+            for (i = 0, plen = path.length; i < plen; i++) {
+                vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);
+            }
+            initial = vpath.splice(0, 1);
+            lineWidth = lineWidth === undefined ? 1 : lineWidth;
+            stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
+            fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+            closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';
+            vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
+                 ' id="jqsshape' + shapeid + '" ' +
+                 stroke +
+                 fill +
+                ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
+                ' path="m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e">' +
+                ' </v:shape>';
+            return vel;
+        },
+
+        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
+            var stroke, fill, vel;
+            x -= radius;
+            y -= radius;
+            stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
+            fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+            vel = '<v:oval ' +
+                 ' id="jqsshape' + shapeid + '" ' +
+                stroke +
+                fill +
+                ' style="position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px"></v:oval>';
+            return vel;
+
+        },
+
+        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+            var vpath, startx, starty, endx, endy, stroke, fill, vel;
+            if (startAngle === endAngle) {
+                return;  // VML seems to have problem when start angle equals end angle.
+            }
+            if ((endAngle - startAngle) === (2 * Math.PI)) {
+                startAngle = 0.0;  // VML seems to have a problem when drawing a full circle that doesn't start 0
+                endAngle = (2 * Math.PI);
+            }
+
+            startx = x + Math.round(Math.cos(startAngle) * radius);
+            starty = y + Math.round(Math.sin(startAngle) * radius);
+            endx = x + Math.round(Math.cos(endAngle) * radius);
+            endy = y + Math.round(Math.sin(endAngle) * radius);
+
+            // Prevent very small slices from being mistaken as a whole pie
+            if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {
+                return;
+            }
+
+            vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];
+            stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1px" strokeColor="' + lineColor + '" ';
+            fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+            vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
+                 ' id="jqsshape' + shapeid + '" ' +
+                 stroke +
+                 fill +
+                ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
+                ' path="m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e">' +
+                ' </v:shape>';
+            return vel;
+        },
+
+        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
+            return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);
+        },
+
+        reset: function () {
+            this.group.innerHTML = '';
+        },
+
+        appendShape: function (shape) {
+            var vel = this['_draw' + shape.type].apply(this, shape.args);
+            if (this.rendered) {
+                this.group.insertAdjacentHTML('beforeEnd', vel);
+            } else {
+                this.prerender += vel;
+            }
+            this.lastShapeId = shape.id;
+            return shape.id;
+        },
+
+        replaceWithShape: function (shapeid, shape) {
+            var existing = $('#jqsshape' + shapeid),
+                vel = this['_draw' + shape.type].apply(this, shape.args);
+            existing[0].outerHTML = vel;
+        },
+
+        replaceWithShapes: function (shapeids, shapes) {
+            // replace the first shapeid with all the new shapes then toast the remaining old shapes
+            var existing = $('#jqsshape' + shapeids[0]),
+                replace = '',
+                slen = shapes.length,
+                i;
+            for (i = 0; i < slen; i++) {
+                replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);
+            }
+            existing[0].outerHTML = replace;
+            for (i = 1; i < shapeids.length; i++) {
+                $('#jqsshape' + shapeids[i]).remove();
+            }
+        },
+
+        insertAfterShape: function (shapeid, shape) {
+            var existing = $('#jqsshape' + shapeid),
+                 vel = this['_draw' + shape.type].apply(this, shape.args);
+            existing[0].insertAdjacentHTML('afterEnd', vel);
+        },
+
+        removeShapeId: function (shapeid) {
+            var existing = $('#jqsshape' + shapeid);
+            this.group.removeChild(existing[0]);
+        },
+
+        getShapeAt: function (el, x, y) {
+            var shapeid = el.id.substr(8);
+            return shapeid;
+        },
+
+        render: function () {
+            if (!this.rendered) {
+                // batch the intial render into a single repaint
+                this.group.innerHTML = this.prerender;
+                this.rendered = true;
+            }
+        }
+    });
+
+
+})(jQuery);
diff --git a/json.php b/json.php
new file mode 100644 (file)
index 0000000..7d46527
--- /dev/null
+++ b/json.php
@@ -0,0 +1,39 @@
+<?php
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
+function open_database($dab,$sqlquery)
+{
+
+  $mysqli = new mysqli("localhost", "USERNAME", "PASSWORD", "$dab");
+  if ($mysqli->connect_errno) {
+    echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
+  }
+
+  $result=$mysqli->query($sqlquery);
+  return($result);
+}
+
+$qstring=$_SERVER['QUERY_STRING'];
+parse_str($qstring, $gem);
+if(strlen($_SERVER['HTTP_USER_AGENT']) >2) {
+  $r=open_database("power", "select * from devices where SN='01100476'");
+  $gem = mysqli_fetch_assoc($r);
+
+  foreach ($gem as $key => $value) {
+    if (substr($key, 0,1)==="c") {
+      $r=open_database("power", "select amps from circuits where device_id='".$gem['device_id']."' and name='".$key."'");
+      $row = mysqli_fetch_assoc($r);
+      $gem[$key] = $gem[$key] . ",". $row['amps'];
+    }
+  }
+
+  echo json_encode($gem);
+} else {
+  $r=open_database("power", "select device_id from devices where SN='".$gem['SN']."'");
+  if ($r->num_rows > 0) {
+    $r=open_database("power", "update devices set V='" . $gem['V'] . "', c1 = '". $gem['c1'] . "', c2 = '". $gem['c2'] . "', c3 = '". $gem['c3'] . "', c4 = '". $gem['c4'] . "', c5 = '". $gem['c5'] . "', c6 = '". $gem['c6'] . "', c7 = '". $gem['c7'] . "', c8 = '". $gem['c8'] . "', c9 = '". $gem['c9'] . "', c10 = '". $gem['c10'] . "', c11 = '". $gem['c11'] . "', c12 = '". $gem['c12'] . "', c13 = '". $gem['c13'] . "', c14 = '". $gem['c14'] . "', c15 = '". $gem['c15'] . "', c16 = '". $gem['c16'] . "', c17 = '". $gem['c17'] . "', c18 = '". $gem['c18'] . "', c19 = '". $gem['c19'] . "', c20 = '". $gem['c20'] . "', c21 = '". $gem['c21'] . "', c22 = '". $gem['c22'] . "', c23 = '". $gem['c23'] . "', c24 = '". $gem['c24'] . "', c25 = '". $gem['c25'] . "', c26 = '". $gem['c26'] . "', c27 = '". $gem['c27'] . "', c28 = '". $gem['c28'] . "', c29 = '". $gem['c29'] . "', c30 = '". $gem['c30'] . "', c31 = '". $gem['c31'] . "', c32 = '". $gem['c32'] . "' where SN='".$gem['SN']."'");
+  } else {
+    $r=open_database("power", "insert devices set V='" . $gem['V'] . "', c1 = '". $gem['c1'] . "', c2 = '". $gem['c2'] . "', c3 = '". $gem['c3'] . "', c4 = '". $gem['c4'] . "', c5 = '". $gem['c5'] . "', c6 = '". $gem['c6'] . "', c7 = '". $gem['c7'] . "', c8 = '". $gem['c8'] . "', c9 = '". $gem['c9'] . "', c10 = '". $gem['c10'] . "', c11 = '". $gem['c11'] . "', c12 = '". $gem['c12'] . "', c13 = '". $gem['c13'] . "', c14 = '". $gem['c14'] . "', c15 = '". $gem['c15'] . "', c16 = '". $gem['c16'] . "', c17 = '". $gem['c17'] . "', c18 = '". $gem['c18'] . "', c19 = '". $gem['c19'] . "', c20 = '". $gem['c20'] . "', c21 = '". $gem['c21'] . "', c22 = '". $gem['c22'] . "', c23 = '". $gem['c23'] . "', c24 = '". $gem['c24'] . "', c25 = '". $gem['c25'] . "', c26 = '". $gem['c26'] . "', c27 = '". $gem['c27'] . "', c28 = '". $gem['c28'] . "', c29 = '". $gem['c29'] . "', c30 = '". $gem['c30'] . "', c31 = '". $gem['c31'] . "', c32 = '". $gem['c32'] . "', SN='".$gem['SN']."'");
+  }
+}
+?>
diff --git a/power.php b/power.php
new file mode 100644 (file)
index 0000000..f0dbaa0
--- /dev/null
+++ b/power.php
@@ -0,0 +1,42 @@
+<?php
+ini_set('memory_limit', '-1');
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
+
+$oldtime=time()-17280;
+$oldtime=$_GET['t'];
+$id=$_GET['id'];
+
+$mysqli = new mysqli("localhost", "USERNAME", "PASSWORD", "power");
+mysqli_set_charset($mysqli,'utf8');
+
+if ($mysqli->connect_errno) {
+  echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
+}
+
+$r=mysqli_query($mysqli, "select UNIX_TIMESTAMP(time) as time,$id as amps from device_log where time>FROM_UNIXTIME($oldtime)", MYSQLI_USE_RESULT);
+#$r=mysqli_query($mysqli, "select UNIX_TIMESTAMP(time) as time,$id as amps from device_log where time>FROM_UNIXTIME($oldtime)");
+#$result=mysqli_query($mysqli, $sqlquery, MYSQLI_USE_RESULT);
+
+$myArray = array();
+
+#if ($result = $mysqli->store_result()) {
+#  echo "hi";
+  while($row = mysqli_fetch_assoc($r)) {
+  #while($row = mysqli_fetch_row($r)) {
+    #echo "<pre>";
+    #print_r($row);
+    list($counter,$iforget,$amps)=explode(",",$row['amps']);
+    #list($counter,$iforget,$amps)=explode(",",$row[1]);
+    $row['amps']=$amps;
+    $myArray[] = $row;
+    unset($counter);
+    unset($iforget);
+    unset($amps);
+  }
+#  $result->free();
+#}
+#print_r($myArray);
+#echo "</pre>";
+echo json_encode($myArray);
+?>
diff --git a/power.sql b/power.sql
new file mode 100644 (file)
index 0000000..e2a7d47
--- /dev/null
+++ b/power.sql
@@ -0,0 +1,140 @@
+-- MySQL dump 10.13  Distrib 5.5.50, for debian-linux-gnu (x86_64)
+--
+-- Host: localhost    Database: power
+-- ------------------------------------------------------
+-- Server version      5.5.50-0+deb7u2
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `circuits`
+--
+
+DROP TABLE IF EXISTS `circuits`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `circuits` (
+  `circuit_id` smallint(6) NOT NULL AUTO_INCREMENT,
+  `name` varchar(50) DEFAULT NULL,
+  `device_id` smallint(6) DEFAULT NULL,
+  `alias` varchar(50) DEFAULT NULL,
+  `amps` smallint(6) DEFAULT NULL,
+  PRIMARY KEY (`circuit_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `device_log`
+--
+
+DROP TABLE IF EXISTS `device_log`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `device_log` (
+  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `SN` varchar(50) DEFAULT NULL,
+  `alias` varchar(50) DEFAULT NULL,
+  `V` smallint(6) DEFAULT NULL,
+  `c1` varchar(50) DEFAULT NULL,
+  `c2` varchar(50) DEFAULT NULL,
+  `c3` varchar(50) DEFAULT NULL,
+  `c4` varchar(50) DEFAULT NULL,
+  `c5` varchar(50) DEFAULT NULL,
+  `c6` varchar(50) DEFAULT NULL,
+  `c7` varchar(50) DEFAULT NULL,
+  `c8` varchar(50) DEFAULT NULL,
+  `c9` varchar(50) DEFAULT NULL,
+  `c10` varchar(50) DEFAULT NULL,
+  `c11` varchar(50) DEFAULT NULL,
+  `c12` varchar(50) DEFAULT NULL,
+  `c13` varchar(50) DEFAULT NULL,
+  `c14` varchar(50) DEFAULT NULL,
+  `c15` varchar(50) DEFAULT NULL,
+  `c16` varchar(50) DEFAULT NULL,
+  `c17` varchar(50) DEFAULT NULL,
+  `c18` varchar(50) DEFAULT NULL,
+  `c19` varchar(50) DEFAULT NULL,
+  `c20` varchar(50) DEFAULT NULL,
+  `c21` varchar(50) DEFAULT NULL,
+  `c22` varchar(50) DEFAULT NULL,
+  `c23` varchar(50) DEFAULT NULL,
+  `c24` varchar(50) DEFAULT NULL,
+  `c25` varchar(50) DEFAULT NULL,
+  `c26` varchar(50) DEFAULT NULL,
+  `c27` varchar(50) DEFAULT NULL,
+  `c28` varchar(50) DEFAULT NULL,
+  `c29` varchar(50) DEFAULT NULL,
+  `c30` varchar(50) DEFAULT NULL,
+  `c31` varchar(50) DEFAULT NULL,
+  `c32` varchar(50) DEFAULT NULL,
+  PRIMARY KEY (`time`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `devices`
+--
+
+DROP TABLE IF EXISTS `devices`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `devices` (
+  `device_id` smallint(6) NOT NULL AUTO_INCREMENT,
+  `SN` varchar(50) DEFAULT NULL,
+  `alias` varchar(50) DEFAULT NULL,
+  `V` smallint(6) DEFAULT NULL,
+  `c1` varchar(50) DEFAULT NULL,
+  `c2` varchar(50) DEFAULT NULL,
+  `c3` varchar(50) DEFAULT NULL,
+  `c4` varchar(50) DEFAULT NULL,
+  `c5` varchar(50) DEFAULT NULL,
+  `c6` varchar(50) DEFAULT NULL,
+  `c7` varchar(50) DEFAULT NULL,
+  `c8` varchar(50) DEFAULT NULL,
+  `c9` varchar(50) DEFAULT NULL,
+  `c10` varchar(50) DEFAULT NULL,
+  `c11` varchar(50) DEFAULT NULL,
+  `c12` varchar(50) DEFAULT NULL,
+  `c13` varchar(50) DEFAULT NULL,
+  `c14` varchar(50) DEFAULT NULL,
+  `c15` varchar(50) DEFAULT NULL,
+  `c16` varchar(50) DEFAULT NULL,
+  `c17` varchar(50) DEFAULT NULL,
+  `c18` varchar(50) DEFAULT NULL,
+  `c19` varchar(50) DEFAULT NULL,
+  `c20` varchar(50) DEFAULT NULL,
+  `c21` varchar(50) DEFAULT NULL,
+  `c22` varchar(50) DEFAULT NULL,
+  `c23` varchar(50) DEFAULT NULL,
+  `c24` varchar(50) DEFAULT NULL,
+  `c25` varchar(50) DEFAULT NULL,
+  `c26` varchar(50) DEFAULT NULL,
+  `c27` varchar(50) DEFAULT NULL,
+  `c28` varchar(50) DEFAULT NULL,
+  `c29` varchar(50) DEFAULT NULL,
+  `c30` varchar(50) DEFAULT NULL,
+  `c31` varchar(50) DEFAULT NULL,
+  `c32` varchar(50) DEFAULT NULL,
+  PRIMARY KEY (`device_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2017-04-18  8:32:12