From 6f3a98d17e6ae49805aa9dc148c3e856ff51f92e Mon Sep 17 00:00:00 2001 From: guimoz Date: Mon, 30 Jan 2017 00:58:56 +0100 Subject: [PATCH] Ajout graphe + correctio logo precampagne --- roulette.py | 25 ++- static/highcharts-custom.js | 290 ++++++++++++++++++++++++++++++ templates/home.html | 46 ++--- templates/layout.html | 1 + templates/layout_precampagne.html | 43 +++++ templates/not_subscribed.html | 2 +- templates/precampagne.html | 2 +- 7 files changed, 383 insertions(+), 26 deletions(-) create mode 100644 static/highcharts-custom.js create mode 100644 templates/layout_precampagne.html diff --git a/roulette.py b/roulette.py index 38fa42c..94d9991 100644 --- a/roulette.py +++ b/roulette.py @@ -306,11 +306,11 @@ def banned(): def banned_ip(): #Actualisation de l'etat de la roulette with open(STATE_FILE, 'r') as f: - global STATE + global STATE STATE = f.read() if DEBUG : print(STATE) - + # Liste des ip pour récupération par babel et plop if not DEBUG: if get_ip() not in ['10.7.0.254']: @@ -367,7 +367,26 @@ def home(): bans_hist.append(entry) - return render_template('home.html', bans_hist=bans_hist) + con = connect_sqlite() + cur = con.cursor() + + cur.execute("""select firstname,name,ban_end from players""", [time()]) + + rows = cur.fetchall() + con.close() + tranchés = 0 + n_tranchés = 0 + with open(IMMUNITY_FILE, 'r') as f: + immunity = f.read() + for row in rows: + if row[0]+' '+row[1] not in immunity: + if row[2] > time(): + tranchés += 1 + else: + n_tranchés += 1 + + stats = (tranchés,n_tranchés) + return render_template('home.html', bans_hist=bans_hist, stats=stats) else: return render_template('precampagne.html', user=player) diff --git a/static/highcharts-custom.js b/static/highcharts-custom.js new file mode 100644 index 0000000..a146470 --- /dev/null +++ b/static/highcharts-custom.js @@ -0,0 +1,290 @@ +/* + Highcharts JS v5.0.7 custom build (2017-01-29) + + (c) 2009-2016 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(Q,a){"object"===typeof module&&module.exports?module.exports=Q.document?a(Q):a:Q.Highcharts=a(Q)})("undefined"!==typeof window?window:this,function(Q){Q=function(){var a=window,y=a.document,I=a.navigator&&a.navigator.userAgent||"",E=y&&y.createElementNS&&!!y.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,K=/(edge|msie|trident)/i.test(I)&&!window.opera,c=!E,d=/Firefox/.test(I),p=d&&4>parseInt(I.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts", +version:"5.0.7 custom build",deg2rad:2*Math.PI/360,doc:y,hasBidiBug:p,hasTouch:y&&void 0!==y.documentElement.ontouchstart,isMS:K,isWebKit:/AppleWebKit/.test(I),isFirefox:d,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(I),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:E,vml:c,win:a,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}();(function(a){var y=[],I=a.charts,E=a.doc,K=a.win;a.error=function(c,d){c=a.isNumber(c)? +"Highcharts error #"+c+": www.highcharts.com/errors/"+c:c;if(d)throw Error(c);K.console&&console.log(c)};a.Fx=function(a,d,p){this.options=d;this.elem=a;this.prop=p};a.Fx.prototype={dSetter:function(){var a=this.paths[0],d=this.paths[1],p=[],r=this.now,n=a.length,t;if(1===r)p=this.toD;else if(n===d.length&&1>r)for(;n--;)t=parseFloat(a[n]),p[n]=isNaN(t)?a[n]:r*parseFloat(d[n]-t)+t;else p=d;this.elem.attr("d",p,null,!0)},update:function(){var a=this.elem,d=this.prop,p=this.now,r=this.options.step;if(this[d+ +"Setter"])this[d+"Setter"]();else a.attr?a.element&&a.attr(d,p,null,!0):a.style[d]=p+this.unit;r&&r.call(a,p,this)},run:function(a,d,p){var c=this,n=function(a){return n.stopped?!1:c.step(a)},t;this.startTime=+new Date;this.start=a;this.end=d;this.unit=p;this.now=this.start;this.pos=0;n.elem=this.elem;n.prop=this.prop;n()&&1===y.push(n)&&(n.timerId=setInterval(function(){for(t=0;t=t+this.startTime){this.now=this.end;this.pos=1;this.update();a=m[this.prop]=!0;for(b in m)!0!==m[b]&&(a=!1);a&&n&&n.call(p);p=!1}else this.pos=r.easing((c-this.startTime)/t),this.now=this.start+(this.end-this.start)*this.pos,this.update(),p=!0;return p},initPath:function(c,d,p){function r(a){var e,b;for(u=a.length;u--;)e="M"===a[u]||"L"===a[u],b=/[a-zA-Z]/.test(a[u+3]),e&&b&&a.splice(u+1,0,a[u+1],a[u+ +2],a[u+1],a[u+2])}function n(a,e){for(;a.lengthm?"AM":"PM",P:12>m?"am":"pm",S:w(n.getSeconds()),L:w(Math.round(d% +1E3),3)},a.dateFormats);for(t in r)for(;-1!==c.indexOf("%"+t);)c=c.replace("%"+t,"function"===typeof r[t]?r[t](d):r[t]);return p?c.substr(0,1).toUpperCase()+c.substr(1):c};a.formatSingle=function(c,d){var p=/\.([0-9])/,r=a.defaultOptions.lang;/f$/.test(c)?(p=(p=c.match(p))?p[1]:-1,null!==d&&(d=a.numberFormat(d,p,r.decimalPoint,-1=p&&(d=[1/p]))); +for(r=0;r=c||!n&&t<=(d[r]+(d[r+1]||d[r]))/2);r++);return m=a.correctFloat(m*p,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,d){var c=a.length,r,n;for(n=0;nc&&(c=a[d]);return c};a.destroyObjectProperties= +function(a,d){for(var c in a)a[c]&&a[c]!==d&&a[c].destroy&&a[c].destroy(),delete a[c]};a.discardElement=function(c){var d=a.garbageBin;d||(d=a.createElement("div"));c&&d.appendChild(c);d.innerHTML=""};a.correctFloat=function(a,d){return parseFloat(a.toPrecision(d||14))};a.setAnimation=function(c,d){d.renderer.globalAnimation=a.pick(c,d.options.chart.animation,!0)};a.animObject=function(c){return a.isObject(c)?a.merge(c):{duration:c?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5, +day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(c,d,p,r){c=+c||0;d=+d;var n=a.defaultOptions.lang,t=(c.toString().split(".")[1]||"").length,m,b;-1===d?d=Math.min(t,20):a.isNumber(d)||(d=2);b=(Math.abs(c)+Math.pow(10,-Math.max(d,t)-1)).toFixed(d);t=String(a.pInt(b));m=3c?"-":"")+(m?t.substr(0,m)+r:"");c+=t.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r);d&&(c+=p+b.slice(-d));return c};Math.easeInOutSine= +function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(c,d){return"width"===d?Math.min(c.offsetWidth,c.scrollWidth)-a.getStyle(c,"padding-left")-a.getStyle(c,"padding-right"):"height"===d?Math.min(c.offsetHeight,c.scrollHeight)-a.getStyle(c,"padding-top")-a.getStyle(c,"padding-bottom"):(c=K.getComputedStyle(c,void 0))&&a.pInt(c.getPropertyValue(d))};a.inArray=function(a,d){return d.indexOf?d.indexOf(a):[].indexOf.call(d,a)};a.grep=function(a,d){return[].filter.call(a,d)};a.find=function(a, +d){return[].find.call(a,d)};a.map=function(a,d){for(var c=[],r=0,n=a.length;rd;d++)r[d]+=c(255*a),0>r[d]&&(r[d]=0),255f.width)f={width:0,height:0}}else f=this.htmlGetBBox();l.isSVG&&(g=f.width,l=f.height,e&&"11px"===e.fontSize&&17===Math.round(l)&&(f.height=l=14),a&&(f.width=Math.abs(l*Math.sin(v))+Math.abs(g*Math.cos(v)),f.height=Math.abs(l*Math.cos(v))+Math.abs(g*Math.sin(v))));if(k&&0]*>/g,"")))},textSetter:function(g){g!==this.textStr&&(delete this.bBox, +this.textStr=g,this.added&&this.renderer.buildText(this))},fillSetter:function(g,a,f){"string"===typeof g?f.setAttribute(a,g):g&&this.colorGradient(g,a,f)},visibilitySetter:function(g,a,f){"inherit"===g?f.removeAttribute(a):f.setAttribute(a,g)},zIndexSetter:function(g,a){var f=this.renderer,l=this.parentGroup,b=(l||f).element||f.box,v,e=this.element,q;v=this.added;var h;t(g)&&(e.zIndex=g,g=+g,this[a]===g&&(v=!1),this[a]=g);if(v){(g=this.zIndex)&&l&&(l.handleZ=!0);a=b.childNodes;for(h=0;hg||!t(g)&&t(v)||0>g&&!t(v)&&b!==f.box)&&(b.insertBefore(e,l),q=!0);q||b.appendChild(e)}return q},_defaultSetter:function(g,a,f){f.setAttribute(a,g)}};y.prototype.yGetter=y.prototype.xGetter;y.prototype.translateXSetter=y.prototype.translateYSetter=y.prototype.rotationSetter=y.prototype.verticalAlignSetter=y.prototype.scaleXSetter=y.prototype.scaleYSetter=function(a,f){this[f]=a;this.doTransform=!0};y.prototype["stroke-widthSetter"]=y.prototype.strokeSetter=function(a, +f,l){this[f]=a;this.stroke&&this["stroke-width"]?(y.prototype.fillSetter.call(this,this.stroke,"stroke",l),l.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===f&&0===a&&this.hasStroke&&(l.removeAttribute("stroke"),this.hasStroke=!1)};I=a.SVGRenderer=function(){this.init.apply(this,arguments)};I.prototype={Element:y,SVG_NS:O,init:function(a,f,l,b,e,h){var g;b=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(b));g=b.element; +a.appendChild(g);-1===a.innerHTML.indexOf("xmlns")&&c(g,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=g;this.boxWrapper=b;this.alignedObjects=[];this.url=(M||q)&&k.getElementsByTagName("base").length?R.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(k.createTextNode("Created with Highcharts 5.0.7 custom build"));this.defs=this.createElement("defs").add();this.allowHTML=h;this.forExport= +e;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(f,l,!1);var v;M&&a.getBoundingClientRect&&(f=function(){r(a,{left:0,top:0});v=a.getBoundingClientRect();r(a,{left:Math.ceil(v.left)-v.left+"px",top:Math.ceil(v.top)-v.top+"px"})},f(),this.unSubPixelFix=E(R,"resize",f))},getStyle:function(a){return this.style=F({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))}, +isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();b(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:A,getRadialAttr:function(a,f){return{cx:a[0]-a[2]/2+f.cx*a[2],cy:a[1]-a[2]/2+f.cy*a[2],r:f.r*a[2]}},buildText:function(a){var g= +a.element,f=this,l=f.forExport,b=B(a.textStr,"").toString(),q=-1!==b.indexOf("\x3c"),h=g.childNodes,d,u,w,m,z=c(g,"x"),A=a.styles,n=a.textWidth,t=A&&A.lineHeight,P=A&&A.textOutline,F=A&&"ellipsis"===A.textOverflow,R=A&&"nowrap"===A.whiteSpace,p=A&&A.fontSize,H,G=h.length,A=n&&!a.added&&this.box,C=function(a){var l;l=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:p||f.style.fontSize||12;return t?D(t):f.fontMetrics(l,a.getAttribute("style")?a:g).h};H=[b,F,R,t,P,p,n].join();if(H!==a.textCache){for(a.textCache= +H;G--;)g.removeChild(h[G]);q||P||F||n||-1!==b.indexOf(" ")?(d=/<.*class="([^"]+)".*>/,u=/<.*style="([^"]+)".*>/,w=/<.*href="(http[^"]+)".*>/,A&&A.appendChild(g),b=q?b.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e').replace(//g,"\x3c/span\x3e").split(//g):[b],b=e(b,function(a){return""!==a}),x(b,function(b,e){var v,q=0;b=b.replace(/^\s+|\s+$/g,"").replace(//g,"\x3c/span\x3e|||");v=b.split("|||");x(v,function(b){if(""!==b||1===v.length){var h={},J=k.createElementNS(f.SVG_NS,"tspan"),A,S;d.test(b)&&(A=b.match(d)[1],c(J,"class",A));u.test(b)&&(S=b.match(u)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),c(J,"style",S));w.test(b)&&!l&&(c(J,"onclick",'location.href\x3d"'+b.match(w)[1]+'"'),r(J,{cursor:"pointer"}));b=(b.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==b){J.appendChild(k.createTextNode(b)); +q?h.dx=0:e&&null!==z&&(h.x=z);c(J,h);g.appendChild(J);!q&&e&&(!L&&l&&r(J,{display:"block"}),c(J,"dy",C(J)));if(n){h=b.replace(/([^\^])-/g,"$1- ").split(" ");A=1n,void 0===m&&(m=x),F&&m?(p/=2,""===T||!x&&.5>p?h=[]:(T=b.substring(0,T.length+(x?-1:1)*Math.ceil(p)),h=[T+(3n&&(n=B)),h.length&&J.appendChild(k.createTextNode(h.join(" ").replace(/- /g,"-")));a.rotation=P}q++}}})}),m&&a.attr("title",a.textStr),A&&A.removeChild(g),P&&a.applyTextOutline&&a.applyTextOutline(P)):g.appendChild(k.createTextNode(b.replace(/</g,"\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a= +p(a).rgba;return 510l?e>f+h&&eq?e>f+h&&eb&&q>a+h&&qe&&q>a+h&&qa?a+3:Math.round(1.2*a);return{h:f,b:Math.round(.8*f),f:a}},rotCorr:function(a,f,l){var g=a;f&&l&&(g=Math.max(g*Math.cos(f*m),4));return{x:-a/3*Math.sin(f*m),y:g}},label:function(a,l,b,e,h,q,d,u,k){var g=this,v=g.g("button"!==k&&"label"),c=v.text=g.text("",0,0,d).attr({zIndex:1}),L,O,w=0,A=3, +m=0,n,J,B,D,P,S={},r,R,p=/^url\((.*?)\)$/.test(e),H=p,G,C,M,N;k&&v.addClass("highcharts-"+k);H=p;G=function(){return(r||0)%2/2};C=function(){var a=c.element.style,f={};O=(void 0===n||void 0===J||P)&&t(c.textStr)&&c.getBBox();v.width=(n||O.width||0)+2*A+m;v.height=(J||O.height||0)+2*A;R=A+g.fontMetrics(a&&a.fontSize,c).b;H&&(L||(v.box=L=g.symbols[e]||p?g.symbol(e):g.rect(),L.addClass(("button"===k?"":"highcharts-label-box")+(k?" highcharts-"+k+"-box":"")),L.add(v),a=G(),f.x=a,f.y=(u?-R:0)+a),f.width= +Math.round(v.width),f.height=Math.round(v.height),L.attr(F(f,S)),S={})};M=function(){var a=m+A,f;f=u?0:R;t(n)&&O&&("center"===P||"right"===P)&&(a+={center:.5,right:1}[P]*(n-O.width));if(a!==c.x||f!==c.y)c.attr("x",a),void 0!==f&&c.attr("y",f);c.x=a;c.y=f};N=function(a,f){L?L.attr(a,f):S[a]=f};v.onAdd=function(){c.add(v);v.attr({text:a||0===a?a:"",x:l,y:b});L&&t(h)&&v.attr({anchorX:h,anchorY:q})};v.widthSetter=function(a){n=a};v.heightSetter=function(a){J=a};v["text-alignSetter"]=function(a){P=a}; +v.paddingSetter=function(a){t(a)&&a!==A&&(A=v.padding=a,M())};v.paddingLeftSetter=function(a){t(a)&&a!==m&&(m=a,M())};v.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==w&&(w=a,O&&v.attr({x:B}))};v.textSetter=function(a){void 0!==a&&c.textSetter(a);C();M()};v["stroke-widthSetter"]=function(a,f){a&&(H=!0);r=this["stroke-width"]=a;N(f,a)};v.strokeSetter=v.fillSetter=v.rSetter=function(a,f){"fill"===f&&a&&(H=!0);N(f,a)};v.anchorXSetter=function(a,f){h=a;N(f,Math.round(a)-G()-B)};v.anchorYSetter= +function(a,f){q=a;N(f,a-D)};v.xSetter=function(a){v.x=a;w&&(a-=w*((n||O.width)+2*A));B=Math.round(a);v.attr("translateX",B)};v.ySetter=function(a){D=v.y=Math.round(a);v.attr("translateY",D)};var T=v.css;return F(v,{css:function(a){if(a){var f={};a=z(a);x(v.textProps,function(g){void 0!==a[g]&&(f[g]=a[g],delete a[g])});c.css(f)}return T.call(v,a)},getBBox:function(){return{width:O.width+2*A,height:O.height+2*A,x:O.x-A,y:O.y-A}},shadow:function(a){a&&(C(),L&&L.shadow(a));return v},destroy:function(){f(v.element, +"mouseenter");f(v.element,"mouseleave");c&&(c=c.destroy());L&&(L=L.destroy());y.prototype.destroy.call(v);v=g=C=M=N=null}})}};a.Renderer=I})(Q);(function(a){var y=a.attr,I=a.createElement,E=a.css,K=a.defined,c=a.each,d=a.extend,p=a.isFirefox,r=a.isMS,n=a.isWebKit,t=a.pInt,m=a.SVGRenderer,b=a.win,k=a.wrap;d(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace= +"nowrap",a.overflow="hidden");this.styles=d(this.styles,a);E(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,h=this.translateX||0,e=this.translateY||0,d=this.x||0,k=this.y||0,m=this.textAlign||"left",r={left:0,center:.5,right:1}[m],p=this.styles;E(b,{marginLeft:h,marginTop:e}); +this.shadows&&c(this.shadows,function(a){E(a,{marginLeft:h+1,marginTop:e+1})});this.inverted&&c(b.childNodes,function(e){a.invertChild(e,b)});if("SPAN"===b.tagName){var N=this.rotation,C=t(this.textWidth),q=p&&p.whiteSpace,z=[N,m,b.innerHTML,this.textWidth,this.textAlign].join();z!==this.cTT&&(p=a.fontMetrics(b.style.fontSize).b,K(N)&&this.setSpanRotation(N,r,p),E(b,{width:"",whiteSpace:q||"nowrap"}),b.offsetWidth>C&&/[ \-]/.test(b.textContent||b.innerText)&&E(b,{width:C+"px",display:"block",whiteSpace:q|| +"normal"}),this.getSpanCorrection(b.offsetWidth,p,r,N,m));E(b,{left:d+(this.xCorr||0)+"px",top:k+(this.yCorr||0)+"px"});n&&(p=b.offsetHeight);this.cTT=z}}else this.alignOnAdd=!0},setSpanRotation:function(a,d,h){var e={},c=r?"-ms-transform":n?"-webkit-transform":p?"MozTransform":b.opera?"-o-transform":"";e[c]=e.transform="rotate("+a+"deg)";e[c+(p?"Origin":"-origin")]=e.transformOrigin=100*d+"% "+h+"px";E(this.element,e)},getSpanCorrection:function(a,b,h){this.xCorr=-a*h;this.yCorr=-b}});d(m.prototype, +{html:function(a,b,h){var e=this.createElement("span"),u=e.element,w=e.renderer,m=w.isSVG,n=function(a,b){c(["opacity","visibility"],function(e){k(a,e+"Setter",function(a,e,h,d){a.call(this,e,h,d);b[h]=e})})};e.textSetter=function(a){a!==u.innerHTML&&delete this.bBox;u.innerHTML=this.textStr=a;e.htmlUpdateTransform()};m&&n(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,b){"align"===b&&(b="textAlign");e[b]=a;e.htmlUpdateTransform()};e.attr({text:a,x:Math.round(b), +y:Math.round(h)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});u.style.whiteSpace="nowrap";e.css=e.htmlCss;m&&(e.add=function(a){var b,h=w.box.parentNode,q=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)q.push(a),a=a.parentGroup;c(q.reverse(),function(a){var c,k=y(a.element,"class");k&&(k={className:k});b=a.div=a.div||I("div",k,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&& +a.styles.pointerEvents},b||h);c=b.style;d(a,{on:function(){e.on.apply({element:q[0].div},arguments);return a},translateXSetter:function(b,f){c.left=b+"px";a[f]=b;a.doTransform=!0},translateYSetter:function(b,f){c.top=b+"px";a[f]=b;a.doTransform=!0}});n(a,c)})}}else b=h;b.appendChild(u);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})})(Q);(function(a){var y=a.correctFloat,I=a.defined,E=a.destroyObjectProperties,K=a.isNumber,c=a.merge,d=a.pick,p=a.deg2rad;a.Tick=function(a,d, +c,m){this.axis=a;this.pos=d;this.type=c||"";this.isNew=!0;c||m||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,n=a.options,t=a.chart,m=a.categories,b=a.names,k=this.pos,x=n.labels,p=a.tickPositions,h=k===p[0],e=k===p[p.length-1],b=m?d(m[k],b[k],k):k,m=this.label,p=p.info,u;a.isDatetimeAxis&&p&&(u=n.dateTimeLabelFormats[p.higherRanks[k]||p.unitName]);this.isFirst=h;this.isLast=e;n=a.labelFormatter.call({axis:a,chart:t,isFirst:h,isLast:e,dateTimeLabelFormat:u,value:a.isLog?y(a.lin2log(b)): +b});I(m)?m&&m.attr({text:n}):(this.labelLength=(this.label=m=I(n)&&x.enabled?t.renderer.text(n,0,0,x.useHTML).css(c(x.style)).add(a.labelGroup):null)&&m.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var c=this.axis,t=a.x,m=c.chart.chartWidth,b=c.chart.spacing,k=d(c.labelLeft,Math.min(c.pos,b[3])),b=d(c.labelRight,Math.max(c.pos+c.len,m-b[1])),x=this.label,r=this.rotation,h={left:0,center:.5, +right:1}[c.labelAlign],e=x.getBBox().width,u=c.getSlotWidth(),w=u,H=1,M,G={};if(r)0>r&&t-h*eb&&(M=Math.round((m-t)/Math.cos(r*p)));else if(m=t+(1-h)*e,t-h*eb&&(w=b-a.x+w*h,H=-1),w=Math.min(u,w),ww||c.autoRotation&&(x.styles||{}).width)M=w;M&&(G.width=M,(c.options.labels.style||{}).textOverflow||(G.textOverflow="ellipsis"),x.css(G))},getPosition:function(a,d,c,m){var b= +this.axis,k=b.chart,n=m&&k.oldChartHeight||k.chartHeight;return{x:a?b.translate(d+c,null,null,m)+b.transB:b.left+b.offset+(b.opposite?(m&&k.oldChartWidth||k.chartWidth)-b.right-b.left:0),y:a?n-b.bottom+b.offset-(b.opposite?b.height:0):n-b.translate(d+c,null,null,m)-b.transB}},getLabelPosition:function(a,d,c,m,b,k,x,F){var h=this.axis,e=h.transA,u=h.reversed,w=h.staggerLines,n=h.tickRotCorr||{x:0,y:0},t=b.y;I(t)||(t=0===h.side?c.rotation?-8:-c.getBBox().height:2===h.side?n.y+8:Math.cos(c.rotation* +p)*(n.y-c.getBBox(!1,0).height/2));a=a+b.x+n.x-(k&&m?k*e*(u?-1:1):0);d=d+t-(k&&!m?k*e*(u?1:-1):0);w&&(c=x/(F||1)%w,h.opposite&&(c=w-c-1),d+=h.labelOffset/w*c);return{x:a,y:Math.round(d)}},getMarkPath:function(a,d,c,m,b,k){return k.crispLine(["M",a,d,"L",a+(b?0:-c),d+(b?c:0)],m)},render:function(a,c,p){var m=this.axis,b=m.options,k=m.chart.renderer,n=m.horiz,t=this.type,h=this.label,e=this.pos,u=b.labels,w=this.gridLine,H=t?t+"Tick":"tick",r=m.tickSize(H),G=this.mark,N=!G,C=u.step,q={},z=!0,A=m.tickmarkOffset, +B=this.getPosition(n,e,A,c),D=B.x,B=B.y,f=n&&D===m.pos+m.len||!n&&B===m.pos?-1:1,l=t?t+"Grid":"grid",L=b[l+"LineWidth"],O=b[l+"LineColor"],P=b[l+"LineDashStyle"],l=d(b[H+"Width"],!t&&m.isXAxis?1:0),H=b[H+"Color"];p=d(p,1);this.isActive=!0;w||(q.stroke=O,q["stroke-width"]=L,P&&(q.dashstyle=P),t||(q.zIndex=1),c&&(q.opacity=0),this.gridLine=w=k.path().attr(q).addClass("highcharts-"+(t?t+"-":"")+"grid-line").add(m.gridGroup));if(!c&&w&&(e=m.getPlotLinePath(e+A,w.strokeWidth()*f,c,!0)))w[this.isNew?"attr": +"animate"]({d:e,opacity:p});r&&(m.opposite&&(r[0]=-r[0]),N&&(this.mark=G=k.path().addClass("highcharts-"+(t?t+"-":"")+"tick").add(m.axisGroup),G.attr({stroke:H,"stroke-width":l})),G[N?"attr":"animate"]({d:this.getMarkPath(D,B,r[0],G.strokeWidth()*f,n,k),opacity:p}));h&&K(D)&&(h.xy=B=this.getLabelPosition(D,B,h,n,u,A,a,C),this.isFirst&&!this.isLast&&!d(b.showFirstLabel,1)||this.isLast&&!this.isFirst&&!d(b.showLastLabel,1)?z=!1:!n||m.isRadial||u.step||u.rotation||c||0===p||this.handleOverflow(B),C&& +a%C&&(z=!1),z&&K(B.y)?(B.opacity=p,h[this.isNew?"attr":"animate"](B)):h.attr("y",-9999),this.isNew=!1)},destroy:function(){E(this,this.axis)}}})(Q);(function(a){var y=a.arrayMax,I=a.arrayMin,E=a.defined,K=a.destroyObjectProperties,c=a.each,d=a.erase,p=a.merge,r=a.pick;a.PlotLineOrBand=function(a,c){this.axis=a;c&&(this.options=c,this.id=c.id)};a.PlotLineOrBand.prototype={render:function(){var a=this,c=a.axis,d=c.horiz,b=a.options,k=b.label,x=a.label,F=b.to,h=b.from,e=b.value,u=E(h)&&E(F),w=E(e),H= +a.svgElem,M=!H,G=[],N,C=b.color,q=r(b.zIndex,0),z=b.events,G={"class":"highcharts-plot-"+(u?"band ":"line ")+(b.className||"")},A={},B=c.chart.renderer,D=u?"bands":"lines",f=c.log2lin;c.isLog&&(h=f(h),F=f(F),e=f(e));w?(G={stroke:C,"stroke-width":b.width},b.dashStyle&&(G.dashstyle=b.dashStyle)):u&&(C&&(G.fill=C),b.borderWidth&&(G.stroke=b.borderColor,G["stroke-width"]=b.borderWidth));A.zIndex=q;D+="-"+q;(C=c[D])||(c[D]=C=B.g("plot-"+D).attr(A).add());M&&(a.svgElem=H=B.path().attr(G).add(C));if(w)G= +c.getPlotLinePath(e,H.strokeWidth());else if(u)G=c.getPlotBandPath(h,F,b);else return;if(M&&G&&G.length){if(H.attr({d:G}),z)for(N in b=function(f){H.on(f,function(l){z[f].apply(a,[l])})},z)b(N)}else H&&(G?(H.show(),H.animate({d:G})):(H.hide(),x&&(a.label=x=x.destroy())));k&&E(k.text)&&G&&G.length&&0= +b&&0===10*l%b&&null!==c[g]&&0!==l&&(d=a.numberFormat(l/b,-1)+c[g]);void 0===d&&(d=1E4<=Math.abs(l)?a.numberFormat(l,-1):a.numberFormat(l,-1,void 0,""));return d},getSeriesExtremes:function(){var a=this,l=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();b(a.series,function(f){if(f.visible||!l.options.chart.ignoreHiddenSeries){var b=f.options,h=b.threshold,c;a.hasVisibleSeries=!0;a.isLog&&0>=h&&(h=null);if(a.isXAxis)b=f.xData, +b.length&&(f=K(b),H(f)||f instanceof Date||(b=e(b,function(a){return H(a)}),f=K(b)),a.dataMin=Math.min(C(a.dataMin,b[0]),f),a.dataMax=Math.max(C(a.dataMax,b[0]),E(b)));else if(f.getExtremes(),c=f.dataMax,f=f.dataMin,n(f)&&n(c)&&(a.dataMin=Math.min(C(a.dataMin,f),f),a.dataMax=Math.max(C(a.dataMax,c),c)),n(h)&&(a.threshold=h),!b.softThreshold||a.isLog)a.softThreshold=!1}})},translate:function(a,b,e,h,c,d){var f=this.linkedParent||this,l=1,q=0,k=h?f.oldTransA:f.transA;h=h?f.oldMin:f.min;var u=f.minPixelPadding; +c=(f.isOrdinal||f.isBroken||f.isLog&&c)&&f.lin2val;k||(k=f.transA);e&&(l*=-1,q=f.len);f.reversed&&(l*=-1,q-=l*(f.sector||f.len));b?(a=(a*l+q-u)/k+h,c&&(a=f.lin2val(a))):(c&&(a=f.val2lin(a)),a=l*(a-h)*k+q+l*u+(H(d)?k*d:0));return a},toPixels:function(a,l){return this.translate(a,!1,!this.horiz,null,!0)+(l?0:this.pos)},toValue:function(a,l){return this.translate(a-(l?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,l,b,e,h){var f=this.chart,g=this.left,c=this.top,d,q,k=b&&f.oldChartHeight|| +f.chartHeight,u=b&&f.oldChartWidth||f.chartWidth,L;d=this.transB;var w=function(a,f,g){if(ag)e?a=Math.min(Math.max(f,a),g):L=!0;return a};h=C(h,this.translate(a,null,null,b));a=b=Math.round(h+d);d=q=Math.round(k-h-d);H(h)?this.horiz?(d=c,q=k-this.bottom,a=b=w(a,g,g+this.width)):(a=g,b=u-this.right,d=q=w(d,c,c+this.height)):L=!0;return L&&!e?null:f.renderer.crispLine(["M",a,d,"L",b,q],l||1)},getLinearTickPositions:function(a,b,e){var f,l=p(Math.floor(b/a)*a),h=p(Math.ceil(e/a)*a),g=[];if(b=== +e&&H(b))return[b];for(b=l;b<=h;){g.push(b);b=p(b+a);if(b===f)break;f=b}return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,e=this.minorTickInterval,h=[],c,d=this.pointRangePadding||0;c=this.min-d;var d=this.max+d,g=d-c;if(g&&g/e=this.minRange,d,g,q,k,u,w;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(n(a.min)||n(a.max)?this.minRange=null:(b(this.series,function(a){k=a.xData;for(g=u=a.xIncrement?1:k.length-1;0=D?(t=D,A=0):l.dataMax<=D&&(F=D,w=0)),l.min=C(G,t,l.dataMin),l.max=C(M,F,l.dataMax));d&&(!f&&0>=Math.min(l.min,C(l.dataMin,l.min))&&a.error(10,1),l.min=p(q(l.min),15),l.max=p(q(l.max),15));l.range&&n(l.max)&& +(l.userMin=l.min=G=Math.max(l.min,l.minFromRange()),l.userMax=M=l.max,l.range=null);x(l,"foundExtremes");l.beforePadding&&l.beforePadding();l.adjustForMinRange();!(B||l.axisPointRange||l.usePercentage||u)&&n(l.min)&&n(l.max)&&(q=l.max-l.min)&&(!n(G)&&A&&(l.min-=q*A),!n(M)&&w&&(l.max+=q*w));H(c.floor)?l.min=Math.max(l.min,c.floor):H(c.softMin)&&(l.min=Math.min(l.min,c.softMin));H(c.ceiling)?l.max=Math.min(l.max,c.ceiling):H(c.softMax)&&(l.max=Math.max(l.max,c.softMax));r&&n(l.dataMin)&&(D=D||0,!n(G)&& +l.min=D?l.min=D:!n(M)&&l.max>D&&l.dataMax<=D&&(l.max=D));l.tickInterval=l.min===l.max||void 0===l.min||void 0===l.max?1:u&&!m&&z===l.linkedParent.options.tickPixelInterval?m=l.linkedParent.tickInterval:C(m,this.tickAmount?(l.max-l.min)/Math.max(this.tickAmount-1,1):void 0,B?1:(l.max-l.min)*z/Math.max(l.len,z));k&&!f&&b(l.series,function(a){a.processData(l.min!==l.oldMin||l.max!==l.oldMax)});l.setAxisTranslation(!0);l.beforeSetTickPositions&&l.beforeSetTickPositions();l.postProcessTickInterval&& +(l.tickInterval=l.postProcessTickInterval(l.tickInterval));l.pointRange&&!m&&(l.tickInterval=Math.max(l.pointRange,l.tickInterval));f=C(c.minTickInterval,l.isDatetimeAxis&&l.closestPointRange);!m&&l.tickIntervall.tickInterval&&1E3l.max)),!!this.tickAmount));this.tickAmount||(l.tickInterval=l.unsquish());this.setTickPositions()},setTickPositions:function(){var a= +this.options,b,e=a.tickPositions,h=a.tickPositioner,c=a.startOnTick,d=a.endOnTick,g;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=b=e&&e.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange, +!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,h&&(h=h.apply(this,[this.min,this.max])))&&(this.tickPositions=b=h);this.trimTicks(b,c,d);this.isLinked||(this.min===this.max&&n(this.min)&&!this.tickAmount&&(g=!0,this.min-=.5,this.max+=.5),this.single=g,e||h||this.adjustTickAmount())},trimTicks:function(a,b,e){var f=a[0],l=a[a.length-1],h=this.minPointOffset|| +0;if(!this.isLinked){if(b)this.min=f;else for(;this.min-h>a[0];)a.shift();if(e)this.max=l;else for(;this.max+hb&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,e=this.tickAmount,h=this.finalTickAmt,c=b&&b.length;if(ce&&(this.tickInterval*=2,this.setTickPositions()); +if(n(h)){for(a=e=b.length;a--;)(3===h&&1===a%2||2>=h&&0l&&(a=l)),n(e)&&(bl&&(b=l))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,e=b.offsets||[0,0,0,0],h=this.horiz,c=C(b.width,a.plotWidth-e[3]+e[1]),d=C(b.height,a.plotHeight-e[0]+e[2]),g=C(b.top,a.plotTop+e[0]),b=C(b.left,a.plotLeft+e[3]),e=/%$/;e.test(d)&&(d= +Math.round(parseFloat(d)/100*a.plotHeight));e.test(g)&&(g=Math.round(parseFloat(g)/100*a.plotHeight+a.plotTop));this.left=b;this.top=g;this.width=c;this.height=d;this.bottom=a.chartHeight-d-g;this.right=a.chartWidth-c-b;this.len=Math.max(h?c:d,0);this.pos=h?b:g},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?p(b(this.min)):this.min,max:a?p(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b= +this.isLog,f=this.lin2log,e=b?f(this.min):this.min,b=b?f(this.max):this.max;null===a?a=e:e>a?a=e:ba?"right":195a?"left":"center"},tickSize:function(a){var b=this.options,f=b[a+"Length"],e=C(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(e&&f)return"inside"===b[a+"Position"]&&(f=-f),[f,e]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&& +this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var a=this.options.labels,e=this.horiz,h=this.tickInterval,c=h,d=this.len/(((this.categories?1:0)+this.max-this.min)/h),q,g=a.rotation,k=this.labelMetrics(),u,w=Number.MAX_VALUE,A,m=function(a){a/=d||1;a=1=a)u=m(Math.abs(k.h/Math.sin(t*a))),b=u+ +Math.abs(a/360),b(e.step||0)&&!e.rotation&&(this.staggerLines||1)*this.len/h||!b&&(c&&c-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,e=a.renderer,h=this.tickPositions,c=this.ticks,d=this.options.labels,q=this.horiz, +g=this.getSlotWidth(),k=Math.max(1,Math.round(g-2*(d.padding||5))),u={},w=this.labelMetrics(),A=d.style&&d.style.textOverflow,m,z=0,D,B;M(d.rotation)||(u.rotation=d.rotation||0);b(h,function(a){(a=c[a])&&a.labelLength>z&&(z=a.labelLength)});this.maxLabelLength=z;if(this.autoRotation)z>k&&z>w.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(g&&(m={width:k+"px"},!A))for(m.textOverflow="clip",D=h.length;!q&&D--;)if(B=h[D],k=c[B].label)k.styles&&"ellipsis"===k.styles.textOverflow?k.css({textOverflow:"clip"}): +c[B].labelLength>g&&k.css({width:g+"px"}),k.getBBox().height>this.len/h.length-(w.h-w.f)&&(k.specCss={textOverflow:"ellipsis"});u.rotation&&(m={width:(z>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},A||(m.textOverflow="ellipsis"));if(this.labelAlign=d.align||this.autoLabelAlign(this.labelRotation))u.align=this.labelAlign;b(h,function(a){var b=(a=c[a])&&a.label;b&&(b.attr(u),m&&b.css(G(m,b.specCss)),delete b.specCss,a.rotation=u.rotation)});this.tickRotCorr=e.rotCorr(w.b,this.labelRotation|| +0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||n(this.min)&&n(this.max)&&!!this.tickPositions},addTitle:function(a){var b=this.chart.renderer,f=this.horiz,e=this.opposite,h=this.options.title,c;this.axisTitle||((c=h.textAlign)||(c=(f?{low:"left",middle:"center",high:"right"}:{low:e?"right":"left",middle:"center",high:e?"left":"right"})[h.align]),this.axisTitle=b.text(h.text,0,0,h.useHTML).attr({zIndex:7,rotation:h.rotation||0,align:c}).addClass("highcharts-axis-title").css(h.style).add(this.axisGroup), +this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new D(this,a)},getOffset:function(){var a=this,e=a.chart,h=e.renderer,c=a.options,d=a.tickPositions,q=a.ticks,g=a.horiz,k=a.side,u=e.inverted?[1,0,3,2][k]:k,w,m,A=0,z,D=0,B=c.title,p=c.labels,x=0,r=e.axisOffset,e=e.clipOffset,H=[-1,1,1,-1][k],t,G=c.className,F=a.axisParent,M=this.tickSize("tick");w=a.hasData();a.showAxis=m=w||C(c.showEmpty,!0);a.staggerLines=a.horiz&&p.staggerLines; +a.axisGroup||(a.gridGroup=h.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(G||"")).add(F),a.axisGroup=h.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(G||"")).add(F),a.labelGroup=h.g("axis-labels").attr({zIndex:p.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(G||"")).add(F));if(w||a.isLinked)b(d,function(b,g){a.generateTick(b,g)}),a.renderUnsquish(),!1===p.reserveSpace||0!==k&&2!==k&& +{1:"left",3:"right"}[k]!==a.labelAlign&&"center"!==a.labelAlign||b(d,function(a){x=Math.max(q[a].getLabelSize(),x)}),a.staggerLines&&(x*=a.staggerLines,a.labelOffset=x*(a.opposite?-1:1));else for(t in q)q[t].destroy(),delete q[t];B&&B.text&&!1!==B.enabled&&(a.addTitle(m),m&&(A=a.axisTitle.getBBox()[g?"height":"width"],z=B.offset,D=n(z)?0:C(B.margin,g?5:10)));a.renderLine();a.offset=H*C(c.offset,r[k]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};h=0===k?-a.labelMetrics().h:2===k?a.tickRotCorr.y:0;D=Math.abs(x)+ +D;x&&(D=D-h+H*(g?C(p.y,a.tickRotCorr.y+8*H):p.x));a.axisTitleMargin=C(z,D);r[k]=Math.max(r[k],a.axisTitleMargin+A+H*a.offset,D,w&&d.length&&M?M[0]:0);c=c.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);e[u]=Math.max(e[u],c)},getLinePath:function(a){var b=this.chart,f=this.opposite,e=this.offset,h=this.horiz,c=this.left+(f?this.width:0)+e,e=b.chartHeight-this.bottom-(f?this.height:0)+e;f&&(a*=-1);return b.renderer.crispLine(["M",h?this.left:c,h?e:this.top,"L",h?b.chartWidth-this.right:c,h?e:b.chartHeight- +this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,e=this.top,h=this.len,c=this.options.title,d=a?b:e,g=this.opposite,q=this.offset,k=c.x||0,u=c.y||0,w=this.chart.renderer.fontMetrics(c.style&&c.style.fontSize,this.axisTitle).f,h={low:d+(a?0:h), +middle:d+h/2,high:d+(a?h:0)}[c.align],b=(a?e+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(2===this.side?w:0);return{x:a?h+k:b+(g?this.width:0)+q+k,y:a?b+u-(g?this.height:0)+q:h+u}},renderMinorTick:function(a){var b=this.chart.hasRendered&&H(this.oldMin),f=this.minorTicks;f[a]||(f[a]=new D(this,a,"minor"));b&&f[a].isNew&&f[a].render(null,!0);f[a].render(null,!1,1)},renderTick:function(a,b){var f=this.isLinked,e=this.ticks,h=this.chart.hasRendered&&H(this.oldMin);if(!f||a>=this.min&&a<=this.max)e[a]|| +(e[a]=new D(this,a)),h&&e[a].isNew&&e[a].render(b,!0,.1),e[a].render(b)},render:function(){var a=this,e=a.chart,h=a.options,c=a.isLog,d=a.lin2log,k=a.isLinked,g=a.tickPositions,u=a.axisTitle,w=a.ticks,m=a.minorTicks,A=a.alternateBands,z=h.stackLabels,p=h.alternateGridColor,n=a.tickmarkOffset,x=a.axisLine,r=a.showAxis,H=I(e.renderer.globalAnimation),t,G;a.labelEdge.length=0;a.overlap=!1;b([w,m,A],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||k)a.minorTickInterval&&!a.categories&&b(a.getMinorTickPositions(), +function(b){a.renderMinorTick(b)}),g.length&&(b(g,function(b,g){a.renderTick(b,g)}),n&&(0===a.min||a.single)&&(w[-1]||(w[-1]=new D(a,-1,null,!0)),w[-1].render(-1))),p&&b(g,function(b,f){G=void 0!==g[f+1]?g[f+1]+n:a.max-n;0===f%2&&bc-6&&u(B||b.chartWidth-2*q-l-h.x)&&(this.itemX=l,this.itemY+=f+this.lastLineHeight+D,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,k);this.lastItemY=f+this.itemY+D;this.lastLineHeight=Math.max(n, +this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=k:(this.itemY+=f+n+D,this.lastLineHeight=n);this.offsetWidth=B||Math.max((d?this.itemX-l-z:k)+q,this.offsetWidth)},getAllItems:function(){var a=[];d(this.chart.series,function(b){var e=b&&b.options;b&&m(e.showInLegend,c(e.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===e.legendType?b.data:b)))});return a},adjustMargins:function(a,b){var e=this.chart,h=this.options,k=h.align.charAt(0)+h.verticalAlign.charAt(0)+ +h.layout.charAt(0);h.floating||d([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(d,u){d.test(k)&&!c(a[u])&&(e[n[u]]=Math.max(e[n[u]],e.legend[(u+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][u]*h[u%2?"x":"y"]+m(h.margin,12)+b[u]))})},render:function(){var a=this,b=a.chart,c=b.renderer,m=a.group,n,x,r,t,F=a.box,q=a.options,z=a.padding;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;m||(a.group=m=c.g("legend").attr({zIndex:7}).add(),a.contentGroup= +c.g().attr({zIndex:1}).add(m),a.scrollGroup=c.g().add(a.contentGroup));a.renderTitle();n=a.getAllItems();k(n,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});q.reversed&&n.reverse();a.allItems=n;a.display=x=!!n.length;a.lastLineHeight=0;d(n,function(b){a.renderItem(b)});r=(q.width||a.offsetWidth)+z;t=a.lastItemY+a.lastLineHeight+a.titleHeight;t=a.handleOverflow(t);t+=z;F||(a.box=F=c.rect().addClass("highcharts-legend-box").attr({r:q.borderRadius}).add(m), +F.isNew=!0);F.attr({stroke:q.borderColor,"stroke-width":q.borderWidth||0,fill:q.backgroundColor||"none"}).shadow(q.shadow);0c&&!1!==r.enabled?(this.clipHeight= +p=Math.max(c-20-this.titleHeight-D,0),this.currentPage=m(this.currentPage,1),this.fullHeight=a,d(l,function(a,b){var e=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var g=B.length;if(!g||e-B[g-1]>p&&(f||e)!==B[g-1])B.push(f||e),g++;b===l.length-1&&e+a-B[g-1]>p&&B.push(e);e!==f&&(f=e)}),x||(x=b.clipRect=h.clipRect(0,D,9999,0),b.contentGroup.clip(x)),t(p),A||(this.nav=A=h.g().attr({zIndex:1}).add(this.group),this.up=h.symbol("triangle",0,0,z,z).on("click",function(){b.scroll(-1,q)}).add(A), +this.pager=h.text("",15,10).addClass("highcharts-legend-navigation").css(r.style).add(A),this.down=h.symbol("triangle-down",0,0,z,z).on("click",function(){b.scroll(1,q)}).add(A)),b.scroll(0),a=c):A&&(t(),A.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,e){var c=this.pages,d=c.length;a=this.currentPage+a;var h=this.clipHeight,k=this.options.navigation,m=this.pager,n=this.padding;a>d&&(a=d);0u-k?u:u-k);else if(m)e[a]=Math.max(d,f+k+c>b?f:f+k);else return!1},C=function(a,b,c,f){var d;fb-h?d=!1:e[a]=fb-c/2?b-c-2:f-c/2;return d},q=function(a){var b=n;n=p;p=b;m=a},z=function(){!1!== +t.apply(0,n)?!1!==C.apply(0,p)||m||(q(!0),z()):m?e.x=e.y=0:(q(!0),z())};(b.inverted||1z&&(m= +!1);a=(b.series&&b.series.yAxis&&b.series.yAxis.pos)+(b.plotY||0);a-=h.plotTop;k.push({target:b.isHeader?h.plotHeight+p:a,rank:b.isHeader?1:0,size:u.tt.getBBox().height+1,point:b,x:z,tt:q})});this.cleanSplit();a.distribute(k,h.plotHeight+p);I(k,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||b.isHeader?a.x:b.plotX+h.plotLeft+r(n.distance,16),y:a.pos+h.plotTop,anchorX:b.isHeader?b.plotX+h.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+h.plotTop- +15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var b=this.chart,c=this.getLabel(),c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(Math.round(c.x),Math.round(c.y||0),a.plotX+b.plotLeft,a.plotY+b.plotTop)},getDateFormat:function(a,c,d,n){var b=y("%m-%d %H:%M:%S.%L",c),e,k,p={millisecond:15,second:12,minute:9,hour:6,day:3},r="millisecond";for(k in m){if(a===m.week&&+y("%w",c)===d&&"00:00:00.000"===b.substr(6)){k="week";break}if(m[k]>a){k=r;break}if(p[k]&& +b.substr(p[k])!=="01-01 00:00:00.000".substr(p[k]))break;"week"!==k&&(r=k)}k&&(e=n[k]);return e},getXDateFormat:function(a,c,d){c=c.dateTimeLabelFormats;var b=d&&d.closestPointRange;return(b?this.getDateFormat(b,a.x,d.options.startOfWeek,c):c.day)||c.year},tooltipFooterHeaderFormatter:function(a,d){var b=d?"footer":"header";d=a.series;var k=d.tooltipOptions,h=k.xDateFormat,e=d.xAxis,m=e&&"datetime"===e.options.type&&c(a.key),b=k[b+"Format"];m&&!h&&(h=this.getXDateFormat(a,k,e));m&&h&&(b=b.replace("{point.key}", +"{point.key:"+h+"}"));return K(b,{point:a,series:d})},bodyFormatter:function(a){return d(a,function(a){var b=a.series.tooltipOptions;return(b.pointFormatter||a.point.tooltipFormatter).call(a.point,b.pointFormat)})}}})(Q);(function(a){var y=a.addEvent,I=a.attr,E=a.charts,K=a.color,c=a.css,d=a.defined,p=a.doc,r=a.each,n=a.extend,t=a.fireEvent,m=a.offset,b=a.pick,k=a.removeEvent,x=a.splat,F=a.Tooltip,h=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,c){this.options= +c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};F&&c.tooltip.enabled&&(a.tooltip=new F(a,c.tooltip),this.followTouchMove=b(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var c=this.chart,e=c.options.chart,d=e.zoomType||"",c=c.inverted;/touch/.test(a.type)&&(d=b(e.pinchType,d));this.zoomX=a=/x/.test(d);this.zoomY=d=/y/.test(d);this.zoomHor=a&&!c||d&&c;this.zoomVert=d&&!c||a&&c;this.hasZoom=a||d},normalize:function(a, +b){var c,e;a=a||h.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=m(this.chart.container));void 0===e.pageX?(c=Math.max(a.x,a.clientX-b.left),b=a.y):(c=e.pageX-b.left,b=e.pageY-b.top);return n(a,{chartX:Math.round(c),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};r(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})}); +return b},runPointActions:function(c){var e=this.chart,d=e.series,h=e.tooltip,k=h?h.shared:!1,m=!0,n=e.hoverPoint,t=e.hoverSeries,q,z,A,B=[],D;if(!k&&!t)for(q=0;qb.series.index?-1:1}));if(k)for(q=B.length;q--;)(B[q].x!==B[0].x||B[q].series.noSharedTooltip)&&B.splice(q,1);if(B[0]&&(B[0]!==this.prevKDPoint||h&&h.isHidden)){if(k&&!B[0].series.noSharedTooltip){for(q=0;qm+n&&(e=m+n),dq+A&&(d=q+A),this.hasDragged=Math.sqrt(Math.pow(f-e,2)+Math.pow(l-d,2)),10n;++n)t=p[n],a=2>n||2===n&&/%$/.test(t),p[n]=I(t,[d,K,r,p[2]][n])+(a?c:0);p[3]>p[2]&&(p[3]=p[2]);return p}}})(Q);(function(a){var y,I=a.each,E=a.extend,K=a.erase,c=a.fireEvent,d=a.format,p=a.isArray,r=a.isNumber,n=a.pick,t=a.removeEvent;y=a.Point=function(){};y.prototype={init:function(a, +b,c){this.series=a;this.color=a.color;this.applyOptions(b,c);a.options.colorByPoint?(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter],b=b.length,c=a.colorCounter,a.colorCounter++,a.colorCounter===b&&(a.colorCounter=0)):c=a.colorIndex;this.colorIndex=n(this.colorIndex,c);a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.options.pointValKey||c.pointValKey;a=y.prototype.optionsToObject.call(this,a);E(this,a);this.options=this.options? +E(this.options,a):a;a.group&&delete this.group;d&&(this.y=this[d]);this.isNull=n(this.isValid&&!this.isValid(),null===this.x||!r(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===b&&c.xAxis&&c.xAxis.hasNames&&(this.x=c.xAxis.nameToX(this));void 0===this.x&&c&&(this.x=void 0===b?c.autoIncrement(this):b);return this},optionsToObject:function(a){var b={},c=this.series,d=c.options.keys,m=d||c.pointArrayMap||["y"],h=m.length,e=0,n=0;if(r(a)||null===a)b[m[0]]=a;else if(p(a))for(!d&& +a.length>h&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),e++);n=d.value;)d=b[++c];d&&d.color&&!this.options.color&&(this.color=d.color);return d},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--;b&&(this.setState(),K(b,this),b.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)t(this), +this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b= +this.series,c=b.tooltipOptions,m=n(c.valueDecimals,""),p=c.valuePrefix||"",h=c.valueSuffix||"";I(b.pointArrayMap||["y"],function(b){b="{point."+b;if(p||h)a=a.replace(b+"}",p+b+"}"+h);a=a.replace(b+"}",b+":,."+m+"f}")});return d(a,{point:this,series:this.series})},firePointEvent:function(a,b,d){var k=this,m=this.series.options;(m.point.events[a]||k.options&&k.options.events&&k.options.events[a])&&this.importEvents();"click"===a&&m.allowPointSelect&&(d=function(a){k.select&&k.select(null,a.ctrlKey|| +a.metaKey||a.shiftKey)});c(this,a,b,d)},visible:!0}})(Q);(function(a){var y=a.addEvent,I=a.animObject,E=a.arrayMax,K=a.arrayMin,c=a.correctFloat,d=a.Date,p=a.defaultOptions,r=a.defaultPlotOptions,n=a.defined,t=a.each,m=a.erase,b=a.extend,k=a.fireEvent,x=a.grep,F=a.isArray,h=a.isNumber,e=a.isString,u=a.merge,w=a.pick,H=a.removeEvent,M=a.splat,G=a.SVGElement,N=a.syncTimeout,C=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{}, +marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1, +marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,c){var d=this,e,h,f=a.series,q;d.chart=a;d.options=c=d.setOptions(c);d.linkedSeries=[];d.bindAxes();b(d,{name:c.name,state:"",visible:!1!==c.visible,selected:!0===c.selected});h=c.events;for(e in h)y(d,e,h[e]);if(h&&h.click||c.point&& +c.point.events&&c.point.events.click||c.allowPointSelect)a.runTrackerClick=!0;d.getColor();d.getSymbol();t(d.parallelArrays,function(a){d[a+"Data"]=[]});d.setData(c.data,!1);d.isCartesian&&(a.hasCartesianSeries=!0);f.length&&(q=f[f.length-1]);d._i=w(q&&q._i,-1)+1;a.orderSeries(this.insert(f))},insert:function(a){var b=this.options.index,c;if(h(b)){for(c=a.length;c--;)if(b>=w(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return w(c,a.length- +1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,e;t(b.axisTypes||[],function(h){t(d[h],function(a){e=a.options;if(c[h]===e.index||void 0!==c[h]&&c[h]===e.id||void 0===c[h]&&0===e.index)b.insert(a.series),b[h]=a,a.isDirty=!0});b[h]||b.optionalAxis===h||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,e=h(b)?function(d){var f="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))}; +t(c.parallelArrays,e)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,e=a.pointIntervalUnit,b=w(b,a.pointStart,0);this.pointInterval=c=w(this.pointInterval,a.pointInterval,1);e&&(a=new d(b),"day"===e?a=+a[d.hcSetDate](a[d.hcGetDate]()+c):"month"===e?a=+a[d.hcSetMonth](a[d.hcGetMonth]()+c):"year"===e&&(a=+a[d.hcSetFullYear](a[d.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions|| +{},e=c[this.type];this.userOptions=a;c=u(e,c.series,a);this.tooltipOptions=u(p.tooltip,p.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);null===e.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&n(a[a.length- +1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var d,e=this.chart,f=this.userOptions,h=a+"Index",q=a+"Counter",k=c?c.length:w(e.options.chart[a+"Count"],e[a+"Count"]);b||(d=w(f[h],f["_"+h]),n(d)||(e.series.length||(e[q]=0),f["_"+h]=d=e[q]%k,e[q]+=1),c&&(b=c[d]));void 0!==d&&(this[h]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||r[this.type].color,this.chart.options.colors)}, +getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(b,c,d,k){var q=this,f=q.points,l=f&&f.length||0,m,n=q.options,p=q.chart,z=null,g=q.xAxis,r=n.turboThreshold,A=this.xData,B=this.yData,u=(m=q.pointArrayMap)&&m.length;b=b||[];m=b.length;c=w(c,!0);if(!1!==k&&m&&l===m&&!q.cropped&&!q.hasGroupedData&&q.visible)t(b,function(a,b){f[b].update&&a!==n.data[b]&&f[b].update(a,!1,null,!1)}); +else{q.xIncrement=null;q.colorCounter=0;t(this.parallelArrays,function(a){q[a+"Data"].length=0});if(r&&m>r){for(d=0;null===z&&dk||this.forceCrop))if(c[e-1]t)c=[],d=[];else if(c[0]t)h=this.cropData(this.xData,this.yData,r,t),c=h.xData,d=h.yData,h=h.start,f=!0;for(k=c.length||1;--k;)e=p?m(c[k])-m(c[k-1]):c[k]-c[k-1],0e&&this.requireSorting&&a.error(15);this.cropped=f;this.cropStart=h;this.processedXData=c;this.processedYData=d;this.closestPointRange=l},cropData:function(a,b,c, +d){var e=a.length,f=0,h=e,q=w(this.cropShoulder,1),k;for(k=0;k=c){f=Math.max(0,k-q);break}for(c=k;cd){h=c+q;break}return{xData:a.slice(f,h),yData:b.slice(f,h),start:f,end:h}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,h=d.length,k=this.cropStart||0,m,n=this.hasGroupedData,p,g=[],r;b||n||(b=[],b.length=a.length,b=this.data=b);for(r=0;r=k&&(c[g-1]||n)<=q,m&&n)if(m=p.length)for(;m--;)null!==p[m]&&(e[f++]=p[m]);else e[f++]=p;this.dataMin=K(e);this.dataMax=E(e)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,d=this.xAxis,e=d.categories,k=this.yAxis,f=this.points,l=f.length,m=!!this.modifyValue,p=a.pointPlacement,r="between"===p||h(p),t=a.threshold,g=a.startFromThreshold?t:0, +u,x,F,C,G=Number.MAX_VALUE;"between"===p&&(p=.5);h(p)&&(p*=w(a.pointRange||d.pointRange));for(a=0;a=E&&(y.isNull=!0);y.plotX=u=c(Math.min(Math.max(-1E5,d.translate(H,0,0,0,1,p,"flags"===this.type)),1E5));b&&this.visible&&!y.isNull&&I&&I[H]&&(C=this.getStackIndicator(C,H,this.index),K=I[H],E=K.points[C.key],x=E[0],E=E[1],x===g&&C.key===I[H].base&&(x=w(t,k.min)),k.isLog&& +0>=x&&(x=null),y.total=y.stackTotal=K.total,y.percentage=K.total&&y.y/K.total*100,y.stackY=E,K.setOffset(this.pointXOffset||0,this.barW||0));y.yBottom=n(x)?k.translate(x,0,1,0,1):null;m&&(E=this.modifyValue(E,y));y.plotY=x="number"===typeof E&&Infinity!==E?Math.min(Math.max(-1E5,k.translate(E,0,1,0,1)),1E5):void 0;y.isInside=void 0!==x&&0<=x&&x<=k.len&&0<=u&&u<=d.len;y.clientX=r?c(d.translate(H,0,0,0,1,p)):u;y.negative=y.y<(t||0);y.category=e&&void 0!==e[y.x]?e[y.x]:y.x;y.isNull||(void 0!==F&&(G= +Math.min(G,Math.abs(u-F))),F=u);y.zone=this.zones.length&&y.getZone()}this.closestPointRangePx=G},getValidPoints:function(a,b){var c=this.chart;return x(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,e=b.inverted,f=this.clipBox,h=f||b.clipBox,k=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,h.height,c.xAxis,c.yAxis].join(),q=b[k],m=b[k+"m"];q||(a&&(h.width=0,b[k+"m"]= +m=d.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight)),b[k]=q=d.clipRect(h),q.count={length:0});a&&!q.count[this.index]&&(q.count[this.index]=!0,q.count.length+=1);!1!==c.clip&&(this.group.clip(a||f?q:b.clipRect),this.markerGroup.clip(m),this.sharedClipKey=k);a||(q.count[this.index]&&(delete q.count[this.index],--q.count.length),0===q.count.length&&k&&b[k]&&(f||(b[k]=b[k].destroy()),b[k+"m"]&&(this.markerGroup.clip(),b[k+"m"]=b[k+"m"].destroy())))},animate:function(a){var b=this.chart, +c=I(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();k(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,c,d,e,f,k=this.options.marker,m,n,p,r,g=this.markerGroup,t=w(k.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>2*k.radius);if(!1!==k.enabled||this._hasPointMarkers)for(d=0;de&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e,f,h=this.clips||[],k,m=this.graph,p=this.area,n=Math.max(b.chartWidth,b.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],r,u,x=b.inverted,F,y,C,G,H=!1;d.length&&(m||p)&&g&&void 0!==g.min&&(u=g.reversed,F=g.horiz,m&&m.hide(),p&&p.hide(),r=g.getExtremes(),t(d,function(d,l){e=u?F?b.plotWidth:0:F?0: +g.toPixels(r.min);e=Math.min(Math.max(w(f,e),0),n);f=Math.min(Math.max(Math.round(g.toPixels(w(d.value,r.max),!0)),0),n);H&&(e=f=g.toPixels(r.max));y=Math.abs(e-f);C=Math.min(e,f);G=Math.max(e,f);g.isXAxis?(k={x:x?G:C,y:0,width:y,height:n},F||(k.x=b.plotHeight-k.x)):(k={x:0,y:x?G:C,width:n,height:y},F&&(k.y=b.plotWidth-k.y));x&&c.isVML&&(k=g.isXAxis?{x:0,y:u?C:G,height:k.width,width:b.chartWidth}:{x:k.y-b.plotLeft-b.spacingBox.x,y:0,width:k.height,height:b.chartHeight});h[l]?h[l].animate(k):(h[l]= +c.clipRect(k),m&&a["zone-graph-"+l].clip(h[l]),p&&a["zone-area-"+l].clip(h[l]));H=d.value>r.max}),this.clips=h)},invertGroups:function(a){function b(){t(["group","markerGroup"],function(b){c[b]&&(c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,d;c.xAxis&&(d=y(c.chart,"resize",b),y(c,"destroy",d),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,e){var f=this[a],h=!f;h&&(this[a]=f=this.chart.renderer.g(b).attr({zIndex:d||.1}).add(e),f.addClass("highcharts-series-"+this.index+ +" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||"")));f.attr({visibility:c})[h?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=!!a.animate&&b.renderer.isSVG&&I(d.animation).duration,f=a.visible?"inherit":"hidden",h= +d.zIndex,k=a.hasRendered,m=b.seriesGroup,p=b.inverted;c=a.plotGroup("group","series",f,h,m);a.markerGroup=a.plotGroup("markerGroup","markers",f,h,m);e&&a.animate(!0);c.inverted=a.isCartesian?p:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(p);!1===d.clip||a.sharedClipKey||k||c.clip(b.clipRect);e&&a.animate();k||(a.animationTimeout=N(function(){a.afterAnimate()}, +e));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:w(d&&d.left,a.plotLeft),translateY:w(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e? +c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,d,e){var f,h;if(h=c&&c.length)return f=b.kdAxisArray[d%e],c.sort(function(a,b){return a[f]-b[f]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),d+1,e),right:a(c.slice(h+1),d+1,e)}}this.buildingKdTree=!0;var b=this,c=b.kdDimensions;delete b.kdTree;N(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?0:1)},searchKDTree:function(a, +b){function c(a,b,k,m){var g=b.point,l=d.kdAxisArray[k%m],p,q,r=g;q=n(a[e])&&n(g[e])?Math.pow(a[e]-g[e],2):null;p=n(a[f])&&n(g[f])?Math.pow(a[f]-g[f],2):null;p=(q||0)+(p||0);g.dist=n(p)?Math.sqrt(p):Number.MAX_VALUE;g.distX=n(q)?Math.sqrt(q):Number.MAX_VALUE;l=a[l]-g[l];p=0>l?"left":"right";q=0>l?"right":"left";b[p]&&(p=c(a,b[p],k+1,m),r=p[h]=Math.abs(b)&&.5a.closestPointRange*a.xAxis.transA,d=a.borderWidth=p(c.borderWidth,d?0:1),n=a.yAxis,h=a.translatedThreshold=n.getThreshold(c.threshold), +e=p(c.minPointLength,5),t=a.getColumnMetrics(),w=t.width,y=a.barW=Math.max(w,1+2*d),I=a.pointXOffset=t.offset;b.inverted&&(h-=.5);c.pointPadding&&(y=Math.ceil(y));r.prototype.translate.apply(a);E(a.points,function(c){var d=p(c.yBottom,h),k=999+Math.abs(d),k=Math.min(Math.max(-k,c.plotY),n.len+k),m=c.plotX+I,r=y,t=Math.min(k,d),u,x=Math.max(k,d)-t;Math.abs(x)e?d-e:h-(u?e:0));c.barX=m;c.pointWidth=w;c.tooltipPos=b.inverted? +[n.len+n.pos-b.plotLeft-k,a.xAxis.len-m-r/2,x]:[m+r/2,k+n.pos-b.plotTop,x];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[c.plotX,n.len/2,0,0]:[m,t,r,x])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,b){var c=this.options,d,m=this.pointAttrToOptions||{};d=m.stroke||"borderColor";var h=m["stroke-width"]||"borderWidth",e=a&&a.color||this.color, +p=a[d]||c[d]||this.color||e,n=a[h]||c[h]||this[h]||0,m=c.dashStyle;a&&this.zones.length&&(e=(e=a.getZone())&&e.color||a.options.color||this.color);b&&(a=c.states[b],b=a.brightness,e=a.color||void 0!==b&&I(e).brighten(a.brightness).get()||e,p=a[d]||p,n=a[h]||n,m=a.dashStyle||m);d={fill:e,stroke:p,"stroke-width":n};c.borderRadius&&(d.r=c.borderRadius);m&&(d.dashstyle=m);return d},drawPoints:function(){var a=this,b=this.chart,k=a.options,p=b.renderer,n=k.animationLimit||250,h;E(a.points,function(e){var m= +e.graphic;if(c(e.plotY)&&null!==e.y){h=e.shapeArgs;if(m)m[b.pointCounth.y&&(h.y=null),c+=e&&!h.visible?0:h.y;this.total=c;for(a=0;a1.5*Math.PI?n-=2*Math.PI:n<-Math.PI/2&&(n+=2*Math.PI);z.slicedTranslation={translateX:Math.round(Math.cos(n)*d),translateY:Math.round(Math.sin(n)*d)};e=Math.cos(n)*a[2]/2;m=Math.sin(n)*a[2]/2;z.tooltipPos=[a[0]+.7*e,a[1]+.7* +m];z.half=n<-Math.PI/2||n>Math.PI/2?1:0;z.angle=n;h=Math.min(h,E/5);z.labelPos=[a[0]+e+Math.cos(n)*E,a[1]+m+Math.sin(n)*E,a[0]+e+Math.cos(n)*h,a[1]+m+Math.sin(n)*h,a[0]+e,a[1]+m,0>E?"center":z.half?"right":"left",n]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer,d,m,h,e,n=a.options.shadow;n&&!a.shadowGroup&&(a.shadowGroup=c.g("shadow").add(a.group));E(a.points,function(b){if(null!==b.y){m=b.graphic;e=b.shapeArgs;d=b.sliced?b.slicedTranslation:{};var k=b.shadowGroup;n&&!k&&(k= +b.shadowGroup=c.g("shadow").add(a.shadowGroup));k&&k.attr(d);h=a.pointAttribs(b,b.selected&&"select");m?m.setRadialReference(a.center).attr(h).animate(K(e,d)):(b.graphic=m=c[b.shapeType](e).addClass(b.getClassName()).setRadialReference(a.center).attr(d).add(a.group),b.visible||m.attr({visibility:"hidden"}),m.attr(h).attr({"stroke-linejoin":"round"}).shadow(n,k))}})},searchPoint:d,sortByAngle:function(a,c){a.sort(function(a,b){return void 0!==a.angle&&(b.angle-a.angle)*c})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle, +getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:d},{init:function(){r.prototype.init.apply(this,arguments);var a=this,c;a.name=p(a.name,"Slice");c=function(b){a.slice("select"===b.type)};y(a,"select",c);y(a,"unselect",c);return a},setVisible:function(a,d){var b=this,k=b.series,h=k.chart,e=k.options.ignoreHiddenPoint;d=p(d,e);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,k.options.data[c(b,k.data)]=b.options,E(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a? +"show":"hide"](!0)}),b.legendItem&&h.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),e&&(k.isDirty=!0),d&&h.redraw())},slice:function(a,d,n){var b=this.series;m(n,b.chart);p(d,!0);this.sliced=this.options.sliced=a=I(a)?a:!this.sliced;b.options.data[c(this,b.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(b.x, +b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}})})(Q);return Q}); \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index e9dd410..7c1c2a3 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,25 +1,29 @@ -{% extends "layout.html" %} +{% extends "layout.html" %} {% block content %} -

