thingspeak/public/assets/application-176ef6f23f47be510b81c7f53e30cd99.js
2014-08-01 15:23:28 -04:00

6 lines
190 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function reloadCharts(){return-1===navigator.userAgent.toLowerCase().indexOf("firefox")?!1:($('.ui-widget-content [aria-expanded="false"]').find("iframe").each(function(){var t=$(this).attr("src");-1!==t.indexOf("charts")&&($(this).hide(),$(this).attr("src",t),$(this).show())}),void 0)}function openDialogCenter(t){t.dialog("open");var e=getDimensions(t.parent());t.dialog({position:[e[0],e[1]]})}function getDimensions(t){var e=new Array(2);return e[0]=$(window).width()/2-t.width()/2,e[1]=$(window).height()/2-t.height()/2,e}function updateChart(t,e,i,n,r,s){var i=i,n=n,o=$("#iframe"+t).attr("default_src");o||(o=$("#iframe"+t).attr("src")),src=o.split("?")[0],("bar"===$("#type_"+t).val()||"column"===$("#type_"+t).val())&&0==$("#timescale_"+t).val().length&&0==$("#average_"+t).val().length&&0==$("#median_"+t).val().length&&0==$("#sum_"+t).val().length&&$("#timescale_"+t).val(30);var a=[];$(".chart_options"+t).each(function(){var t=$(this).val(),e=$(this).attr("id"),i=e.split("_")[0];t.length>0&&a.push([i,t])});for(var l="";a.length>0;){var h=a.pop();"width"==h[0]&&(i=parseInt(h[1])),"height"==h[0]&&(n=parseInt(h[1])),("type"!=h[0]||"line"!=h[1])&&(l+="&"+h[0]+"="+encodeURIComponent(h[1]))}l.length>0&&(src+="?"+l.substring(1)),e&&t>0&&s?$.update("/channels/"+r+"/charts/"+t,{newOptions:{options:l}}):e&&t>0&&$.update("/channels/"+r+"/charts/"+t,{options:l}),$("#embed"+t).val('<iframe width="'+i+'" height="'+n+'" style="border: 1px solid #cccccc;" src="'+src+'"></iframe>'),$("#iframe"+t).attr("src",src),$("#iframe"+t).attr("width",i),$("#iframe"+t).attr("height",n)}function updateSelectValues(){selectedValue=$(this).val(),$(".mutuallyexclusive"+index).each(function(){$(this).val("")}),$(this).val(selectedValue)}function setupChartForm(t){return function(e,i){i.length>0&&$("#"+i.split("=")[0]+"_"+t).val(decodeURIComponent(i.split("=")[1]))}}function setupColumns(t,e){$(sortColumnSetup(t,e)),$(".column").disableSelection()}function createWindowsWithData(t,e,i,n){for(var r in t){for(var s in t[r])var o=s;if(t[r].chart_window&&(a=t[r].chart_window),t[r].plugin_window&&(a=t[r].plugin_window),t[r].portlet_window&&(a=t[r].portlet_window),"undefined"==a)var a=t[r].portlet_window?t[r].portlet_window:t[r].chart_window;colId=a.col,title=a.title;var l=a.html;if(t[r].chart_window){var h=a.id;$("body").append("<div id='chartConfig"+h+"'></div>")}var c=addWindow(n,colId,a.id,o,title,l);c.each(decoratePortlet(e)),c.find(".ui-toggle").click(uiToggleClick),c.find(".ui-view").click(uiViewClick(i)),c.find(".ui-edit").click(uiEditClick(i)),c.find(".ui-close").click(uiCloseClick(i))}}function addWindow(t,e,i,n,r,s){if($("#"+t+"_dialog"+e).append('<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" id="portlet_'+i+'"><div class="portlet-header wtype wtype-'+n+' ui-widget-header ui-corner-all">'+r+'</div><div class="portlet-content">'+s+"</div>"),$("#portlet_"+i).length>1)throw"Portlet count doesn't match what's expected";return $("#portlet_"+i)}function sortColumnSetup(t,e){$(".column").sortable({opacity:.6,helper:function(){return $("<div class='ui-widget-header'>Drop to re-position</div>")},connectWith:".column",update:updatePortletPositions(t,e)})}function getPortletArray(t){var e=new Array,n=t.split("&");for(i in n)val=n[i].split("=")[1],e.push(val);return e}function uiToggleClick(){$(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick"),$(this).parents(".portlet:first").find(".portlet-content").toggle()}!function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i,n=t(document);t.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",buttonClickSelector:"button[data-remote]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(e){var i=t('meta[name="csrf-token"]').attr("content");i&&e.setRequestHeader("X-CSRF-Token",i)},fire:function(e,i,n){var r=t.Event(i);return e.trigger(r,n),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t.attr("href")},handleRemote:function(n){var r,s,o,a,l,h,c,d;if(i.fire(n,"ajax:before")){if(a=n.data("cross-domain"),l=a===e?null:a,h=n.data("with-credentials")||null,c=n.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,n.is("form")){r=n.attr("method"),s=n.attr("action"),o=n.serializeArray();var u=n.data("ujs:submit-button");u&&(o.push(u),n.data("ujs:submit-button",null))}else n.is(i.inputChangeSelector)?(r=n.data("method"),s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):n.is(i.buttonClickSelector)?(r=n.data("method")||"get",s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):(r=n.data("method"),s=i.href(n),o=n.data("params")||null);d={type:r||"GET",data:o,dataType:c,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),i.fire(n,"ajax:beforeSend",[t,r])},success:function(t,e,i){n.trigger("ajax:success",[t,e,i])},complete:function(t,e){n.trigger("ajax:complete",[t,e])},error:function(t,e,i){n.trigger("ajax:error",[t,e,i])},crossDomain:l},h&&(d.xhrFields={withCredentials:h}),s&&(d.url=s);var p=i.ajax(d);return n.trigger("ajax:send",p),p}return!1},handleMethod:function(n){var r=i.href(n),s=n.data("method"),o=n.attr("target"),a=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),h=t('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+s+'" type="hidden" />';l!==e&&a!==e&&(c+='<input name="'+l+'" value="'+a+'" type="hidden" />'),o&&h.attr("target",o),h.hide().append(c).appendTo("body"),h.submit()},disableFormElements:function(e){e.find(i.disableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with",e[i]()),e[i](e.data("disable-with")),e.prop("disabled",!0)})},enableFormElements:function(e){e.find(i.enableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with")&&e[i](e.data("ujs:enable-with")),e.prop("disabled",!1)})},allowAction:function(t){var e,n=t.data("confirm"),r=!1;return n?(i.fire(t,"confirm")&&(r=i.confirm(n),e=i.fire(t,"confirm:complete",[r])),r&&e):!0},blankInputs:function(e,i,n){var r,s,o=t(),a=i||"input,textarea",l=e.find(a);return l.each(function(){if(r=t(this),s=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!s==!n){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;o=o.add(r)}}),o.length?o:!1},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){t.data("ujs:enable-with",t.html()),t.html(t.data("disable-with")),t.bind("click.railsDisable",function(t){return i.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),n.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),n.delegate(i.linkClickSelector,"click.rails",function(n){var r=t(this),s=r.data("method"),o=r.data("params");if(!i.allowAction(r))return i.stopEverything(n);if(r.is(i.linkDisableSelector)&&i.disableElement(r),r.data("remote")!==e){if(!(!n.metaKey&&!n.ctrlKey||s&&"GET"!==s||o))return!0;var a=i.handleRemote(r);return a===!1?i.enableElement(r):a.error(function(){i.enableElement(r)}),!1}return r.data("method")?(i.handleMethod(r),!1):void 0}),n.delegate(i.buttonClickSelector,"click.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.inputChangeSelector,"change.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var r=t(this),s=r.data("remote")!==e,o=i.blankInputs(r,i.requiredInputSelector),a=i.nonBlankInputs(r,i.fileInputSelector);if(!i.allowAction(r))return i.stopEverything(n);if(o&&r.attr("novalidate")==e&&i.fire(r,"ajax:aborted:required",[o]))return i.stopEverything(n);if(s){if(a){setTimeout(function(){i.disableFormElements(r)},13);var l=i.fire(r,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(r)},13),l}return i.handleRemote(r),!1}setTimeout(function(){i.disableFormElements(r)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var r=n.attr("name"),s=r?{name:r,value:n.val()}:null;n.closest("form").data("ujs:submit-button",s)}),n.delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)}))}(jQuery),function(t){t.cookie=function(e,i,n){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(i))||null===i||void 0===i)){if(n=t.extend({},n),(null===i||void 0===i)&&(n.expires=-1),"number"==typeof n.expires){var r=n.expires,s=n.expires=new Date;s.setDate(s.getDate()+r)}return i=String(i),document.cookie=[encodeURIComponent(e),"=",n.raw?i:encodeURIComponent(i),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}n=i||{};for(var o,a=n.raw?function(t){return t}:decodeURIComponent,l=document.cookie.split("; "),h=0;o=l[h]&&l[h].split("=");h++)if(a(o[0])===e)return a(o[1]||"");return null}}(jQuery),function(){function t(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t}function e(){var t,e,i=arguments,n={},r=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"number"!=typeof i.nodeType?r(t[n]||{},i):e[n]);return t};for(i[0]===!0&&(n=i[1],i=Array.prototype.slice.call(i,2)),e=i.length,t=0;e>t;t++)n=r(n,i[t]);return n}function i(t,e){return parseInt(t,e||10)}function n(t){return"string"==typeof t}function r(t){return"object"==typeof t}function s(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"number"==typeof t}function a(t){return le.log(t)/le.LN10}function l(t){return le.pow(10,t)}function h(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function c(t){return t!==_&&null!==t}function d(t,e,i){var s,o;if(n(e))c(i)?t.setAttribute(e,i):t&&t.getAttribute&&(o=t.getAttribute(e));else if(c(e)&&r(e))for(s in e)t.setAttribute(s,e[s]);return o}function u(t){return s(t)?t:[t]}function p(){var t,e,i=arguments,n=i.length;for(t=0;n>t;t++)if(e=i[t],"undefined"!=typeof e&&null!==e)return e}function f(e,i){we&&i&&i.opacity!==_&&(i.filter="alpha(opacity="+100*i.opacity+")"),t(e.style,i)}function g(e,i,n,r,s){return e=oe.createElement(e),i&&t(e,i),s&&f(e,{padding:0,border:Be,margin:0}),n&&f(e,n),r&&r.appendChild(e),e}function m(e,i){var n=function(){};return n.prototype=new e,t(n.prototype,i),n}function y(t,e,n,r){var s=$.lang,t=+t||0,o=-1===e?(t.toString().split(".")[1]||"").length:isNaN(e=fe(e))?2:e,e=void 0===n?s.decimalPoint:n,r=void 0===r?s.thousandsSep:r,s=0>t?"-":"",n=String(i(t=fe(t).toFixed(o))),a=n.length>3?n.length%3:0;return s+(a?n.substr(0,a)+r:"")+n.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+r)+(o?e+fe(t-n).toFixed(o).slice(2):"")}function v(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function x(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}}function b(t,e){for(var i,n,r,s,o,a="{",l=!1,h=[];-1!==(a=t.indexOf(a));){if(i=t.slice(0,a),l){for(n=i.split(":"),r=n.shift().split("."),o=r.length,i=e,s=0;o>s;s++)i=i[r[s]];n.length&&(n=n.join(":"),r=/\.([0-9])/,s=$.lang,o=void 0,/f$/.test(n)?(o=(o=n.match(r))?o[1]:-1,i=y(i,o,s.decimalPoint,n.indexOf(",")>-1?s.thousandsSep:"")):i=X(n,i))}h.push(i),t=t.slice(a+1),a=(l=!l)?"}":"{"}return h.push(t),h.join("")}function w(t){return le.pow(10,ce(le.log(t)/le.LN10))}function k(t,e,i,n){var r,i=p(i,1);for(r=t/i,e||(e=[1,2,2.5,5,10],n&&n.allowDecimals===!1&&(1===i?e=[1,2,5,10]:.1>=i&&(e=[1/i]))),n=0;n<e.length&&(t=e[n],!(r<=(e[n]+(e[n+1]||e[n]))/2));n++);return t*=i}function S(){this.symbol=this.color=0}function T(t,e){var i,n,r=t.length;for(n=0;r>n;n++)t[n].ss_i=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.ss_i-n.ss_i:i}),n=0;r>n;n++)delete t[n].ss_i}function C(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i}function P(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i}function A(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function L(t){W||(W=g(ze)),t&&W.appendChild(t),W.innerHTML=""}function M(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;ae.console&&console.log(i)}function I(t){return parseFloat(t.toPrecision(14))}function D(t,e){G=p(t,e.animation)}function E(){var t=$.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";q=6e4*(t&&$.global.timezoneOffset||0),V=t?Date.UTC:function(t,e,i,n,r,s){return new Date(t,e,p(i,1),p(n,0),p(r,0),p(s,0)).getTime()},U=e+"Minutes",Z=e+"Hours",K=e+"Day",Q=e+"Date",J=e+"Month",te=e+"FullYear",ee=i+"Minutes",ie=i+"Hours",ne=i+"Date",re=i+"Month",se=i+"FullYear"}function O(){}function R(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!n&&this.addLabel()}function z(){this.init.apply(this,arguments)}function B(t,e,i,n,r,s){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=r,this.percent="percent"===s,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:p(e.y,o?4:i?14:-6),x:p(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")}function F(){this.init.apply(this,arguments)}function N(){this.init.apply(this,arguments)}var _,H,W,$,X,G,Y,j,V,q,U,Z,K,Q,J,te,ee,ie,ne,re,se,oe=document,ae=window,le=Math,he=le.round,ce=le.floor,de=le.ceil,ue=le.max,pe=le.min,fe=le.abs,ge=le.cos,me=le.sin,ye=le.PI,ve=2*ye/360,xe=navigator.userAgent,be=ae.opera,we=/msie/i.test(xe)&&!be,ke=8===oe.documentMode,Se=/AppleWebKit/.test(xe),Te=/Firefox/.test(xe),Ce=/(Mobile|Android|Windows Phone)/.test(xe),Pe="http://www.w3.org/2000/svg",Ae=!!oe.createElementNS&&!!oe.createElementNS(Pe,"svg").createSVGRect,Le=Te&&parseInt(xe.split("Firefox/")[1],10)<4,Me=!Ae&&!we&&!!oe.createElement("canvas").getContext,Ie=oe.documentElement.ontouchstart!==_,De={},Ee=0,Oe=function(){},Re=[],ze="div",Be="none",Fe=/^[0-9]+$/,Ne="rgba(192,192,192,"+(Ae?1e-4:.002)+")",_e="stroke-width",He={};ae.Highcharts=ae.Highcharts?M(16,!0):{},X=function(e,i,n){if(!c(i)||isNaN(i))return"Invalid date";var r,e=p(e,"%Y-%m-%d %H:%M:%S"),s=new Date(i-q),o=s[Z](),a=s[K](),l=s[Q](),h=s[J](),d=s[te](),u=$.lang,f=u.weekdays,s=t({a:f[a].substr(0,3),A:f[a],d:v(l),e:l,b:u.shortMonths[h],B:u.months[h],m:v(h+1),y:d.toString().substr(2,2),Y:d,H:v(o),I:v(o%12||12),l:o%12||12,M:v(s[U]()),p:12>o?"AM":"PM",P:12>o?"am":"pm",S:v(s.getSeconds()),L:v(he(i%1e3),3)},Highcharts.dateFormats);for(r in s)for(;-1!==e.indexOf("%"+r);)e=e.replace("%"+r,"function"==typeof s[r]?s[r](i):s[r]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},S.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},j=function(){for(var t=0,e=arguments,i=e.length,n={};i>t;t++)n[e[t++]]=e[t];return n}("millisecond",1,"second",1e3,"minute",6e4,"hour",36e5,"day",864e5,"week",6048e5,"month",26784e5,"year",31556952e3),Y={init:function(t,e,i){var n,r,s,e=e||"",o=t.shift,a=e.indexOf("C")>-1,l=a?7:3,e=e.split(" "),i=[].concat(i),h=function(t){for(n=t.length;n--;)"M"===t[n]&&t.splice(n+1,0,t[n+1],t[n+2],t[n+1],t[n+2])};if(a&&(h(e),h(i)),t.isArea&&(r=e.splice(e.length-6,6),s=i.splice(i.length-6,6)),o<=i.length/l&&e.length===i.length)for(;o--;)i=[].concat(i).splice(0,l).concat(i);if(t.shift=0,e.length)for(t=i.length;e.length<t;)o=[].concat(e).splice(e.length-l,l),a&&(o[l-6]=o[l-2],o[l-5]=o[l-1]),e=e.concat(o);return r&&(e=e.concat(r),i=i.concat(s)),[e,i]},step:function(t,e,i,n){var r=[],s=t.length;if(1===i)r=n;else if(s===e.length&&1>i)for(;s--;)n=parseFloat(t[s]),r[s]=isNaN(n)?t[s]:i*parseFloat(e[s]-n)+n;else r=e;return r}},function(e){ae.HighchartsAdapter=ae.HighchartsAdapter||e&&{init:function(t){var i,r=e.fx,s=r.step,o=e.Tween,a=o&&o.propHooks;i=e.cssHooks.opacity,e.extend(e.easing,{easeOutQuad:function(t,e,i,n,r){return-n*(e/=r)*(e-2)+i}}),e.each(["cur","_default","width","height","opacity"],function(t,e){var i,n=s;"cur"===e?n=r.prototype:"_default"===e&&o&&(n=a[e],e="set"),(i=n[e])&&(n[e]=function(n){var r,n=t?n:this;return"align"!==n.prop?(r=n.elem,r.attr?r.attr(n.prop,"cur"===e?_:n.now):i.apply(this,arguments)):void 0})}),x(i,"get",function(t,e,i){return e.attr?e.opacity||0:t.call(this,e,i)}),i=function(e){var i,n=e.elem;e.started||(i=t.init(n,n.d,n.toD),e.start=i[0],e.end=i[1],e.started=!0),n.attr("d",t.step(e.start,e.end,e.pos,n.toD))},o?a.d={set:i}:s.d=i,this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(e.call(t[i],t[i],i,t)===!1)return i},e.fn.highcharts=function(){var t,e,i="Chart",r=arguments;return n(r[0])&&(i=r[0],r=Array.prototype.slice.call(r,1)),t=r[0],t!==_&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new Highcharts[i](t,r[1]),e=this),t===_&&(e=Re[d(this[0],"data-highcharts-chart")]),e}},getScript:e.getScript,inArray:e.inArray,adapterRun:function(t,i){return e(t)[i]()},grep:e.grep,map:function(t,e){for(var i=[],n=0,r=t.length;r>n;n++)i[n]=e.call(t[n],t[n],n,t);return i},offset:function(t){return e(t).offset()},addEvent:function(t,i,n){e(t).bind(i,n)},removeEvent:function(t,i,n){var r=oe.removeEventListener?"removeEventListener":"detachEvent";oe[r]&&t&&!t[r]&&(t[r]=function(){}),e(t).unbind(i,n)},fireEvent:function(i,n,r,s){var o,a=e.Event(n),l="detached"+n;!we&&r&&(delete r.layerX,delete r.layerY),t(a,r),i[n]&&(i[l]=i[n],i[n]=null),e.each(["preventDefault","stopPropagation"],function(t,e){var i=a[e];a[e]=function(){try{i.call(a)}catch(t){"preventDefault"===e&&(o=!0)}}}),e(i).trigger(a),i[l]&&(i[n]=i[l],i[l]=null),s&&!a.isDefaultPrevented()&&!o&&s(a)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===_&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(t,i,n){var r=e(t);t.style||(t.style={}),i.d&&(t.toD=i.d,i.d=1),r.stop(),i.opacity!==_&&t.attr&&(i.opacity+="px"),r.animate(i,n)},stop:function(t){e(t).stop()}}}(ae.jQuery);var We=ae.HighchartsAdapter,$e=We||{};We&&We.init.call(We,Y);var Xe=$e.adapterRun,Ge=$e.getScript,Ye=$e.inArray,je=$e.each,Ve=$e.grep,qe=$e.offset,Ue=$e.map,Ze=$e.addEvent,Ke=$e.removeEvent,Qe=$e.fireEvent,Je=$e.washMouseEvent,ti=$e.animate,ei=$e.stop,$e={enabled:!0,x:0,y:15,style:{color:"#666",cursor:"default",fontSize:"11px",lineHeight:"14px"}};$={colors:"#2f7ed8,#0d233a,#8bbc21,#910000,#1aadce,#492970,#f28f43,#77a1e5,#c42525,#a6c96a".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",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(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/3.0.8/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/3.0.8/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#274b6d",fontSize:"16px"}},subtitle:{text:"",align:"center",style:{color:"#4d759e"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:e($e,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":y(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{cursor:"pointer",color:"#274b6d",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Ae,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',shadow:!0,snap:Ce?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"ThingSpeak.com",href:"https://thingspeak.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#D62020",fontSize:"9px"}}};var ii=$.plotOptions,We=ii.line;E();var ni=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,ri=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,si=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,oi=function(t){var n,r,s=[];return function(t){t&&t.stops?r=Ue(t.stops,function(t){return oi(t[1])}):(n=ni.exec(t))?s=[i(n[1]),i(n[2]),i(n[3]),parseFloat(n[4],10)]:(n=ri.exec(t))?s=[i(n[1],16),i(n[2],16),i(n[3],16),1]:(n=si.exec(t))&&(s=[i(n[1]),i(n[2]),i(n[3]),1])}(t),{get:function(i){var n;return r?(n=e(t),n.stops=[].concat(n.stops),je(r,function(t,e){n.stops[e]=[n.stops[e][0],t.get(i)]})):n=s&&!isNaN(s[0])?"rgb"===i?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===i?s[3]:"rgba("+s.join(",")+")":t,n},brighten:function(t){if(r)je(r,function(e){e.brighten(t)});else if(o(t)&&0!==t){var e;for(e=0;3>e;e++)s[e]+=i(255*t),s[e]<0&&(s[e]=0),s[e]>255&&(s[e]=255)}return this},rgba:s,setOpacity:function(t){return s[3]=t,this}}};O.prototype={init:function(t,e){this.element="span"===e?g(e):oe.createElementNS(Pe,e),this.renderer=t,this.attrSetters={}},opacity:1,animate:function(t,i,n){i=p(i,G,!0),ei(this),i?(i=e(i),n&&(i.complete=n),ti(this,t,i)):(this.attr(t),n&&n())},attr:function(t,e){var r,s,o,a,l,h,u,f=this.element,g=f.nodeName.toLowerCase(),m=this.renderer,y=this.attrSetters,v=this.shadows,x=this;if(n(t)&&c(e)&&(r=t,t={},t[r]=e),n(t))r=t,"circle"===g?r={x:"cx",y:"cy"}[r]||r:"strokeWidth"===r&&(r="stroke-width"),x=d(f,r)||this[r]||0,"d"!==r&&"visibility"!==r&&"fill"!==r&&(x=parseFloat(x));else{for(r in t)if(l=!1,s=t[r],o=y[r]&&y[r].call(this,s,r),o!==!1){if(o!==_&&(s=o),"d"===r)s&&s.join&&(s=s.join(" ")),/(NaN| {2}|^$)/.test(s)&&(s="M 0 0");else if("x"===r&&"text"===g)for(o=0;o<f.childNodes.length;o++)a=f.childNodes[o],d(a,"x")===d(f,"x")&&d(a,"x",s);else if(!this.rotation||"x"!==r&&"y"!==r)if("fill"===r)s=m.color(s,f,r);else if("circle"!==g||"x"!==r&&"y"!==r)if("rect"===g&&"r"===r)d(f,{rx:s,ry:s}),l=!0;else if("translateX"===r||"translateY"===r||"rotation"===r||"verticalAlign"===r||"scaleX"===r||"scaleY"===r)l=u=!0;else if("stroke"===r)s=m.color(s,f,r);else if("dashstyle"===r){if(r="stroke-dasharray",s=s&&s.toLowerCase(),"solid"===s)s=Be;else if(s){for(s=s.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),o=s.length;o--;)s[o]=i(s[o])*p(t["stroke-width"],this["stroke-width"]);s=s.join(",")}}else"width"===r?s=i(s):"align"===r?(r="text-anchor",s={left:"start",center:"middle",right:"end"}[s]):"title"===r&&(o=f.getElementsByTagName("title")[0],o||(o=oe.createElementNS(Pe,"title"),f.appendChild(o)),o.textContent=s);else r={x:"cx",y:"cy"}[r]||r;else u=!0;if("strokeWidth"===r&&(r="stroke-width"),("stroke-width"===r||"stroke"===r)&&(this[r]=s,this.stroke&&this["stroke-width"]?(d(f,"stroke",this.stroke),d(f,"stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===r&&0===s&&this.hasStroke&&(f.removeAttribute("stroke"),this.hasStroke=!1),l=!0),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(r)&&(h||(this.symbolAttr(t),h=!0),l=!0),v&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(r))for(o=v.length;o--;)d(v[o],r,"height"===r?ue(s-(v[o].cutHeight||0),0):s);("width"===r||"height"===r)&&"rect"===g&&0>s&&(s=0),this[r]=s,"text"===r?(s!==this.textStr&&delete this.bBox,this.textStr=s,this.added&&m.buildText(this)):l||d(f,r,s)}u&&this.updateTransform()}return x},addClass:function(t){var e=this.element,i=d(e,"class")||"";return-1===i.indexOf(t)&&d(e,"class",i+" "+t),this},symbolAttr:function(t){var e=this;je("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(i){e[i]=p(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":Be)},crisp:function(t,e,i,n,r){var s,o,a={},l={},t=t||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;o=he(t)%2/2,l.x=ce(e||this.x||0)+o,l.y=ce(i||this.y||0)+o,l.width=ce((n||this.width||0)-2*o),l.height=ce((r||this.height||0)-2*o),l.strokeWidth=t;for(s in l)this[s]!==l[s]&&(this[s]=a[s]=l[s]);return a},css:function(e){var n,r=this.element,s=this.textWidth=e&&e.width&&"text"===r.nodeName.toLowerCase()&&i(e.width),o="",a=function(t,e){return"-"+e.toLowerCase()};if(e&&e.color&&(e.fill=e.color),this.styles=e=t(this.styles,e),s&&delete e.width,we&&!Ae)f(this.element,e);else{for(n in e)o+=n.replace(/([A-Z])/g,a)+":"+e[n]+";";d(r,"style",o)}return s&&this.added&&this.renderer.buildText(this),this},on:function(t,e){var i=this,n=i.element;return Ie&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===xe.indexOf("Android")||Date.now()-(i.touchEventFired||0)>1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,r=this.inverted,s=this.rotation;r&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],r?t.push("rotate(90) scale(-1,1)"):s&&t.push("rotate("+s+" "+(this.x||0)+" "+(this.y||0)+")"),(c(i)||c(n))&&t.push("scale("+p(i,1)+" "+p(n,1)+")"),t.length&&d(this.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var r,s,o,a,l={};return s=this.renderer,o=s.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!i||n(i))&&(this.alignTo=r=i||"renderer",h(o,this),o.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,r=this.alignTo),i=p(i,s[r],s),r=t.align,s=t.verticalAlign,o=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),("right"===r||"center"===r)&&(o+=(i.width-(t.width||0))/{right:1,center:2}[r]),l[e?"translateX":"x"]=he(o),("bottom"===s||"middle"===s)&&(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[s]||1)),l[e?"translateY":"y"]=he(a),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(){var e,i,n=this.bBox,r=this.renderer,s=this.rotation;e=this.element;var o=this.styles,a=s*ve;i=this.textStr;var l;if((""===i||Fe.test(i))&&(l=i.length+"|"+o.fontSize+"|"+o.fontFamily,n=r.cache[l]),!n){if(e.namespaceURI===Pe||r.forExport){try{n=e.getBBox?t({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(h){}(!n||n.width<0)&&(n={width:0,height:0})}else n=this.htmlGetBBox();r.isSVG&&(e=n.width,i=n.height,we&&o&&"11px"===o.fontSize&&"22.7"===i.toPrecision(3)&&(n.height=i=14),s&&(n.width=fe(i*me(a))+fe(e*ge(a)),n.height=fe(i*ge(a))+fe(e*me(a)))),this.bBox=n,l&&(r.cache[l]=n)}return n},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,n=this.renderer,r=t||n,s=r.element||n.box,o=s.childNodes,a=this.element,l=d(a,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&n.buildText(this),l&&(r.handleZ=!0,l=i(l)),r.handleZ)for(r=0;r<o.length;r++)if(t=o[r],n=d(t,"zIndex"),t!==a&&(i(n)>l||!c(l)&&c(n))){s.insertBefore(a,t),e=!0;break}return e||s.appendChild(a),this.added=!0,Qe(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,n=i.element||{},r=i.shadows,s=i.renderer.isSVG&&"SPAN"===n.nodeName&&i.parentGroup;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=n.point=null,ei(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e<i.stops.length;e++)i.stops[e]=i.stops[e].destroy();i.stops=null}for(i.safeRemoveChild(n),r&&je(r,function(t){i.safeRemoveChild(t)});s&&0===s.div.childNodes.length;)n=s.parentGroup,i.safeRemoveChild(s.div),delete s.div,s=n;i.alignTo&&h(i.renderer.alignedObjects,i);for(t in i)delete i[t];return null},shadow:function(t,e,i){var n,r,s,o,a,l,h=[],c=this.element;if(t){for(o=p(t.width,3),a=(t.opacity||.15)/o,l=this.parentInverted?"(-1,-1)":"("+p(t.offsetX,1)+", "+p(t.offsetY,1)+")",n=1;o>=n;n++)r=c.cloneNode(0),s=2*o+1-2*n,d(r,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":s,transform:"translate"+l,fill:Be}),i&&(d(r,"height",ue(d(r,"height")-s,0)),r.cutHeight=s),e?e.element.appendChild(r):c.parentNode.insertBefore(r,c),h.push(r);this.shadows=h}return this}};var ai=function(){this.init.apply(this,arguments)};ai.prototype={Element:O,init:function(t,e,i,n){var r,s,o=location;r=this.createElement("svg").attr({version:"1.1"}),s=r.element,t.appendChild(s),-1===t.innerHTML.indexOf("xmlns")&&d(s,"xmlns",Pe),this.isSVG=!0,this.box=s,this.boxWrapper=r,this.alignedObjects=[],this.url=(Te||Se)&&oe.getElementsByTagName("base").length?o.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(oe.createTextNode("Created with Highcharts 3.0.8")),this.defs=this.createElement("defs").add(),this.forExport=n,this.gradients={},this.cache={},this.setSize(e,i,!1);var a;Te&&t.getBoundingClientRect&&(this.subPixelFix=e=function(){f(t,{left:0,top:0}),a=t.getBoundingClientRect(),f(t,{left:de(a.left)-a.left+"px",top:de(a.top)-a.top+"px"})},e(),Ze(ae,"resize",e))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),A(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.subPixelFix&&Ke(ae,"resize",this.subPixelFix),this.alignedObjects=null
},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(t){for(var e=t.element,n=this,r=n.forExport,s=p(t.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),o=e.childNodes,a=/style="([^"]+)"/,l=/href="(http[^"]+)"/,h=d(e,"x"),c=t.styles,u=t.textWidth,g=c&&c.lineHeight,m=o.length;m--;)e.removeChild(o[m]);u&&!t.added&&this.box.appendChild(e),""===s[s.length-1]&&s.pop(),je(s,function(s,o){var p,m=0,s=s.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");p=s.split("|||"),je(p,function(s){if(""!==s||1===p.length){var y,v={},x=oe.createElementNS(Pe,"tspan");if(a.test(s)&&(y=s.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),d(x,"style",y)),l.test(s)&&!r&&(d(x,"onclick",'location.href="'+s.match(l)[1]+'"'),f(x,{cursor:"pointer"})),s=(s.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">")," "!==s&&(x.appendChild(oe.createTextNode(s)),m?v.dx=0:v.x=h,d(x,v),!m&&o&&(!Ae&&r&&f(x,{display:"block"}),d(x,"dy",g||n.fontMetrics(/px$/.test(x.style.fontSize)?x.style.fontSize:c.fontSize).h,Se&&x.offsetHeight)),e.appendChild(x),m++,u))for(var b,w,s=s.replace(/([^\^])-/g,"$1- ").split(" "),v=s.length>1&&"nowrap"!==c.whiteSpace,k=t._clipHeight,S=[],T=i(g||16),C=1;v&&(s.length||S.length);)delete t.bBox,b=t.getBBox(),w=b.width,!Ae&&n.forExport&&(w=n.measureSpanWidth(x.firstChild.data,t.styles)),b=w>u,b&&1!==s.length?(x.removeChild(x.firstChild),S.unshift(s.pop())):(s=S,S=[],s.length&&(C++,k&&C*T>k?(s=["..."],t.attr("title",t.textStr)):(x=oe.createElementNS(Pe,"tspan"),d(x,{dy:T,x:h}),y&&d(x,"style",y),e.appendChild(x),w>u&&(u=w)))),s.length&&x.appendChild(oe.createTextNode(s.join(" ").replace(/- /g,"-")))}})})},button:function(i,n,r,s,o,a,l,h,c){var d,u,p,f,g,m,y=this.label(i,n,r,c,null,null,null,null,"button"),v=0,i={x1:0,y1:0,x2:0,y2:1},o=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:i,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},o);return p=o.style,delete o.style,a=e(o,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),f=a.style,delete a.style,l=e(o,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#9BD"],[1,"#CDF"]]}},l),g=l.style,delete l.style,h=e(o,{style:{color:"#CCC"}},h),m=h.style,delete h.style,Ze(y.element,we?"mouseover":"mouseenter",function(){3!==v&&y.attr(a).css(f)}),Ze(y.element,we?"mouseout":"mouseleave",function(){3!==v&&(d=[o,a,l][v],u=[p,f,g][v],y.attr(d).css(u))}),y.setState=function(t){(y.state=v=t)?2===t?y.attr(l).css(g):3===t&&y.attr(h).css(m):y.attr(o).css(p)},y.on("click",function(){3!==v&&s.call(y)}).attr(o).css(t({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=he(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=he(t[2])+e%2/2),t},path:function(e){var i={fill:Be};return s(e)?i.d=e:r(e)&&t(i,e),this.createElement("path").attr(i)},circle:function(t,e,i){return t=r(t)?t:{x:t,y:e,r:i},this.createElement("circle").attr(t)},arc:function(t,e,i,n,s,o){return r(t)&&(e=t.y,i=t.r,n=t.innerR,s=t.start,o=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:s||0,end:o||0}),t.r=i,t},rect:function(t,e,i,n,s,o){return s=r(t)?t.r:s,s=this.createElement("rect").attr({rx:s,ry:s,fill:Be}),s.attr(r(t)?t:s.crisp(o,t,e,ue(i,0),ue(n,0)))},setSize:function(t,e,i){var n=this.alignedObjects,r=n.length;for(this.width=t,this.height=e,this.boxWrapper[p(i,!0)?"animate":"attr"]({width:t,height:e});r--;)n[r].align()},g:function(t){var e=this.createElement("g");return c(t)?e.attr({"class":"highcharts-"+t}):e},image:function(e,i,n,r,s){var o={preserveAspectRatio:Be};return arguments.length>1&&t(o,{x:i,y:n,width:r,height:s}),o=this.createElement("image").attr(o),o.element.setAttributeNS?o.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):o.element.setAttribute("hc-svg-href",e),o},symbol:function(e,i,n,r,s,o){var a,l,h,c=this.symbols[e],c=c&&c(he(i),he(n),r,s,o),d=/^url\((.*?)\)$/;return c?(a=this.path(c),t(a,{symbolName:e,x:i,y:n,width:r,height:s}),o&&t(a,o)):d.test(e)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(he((r-e[0])/2),he((s-e[1])/2)))},l=e.match(d)[1],e=De[l],a=this.image(l).attr({x:i,y:n}),a.isImg=!0,e?h(a,e):(a.attr({width:0,height:0}),g("img",{onload:function(){h(a,De[l]=[this.width,this.height])},src:l}))),a},symbols:{circle:function(t,e,i,n){var r=.166*i;return["M",t+i/2,e,"C",t+i+r,e,t+i+r,e+n,t+i/2,e+n,"C",t-r,e+n,t-r,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,r){var s=r.start,i=r.r||i||n,o=r.end-.001,n=r.innerR,a=r.open,l=ge(s),h=me(s),c=ge(o),o=me(o),r=r.end-s<ye?0:1;return["M",t+i*l,e+i*h,"A",i,i,0,r,1,t+i*c,e+i*o,a?"M":"L",t+n*c,e+n*o,"A",n,n,0,r,0,t+n*l,e+n*h,a?"":"Z"]}},clipRect:function(t,e,i,n){var r="highcharts-"+Ee++,s=this.createElement("clipPath").attr({id:r}).add(this.defs),t=this.rect(t,e,i,n,0).add(s);return t.id=r,t.clipPath=s,t},color:function(t,i,n){var r,o,a,l,h,u,p,f,g=this,m=/^rgba/,y=[];if(t&&t.linearGradient?o="linearGradient":t&&t.radialGradient&&(o="radialGradient"),o){n=t[o],a=g.gradients,h=t.stops,i=i.radialReference,s(n)&&(t[o]=n={x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&i&&!c(n.gradientUnits)&&(n=e(n,{cx:i[0]-i[2]/2+n.cx*i[2],cy:i[1]-i[2]/2+n.cy*i[2],r:n.r*i[2],gradientUnits:"userSpaceOnUse"}));for(f in n)"id"!==f&&y.push(f,n[f]);for(f in h)y.push(h[f]);return y=y.join(","),a[y]?t=a[y].id:(n.id=t="highcharts-"+Ee++,a[y]=l=g.createElement(o).attr(n).add(g.defs),l.stops=[],je(h,function(t){m.test(t[1])?(r=oi(t[1]),u=r.get("rgb"),p=r.get("a")):(u=t[1],p=1),t=g.createElement("stop").attr({offset:t[0],"stop-color":u,"stop-opacity":p}).add(l),l.stops.push(t)})),"url("+g.url+"#"+t+")"}return m.test(t)?(r=oi(t),d(i,n+"-opacity",r.get("a")),r.get("rgb")):(i.removeAttribute(n+"-opacity"),t)},text:function(t,e,i,n){var r=$.chart.style,s=Me||!Ae&&this.forExport;return n&&!this.forExport?this.html(t,e,i):(e=he(p(e,0)),i=he(p(i,0)),t=this.createElement("text").attr({x:e,y:i,text:t}).css({fontFamily:r.fontFamily,fontSize:r.fontSize}),s&&t.css({position:"absolute"}),t.x=e,t.y=i,t)},fontMetrics:function(t){var t=i(t||11),t=24>t?t+4:he(1.2*t),e=he(.8*t);return{h:t,b:e}},label:function(i,n,r,s,o,a,l,h,d){function u(){var t,i;t=P.element.style,y=(void 0===v||void 0===x||C.styles.textAlign)&&P.getBBox(),C.width=(v||y.width||0)+2*L+M,C.height=(x||y.height||0)+2*L,k=L+T.fontMetrics(t&&t.fontSize).b,S&&(m||(t=he(-A*L),i=h?-k:0,C.box=m=s?T.symbol(s,t,i,C.width,C.height,D):T.rect(t,i,C.width,C.height,0,D[_e]),m.add(C)),m.isImg||m.attr(e({width:C.width,height:C.height},D)),D=null)}function p(){var t,e=C.styles,e=e&&e.textAlign,i=M+L*(1-A);t=h?0:k,!c(v)||"center"!==e&&"right"!==e||(i+={center:.5,right:1}[e]*(v-y.width)),(i!==P.x||t!==P.y)&&P.attr({x:i,y:t}),P.x=i,P.y=t}function f(t,e){m?m.attr(t,e):D[t]=e}function g(){P.add(C),C.attr({text:i,x:n,y:r}),m&&c(o)&&C.attr({anchorX:o,anchorY:a})}var m,y,v,x,b,w,k,S,T=this,C=T.g(d),P=T.text("",0,0,l).attr({zIndex:1}),A=0,L=3,M=0,I=0,D={},l=C.attrSetters;Ze(C,"add",g),l.width=function(t){return v=t,!1},l.height=function(t){return x=t,!1},l.padding=function(t){return c(t)&&t!==L&&(L=t,p()),!1},l.paddingLeft=function(t){return c(t)&&t!==M&&(M=t,p()),!1},l.align=function(t){return A={left:0,center:.5,right:1}[t],!1},l.text=function(t,e){return P.attr(e,t),u(),p(),!1},l[_e]=function(t,e){return S=!0,I=t%2/2,f(e,t),!1},l.stroke=l.fill=l.r=function(t,e){return"fill"===e&&(S=!0),f(e,t),!1},l.anchorX=function(t,e){return o=t,f(e,t+I-b),!1},l.anchorY=function(t,e){return a=t,f(e,t-w),!1},l.x=function(t){return C.x=t,t-=A*((v||y.width)+L),b=he(t),C.attr("translateX",b),!1},l.y=function(t){return w=C.y=he(t),C.attr("translateY",w),!1};var E=C.css;return t(C,{css:function(t){if(t){var i={},t=e(t);je("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(e){t[e]!==_&&(i[e]=t[e],delete t[e])}),P.css(i)}return E.call(C,t)},getBBox:function(){return{width:y.width+2*L,height:y.height+2*L,x:y.x-L,y:y.y-L}},shadow:function(t){return m&&m.shadow(t),C},destroy:function(){Ke(C,"add",g),Ke(C.element,"mouseenter"),Ke(C.element,"mouseleave"),P&&(P=P.destroy()),m&&(m=m.destroy()),O.prototype.destroy.call(C),C=T=u=p=f=g=null}})}},H=ai,t(O.prototype,{htmlCss:function(e){var i=this.element;return(i=e&&"SPAN"===i.tagName&&e.width)&&(delete e.width,this.textWidth=i,this.updateTransform()),this.styles=t(this.styles,e),f(this.element,e),this},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position="absolute"),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,n=this.translateX||0,r=this.translateY||0,s=this.x||0,o=this.y||0,a=this.textAlign||"left",l={left:0,center:.5,right:1}[a],h=this.shadows;if(f(e,{marginLeft:n,marginTop:r}),h&&je(h,function(t){f(t,{marginLeft:n+1,marginTop:r+1})}),this.inverted&&je(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var d,u=this.rotation,g=i(this.textWidth),m=[u,a,e.innerHTML,this.textWidth].join(",");m!==this.cTT&&(d=t.fontMetrics(e.style.fontSize).b,c(u)&&this.setSpanRotation(u,l,d),h=p(this.elemWidth,e.offsetWidth),h>g&&/[ \-]/.test(e.textContent||e.innerText)&&(f(e,{width:g+"px",display:"block",whiteSpace:"normal"}),h=g),this.getSpanCorrection(h,d,l,u,a)),f(e,{left:s+(this.xCorr||0)+"px",top:o+(this.yCorr||0)+"px"}),Se&&(d=e.offsetHeight),this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},r=we?"-ms-transform":Se?"-webkit-transform":Te?"MozTransform":be?"-o-transform":"";n[r]=n.transform="rotate("+t+"deg)",n[r+(Te?"Origin":"-origin")]=100*e+"% "+i+"px",f(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),t(ai.prototype,{html:function(e,i,n){var r=$.chart.style,s=this.createElement("span"),o=s.attrSetters,a=s.element,l=s.renderer;return o.text=function(t){return t!==a.innerHTML&&delete this.bBox,a.innerHTML=t,!1},o.x=o.y=o.align=o.rotation=function(t,e){return"align"===e&&(e="textAlign"),s[e]=t,s.htmlUpdateTransform(),!1},s.attr({text:e,x:he(i),y:he(n)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:r.fontFamily,fontSize:r.fontSize}),s.css=s.htmlCss,l.isSVG&&(s.add=function(e){var i,n=l.box.parentNode,r=[];if(this.parentGroup=e){if(i=e.div,!i){for(;e;)r.push(e),e=e.parentGroup;je(r.reverse(),function(e){var r;i=e.div=e.div||g(ze,{className:d(e.element,"class")},{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px"},i||n),r=i.style,t(e.attrSetters,{translateX:function(t){r.left=t+"px"},translateY:function(t){r.top=t+"px"},visibility:function(t,e){r[e]=t}})})}}else i=n;return i.appendChild(a),s.added=!0,s.alignOnAdd&&s.htmlUpdateTransform(),s}),s}});var li;if(!Ae&&!Me){Highcharts.VMLElement=li={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ","absolute",";"],r=e===ze;("shape"===e||r)&&n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",r?"hidden":"visible"),i.push(' style="',n.join(""),'"/>'),e&&(i=r||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=g(i)),this.renderer=t,this.attrSetters={}},add:function(t){var e=this.renderer,i=this.element,n=e.box,n=t?t.element||t:n;return t&&t.inverted&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),Qe(this,"add"),this},updateTransform:O.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=ge(t*ve),i=me(t*ve);f(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):Be})},getSpanCorrection:function(t,e,i,n,r){var s,o=n?ge(n*ve):1,a=n?me(n*ve):0,l=p(this.elemHeight,this.element.offsetHeight);this.xCorr=0>o&&-t,this.yCorr=0>a&&-l,s=0>o*a,this.xCorr+=a*e*(s?1-i:i),this.yCorr-=o*e*(n?s?i:1-i:1),r&&"left"!==r&&(this.xCorr-=t*i*(0>o?-1:1),n&&(this.yCorr-=l*i*(0>a?-1:1)),f(this.element,{textAlign:r}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)o(t[e])?i[e]=he(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},attr:function(t,e){var i,r,s,a,l,h=this.element||{},u=h.style,p=h.nodeName,f=this.renderer,m=this.symbolName,y=this.shadows,v=this.attrSetters,x=this;if(n(t)&&c(e)&&(i=t,t={},t[i]=e),n(t))i=t,x="strokeWidth"===i||"stroke-width"===i?this.strokeweight:this[i];else for(i in t)if(r=t[i],l=!1,s=v[i]&&v[i].call(this,r,i),s!==!1&&null!==r){if(s!==_&&(r=s),m&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))a||(this.symbolAttr(t),a=!0),l=!0;else if("d"===i){if(r=r||[],this.d=r.join(" "),h.path=r=this.pathToVML(r),y)for(s=y.length;s--;)y[s].path=y[s].cutOff?this.cutOffPath(r,y[s].cutOff):r;l=!0}else if("visibility"===i){if(y)for(s=y.length;s--;)y[s].style[i]=r;"DIV"===p&&(r="hidden"===r?"-999em":0,ke||(u[i]=r?"visible":"hidden"),i="top"),u[i]=r,l=!0}else"zIndex"===i?(r&&(u[i]=r),l=!0):-1!==Ye(i,["x","y","width","height"])?(this[i]=r,"x"===i||"y"===i?i={x:"left",y:"top"}[i]:r=ue(0,r),this.updateClipping?(this[i]=r,this.updateClipping()):u[i]=r,l=!0):"class"===i&&"DIV"===p?h.className=r:"stroke"===i?(r=f.color(r,h,i),i="strokecolor"):"stroke-width"===i||"strokeWidth"===i?(h.stroked=r?!0:!1,i="strokeweight",this[i]=r,o(r)&&(r+="px")):"dashstyle"===i?((h.getElementsByTagName("stroke")[0]||g(f.prepVML(["<stroke/>"]),null,null,h))[i]=r||"solid",this.dashstyle=r,l=!0):"fill"===i?"SPAN"===p?u.color=r:"IMG"!==p&&(h.filled=r!==Be?!0:!1,r=f.color(r,h,i,this),i="fillcolor"):"opacity"===i?l=!0:"shape"===p&&"rotation"===i?(this[i]=h.style[i]=r,h.style.left=-he(me(r*ve)+1)+"px",h.style.top=he(ge(r*ve))+"px"):("translateX"===i||"translateY"===i||"rotation"===i)&&(this[i]=r,this.updateTransform(),l=!0);l||(ke?h[i]=r:d(h,i,r))}return x},clip:function(t){var e,i=this;return t?(e=t.members,h(e,i),e.push(i),i.destroyClip=function(){h(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:ke?"inherit":"rect(auto)"}),i.css(t)},css:O.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&L(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),O.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=ae.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var n,t=t.split(/[ ,]/);return n=t.length,(9===n||11===n)&&(t[n-4]=t[n-2]=i(t[n-2])-10*e),t.join(" ")},shadow:function(t,e,n){var r,s,o,a,l,h,c,d=[],u=this.element,f=this.renderer,m=u.style,y=u.path;if(y&&"string"!=typeof y.value&&(y="x"),l=y,t){for(h=p(t.width,3),c=(t.opacity||.15)/h,r=1;3>=r;r++)a=2*h+1-2*r,n&&(l=this.cutOffPath(y.value,a+.5)),o=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',u.style.cssText,'" />'],s=g(f.prepVML(o),null,{left:i(m.left)+p(t.offsetX,1),top:i(m.top)+p(t.offsetY,1)}),n&&(s.cutOff=a+1),o=['<stroke color="',t.color||"black",'" opacity="',c*r,'"/>'],g(f.prepVML(o),null,null,s),e?e.element.appendChild(s):u.parentNode.insertBefore(s,u),d.push(s);this.shadows=d}return this}},li=m(O,li);var hi={Element:li,isIE8:xe.indexOf("MSIE 8.0")>-1,init:function(t,e,i){var n,r;if(this.alignedObjects=[],n=this.createElement(ze),r=n.element,r.style.position="relative",t.appendChild(n.element),this.isVML=!0,this.box=r,this.boxWrapper=n,this.cache={},this.setSize(e,i,!1),!oe.namespaces.hcv){oe.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{oe.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(s){oe.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,i,n,s){var o=this.createElement(),a=r(e);return t(o,{members:[],left:(a?e.x:e)+1,top:(a?e.y:i)+1,width:(a?e.width:n)-1,height:(a?e.height:s)-1,getCSS:function(e){var i=e.element,n=i.nodeName,e=e.inverted,r=this.top-("shape"===n?i.offsetTop:0),s=this.left,i=s+this.width,o=r+this.height,r={clip:"rect("+he(e?s:r)+"px,"+he(e?o:i)+"px,"+he(e?i:o)+"px,"+he(e?r:s)+"px)"};return!e&&ke&&"DIV"===n&&t(r,{width:i+"px",height:o+"px"}),r},updateClipping:function(){je(o.members,function(t){t.css(o.getCSS(t))})}})},color:function(t,e,i,n){var r,s,o,a=this,l=/^rgba/,h=Be;if(t&&t.linearGradient?o="gradient":t&&t.radialGradient&&(o="pattern"),o){var c,d,u,p,f,m,y,v,x=t.linearGradient||t.radialGradient,b="",t=t.stops,w=[],k=function(){s=['<fill colors="'+w.join(",")+'" opacity="',f,'" o:opacity2="',p,'" type="',o,'" ',b,'focus="100%" method="any" />'],g(a.prepVML(s),null,null,e)};if(u=t[0],v=t[t.length-1],u[0]>0&&t.unshift([0,u[1]]),v[0]<1&&t.push([1,v[1]]),je(t,function(t,e){l.test(t[1])?(r=oi(t[1]),c=r.get("rgb"),d=r.get("a")):(c=t[1],d=1),w.push(100*t[0]+"% "+c),e?(f=d,m=c):(p=d,y=c)}),"fill"===i)if("gradient"===o)i=x.x1||x[0]||0,t=x.y1||x[1]||0,u=x.x2||x[2]||0,x=x.y2||x[3]||0,b='angle="'+(90-180*le.atan((x-t)/(u-i))/ye)+'"',k();else{var S,h=x.r,T=2*h,C=2*h,P=x.cx,A=x.cy,L=e.radialReference,h=function(){L&&(S=n.getBBox(),P+=(L[0]-S.x)/S.width-.5,A+=(L[1]-S.y)/S.height-.5,T*=L[2]/S.width,C*=L[2]/S.height),b='src="'+$.global.VMLRadialGradientURL+'" size="'+T+","+C+'" origin="0.5,0.5" position="'+P+","+A+'" color2="'+y+'" ',k()};n.added?h():Ze(n,"add",h),h=m}else h=c}else l.test(t)&&"IMG"!==e.tagName?(r=oi(t),s=["<",i,' opacity="',r.get("a"),'"/>'],g(this.prepVML(s),null,null,e),h=r.get("rgb")):(h=e.getElementsByTagName(i),h.length&&(h[0].opacity=1,h[0].type="solid"),h=t);return h},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:ai.prototype.html,path:function(e){var i={coordsize:"10 10"};return s(e)?i.d=e:r(e)&&t(i,e),this.createElement("shape").attr(i)},circle:function(t,e,i){var n=this.symbol("circle");return r(t)&&(i=t.r,e=t.y,t=t.x),n.isCircle=!0,n.r=i,n.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement(ze).attr(e)},image:function(t,e,i,n,r){var s=this.createElement("img").attr({src:t});return arguments.length>1&&s.attr({x:e,y:i,width:n,height:r}),s},rect:function(t,e,i,n,s,o){var a=this.symbol("rect");return a.r=r(t)?t.r:s,a.attr(r(t)?t:a.crisp(o,t,e,ue(i,0),ue(n,0)))},invertChild:function(t,e){var n=e.style;f(t,{flip:"x",left:i(n.width)-1,top:i(n.height)-1,rotation:-90})},symbols:{arc:function(t,e,i,n,r){var s=r.start,o=r.end,a=r.r||i||n,i=r.innerR,n=ge(s),l=me(s),h=ge(o),c=me(o);return o-s===0?["x"]:(s=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*l,t+a*h,e+a*c],r.open&&!i&&s.push("e","M",t,e),s.push("at",t-i,e-i,t+i,e+i,t+i*h,e+i*c,t+i*n,e+i*l,"x","e"),s.isArc=!0,s)},circle:function(t,e,i,n,r){return r&&(i=n=2*r.r),r&&r.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,r){var s,o=t+i,a=e+n;return c(r)&&r.r?(s=pe(r.r,i,n),o=["M",t+s,e,"L",o-s,e,"wa",o-2*s,e,o,e+2*s,o-s,e,o,e+s,"L",o,a-s,"wa",o-2*s,a-2*s,o,a,o,a-s,o-s,a,"L",t+s,a,"wa",t,a-2*s,t+2*s,a,t+s,a,t,a-s,"L",t,e+s,"wa",t,e,t+2*s,e+2*s,t,e+s,t+s,e,"x","e"]):o=ai.prototype.symbols.square.apply(0,arguments),o}}};Highcharts.VMLRenderer=li=function(){this.init.apply(this,arguments)},li.prototype=e(ai.prototype,hi),H=li}ai.prototype.measureSpanWidth=function(t,e){var i,n=oe.createElement("span");return i=oe.createTextNode(t),n.appendChild(i),f(n,e),this.box.appendChild(n),i=n.offsetWidth,L(n),i};var ci;Me&&(Highcharts.CanVGRenderer=li=function(){Pe="http://www.w3.org/1999/xhtml"},li.prototype.symbols={},ci=function(){function t(){var t,i=e.length;for(t=0;i>t;t++)e[t]();e=[]}var e=[];return{push:function(i,n){0===e.length&&Ge(n,t),e.push(i)}}}(),H=li),R.prototype={addLabel:function(){var e,i=this.axis,n=i.options,r=i.chart,s=i.horiz,a=i.categories,h=i.names,d=this.pos,u=n.labels,f=i.tickPositions,s=s&&a&&!u.step&&!u.staggerLines&&!u.rotation&&r.plotWidth/f.length||!s&&(r.margin[3]||.33*r.chartWidth),g=d===f[0],m=d===f[f.length-1],h=a?p(a[d],h[d],d):d,a=this.label,y=f.info;i.isDatetimeAxis&&y&&(e=n.dateTimeLabelFormats[y.higherRanks[d]||y.unitName]),this.isFirst=g,this.isLast=m,n=i.labelFormatter.call({axis:i,chart:r,isFirst:g,isLast:m,dateTimeLabelFormat:e,value:i.isLog?I(l(h)):h}),d=s&&{width:ue(1,he(s-2*(u.padding||10)))+"px"},d=t(d,u.style),c(a)?a&&a.attr({text:n}).css(d):(e={align:i.labelAlign},o(u.rotation)&&(e.rotation=u.rotation),s&&u.ellipsis&&(e._clipHeight=i.len/f.length),this.label=c(n)&&u.enabled?r.renderer.text(n,0,0,u.useHTML).attr(e).css(d).add(i.labelGroup):null)},getLabelSize:function(){var t=this.label,e=this.axis;return t?t.getBBox()[e.horiz?"height":"width"]:0},getLabelSides:function(){var t=this.label.getBBox(),e=this.axis,i=e.horiz,n=e.options.labels,t=i?t.width:t.height,e=i?t*{left:0,center:.5,right:1}[e.labelAlign]-n.x:t;return[-e,t-e]},handleOverflow:function(t,e){var i,n=!0,r=this.axis,s=this.isFirst,o=this.isLast,a=r.horiz?e.x:e.y,l=r.reversed,h=r.tickPositions,c=this.getLabelSides(),d=c[0],c=c[1],u=r.pos,p=u+r.len,f=this.label.line||0,g=r.labelEdge,m=r.justifyLabels&&(s||o);return g[f]===_||a+d>g[f]?g[f]=a+c:m||(n=!1),m&&(i=(r=r.ticks[h[t+(s?1:-1)]])&&r.label.xy&&r.label.xy.x+r.getLabelSides()[s?0:1],h=i,s&&!l||o&&l?u>a+d&&(a=u-d,r&&a+c>h&&(n=!1)):a+c>p&&(a=p-c,r&&h>a+d&&(n=!1)),e.x=a),n},getPosition:function(t,e,i,n){var r=this.axis,s=r.chart,o=n&&s.oldChartHeight||s.chartHeight;return{x:t?r.translate(e+i,null,null,n)+r.transB:r.left+r.offset+(r.opposite?(n&&s.oldChartWidth||s.chartWidth)-r.right-r.left:0),y:t?o-r.bottom+r.offset-(r.opposite?r.height:0):o-r.translate(e+i,null,null,n)-r.transB}},getLabelPosition:function(t,e,i,n,r,s,o,a){var l=this.axis,h=l.transA,d=l.reversed,u=l.staggerLines,p=l.chart.renderer.fontMetrics(r.style.fontSize).b,f=r.rotation,t=t+r.x-(s&&n?s*h*(d?-1:1):0),e=e+r.y-(s&&!n?s*h*(d?1:-1):0);return f&&2===l.side&&(e-=p-p*ge(f*ve)),!c(r.y)&&!f&&(e+=p-i.getBBox().height/2),u&&(i.line=o/(a||1)%u,e+=i.line*(l.labelOffset/u)),{x:t,y:e}},getMarkPath:function(t,e,i,n,r,s){return s.crispLine(["M",t,e,"L",t+(r?0:-i),e+(r?i:0)],n)},render:function(t,e,i){var n=this.axis,r=n.options,s=n.chart.renderer,o=n.horiz,a=this.type,l=this.label,h=this.pos,c=r.labels,d=this.gridLine,u=a?a+"Grid":"grid",f=a?a+"Tick":"tick",g=r[u+"LineWidth"],m=r[u+"LineColor"],y=r[u+"LineDashStyle"],v=r[f+"Length"],u=r[f+"Width"]||0,x=r[f+"Color"],b=r[f+"Position"],f=this.mark,w=c.step,k=!0,S=n.tickmarkOffset,T=this.getPosition(o,h,S,e),C=T.x,T=T.y,P=o&&C===n.pos+n.len||!o&&T===n.pos?-1:1;this.isActive=!0,g&&(h=n.getPlotLinePath(h+S,g*P,e,!0),d===_&&(d={stroke:m,"stroke-width":g},y&&(d.dashstyle=y),a||(d.zIndex=1),e&&(d.opacity=0),this.gridLine=d=g?s.path(h).attr(d).add(n.gridGroup):null),!e&&d&&h&&d[this.isNew?"attr":"animate"]({d:h,opacity:i})),u&&v&&("inside"===b&&(v=-v),n.opposite&&(v=-v),a=this.getMarkPath(C,T,v,u*P,o,s),f?f.animate({d:a,opacity:i}):this.mark=s.path(a).attr({stroke:x,"stroke-width":u,opacity:i}).add(n.axisGroup)),l&&!isNaN(C)&&(l.xy=T=this.getLabelPosition(C,T,l,o,c,S,t,w),this.isFirst&&!this.isLast&&!p(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(r.showLastLabel,1)?k=!1:!n.isRadial&&!c.step&&!c.rotation&&!e&&0!==i&&(k=this.handleOverflow(t,T)),w&&t%w&&(k=!1),k&&!isNaN(T.y)?(T.opacity=i,l[this.isNew?"attr":"animate"](T),this.isNew=!1):l.attr("y",-9999))},destroy:function(){A(this,this.axis)}};var di=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)};di.prototype={render:function(){var t,i=this,n=i.axis,r=n.horiz,s=(n.pointRange||0)/2,o=i.options,l=o.label,h=i.label,d=o.width,u=o.to,f=o.from,g=c(f)&&c(u),m=o.value,y=o.dashStyle,v=i.svgElem,x=[],b=o.color,w=o.zIndex,k=o.events,S=n.chart.renderer;if(n.isLog&&(f=a(f),u=a(u),m=a(m)),d)x=n.getPlotLinePath(m,d),s={stroke:b,"stroke-width":d},y&&(s.dashstyle=y);else{if(!g)return;f=ue(f,n.min-s),u=pe(u,n.max+s),x=n.getPlotBandPath(f,u,o),s={fill:b},o.borderWidth&&(s.stroke=o.borderColor,s["stroke-width"]=o.borderWidth)}if(c(w)&&(s.zIndex=w),v)x?v.animate({d:x},null,v.onGetPath):(v.hide(),v.onGetPath=function(){v.show()},h&&(i.label=h=h.destroy()));else if(x&&x.length&&(i.svgElem=v=S.path(x).attr(s).add(),k))for(t in o=function(t){v.on(t,function(e){k[t].apply(i,[e])})},k)o(t);return l&&c(l.text)&&x&&x.length&&n.width>0&&n.height>0?(l=e({align:r&&g&&"center",x:r?!g&&4:10,verticalAlign:!r&&g&&"middle",y:r?g?16:10:g?6:-4,rotation:r&&!g&&90},l),h||(i.label=h=S.text(l.text,0,0,l.useHTML).attr({align:l.textAlign||l.align,rotation:l.rotation,zIndex:w}).css(l.style).add()),n=[x[1],x[4],p(x[6],x[1])],x=[x[2],x[5],p(x[7],x[2])],r=C(n),g=C(x),h.align(l,!1,{x:r,y:g,width:P(n)-r,height:P(x)-g}),h.show()):h&&h.hide(),i},destroy:function(){h(this.axis.plotLinesAndBands,this),delete this.axis,A(this)}},z.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:$e,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return y(this.total,-1)},style:$e.style}},defaultLeftAxisOptions:{labels:{x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(t,e){var i=e.isX;this.horiz=t.inverted?!i:i,this.coll=(this.isXAxis=i)?"xAxis":"yAxis",this.opposite=e.opposite,this.side=e.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var n=this.options,r=n.type;this.labelFormatter=n.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.chart=t,this.reversed=n.reversed,this.zoomEnabled=n.zoomEnabled!==!1,this.categories=n.categories||"category"===r,this.names=[],this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=c(n.linkedTo),this.tickmarkOffset=this.categories&&"between"===n.tickmarkPlacement?.5:0,this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.stacks={},this.oldStacks={},this.stackExtremes={},this.min=this.max=null,this.crosshair=p(n.crosshair,u(t.options.tooltip.crosshairs)[i?0:1],!1);var s,n=this.options.events;-1===Ye(this,t.axes)&&(t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===_&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(s in n)Ze(this,s,n[s]);this.isLog&&(this.val2lin=a,this.lin2val=l)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e($[this.coll],t))},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,n=e.categories,r=this.dateTimeLabelFormat,s=$.lang.numericSymbols,o=s&&s.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=b(a,this);else if(n)t=i;else if(r)t=X(r,i);else if(o&&e>=1e3)for(;o--&&t===_;)n=Math.pow(1e3,o+1),e>=n&&null!==s[o]&&(t=y(i/n,-1)+s[o]);return t===_&&(t=i>=1e4?y(i,0):y(i,-1,_,"")),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=null,t.stackExtremes={},t.buildStacks(),je(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n;n=i.options.threshold;var r;t.hasVisibleSeries=!0,t.isLog&&0>=n&&(n=null),t.isXAxis?(n=i.xData,n.length&&(t.dataMin=pe(p(t.dataMin,n[0]),C(n)),t.dataMax=ue(p(t.dataMax,n[0]),P(n)))):(i.getExtremes(),r=i.dataMax,i=i.dataMin,c(i)&&c(r)&&(t.dataMin=pe(p(t.dataMin,i),i),t.dataMax=ue(p(t.dataMax,r),r)),c(n)&&(t.dataMin>=n?(t.dataMin=n,t.ignoreMinPadding=!0):t.dataMax<n&&(t.dataMax=n,t.ignoreMaxPadding=!0)))}})},translate:function(t,e,i,n,r,s){var a=this.len,l=1,h=0,c=n?this.oldTransA:this.transA,n=n?this.oldMin:this.min,d=this.minPixelPadding,r=(this.options.ordinal||this.isLog&&r)&&this.lin2val;return c||(c=this.transA),i&&(l*=-1,h=a),this.reversed&&(l*=-1,h-=l*a),e?(t=t*l+h,t-=d,t=t/c+n,r&&(t=this.lin2val(t))):(r&&(t=this.val2lin(t)),"between"===s&&(s=.5),t=l*(t-n)*c+h+l*d+(o(s)?c*s*this.pointRange:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,n,r){var s,o,a,l=this.chart,h=this.left,c=this.top,d=i&&l.oldChartHeight||l.chartHeight,u=i&&l.oldChartWidth||l.chartWidth;return s=this.transB,r=p(r,this.translate(t,null,null,i)),t=i=he(r+s),s=o=he(d-r-s),isNaN(r)?a=!0:this.horiz?(s=c,o=d-this.bottom,(h>t||t>h+this.width)&&(a=!0)):(t=h,i=u-this.right,(c>s||s>c+this.height)&&(a=!0)),a&&!n?null:l.renderer.crispLine(["M",t,s,"L",i,o],e||1)},getLinearTickPositions:function(t,e,i){for(var n,e=I(ce(e/t)*t),i=I(de(i/t)*t),r=[];i>=e&&(r.push(e),e=I(e+t),e!==n);)n=e;return r},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,r=[];if(this.isLog)for(t=i.length,e=1;t>e;e++)r=r.concat(this.getLogTickPositions(n,i[e-1],i[e],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)r=r.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),this.min,this.max,e.startOfWeek)),r[0]<this.min&&r.shift();else for(i=this.min+(i[0]-this.min)%n;i<=this.max;i+=n)r.push(i);return r},adjustForMinRange:function(){var t,e,i,n,r,s,o=this.options,a=this.min,l=this.max,h=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===_&&!this.isLog&&(c(o.min)||c(o.max)?this.minRange=null:(je(this.series,function(t){for(r=t.xData,i=s=t.xIncrement?1:r.length-1;i>0;i--)n=r[i]-r[i-1],(e===_||e>n)&&(e=n)}),this.minRange=pe(5*e,this.dataMax-this.dataMin))),l-a<this.minRange){var d=this.minRange;t=(d-l+a)/2,t=[a-t,p(o.min,a-t)],h&&(t[2]=this.dataMin),a=P(t),l=[a+d,p(o.max,a+d)],h&&(l[2]=this.dataMax),l=C(l),d>l-a&&(t[0]=l-d,t[1]=p(o.min,l-d),a=P(t))}this.min=a,this.max=l},setAxisTranslation:function(t){var e,i=this.max-this.min,r=0,s=0,o=0,a=this.linkedParent,l=!!this.categories,h=this.transA;(this.isXAxis||l)&&(a?(s=a.minPointOffset,o=a.pointRangePadding):je(this.series,function(t){var a=ue(t.pointRange,+l),h=t.options.pointPlacement,d=t.closestPointRange;a>i&&(a=0),r=ue(r,a),s=ue(s,n(h)?0:a/2),o=ue(o,"on"===h?0:a),!t.noSharedTooltip&&c(d)&&(e=c(e)?pe(e,d):d)}),a=this.ordinalSlope&&e?this.ordinalSlope/e:1,this.minPointOffset=s*=a,this.pointRangePadding=o*=a,this.pointRange=pe(r,i),this.closestPointRange=e),t&&(this.oldTransA=h),this.translationSlope=this.transA=h=this.len/(i+o||1),this.transB=this.horiz?this.left:this.bottom,this.minPixelPadding=h*s},setTickPositions:function(t){var e,i=this,n=i.chart,r=i.options,s=i.isLog,o=i.isDatetimeAxis,l=i.isXAxis,h=i.isLinked,d=i.options.tickPositioner,u=r.maxPadding,f=r.minPadding,g=r.tickInterval,m=r.minTickInterval,y=r.tickPixelInterval,v=i.categories;h?(i.linkedParent=n[i.coll][r.linkedTo],n=i.linkedParent.getExtremes(),i.min=p(n.min,n.dataMin),i.max=p(n.max,n.dataMax),r.type!==i.linkedParent.options.type&&M(11,1)):(i.min=p(i.userMin,r.min,i.dataMin),i.max=p(i.userMax,r.max,i.dataMax)),s&&(!t&&pe(i.min,p(i.dataMin,i.min))<=0&&M(10,1),i.min=I(a(i.min)),i.max=I(a(i.max))),i.range&&c(i.max)&&(i.userMin=i.min=ue(i.min,i.max-i.range),i.userMax=i.max,i.range=null),i.beforePadding&&i.beforePadding(),i.adjustForMinRange(),!v&&!i.usePercentage&&!h&&c(i.min)&&c(i.max)&&(n=i.max-i.min)&&(c(r.min)||c(i.userMin)||!f||!(i.dataMin<0)&&i.ignoreMinPadding||(i.min-=n*f),c(r.max)||c(i.userMax)||!u||!(i.dataMax>0)&&i.ignoreMaxPadding||(i.max+=n*u)),i.min===i.max||void 0===i.min||void 0===i.max?i.tickInterval=1:h&&!g&&y===i.linkedParent.options.tickPixelInterval?i.tickInterval=i.linkedParent.tickInterval:(i.tickInterval=p(g,v?1:(i.max-i.min)*y/ue(i.len,y)),!c(g)&&i.len<y&&!this.isRadial&&!v&&r.startOnTick&&r.endOnTick&&(e=!0,i.tickInterval/=4)),l&&!t&&je(i.series,function(t){t.processData(i.min!==i.oldMin||i.max!==i.oldMax)
}),i.setAxisTranslation(!0),i.beforeSetTickPositions&&i.beforeSetTickPositions(),i.postProcessTickInterval&&(i.tickInterval=i.postProcessTickInterval(i.tickInterval)),i.pointRange&&(i.tickInterval=ue(i.pointRange,i.tickInterval)),!g&&i.tickInterval<m&&(i.tickInterval=m),o||s||g||(i.tickInterval=k(i.tickInterval,null,w(i.tickInterval),r)),i.minorTickInterval="auto"===r.minorTickInterval&&i.tickInterval?i.tickInterval/5:r.minorTickInterval,i.tickPositions=t=r.tickPositions?[].concat(r.tickPositions):d&&d.apply(i,[i.min,i.max]),t||(!i.ordinalPositions&&(i.max-i.min)/i.tickInterval>ue(2*i.len,200)&&M(19,!0),t=o?i.getTimeTicks(i.normalizeTimeTickInterval(i.tickInterval,r.units),i.min,i.max,r.startOfWeek,i.ordinalPositions,i.closestPointRange,!0):s?i.getLogTickPositions(i.tickInterval,i.min,i.max):i.getLinearTickPositions(i.tickInterval,i.min,i.max),e&&t.splice(1,t.length-2),i.tickPositions=t),h||(s=t[0],o=t[t.length-1],h=i.minPointOffset||0,r.startOnTick?i.min=s:i.min-h>s&&t.shift(),r.endOnTick?i.max=o:i.max+h<o&&t.pop(),1===t.length&&(i.min-=.001,i.max+=.001))},setMaxTicks:function(){var t=this.chart,e=t.maxTicks||{},i=this.tickPositions,n=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&i&&i.length>(e[n]||0)&&this.options.alignTicks!==!1&&(e[n]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this._maxTicksKey,e=this.tickPositions,i=this.chart.maxTicks;if(i&&i[t]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==_){var n=this.tickAmount,r=e.length;if(this.tickAmount=t=i[t],t>r){for(;e.length<t;)e.push(I(e[e.length-1]+this.tickInterval));this.transA*=(r-1)/(t-1),this.max=e[e.length-1]}c(n)&&t!==n&&(this.isDirty=!0)}},setScale:function(){var t,e,i,n,r=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),n=this.len!==this.oldAxisLength,je(this.series,function(t){(t.isDirtyData||t.isDirty||t.xAxis.isDirty)&&(i=!0)}),n||i||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(t in r)for(e in r[t])r[t][e].total=null,r[t][e].cum=0;this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=n||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis){this.oldStacks&&(r=this.stacks=this.oldStacks);for(t in r)for(e in r[t])r[t][e].cum=r[t][e].total}this.setMaxTicks()},setExtremes:function(e,i,n,r,s){var o=this,a=o.chart,n=p(n,!0),s=t(s,{min:e,max:i});Qe(o,"setExtremes",s,function(){o.userMin=e,o.userMax=i,o.eventArgs=s,o.isDirtyExtremes=!0,n&&a.redraw(r)})},zoom:function(t,e){return this.allowZoomOutside||(c(this.dataMin)&&t<=this.dataMin&&(t=_),c(this.dataMax)&&e>=this.dataMax&&(e=_)),this.displayBtn=t!==_||e!==_,this.setExtremes(t,e,!1,_,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,i=this.chart,n=this.options,r=n.offsetLeft||0,s=n.offsetRight||0,o=this.horiz;this.left=e=p(n.left,i.plotLeft+r),this.top=t=p(n.top,i.plotTop),this.width=r=p(n.width,i.plotWidth-r+s),this.height=n=p(n.height,i.plotHeight),this.bottom=i.chartHeight-n-t,this.right=i.chartWidth-r-e,this.len=ue(o?r:n,0),this.pos=o?e:t},getExtremes:function(){var t=this.isLog;return{min:t?I(l(this.min)):this.min,max:t?I(l(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?l(this.min):this.min,e=e?l(this.max):this.max;return i>t||null===t?t=i:t>e&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(p(t,0)-90*this.side+720)%360,t>15&&165>t?"right":t>195&&345>t?"left":"center"},getOffset:function(){var t,e,i,n,r,s,o,a=this,l=a.chart,h=l.renderer,d=a.options,u=a.tickPositions,f=a.ticks,g=a.horiz,m=a.side,y=l.inverted?[1,0,3,2][m]:m,v=0,x=0,b=d.title,w=d.labels,k=0,S=l.axisOffset,T=l.clipOffset,C=[-1,1,1,-1][m],P=1,A=p(w.maxStaggerLines,5);if(a.hasData=t=a.hasVisibleSeries||c(a.min)&&c(a.max)&&!!u,a.showAxis=l=t||p(d.showEmpty,!0),a.staggerLines=a.horiz&&w.staggerLines,a.axisGroup||(a.gridGroup=h.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=h.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=h.g("axis-labels").attr({zIndex:w.zIndex||7}).add()),t||a.isLinked){if(a.labelAlign=p(w.align||a.autoLabelAlign(w.rotation)),je(u,function(t){f[t]?f[t].addLabel():f[t]=new R(a,t)}),a.horiz&&!a.staggerLines&&A&&!w.rotation){for(i=a.reversed?[].concat(u).reverse():u;A>P;){for(t=[],n=!1,w=0;w<i.length;w++)r=i[w],s=(s=f[r].label&&f[r].label.getBBox())?s.width:0,o=w%P,s&&(r=a.translate(r),t[o]!==_&&r<t[o]&&(n=!0),t[o]=r+s);if(!n)break;P++}P>1&&(a.staggerLines=P)}je(u,function(t){(0===m||2===m||{1:"left",3:"right"}[m]===a.labelAlign)&&(k=ue(f[t].getLabelSize(),k))}),a.staggerLines&&(k*=a.staggerLines,a.labelOffset=k)}else for(i in f)f[i].destroy(),delete f[i];b&&b.text&&b.enabled!==!1&&(a.axisTitle||(a.axisTitle=h.text(b.text,0,0,b.useHTML).attr({zIndex:7,rotation:b.rotation||0,align:b.textAlign||{low:"left",middle:"center",high:"right"}[b.align]}).css(b.style).add(a.axisGroup),a.axisTitle.isNew=!0),l&&(v=a.axisTitle.getBBox()[g?"height":"width"],x=p(b.margin,g?5:10),e=b.offset),a.axisTitle[l?"show":"hide"]()),a.offset=C*p(d.offset,S[m]),a.axisTitleMargin=p(e,k+x+(2!==m&&k&&C*d.labels[g?"y":"x"])),S[m]=ue(S[m],a.axisTitleMargin+v+C*a.offset),T[y]=ue(T[y],2*ce(d.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,r=this.horiz,s=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",r?this.left:s,r?n:this.top,"L",r?e.chartWidth-this.right:s,r?n:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,n=this.top,r=this.len,s=this.options.title,o=t?e:n,a=this.opposite,l=this.offset,h=i(s.style.fontSize||12),r={low:o+(t?0:r),middle:o+r/2,high:o+(t?r:0)}[s.align],e=(t?n+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?r:e+(a?this.width:0)+l+(s.x||0),y:t?e-(a?this.height:0)+l:r+(s.y||0)}},render:function(){var t,e,i,n=this,r=n.horiz,s=n.reversed,o=n.chart,a=o.renderer,h=n.options,d=n.isLog,u=n.isLinked,p=n.tickPositions,f=n.axisTitle,g=n.stacks,m=n.ticks,y=n.minorTicks,v=n.alternateBands,x=h.stackLabels,b=h.alternateGridColor,w=n.tickmarkOffset,k=h.lineWidth,S=o.hasRendered&&c(n.oldMin)&&!isNaN(n.oldMin),T=n.hasData,C=n.showAxis,P=n.justifyLabels=!n.staggerLines&&r&&"justify"===h.labels.overflow;if(n.labelEdge.length=0,je([m,y,v],function(t){for(var e in t)t[e].isActive=!1}),(T||u)&&(n.minorTickInterval&&!n.categories&&je(n.getMinorTickPositions(),function(t){y[t]||(y[t]=new R(n,t,"minor")),S&&y[t].isNew&&y[t].render(null,!0),y[t].render(null,!1,1)}),p.length&&(t=p.slice(),(r&&s||!r&&!s)&&t.reverse(),P&&(t=t.slice(1).concat([t[0]])),je(t,function(e,i){P&&(i=i===t.length-1?0:i+1),(!u||e>=n.min&&e<=n.max)&&(m[e]||(m[e]=new R(n,e)),S&&m[e].isNew&&m[e].render(i,!0,.1),m[e].render(i,!1,1))}),w&&0===n.min&&(m[-1]||(m[-1]=new R(n,-1,null,!0)),m[-1].render(-1))),b&&je(p,function(t,r){r%2===0&&t<n.max&&(v[t]||(v[t]=new di(n)),e=t+w,i=p[r+1]!==_?p[r+1]+w:n.max,v[t].options={from:d?l(e):e,to:d?l(i):i,color:b},v[t].render(),v[t].isActive=!0)}),n._addedPlotLB||(je((h.plotLines||[]).concat(h.plotBands||[]),function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),je([m,y,v],function(t){var e,i,n=[],r=G?G.duration||500:0,s=function(){for(i=n.length;i--;)t[n[i]]&&!t[n[i]].isActive&&(t[n[i]].destroy(),delete t[n[i]])};for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,n.push(e));t!==v&&o.hasRendered&&r?r&&setTimeout(s,r):s()}),k&&(r=n.getLinePath(k),n.axisLine?n.axisLine.animate({d:r}):n.axisLine=a.path(r).attr({stroke:h.lineColor,"stroke-width":k,zIndex:7}).add(n.axisGroup),n.axisLine[C?"show":"hide"]()),f&&C&&(f[f.isNew?"attr":"animate"](n.getTitlePosition()),f.isNew=!1),x&&x.enabled){var A,L,h=n.stackTotalGroup;h||(n.stackTotalGroup=h=a.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),h.translate(o.plotLeft,o.plotTop);for(A in g)for(L in a=g[A])a[L].render(h)}n.isDirty=!1},redraw:function(){var t=this.chart.pointer;t.reset&&t.reset(!0),this.render(),je(this.plotLinesAndBands,function(t){t.render()}),je(this.series,function(t){t.isDirty=!0})},buildStacks:function(){var t=this.series,e=t.length;if(!this.isXAxis){for(;e--;)t[e].setStackedPoints();if(this.usePercentage)for(e=0;e<t.length;e++)t[e].setPercentStacks()}},destroy:function(t){var e,i=this,n=i.stacks,r=i.plotLinesAndBands;t||Ke(i);for(e in n)A(n[e]),n[e]=null;for(je([i.ticks,i.minorTicks,i.alternateBands],function(t){A(t)}),t=r.length;t--;)r[t].destroy();je("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(t){i[t]&&(i[t]=i[t].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(t,e){if(this.crosshair)if((c(e)||!p(this.crosshair.snap,!0))===!1)this.hideCrosshair();else{var i,n=this.crosshair,r=n.animation;p(n.snap,!0)?c(e)&&(i=this.chart.inverted!=this.horiz?e.plotX:this.len-e.plotY):i=this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos,i=this.isRadial?this.getPlotLinePath(this.isXAxis?e.x:p(e.stackY,e.y)):this.getPlotLinePath(null,null,null,null,i),null===i?this.hideCrosshair():this.cross?this.cross.attr({visibility:"visible"})[r?"animate":"attr"]({d:i},r):(r={"stroke-width":n.width||1,stroke:n.color||"#C0C0C0",zIndex:n.zIndex||2},n.dashStyle&&(r.dashstyle=n.dashStyle),this.cross=this.chart.renderer.path(i).attr(r).add())}},hideCrosshair:function(){this.cross&&this.cross.hide()}},t(z.prototype,{getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e),n=this.getPlotLinePath(t);return n&&i?n.push(i[4],i[5],i[1],i[2]):n=null,n},addPlotBand:function(t){this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var i=new di(this,t).render(),n=this.userOptions;return i&&(e&&(n[e]=n[e]||[],n[e].push(t)),this.plotLinesAndBands.push(i)),i},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,r=e.length;r--;)e[r].id===t&&e[r].destroy();je([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(e){for(r=e.length;r--;)e[r].id===t&&h(e,e[r])})}}),z.prototype.getLogTickPositions=function(t,e,i,n){var r=this.options,s=this.len,o=[];if(n||(this._minorAutoInterval=null),t>=.5)t=he(t),o=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var h,c,d,u,f,s=ce(e),r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];i+1>s&&!f;s++)for(c=r.length,h=0;c>h&&!f;h++)d=a(l(s)*r[h]),d>e&&(!n||i>=u)&&o.push(u),u>i&&(f=!0),u=d;else e=l(e),i=l(i),t=r[n?"minorTickInterval":"tickInterval"],t=p("auto"===t?null:t,this._minorAutoInterval,(i-e)*(r.tickPixelInterval/(n?5:1))/((n?s/this.tickPositions.length:s)||1)),t=k(t,null,w(t)),o=Ue(this.getLinearTickPositions(t,e,i),a),n||(this._minorAutoInterval=t/5);return n||(this.tickInterval=t),o},z.prototype.getTimeTicks=function(e,i,n,r){var s,o=[],a={},l=$.global.useUTC,h=new Date(i-q),d=e.unitRange,u=e.count;if(c(i)){d>=j.second&&(h.setMilliseconds(0),h.setSeconds(d>=j.minute?0:u*ce(h.getSeconds()/u))),d>=j.minute&&h[ee](d>=j.hour?0:u*ce(h[U]()/u)),d>=j.hour&&h[ie](d>=j.day?0:u*ce(h[Z]()/u)),d>=j.day&&h[ne](d>=j.month?1:u*ce(h[Q]()/u)),d>=j.month&&(h[re](d>=j.year?0:u*ce(h[J]()/u)),s=h[te]()),d>=j.year&&(s-=s%u,h[se](s)),d===j.week&&h[ne](h[Q]()-h[K]()+p(r,1)),i=1,q&&(h=new Date(h.getTime()+q)),s=h[te]();for(var r=h.getTime(),f=h[J](),g=h[Q](),m=l?q:(864e5+6e4*h.getTimezoneOffset())%864e5;n>r;)o.push(r),d===j.year?r=V(s+i*u,0):d===j.month?r=V(s,f+i*u):l||d!==j.day&&d!==j.week?r+=d*u:r=V(s,f,g+i*u*(d===j.day?1:7)),i++;o.push(r),je(Ve(o,function(t){return d<=j.hour&&t%j.day===m}),function(t){a[t]="day"})}return o.info=t(e,{higherRanks:a,totalRange:d*u}),o},z.prototype.normalizeTimeTickInterval=function(t,e){var i,n=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],r=n[n.length-1],s=j[r[0]],o=r[1];for(i=0;i<n.length&&(r=n[i],s=j[r[0]],o=r[1],!(n[i+1]&&t<=(s*o[o.length-1]+j[n[i+1][0]])/2));i++);return s===j.year&&5*s>t&&(o=[1,2,5]),n=k(t/s,o,"year"===r[0]?ue(w(t/s),1):1),{unitRange:s,count:n,unitName:r[0]}},B.prototype={destroy:function(){A(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?b(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,r=n.inverted,s=this.isNegative,o=i.translate(this.percent?100:this.total,0,0,0,1),i=i.translate(0),i=fe(o-i),a=n.xAxis[0].translate(this.x)+t,l=n.plotHeight,s={x:r?s?o:o-i:a,y:r?l-a-e:s?l-o-i:l-o,width:r?i:e,height:r?e:i};(r=this.label)&&(r.align(this.alignOptions,null,s),s=r.alignAttr,r.attr({visibility:this.options.crop===!1||n.isInsidePlot(s.x,s.y)?Ae?"inherit":"visible":"hidden"}))}},F.prototype={init:function(t,e){var n=e.borderWidth,r=e.style,s=i(r.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape,null,null,e.useHTML,null,"tooltip").attr({padding:s,fill:e.backgroundColor,"stroke-width":n,r:e.borderRadius,zIndex:8}).css(r).css({padding:0}).add().attr({y:-999}),Me||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(e,i,n,r){var s=this,o=s.now,a=s.options.animation!==!1&&!s.isHidden;t(o,{x:a?(2*o.x+e)/3:e,y:a?(o.y+i)/2:i,anchorX:a?(2*o.anchorX+n)/3:n,anchorY:a?(o.anchorY+r)/2:r}),s.label.attr(o),a&&(fe(e-o.x)>1||fe(i-o.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){s&&s.move(e,i,n,r)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},p(this.options.hideDelay,500)),t&&je(t,function(t){t.setState()}),this.chart.hoverPoints=null)},getAnchor:function(t,e){var i,n,r=this.chart,s=r.inverted,o=r.plotTop,a=0,l=0,t=u(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===_&&(e=r.pointer.normalize(e)),i=[e.chartX-r.plotLeft,e.chartY-o]),i||(je(t,function(t){n=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!s&&n?n.top-o:0)}),a/=t.length,l/=t.length,i=[s?r.plotWidth-l:a,this.shared&&!s&&t.length>1&&e?e.chartY-o:s?r.plotHeight-a:l]),Ue(i,he)},getPosition:function(t,e,i){var n,r=this.chart,s=r.plotLeft,o=r.plotTop,a=r.plotWidth,l=r.plotHeight,h=p(this.options.distance,12),c=i.plotX,i=i.plotY,r=c+s+(r.inverted?h:-t-h),d=i-e+o+15;return 7>r&&(r=s+ue(c,0)+h),r+t>s+a&&(r-=r+t-(s+a),d=i-e+o-h,n=!0),o+5>d&&(d=o+5,n&&i>=d&&d+e>=i&&(d=i+o+h)),d+e>o+l&&(d=ue(o,o+l-e-h)),{x:r,y:d}},defaultFormatter:function(t){var e,i=this.points||u(this),n=i[0].series;return e=[n.tooltipHeaderFormatter(i[0])],je(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,n,r,s=this.chart,o=this.label,a=this.options,l={},h=[];r=a.formatter||this.defaultFormatter;var c,l=s.hoverPoints,d=this.shared;clearTimeout(this.hideTimer),this.followPointer=u(t)[0].series.tooltipOptions.followPointer,n=this.getAnchor(t,e),i=n[0],n=n[1],!d||t.series&&t.series.noSharedTooltip?l=t.getLabelConfig():(s.hoverPoints=t,l&&je(l,function(t){t.setState()}),je(t,function(t){t.setState("hover"),h.push(t.getLabelConfig())}),l={x:t[0].category,y:t[0].y},l.points=h,t=t[0]),r=r.call(l,this),l=t.series,r===!1?this.hide():(this.isHidden&&(ei(o),o.attr("opacity",1).show()),o.attr({text:r}),c=a.borderColor||t.color||l.color||"#606060",o.attr({stroke:c}),this.updatePosition({plotX:i,plotY:n}),this.isHidden=!1),Qe(s,"tooltipRefresh",{text:r,x:i+s.plotLeft,y:n+s.plotTop,borderColor:c})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(he(i.x),he(i.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}};var ui=Highcharts.Pointer=function(t,e){this.init(t,e)};if(ui.prototype={init:function(t,e){var i,n=e.chart,r=n.events,s=Me?"":n.zoomType,n=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(s),this.zoomY=s=/y/.test(s),this.zoomHor=i&&!n||s&&n,this.zoomVert=s&&!n||i&&n,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new F(t,e.tooltip)),this.setDOMEvents()},normalize:function(e,i){var n,r,e=e||ae.event;return e.target||(e.target=e.srcElement),e=Je(e),r=e.touches?e.touches.item(0):e,i||(this.chartPosition=i=qe(this.chart.container)),r.pageX===_?(n=ue(e.x,e.clientX-i.left),r=e.y):(n=r.pageX-i.left,r=r.pageY-i.top),t(e,{chartX:he(n),chartY:he(r)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return je(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,n,r,s=this,o=s.chart,a=o.series,l=o.tooltip,h=o.hoverPoint,c=o.hoverSeries,d=o.chartWidth,u=s.getIndex(t);if(l&&s.options.tooltip.shared&&(!c||!c.noSharedTooltip)){for(i=[],n=a.length,r=0;n>r;r++)a[r].visible&&a[r].options.enableMouseTracking!==!1&&!a[r].noSharedTooltip&&a[r].tooltipPoints.length&&(e=a[r].tooltipPoints[u])&&e.series&&(e._dist=fe(u-e.clientX),d=pe(d,e._dist),i.push(e));for(n=i.length;n--;)i[n]._dist>d&&i.splice(n,1);i.length&&i[0].clientX!==s.hoverX&&(l.refresh(i,t),s.hoverX=i[0].clientX)}c&&c.tracker?(e=c.tooltipPoints[u])&&e!==h&&e.onMouseOver(t):l&&l.followPointer&&!l.isHidden&&(a=l.getAnchor([{}],t),l.updatePosition({plotX:a[0],plotY:a[1]})),l&&!s._onDocumentMouseMove&&(s._onDocumentMouseMove=function(t){s.onDocumentMouseMove(t)},Ze(oe,"mousemove",s._onDocumentMouseMove)),je(o.axes,function(i){i.drawCrosshair(t,p(h,e))})},reset:function(t){var e=this.chart,i=e.hoverSeries,n=e.hoverPoint,r=e.tooltip,s=r&&r.shared?e.hoverPoints:n;(t=t&&r&&s)&&u(s)[0].plotX===_&&(t=!1),t?(r.refresh(s),n&&n.setState(n.state,!0)):(n&&n.onMouseOut(),i&&i.onMouseOut(),r&&r.hide(),this._onDocumentMouseMove&&(Ke(oe,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),je(e.axes,function(t){t.hideCrosshair()}),this.hoverX=null)},scaleGroups:function(t,e){var i,n=this.chart;je(n.series,function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},pinchTranslate:function(t,e,i,n,r,s,o,a){t&&this.pinchTranslateDirection(!0,i,n,r,s,o,a),e&&this.pinchTranslateDirection(!1,i,n,r,s,o,a)},pinchTranslateDirection:function(t,e,i,n,r,s,o,a){var l,h,c,d=this.chart,u=t?"x":"y",p=t?"X":"Y",f="chart"+p,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],y=a||1,v=d.inverted,x=d.bounds[t?"h":"v"],b=1===e.length,w=e[0][f],k=i[0][f],S=!b&&e[1][f],T=!b&&i[1][f],i=function(){!b&&fe(w-S)>20&&(y=a||fe(k-T)/fe(w-S)),h=(m-k)/y+w,l=d["plot"+(t?"Width":"Height")]/y};i(),e=h,e<x.min?(e=x.min,c=!0):e+l>x.max&&(e=x.max-l,c=!0),c?(k-=.8*(k-o[u][0]),b||(T-=.8*(T-o[u][1])),i()):o[u]=[k,T],v||(s[u]=h-m,s[g]=l),s=v?1/y:y,r[g]=l,r[u]=e,n[v?t?"scaleY":"scaleX":"scale"+p]=y,n["translate"+p]=s*m+(k-s*w)},pinch:function(e){var i=this,n=i.chart,r=i.pinchDown,s=n.tooltip&&n.tooltip.options.followTouchMove,o=e.touches,a=o.length,l=i.lastValidTouch,h=i.zoomHor||i.pinchHor,c=i.zoomVert||i.pinchVert,d=h||c,u=i.selectionMarker,p={},f=1===a&&(i.inClass(e.target,"highcharts-tracker")&&n.runTrackerClick||n.runChartClick),g={};(d||s)&&!f&&e.preventDefault(),Ue(o,function(t){return i.normalize(t)}),"touchstart"===e.type?(je(o,function(t,e){r[e]={chartX:t.chartX,chartY:t.chartY}}),l.x=[r[0].chartX,r[1]&&r[1].chartX],l.y=[r[0].chartY,r[1]&&r[1].chartY],je(n.axes,function(t){if(t.zoomEnabled){var e=n.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,r=t.toPixels(t.dataMin),s=t.toPixels(t.dataMax),o=pe(r,s),r=ue(r,s);e.min=pe(t.pos,o-i),e.max=ue(t.pos+t.len,r+i)}})):r.length&&(u||(i.selectionMarker=u=t({destroy:Oe},n.plotBox)),i.pinchTranslate(h,c,r,o,p,u,g,l),i.hasPinched=d,i.scaleGroups(p,g),!d&&s&&1===a&&this.runPointActions(i.normalize(e)))},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,r=t.chartX,s=t.chartY,o=this.zoomHor,a=this.zoomVert,l=i.plotLeft,h=i.plotTop,c=i.plotWidth,d=i.plotHeight,u=this.mouseDownX,p=this.mouseDownY;l>r?r=l:r>l+c&&(r=l+c),h>s?s=h:s>h+d&&(s=h+d),this.hasDragged=Math.sqrt(Math.pow(u-r,2)+Math.pow(p-s,2)),this.hasDragged>10&&(e=i.isInsidePlot(u-l,p-h),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!this.selectionMarker&&(this.selectionMarker=i.renderer.rect(l,h,o?1:c,a?1:d,0).attr({fill:n.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&o&&(r-=u,this.selectionMarker.attr({width:fe(r),x:(r>0?0:r)+u})),this.selectionMarker&&a&&(r=s-p,this.selectionMarker.attr({height:fe(r),y:(r>0?0:r)+p})),e&&!this.selectionMarker&&n.panning&&i.pan(t,n.panning))},drop:function(e){var i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,s={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},o=this.selectionMarker,a=o.x,l=o.y;(this.hasDragged||n)&&(je(i.axes,function(t){if(t.zoomEnabled){var e=t.horiz,i=t.toValue(e?a:l),e=t.toValue(e?a+o.width:l+o.height);!isNaN(i)&&!isNaN(e)&&(s[t.coll].push({axis:t,min:pe(i,e),max:ue(i,e)}),r=!0)}}),r&&Qe(i,"selection",s,function(e){i.zoom(t(e,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(f(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,n=e.hoverSeries,t=this.normalize(t,i);i&&n&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart,t=this.normalize(t);"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=d(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries,t=t.relatedTarget||t.toElement,i=t.point&&t.point.series;!e||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||i===e||e.onMouseOut()},onContainerClick:function(e){var i,n,r,s=this.chart,o=s.hoverPoint,a=s.plotLeft,l=s.plotTop,h=s.inverted,e=this.normalize(e);e.cancelBubble=!0,s.cancelClick||(o&&this.inClass(e.target,"highcharts-tracker")?(i=this.chartPosition,n=o.plotX,r=o.plotY,t(o,{pageX:i.left+a+(h?s.plotWidth-r:n),pageY:i.top+l+(h?s.plotHeight-n:r)}),Qe(o.series,"click",t(e,{point:o})),s.hoverPoint&&o.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),s.isInsidePlot(e.chartX-a,e.chartY-l)&&Qe(s,"click",e)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){(1===t.touches.length||2===t.touches.length)&&this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,e=this,i=e.chart.container;this._events=t=[[i,"onmousedown","onContainerMouseDown"],[i,"onmousemove","onContainerMouseMove"],[i,"onclick","onContainerClick"],[i,"mouseleave","onContainerMouseLeave"],[oe,"mouseup","onDocumentMouseUp"]],Ie&&t.push([i,"ontouchstart","onContainerTouchStart"],[i,"ontouchmove","onContainerTouchMove"],[oe,"touchend","onDocumentTouchEnd"]),je(t,function(t){e["_"+t[2]]=function(i){e[t[2]](i)},0===t[1].indexOf("on")?t[0][t[1]]=e["_"+t[2]]:Ze(t[0],t[1],e["_"+t[2]])})},destroy:function(){var t=this;je(t._events,function(e){0===e[1].indexOf("on")?e[0][e[1]]=null:Ke(e[0],e[1],t["_"+e[2]])}),delete t._events,clearInterval(t.tooltipTimeout)}},$e=Highcharts.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,r=n&&{cursor:n},s=function(i){var n,r=i.target;for(e.hoverSeries!==t&&t.onMouseOver();r&&!n;)n=r.point,r=r.parentNode;n!==_&&n!==e.hoverPoint&&n.onMouseOver(i)};je(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(je(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",s).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(r),Ie)&&t[e].on("touchstart",s)}),t._hasTracking=!0)},drawTrackerGraph:function(){var t,e=this,i=e.options,n=i.trackByArea,r=[].concat(n?e.areaPath:e.graphPath),s=r.length,o=e.chart,a=o.pointer,l=o.renderer,h=o.options.tooltip.snap,c=e.tracker,d=i.cursor,u=d&&{cursor:d},d=e.singlePoints,p=function(){o.hoverSeries!==e&&e.onMouseOver()};if(s&&!n)for(t=s+1;t--;)"M"===r[t]&&r.splice(t+1,0,r[t+1]-h,r[t+2],"L"),(t&&"M"===r[t]||t===s)&&r.splice(t,0,"L",r[t-2]+h,r[t-1]);for(t=0;t<d.length;t++)s=d[t],r.push("M",s.plotX-h,s.plotY,"L",s.plotX+h,s.plotY);c?c.attr({d:r}):(e.tracker=l.path(r).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:Ne,fill:n?Ne:Be,"stroke-width":i.lineWidth+(n?0:2*h),zIndex:2}).add(e.group),je([e.tracker,e.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(t){a.onTrackerMouseOut(t)}).css(u),Ie&&t.on("touchstart",p)}))}},ae.PointerEvent||ae.MSPointerEvent){var pi={};ui.prototype.getWebkitTouches=function(){var t,e=[];e.item=function(t){return this[t]};for(t in pi)pi.hasOwnProperty(t)&&e.push({pageX:pi[t].pageX,pageY:pi[t].pageY,target:pi[t].target});return e},x(ui.prototype,"init",function(t,e,i){e.container.style["-ms-touch-action"]=e.container.style["touch-action"]="none",t.call(this,e,i)}),x(ui.prototype,"setDOMEvents",function(t){var e=this;t.apply(this,Array.prototype.slice.call(arguments,1)),je([[this.chart.container,"PointerDown","touchstart","onContainerTouchStart",function(t){pi[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}}],[this.chart.container,"PointerMove","touchmove","onContainerTouchMove",function(t){pi[t.pointerId]={pageX:t.pageX,pageY:t.pageY},pi[t.pointerId].target||(pi[t.pointerId].target=t.currentTarget)}],[document,"PointerUp","touchend","onDocumentTouchEnd",function(t){delete pi[t.pointerId]}]],function(t){Ze(t[0],window.PointerEvent?t[1].toLowerCase():"MS"+t[1],function(i){i=i.originalEvent,("touch"===i.pointerType||i.pointerType===i.MSPOINTER_TYPE_TOUCH)&&(t[4](i),e[t[3]]({type:t[2],target:i.currentTarget,preventDefault:Oe,touches:e.getWebkitTouches()}))})})})}var fi=Highcharts.Legend=function(t,e){this.init(t,e)};fi.prototype={init:function(t,n){var r=this,s=n.itemStyle,o=p(n.padding,8),a=n.itemMarginTop||0;this.options=n,n.enabled&&(r.baseline=i(s.fontSize)+3+a,r.itemStyle=s,r.itemHiddenStyle=e(s,n.itemHiddenStyle),r.itemMarginTop=a,r.padding=o,r.initialItemX=o,r.initialItemY=o-5,r.maxItemWidth=0,r.chart=t,r.itemHeight=0,r.lastLineHeight=0,r.symbolWidth=p(n.symbolWidth,16),r.pages=[],r.render(),Ze(r.chart,"endResize",function(){r.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n=this.options,r=t.legendItem,s=t.legendLine,o=t.legendSymbol,a=this.itemHiddenStyle.color,n=e?n.itemStyle.color:a,l=e?t.legendColor||t.color:a,a=t.options&&t.options.marker,h={stroke:l,fill:l};if(r&&r.css({fill:n,color:n}),s&&s.attr({stroke:l}),o){if(a&&o.isMarker)for(i in a=t.convertAttribs(a))r=a[i],r!==_&&(h[i]=r);o.attr(h)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,n=t._legendItemPos,r=n[0],n=n[1],s=t.checkbox;t.legendGroup&&t.legendGroup.translate(e?r:this.legendWidth-r-2*i-4,n),s&&(s.x=r,s.y=n)},destroyItem:function(t){var e=t.checkbox;je(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&L(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,n=this.clipHeight||this.legendHeight;i&&(e=i.translateY,je(this.allItems,function(r){var s,o=r.checkbox;o&&(s=e+o.y+(t||0)+3,f(o,{left:i.translateX+r.legendItemWidth+o.x-20+"px",top:s+"px",display:s>e-6&&e+n-6>s?"":Be}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},renderItem:function(t){var i,n=this,r=n.chart,s=r.renderer,o=n.options,a="horizontal"===o.layout,l=n.symbolWidth,h=o.symbolPadding,c=n.itemStyle,d=n.itemHiddenStyle,u=n.padding,f=a?p(o.itemDistance,8):0,m=!o.rtl,y=o.width,v=o.itemMarginBottom||0,x=n.itemMarginTop,w=n.initialItemX,k=t.legendItem,S=t.series&&t.series.drawLegendSymbol?t.series:t,T=S.options,T=T&&T.showCheckbox,C=o.useHTML;!k&&(t.legendGroup=s.g("legend-item").attr({zIndex:1}).add(n.scrollGroup),S.drawLegendSymbol(n,t),t.legendItem=k=s.text(o.labelFormat?b(o.labelFormat,t):o.labelFormatter.call(t),m?l+h:-h,n.baseline,C).css(e(t.visible?c:d)).attr({align:m?"left":"right",zIndex:2}).add(t.legendGroup),(C?k:t.legendGroup).on("mouseover",function(){t.setState("hover"),k.css(n.options.itemHoverStyle)}).on("mouseout",function(){k.css(t.visible?c:d),t.setState()}).on("click",function(e){var i=function(){t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,i):Qe(t,"legendItemClick",e,i)}),n.colorizeItem(t,t.visible),T)&&(t.checkbox=g("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},o.itemCheckboxStyle,r.container),Ze(t.checkbox,"click",function(e){Qe(t,"checkboxClick",{checked:e.target.checked},function(){t.select()})})),s=k.getBBox(),i=t.legendItemWidth=o.itemWidth||t.legendItemWidth||l+h+s.width+f+(T?20:0),o=i,n.itemHeight=l=he(t.legendItemHeight||s.height),a&&n.itemX-w+o>(y||r.chartWidth-2*u-w)&&(n.itemX=w,n.itemY+=x+n.lastLineHeight+v,n.lastLineHeight=0),n.maxItemWidth=ue(n.maxItemWidth,o),n.lastItemY=x+n.itemY+v,n.lastLineHeight=ue(l,n.lastLineHeight),t._legendItemPos=[n.itemX,n.itemY],a?n.itemX+=o:(n.itemY+=x+l+v,n.lastLineHeight=l),n.offsetWidth=y||ue((a?n.itemX-w-f:o)+u,n.offsetWidth)},getAllItems:function(){var t=[];return je(this.chart.series,function(e){var i=e.options;p(i.showInLegend,c(i.linkedTo)?!1:_,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},render:function(){var e,i,n,r,s=this,o=s.chart,a=o.renderer,l=s.group,h=s.box,c=s.options,d=s.padding,u=c.borderWidth,p=c.backgroundColor;s.itemX=s.initialItemX,s.itemY=s.initialItemY,s.offsetWidth=0,s.lastItemY=0,l||(s.group=l=a.g("legend").attr({zIndex:7}).add(),s.contentGroup=a.g().attr({zIndex:1}).add(l),s.scrollGroup=a.g().add(s.contentGroup)),s.renderTitle(),e=s.getAllItems(),T(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),s.allItems=e,s.display=i=!!e.length,je(e,function(t){s.renderItem(t)}),n=c.width||s.offsetWidth,r=s.lastItemY+s.lastLineHeight+s.titleHeight,r=s.handleOverflow(r),(u||p)&&(n+=d,r+=d,h?n>0&&r>0&&(h[h.isNew?"attr":"animate"](h.crisp(null,null,null,n,r)),h.isNew=!1):(s.box=h=a.rect(0,0,n,r,c.borderRadius,u||0).attr({stroke:c.borderColor,"stroke-width":u||0,fill:p||Be}).add(l).shadow(c.shadow),h.isNew=!0),h[i?"show":"hide"]()),s.legendWidth=n,s.legendHeight=r,je(e,function(t){s.positionItem(t)}),i&&l.align(t({width:n,height:r},c),!0,"spacingBox"),o.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,r=this.chart,s=r.renderer,o=this.options,a=o.y,a=r.spacingBox.height+("top"===o.verticalAlign?-a:a)-this.padding,l=o.maxHeight,h=this.clipRect,c=o.navigation,d=p(c.animation,!0),u=c.arrowSize||12,f=this.nav,g=this.pages,m=this.allItems;
return"horizontal"===o.layout&&(a/=2),l&&(a=pe(a,l)),g.length=0,t>a&&!o.useHTML?(this.clipHeight=e=a-20-this.titleHeight-this.padding,this.currentPage=p(this.currentPage,1),this.fullHeight=t,je(m,function(t,n){var r=t._legendItemPos[1],s=he(t.legendItem.bBox.height),o=g.length;(!o||r-g[o-1]>e)&&g.push(i||r),n===m.length-1&&r+s-g[o-1]>e&&g.push(r),r!==i&&(i=r)}),h||(h=n.clipRect=s.clipRect(0,this.padding,9999,0),n.contentGroup.clip(h)),h.attr({height:e}),f||(this.nav=f=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,u,u).on("click",function(){n.scroll(-1,d)}).add(f),this.pager=s.text("",15,10).css(c.style).add(f),this.down=s.symbol("triangle-down",0,0,u,u).on("click",function(){n.scroll(1,d)}).add(f)),n.scroll(0),t=a):f&&(h.attr({height:r.chartHeight}),f.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length,r=this.currentPage+t,s=this.clipHeight,o=this.options.navigation,a=o.activeColor,o=o.inactiveColor,l=this.pager,h=this.padding;r>n&&(r=n),r>0&&(e!==_&&D(e,this.chart),this.nav.attr({translateX:h,translateY:s+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===r?o:a}).css({cursor:1===r?"default":"pointer"}),l.attr({text:r+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,fill:r===n?o:a}).css({cursor:r===n?"default":"pointer"}),i=-i[r-1]+this.initialItemY,this.scrollGroup.animate({translateY:i}),this.currentPage=r,this.positionCheckboxes(i))}},li=Highcharts.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options.symbolHeight||12;e.legendSymbol=this.chart.renderer.rect(0,t.baseline-5-i/2,t.symbolWidth,i,p(t.options.symbolRadius,2)).attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e,i=this.options,n=i.marker;e=t.symbolWidth;var r,s=this.chart.renderer,o=this.legendGroup,t=t.baseline-he(.3*s.fontMetrics(t.options.itemStyle.fontSize).b);i.lineWidth&&(r={"stroke-width":i.lineWidth},i.dashStyle&&(r.dashstyle=i.dashStyle),this.legendLine=s.path(["M",0,t,"L",e,t]).attr(r).add(o)),n&&n.enabled&&(i=n.radius,this.legendSymbol=e=s.symbol(this.symbol,e/2-i,t-i,2*i,2*i).add(o),e.isMarker=!0)}},/Trident\/7\.0/.test(xe)&&x(fi.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};i.chart.renderer.forExport?n():setTimeout(n)}),N.prototype={init:function(t,i){var n,r=t.series;t.series=null,n=e($,t),n.series=t.series=r,this.userOptions=t,r=n.chart,this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var s=r.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var o,a=this;if(a.index=Re.length,Re.push(a),r.reflow!==!1&&Ze(a,"load",function(){a.initReflow()}),s)for(o in s)Ze(a,o,s[o]);a.xAxis=[],a.yAxis=[],a.animation=Me?!1:p(r.animation,!0),a.pointCount=0,a.counters=new S,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=He[t.type||e.type||e.defaultSeriesType])||M(17,!0),e=new e,e.init(this,t),e},isInsidePlot:function(t,e,i){var n=i?e:t,t=i?t:e;return n>=0&&n<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&je(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var i,n,r=this.axes,s=this.series,o=this.pointer,a=this.legend,l=this.isDirtyLegend,h=this.isDirtyBox,c=s.length,d=c,u=this.renderer,p=u.isHidden(),f=[];for(D(e,this),p&&this.cloneRenderTo(),this.layOutTitles();d--;)if(e=s[d],e.options.stacking&&(i=!0,e.isDirty)){n=!0;break}if(n)for(d=c;d--;)e=s[d],e.options.stacking&&(e.isDirty=!0);je(s,function(t){t.isDirty&&"point"===t.options.legendType&&(l=!0)}),l&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),i&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,je(r,function(t){t.setScale()})),this.adjustTickAmounts(),this.getMargins(),je(r,function(t){t.isDirty&&(h=!0)}),je(r,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,f.push(function(){Qe(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(h||i)&&e.redraw()})),h&&this.drawChartBox(),je(s,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),o&&o.reset&&o.reset(!0),u.draw(),Qe(this,"redraw"),p&&this.cloneRenderTo(!0),je(f,function(t){t.call()})},get:function(t){var e,i,n=this.axes,r=this.series;for(e=0;e<n.length;e++)if(n[e].options.id===t)return n[e];for(e=0;e<r.length;e++)if(r[e].options.id===t)return r[e];for(e=0;e<r.length;e++)for(i=r[e].points||[],n=0;n<i.length;n++)if(i[n].id===t)return i[n];return null},getAxes:function(){var t=this,e=this.options,i=e.xAxis=u(e.xAxis||{}),e=e.yAxis=u(e.yAxis||{});je(i,function(t,e){t.index=e,t.isX=!0}),je(e,function(t,e){t.index=e}),i=i.concat(e),je(i,function(e){new z(t,e)}),t.adjustTickAmounts()},getSelectedPoints:function(){var t=[];return je(this.series,function(e){t=t.concat(Ve(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return Ve(this.series,function(t){return t.selected})},getStacks:function(){var t=this;je(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),je(t.series,function(e){!e.options.stacking||e.visible!==!0&&t.options.chart.ignoreHiddenSeries!==!1||(e.stackKey=e.type+p(e.options.stack,""))})},showResetZoom:function(){var t=this,e=$.lang,i=t.options.chart.resetZoomButton,n=i.theme,r=n.states,s="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,r&&r.hover).attr({align:i.position.align,title:e.resetZoomTitle}).add().align(i.position,!1,s)},zoomOut:function(){var t=this;Qe(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,i,n=this.pointer,s=!1;!t||t.resetSelection?je(this.axes,function(t){e=t.zoom()}):je(t.xAxis.concat(t.yAxis),function(t){var i=t.axis,r=i.isXAxis;(n[r?"zoomX":"zoomY"]||n[r?"pinchX":"pinchY"])&&(e=i.zoom(t.min,t.max),i.displayBtn&&(s=!0))}),i=this.resetZoomButton,s&&!i?this.showResetZoom():!s&&r(i)&&(this.resetZoomButton=i.destroy()),e&&this.redraw(p(this.options.chart.animation,t&&t.animation,this.pointCount<100))},pan:function(t,e){var i,n=this,r=n.hoverPoints;r&&je(r,function(t){t.setState()}),je("xy"===e?[1,0]:[1],function(e){var r=t[e?"chartX":"chartY"],s=n[e?"xAxis":"yAxis"][0],o=n[e?"mouseDownX":"mouseDownY"],a=(s.pointRange||0)/2,l=s.getExtremes(),h=s.toValue(o-r,!0)+a,o=s.toValue(o+n[e?"plotWidth":"plotHeight"]-r,!0)-a;s.series.length&&h>pe(l.dataMin,l.min)&&o<ue(l.dataMax,l.max)&&(s.setExtremes(h,o,!1,!1,{trigger:"pan"}),i=!0),n[e?"mouseDownX":"mouseDownY"]=r}),i&&n.redraw(!1),f(n.container,{cursor:"move"})},setTitle:function(t,i){var n,r,s=this,o=s.options;r=o.title=e(o.title,t),n=o.subtitle=e(o.subtitle,i),o=n,je([["title",t,r],["subtitle",i,o]],function(t){var e=t[0],i=s[e],n=t[1],t=t[2];i&&n&&(s[e]=i=i.destroy()),t&&t.text&&!i&&(s[e]=s.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+e,zIndex:t.zIndex||4}).css(t.style).add())}),s.layOutTitles()},layOutTitles:function(){var e=0,i=this.title,n=this.subtitle,r=this.options,s=r.title,r=r.subtitle,o=this.spacingBox.width-44;!i||(i.css({width:(s.width||o)+"px"}).align(t({y:15},s),!1,"spacingBox"),s.floating||s.verticalAlign)||(e=i.getBBox().height,e>=18&&25>=e&&(e=15)),n&&(n.css({width:(r.width||o)+"px"}).align(t({y:e+s.margin},r),!1,"spacingBox"),!r.floating&&!r.verticalAlign&&(e=de(e+n.getBBox().height))),this.titleOffset=e},getChartSize:function(){var t=this.options.chart,e=this.renderToClone||this.renderTo;this.containerWidth=Xe(e,"width"),this.containerHeight=Xe(e,"height"),this.chartWidth=ue(0,t.width||this.containerWidth||600),this.chartHeight=ue(0,p(t.height,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),L(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),f(e,{position:"absolute",top:"-9999px",display:"block"}),oe.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var e,r,s,o,a=this.options.chart;this.renderTo=e=a.renderTo,o="highcharts-"+Ee++,n(e)&&(this.renderTo=e=oe.getElementById(e)),e||M(13,!0),r=i(d(e,"data-highcharts-chart")),!isNaN(r)&&Re[r]&&Re[r].destroy(),d(e,"data-highcharts-chart",this.index),e.innerHTML="",e.offsetWidth||this.cloneRenderTo(),this.getChartSize(),r=this.chartWidth,s=this.chartHeight,this.container=e=g(ze,{className:"highcharts-container"+(a.className?" "+a.className:""),id:o},t({position:"relative",overflow:"hidden",width:r+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=a.forExport?new ai(e,r,s,!0):new H(e,r,s),Me&&this.renderer.create(this,e,r,s)},getMargins:function(){var t,e=this.spacing,i=this.legend,n=this.margin,r=this.options.legend,s=p(r.margin,10),o=r.x,a=r.y,l=r.align,h=r.verticalAlign,d=this.titleOffset;this.resetMargins(),t=this.axisOffset,d&&!c(n[0])&&(this.plotTop=ue(this.plotTop,d+this.options.title.margin+e[0])),i.display&&!r.floating&&("right"===l?c(n[1])||(this.marginRight=ue(this.marginRight,i.legendWidth-o+s+e[1])):"left"===l?c(n[3])||(this.plotLeft=ue(this.plotLeft,i.legendWidth+o+s+e[3])):"top"===h?c(n[0])||(this.plotTop=ue(this.plotTop,i.legendHeight+a+s+e[0])):"bottom"!==h||c(n[2])||(this.marginBottom=ue(this.marginBottom,i.legendHeight-a+s+e[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&je(this.axes,function(t){t.getOffset()}),c(n[3])||(this.plotLeft+=t[3]),c(n[0])||(this.plotTop+=t[0]),c(n[2])||(this.marginBottom+=t[2]),c(n[1])||(this.marginRight+=t[1]),this.setChartSize()},reflow:function(t){var e=this,i=e.options.chart,n=e.renderTo,r=i.width||Xe(n,"width"),s=i.height||Xe(n,"height"),i=t?t.target:ae,n=function(){e.container&&(e.setSize(r,s,!1),e.hasUserSize=null)};e.hasUserSize||!r||!s||i!==ae&&i!==oe||((r!==e.containerWidth||s!==e.containerHeight)&&(clearTimeout(e.reflowTimeout),t?e.reflowTimeout=setTimeout(n,100):n()),e.containerWidth=r,e.containerHeight=s)},initReflow:function(){var t=this,e=function(e){t.reflow(e)};Ze(ae,"resize",e),Ze(t,"destroy",function(){Ke(ae,"resize",e)})},setSize:function(t,e,i){var n,r,s,o=this;o.isResizing+=1,s=function(){o&&Qe(o,"endResize",null,function(){o.isResizing-=1})},D(i,o),o.oldChartHeight=o.chartHeight,o.oldChartWidth=o.chartWidth,c(t)&&(o.chartWidth=n=ue(0,he(t)),o.hasUserSize=!!n),c(e)&&(o.chartHeight=r=ue(0,he(e))),(G?ti:f)(o.container,{width:n+"px",height:r+"px"},G),o.setChartSize(!0),o.renderer.setSize(n,r,i),o.maxTicks=null,je(o.axes,function(t){t.isDirty=!0,t.setScale()}),je(o.series,function(t){t.isDirty=!0}),o.isDirtyLegend=!0,o.isDirtyBox=!0,o.getMargins(),o.redraw(i),o.oldChartHeight=null,Qe(o,"resize"),G===!1?s():setTimeout(s,G&&G.duration||500)},setChartSize:function(t){var e,i,n,r,s=this.inverted,o=this.renderer,a=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=he(this.plotLeft),this.plotTop=i=he(this.plotTop),this.plotWidth=n=ue(0,he(a-e-this.marginRight)),this.plotHeight=r=ue(0,he(l-i-this.marginBottom)),this.plotSizeX=s?r:n,this.plotSizeY=s?n:r,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=o.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=o.plotBox={x:e,y:i,width:n,height:r},a=2*ce(this.plotBorderWidth/2),s=de(ue(a,d[3])/2),o=de(ue(a,d[0])/2),this.clipBox={x:s,y:o,width:ce(this.plotSizeX-ue(a,d[1])/2-s),height:ce(this.plotSizeY-ue(a,d[2])/2-o)},t||je(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this.spacing,e=this.margin;this.plotTop=p(e[0],t[0]),this.marginRight=p(e[1],t[1]),this.marginBottom=p(e[2],t[2]),this.plotLeft=p(e[3],t[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,r=this.chartHeight,s=this.chartBackground,o=this.plotBackground,a=this.plotBorder,l=this.plotBGImage,h=e.borderWidth||0,c=e.backgroundColor,d=e.plotBackgroundColor,u=e.plotBackgroundImage,p=e.plotBorderWidth||0,f=this.plotLeft,g=this.plotTop,m=this.plotWidth,y=this.plotHeight,v=this.plotBox,x=this.clipRect,b=this.clipBox;t=h+(e.shadow?8:0),(h||c)&&(s?s.animate(s.crisp(null,null,null,n-t,r-t)):(s={fill:c||Be},h&&(s.stroke=e.borderColor,s["stroke-width"]=h),this.chartBackground=i.rect(t/2,t/2,n-t,r-t,e.borderRadius,h).attr(s).add().shadow(e.shadow))),d&&(o?o.animate(v):this.plotBackground=i.rect(f,g,m,y,0).attr({fill:d}).add().shadow(e.plotShadow)),u&&(l?l.animate(v):this.plotBGImage=i.image(u,f,g,m,y).add()),x?x.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),p&&(a?a.animate(a.crisp(null,f,g,m,y)):this.plotBorder=i.rect(f,g,m,y,0,-p).attr({stroke:e.plotBorderColor,"stroke-width":p,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,r=n.options.chart,s=n.options.series;je(["inverted","angular","polar"],function(o){for(t=He[r.type||r.defaultSeriesType],i=n[o]||r[o]||t&&t.prototype[o],e=s&&s.length;!i&&e--;)(t=He[s[e].type])&&t.prototype[o]&&(i=!0);n[o]=i})},linkSeries:function(){var t=this,e=t.series;je(e,function(t){t.linkedSeries.length=0}),je(e,function(e){var i=e.options.linkedTo;n(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&(i.linkedSeries.push(e),e.linkedParent=i)})},render:function(){var e,n=this,r=n.axes,s=n.renderer,o=n.options,a=o.labels,l=o.credits;n.setTitle(),n.legend=new fi(n,o.legend),n.getStacks(),je(r,function(t){t.setScale()}),n.getMargins(),n.maxTicks=null,je(r,function(t){t.setTickPositions(!0),t.setMaxTicks()}),n.adjustTickAmounts(),n.getMargins(),n.drawChartBox(),n.hasCartesianSeries&&je(r,function(t){t.render()}),n.seriesGroup||(n.seriesGroup=s.g("series-group").attr({zIndex:3}).add()),je(n.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),a.items&&je(a.items,function(e){var r=t(a.style,e.style),o=i(r.left)+n.plotLeft,l=i(r.top)+n.plotTop+12;delete r.left,delete r.top,s.text(e.html,o,l).attr({zIndex:2}).css(r).add()}),l.enabled&&!n.credits&&(e=l.href,n.credits=s.text(l.text,0,0).on("click",function(){e&&(parent.location.href=e)}).attr({align:l.position.align,zIndex:8}).css(l.style).add().align(l.position)),n.hasRendered=!0},destroy:function(){var t,e=this,i=e.axes,n=e.series,r=e.container,s=r&&r.parentNode;for(Qe(e,"destroy"),Re[e.index]=_,e.renderTo.removeAttribute("data-highcharts-chart"),Ke(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();je("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML="",Ke(r),s&&L(r));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!Ae&&ae==ae.top&&"complete"!==oe.readyState||Me&&!ae.canvg?(Me?ci.push(function(){t.firstRender()},t.options.global.canvasToolsURL):oe.attachEvent("onreadystatechange",function(){oe.detachEvent("onreadystatechange",t.firstRender),"complete"===oe.readyState&&t.firstRender()}),!1):!0},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),Qe(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),je(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),Qe(t,"beforeRender"),t.pointer=new ui(t,e),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),je(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),Qe(t,"load"))},splashArray:function(t,e){var i=e[t],i=r(i)?i:[i,i,i,i];return[p(e[t+"Top"],i[0]),p(e[t+"Right"],i[1]),p(e[t+"Bottom"],i[2]),p(e[t+"Left"],i[3])]}},N.prototype.callbacks=[];var hi=Highcharts.CenteredSeriesMixin={getCenter:function(){var t,e,n=this.options,r=this.chart,s=2*(n.slicedOffset||0),o=r.plotWidth-2*s,a=r.plotHeight-2*s,r=n.center,n=[p(r[0],"50%"),p(r[1],"50%"),n.size||"100%",n.innerSize||0],l=pe(o,a);return Ue(n,function(n,r){return e=/%$/.test(n),t=2>r||2===r&&e,(e?[o,a,l,l][r]*i(n)/100:n)+(t?s:0)})}},gi=function(){};gi.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(e,i){var n=this.series,r=n.pointValKey,e=gi.prototype.optionsToObject.call(this,e);return t(this,e),this.options=this.options?t(this.options,e):e,r&&(this.y=this[r]),this.x===_&&n&&(this.x=i===_?n.autoIncrement():i),this},optionsToObject:function(t){var e={},i=this.series,n=i.pointArrayMap||["y"],r=n.length,o=0,a=0;if("number"==typeof t||null===t)e[n[0]]=t;else if(s(t))for(t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),o++);r>a;)e[n[a++]]=t[o++];else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),h(i,this),!i.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(Ke(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(t,e){var i=this,n=i.series,r=n.chart,t=p(t,!i.selected);i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[Ye(i,n.data)]=i.options,i.setState(t&&"select"),e||je(r.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[Ye(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series,i=e.chart,n=i.tooltip,r=i.hoverPoint;r&&r!==this&&r.onMouseOut(),this.firePointEvent("mouseOver"),n&&(!n.shared||e.noSharedTooltip)&&n.refresh(this,t),this.setState("hover"),i.hoverPoint=this},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;e&&-1!==Ye(this,e)||(this.firePointEvent("mouseOut"),this.setState(),t.hoverPoint=null)},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,n=p(i.valueDecimals,""),r=i.valuePrefix||"",s=i.valueSuffix||"";return je(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||s)&&(t=t.replace(e+"}",r+e+"}"+s)),t=t.replace(e+"}",e+":,."+n+"f}")}),b(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,r=this.series.options;(r.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),Qe(this,t,e,i)},importEvents:function(){if(!this.hasImportedEvents){var t,i=e(this.series.options.point,this.options).events;this.events=i;for(t in i)Ze(this,t,i[t]);this.hasImportedEvents=!0}},setState:function(t,i){var n=this.plotX,r=this.plotY,s=this.series,o=s.options.states,a=ii[s.type].marker&&s.options.marker,l=a&&!a.enabled,h=a&&a.states[t],c=h&&h.enabled===!1,d=s.stateMarkerGraphic,u=this.marker||{},p=s.chart,f=this.pointAttr,t=t||"",i=i&&d;t===this.state&&!i||this.selected&&"select"!==t||o[t]&&o[t].enabled===!1||t&&(c||l&&!h.enabled)||t&&u.states&&u.states[t]&&u.states[t].enabled===!1||(this.graphic?(o=a&&this.graphic.symbolName&&f[t].r,this.graphic.attr(e(f[t],o?{x:n-o,y:r-o,width:2*o,height:2*o}:{}))):(t&&h&&(o=h.radius,u=u.symbol||s.symbol,d&&d.currentSymbol!==u&&(d=d.destroy()),d?d[i?"animate":"attr"]({x:n-o,y:r-o}):(s.stateMarkerGraphic=d=p.renderer.symbol(u,n-o,r-o,2*o,2*o).attr(f[t]).add(s.markerGroup),d.currentSymbol=u)),d&&d[t&&p.isInsidePlot(n,r,p.inverted)?"show":"hide"]()),this.state=t)}};var mi=function(){};mi.prototype={isCartesian:!0,type:"line",pointClass:gi,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(e,i){var n,r,s=this,o=e.series,a=function(t,e){return p(t.options.index,t._i)-p(e.options.index,e._i)};s.chart=e,s.options=i=s.setOptions(i),s.linkedSeries=[],s.bindAxes(),t(s,{name:i.name,state:"",pointAttr:{},visible:i.visible!==!1,selected:i.selected===!0}),Me&&(i.animation=!1),r=i.events;for(n in r)Ze(s,n,r[n]);(r&&r.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(e.runTrackerClick=!0),s.getColor(),s.getSymbol(),je(s.parallelArrays,function(t){s[t+"Data"]=[]}),s.setData(i.data,!1),s.isCartesian&&(e.hasCartesianSeries=!0),o.push(s),s._i=o.length-1,T(o,a),this.yAxis&&T(this.yAxis.series,a),je(o,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,e=this,i=e.options,n=e.chart;je(e.axisTypes||[],function(r){je(n[r],function(n){t=n.options,(i[r]===t.index||i[r]!==_&&i[r]===t.id||i[r]===_&&0===t.index)&&(n.series.push(e),e[r]=n,n.isDirty=!0)}),!e[r]&&e.optionalAxis!==r&&M(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments;je(i.parallelArrays,"number"==typeof e?function(n){var r="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=r}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))})},autoIncrement:function(){var t=this.options,e=this.xIncrement,e=p(e,t.pointStart,0);return this.pointInterval=p(this.pointInterval,t.pointInterval,1),this.xIncrement=e+this.pointInterval,e},getSegments:function(){var t,e=-1,i=[],n=this.points,r=n.length;if(r)if(this.options.connectNulls){for(t=r;t--;)null===n[t].y&&n.splice(t,1);n.length&&(i=[n])}else je(n,function(t,s){null===t.y?(s>e+1&&i.push(n.slice(e+1,s)),e=s):s===r-1&&i.push(n.slice(e+1,s+1))});this.segments=i},setOptions:function(t){var i=this.chart,n=i.options.plotOptions,i=i.userOptions||{},r=i.plotOptions||{},s=n[this.type];return this.userOptions=t,n=e(s,n.series,t),this.tooltipOptions=e($.tooltip,$.plotOptions[this.type].tooltip,i.tooltip,r.series&&r.series.tooltip,r[this.type]&&r[this.type].tooltip,t.tooltip),null===s.marker&&delete n.marker,n},getColor:function(){var t,e=this.options,i=this.userOptions,n=this.chart.options.colors,r=this.chart.counters;t=e.color||ii[this.type].color,t||e.colorByPoint||(c(i._colorIndex)?e=i._colorIndex:(i._colorIndex=r.color,e=r.color++),t=n[e]),this.color=t,r.wrapColor(n.length)},getSymbol:function(){var t=this.userOptions,e=this.options.marker,i=this.chart,n=i.options.symbols,i=i.counters;this.symbol=e.symbol,this.symbol||(c(t._symbolIndex)?t=t._symbolIndex:(t._symbolIndex=i.symbol,t=i.symbol++),this.symbol=n[t]),/^url/.test(this.symbol)&&(e.radius=0),i.wrapSymbol(n.length)},drawLegendSymbol:li.drawLineMarker,setData:function(t,e){var i,r=this,a=r.points,l=r.options,h=r.chart,c=null,d=r.xAxis,u=d&&!!d.categories;r.xIncrement=null,r.pointRange=u?1:l.pointRange,r.colorCounter=0;var t=t||[],f=t.length;i=l.turboThreshold;var g=this.xData,m=this.yData,y=r.pointArrayMap,y=y&&y.length;if(je(this.parallelArrays,function(t){r[t+"Data"].length=0}),i&&f>i){for(i=0;null===c&&f>i;)c=t[i],i++;if(o(c)){for(u=p(l.pointStart,0),l=p(l.pointInterval,1),i=0;f>i;i++)g[i]=u,m[i]=t[i],u+=l;r.xIncrement=u}else if(s(c))if(y)for(i=0;f>i;i++)l=t[i],g[i]=l[0],m[i]=l.slice(1,y+1);else for(i=0;f>i;i++)l=t[i],g[i]=l[0],m[i]=l[1];else M(12)}else for(i=0;f>i;i++)t[i]!==_&&(l={series:r},r.pointClass.prototype.applyOptions.apply(l,[t[i]]),r.updateParallelArrays(l,i),u&&l.name)&&(d.names[l.x]=l.name);for(n(m[0])&&M(14,!0),r.data=[],r.options.data=t,i=a&&a.length||0;i--;)a[i]&&a[i].destroy&&a[i].destroy();d&&(d.minRange=d.userMinRange),r.isDirty=r.isDirtyData=h.isDirtyBox=!0,p(e,!0)&&h.redraw(!1)},processData:function(t){var e,i=this.xData,n=this.yData,r=i.length;e=0;var s,o,a=this.xAxis,l=this.options,h=l.cropThreshold,c=this.isCartesian;if(c&&!this.isDirty&&!a.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(c&&this.sorted&&(!h||r>h||this.forceCrop)&&(t=a.min,a=a.max,i[r-1]<t||i[0]>a?(i=[],n=[]):(i[0]<t||i[r-1]>a)&&(e=this.cropData(this.xData,this.yData,t,a),i=e.xData,n=e.yData,e=e.start,s=!0)),a=i.length-1;a>=0;a--)r=i[a]-i[a-1],r>0&&(o===_||o>r)?o=r:0>r&&this.requireSorting&&M(15);this.cropped=s,this.cropStart=e,this.processedXData=i,this.processedYData=n,null===l.pointRange&&(this.pointRange=o||1),this.closestPointRange=o},cropData:function(t,e,i,n){var r,s=t.length,o=0,a=s,l=p(this.cropShoulder,1);for(r=0;s>r;r++)if(t[r]>=i){o=ue(0,r-l);break}for(;s>r;r++)if(t[r]>n){a=r+l;break}return{xData:t.slice(o,a),yData:e.slice(o,a),start:o,end:a}},generatePoints:function(){var t,e,i,n,r=this.options.data,s=this.data,o=this.processedXData,a=this.processedYData,l=this.pointClass,h=o.length,c=this.cropStart||0,d=this.hasGroupedData,p=[];for(s||d||(s=[],s.length=r.length,s=this.data=s),n=0;h>n;n++)e=c+n,d?p[n]=(new l).init(this,[o[n]].concat(u(a[n]))):(s[e]?i=s[e]:r[e]!==_&&(s[e]=i=(new l).init(this,r[e],o[n])),p[n]=i);if(s&&(h!==(t=s.length)||d))for(n=0;t>n;n++)n===c&&!d&&(n+=h),s[n]&&(s[n].destroyElements(),s[n].plotX=_);this.data=s,this.points=p},setStackedPoints:function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,i,n,r,s=this.processedXData,o=this.processedYData,a=[],l=o.length,h=this.options,c=h.threshold,d=h.stack,h=h.stacking,u=this.stackKey,p="-"+u,f=this.negStacks,g=this.yAxis,m=g.stacks,y=g.oldStacks;for(i=0;l>i;i++)n=s[i],r=o[i],e=(t=f&&c>r)?p:u,m[e]||(m[e]={}),m[e][n]||(y[e]&&y[e][n]?(m[e][n]=y[e][n],m[e][n].total=null):m[e][n]=new B(g,g.options.stackLabels,t,n,d,h)),e=m[e][n],e.points[this.index]=[e.cum||0],"percent"===h?(t=t?u:p,f&&m[t]&&m[t][n]?(t=m[t][n],e.total=t.total=ue(t.total,e.total)+fe(r)||0):e.total+=fe(r)||0):e.total+=r||0,e.cum=(e.cum||0)+(r||0),e.points[this.index].push(e.cum),a[i]=e.cum;"percent"===h&&(g.usePercentage=!0),this.stackedYData=a,g.oldStacks={}}},setPercentStacks:function(){var t=this,e=t.stackKey,i=t.yAxis.stacks;je([e,"-"+e],function(e){for(var n,r,s,o=t.xData.length;o--;)r=t.xData[o],n=(s=i[e]&&i[e][r])&&s.points[t.index],(r=n)&&(s=s.total?100/s.total:0,r[0]=I(r[0]*s),r[1]=I(r[1]*s),t.stackedYData[o]=r[1])})},getExtremes:function(t){var e,i=this.yAxis,n=this.processedXData,r=[],s=0;e=this.xAxis.getExtremes();var o,a,l,h,c=e.min,d=e.max,t=t||this.stackedYData||this.processedYData;for(e=t.length,h=0;e>h;h++)if(a=n[h],l=t[h],o=null!==l&&l!==_&&(!i.isLog||l.length||l>0),a=this.getExtremesFromAll||this.cropped||(n[h+1]||a)>=c&&(n[h-1]||a)<=d,o&&a)if(o=l.length)for(;o--;)null!==l[o]&&(r[s++]=l[o]);else r[s++]=l;this.dataMin=p(void 0,C(r)),this.dataMax=p(void 0,P(r))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t=this.options,e=t.stacking,i=this.xAxis,n=i.categories,r=this.yAxis,s=this.points,a=s.length,l=!!this.modifyValue,h=t.pointPlacement,d="between"===h||o(h),u=t.threshold,t=0;a>t;t++){var f=s[t],g=f.x,m=f.y,y=f.low,v=e&&r.stacks[(this.negStacks&&u>m?"-":"")+this.stackKey];r.isLog&&0>=m&&(f.y=m=null),f.plotX=i.translate(g,0,0,0,1,h,"flags"===this.type),e&&this.visible&&v&&v[g]&&(v=v[g],m=v.points[this.index],y=m[0],m=m[1],0===y&&(y=p(u,r.min)),r.isLog&&0>=y&&(y=null),f.total=f.stackTotal=v.total,f.percentage="percent"===e&&f.y/v.total*100,f.stackY=m,v.setOffset(this.pointXOffset||0,this.barW||0)),f.yBottom=c(y)?r.translate(y,0,1,0,1):null,l&&(m=this.modifyValue(m,f)),f.plotY="number"==typeof m&&1/0!==m?r.translate(m,0,1,0,1):_,f.clientX=d?i.translate(g,0,0,0,1):f.plotX,f.negative=f.y<(u||0),f.category=n&&n[f.x]!==_?n[f.x]:f.x}this.getSegments()},setTooltipPoints:function(t){var e,i,n,r,s=[],o=this.xAxis,a=o&&o.getExtremes(),l=o?o.tooltipLen||o.len:this.chart.plotSizeX,h=[];if(this.options.enableMouseTracking!==!1){for(t&&(this.tooltipPoints=null),je(this.segments||this.points,function(t){s=s.concat(t)}),o&&o.reversed&&(s=s.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(s),t=s.length,r=0;t>r;r++)if(o=s[r],e=o.x,e>=a.min&&e<=a.max)for(n=s[r+1],e=i===_?0:i+1,i=s[r+1]?pe(ue(0,ce((o.clientX+(n?n.wrappedClientX||n.clientX:l))/2)),l):l;e>=0&&i>=e;)h[e++]=o;this.tooltipPoints=h}},tooltipHeaderFormatter:function(t){var e,i=this.tooltipOptions,n=i.dateTimeLabelFormats,r=i.xDateFormat||n.year,s=this.xAxis,a=s&&"datetime"===s.options.type,i=i.headerFormat,s=s&&s.closestPointRange;if(a&&!r)if(s){for(e in j)if(j[e]>=s){r=n[e];break}}else r=n.day;return a&&r&&o(t.key)&&(i=i.replace("{point.key}","{point.key:"+r+"}")),b(i,{point:t,series:this})},onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&Qe(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;n&&n.onMouseOut(),this&&t.events.mouseOut&&Qe(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState(),e.hoverSeries=null},animate:function(e){var i,n=this,s=n.chart,o=s.renderer;i=n.options.animation;var a,l=s.clipBox,h=s.inverted;i&&!r(i)&&(i=ii[n.type].animation),a="_sharedClip"+i.duration+i.easing,e?(e=s[a],i=s[a+"m"],e||(s[a]=e=o.clipRect(t(l,{width:0})),s[a+"m"]=i=o.clipRect(-99,h?-s.plotLeft:-s.plotTop,99,h?s.chartWidth:s.chartHeight)),n.group.clip(e),n.markerGroup.clip(i),n.sharedClipKey=a):((e=s[a])&&(e.animate({width:s.plotSizeX},i),s[a+"m"].animate({width:s.plotSizeX+99},i)),n.animate=null,n.animationTimeout=setTimeout(function(){n.afterAnimate()},i.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group;i&&this.options.clip!==!1&&(i.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var e,i,n,r,s,o,a,l,h,c,d=this.points,u=this.chart,f=this.options.marker,g=this.pointAttr[""],m=this.markerGroup;if(f.enabled||this._hasPointMarkers)for(r=d.length;r--;)s=d[r],i=ce(s.plotX),n=s.plotY,h=s.graphic,a=s.marker||{},e=f.enabled&&a.enabled===_||a.enabled,c=u.isInsidePlot(he(i),n,u.inverted),e&&n!==_&&!isNaN(n)&&null!==s.y?(e=s.pointAttr[s.selected?"select":""]||g,o=e.r,a=p(a.symbol,this.symbol),l=0===a.indexOf("url"),h?h.attr({visibility:c?Ae?"inherit":"visible":"hidden"}).animate(t({x:i-o,y:n-o},h.symbolName?{width:2*o,height:2*o}:{})):c&&(o>0||l)&&(s.graphic=u.renderer.symbol(a,i-o,n-o,2*o,2*o).attr(e).add(m))):h&&(s.graphic=h.destroy())},convertAttribs:function(t,e,i,n){var r,s,o=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},n=n||{};for(r in o)s=o[r],a[r]=p(t[s],e[r],i[r],n[r]);return a},getAttribs:function(){var e,i=this,n=i.options,r=ii[i.type].marker?n.marker:n,s=r.states,o=s.hover,a=i.color;e={stroke:a,fill:a};var l,h,d=i.points||[],u=[],p=i.pointAttrToOptions;l=n.turboThreshold;var f,g=n.negativeColor,m=r.lineColor;if(n.marker?(o.radius=o.radius||r.radius+2,o.lineWidth=o.lineWidth||r.lineWidth+1):o.color=o.color||oi(o.color||a).brighten(o.brightness).get(),u[""]=i.convertAttribs(r,e),je(["hover","select"],function(t){u[t]=i.convertAttribs(s[t],u[""])}),i.pointAttr=u,a=d.length,!l||l>a)for(;a--;){if(l=d[a],(r=l.options&&l.options.marker||l.options)&&r.enabled===!1&&(r.radius=0),l.negative&&g&&(l.color=l.fillColor=g),e=n.colorByPoint||l.color,l.options)for(f in p)c(r[p[f]])&&(e=!0);e?(r=r||{},h=[],s=r.states||{},e=s.hover=s.hover||{},n.marker||(e.color=e.color||o.color||oi(l.color).brighten(e.brightness||o.brightness).get()),h[""]=i.convertAttribs(t({color:l.color,fillColor:l.color,lineColor:null===m?l.color:_},r),u[""]),h.hover=i.convertAttribs(s.hover,u.hover,h[""]),h.select=i.convertAttribs(s.select,u.select,h[""])):h=u,l.pointAttr=h}},destroy:function(){var t,e,i,n,r,s=this,o=s.chart,a=/AppleWebKit\/533/.test(xe),l=s.data||[];for(Qe(s,"destroy"),Ke(s),je(s.axisTypes||[],function(t){(r=s[t])&&(h(r.series,s),r.isDirty=r.forceRedraw=!0)}),s.legendItem&&s.chart.legend.destroyItem(s),e=l.length;e--;)(i=l[e])&&i.destroy&&i.destroy();s.points=null,clearTimeout(s.animationTimeout),je("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(e){s[e]&&(t=a&&"group"===e?"hide":"destroy",s[e][t]())}),o.hoverSeries===s&&(o.hoverSeries=null),h(o.series,s);for(n in s)delete s[n]},getSegmentPath:function(t){var e=this,i=[],n=e.options.step;return je(t,function(r,s){var o,a=r.plotX,l=r.plotY;
e.getPointSpline?i.push.apply(i,e.getPointSpline(t,r,s)):(i.push(s?"L":"M"),n&&s&&(o=t[s-1],"right"===n?i.push(o.plotX,l):"center"===n?i.push((o.plotX+a)/2,o.plotY,(o.plotX+a)/2,l):i.push(a,o.plotY)),i.push(r.plotX,r.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],n=[];return je(e.segments,function(r){t=e.getSegmentPath(r),r.length>1?i=i.concat(t):n.push(r[0])}),e.singlePoints=n,e.graphPath=i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color]],n=e.lineWidth,r=e.dashStyle,s="square"!==e.linecap,o=this.getGraphPath(),a=e.negativeColor;a&&i.push(["graphNeg",a]),je(i,function(i,a){var l=i[0],h=t[l];h?(ei(h),h.animate({d:o})):n&&o.length&&(h={stroke:i[1],"stroke-width":n,zIndex:1},r?h.dashstyle=r:s&&(h["stroke-linecap"]=h["stroke-linejoin"]="round"),t[l]=t.chart.renderer.path(o).attr(h).add(t.group).shadow(!a&&e.shadow))})},clipNeg:function(){var t,e=this.options,i=this.chart,n=i.renderer,r=e.negativeColor||e.negativeFillColor,s=this.graph,o=this.area,a=this.posClip,l=this.negClip;t=i.chartWidth;var h=i.chartHeight,c=ue(t,h),d=this.yAxis;r&&(s||o)&&(r=he(d.toPixels(e.threshold||0,!0)),0>r&&(c-=r),e={x:0,y:0,width:c,height:r},c={x:0,y:r,width:c,height:c},i.inverted&&(e.height=c.y=i.plotWidth-r,n.isVML&&(e={x:i.plotWidth-r-i.plotLeft,y:0,width:t,height:h},c={x:r+i.plotLeft-t,y:0,width:i.plotLeft+r,height:t})),d.reversed?(i=c,t=e):(i=e,t=c),a?(a.animate(i),l.animate(t)):(this.posClip=a=n.clipRect(i),this.negClip=l=n.clipRect(t),s&&this.graphNeg&&(s.clip(a),this.graphNeg.clip(l)),o&&(o.clip(a),this.areaNeg.clip(l))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};je(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&(Ze(i,"resize",t),Ze(e,"destroy",function(){Ke(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,r){var s=this[t],o=!s;return o&&(this[t]=s=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(r)),s[o?"attr":"animate"](this.getPlotBox()),s},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this.chart,i=this.options,n=i.animation&&!!this.animate&&e.renderer.isSVG,r=this.visible?"visible":"hidden",s=i.zIndex,o=this.hasRendered,a=e.seriesGroup;t=this.plotGroup("group","series",r,s,a),this.markerGroup=this.plotGroup("markerGroup","markers",r,s,a),n&&this.animate(!0),this.getAttribs(),t.inverted=this.isCartesian?e.inverted:!1,this.drawGraph&&(this.drawGraph(),this.clipNeg()),this.drawDataLabels&&this.drawDataLabels(),this.visible&&this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),e.inverted&&this.invertGroups(),i.clip!==!1&&!this.sharedClipKey&&!o&&t.clip(e.clipRect),n?this.animate():o||this.afterAnimate(),this.isDirty=this.isDirtyData=!1,this.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:p(n&&n.left,t.plotLeft),translateY:p(r&&r.top,t.plotTop)})),this.translate(),this.setTooltipPoints(!0),this.render(),e&&Qe(this,"updatedData")},setState:function(t){var e=this.options,i=this.graph,n=this.graphNeg,r=e.states,e=e.lineWidth,t=t||"";this.state!==t&&(this.state=t,r[t]&&r[t].enabled===!1||(t&&(e=r[t].lineWidth||e+1),i&&!i.dashstyle&&(t={"stroke-width":e},i.attr(t),n&&n.attr(t))))},setVisible:function(t,e){var i,n=this,r=n.chart,s=n.legendItem,o=r.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=t=n.userOptions.visible=t===_?!a:t)?"show":"hide",je(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),r.hoverSeries===n&&n.onMouseOut(),s&&r.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&je(r.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),je(n.linkedSeries,function(e){e.setVisible(t,!1)}),o&&(r.isDirtyBox=!0),e!==!1&&r.redraw(),Qe(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===_?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),Qe(this,t?"select":"unselect")},drawTracker:$e.drawTrackerGraph},t(N.prototype,{addSeries:function(t,e,i){var n,r=this;return t&&(e=p(e,!0),Qe(r,"addSeries",{options:t},function(){n=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),e&&r.redraw(i)})),n},addAxis:function(t,i,n,r){var s=i?"xAxis":"yAxis",o=this.options;new z(this,e(t,{index:this[s].length,isX:i})),o[s]=u(o[s]||{}),o[s].push(t),p(n,!0)&&this.redraw(r)},showLoading:function(e){var i=this.options,n=this.loadingDiv,r=i.loading;n||(this.loadingDiv=n=g(ze,{className:"highcharts-loading"},t(r.style,{zIndex:10,display:Be}),this.container),this.loadingSpan=g("span",null,r.labelStyle,n)),this.loadingSpan.innerHTML=e||i.lang.loading,this.loadingShown||(f(n,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),ti(n,{opacity:r.style.opacity},{duration:r.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&ti(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){f(e,{display:Be})}}),this.loadingShown=!1}}),t(gi.prototype,{update:function(t,e,i){var n,s=this,o=s.series,a=s.graphic,l=o.data,h=o.chart,c=o.options,e=p(e,!0);s.firePointEvent("update",{options:t},function(){s.applyOptions(t),r(t)&&(o.getAttribs(),a&&(t&&t.marker&&t.marker.symbol?s.graphic=a.destroy():a.attr(s.pointAttr[s.state||""])),t&&t.dataLabels&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),n=Ye(s,l),o.updateParallelArrays(s,n),c.data[n]=s.options,o.isDirty=o.isDirtyData=!0,!o.fixedBox&&o.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===c.legendType&&h.legend.destroyItem(s),e&&h.redraw(i)})},remove:function(t,e){var i,n=this,r=n.series,s=r.points,o=r.chart,a=r.data;D(e,o),t=p(t,!0),n.firePointEvent("remove",null,function(){i=Ye(n,a),a.length===s.length&&s.splice(i,1),a.splice(i,1),r.options.data.splice(i,1),r.updateParallelArrays(n,"splice",i,1),n.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&o.redraw()})}}),t(mi.prototype,{addPoint:function(t,e,i,n){var r,s=this.options,o=this.data,a=this.graph,l=this.area,h=this.chart,c=this.xAxis&&this.xAxis.names,d=a&&a.shift||0,u=s.data,f=this.xData;if(D(n,h),i&&je([a,l,this.graphNeg,this.areaNeg],function(t){t&&(t.shift=d+1)}),l&&(l.isArea=!0),e=p(e,!0),n={series:this},this.pointClass.prototype.applyOptions.apply(n,[t]),a=n.x,l=f.length,this.requireSorting&&a<f[l-1])for(r=!0;l&&f[l-1]>a;)l--;this.updateParallelArrays(n,"splice",l),this.updateParallelArrays(n,l),c&&(c[a]=n.name),u.splice(l,0,t),r&&(this.data.splice(l,0,null),this.processData()),"point"===s.legendType&&this.generatePoints(),i&&(o[0]&&o[0].remove?o[0].remove(!1):(o.shift(),this.updateParallelArrays(n,"shift"),u.shift())),this.isDirtyData=this.isDirty=!0,e&&(this.getAttribs(),h.redraw())},remove:function(t,e){var i=this,n=i.chart,t=p(t,!0);i.isRemoving||(i.isRemoving=!0,Qe(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),t&&n.redraw(e)})),i.isRemoving=!1},update:function(i,n){var r,s=this.chart,o=this.type,a=He[o].prototype,i=e(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},i);this.remove(!1);for(r in a)a.hasOwnProperty(r)&&(this[r]=_);t(this,He[i.type||o].prototype),this.init(s,i),p(n,!0)&&s.redraw(!1)}}),t(z.prototype,{update:function(i,n){var r=this.chart,i=r.options[this.coll][this.options.index]=e(this.userOptions,i);this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=_,this.init(r,t(i,{events:_})),r.isDirtyBox=!0,p(n,!0)&&r.redraw()},remove:function(t){var e=this.chart,i=this.coll;je(this.series,function(t){t.remove(!1)}),h(e.axes,this),h(e[i],this),e.options[i].splice(this.options.index,1),je(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,p(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}});var yi=m(mi);He.line=yi,ii.area=e(We,{threshold:0});var vi=m(mi,{type:"area",getSegments:function(){var t,e,i,n,r,s=[],o=[],a=[],l=this.xAxis,h=this.yAxis,c=h.stacks[this.stackKey],d={},u=this.points,p=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(n=0;n<u.length;n++)d[u[n].x]=u[n];for(r in c)null!==c[r].total&&a.push(+r);a.sort(function(t,e){return t-e}),je(a,function(n){(!p||d[n]&&null!==d[n].y)&&(d[n]?o.push(d[n]):(t=l.translate(n),i=c[n].percent?c[n].total?100*c[n].cum/c[n].total:0:c[n].cum,e=h.toPixels(i,!0),o.push({y:null,plotX:t,clientX:t,plotY:e,yBottom:e,onMouseOver:Oe})))}),o.length&&s.push(o)}else mi.prototype.getSegments.call(this),s=this.segments;this.segments=s},getSegmentPath:function(t){var e,i=mi.prototype.getSegmentPath.call(this,t),n=[].concat(i),r=this.options;e=i.length;var s,o=this.yAxis.getThreshold(r.threshold);if(3===e&&n.push("L",i[1],i[2]),r.stacking&&!this.closedStacks)for(e=t.length-1;e>=0;e--)s=p(t[e].yBottom,o),e<t.length-1&&r.step&&n.push(t[e+1].plotX,s),n.push(t[e].plotX,s);else this.closeSegment(n,t,o);return this.areaPath=this.areaPath.concat(n),i},closeSegment:function(t,e,i){t.push("L",e[e.length-1].plotX,i,"L",e[0].plotX,i)},drawGraph:function(){this.areaPath=[],mi.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,i=this.options,n=i.negativeColor,r=i.negativeFillColor,s=[["area",this.color,i.fillColor]];(n||r)&&s.push(["areaNeg",n,r]),je(s,function(n){var r=n[0],s=t[r];s?s.animate({d:e}):t[r]=t.chart.renderer.path(e).attr({fill:p(n[2],oi(n[1]).setOpacity(p(i.fillOpacity,.75)).get()),zIndex:0}).add(t.group)})},drawLegendSymbol:li.drawRectangle});He.area=vi,ii.spline=e(We),yi=m(mi,{type:"spline",getPointSpline:function(t,e,i){var n,r,s,o,a=e.plotX,l=e.plotY,h=t[i-1],c=t[i+1];if(h&&c){t=h.plotY,s=c.plotX;var d,c=c.plotY;n=(1.5*a+h.plotX)/2.5,r=(1.5*l+t)/2.5,s=(1.5*a+s)/2.5,o=(1.5*l+c)/2.5,d=(o-r)*(s-a)/(s-n)+l-o,r+=d,o+=d,r>t&&r>l?(r=ue(t,l),o=2*l-r):t>r&&l>r&&(r=pe(t,l),o=2*l-r),o>c&&o>l?(o=ue(c,l),r=2*l-o):c>o&&l>o&&(o=pe(c,l),r=2*l-o),e.rightContX=s,e.rightContY=o}return i?(e=["C",h.rightContX||h.plotX,h.rightContY||h.plotY,n||a,r||l,a,l],h.rightContX=h.rightContY=null):e=["M",a,l],e}}),He.spline=yi,ii.areaspline=e(ii.area),vi=vi.prototype,yi=m(yi,{type:"areaspline",closedStacks:!0,getSegmentPath:vi.getSegmentPath,closeSegment:vi.closeSegment,drawGraph:vi.drawGraph,drawLegendSymbol:li.drawRectangle}),He.areaspline=yi,ii.column=e(We,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,threshold:0}),yi=m(mi,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){mi.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&je(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e,i=this,n=i.options,r=i.xAxis,s=i.yAxis,o=r.reversed,a={},l=0;n.grouping===!1?l=1:je(i.chart.series,function(n){var r=n.options,o=n.yAxis;n.type===i.type&&n.visible&&s.len===o.len&&s.pos===o.pos&&(r.stacking?(t=n.stackKey,a[t]===_&&(a[t]=l++),e=a[t]):r.grouping!==!1&&(e=l++),n.columnIndex=e)});var r=pe(fe(r.transA)*(r.ordinalSlope||n.pointRange||r.closestPointRange||1),r.len),h=r*n.groupPadding,d=(r-2*h)/l,u=n.pointWidth,n=c(u)?(d-u)/2:d*n.pointPadding,u=p(u,d-2*n);return i.columnMetrics={width:u,offset:n+(h+((o?l-(i.columnIndex||0):i.columnIndex)||0)*d-r/2)*(o?-1:1)}},translate:function(){var t=this.chart,e=this.options,i=e.borderWidth,n=this.yAxis,r=this.translatedThreshold=n.getThreshold(e.threshold),s=p(e.minPointLength,5),e=this.getColumnMetrics(),o=e.width,a=this.barW=de(ue(o,1+2*i)),l=this.pointXOffset=e.offset,h=-(i%2?.5:0),c=i%2?.5:1;t.renderer.isVML&&t.inverted&&(c+=1),mi.prototype.translate.apply(this),je(this.points,function(t){var e,i=p(t.yBottom,r),d=pe(ue(-999-i,t.plotY),n.len+999+i),u=t.plotX+l,f=a,g=pe(d,i),d=ue(d,i)-g;fe(d)<s&&s&&(d=s,g=he(fe(g-r)>s?i-s:r-(n.translate(t.y,0,1,0,1)<=r?s:0))),t.barX=u,t.pointWidth=o,i=fe(u)<.5,f=he(u+f)+h,u=he(u)+h,f-=u,e=fe(g)<.5,d=he(g+d)+c,g=he(g)+c,d-=g,i&&(u+=1,f-=1),e&&(g-=1,d+=1),t.shapeType="rect",t.shapeArgs={x:u,y:g,width:f,height:d}})},getSymbol:Oe,drawLegendSymbol:li.drawRectangle,drawGraph:Oe,drawPoints:function(){var t,i=this,n=this.chart,r=i.options,s=n.renderer,o=n.options.animationLimit||250;je(i.points,function(a){var l=a.plotY,h=a.graphic;l===_||isNaN(l)||null===a.y?h&&(a.graphic=h.destroy()):(t=a.shapeArgs,h?(ei(h),h[n.pointCount<o?"animate":"attr"](e(t))):a.graphic=s[a.shapeType](t).attr(a.pointAttr[a.selected?"select":""]).add(i.group).shadow(r.shadow,null,r.stacking&&!r.borderRadius))})},drawTracker:$e.drawTrackerPoint,animate:function(t){var e=this.yAxis,i=this.options,n=this.chart.inverted,r={};Ae&&(t?(r.scaleY=.001,t=pe(e.pos+e.len,ue(e.pos,e.toPixels(i.threshold))),n?r.translateX=t-e.len:r.translateY=t,this.group.attr(r)):(r.scaleY=1,r[n?"translateX":"translateY"]=e.pos,this.group.animate(r,this.options.animation),this.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&je(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),mi.prototype.remove.apply(t,arguments)}}),He.column=yi,ii.bar=e(ii.column),yi=m(yi,{type:"bar",inverted:!0}),He.bar=yi,ii.scatter=e(We,{lineWidth:0,tooltip:{headerFormat:'<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>",followPointer:!0},stickyTracking:!1}),yi=m(mi,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],takeOrdinalPosition:!1,drawTracker:$e.drawTrackerPoint,drawGraph:function(){this.options.lineWidth&&mi.prototype.drawGraph.call(this)},setTooltipPoints:Oe}),He.scatter=yi,ii.pie=e(We,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),We={type:"pie",isCartesian:!1,pointClass:m(gi,{init:function(){gi.prototype.init.apply(this,arguments);var e,i=this;return i.y<0&&(i.y=null),t(i,{visible:i.visible!==!1,name:p(i.name,"Slice")}),e=function(t){i.slice("select"===t.type)},Ze(i,"select",e),Ze(i,"unselect",e),i},setVisible:function(t){var e,i=this,n=i.series,r=n.chart;i.visible=i.options.visible=t=t===_?!i.visible:t,n.options.data[Ye(i,n.data)]=i.options,e=t?"show":"hide",je(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e]()}),i.legendItem&&r.legend.colorizeItem(i,t),!n.isDirty&&n.options.ignoreHiddenPoint&&(n.isDirty=!0,r.redraw())},slice:function(t,e,i){var n=this.series;D(i,n.chart),p(e,!0),this.sliced=this.options.sliced=t=c(t)?t:!this.sliced,n.options.data[Ye(this,n.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:Oe,animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(je(i,function(t){var i=t.graphic,t=t.shapeArgs;i&&(i.attr({r:e.center[3]/2,start:n,end:n}),i.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null)},setData:function(t,e){mi.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),p(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,i,n,r=0,s=this.options.ignoreHiddenPoint;for(mi.prototype.generatePoints.call(this),e=this.points,i=e.length,t=0;i>t;t++)n=e[t],r+=s&&!n.visible?0:n.y;for(this.total=r,t=0;i>t;t++)n=e[t],n.percentage=r>0?n.y/r*100:0,n.total=r},translate:function(t){this.generatePoints();var e,i,n,r,s,o=0,a=this.options,l=a.slicedOffset,h=l+a.borderWidth,c=a.startAngle||0,d=this.startAngleRad=ye/180*(c-90),c=(this.endAngleRad=ye/180*((a.endAngle||c+360)-90))-d,u=this.points,p=a.dataLabels.distance,a=a.ignoreHiddenPoint,f=u.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=le.asin((e-t[1])/(t[2]/2+p)),t[0]+(i?-1:1)*ge(n)*(t[2]/2+p)},r=0;f>r;r++)s=u[r],e=d+o*c,(!a||s.visible)&&(o+=s.percentage/100),i=d+o*c,s.shapeType="arc",s.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:he(1e3*e)/1e3,end:he(1e3*i)/1e3},n=(i+e)/2,n>.75*c&&(n-=2*ye),s.slicedTranslation={translateX:he(ge(n)*l),translateY:he(me(n)*l)},e=ge(n)*t[2]/2,i=me(n)*t[2]/2,s.tooltipPos=[t[0]+.7*e,t[1]+.7*i],s.half=-ye/2>n||n>ye/2?1:0,s.angle=n,h=pe(h,p/2),s.labelPos=[t[0]+e+ge(n)*p,t[1]+i+me(n)*p,t[0]+e+ge(n)*h,t[1]+i+me(n)*h,t[0]+e,t[1]+i,0>p?"center":s.half?"right":"left",n]},setTooltipPoints:Oe,drawGraph:null,drawPoints:function(){var e,i,n,r,s=this,o=s.chart.renderer,a=s.options.shadow;a&&!s.shadowGroup&&(s.shadowGroup=o.g("shadow").add(s.group)),je(s.points,function(l){i=l.graphic,r=l.shapeArgs,n=l.shadowGroup,a&&!n&&(n=l.shadowGroup=o.g("shadow").add(s.shadowGroup)),e=l.sliced?l.slicedTranslation:{translateX:0,translateY:0},n&&n.attr(e),i?i.animate(t(r,e)):l.graphic=i=o.arc(r).setRadialReference(s.center).attr(l.pointAttr[l.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(e).add(s.group).shadow(a,n),void 0!==l.visible&&l.setVisible(l.visible)})},sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawTracker:$e.drawTrackerPoint,drawLegendSymbol:li.drawRectangle,getCenter:hi.getCenter,getSymbol:Oe},We=m(mi,We),He.pie=We,mi.prototype.drawDataLabels=function(){var i,n,r,s,o=this,a=o.options,l=a.cursor,h=a.dataLabels,a=o.points;(h.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(h),s=o.plotGroup("dataLabelsGroup","data-labels",o.visible?"visible":"hidden",h.zIndex||6),n=h,je(a,function(a){var d,u,f,g=a.dataLabel,m=a.connector,y=!0;if(i=a.options&&a.options.dataLabels,d=p(i&&i.enabled,n.enabled),g&&!d)a.dataLabel=g.destroy();else if(d){if(h=e(n,i),d=h.rotation,u=a.getLabelConfig(),r=h.format?b(h.format,u):h.formatter.call(u,h),h.style.color=p(h.color,h.style.color,o.color,"black"),g)c(r)?(g.attr({text:r}),y=!1):(a.dataLabel=g=g.destroy(),m&&(a.connector=m.destroy()));else if(c(r)){g={fill:h.backgroundColor,stroke:h.borderColor,"stroke-width":h.borderWidth,r:h.borderRadius||0,rotation:d,padding:h.padding,zIndex:1};for(f in g)g[f]===_&&delete g[f];g=a.dataLabel=o.chart.renderer[d?"text":"label"](r,0,-999,null,null,null,h.useHTML).attr(g).css(t(h.style,l&&{cursor:l})).add(s).shadow(h.shadow)}g&&o.alignDataLabel(a,g,h,null,y)}}))},mi.prototype.alignDataLabel=function(e,i,n,r,s){var o=this.chart,a=o.inverted,l=p(e.plotX,-999),h=p(e.plotY,-999),c=i.getBBox();(e=this.visible&&(e.series.forceDL||o.isInsidePlot(e.plotX,e.plotY,a)))&&(r=t({x:a?o.plotWidth-h:l,y:he(a?o.plotHeight-l:h),width:0,height:0},r),t(n,{width:c.width,height:c.height}),n.rotation?(a={align:n.align,x:r.x+n.x+r.width/2,y:r.y+n.y+r.height/2},i[s?"attr":"animate"](a)):(i.align(n,null,r),a=i.alignAttr,"justify"===p(n.overflow,"justify")?this.justifyDataLabel(i,n,a,c,r,s):p(n.crop,!0)&&(e=o.isInsidePlot(a.x,a.y)&&o.isInsidePlot(a.x+c.width,a.y+c.height)))),e||(i.attr({y:-999}),i.placed=!1)},mi.prototype.justifyDataLabel=function(t,e,i,n,r,s){var o,a,l=this.chart,h=e.align,c=e.verticalAlign;o=i.x,0>o&&("right"===h?e.align="left":e.x=-o,a=!0),o=i.x+n.width,o>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-o,a=!0),o=i.y,0>o&&("bottom"===c?e.verticalAlign="top":e.y=-o,a=!0),o=i.y+n.height,o>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-o,a=!0),a&&(t.placed=!s,t.align(e,null,r))},He.pie&&(He.pie.prototype.drawDataLabels=function(){var t,e,i,n,r,s,o,a,l,h,c,d,u=this,f=u.data,g=u.chart,m=u.options.dataLabels,y=p(m.connectorPadding,10),v=p(m.connectorWidth,1),x=g.plotWidth,g=g.plotHeight,b=p(m.softConnector,!0),w=m.distance,k=u.center,S=k[2]/2,T=k[1],C=w>0,A=[[],[]],L=[0,0,0,0],M=function(t,e){return e.y-t.y};if(u.visible&&(m.enabled||u._hasPointLabels)){for(mi.prototype.drawDataLabels.apply(u),je(f,function(t){t.dataLabel&&t.visible&&A[t.half].push(t)}),c=0;!o&&f[c];)o=f[c]&&f[c].dataLabel&&(f[c].dataLabel.getBBox().height||21),c++;for(c=2;c--;){var I,f=[],D=[],E=A[c],O=E.length;if(u.sortByAngle(E,c-.5),w>0){for(d=T-S-w;T+S+w>=d;d+=o)f.push(d);if(r=f.length,O>r){for(t=[].concat(E),t.sort(M),d=O;d--;)t[d].rank=d;for(d=O;d--;)E[d].rank>=r&&E.splice(d,1);O=E.length}for(d=0;O>d;d++){t=E[d],s=t.labelPos,t=9999;var R,z;for(z=0;r>z;z++)R=fe(f[z]-s[1]),t>R&&(t=R,I=z);if(d>I&&null!==f[d])I=d;else for(O-d+I>r&&null!==f[d]&&(I=r-O+d);null===f[I];)I++;D.push({i:I,y:f[I]}),f[I]=null}D.sort(M)}for(d=0;O>d;d++)t=E[d],s=t.labelPos,n=t.dataLabel,h=t.visible===!1?"hidden":"visible",t=s[1],w>0?(r=D.pop(),I=r.i,l=r.y,(t>l&&null!==f[I+1]||l>t&&null!==f[I-1])&&(l=t)):l=t,a=m.justify?k[0]+(c?-1:1)*(S+w):u.getX(0===I||I===f.length-1?t:l,c),n._attr={visibility:h,align:s[6]},n._pos={x:a+m.x+({left:y,right:-y}[s[6]]||0),y:l+m.y-10},n.connX=a,n.connY=l,null===this.options.size&&(r=n.width,y>a-r?L[3]=ue(he(r-a+y),L[3]):a+r>x-y&&(L[1]=ue(he(a+r-x+y),L[1])),0>l-o/2?L[0]=ue(he(-l+o/2),L[0]):l+o/2>g&&(L[2]=ue(he(l+o/2-g),L[2])))}(0===P(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),C&&v&&je(this.points,function(t){e=t.connector,s=t.labelPos,(n=t.dataLabel)&&n._pos?(h=n._attr.visibility,a=n.connX,l=n.connY,i=b?["M",a+("left"===s[6]?5:-5),l,"C",a,l,2*s[2]-s[4],2*s[3]-s[5],s[2],s[3],"L",s[4],s[5]]:["M",a+("left"===s[6]?5:-5),l,"L",s[2],s[3],"L",s[4],s[5]],e?(e.animate({d:i}),e.attr("visibility",h)):t.connector=e=u.chart.renderer.path(i).attr({"stroke-width":v,stroke:m.connectorColor||t.color||"#606060",visibility:h}).add(u.group)):e&&(t.connector=e.destroy())}))}},He.pie.prototype.placeDataLabels=function(){je(this.points,function(t){var e,t=t.dataLabel;t&&((e=t._pos)?(t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-999}))})},He.pie.prototype.alignDataLabel=Oe,He.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,n=this.options,r=n.center,s=n=n.minSize||80;return null!==r[0]?s=ue(i[2]-ue(t[1],t[3]),n):(s=ue(i[2]-t[1]-t[3],n),i[0]+=(t[3]-t[1])/2),null!==r[1]?s=ue(pe(s,i[2]-ue(t[0],t[2])),n):(s=ue(pe(s,i[2]-t[0]-t[2]),n),i[1]+=(t[0]-t[2])/2),s<i[2]?(i[2]=s,this.translate(i),je(this.points,function(t){t.dataLabel&&(t.dataLabel._pos=null)}),this.drawDataLabels&&this.drawDataLabels()):e=!0,e}),He.column&&(He.column.prototype.alignDataLabel=function(t,i,n,r,s){var o=this.chart,a=o.inverted,l=t.dlBox||t.shapeArgs,h=t.below||t.plotY>p(this.translatedThreshold,o.plotSizeY),c=p(n.inside,!!this.options.stacking);l&&(r=e(l),a&&(r={x:o.plotWidth-r.y-r.height,y:o.plotHeight-r.x-r.width,width:r.height,height:r.width}),!c)&&(a?(r.x+=h?0:r.width,r.width=0):(r.y+=h?r.height:0,r.height=0)),n.align=p(n.align,!a||c?"center":h?"right":"left"),n.verticalAlign=p(n.verticalAlign,a||c?"middle":h?"top":"bottom"),mi.prototype.alignDataLabel.call(this,t,i,n,r,s)}),t(Highcharts,{Axis:z,Chart:N,Color:oi,Point:gi,Tick:R,Tooltip:F,Renderer:H,Series:mi,SVGElement:O,SVGRenderer:ai,arrayMin:C,arrayMax:P,charts:Re,dateFormat:X,format:b,pathAnim:Y,getOptions:function(){return $},hasBidiBug:Le,isTouchDevice:Ce,numberFormat:y,seriesTypes:He,setOptions:function(t){return $=e(!0,$,t),E(),$},addEvent:Ze,removeEvent:Ke,createElement:g,discardElement:L,css:f,each:je,extend:t,map:Ue,merge:e,pick:p,splat:u,extendClass:m,pInt:i,wrap:x,svg:Ae,canvas:Me,vml:!Ae&&!Me,product:"Highcharts",version:"3.0.8"})}(),function(){var t=Highcharts,e=t.Chart,i=t.addEvent,n=t.createElement,r=t.discardElement,s=t.css,o=t.merge,a=t.each,l=t.extend,h=Math.max,c=document,d=window,u="ontouchstart"in c.documentElement,p=t.setOptions({lang:{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",printButtonTitle:"Print the chart"}});p.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:u?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[.4,"#F7F7F7"],[.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}},p.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}},l(e.prototype,{getSVG:function(t){var e,i,s,h,d,u,p=this,f=o(p.options,t);return c.createElementNS||(c.createElementNS=function(t,e){var i=c.createElement(e);return i.getBBox=function(){return p.renderer.Element.prototype.getBBox.apply({element:i})},i}),e=n("div",null,{position:"absolute",top:"-9999em",width:p.chartWidth+"px",height:p.chartHeight+"px"},c.body),l(f.chart,{renderTo:e,forExport:!0}),f.exporting.enabled=!1,f.chart.plotBackgroundImage=null,f.series=[],a(p.series,function(t){s=t.options,s.animation=!1,s.showCheckbox=!1,s&&s.marker&&/^url\(/.test(s.marker.symbol)&&(s.marker.symbol="circle"),s.data=[],a(t.data,function(t){h=t.config,d={x:t.x,y:t.y,name:t.name},"object"==typeof h&&t.config&&h.constructor!=Array&&l(d,h),s.data.push(d),(u=t.config&&t.config.marker)&&/^url\(/.test(u.symbol)&&delete u.symbol}),f.series.push(s)}),t=new Highcharts.Chart(f),i=t.container.innerHTML,f=null,t.destroy(),r(e),i=i.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()}),i=i.replace(/(url\(#highcharts-[0-9]+)&quot;/g,"$1").replace(/&quot;/g,"'"),2==i.match(/ xmlns="/g).length&&(i=i.replace(/xmlns="[^"]+"/,"")),i},exportChart:function(t,e){var i,s=this.getSVG(e);t=o(this.options.exporting,t),i=n("form",{method:"post",action:t.url},{display:"none"},c.body),a(["filename","type","width","svg"],function(e){n("input",{type:"hidden",name:e,value:{filename:t.filename||"chart",type:t.type,width:t.width,svg:s}[e]},null,i)}),i.submit(),r(i)},print:function(){var t=this,e=t.container,i=[],n=e.parentNode,r=c.body,s=r.childNodes;t.isPrinting||(t.isPrinting=!0,a(s,function(t,e){1==t.nodeType&&(i[e]=t.style.display,t.style.display="none")}),r.appendChild(e),d.print(),setTimeout(function(){n.appendChild(e),a(s,function(t,e){1==t.nodeType&&(t.style.display=i[e])}),t.isPrinting=!1},1e3))},contextMenu:function(e,r,o,c,d,p){var f,g,m=this,y=m.options.navigation,v=y.menuItemStyle,x=m.chartWidth,b=m.chartHeight,w="cache-"+e,k=m[w],S=h(d,p);k||(m[w]=k=n("div",{className:"highcharts-"+e},{position:"absolute",zIndex:1e3,padding:S+"px"},m.container),f=n("div",null,l({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},y.menuStyle),k),g=function(){s(k,{display:"none"})},i(k,"mouseleave",g),a(r,function(e){e&&(n("div",{onmouseover:function(){s(this,y.menuItemHoverStyle)},onmouseout:function(){s(this,v)},innerHTML:e.text||t.getOptions().lang[e.textKey]},l({cursor:"pointer"},v),f)[u?"ontouchstart":"onclick"]=function(){g(),e.onclick.apply(m,arguments)})}),m.exportMenuWidth=k.offsetWidth,m.exportMenuHeight=k.offsetHeight),e={display:"block"},o+m.exportMenuWidth>x?e.right=x-o-d-S+"px":e.left=o-S+"px",c+p+m.exportMenuHeight>b?e.bottom=b-c-S+"px":e.top=c+p-S+"px",s(k,e)},addButton:function(e){function i(){r.attr(m),n.attr(g)}var n,r,s,a=this,h=a.renderer,c=o(a.options.navigation.buttonOptions,e),d=c.onclick,u=c.menuItems,p=c.width,f=c.height;e=c.borderWidth;var g={stroke:c.borderColor},m={stroke:c.symbolStroke,fill:c.symbolFill};c.enabled!==!1&&(n=h.rect(0,0,p,f,c.borderRadius,e).align(c,!0).attr(l({fill:c.backgroundColor,"stroke-width":e,zIndex:19},g)).add(),s=h.rect(0,0,p,f,0).align(c).attr({fill:"rgba(255, 255, 255, 0.001)",title:t.getOptions().lang[c._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){r.attr({stroke:c.hoverSymbolStroke,fill:c.hoverSymbolFill}),n.attr({stroke:c.hoverBorderColor})}).on("mouseout",i).on("click",i).add(),u&&(d=function(){i();var t=s.getBBox();a.contextMenu("export-menu",u,t.x,t.y,p,f)}),s.on("click",function(){d.apply(a,arguments)}),r=h.symbol(c.symbol,c.symbolX,c.symbolY,(c.symbolSize||12)/2).align(c,!0).attr(l(m,{"stroke-width":c.symbolStrokeWidth||1,zIndex:20})).add())}}),t.Renderer.prototype.symbols.exportIcon=function(t,e,i){return["M",t-i,e+i,"L",t+i,e+i,t+i,e+.5*i,t-i,e+.5*i,"Z","M",t,e+.5*i,"L",t-.5*i,e-i/3,t-i/6,e-i/3,t-i/6,e-i,t+i/6,e-i,t+i/6,e-i/3,t+.5*i,e-i/3,"Z"]},t.Renderer.prototype.symbols.printIcon=function(t,e,i){return["M",t-i,e+.5*i,"L",t+i,e+.5*i,t+i,e-i/3,t-i,e-i/3,"Z","M",t-.5*i,e-i/3,"L",t-.5*i,e-i,t+.5*i,e-i,t+.5*i,e-i/3,"Z","M",t-.5*i,e+.5*i,"L",t-.75*i,e+i,t+.75*i,e+i,t+.5*i,e+.5*i,"Z"]},e.prototype.callbacks.push(function(t){var e,i=t.options.exporting,n=i.buttons;if(i.enabled!==!1)for(e in n)t.addButton(n[e])})}();var createWindows=function(t,e,i){return function(n){createWindowsWithData(n,t,e,i)}},updatePortletPositions=function(t,e){return function(){if(t){var i=$(this).sortable("serialize");colId=$(this).attr("id").charAt($(this).attr("id").length-1),portletArray=getPortletArray(i),jsonResult={col:colId,positions:portletArray},portletArray.length>0&&$.ajax({type:"PUT",url:"../channels/"+e+"/windows",data:{_method:"PUT",page:JSON.stringify(jsonResult)},dataType:"json"})}}},decoratePortlet=function(t){return function(){var e=$(this).find(".portlet-header");return e.append("<span id='commentBtn' class='ui-view ui-icon ui-icon-comment'></span>"),thisObject=$(this),"true"==t?(thisObject.find(".wtype").prepend("<span id='minusBtn' class='ui-toggle ui-icon ui-icon-minusthick'></span>"),thisObject.find(".wtype-chart_window").append("<span id='pencilBtn' class='ui-edit ui-icon ui-icon-pencil'></span>"),thisObject.find(".wtype").append("<span id='closeBtn' class='ui-close ui-icon ui-icon-close'></span>"),thisObject.find(".portlet-header").css("cursor","move")):$(".column").sortable({disabled:!0}),$(this).attr("id")}},uiEditClick=function(t){return function(){var e=$(this).parents(".portlet:first").attr("id").substring(8),i="";$("#chartConfig"+e).load("/channels/"+t+"/charts/"+e+"/edit",function(){i=$("#chartOptions"+e).html(),"undefined"!=i&&i.length>2&&$.each(i.split("&amp;"),setupChartForm(e)),$("#button"+e).click(function(){updateChart(e,!0,450,250,t,!0),$("#chartConfig"+e).dialog("close")})}).dialog({title:"Chart Options",modal:!0,resizable:!1,width:500,dialogClass:"dev-info-dialog"})}},uiViewClick=function(t){return function(){var e=$(this).parents(".portlet:first").find(".portlet-content").offset().left,i=$(this).parents(".portlet:first").find(".portlet-content").offset().top,n=$(this).parents(".portlet:first").attr("id").substring(8);$("body").append('<div id="iframepopup'+n+'" style="display:none"><div id="iframeinner'+n+'"style="font-size:1.2em;overflow:auto;height:115px;background-color:white"></div></div>'),$.get("/channels/"+t+"/windows/"+n+"/iframe",function(t){var e=t.replace(/id=\"iframe[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\"/,"");$("#iframeinner"+n).text(e)}),$("#iframepopup"+n).dialog({resizable:!1,width:"300px",position:[e+200,i-200],title:"Chart Iframe",dialogClass:"dev-info-dialog"})}},uiCloseClick=function(t){return function(){var e=$(this).parents(".portlet:first").attr("id").substring(8),i=$(this).parents(".portlet:first");
$.update("/channels/"+t+"/windows/"+e+"/hide",function(){i.hide("drop",function(){i.remove()})})}};!function(t){function e(){var e=i(this);return isNaN(e.datetime)||t(this).text(n(e.datetime)),this}function i(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:s.datetime(e)});var i=t.trim(e.text());i.length>0&&e.attr("title",i)}return e.data("timeago")}function n(t){return s.inWords(r(t))}function r(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return e instanceof Date?n(e):"string"==typeof e?n(t.timeago.parse(e)):n(t.timeago.datetime(e))};var s=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(e){function i(i,r){var s=t.isFunction(i)?i(r,e):i,o=n.numbers&&n.numbers[r]||r;return s.replace(/%d/i,o)}var n=this.settings.strings,r=n.prefixAgo,s=n.suffixAgo;this.settings.allowFuture&&(0>e&&(r=n.prefixFromNow,s=n.suffixFromNow),e=Math.abs(e));var o=e/1e3,a=o/60,l=a/60,h=l/24,c=h/365,d=45>o&&i(n.seconds,Math.round(o))||90>o&&i(n.minute,1)||45>a&&i(n.minutes,Math.round(a))||90>a&&i(n.hour,1)||24>l&&i(n.hours,Math.round(l))||48>l&&i(n.day,1)||30>h&&i(n.days,Math.floor(h))||60>h&&i(n.month,1)||365>h&&i(n.months,Math.floor(h/30))||2>c&&i(n.year,1)||i(n.years,Math.floor(c));return t.trim([r,d,s].join(" "))},parse:function(e){var i=t.trim(e);return i=i.replace(/\.\d\d\d+/,""),i=i.replace(/-/,"/").replace(/-/,"/"),i=i.replace(/T/," ").replace(/Z/," UTC"),i=i.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(i)},datetime:function(e){var i="time"===t(e).get(0).tagName.toLowerCase(),n=i?t(e).attr("datetime"):t(e).attr("title");return s.parse(n)}}),t.fn.timeago=function(){var t=this;t.each(e);var i=s.settings;return i.refreshMillis>0&&setInterval(function(){t.each(e)},i.refreshMillis),t},document.createElement("abbr"),document.createElement("time")}(jQuery),function(t){function e(t,e){return e.measureText(t).width}function i(t,e){return e.text(t),e.width()}var n,r,s,o=!1;t.fn.shorten=function(){var o={},a=arguments,l=a.callee;if(a.length)if(a[0].constructor==Object)o=a[0];else{if("options"==a[0])return t(this).eq(0).data("shorten-options");o={width:parseInt(a[0]),tail:a[1]}}this.css("visibility","hidden");var h=t.extend({},l.defaults,o);return this.each(function(){var a,c=t(this),d=c.text(),u=d.length,p=t("<span/>").html(h.tail).text(),f={shortened:!1,textOverflow:!1};if(a="none"!=c.css("float")?h.width||c.width():h.width||c.parent().width(),0>a)return!0;if(c.data("shorten-options",h),this.style.display="inline-block",this.style.whiteSpace="nowrap",n){var g=t(this),m=document.createElement("canvas");ctx=m.getContext("2d"),g.html(m),ctx.font=g.css("font-style")+" "+g.css("font-variant")+" "+g.css("font-weight")+" "+Math.ceil(parseFloat(g.css("font-size")))+"px "+g.css("font-family"),r=ctx,s=e}else g=t('<table style="padding:0; margin:0; border:none; font:inherit;width:auto;zoom:1;position:absolute;"><tr style="padding:0; margin:0; border:none; font:inherit;"><td style="padding:0; margin:0; border:none; font:inherit;white-space:nowrap;"></td></tr></table>'),$td=t("td",g),t(this).html(g),r=$td,s=i;if(g=s.call(this,d,r),a>g)return c.text(d),this.style.visibility="visible",c.data("shorten-info",f),!0;if(h.tooltip&&this.setAttribute("title",d),l._native&&!o.width&&(m=t("<span>"+h.tail+"</span>").text(),1==m.length&&8230==m.charCodeAt(0)))return c.text(d),this.style.overflow="hidden",this.style[l._native]="ellipsis",this.style.visibility="visible",f.shortened=!0,f.textOverflow="ellipsis",c.data("shorten-info",f),!0;p=s.call(this,p,r),a-=p,p=1.15*a,g-p>0&&(p=d.substring(0,Math.ceil(u*(p/g))),s.call(this,p,r)>a&&(d=p,u=d.length));do u--,d=d.substring(0,u);while(s.call(this,d,r)>=a);return c.html(t.trim(t("<span/>").text(d).html())+h.tail),this.style.visibility="visible",f.shortened=!0,c.data("shorten-info",f),!0})};var a=document.documentElement.style;"textOverflow"in a?o="textOverflow":"OTextOverflow"in a&&(o="OTextOverflow"),"undefined"!=typeof Modernizr&&Modernizr.canvastext?n=Modernizr.canvastext:(a=document.createElement("canvas"),n=!(!a.getContext||!a.getContext("2d")||"function"!=typeof a.getContext("2d").fillText)),t.fn.shorten._is_canvasTextSupported=n,t.fn.shorten._native=o,t.fn.shorten.defaults={tail:"&hellip;",tooltip:!0}}(jQuery),function(t){window.NestedFormEvents=function(){this.addFields=t.proxy(this.addFields,this),this.removeFields=t.proxy(this.removeFields,this)},NestedFormEvents.prototype={addFields:function(e){var i=e.currentTarget,n=t(i).data("association"),r=t("#"+t(i).data("blueprint-id")),s=r.data("blueprint"),o=(t(i).closest(".fields").closestChild("input, textarea, select").eq(0).attr("name")||"").replace(new RegExp("[[a-z_]+]$"),"");if(o)for(var a=o.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g)||[],l=o.match(/[0-9]+/g)||[],h=0;h<a.length;h++)l[h]&&(s=s.replace(new RegExp("(_"+a[h]+")_.+?_","g"),"$1_"+l[h]+"_"),s=s.replace(new RegExp("(\\["+a[h]+"\\])\\[.+?\\]","g"),"$1["+l[h]+"]"));var c=new RegExp("new_"+n,"g"),d=this.newId();s=t.trim(s.replace(c,d));var u=this.insertFields(s,n,i);return u.trigger({type:"nested:fieldAdded",field:u}).trigger({type:"nested:fieldAdded:"+n,field:u}),!1},newId:function(){return(new Date).getTime()},insertFields:function(e,i,n){var r=t(n).data("target");return r?t(e).appendTo(t(r)):t(e).insertBefore(n)},removeFields:function(e){var i=t(e.currentTarget),n=i.data("association"),r=i.prev("input[type=hidden]");r.val("1");var s=i.closest(".fields");return s.hide(),s.trigger({type:"nested:fieldRemoved",field:s}).trigger({type:"nested:fieldRemoved:"+n,field:s}),!1}},window.nestedFormEvents=new NestedFormEvents,t(document).delegate("form a.add_nested_fields","click",nestedFormEvents.addFields).delegate("form a.remove_nested_fields","click",nestedFormEvents.removeFields)}(jQuery),function(t){t.fn.closestChild=function(e){if(e&&""!=e){var i=[];for(i.push(this);i.length>0;)for(var n=i.shift(),r=n.children(),s=0;s<r.length;++s){var o=t(r[s]);if(o.is(e))return o;i.push(o)}}return t()}}(jQuery);var wloc=window.location.toString();-1!==wloc.indexOf("api")&&wloc.indexOf("api")<10&&-1===wloc.indexOf("charts")&&(window.location=wloc.replace("api","www")),function(t){function e(e,n,r,s){l={dataType:"json"},1===arguments.length&&"string"!=typeof arguments[0]?(l=t.extend(l,e),"url"in l&&"data"in l&&i(l.url,l.data)):(t.isFunction(n)&&(s=r,r=n,n=null),e=i(e,n),l=t.extend(l,{url:e,data:n,success:r,error:s}))}function i(t,e){var i,n,r;for(i in e)r=e[i],n=t.replace("{"+i+"}",r),n!=t&&(t=n,delete e[i]);return t}function n(e){return e.type=e.type||"GET","string"!=typeof e.data&&null!=e.data&&(e.data=t.param(e.data)),e.data=e.data||"",t.restSetup.csrf&&!t.isEmptyObject(t.restSetup.csrf)&&(/^(get)$/i.test(e.type)||/(authenticity_token=)/i.test(e.data)||(e.data+=(e.data?"&":"")+t.restSetup.csrfParam+"="+$restSetup.csrfToken)),/^(get|post)$/i.test(e.type)||(e.data+=(e.data?"&":"")+t.restSetup.methodParam+"="+e.type.toLowerCase(),e.type="POST"),h.call(this,e)}function r(){return e.apply(this,arguments),t.extend(l,{type:"GET"}),t.ajax(l)}function s(){return e.apply(this,arguments),t.extend(l,{type:"POST"}),t.ajax(l)}function o(){return e.apply(this,arguments),t.extend(l,{type:"PUT"}),t.ajax(l)}function a(){return e.apply(this,arguments),t.extend(l,{type:"DELETE"}),t.ajax(l)}t.restSetup={methodParam:"_method"},t(document).ready(function(){t.extend(t.restSetup,{csrfParam:t("meta[name=csrf-param]").attr("content"),csrfToken:t("meta[name=csrf-token]").attr("content")})});var l,h=t.ajax;t.extend({ajax:n,read:r,create:s,update:o,destroy:a})}(jQuery),function(t){function e(t,e,r){var s=t.scrollTop;t.setSelectionRange?i(t,e,r):document.selection&&n(t,e,r),t.scrollTop=s}function i(t,e,i){var n=t.selectionStart,r=t.selectionEnd;if(n==r)e?" "==t.value.substring(n-i.tabString.length,n)?(t.value=t.value.substring(0,n-i.tabString.length)+t.value.substring(n),t.focus(),t.setSelectionRange(n-i.tabString.length,n-i.tabString.length)):" "==t.value.substring(n,n+i.tabString.length)&&(t.value=t.value.substring(0,n)+t.value.substring(n+i.tabString.length),t.focus(),t.setSelectionRange(n,n)):(t.value=t.value.substring(0,n)+i.tabString+t.value.substring(n),t.focus(),t.setSelectionRange(n+i.tabString.length,n+i.tabString.length));else{var s=t.value.split("\n"),o=new Array,a=0,l=0;for(var h in s)l=a+s[h].length,o.push({start:a,end:l,selected:n>=a&&l>n||l>=r&&r>a||a>n&&r>l}),a=l+1;var c=0;for(var h in o)if(o[h].selected){var d=o[h].start+c;e&&i.tabString==t.value.substring(d,d+i.tabString.length)?(t.value=t.value.substring(0,d)+t.value.substring(d+i.tabString.length),c-=i.tabString.length):e||(t.value=t.value.substring(0,d)+i.tabString+t.value.substring(d),c+=i.tabString.length)}t.focus();var u=n+(c>0?i.tabString.length:0>c?-i.tabString.length:0),p=r+c;t.setSelectionRange(u,p)}}function n(e,i,n){var r=document.selection.createRange();if(e==r.parentElement())if(""==r.text)if(i){var s=r.getBookmark();r.moveStart("character",-n.tabString.length),n.tabString==r.text?r.text="":(r.moveToBookmark(s),r.moveEnd("character",n.tabString.length),n.tabString==r.text&&(r.text="")),r.collapse(!0),r.select()}else r.text=n.tabString,r.collapse(!1),r.select();else{var o=r.text,a=o.length,l=o.split("\r\n"),h=document.body.createTextRange();h.moveToElementText(e),h.setEndPoint("EndToStart",r);var c=h.text,d=c.split("\r\n"),u=c.length,p=document.body.createTextRange();p.moveToElementText(e),p.setEndPoint("StartToEnd",r);var f=p.text,g=document.body.createTextRange();g.moveToElementText(e),g.setEndPoint("StartToEnd",h);var m=g.text,y=t(e).html();t("#r3").text(u+" + "+a+" + "+f.length+" = "+y.length),u+m.length<y.length?(d.push(""),u+=2,i&&n.tabString==l[0].substring(0,n.tabString.length)?l[0]=l[0].substring(n.tabString.length):i||(l[0]=n.tabString+l[0])):i&&n.tabString==d[d.length-1].substring(0,n.tabString.length)?d[d.length-1]=d[d.length-1].substring(n.tabString.length):i||(d[d.length-1]=n.tabString+d[d.length-1]);for(var v=1;v<l.length;v++)i&&n.tabString==l[v].substring(0,n.tabString.length)?l[v]=l[v].substring(n.tabString.length):i||(l[v]=n.tabString+l[v]);1==d.length&&0==u&&(i&&n.tabString==l[0].substring(0,n.tabString.length)?l[0]=l[0].substring(n.tabString.length):i||(l[0]=n.tabString+l[0])),u+a+f.length<y.length&&(l.push(""),a+=2),h.text=d.join("\r\n"),r.text=l.join("\r\n");var x=document.body.createTextRange();x.moveToElementText(e),u>0?x.setEndPoint("StartToEnd",h):x.setEndPoint("StartToStart",h),x.setEndPoint("EndToEnd",r),x.select()}}t.fn.tabby=function(i){var n=t.extend({},t.fn.tabby.defaults,i),r=t.fn.tabby.pressed;return this.each(function(){$this=t(this);var i=t.meta?t.extend({},n,$this.data()):n;$this.bind("keydown",function(n){var s=t.fn.tabby.catch_kc(n);return 16==s&&(r.shft=!0),17==s&&(r.ctrl=!0,setTimeout("$.fn.tabby.pressed.ctrl = false;",1e3)),18==s&&(r.alt=!0,setTimeout("$.fn.tabby.pressed.alt = false;",1e3)),9!=s||r.ctrl||r.alt?void 0:(n.preventDefault,r.last=s,setTimeout("$.fn.tabby.pressed.last = null;",0),e(t(n.target).get(0),r.shft,i),!1)}).bind("keyup",function(e){16==t.fn.tabby.catch_kc(e)&&(r.shft=!1)}).bind("blur",function(e){9==r.last&&t(e.target).one("focus",function(){r.last=null}).get(0).focus()})})},t.fn.tabby.catch_kc=function(t){return t.keyCode?t.keyCode:t.charCode?t.charCode:t.which},t.fn.tabby.pressed={shft:!1,ctrl:!1,alt:!1,last:null},t.fn.tabby.defaults={tabString:String.fromCharCode(9)}}(jQuery),function(t,e,i){var n={required:"The %s field is required.",matches:"The %s field does not match the %s field.",valid_email:"The %s field must contain a valid email address.",min_length:"The %s field must be at least %s characters in length.",max_length:"The %s field must not exceed %s characters in length.",exact_length:"The %s field must be exactly %s characters in length.",greater_than:"The %s field must contain a number greater than %s.",less_than:"The %s field must contain a number less than %s.",alpha:"The %s field must only contain alphabetical characters.",alpha_numeric:"The %s field must only contain alpha-numeric characters.",alpha_dash:"The %s field must only contain alpha-numeric characters, underscores, and dashes.",numeric:"The %s field must contain only numbers.",integer:"The %s field must contain an integer."},r=function(){},s=/^(.+)\[(.+)\]$/,o=/^[0-9]+$/,a=/^\-?[0-9]+$/,l=/^\-?[0-9]*\.?[0-9]+$/,h=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,6}$/i,c=/^[a-z]+$/i,d=/^[a-z0-9]+$/i,u=/^[a-z0-9_-]+$/i,p=function(t,i,n){for(this.callback=n||r,this.errors=[],this.fields={},this.form=e.forms[t]||{},this.messages={},this.handlers={},t=0,n=i.length;n>t;t++){var s=i[t];s.name&&s.rules&&(this.fields[s.name]={name:s.name,display:s.display||s.name,rules:s.rules,type:null,value:null,checked:null})}this.form.onsubmit=function(t){return function(e){try{return t._validateForm(e)}catch(i){}}}(this)};p.prototype.setMessage=function(t,e){return this.messages[t]=e,this},p.prototype.registerCallback=function(t,e){return t&&"string"==typeof t&&e&&"function"==typeof e&&(this.handlers[t]=e),this},p.prototype._validateForm=function(t){this.errors=[];for(var e in this.fields)if(this.fields.hasOwnProperty(e)){var n=this.fields[e]||{},r=this.form[n.name];r&&r!==i&&(n.type=r.type,n.value=r.value,n.checked=r.checked),this._validateField(n)}if("function"==typeof this.callback&&this.callback(this.errors,t),this.errors.length>0){if(!t||!t.preventDefault)return!1;t.preventDefault()}return!0},p.prototype._validateField=function(t){var e=t.rules.split("|");if(-1!==t.rules.indexOf("required")||t.value&&""!==t.value&&t.value!==i)for(var r=0,o=e.length;o>r;r++){var a=e[r],l=null,h=!1;if((parts=s.exec(a))&&(a=parts[1],l=parts[2]),"function"==typeof this._hooks[a]?this._hooks[a].apply(this,[t,l])||(h=!0):"callback_"===a.substring(0,9)&&(a=a.substring(9,a.length),"function"==typeof this.handlers[a]&&this.handlers[a].apply(this,[t.value])===!1&&(h=!0)),h){(e=this.messages[a]||n[a])?(t=e.replace("%s",t.display),l&&(t=t.replace("%s",this.fields[l]?this.fields[l].display:l)),this.errors.push(t)):this.errors.push("An error has occurred with the "+t.display+" field.");break}}},p.prototype._hooks={required:function(t){var e=t.value;return"checkbox"===t.type?t.checked===!0:null!==e&&""!==e},matches:function(t,e){return(el=this.form[e])?t.value===el.value:!1},valid_email:function(t){return h.test(t.value)},min_length:function(t,e){return o.test(e)?t.value.length>=e:!1},max_length:function(t,e){return o.test(e)?t.value.length<=e:!1},exact_length:function(t,e){return o.test(e)?t.value.length==e:!1},greater_than:function(t,e){return l.test(t.value)?parseFloat(t.value)>parseFloat(e):!1},less_than:function(t,e){return l.test(t.value)?parseFloat(t.value)<parseFloat(e):!1},alpha:function(t){return c.test(t.value)},alpha_numeric:function(t){return d.test(t.value)},alpha_dash:function(t){return u.test(t.value)},numeric:function(t){return l.test(t.value)},integer:function(t){return a.test(t.value)}},t.FormValidator=p}(window,document),$(function(){$("[id^=showsite]").each(function(){var t=this;$(t).shorten({width:235,tooltip:!0,tail:"..."})}),$("div.progressbar").each(function(){var t=this;$(t).progressbar({value:parseInt($(t).attr("rel"))})})}),$(window).load(function(){$.fn.affix&&(setTimeout(function(){$("#bootstrap-sidebar").affix()},100),$(document.body).scrollspy({target:"#leftcol",offset:300}),$("#bootstrap-sidebar li a[href^='#']").on("click",function(t){t.preventDefault();var e=this.hash;$("html, body").animate({scrollTop:$(this.hash).offset().top-90},300,function(){window.location.hash=e})}))});var q=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function t(t){function e(t){var e=t.charCodeAt(0);if(92!==e)return e;var i=t.charAt(1);return(e=d[i])?e:i>="0"&&"7">=i?parseInt(t.substring(1),8):"u"===i||"x"===i?parseInt(t.substring(2),16):t.charCodeAt(1)}function i(t){return 32>t?(16>t?"\\x0":"\\x")+t.toString(16):(t=String.fromCharCode(t),("\\"===t||"-"===t||"["===t||"]"===t)&&(t="\\"+t),t)}function n(t){for(var n=t.substring(1,t.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),t=[],r=[],s="^"===n[0],o=s?1:0,a=n.length;a>o;++o){var l=n[o];if(/\\[bdsw]/i.test(l))t.push(l);else{var h,l=e(l);a>o+2&&"-"===n[o+1]?(h=e(n[o+2]),o+=2):h=l,r.push([l,h]),65>h||l>122||(65>h||l>90||r.push([32|Math.max(65,l),32|Math.min(h,90)]),97>h||l>122||r.push([-33&Math.max(97,l),-33&Math.min(h,122)]))}}for(r.sort(function(t,e){return t[0]-e[0]||e[1]-t[1]}),n=[],l=[0/0,0/0],o=0;o<r.length;++o)a=r[o],a[0]<=l[1]+1?l[1]=Math.max(l[1],a[1]):n.push(l=a);for(r=["["],s&&r.push("^"),r.push.apply(r,t),o=0;o<n.length;++o)a=n[o],r.push(i(a[0])),a[1]>a[0]&&(a[1]+1>a[0]&&r.push("-"),r.push(i(a[1])));return r.push("]"),r.join("")}function r(t){for(var e=t.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),i=e.length,r=[],a=0,l=0;i>a;++a){var h=e[a];"("===h?++l:"\\"===h.charAt(0)&&(h=+h.substring(1))&&l>=h&&(r[h]=-1)}for(a=1;a<r.length;++a)-1===r[a]&&(r[a]=++s);for(l=a=0;i>a;++a)h=e[a],"("===h?(++l,void 0===r[l]&&(e[a]="(?:")):"\\"===h.charAt(0)&&(h=+h.substring(1))&&l>=h&&(e[a]="\\"+r[l]);for(l=a=0;i>a;++a)"^"===e[a]&&"^"!==e[a+1]&&(e[a]="");if(t.ignoreCase&&o)for(a=0;i>a;++a)h=e[a],t=h.charAt(0),h.length>=2&&"["===t?e[a]=n(h):"\\"!==t&&(e[a]=h.replace(/[A-Za-z]/g,function(t){return t=t.charCodeAt(0),"["+String.fromCharCode(-33&t,32|t)+"]"}));return e.join("")}for(var s=0,o=!1,a=!1,l=0,h=t.length;h>l;++l){var c=t[l];if(c.ignoreCase)a=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){o=!0,a=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},u=[],l=0,h=t.length;h>l;++l){if(c=t[l],c.global||c.multiline)throw Error(""+c);u.push("(?:"+r(c)+")")}return RegExp(u.join("|"),a?"gi":"g")}function e(t){function e(t){switch(t.nodeType){case 1:if(n.test(t.className))break;for(var i=t.firstChild;i;i=i.nextSibling)e(i);i=t.nodeName,("BR"===i||"LI"===i)&&(r[a]="\n",o[a<<1]=s++,o[a++<<1|1]=t);break;case 3:case 4:i=t.nodeValue,i.length&&(i=l?i.replace(/\r\n?/g,"\n"):i.replace(/[\t\n\r ]+/g," "),r[a]=i,o[a<<1]=s,s+=i.length,o[a++<<1|1]=t)}}var i,n=/(?:^|\s)nocode(?:\s|$)/,r=[],s=0,o=[],a=0;t.currentStyle?i=t.currentStyle.whiteSpace:window.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,q).getPropertyValue("white-space"));var l=i&&"pre"===i.substring(0,3);return e(t),{a:r.join("").replace(/\n$/,""),c:o}}function i(t,e,i,n){e&&(t={a:e,d:t},i(t),n.push.apply(n,t.e))}function n(e,n){function r(t){for(var e=t.d,h=[e,"pln"],c=0,d=t.a.match(s)||[],u={},p=0,f=d.length;f>p;++p){var g,m=d[p],y=u[m],v=void 0;if("string"==typeof y)g=!1;else{var x=o[m.charAt(0)];if(x)v=m.match(x[1]),y=x[0];else{for(g=0;l>g;++g)if(x=n[g],v=m.match(x[1])){y=x[0];break}v||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||v&&"string"==typeof v[1]||(g=!1,y="src"),g||(u[m]=y)}if(x=c,c+=m.length,g){g=v[1];var b=m.indexOf(g),w=b+g.length;v[2]&&(w=m.length-v[2].length,b=w-g.length),y=y.substring(5),i(e+x,m.substring(0,b),r,h),i(e+x+b,g,a(y,g),h),i(e+x+w,m.substring(w),r,h)}else h.push(e+x,y)}t.e=h}var s,o={};!function(){for(var i=e.concat(n),r=[],a={},l=0,h=i.length;h>l;++l){var c=i[l],d=c[3];if(d)for(var u=d.length;--u>=0;)o[d.charAt(u)]=c;c=c[1],d=""+c,a.hasOwnProperty(d)||(r.push(c),a[d]=q)}r.push(/[\S\s]/),s=t(r)}();var l=n.length;return r}function r(t){var e=[],i=[];t.tripleQuotedStrings?e.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):t.multiLineStrings?e.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):e.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),t.verbatimStrings&&i.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var r=t.hashComments;return r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):e.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),i.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):e.push(["com",/^#[^\n\r]*/,q,"#"])),t.cStyleComments&&(i.push(["com",/^\/\/[^\n\r]*/,q]),i.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),t.regexLiterals&&i.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(r=t.types)&&i.push(["typ",r]),t=(""+t.keywords).replace(/^ | $/g,""),t.length&&i.push(["kwd",RegExp("^(?:"+t.replace(/[\s,]+/g,"|")+")\\b"),q]),e.push(["pln",/^\s+/,q," \r\n  "]),i.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),n(e,i)}function s(t,e){function i(t){switch(t.nodeType){case 1:if(s.test(t.className))break;if("BR"===t.nodeName)n(t),t.parentNode&&t.parentNode.removeChild(t);else for(t=t.firstChild;t;t=t.nextSibling)i(t);break;case 3:case 4:if(l){var e=t.nodeValue,r=e.match(o);if(r){var h=e.substring(0,r.index);t.nodeValue=h,(e=e.substring(r.index+r[0].length))&&t.parentNode.insertBefore(a.createTextNode(e),t.nextSibling),n(t),h||t.parentNode.removeChild(t)}}}}function n(t){function e(t,i){var n=i?t.cloneNode(!1):t,r=t.parentNode;if(r){var r=e(r,1),s=t.nextSibling;r.appendChild(n);for(var o=s;o;o=s)s=o.nextSibling,r.appendChild(o)}return n}for(;!t.nextSibling;)if(t=t.parentNode,!t)return;for(var i,t=e(t.nextSibling,0);(i=t.parentNode)&&1===i.nodeType;)t=i;h.push(t)}var r,s=/(?:^|\s)nocode(?:\s|$)/,o=/\r\n?|\n/,a=t.ownerDocument;t.currentStyle?r=t.currentStyle.whiteSpace:window.getComputedStyle&&(r=a.defaultView.getComputedStyle(t,q).getPropertyValue("white-space"));var l=r&&"pre"===r.substring(0,3);for(r=a.createElement("LI");t.firstChild;)r.appendChild(t.firstChild);for(var h=[r],c=0;c<h.length;++c)i(h[c]);e===(0|e)&&h[0].setAttribute("value",e);var d=a.createElement("OL");d.className="linenums";for(var u=Math.max(0,e-1|0)||0,c=0,p=h.length;p>c;++c)r=h[c],r.className="L"+(c+u)%10,r.firstChild||r.appendChild(a.createTextNode(" ")),d.appendChild(r);t.appendChild(d)}function o(t,e){for(var i=e.length;--i>=0;){var n=e[i];x.hasOwnProperty(n)?window.console&&console.warn("cannot override language handler %s",n):x[n]=t}}function a(t,e){return t&&x.hasOwnProperty(t)||(t=/^\s*</.test(e)?"default-markup":"default-code"),x[t]}function l(t){var i=t.g;try{var n=e(t.h),r=n.a;t.a=r,t.c=n.c,t.d=0,a(i,r)(t);var s=/\bMSIE\b/.test(navigator.userAgent),i=/\n/g,o=t.a,l=o.length,n=0,h=t.c,c=h.length,r=0,d=t.e,u=d.length,t=0;d[u]=l;var p,f;for(f=p=0;u>f;)d[f]!==d[f+2]?(d[p++]=d[f++],d[p++]=d[f++]):f+=2;for(u=p,f=p=0;u>f;){for(var g=d[f],m=d[f+1],y=f+2;u>=y+2&&d[y+1]===m;)y+=2;d[p++]=g,d[p++]=m,f=y}for(d.length=p;c>r;){var v,x=h[r+2]||l,b=d[t+2]||l,y=Math.min(x,b),w=h[r+1];if(1!==w.nodeType&&(v=o.substring(n,y))){s&&(v=v.replace(i,"\r")),w.nodeValue=v;var k=w.ownerDocument,S=k.createElement("SPAN");S.className=d[t+1];var T=w.parentNode;T.replaceChild(S,w),S.appendChild(w),x>n&&(h[r+1]=w=k.createTextNode(o.substring(y,x)),T.insertBefore(w,S.nextSibling))}n=y,n>=x&&(r+=2),n>=b&&(t+=2)}}catch(C){"console"in window&&console.log(C&&C.stack?C.stack:C)}}var h=["break,continue,do,else,for,if,return,while"],c=[[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[c,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[c,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],p=[u,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],c=[c,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],f=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],g=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],h=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],m=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,y=/\S/,v=r({keywords:[d,p,c,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+f,g,h],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),x={};o(v,["default-code"]),o(n([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),o(n([["pln",/^\s+/,q," \r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),o(n([],[["atv",/^[\S\s]+/]]),["uq.val"]),o(r({keywords:d,hashComments:!0,cStyleComments:!0,types:m}),["c","cc","cpp","cxx","cyc","m"]),o(r({keywords:"null,true,false"}),["json"]),o(r({keywords:p,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:m}),["cs"]),o(r({keywords:u,cStyleComments:!0}),["java"]),o(r({keywords:h,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),o(r({keywords:f,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),o(r({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),o(r({keywords:g,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),o(r({keywords:c,cStyleComments:!0,regexLiterals:!0}),["js"]),o(r({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),o(n([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(t,e,i){var n=document.createElement("PRE");return n.innerHTML=t,i&&s(n,i),l({g:e,i:i,h:n}),n.innerHTML},window.prettyPrint=function(t){function e(){for(var i=window.PR_SHOULD_USE_CONTINUATION?h.now()+250:1/0;d<n.length&&h.now()<i;d++){var r=n[d],o=r.className;if(o.indexOf("prettyprint")>=0){var a,p,o=o.match(u);if(p=!o){p=r;for(var f=void 0,g=p.firstChild;g;g=g.nextSibling)var m=g.nodeType,f=1===m?f?p:g:3===m?y.test(g.nodeValue)?p:f:f;p=(a=f===p?void 0:f)&&"CODE"===a.tagName}for(p&&(o=a.className.match(u)),o&&(o=o[1]),p=!1,f=r.parentNode;f;f=f.parentNode)if(("pre"===f.tagName||"code"===f.tagName||"xmp"===f.tagName)&&f.className&&f.className.indexOf("prettyprint")>=0){p=!0;break}p||((p=(p=r.className.match(/\blinenums\b(?::(\d+))?/))?p[1]&&p[1].length?+p[1]:!0:!1)&&s(r,p),c={g:o,h:r,i:p},l(c))}}d<n.length?setTimeout(e,250):t&&t()}for(var i=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],n=[],r=0;r<i.length;++r)for(var o=0,a=i[r].length;a>o;++o)n.push(i[r][o]);var i=q,h=Date;h.now||(h={now:function(){return+new Date}});var c,d=0,u=/\blang(?:uage)?-([\w.]+)(?!\S)/;e()},window.PR={createSimpleLexer:n,registerLangHandler:o,sourceDecorator:r,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}(),!function(t){t(function(){window.prettyPrint&&prettyPrint()})}(window.jQuery),$(document).ready(function(){$(".response").click(function(){var t=$(this).data("response_type");$(".response").removeClass("active"),$(".response-"+t).addClass("active"),$(".format").hide(),$(".format-"+t).show()})}),$(document).ready(function(){$(".flash").length>0&&($(".flash").on("click",function(){$(this).hide("slow")}),setTimeout(function(){$(".flash").length>0&&$(".flash").hide("slow")},15e3)),$("#talkback_command_add").click(function(){$(this).hide(),$("#talkback_command_add_form").removeClass("hide")}),$("#contact_link").click(function(){$("#contact_form").toggle()})});