Toi aussi, joue au rézoman !

-

- Voici la rezo-roulette metzquetaire. -

-

- Jouer -

-

Historique personnel

+

Toi aussi, joue au rézoman avec la rezo-roulette Les Metzquetaires !

+ + + +
+
+
+

+ Jouer +

+

Historique personnel

-{% if bans_hist != [] %} -
    - {% for entry in bans_hist %} -
  • - {{ entry[1] }} -
  • - {% endfor %} -
-{% else %} -

- Rien pour l'instant -

+ {% if bans_hist != [] %} +
    + {% for entry in bans_hist %} +
  • + {{ entry[1] }} +
  • + {% endfor %} +
+ {% else %} +

+ Rien pour l'instant +

+
{% endif %} {% endblock %} diff --git a/templates/layout.html b/templates/layout.html index fbdd17b..7098c32 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -7,6 +7,7 @@ content="text/html;charset=utf-8" /> + diff --git a/templates/layout_precampagne.html b/templates/layout_precampagne.html new file mode 100644 index 0000000..35c1e5b --- /dev/null +++ b/templates/layout_precampagne.html @@ -0,0 +1,43 @@ + + + + Rezo-roulette Metzquetaires + + + + + + + + +
+ +
+
+
+
+
+
+ {% with messages = get_flashed_messages() %} + {% if messages %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% endif %} + {% endwith %} + {% block content %}{% endblock %} +
+
+
+
+
+ +
+
+ + diff --git a/templates/not_subscribed.html b/templates/not_subscribed.html index dfe6f1a..824b5d7 100644 --- a/templates/not_subscribed.html +++ b/templates/not_subscribed.html @@ -3,7 +3,7 @@

Vous n'êtes pas inscrit

Si vous désirez participer malgré les risques que le jeu comporte, veuillez - envoyer un email à

. + envoyer un email au contact technique. (Vous ne pouvez pas jouer depuis Supélec)

{% endblock %} diff --git a/templates/precampagne.html b/templates/precampagne.html index 646911d..11df120 100644 --- a/templates/precampagne.html +++ b/templates/precampagne.html @@ -1,4 +1,4 @@ -{% extends "layout.html" %} +{% extends "layout_precampagne.html" %} {% block content %}

Pas de précampagne!