WordPress.org

Plugin Directory

Changeset 642891


Ignore:
Timestamp:
12/21/12 11:42:09 (5 years ago)
Author:
maxidirienzo
Message:

Version 1.5.3

Location:
wangguard/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • wangguard/trunk/js/jquery.wijmo.raphael.min.js

    r554861 r642891  
    11/* 
    22 * 
    3  * Wijmo Library 2.1.0 
     3 * Wijmo Library 2.3.2 
    44 * http://wijmo.com/ 
    55 * 
    6  * Copyright(c) ComponentOne, LLC.  All rights reserved. 
     6 * Copyright(c) GrapeCity, Inc.  All rights reserved. 
    77 *  
    8  * Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses. 
     8 * Licensed under the Wijmo Commercial License. Also available under the GNU GPL Version 3 license. 
    99 * licensing@wijmo.com 
    10  * http://wijmo.com/license 
     10 * http://wijmo.com/widgets/license/ 
    1111 * 
    1212 * 
    1313 **/ 
    14 (function(){"use strict";if(!window.Raphael)return;jQuery.extend({round:function(a,b){return!a?0:Globalize.parseFloat(a.toFixed(b),10,Globalize.culture("en"))},toOADate:function(b){var c=864e5,a=b-new Date(1900,0,1)+2*c;return a},fromOADate:function(a){var c=864e5,b=new Date(a-2*c+ +new Date(1900,0,1));return b},arrayClone:function(b){var a=[];jQuery.each(b,function(c,b){a.push(jQuery.extend(true,{},b))});return a}});jQuery.wijraphael={isSVGElem:function(a){var b="http://www.w3.org/2000/svg";return a.nodeType===1&&a.namespaceURI===b},addClass:function(b,a){a=a||"";jQuery.each(b,function(){if(jQuery.wijraphael.isSVGElem(this)){var b=this;jQuery.each(a.split(/\s+/),function(d,c){var a=b.className?b.className.baseVal:b.getAttribute("class");if(jQuery.inArray(c,a.split(/\s+/))===-1){a+=(a?" ":"")+c;if(b.className)b.className.baseVal=a;else b.setAttribute("class",a)}})}else jQuery(this).addClass(a)})},clearRaphaelCache:function(){Raphael.path2curve.cache=null;Raphael.path2curve.count=null;Raphael.parseTransformString.cache=null;Raphael.parseTransformString.count=null;Raphael.parsePathString.cache=null;Raphael.parsePathString.count=null;Raphael._pathToAbsolute.cache=null;Raphael._pathToAbsolute.count=null},getPositionByAngle:function(e,f,c,d){var a={},b=Raphael.rad(d);a.x=e+c*Math.cos(-1*b);a.y=f+c*Math.sin(-1*b);return a},hasClass:function(a,b){if(!b||b.length===0)return false;if(jQuery.wijraphael.isSVGElem(a)){var d=a.className?a.className.baseVal:a.getAttribute("class"),c=false;jQuery.each(d.split(/\s+/),function(d,a){if(a===b){c=true;return false}});return c}else return jQuery(a).hasClass(b)},sector:function(b,c,a,d,e){var f=jQuery.wijraphael.getPositionByAngle(b,c,a,d),g=jQuery.wijraphael.getPositionByAngle(b,c,a,e);return["M",b,c,"L",f.x,f.y,"A",a,a,0,+(e-d>180),0,g.x,g.y,"z"]}};jQuery.expr.filter.CLASS=function(a,c){var b=!jQuery.wijraphael.isSVGElem(a)?a.className:a.className?a.className.baseVal:a.getAttribute("class");return(" "+b+" ").indexOf(c)>-1};jQuery.expr.preFilter.CLASS=function(c,e,f,g,i,h){var b=0,a=null,d=null;c=" "+c[1].replace(/\\/g,"")+" ";if(h)return c;for(b=0,a={};a;b++){a=e[b];if(!a)try{a=e.item(b)}catch(j){}if(a){d=!jQuery.wijraphael.isSVGElem(a)?a.className:(a.className?a.className.baseVal:"")||a.getAttribute("class");if(i^(d&&(" "+d+" ").indexOf(c)>-1))!f&&g.push(a);else if(f)e[b]=false}}return false};Raphael.fn.tri=function(b,c,e){var g=b,j=c-e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c+d,i=b-a,l=c+d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.invertedTri=function(b,c,e){var g=b,j=c+e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c-d,i=b-a,l=c-d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.box=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c-a,"L",b+a,c+a,"L",b-a,c+a,"z"];return this.path(d.concat(" "))};Raphael.fn.diamond=function(b,c,a){var d=["M",b,c-a,"L",b+a,c,"L",b,c+a,"L",b-a,c,"z"];return this.path(d.concat(" "))};Raphael.fn.cross=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c+a,"M",b-a,c+a,"L",b+a,c-a];return this.path(d.concat(" "))};Raphael.fn.paintMarker=function(f,d,e,b){var c=this,a=null;if(!f)f="circle";switch(f){case"circle":a=c.circle(d,e,b);break;case"tri":a=c.tri(d,e,b);break;case"invertedTri":a=c.invertedTri(d,e,b);break;case"box":a=c.box(d,e,b);break;case"diamond":a=c.diamond(d,e,b);break;case"cross":a=c.cross(d,e,b)}return a};Raphael.prototype.htmlText=function(k,l,a,i,e,d){function h(b,a,d){var f=/<(b|strong)>/,e=/<(i|em)>/,c=/href=[\"\']([^\"\']+)[\"\']/,g=/<a/;d&&b.attr(d);f.test(a)&&b.attr("font-weight","bold");e.test(a)&&b.attr("font-style","italic");if(g.test(a))a.match(c)[1]&&b.attr("href",a.match(c)[1])}var j=a.toString().split(/<br\s?\/>|\\r/i),g=this,b=g.set(),c=0,f=0;e=e||3;d=d||5;jQuery.each(j,function(m,k){var j=0,l=k.split("|||");k=k.replace(/<([A-Za-z]+(.|\n)*?)>/g,"|||<$1>").replace(/<\/([A-Za-z]*)>/g,"</$1>|||");jQuery.each(l,function(o,l){var k=null,d=null,m=0,n=0;if(l!==""){k=l;k=jQuery.trim(k.replace(/<(.|\n)*?>/g,""));a=g.text(0,0,k);h(a,l,i);d=a.wijGetBBox();m=d.width/2+c;n=-d.height/2+f;c=c+d.width+e;a.translate(m,n);b.push(a);if(j<d.height)j=d.height}});f+=j+d;c=j=0});f=0;b.transform(Raphael.format("...t{0},{1}",k-b.getBBox().x,l-b.getBBox().y));return b};Raphael.fn.line=function(a,b,c,d){return this.path(["M",a,b,"L",c,d])};Raphael.fn.roundRect=function(l,m,e,d,k,i,h,j){var a=[],c=[-1,1,1,1,1,-1,-1,-1],g=["v","h","v","h"],b=null,f=null;jQuery.each([k,i,h,j],function(c,b){if(typeof b==="number")a=a.concat({x:b,y:b});else if(typeof b==="object")a=a.concat(b);else a=a.concat({x:0,y:0})});b=["M",l+a[0].x,m];f=[d-a[0].y-a[1].y,e-a[1].x-a[2].x,a[2].y+a[3].y-d,a[3].x+a[0].x-e];jQuery.each(a,function(d,a){if(a.x&&a.y)b=b.concat("a",a.x,a.y,0,0,0,c[2*d]*a.x,c[2*d+1]*a.y);b=b.concat(g[d],f[d])});b.push("z");return this.path(b)};Raphael.fn.wrapText=function(n,o,m,g,l,f){var h=this,b=f.rotation,j=b?jQuery.extend(true,{},f,{rotation:0}):f,i=o,d=h.set(),a=null,c=null,e=[];function k(j,i,g){var b=null,f=null,a=j.toString().split(" "),e=[],c=[],d="";while(a.length){d+=" "+a[0];b=h.text(-1e3,-1e3,d);b.attr(g);f=b.wijGetBBox();if(f.width>i){if(c.length){e.push(c);d=a[0]}c=[a.shift()]}else c.push(a.shift());a.length===0&&e.push(c);b.wijRemove();b=null}return e}jQuery.each(k(m,g,j),function(q,p){var m=p.join(" "),o=l||"near",c=h.text(n,i,m),f=0,k=0;c.attr(j);a=c.wijGetBBox();switch(o){case"near":f=g-a.width/2;break;case"center":f+=g/2;break;case"far":f+=a.width/2}if(b){k+=a.height/2/Math.abs(Math.sin(b));i+=a.height/Math.abs(Math.sin(b))}else{k+=a.height/2;i+=a.height}a.x+=f;a.y+=k;if(b)c.attr({x:c.attr("x")+f,y:c.attr("y")+k});else c.transform(Raphael.format("...T{0},{1}",f,k));d.push(c);e.push(a)});if(b){a=d.wijGetBBox();if(d.length>1){jQuery.each(d,function(c,b){b.attr({y:b.attr("y")-a.height/2});e[c].y-=a.height/2});c={x:a.x+a.width/2,y:a.y+a.height/2};jQuery.each(d,function(l,g){var f=Math,h=e[l],d={x:h.x+h.width/2,y:h.y+h.height/2},j=f.sqrt(f.pow(d.x-c.x,2)+f.pow(d.y-c.y,2)),a=0,i=null,k=null;g.attr({rotation:b});if(j===0)return true;i=g.wijGetBBox();a=Raphael.deg(f.asin(f.abs(d.y-c.y)/j));if(d.y>c.y)if(d.x>c.x)a-=360;else a=-1*(a+180);else if(d.x>c.x)a*=-1;else a=-1*(180-a);k=jQuery.wijraphael.getPositionByAngle(c.x,c.y,j,-1*(b+a));g.attr({y:g.attr("y")+k.y-i.y-i.height/2})})}else d[0].transform(Raphael.format("...R{0}",b))}return d};Raphael.fn.getSVG=function(){function l(e,b){var a="<"+e+" ",c=null,d=false;jQuery.each(b,function(b,c){if(b==="text"||b==="opacity"||b==="transform"||b==="path"||b==="w"||b==="h"||b==="translation")return true;if(c){if(b==="stroke"&&c===0)c="none";a+=b+"='"+c+"' "}});if(b.opacity){c=b.opacity;a+="opacity='"+c+"' style='opacity:"+c+";";d=true}if(b.transform&&b.transform.length>0){c=b.transform;if(d)a+="transform:"+c;else{a+="style='transform:"+c;d=true}}if(d)a+="'";if(b.text){c=b.text;a+="><tspan>"+c+"</tspan>"}else a+=">";a+="</"+e+">";return a}for(var g=this,j='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="'+g.canvas.offsetWidth+'" height="'+g.canvas.offsetHeight+'"><desc>Created with Raphael</desc><defs></defs>',c="",h,f,d,e=0,k=0,b=0,i=0,a=g.bottom;a;a=a.next)if(a&&a.type)switch(a.type){case"path":for(e=0,k=a.attrs.path.length;e<k;e++){f=a.attrs.path[e];for(b=0,i=f.length;b<i;b++){d=f[b];if(b<1)c+=d;else if(b===i-1)c+=d;else c+=d+","}}if(c&&c.length>0)a.attrs.d=c.replace(/,/g," ");break;case"text":if(!a.attrs["text-anchor"])a.attrs["text-anchor"]="middle";break;case"image":h=a.transformations;a.attrs.transform=h?h.join(" "):"";break;case"ellipse":case"rect":j+=l(a.type,a.attrs)}j+="</svg>";return j};Raphael.el.wijRemove=function(){var a=this,b;if(a.removed)return;if(a.node.parentNode){b=jQuery(a.node);a.stop().remove();b.remove()}};Raphael.st.wijRemove=function(){jQuery.each(this,function(b,a){a.wijRemove&&a.wijRemove()})};Raphael.el.wijGetBBox=function(){return this.getBBox()};Raphael.el.wijAnimate=function(a,g,b,f){if(!a||jQuery.isEmptyObject(a))return;var e=this.shadow,d=0,c={easeInCubic:">",easeOutCubic:"<",easeInOutCubic:"<>",easeInBack:"backIn",easeOutBack:"backOut",easeOutElastic:"elastic",easeOutBounce:"bounce"};if(c[b])b=c[b];this.animate(a,g,b,f);c=null;if(e&&e.offset){d=e.offset;if(a.x)a.x+=d;if(a.y)a.y+=d;this.shadow.animate(a,g,b,f)}};Raphael.el.wijAttr=function(a,c){this.attr(a,c);if(this.shadow)if(typeof a==="object"){var b=jQuery.extend(true,{},a);if(b.fill)delete b.fill;if(b.stroke)delete b.stroke;if(b["stroke-width"])delete b["stroke-width"];this.shadow.attr(b,c)}else if(typeof a==="string")switch(a){case"clip-rect":case"cx":case"cy":case"fill-opacity":case"font":case"font-family":case"font-size":case"font-weight":case"height":case"opacity":case"path":case"r":case"rotation":case"rx":case"ry":case"scale":case"stroke-dasharray":case"stroke-linecap":case"stroke-linejoin":case"stroke-miterlimit":case"stroke-opacity":case"stroke-width":case"translation":case"width":this.shadow.attr(a,c);break;case"x":this.shadow.attr(a,c);this.shadow.attr("transform","...t1,0");break;case"y":this.shadow.attr(a,c);this.shadow.attr("transform","...t0,1")}};Raphael.st.wijAttr=function(b,a){jQuery.each(this.items,function(d,c){c.wijAttr(b,a)});return this};Raphael.st.wijAnimate=function(f,g,e,d){var a=0,c=0,b=null;for(a=0,c=this.items.length;a<c;a++){b=this.items[a];b.wijAnimate(f,g,e,d)}return this};Raphael.st.wijGetBBox=function(){for(var b=[],c=[],j=[],i=[],g=Math.max,h=Math.min,e="push",d="apply",a=null,f=0,f=this.items.length-1;f>=0;f--){a=this.items[f].wijGetBBox();b[e](a.x);c[e](a.y);j[e](a.x+a.width);i[e](a.y+a.height)}b=h[d](0,b);c=h[d](0,c);return{x:b,y:c,width:g[d](0,j)-b,height:g[d](0,i)-c}}})(); 
     14(function(a){"use strict";if(!window.Raphael)return;a.extend({round:function(a,b){return!a?0:Globalize.parseFloat(a.toFixed(b),10,Globalize.culture("en"))},toOADate:function(b){var c=864e5,a=b-new Date(1900,0,1)+2*c;return a},fromOADate:function(a){var c=864e5,b=new Date(a-2*c+ +new Date(1900,0,1));return b},arrayClone:function(c){var b=[];a.each(c,function(d,c){b.push(a.extend(true,{},c))});return b}});a.wijraphael={isSVGElem:function(a){var b="http://www.w3.org/2000/svg";return a.nodeType===1&&a.namespaceURI===b},addClass:function(c,b){b=b||"";a.each(c,function(){if(a.wijraphael.isSVGElem(this)){var c=this;a.each(b.split(/\s+/),function(e,d){var b=c.className?c.className.baseVal:c.getAttribute("class");if(a.inArray(d,b.split(/\s+/))===-1){b+=(b?" ":"")+d;if(c.className)c.className.baseVal=b;else c.setAttribute("class",b)}})}else a(this).addClass(b)})},clearRaphaelCache:function(){Raphael.path2curve.cache=null;Raphael.path2curve.count=null;Raphael.parseTransformString.cache=null;Raphael.parseTransformString.count=null;Raphael.parsePathString.cache=null;Raphael.parsePathString.count=null;Raphael._pathToAbsolute.cache=null;Raphael._pathToAbsolute.count=null},getPositionByAngle:function(e,f,c,d){var a={},b=Raphael.rad(d);a.x=e+c*Math.cos(-1*b);a.y=f+c*Math.sin(-1*b);return a},hasClass:function(b,c){if(!c||c.length===0)return false;if(a.wijraphael.isSVGElem(b)){var e=b.className?b.className.baseVal:b.getAttribute("class"),d=false;a.each(e.split(/\s+/),function(b,a){if(a===c){d=true;return false}});return d}else return a(b).hasClass(c)},sector:function(c,d,b,e,f){var g=a.wijraphael.getPositionByAngle(c,d,b,e),h=a.wijraphael.getPositionByAngle(c,d,b,f);return["M",c,d,"L",g.x,g.y,"A",b,b,0,+(f-e>180),0,h.x,h.y,"z"]}};var b="[\\x20\\t\\r\\n\\f]",c=a.expr.filter.CLASS;a.expr.filter.CLASS=function(c,f){if(parseFloat(a.fn.jquery)<1.8){var d=!(a.wijraphael&&a.wijraphael.isSVGElem(c))?c.className:c.className?c.className.baseVal:c.getAttribute("class");return(" "+d+" ").indexOf(f)>-1}else{var e=new RegExp("(^|"+b+")"+c+"("+b+"|$)");return function(b){var c=!(a.wijraphael&&a.wijraphael.isSVGElem(b))?b.className:b.className?b.className.baseVal:b.getAttribute("class");return e.test(c)}}};if(parseFloat(a.fn.jquery)<1.8)a.expr.preFilter.CLASS=function(d,f,g,h,j,i){var c=0,b=null,e=null;d=" "+d[1].replace(/\\/g,"")+" ";if(i)return d;for(c=0,b={};b;c++){b=f[c];if(!b)try{b=f.item(c)}catch(k){}if(b){e=!(a.wijraphael&&a.wijraphael.isSVGElem(b))?b.className:(b.className?b.className.baseVal:"")||b.getAttribute("class");if(j^(e&&(" "+e+" ").indexOf(d)>-1))!g&&h.push(b);else if(g)f[c]=false}}return false};Raphael.fn.tri=function(b,c,e){var g=b,j=c-e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c+d,i=b-a,l=c+d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.invertedTri=function(b,c,e){var g=b,j=c+e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c-d,i=b-a,l=c-d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(" "))};Raphael.fn.box=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c-a,"L",b+a,c+a,"L",b-a,c+a,"z"];return this.path(d.concat(" "))};Raphael.fn.diamond=function(b,c,a){var d=["M",b,c-a,"L",b+a,c,"L",b,c+a,"L",b-a,c,"z"];return this.path(d.concat(" "))};Raphael.fn.cross=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c+a,"M",b-a,c+a,"L",b+a,c-a];return this.path(d.concat(" "))};Raphael.fn.paintMarker=function(f,d,e,b){var c=this,a=null;if(!f)f="circle";switch(f){case"circle":a=c.circle(d,e,b);break;case"tri":a=c.tri(d,e,b);break;case"invertedTri":a=c.invertedTri(d,e,b);break;case"box":a=c.box(d,e,b);break;case"diamond":a=c.diamond(d,e,b);break;case"cross":a=c.cross(d,e,b)}return a};Raphael.prototype.htmlText=function(l,m,b,j,f,e){function i(b,a,d){var f=/<(b|strong)>/,e=/<(i|em)>/,c=/href=[\"\']([^\"\']+)[\"\']/,g=/<a/;d&&b.attr(d);f.test(a)&&b.attr("font-weight","bold");e.test(a)&&b.attr("font-style","italic");if(g.test(a))a.match(c)[1]&&b.attr("href",a.match(c)[1])}var k=b.toString().split(/<br\s?\/>|\\r/i),h=this,c=h.set(),d=0,g=0;f=f||3;e=e||5;a.each(k,function(n,l){var k=0,m=l.split("|||");l=l.replace(/<([A-Za-z]+(.|\n)*?)>/g,"|||<$1>").replace(/<\/([A-Za-z]*)>/g,"</$1>|||");a.each(m,function(p,m){var l=null,e=null,n=0,o=0;if(m!==""){l=m;l=a.trim(l.replace(/<(.|\n)*?>/g,""));b=h.text(0,0,l);i(b,m,j);e=b.wijGetBBox();n=e.width/2+d;o=-e.height/2+g;d=d+e.width+f;b.translate(n,o);c.push(b);if(k<e.height)k=e.height}});g+=k+e;d=k=0});g=0;c.transform(Raphael.format("...t{0},{1}",l-c.getBBox().x,m-c.getBBox().y));return c};Raphael.fn.line=function(a,b,c,d){return this.path(["M",a,b,"L",c,d])};Raphael.fn.roundRect=function(m,n,f,e,l,j,i,k){var b=[],d=[-1,1,1,1,1,-1,-1,-1],h=["v","h","v","h"],c=null,g=null;a.each([l,j,i,k],function(c,a){if(typeof a==="number")b=b.concat({x:a,y:a});else if(typeof a==="object")b=b.concat(a);else b=b.concat({x:0,y:0})});c=["M",m+b[0].x,n];g=[e-b[0].y-b[1].y,f-b[1].x-b[2].x,b[2].y+b[3].y-e,b[3].x+b[0].x-f];a.each(b,function(b,a){if(a.x&&a.y)c=c.concat("a",a.x,a.y,0,0,0,d[2*b]*a.x,d[2*b+1]*a.y);c=c.concat(h[b],g[b])});c.push("z");return this.path(c)};Raphael.fn.wrapText=function(o,p,j,h,n,g){var i=this,c=g.rotation,l=c?a.extend(true,{},g,{rotation:0}):g,k=p,e=i.set(),b=null,d=null,f=[];if(typeof j==="undefined")j="";function m(j,h,g){var b=null,f=null,a=j.toString().split(" "),e=[],c=[],d="";while(a.length){d+=" "+a[0];b=i.text(-1e3,-1e3,d);b.attr(g);f=b.wijGetBBox();if(f.width>h){if(c.length){e.push(c);d=a[0]}c=[a.shift()]}else c.push(a.shift());a.length===0&&e.push(c);b.wijRemove();b=null}return e}a.each(m(j,h,l),function(q,p){var j=p.join(" "),m=n||"near",a=i.text(o,k,j),d=0,g=0;a.attr(l);b=a.wijGetBBox();switch(m){case"near":d=h-b.width/2;break;case"center":d+=h/2;break;case"far":d+=b.width/2}if(c){g+=b.height/2/Math.abs(Math.sin(c));k+=b.height/Math.abs(Math.sin(c))}else{g+=b.height/2;k+=b.height}b.x+=d;b.y+=g;if(c)a.attr({x:a.attr("x")+d,y:a.attr("y")+g});else a.transform(Raphael.format("...T{0},{1}",d,g));e.push(a);f.push(b)});if(c){b=e.wijGetBBox();if(e.length>1){a.each(e,function(c,a){a.attr({y:a.attr("y")-b.height/2});f[c].y-=b.height/2});d={x:b.x+b.width/2,y:b.y+b.height/2};a.each(e,function(m,h){var g=Math,i=f[m],e={x:i.x+i.width/2,y:i.y+i.height/2},k=g.sqrt(g.pow(e.x-d.x,2)+g.pow(e.y-d.y,2)),b=0,j=null,l=null;h.attr({rotation:c});if(k===0)return true;j=h.wijGetBBox();b=Raphael.deg(g.asin(g.abs(e.y-d.y)/k));if(e.y>d.y)if(e.x>d.x)b-=360;else b=-1*(b+180);else if(e.x>d.x)b*=-1;else b=-1*(180-b);l=a.wijraphael.getPositionByAngle(d.x,d.y,k,-1*(c+b));h.attr({y:h.attr("y")+l.y-j.y-j.height/2})})}else e[0].transform(Raphael.format("...R{0}",c))}return e};Raphael.fn.getSVG=function(){function m(f,c){var b="<"+f+" ",d=null,e=false;a.each(c,function(a,c){if(a==="text"||a==="opacity"||a==="transform"||a==="path"||a==="w"||a==="h"||a==="translation")return true;if(c){if(a==="stroke"&&c===0)c="none";b+=a+"='"+c+"' "}});if(c.opacity){d=c.opacity;b+="opacity='"+d+"' style='opacity:"+d+";";e=true}if(c.transform&&c.transform.length>0){d=c.transform;if(e)b+="transform:"+d;else{b+="style='transform:"+d;e=true}}if(e)b+="'";if(c.text){d=c.text;b+="><tspan>"+d+"</tspan>"}else b+=">";b+="</"+f+">";return b}for(var h=this,k='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="'+h.canvas.offsetWidth+'" height="'+h.canvas.offsetHeight+'"><desc>Created with Raphael</desc><defs></defs>',d="",i,g,e,f=0,l=0,c=0,j=0,b=h.bottom;b;b=b.next)if(b&&b.type)switch(b.type){case"path":for(f=0,l=b.attrs.path.length;f<l;f++){g=b.attrs.path[f];for(c=0,j=g.length;c<j;c++){e=g[c];if(c<1)d+=e;else if(c===j-1)d+=e;else d+=e+","}}if(d&&d.length>0)b.attrs.d=d.replace(/,/g," ");break;case"text":if(!b.attrs["text-anchor"])b.attrs["text-anchor"]="middle";break;case"image":i=b.transformations;b.attrs.transform=i?i.join(" "):"";break;case"ellipse":case"rect":k+=m(b.type,b.attrs)}k+="</svg>";return k};Raphael.el.wijRemove=function(){var b=this,c;if(b.removed)return;if(b.node.parentNode){c=a(b.node);b.stop().remove();c.remove()}};Raphael.st.wijRemove=function(){a.each(this,function(b,a){a.wijRemove&&!a.removed&&a.wijRemove()})};Raphael.el.wijGetBBox=function(){return this.getBBox()};Raphael.el.wijAnimate=function(b,h,c,g){if(!b||a.isEmptyObject(b))return;var f=this.shadow,e=0,d={easeInCubic:">",easeOutCubic:"<",easeInOutCubic:"<>",easeInBack:"backIn",easeOutBack:"backOut",easeOutElastic:"elastic",easeOutBounce:"bounce"};if(d[c])c=d[c];this.animate(b,h,c,g);d=null;if(f&&f.offset){e=f.offset;if(b.x)b.x+=e;if(b.y)b.y+=e;this.shadow.animate(b,h,c,g)}};Raphael.el.wijAttr=function(b,d){this.attr(b,d);if(this.shadow)if(typeof b==="object"){var c=a.extend(true,{},b);if(c.fill)delete c.fill;if(c.stroke)delete c.stroke;if(c["stroke-width"])delete c["stroke-width"];this.shadow.attr(c,d)}else if(typeof b==="string")switch(b){case"clip-rect":case"cx":case"cy":case"fill-opacity":case"font":case"font-family":case"font-size":case"font-weight":case"height":case"opacity":case"path":case"r":case"rotation":case"rx":case"ry":case"scale":case"stroke-dasharray":case"stroke-linecap":case"stroke-linejoin":case"stroke-miterlimit":case"stroke-opacity":case"stroke-width":case"translation":case"width":this.shadow.attr(b,d);break;case"x":this.shadow.attr(b,d);this.shadow.attr("transform","...t1,0");break;case"y":this.shadow.attr(b,d);this.shadow.attr("transform","...t0,1")}};Raphael.st.wijAttr=function(c,b){a.each(this.items,function(d,a){a.wijAttr(c,b)});return this};Raphael.st.wijAnimate=function(f,g,e,d){var a=0,c=0,b=null;for(a=0,c=this.items.length;a<c;a++){b=this.items[a];b.wijAnimate(f,g,e,d)}return this};Raphael.st.wijGetBBox=function(){for(var b=[],c=[],j=[],i=[],g=Math.max,h=Math.min,e="push",d="apply",a=null,f=0,f=this.items.length-1;f>=0;f--){a=this.items[f].wijGetBBox();b[e](a.x);c[e](a.y);j[e](a.x+a.width);i[e](a.y+a.height)}b=h[d](0,b);c=h[d](0,c);return{x:b,y:c,width:g[d](0,j)-b,height:g[d](0,i)-c}}})(jQuery); 
  • wangguard/trunk/js/jquery.wijmo.wijbarchart.min.js

    r554850 r642891  
    11/* 
    22 * 
    3  * Wijmo Library 2.1.0 
     3 * Wijmo Library 2.3.2 
    44 * http://wijmo.com/ 
    55 * 
    6  * Copyright(c) ComponentOne, LLC.  All rights reserved. 
     6 * Copyright(c) GrapeCity, Inc.  All rights reserved. 
    77 *  
    8  * Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses. 
     8 * Licensed under the Wijmo Commercial License. Also available under the GNU GPL Version 3 license. 
    99 * licensing@wijmo.com 
    10  * http://wijmo.com/license 
     10 * http://wijmo.com/widgets/license/ 
    1111 * 
    1212 * 
    1313 **/ 
    14 (function(a){"use strict";a.widget("wijmo.wijbarchart",a.wijmo.wijchartcore,{options:{horizontal:true,stacked:false,is100Percent:false,clusterOverlap:0,clusterWidth:85,clusterRadius:0,clusterSpacing:0,animation:{enabled:true,duration:400,easing:">"},seriesTransition:{enabled:true,duration:400,easing:">"},mouseDown:null,mouseUp:null,mouseOver:null,mouseOut:null,mouseMove:null,click:null},_create:function(){var c=this,b=c.options,e=c._getDefFill(),d;if(b.horizontal){d=b.axis.y.compass||"south";b.axis.y.compass=b.axis.x.compass||"west";b.axis.x.compass=d}a.extend(true,{compass:"east"},b.hint);a.each(b.seriesStyles,function(b,a){if(!a.fill)a.fill=e[b]});e=null;a.wijmo.wijchartcore.prototype._create.apply(c,arguments);c.chartElement.addClass("wijmo-wijbarchart")},_setOption:function(c,b){c==="horizontal"&&!b&&a.extend(true,this.options.axis,{x:{compass:"south"},y:{compass:"west"}});a.wijmo.wijchartcore.prototype._setOption.apply(this,arguments)},destroy:function(){var e=this,c=e.chartElement,d=c.data("fields"),b=d&&d.bars;c.removeClass("wijmo-wijbarchart");a.wijmo.wijchartcore.prototype.destroy.apply(this,arguments);b&&b.length&&a.each(b,function(b,a){a=null});c.data("fields",null)},_clearChartElement:function(){var b=this,d=b.options,c=b.chartElement.data("fields");a.wijmo.wijchartcore.prototype._clearChartElement.apply(b,arguments);b.element.removeData("plotInfos");if(!d.seriesTransition.enabled)if(c&&c.aniBarsAttr)c.aniBarsAttr=null},_isBarChart:function(){return true},getBar:function(c){var a=this.chartElement,b=a.data("fields");return b.chartElements.bars[c]},_paintTooltip:function(){var c=this,d=c.chartElement,b=d.data("fields");a.wijmo.wijchartcore.prototype._paintTooltip.apply(this,arguments);if(c.tooltip)if(b&&b.trackers&&b.trackers.length){c.tooltip.setTargets(b.trackers);c.tooltip.setOptions({relatedElement:b.trackers[0]})}},_getTooltipText:function(e,d){var c=a(d.node),b,f;if(c.data("owner"))c=c.data("owner");b=c.data("wijchartDataObj");f={data:b,value:b.value,label:b.label,total:b.total,target:d,fmt:e,x:b.x,y:b.y};return a.proxy(e,f)()},_paintPlotArea:function(){var b=this,c=b.options;b.chartElement.wijbar({canvas:b.canvas,bounds:b.canvasBounds,tooltip:b.tooltip,widgetName:b.widgetName,horizontal:c.horizontal,stacked:c.stacked,axis:c.axis,seriesList:c.seriesList,seriesStyles:c.seriesStyles,seriesHoverStyles:c.seriesHoverStyles,seriesTransition:c.seriesTransition,showChartLabels:c.showChartLabels,textStyle:c.textStyle,chartLabelStyle:c.chartLabelStyle,chartLabelFormatString:c.chartLabelFormatString,shadow:c.shadow,disabled:c.disabled,clusterOverlap:c.clusterOverlap,clusterWidth:c.clusterWidth,clusterSpacing:c.clusterSpacing,is100Percent:c.is100Percent,clusterRadius:c.clusterRadius,animation:c.animation,isYTime:b.axisInfo.y[0].isTime,isXTime:b.axisInfo.x.isTime,mouseDown:a.proxy(b._mouseDown,b),mouseUp:a.proxy(b._mouseUp,b),mouseOver:a.proxy(b._mouseOver,b),mouseOut:a.proxy(b._mouseOut,b),mouseMove:a.proxy(b._mouseMove,b),click:a.proxy(b._click,b)})},_showSerieEles:function(b){a.each(b,function(b,a){if(a.bar){a.bar.show();a.bar.shadow&&a.bar.shadow.show();a.bar.tracker&&a.bar.tracker.show()}a.dcl&&a.dcl.show();a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.show()})},_hideSerieEles:function(b){a.each(b,function(b,a){if(a.bar){a.bar.hide();a.bar.shadow&&a.bar.shadow.hide();a.bar.tracker&&a.bar.tracker.hide()}a.dcl&&a.dcl.hide();a.animatedBar&&!a.animatedBar.removed&&a.animatedBar.hide()})},_calculateParameters:function(c,e){a.wijmo.wijchartcore.prototype._calculateParameters.apply(this,arguments);if(c.id==="x"){var d=e.unitMinor,b=this._getBarAdjustment(c);if(b===0)b=d;else if(d<b&&d!==0)b=Math.floor(b/d)*d;c.min-=b;c.max+=b;this._calculateMajorMinor(e,c)}},_getBarAdjustment:function(e){for(var a=0,h=this.options,g=e.max,b=e.min,d=h.seriesList,c=0,f=0,c=0;c<d.length&&d[c].data.x;c++){f=d[c].data.x.length;if(a<f)a=f}if(a>1)return(g-b)/a*h.clusterWidth*.0125;else if(a===1){if(b===0&&g===1){b=-1;e.min=b}return(g-b)*.0125}else return 0}});function b(c){var b=this;b.x=c;b.paSpec=[];b.stackValues=function(){var d=b.paSpec.length,c;if(d>1){c=b.paSpec[0];a.each(b.paSpec,function(b,a){if(b===0)return true;a.y+=c.y;c=a})}}}a.fn.extend({wijbar:function(c){var D=function(b,d,e){c.shadow&&a.wijchart.paintShadow(b,d,e)},u=a.wijraphael.addClass,E=a.wijchart.getScaling,A=a.wijchart.getTranslation,f=this,e=c.canvas,i=c.widgetName,d=c.horizontal,l=c.stacked,t=a.arrayClone(c.seriesList),v=t.length,C=[].concat(c.seriesStyles.slice(0,v)),z=[].concat(c.seriesHoverStyles.slice(0,v)),r=c.bounds,q=c.animation,I=q&&q.enabled,p={x:r.startX,y:r.startY},N=r.endX-p.x,L=r.endY-p.y,m=c.axis.x,x=c.axis.y,k=c.disabled,F=c.mouseDown,K=c.mouseUp,H=c.mouseOver,J=c.mouseOut,G=c.mouseMove,M=c.click,w=E(d,m.max,m.min,d?L:N),O=A(d,p,m.max,m.min,w),s,y,g=f.data("fields")||{},o=g.chartElements||{},j=g.aniBarsAttr,h,Z=c.isYTime,Y=c.isXTime;function W(d){for(var a=Number.MAX_VALUE,e=d.length,c,b=1;b<e;b++){c=d[b].x-d[b-1].x;if(c<a&&c>0)a=c}return a===Number.MAX_VALUE?2:a}function V(b){a.each(b,function(b,a){a.stackValues()});return b}function B(f){var c=[],d=a.wijchart.getXSortedPoints;function e(n,m){var h=d(m),l=m.length,f=null,o=0,e=0,g=0,k=true,i=0,j=false;if(h)o=h.length;if(c)g=c.length;if(h===undefined)return;a.each(h,function(d,a){if(k){k=false;i=a.x}else{if(i===a.x)j=true;else j=false;i=a.x}while(e<g&&c[e].x<a.x)e++;if(e<g)if(c[e].x!==a.x){f=new b(a.x,l);c.splice(e,0,f);g=c.length}else f=c[e];else{f=new b(a.x,l);c.push(f);g=c.length}f.paSpec.push({y:a.y,sIdx:n,pIdx:d,dupl:j})})}a.each(f,function(b,a){e(b,a)});return c}function n(a,c,b){return a<c?c:a>b?b:a}function R(c,d,e,f,g,b){a.each(b,function(j,a){var h=a.x,i=a.y,b=0;a.x=d*h+f;a.y=e*i+g;if(c){b=a.x;a.x=a.y;a.y=b}});return b}function P(b,n,m,l){var i=a.extend(true,{},c.textStyle,c.chartLabelStyle),h=d?{x:b.x+b.width,y:b.y+b.height/2}:{x:b.x+b.width/2,y:b.y},k=c.chartLabelFormatString,j,f,g=n;if(l)i=a.extend(true,i,l);if(m)g=a.fromOADate(n);if(k&&k.length)g=Globalize.format(g,c.chartLabelFormatString);else if(!m)g=a.round(g,2);f=e.text(h.x,h.y,g).attr(i);u(a(f.node),"wijbarchart-label");j=f.getBBox();if(d)f.attr({x:h.x+j.width/2});else f.attr({y:h.y-j.height/2});return f}function X(i,r,Q,v,w,s,H,F,E,M,p,C,O,L,t){var N=c.is100Percent,z=v.min,y=v.max,B=w.min,A=w.max,T=v.scale,U=v.late,I=w.scale,K=w.late,x,b,G,f,u=null,g,J=s,o=s["stroke-width"],S=s.stroke,h,m,j,k,q=-1;if(t.origin!==null)q=I*t.origin+K;if(l)if(N){if(C>0)i.height=r/C;if(p||p===0){i.y=p/C;i.height-=i.y}}else{i.height=r;if(p||p===0){i.height-=p;i.y=p}}else if(p||p===0){i.x+=i.width*(1-M);i.height=r}b=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y+i.height}];G=(z<=b[0].x&&b[0].x<=y||z<=b[1].x&&b[1].x<=y)&&(B<=b[0].y&&b[0].y<=A||B<=b[1].y&&b[1].y<=A);b[0].x=n(b[0].x,z,y);b[0].y=n(b[0].y,B,A);b[1].x=n(b[1].x,z,y);b[1].y=n(b[1].y,B,A);b=R(d,T,I,U,K,b);if(b[0].x>b[1].x){x=b[0].x;b[0].x=b[1].x;b[1].x=x}if(b[0].y>b[1].y){x=b[0].y;b[0].y=b[1].y;b[1].y=x}f={x:b[0].x,y:b[0].y,width:b[1].x-b[0].x,height:b[1].y-b[0].y};if(G){if(f.width===0)f.width=.5;if(f.height===0)f.height=.5}if(c.showChartLabels)u=P(f,r,O,L);g=s.r?s.r:c.clusterRadius;if(g)J=a.extend(true,{},s,{r:0});if(S!=="none"&&o)o=parseInt(o,10);if(!o||isNaN(o))o=0;m=f.width-o;j=f.height-o;if(m<0)m=0;if(j<0)j=0;if(H){if(q===-1)if(d)q=E.x;else q=E.y+Q-o;if(g){if(d){if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,0,0,g,g).hide();else h=e.roundRect(f.x,f.y,m,j,g,g,0,0).hide();k=e.rect(q,f.y,0,j)}else{if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,g,0,0,g).hide();else h=e.roundRect(f.x,f.y,m,j,0,g,g,0).hide();k=e.rect(f.x,q,f.width,0)}D(k,F);k.wijAttr(J);k.bar=h}else{if(d)h=e.rect(q,f.y,0,j);else h=e.rect(f.x,q,f.width,0);k=h}if(u){u.attr({opacity:0});k.chartLabel=u}k.left=f.x;k.top=f.y;k.width=m;k.height=j;k.r=g}else if(g)if(d)if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,0,0,g,g);else h=e.roundRect(f.x,f.y,m,j,g,g,0,0);else if(r>t.origin)h=e.roundRect(f.x,f.y,m,j,g,0,0,g);else h=e.roundRect(f.x,f.y,m,j,0,g,g,0);else h=e.rect(f.x,f.y,m,j);D(h,F);if(H&&g)h.shadow&&h.shadow.hide();h.wijAttr(s);return{rect:f,dcl:u,animatedBar:k,bar:h}}function T(i,J,F,K,v,C,p,q,n,w){var f=c.clusterOverlap/100,H=c.clusterWidth/100,t=1,G=c.clusterSpacing+t,o=i.length,b,g,k=[],D=[],r=[],j=[],z=[],h=[],m=e.set();if(n||w){a.each(i,function(d,c){var b=a.extend(true,{},c);b.data&&b.data.y&&b.data.y.length&&n&&a.each(b.data.y,function(d,c){b.data.y[d]=a.toOADate(c)});b.data&&b.data.x&&b.data.x.length&&w&&a.each(b.data.x,function(d,c){b.data.x[d]=a.toOADate(c)});z.push(b)});b=B(z)}else b=B(i);if(l)b=V(b);g=W(b)*H;if(o>1&&!l){f-=b.length*(o-1)*G/(d?p:C);g/=o*(1-f)+f}a.each(b,function(o,B){var e=B.paSpec,G=e.length,z,w,c,b;if(l)z=g;else z=g*(G*(1-f)+f);w={x:B.x-z/2,y:0,width:g,height:e[0].y};a.each(e,function(g,N){if(!j[g])j[g]=[];if(!h[g])h[g]=[];if(w.height===undefined)return true;var H=N.sIdx,L=J[H],z=i[H],l,M=z.yAxis||0,B=x[M]||x,G=v[M]||v;s=E(!d,B.max,B.min,d?C:p);y=A(!d,q,B.max,B.min,s);G.late=y;G.scale=s;b=X(w,N.y,p,K,G,L,I,t,q,f,g>0?e[g-1].y:null,e[e.length-1].y,n,z.textStyle,B);c=b.bar;l=c.clone().attr({opacity:.01,fill:"white","stroke-width":0,"fill-opacity":.01});if(z.visible===false){c.hide();b.dcl&&b.dcl.hide();l.hide();c.shadow&&c.shadow.hide()}u(a(c.node),"wijchart-canvas-object wijbarchart");a(c.node).data("wijchartDataObj",a.extend(false,{index:o,bar:c,type:"bar",style:L,hoverStyle:F[H],x:z.data.x[o],y:z.data.y[o]},z));a(l.node).data("owner",a(c.node));u(a(l.node),"wijbarchart bartracker");b.bar.tracker=l;m.push(l);D.push(c);b.animatedBar&&r.push(b.animatedBar);b.dcl&&k.push(b.dcl);j[g][o]=b.rect;h[g][o]=b;c=null;l=null})});a.each(k,function(b,a){a.toFront()});m.toFront();return{bars:D,animatedBars:r,rects:j,chartLabels:k,seriesEles:h,trackers:m}}function U(k){var e=c.seriesTransition,f,h,i=[],b;if(I){f=q.duration||2e3;h=q.easing||"linear";a.each(k,function(g,c){var k=d?{width:c.width,x:c.left}:{height:c.height,y:c.top};if(j&&e.enabled)if(j.length>g){b=a.wijchart.getDiffAttrs(j[g],c.attr());if(d){b.x=j[g].x;b.width=j[g].width}else{b.y=j[g].y;b.height=j[g].height}if(b.path)delete b.path;c.attr(b);f=e.duration;h=e.easing}i.push(a.extend(true,{},c.attr(),k));c.tracker&&c.tracker.hide();c.stop().wijAnimate(k,f,h,function(){var a=this,c=a.r,b=a;a.chartLabel&&a.chartLabel.wijAnimate({opacity:1},250);if(a.tracker){a.tracker.show();a.tracker.attr({width:a.width,height:a.height,x:a.attr("x"),y:a.attr("y")})}if(c){b=a.bar;b.show();b.shadow&&b.shadow.show();if(a.shadow){a.shadow.wijRemove();a.shadow=null}a.wijRemove();a=null}})});g.aniBarsAttr=i}}function S(){var b=a.isFunction;a(".wijbarchart",f[0]).live("mousedown."+i,function(e){if(k)return;if(b(F)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");F.call(f,e,d);d=null}}).live("mouseup."+i,function(e){if(k)return;if(b(K)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");K.call(f,e,d);d=null}}).live("mouseover."+i,function(e){if(k)return;if(b(H)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");H.call(f,e,d);d=null}}).live("mouseout."+i,function(g){if(k)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"1"});else e.attr(c.style);b(J)&&J.call(f,g,c);c=null}).live("mousemove."+i,function(g){if(k)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"0.8"});else e.attr(c.hoverStyle);b(G)&&G.call(f,g,c);c=null}).live("click."+i,function(e){if(k)return;if(b(M)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");M.call(f,e,d)}})}function Q(){a(".wijbarchart",f[0]).die(i).die("."+i)}Q();if(d&&!l){t.reverse();C.reverse();z.reverse()}if(v===0)return;h=T(t,C,z,{min:m.min,max:m.max,late:O,scale:w},x,N,L,p,Z,Y);f.data("plotInfos",{xscale:w,xlate:O,yscale:s,ylate:y,rects:h.rects});U(h.animatedBars);o.bars=h.bars;o.animatedBars=h.animatedBars;o.chartLabels=h.chartLabels;g.seriesEles=h.seriesEles;g.trackers=h.trackers;if(!g.chartElements)g.chartElements={};d&&!l&&g.seriesEles.reverse();a.extend(true,g.chartElements,o);f.data("fields",g);S()}})})(jQuery); 
     14(function(a){"use strict";a.widget("wijmo.wijbarchart",a.wijmo.wijchartcore,{options:{horizontal:true,stacked:false,is100Percent:false,clusterOverlap:0,clusterWidth:85,clusterRadius:0,clusterSpacing:0,animation:{enabled:true,duration:400,easing:">"},seriesTransition:{enabled:true,duration:400,easing:">"},mouseDown:null,mouseUp:null,mouseOver:null,mouseOut:null,mouseMove:null,click:null},widgetEventPrefix:"wijbarchart",_create:function(){var c=this,b=c.options,e=c._getDefFill(),d;if(b.horizontal){d=b.axis.y.compass||"south";b.axis.y.compass=b.axis.x.compass||"west";b.axis.x.compass=d}a.extend(true,{compass:"east"},b.hint);c._hotFixForJQ1_9();a.each(b.seriesStyles,function(b,a){if(!a.fill)a.fill=e[b]});e=null;a.wijmo.wijchartcore.prototype._create.apply(c,arguments);c.chartElement.addClass("wijmo-wijbarchart")},_setOption:function(c,b){c==="horizontal"&&a.extend(true,this.options.axis,{x:{compass:b?"west":"south"},y:{compass:b?"south":"west"}});a.wijmo.wijchartcore.prototype._setOption.apply(this,arguments)},destroy:function(){var e=this,c=e.chartElement,d=c.data("fields"),b=d&&d.bars;c.removeClass("wijmo-wijbarchart");a.wijmo.wijchartcore.prototype.destroy.apply(this,arguments);b&&b.length&&a.each(b,function(b,a){a=null});c.data("fields",null)},_clearChartElement:function(){var b=this,d=b.options,c=b.chartElement.data("fields");a.wijmo.wijchartcore.prototype._clearChartElement.apply(b,arguments);b.element.removeData("plotInfos");if(!d.seriesTransition.enabled)if(c&&c.aniBarsAttr)c.aniBarsAttr=null},_isBarChart:function(){return true},getBar:function(c){var a=this.chartElement,b=a.data("fields");return b.chartElements.bars[c]},_paintTooltip:function(){var c=this,d=c.chartElement,b=d.data("fields");a.wijmo.wijchartcore.prototype._paintTooltip.apply(this,arguments);if(c.tooltip)if(b&&b.trackers&&b.trackers.length){c.tooltip.setTargets(b.trackers);c.tooltip.setOptions({relatedElement:b.trackers[0]})}},_getTooltipText:function(e,d){var c=a(d.node),b,f;if(c.data("owner"))c=c.data("owner");b=c.data("wijchartDataObj");f={data:b,value:b.value,label:b.label,total:b.total,target:d,fmt:e,x:b.x,y:b.y};return a.proxy(e,f)()},_paintPlotArea:function(){var b=this,c=b.options;b.chartElement.wijbar({canvas:b.canvas,bounds:b.canvasBounds,tooltip:b.tooltip,widgetName:b.widgetName,horizontal:c.horizontal,stacked:c.stacked,axis:c.axis,seriesList:c.seriesList,seriesStyles:c.seriesStyles,seriesHoverStyles:c.seriesHoverStyles,seriesTransition:c.seriesTransition,showChartLabels:c.showChartLabels,textStyle:c.textStyle,chartLabelStyle:c.chartLabelStyle,chartLabelFormatString:c.chartLabelFormatString,shadow:c.shadow,disabled:c.disabled,clusterOverlap:c.clusterOverlap,clusterWidth:c.clusterWidth,clusterSpacing:c.clusterSpacing,is100Percent:c.is100Percent,clusterRadius:c.clusterRadius,animation:c.animation,culture:b._getCulture(),isYTime:b.axisInfo.y[0].isTime,isXTime:b.axisInfo.x.isTime,mouseDown:a.proxy(b._mouseDown,b),mouseUp:a.proxy(b._mouseUp,b),mouseOver:a.proxy(b._mouseOver,b),mouseOut:a.proxy(b._mouseOut,b),mouseMove:a.proxy(b._mouseMove,b),click:a.proxy(b._click,b),widget:this})},_showSerieEles:function(b){a.each(b,function(c,b){if(b&&b.bar){b.bar.show();b.bar.shadow&&b.bar.shadow.show();b.bar.tracker&&b.bar.tracker.show();if(a(b.bar.node).data("wijchartDataObj"))a(b.bar.node).data("wijchartDataObj").visible=true}b&&b.dcl&&b.dcl.show();b&&b.animatedBar&&!b.animatedBar.removed&&b.animatedBar.show()})},_hideSerieEles:function(b){a.each(b,function(c,b){if(b&&b.bar){b.bar.hide();b.bar.shadow&&b.bar.shadow.hide();b.bar.tracker&&b.bar.tracker.hide();if(a(b.bar.node).data("wijchartDataObj"))a(b.bar.node).data("wijchartDataObj").visible=false}b&&b.dcl&&b.dcl.hide();b&&b.animatedBar&&!b.animatedBar.removed&&b.animatedBar.hide()})},_indicatorLineShowing:function(b){a.wijmo.wijchartcore.prototype._indicatorLineShowing.apply(this,arguments);a.each(b,function(b,a){a.bar&&a.bar.attr(a.hoverStyle)})},_removeIndicatorStyles:function(b){a.each(b,function(b,a){a.bar&&a.bar.attr(a.style)})},_supportStacked:function(){return true},_calculateParameters:function(c,e){a.wijmo.wijchartcore.prototype._calculateParameters.apply(this,arguments);if(c.id==="x"){var d=e.unitMinor,b=this._getBarAdjustment(c);if(b===0)b=d;else if(d<b&&d!==0)b=Math.floor(b/d)*d;c.min-=b;c.max+=b;this._calculateMajorMinor(e,c)}},_getBarAdjustment:function(e){for(var a=0,h=this.options,g=e.max,b=e.min,d=h.seriesList,c=0,f=0,c=0;c<d.length&&d[c].data.x;c++){f=d[c].data.x.length;if(a<f)a=f}if(a>1)return(g-b)/a*h.clusterWidth*.0125;else if(a===1){if(b===0&&g===1){b=-1;e.min=b}return(g-b)*.0125}else return 0}});function b(c){var b=this;b.x=c;b.paSpec=[];b.stackValues=function(){var d=b.paSpec.length,c;if(d>1){c=b.paSpec[0];a.each(b.paSpec,function(b,a){if(b===0)return true;a.y+=c.y;c=a})}}}a.fn.extend({wijbar:function(c){var E=function(b,d,e){c.shadow&&a.wijchart.paintShadow(b,d,e)},v=a.wijraphael.addClass,F=a.wijchart.getScaling,B=a.wijchart.getTranslation,f=this,e=c.canvas,i=c.widgetName,d=c.horizontal,m=c.stacked,u=a.arrayClone(c.seriesList),w=u.length,D=[].concat(c.seriesStyles.slice(0,w)),A=[].concat(c.seriesHoverStyles.slice(0,w)),s=c.bounds,r=c.animation,J=r&&r.enabled,q={x:s.startX,y:s.startY},O=s.endX-q.x,M=s.endY-q.y,n=c.axis.x,y=c.axis.y,l=c.disabled,G=c.mouseDown,L=c.mouseUp,I=c.mouseOver,K=c.mouseOut,H=c.mouseMove,N=c.click,x=F(d,n.max,n.min,d?M:O),P=B(d,q,n.max,n.min,x),t,z,g=f.data("fields")||{},p=g.chartElements||{},k=g.aniBarsAttr,h,bb=c.isYTime,ab=c.isXTime,Z=c.culture,j=c.widget;function X(d){for(var a=Number.MAX_VALUE,e=d.length,c,b=1;b<e;b++){c=d[b].x-d[b-1].x;if(c<a&&c>0)a=c}return a===Number.MAX_VALUE?2:a}function W(b){a.each(b,function(b,a){a.stackValues()});return b}function C(f){var c=[],d=a.wijchart.getXSortedPoints;function e(n,m){var h=d(m),l=m.length,f=null,o=0,e=0,g=0,k=true,i=0,j=false;if(h)o=h.length;if(c)g=c.length;if(h===undefined)return;a.each(h,function(d,a){if(k){k=false;i=a.x}else{if(i===a.x)j=true;else j=false;i=a.x}while(e<g&&c[e].x<a.x)e++;if(e<g)if(c[e].x!==a.x){f=new b(a.x,l);c.splice(e,0,f);g=c.length}else f=c[e];else{f=new b(a.x,l);c.push(f);g=c.length}f.paSpec.push({y:a.y,sIdx:n,pIdx:d,dupl:j})})}a.each(f,function(b,a){e(b,a)});return c}function o(a,c,b){return a<c?c:a>b?b:a}function S(c,d,e,f,g,b){a.each(b,function(j,a){var h=a.x,i=a.y,b=0;a.x=d*h+f;a.y=e*i+g;if(c){b=a.x;a.x=a.y;a.y=b}});return b}function Q(b,n,m,l){var i=a.extend(true,{},c.textStyle,c.chartLabelStyle),h=d?{x:b.x+b.width,y:b.y+b.height/2}:{x:b.x+b.width/2,y:b.y},k=c.chartLabelFormatString,j,f,g=n;if(l)i=a.extend(true,i,l);if(m)g=a.fromOADate(n);if(k&&k.length)g=Globalize.format(g,c.chartLabelFormatString,Z);else if(!m)g=a.round(g,2);f=e.text(h.x,h.y,g).attr(i);v(a(f.node),"wijbarchart-label");j=f.getBBox();if(d)f.attr({x:h.x+j.width/2});else f.attr({y:h.y-j.height/2});return f}function Y(j,r,P,v,w,s,H,F,D,M,p,C,O,L,t){var N=c.is100Percent,z=v.min,y=v.max,B=w.min,A=w.max,T=v.scale,U=v.late,I=w.scale,K=w.late,x,f,G,b,u=null,g,J=s,n=s["stroke-width"],R=s.stroke,h,k,i,l,q=-1;if(t.origin!==null)q=I*t.origin+K;if(m)if(N){if(C>0)j.height=r/C;if(p||p===0){j.y=p/C;j.height-=j.y}}else{j.height=r;if(p||p===0){j.height-=p;j.y=p}}else if(p||p===0){j.x+=j.width*(1-M);j.height=r}f=[{x:j.x,y:j.y},{x:j.x+j.width,y:j.y+j.height}];G=(z<=f[0].x&&f[0].x<=y||z<=f[1].x&&f[1].x<=y)&&(B<=f[0].y&&f[0].y<=A||B<=f[1].y&&f[1].y<=A);f[0].x=o(f[0].x,z,y);f[0].y=o(f[0].y,B,A);f[1].x=o(f[1].x,z,y);f[1].y=o(f[1].y,B,A);f=S(d,T,I,U,K,f);if(f[0].x>f[1].x){x=f[0].x;f[0].x=f[1].x;f[1].x=x}if(f[0].y>f[1].y){x=f[0].y;f[0].y=f[1].y;f[1].y=x}b={x:f[0].x,y:f[0].y,width:f[1].x-f[0].x,height:f[1].y-f[0].y};if(G){if(b.width===0)b.width=1;if(b.height===0){b.height=1;b.y-=1}}if(c.showChartLabels)u=Q(b,r,O,L);g=s.r?s.r:c.clusterRadius;if(g)J=a.extend(true,{},s,{r:0});if(R!=="none"&&n)n=parseInt(n,10);if(!n||isNaN(n))n=0;k=b.width;i=b.height;if(n>1){n--;k=b.width-n;i=b.height-n/2;b.x+=n/2}if(k<0)k=0;if(i<0)i=0;if(H){if(q===-1)if(d)q=D.x+n/2;else q=D.y+P-n/2;if(g){if(d){if(r>t.origin)h=e.roundRect(b.x,b.y,k,i,0,0,g,g).hide();else h=e.roundRect(b.x,b.y,k,i,g,g,0,0).hide();l=e.rect(q,b.y,0,i)}else{if(r>t.origin)h=e.roundRect(b.x,b.y,k,i,g,0,0,g).hide();else h=e.roundRect(b.x,b.y,k,i,0,g,g,0).hide();l=e.rect(b.x,q,b.width,0)}E(l,F);l.wijAttr(J);l.bar=h}else{if(d)h=e.rect(q,b.y,0,i);else h=e.rect(b.x,q,k,0);l=h}if(u){u.attr({opacity:0});l.chartLabel=u}l.left=b.x;l.top=b.y;l.width=k;l.height=i;l.r=g}else if(g)if(d)if(r>t.origin)h=e.roundRect(b.x,b.y,k,i,0,0,g,g);else h=e.roundRect(b.x,b.y,k,i,g,g,0,0);else if(r>t.origin)h=e.roundRect(b.x,b.y,k,i,g,0,0,g);else h=e.roundRect(b.x,b.y,k,i,0,g,g,0);else h=e.rect(b.x,b.y,k,i);E(h,F);if(H&&g)h.shadow&&h.shadow.hide();h.wijAttr(s);return{rect:b,dcl:u,animatedBar:l,bar:h}}function U(k,M,I,N,A,G,s,u,q,D){var f=c.clusterOverlap/100,L=c.clusterWidth/100,x=1,K=c.clusterSpacing+x,r=k.length,b,h,g,n=[],H=[],w=[],l=[],E=[],i=[],p=e.set(),o;if(q||D){a.each(k,function(d,c){var b=a.extend(true,{},c);b.data&&b.data.y&&b.data.y.length&&q&&a.each(b.data.y,function(d,c){b.data.y[d]=a.toOADate(c)});b.data&&b.data.x&&b.data.x.length&&D&&a.each(b.data.x,function(d,c){b.data.x[d]=a.toOADate(c)});E.push(b)});b=C(E)}else b=C(k);if(m)b=W(b);h=X(b)*L;if(r>1&&!m){f-=b.length*(r-1)*K/(d?s:G);h/=r*(1-f)+f}a.each(b,function(L,E){var r=E.paSpec,K=r.length,D,C,e,b;if(m)D=h;else D=h*(K*(1-f)+f);C={x:E.x-D/2,y:0,width:h,height:r[0].y};a.each(r,function(R,O){if(C.height===undefined)return true;var h=O.sIdx,K=O.pIdx,P=M[h],D=k[h],m,Q=D.yAxis||0,E=y[Q]||y,L=A[Q]||A;if(!l[h])l[h]=[];if(!i[h])i[h]=[];t=F(!d,E.max,E.min,d?G:s);z=B(!d,u,E.max,E.min,t);L.late=z;L.scale=t;b=Y(C,O.y,s,N,L,P,J,x,u,f,R>0?r[R-1].y:null,r[r.length-1].y,q,D.textStyle,E);e=b.bar;m=e.clone().attr({opacity:.01,fill:"white","stroke-width":0,"fill-opacity":.01});if(D.visible===false){e.hide();b.dcl&&b.dcl.hide();m.hide();e.shadow&&e.shadow.hide()}v(a(e.node),"wijchart-canvas-object wijbarchart");o=a.extend(false,{index:K,bar:e,type:"bar",style:P,hoverStyle:I[h],x:D.data.x[K],y:D.data.y[K],visible:true},D);a(e.node).data("wijchartDataObj",o);j.dataPoints=j.dataPoints||{};j.pointXs=j.pointXs||[];if(c.horizontal)g=a.round(b.rect.y+b.rect.height/2,2);else g=a.round(b.rect.x+b.rect.width/2,2);if(!j.dataPoints[g.toString()]){j.dataPoints[g.toString()]=[];j.pointXs.push(g)}j.dataPoints[g.toString()].push(o);a(m.node).data("owner",a(e.node));v(a(m.node),"wijbarchart bartracker");b.bar.tracker=m;p.push(m);H.push(e);b.animatedBar&&w.push(b.animatedBar);b.dcl&&n.push(b.dcl);l[h][K]=b.rect;i[h][K]=b;e=null;m=null})});a.each(n,function(b,a){a.toFront()});p.toFront();return{bars:H,animatedBars:w,rects:l,chartLabels:n,seriesEles:i,trackers:p}}function V(j){var e=c.seriesTransition,f,h,i=[],b;if(J){f=r.duration||2e3;h=r.easing||"linear";a.each(j,function(g,c){var j=d?{width:c.width,x:c.left}:{height:c.height,y:c.top};if(k&&e.enabled)if(k.length>g){b=a.wijchart.getDiffAttrs(k[g],c.attr());if(d){b.x=k[g].x;b.width=k[g].width}else{b.y=k[g].y;b.height=k[g].height}if(b.path)delete b.path;c.attr(b);f=e.duration;h=e.easing}i.push(a.extend(true,{},c.attr(),j));c.tracker&&c.tracker.hide();c.stop().wijAnimate(j,f,h,function(){var a=this,c=a.r,b=a;a.chartLabel&&a.chartLabel.wijAnimate({opacity:1},250);if(a.tracker){a.tracker.show();a.tracker.attr({width:a.width,height:a.height,x:a.attr("x"),y:a.attr("y")})}if(c){b=a.bar;b.show();b.shadow&&b.shadow.show();if(a.shadow){a.shadow.wijRemove();a.shadow=null}a.wijRemove();a=null}})});g.aniBarsAttr=i}}function T(){var b=a.isFunction;a(".wijbarchart",f[0]).live("mousedown."+i,function(e){if(l)return;if(b(G)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");G.call(f,e,d);d=null}}).live("mouseup."+i,function(e){if(l)return;if(b(L)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");L.call(f,e,d);d=null}}).live("mouseover."+i,function(e){if(l)return;if(b(I)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");I.call(f,e,d);d=null}}).live("mouseout."+i,function(g){if(l)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"1"});else e.attr(c.style);b(K)&&K.call(f,g,c);c=null}).live("mousemove."+i,function(g){if(l)return;var d=a(g.target),c,e;if(d.data("owner"))d=d.data("owner");c=d.data("wijchartDataObj");e=c.bar;if(!c.hoverStyle)e&&e.attr({opacity:"0.8"});else e.attr(c.hoverStyle);b(H)&&H.call(f,g,c);c=null}).live("click."+i,function(e){if(l)return;if(b(N)){var c=a(e.target),d;if(c.data("owner"))c=c.data("owner");d=c.data("wijchartDataObj");N.call(f,e,d)}})}function R(){a(".wijbarchart",f[0]).die(i).die("."+i)}R();if(d&&!m){u.reverse();D.reverse();A.reverse()}if(w===0)return;h=U(u,D,A,{min:n.min,max:n.max,late:P,scale:x},y,O,M,q,bb,ab);f.data("plotInfos",{xscale:x,xlate:P,yscale:t,ylate:z,rects:h.rects});V(h.animatedBars);p.bars=h.bars;p.animatedBars=h.animatedBars;p.chartLabels=h.chartLabels;g.seriesEles=h.seriesEles;g.trackers=h.trackers;if(!g.chartElements)g.chartElements={};d&&!m&&g.seriesEles.reverse();a.extend(true,g.chartElements,p);f.data("fields",g);T()}})})(jQuery); 
  • wangguard/trunk/js/jquery.wijmo.wijchartcore.min.js

    r554850 r642891  
    11/* 
    22 * 
    3  * Wijmo Library 2.1.0 
     3 * Wijmo Library 2.3.2 
    44 * http://wijmo.com/ 
    55 * 
    6  * Copyright(c) ComponentOne, LLC.  All rights reserved. 
     6 * Copyright(c) GrapeCity, Inc.  All rights reserved. 
    77 *  
    8  * Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses. 
     8 * Licensed under the Wijmo Commercial License. Also available under the GNU GPL Version 3 license. 
    99 * licensing@wijmo.com 
    10  * http://wijmo.com/license 
     10 * http://wijmo.com/widgets/license/ 
    1111 * 
    1212 * 
    1313 **/ 
    14 (function(a){"use strict";if(!window.Raphael)return;a.wijchart={getDiffAttrs:function(d,b){var c={};a.each(b,function(a){if(typeof d==="undefined")return true;else if(typeof d[a]==="undefined")c[a]=b[a];else if(d[a]!==b[a])c[a]=b[a]});return c},paintShadow:function(b,f,g){if(b.removed||a(b).parent().length===0)return;var c=b.clone(),d=f||1,e=g||"#cccccc";c.insertBefore(b);c.attr({transform:Raphael.format("...T{0},{1}",d,d),stroke:e,"stroke-width":d});c.toBack();c.offset=d;b.shadow=c},getScaling:function(b,d,e,c){var a=d-e;if(a===0)a=1;if(b)a=-a;return c/a},getTranslation:function(d,b,e,f,c){var a=0;if(d){a=b.y;a-=c*e}else{a=b.x;a-=c*f}return a},getXSortedPoints:function(e){var b=e.data.x,f=[].concat(b),g=[].concat(e.data.y),d=[],c=b;if(b===undefined||b.length===0)return;function h(a,b){return a-b}if(typeof b[0]==="number")c=[].concat(b).sort(h);a.each(c,function(c,b){a.each(f,function(e,a){if(b===a){if(typeof a!=="number")a=c;d.push({x:a,y:g[e]});f.splice(e,1);g.splice(e,1);return false}})});return d},sector:function(c,d,b,e,f){var g=a.wijraphael.getPositionByAngle(c,d,b,e),h=a.wijraphael.getPositionByAngle(c,d,b,f);return["M",c,d,"L",g.x,g.y,"A",b,b,0,+(f-e>180),0,h.x,h.y,"z"]},donut:function(e,f,c,b,g,h){var d=a.wijraphael.getPositionByAngle(e,f,c,g),l=a.wijraphael.getPositionByAngle(e,f,c,h),k=a.wijraphael.getPositionByAngle(e,f,b,g),j=a.wijraphael.getPositionByAngle(e,f,b,h),i=h-g>180;return["M",d.x,d.y,"A",c,c,0,+i,0,l.x,l.y,"L",j.x,j.y,"A",b,b,0,+i,1,k.x,k.y,"L",d.x,d.y,"z"]},getFirstValidListValue:function(c){var b;a.each(c,function(c,a){if(a===null)return true;else if(typeof a==="undefined")return true;else if(typeof a==="number"&&isNaN(a))return true;b=a;return false});return b},getLastValidListValue:function(b){var c=[].concat(b).reverse();return a.wijchart.getFirstValidListValue(c)},isHole:function(a,b){return a===null?true:typeof a==="undefined"?true:typeof a==="number"&&isNaN(a)?true:b===null?false:typeof a!=="undefined"?a-b===0?true:false:false}};var b={content:"",contentStyle:{},title:"",titleStyle:{},style:{fill:"white","fill-opacity":.5},closeBehavior:"auto",mouseTrailing:true,triggers:"hover",animated:"fade",showAnimated:null,hideAnimated:null,duration:500,showDuration:500,hideDuration:500,easing:null,showEasing:null,hideEasing:null,showDelay:150,hideDelay:150,relativeTo:"mouse",compass:"east",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"black"},calloutLength:12,calloutOffset:0,calloutAnimation:{easing:null,duration:500},windowCollisionDetection:true,calloutSide:null,width:null,height:null,beforeShowing:null};Raphael.fn.closeBtn=function(c,d,b){var a=Math.cos(Math.PI/4)*b,f=this.set(),h=["M",c-a,d-a,"L",c+a,d+a,"M",c-a,d+a,"L",c+a,d-a],g=this.path(h.concat(" ")),e=null;g.attr({cursor:"pointer"});f.push(g);e=this.rect(c-b,d-b,b*2,b*2);e.attr({fill:"white","fill-opacity":0,cursor:"pointer",stroke:"none"});f.push(e);return f};Raphael.fn.tooltip=function(p,Y){var c=a.extend(true,{},b,Y),g=this,A=null,P=0,Q=0,f,i,h,e,d,y=null,x=null,n=null,m=5,l=null,u=g.tooltip.animations,t=c.calloutOffset,C=c.width,B=c.height,s=c.calloutLength/2,q=0,j=0,k=0,o,U=function(c,d){var a=c.getBBox(),b={x:0,y:0};switch(d.toLowerCase()){case"east":b.x=a.x+a.width;b.y=a.y+a.height/2;break;case"eastnorth":b.x=a.x+a.width;b.y=a.y;break;case"eastsouth":b.x=a.x+a.width;b.y=a.y+a.height;break;case"west":b.x=a.x;b.y=a.y+a.height/2;break;case"westnorth":b.x=a.x;b.y=a.y;break;case"westsouth":b.x=a.x;b.y=a.y+a.height;break;case"north":b.x=a.x+a.width/2;b.y=a.y;break;case"northeast":b.x=a.x+a.width;b.y=a.y;break;case"northwest":b.x=a.x;b.y=a.y;break;case"south":b.x=a.x+a.width/2;b.y=a.y+a.height;break;case"southeast":b.x=a.x+a.width;b.y=a.y+a.height;break;case"southwest":b.x=a.x;b.y=a.y+a.height}return b},G=function(a){if(a){window.clearTimeout(a);a=null}},z=function(g){if(l){var a,b,j;if(c.hideAnimated||c.animated){a=c.hideAnimated;if(!a)a=c.animated;if(a&&u[a]){j={animated:a,duration:c.hideDuration||c.duration,easing:c.hideEasing||c.easing,context:l,show:false};u[a](j)}}b=c.hideDuration;if(g)b=g;window.setTimeout(function(){var a,b;if(f){f.wijRemove();f=null}if(i){i.wijRemove();i=null}if(h){h.wijRemove();h=null}if(e){for(a=0,b=e.length;a<b;a++)e[a].unclick();e.wijRemove();e=null}if(d){d.wijRemove();d=null}n=null;l=null},b)}},L=function(){y&&G(y);x&&G(x)},v=function(){L();if(c.hideDelay)x=window.setTimeout(function(){z()},c.hideDelay);else z()},D=function(b){var a="";switch(b.toLowerCase()){case"east":a="right-middle";j=2;k=0;break;case"eastnorth":a="right-top";j=2;k=-2;break;case"eastsouth":a="right-bottom";j=2;k=2;break;case"west":a="left-middle";j=-2;k=0;break;case"westnorth":a="left-top";j=-2;k=-2;break;case"westsouth":a="left-bottom";j=-2;k=2;break;case"north":a="top-middle";j=0;k=-2;break;case"northeast":a="top-right";j=2;k=-2;break;case"northwest":a="top-left";j=-2;k=-2;break;case"south":a="bottom-middle";j=0;k=2;break;case"southeast":a="bottom-right";j=2;k=2;break;case"southwest":a="bottom-left";j=-2;k=2}return a},K=function(b,a){var d=[],e=c.compass;if(c.calloutSide)e=c.calloutSide;switch(e.toLowerCase()){case"east":case"eastsouth":case"eastnorth":d=["M",b.x+a,b.y+a,"l",-a,-a,"l",a,-a,"Z"];break;case"west":case"westsouth":case"westnorth":d=["M",b.x-a,b.y-a,"l",a,a,"l",-a,a,"Z"];break;case"north":case"northeast":case"northwest":d=["M",b.x-a,b.y-a,"l",a,a,"l",a,-a,"Z"];break;case"south":case"southeast":case"southwest":d=["M",b.x-a,b.y+a,"l",a,-a,"l",a,a,"Z"]}return d},M=function(e,d){if(a.isFunction(e)){var h=null,f,c={target:null,fmt:e},b;if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=g.getById(b.raphaelid);c.target=f}else c.target=d.target}h=a.proxy(c.fmt,c);return h().toString()}return e},H=function(a){if(c.calloutSide){var b=s||q;switch(c.calloutSide){case"south":case"north":if(a)d.animate({translation:-C/2+b+t+",0"},a);else d.translate(-C/2+b+t,0);break;case"east":case"west":if(a)d.animate({translation:"0,"+(-B/2+b+t)},a);else d.translate(0,-B/2+b+t)}}},V=/\{([^\}]+)\}/g,S=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,W=function(c,d,b){var a=b;d.replace(S,function(f,b,e,c,d){b=b||c;if(a){if(a[b]!=="string")a=a[b];if(typeof a==="function"&&d)a=a()}});a=(a===null||a===b?c:a).toString();return a},ab=function(b,a){return String(b).replace(V,function(b,c){return W(b,c,a)})},N=function(i,u,s,t,h){var o=u.split("-"),e=5,p=s.getBBox(),d=Math.round(p.width),b=Math.round(p.height),j=Math.round(p.x)-e,k=Math.round(p.y)-e,a=0,f=0,m=0,n=0,q=null,l=null,r=null;if(c.width)d=d>c.width?d:c.width;if(c.height)b=b>c.height?b:c.height;C=d;B=b;a=Math.min(b/4,d/4,t);if(h)h=Math.min(b/4,d/4,h);if(h){f=h;q={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{offset},0,-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{offset},0,{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom},0-{offset},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},0,{offset},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"}}else q={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{gap},{gap}-{gap}-{gap}-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{gap}-{gap},{gap},{gap},{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom}-{gap}-{gap},{gap}-{gap},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},{gap},{gap}-{gap},{gap},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"};l=([{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:0,right:d-a*2-f*2,top:0,bottom:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:d/2-a-f,right:d/2-a-f,top:b/2-a-f,bottom:b/2-a-f,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,right:0,left:d-a*2-f*2,bottom:0,top:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2}])[o[1]==="middle"?1:(o[1]==="left"||o[1]==="top")*2];r=g.path(ab(q[o[0]],l));switch(o[0]){case"top":m=i.x-(j+e+l.left+a+h);n=i.y-(k+e+b+e+a+h);break;case"bottom":m=i.x-(j+e+l.left+a+h);n=i.y-(k-a-h);break;case"left":m=i.x-(j+e+d+e+a+h);n=i.y-(k+e+l.top+a+h);break;case"right":m=i.x-(j-a-f);n=i.y-(k+e+l.top+a+f)}r.translate(m,n);s.translate(m,n);return r},F=function(n,o,d,e,p,q){var c=n.getBBox(),f=0,b=o,h=c.x+p,i=c.y+q,m=g.width,l=g.height,j=d,k=e;if(g.raphael.vml){m=a(g.canvas).width();l=a(g.canvas).height()}if(h+d<0)if(b.toLowerCase().indexOf("west")===-1){if(h+c.width/2+c.width-d<=m){f++;b=b.toLowerCase()+"east";j=0-d}}else if(h+c.width+c.width-d<=m){f++;b=b.toLowerCase().replace("west","east");j=0-d}if(i+e<0)if(b.toLowerCase().indexOf("north")===-1){if(i+c.height/2+c.height-e<=l){f++;b=b.toLowerCase()+"south";k=0-e}}else if(i+c.height+c.height-e<=l){f++;b=b.toLowerCase().replace("north","south");k=0-e}if(h+c.width+d>m)if(b.toLowerCase().indexOf("east")===-1){if(h-c.width/2-d>=0){f++;b=b.toLowerCase()+"west";j=0-d}}else if(h-c.width-d>=0){f++;b=b.toLowerCase().replace("east","west");j=0-d}if(i+c.height+e>l)if(b.toLowerCase().indexOf("south")===-1){if(i-c.height/2-e>=0){f++;b=b.toLowerCase()+"north";k=0-e}}else if(i-c.height-e>=0){f++;b=b.toLowerCase().replace("south","north");k=0-e}return f?{compass:b,offsetX:j,offsetY:k}:false},w=function(E,A,z,M,I,J,L){var x,t,B,p=g.set(),C=null,r=null,P=null,Q=0,R=0,S=250,G=0,O=0,b,o={x:E.x,y:E.y},y=null;a.wijraphael.clearRaphaelCache();B=D(I);o.x+=J+j;o.y+=L+k;l=g.set();if(i){a.each(i,function(c,b){a(b.node).unbind(".Rtooltip")});i.wijRemove()}if(A&&A.length>0){i=g.htmlText(-1e3,-1e3,A,c.titleStyle);l.push(i);x=i.getBBox()}else x={left:-1e3,top:-1e3,width:0,height:0};if(f){a.each(f,function(c,b){a(b.node).unbind(".Rtooltip")});f.wijRemove()}if(z&&z.length>0){f=g.htmlText(-1e3,-1e3,z,c.contentStyle);l.push(f);t=f.getBBox()}else t={left:-1e3,top:-1e3,width:0,height:0};if(e){for(G=0,O=e.length;G<O;G++)e[G].unclick();e.wijRemove()}f&&f.transform(Raphael.format("T0,{0}",x.height/2+t.height/2));if(c.closeBehavior==="sticky"){e=g.closeBtn(-1e3,-1e3,m);l.push(e);if(c.width&&c.width>x.width+m*2&&c.width>t.width+m*2)e.transform(Raphael.format("T{0},{1}",c.width-m,m));else if(x.width>=t.width-m*2)e.transform(Raphael.format("T{0},{1}",x.width+m,m));else e.transform(Raphael.format("T{0},{1}",t.width-m,m));a.each(e,function(){this.click(function(a){v(a)})})}if(i){p.push(i);c.relatedElement&&i.insertBefore(c.relatedElement)}if(f){p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(e){p.push(e);c.relatedElement&&e.insertBefore(c.relatedElement)}if(!c.showCallout)s=0;if(c.calloutSide||c.calloutFilled){s=0;q=c.calloutLength/2;if(c.calloutSide)B=D(c.calloutSide)}if(c.calloutSide&&p.length===0){f=g.htmlText(-1e3,-1e3," ");p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(d){a(d.node).unbind(".Rtooltip");d.wijRemove()}if(h){a(h.node).unbind(".Rtooltip");h.wijRemove()}if(n){if(c.showCallout&&(c.calloutSide||c.calloutFilled)){C=K(n,q);d=g.path(C.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}h=N(n,B,p,s,q);c.relatedElement&&h.insertBefore(c.relatedElement);if(M){b=F(h,I,J,L,o.x-n.x,o.y-n.y);if(b){w(E,A,z,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(h);Q=o.x-n.x;R=o.y-n.y;y=Raphael.animation({transform:Raphael.format("...T{0},{1}",Q,R)},S);h&&h.animate(y);i&&i.animate(y);f&&f.animate(y);e&&e.animate(y);d&&d.animate(y)}else{if(c.showCallout&&(c.calloutSide||c.calloutFilled)){C=K(o,q);d=g.path(C.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}h=N(o,B,p,s,q);c.relatedElement&&h.insertBefore(c.relatedElement);if(M){b=F(h,I,J,L,0,0);if(b){w(E,A,z,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(h);if(c.showAnimated||c.animated){r=c.showAnimated;if(!r)r=c.animated;if(r&&u[r]){P={animated:r,duration:c.showDuration||c.duration,easing:c.showEasing||c.easing,context:l,show:true};u[r](P)}}}n=o;h.attr(c.style);if(c.relatedElement){i&&i.insertBefore(c.relatedElement);f&&f.insertBefore(c.relatedElement);e&&e.insertBefore(c.relatedElement)}else p.toFront()},J=function(k,d){var h=null,e=null,j=null,f=null,i,b;if(a.isFunction(c.beforeShowing)){j=null;f={target:null,options:c,fmt:c.beforeShowing};if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){i=g.getById(b.raphaelid);f.target=i}else{i=d.target;f.target=i}}j=a.proxy(f.fmt,f);j()}h=c.title;e=c.content;h=M(h,d);e=M(e,d);if(!h&&!e)return;w(k,h,e,c.windowCollisionDetection,c.compass,c.offsetX,c.offsetY)},R=function(a,b){L();if(c.showDelay)y=window.setTimeout(function(){J(a,b)},c.showDelay);else J(a,b)},r=function(e){A=a(g.canvas.parentNode).offset();P=A.left;Q=A.top;var h=c.relativeTo,d={x:0,y:0},f=null,b=e.target;switch(h){case"mouse":d.x=e.pageX-P;d.y=e.pageY-Q;break;case"element":if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=g.getById(b.raphaelid);d=U(f,c.compass)}}R(d,e)},O=function(b){switch(c.triggers){case"hover":a(b.node).bind("mouseover.Rtooltip",function(a){r(a)}).bind("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&a(b.node).bind("mousemove.Rtooltip",function(a){r(a)});break;case"click":a(b.node).bind("click.Rtooltip",function(a){r(a)})}},I=function(a){var b,c;if(a)if(a.length)for(b=0,c=a.length;b<c;b++)O(a[b]);else O(a)},E=function(){if(o)switch(c.triggers){case"hover":o.live("mouseover.Rtooltip",function(a){r(a)}).live("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&o.live("mousemove.Rtooltip",function(a){r(a)});break;case"click":o.live("click.Rtooltip",function(a){r(a)})}},T=function(){var b,c;if(p)if(p.length)for(b=0,c=p.length;b<c;b++)a(p[b].node).unbind(".Rtooltip");else a(p.node).unbind(".Rtooltip");o&&o.die("Rtooltip").die(".Rtooltip")},X=function(){T();z(0)},Z=function(){this.hide=function(){v()};this.showAt=function(a){R(a)};this.resetCalloutOffset=function(e){var f=c.calloutOffset,a=c.calloutSide,b=c.calloutAnimation;if(d)if(a==="south"||a==="north")d.animate({translation:e-f+",0"},b.duration,b.easing);else(a==="east"||a==="west")&&d.animate({translation:"0,"+(e-f)},b.duration,b.easing);c.calloutOffset=e};this.destroy=function(){X()};this.getOptions=function(){return c};this.setTargets=function(a){I(a)};this.setSelector=function(a){o=a;E()};this.setOptions=function(b){c=a.extend(true,c,b)}};p&&I(p);o&&E(o);return new Z};Raphael.fn.tooltip.animations={fade:function(a){var b=a.context;if(a.show){b.attr({opacity:0});b.animate({opacity:1},a.duration,a.easing)}else b.animate({opacity:0},a.duration,a.easing)}}})(jQuery);(function(a){"use strict";a.widget("wijmo.wijchartcore",{options:{width:null,height:null,culture:"",seriesList:[],seriesStyles:[{stroke:"#00cc00",opacity:.9,"stroke-width":1},{stroke:"#0099cc",opacity:.9,"stroke-width":1},{stroke:"#0055cc",opacity:.9,"stroke-width":1},{stroke:"#2200cc",opacity:.9,"stroke-width":1},{stroke:"#8800cc",opacity:.9,"stroke-width":1},{stroke:"#d9007e",opacity:.9,"stroke-width":1},{stroke:"#ff0000",opacity:.9,"stroke-width":1},{stroke:"#ff6600",opacity:.9,"stroke-width":1},{stroke:"#ff9900",opacity:.9,"stroke-width":1},{stroke:"#ffcc00",opacity:.9,"stroke-width":1},{stroke:"#ffff00",opacity:.9,"stroke-width":1},{stroke:"#ace600",opacity:.9,"stroke-width":1}],seriesHoverStyles:[{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5}],marginTop:25,marginRight:25,marginBottom:25,marginLeft:25,textStyle:{fill:"#888","font-size":10,stroke:"none"},header:{text:"",style:{fill:"none",stroke:"none"},textStyle:{"font-size":18,fill:"#666",stroke:"none"},compass:"north",orientation:"horizontal",visible:true},footer:{text:"",style:{fill:"#fff",stroke:"none"},textStyle:{fill:"#000",stroke:"none"},compass:"south",orientation:"horizontal",visible:false},legend:{text:"",textMargin:{left:2,top:2,right:2,bottom:2},style:{fill:"none",stroke:"none"},textStyle:{fill:"#333",stroke:"none"},titleStyle:{"font-weight":"bold",fill:"#000",stroke:"none"},compass:"east",orientation:"vertical",visible:true},axis:{x:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:true,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"near",width:null},compass:"south",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},y:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":.5,"stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]}},hint:{enable:true,content:null,contentStyle:{fill:"#d1d1d1","font-size":16},title:null,titleStyle:{fill:"#d1d1d1","font-size":16},style:{fill:"#000000","stroke-width":2},animated:"fade",showAnimated:"fade",hideAnimated:"fade",duration:120,showDuration:120,hideDuration:120,easing:"",showEasing:"",hideEasing:"",showDelay:0,hideDelay:150,compass:"north",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"#000"}},showChartLabels:true,chartLabelStyle:{},chartLabelFormatString:"",disableDefaultTextStyle:false,shadow:true,dataSource:null,data:null,beforeSeriesChange:null,seriesChanged:null,beforePaint:null,painted:null},innerState:{},_setOption:function(c,f){var d=this,b=d.options,j=null,i=0,e=0,k=b.axis.x.tickMajor.factor,l=b.axis.x.tickMinor.factor,m=b.axis.y.tickMajor.factor,n=b.axis.y.tickMinor.factor,h,g;if(c==="seriesList"){if(!f)f=[];j=a.Event("beforeserieschange");if(d._trigger("beforeSeriesChange",j,{oldSeriesList:b.seriesList,newSeriesList:f})===false)return false;b.seriesList=f;d._trigger("seriesChanged",null,f);d.seriesTransition=true;d._init()}else if(a.isPlainObject(b[c])){a.extend(true,b[c],f);if(c==="axis"){if(b.axis.x.tickMajor.factor<0)b.axis.x.tickMajor.factor=k;if(b.axis.x.tickMinor.factor<0)b.axis.x.tickMinor.factor=l;if(b.axis.y.tickMajor.factor<0)b.axis.y.tickMajor.factor=m;if(b.axis.y.tickMinor.factor<0)b.axis.y.tickMinor.factor=n}}else a.Widget.prototype._setOption.apply(d,arguments);c==="disabled"&&d._handleDisabledOption(f,d.chartElement);if(c==="seriesTransition"||c==="animation")return;i=b.seriesList.length;if(c==="seriesList"||c==="seriesStyles")for(h=b.seriesStyles.length,e=h;e<i;e++)b.seriesStyles[e]=b.seriesStyles[e%h];if(c==="seriesList"||c==="seriesStyles"||c==="seriesHoverStyles"){d.styles={style:[].concat(b.seriesStyles.slice(0,b.seriesStyles.length)),hoverStyles:[].concat(b.seriesHoverStyles.slice(0,b.seriesHoverStyles.length))};d._initStyles()}if(c==="seriesList"||c==="seriesHoverStyles"){g=b.seriesHoverStyles.length;for(e=g;e<i;e++)b.seriesHoverStyles[e]=b.seriesHoverStyles[e%g]}d.redraw()},_initStyles:function(){var b=this.options,g=b.seriesStyles,f=b.seriesHoverStyles,e,d,c,a;if(b.seriesList)d=b.seriesList.length||0;if(b.seriesStyles)e=b.seriesStyles.length||0;if(b.seriesHoverStyles)c=b.seriesHoverStyles.length||0;if(d>e&&e)for(a=e;a<d;a++)g[a]=g[a%e];if(d>c&&c)for(a=c;a<d;a++)f[a]=f[a%c]},_create:function(){var b=this,c=b.options,g=c.width||b.element.width(),f=c.height||b.element.height(),e=null,d;b.updating=0;b.innerState={};a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(c);b.styles={style:[].concat(c.seriesStyles.slice(0,c.seriesStyles.length)),hoverStyles:[].concat(c.seriesHoverStyles.slice(0,c.seriesHoverStyles.length))};b._initStyles();if(c.hint&&typeof c.hint.content==="string"&&window[c.hint.content])c.hint.content=window[c.hint.content];if(c.hint&&typeof c.hint.title==="string"&&window[c.hint.title])c.hint.title=window[c.hint.title];b.headerEles=[];b.footerEles=[];b.legendEles=[];b.axisEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.chartLabelEles=[];b.seriesEles=[];if(b.element.length>0){if(b.element.is("table")){b._parseTable();e=a("<div></div>");g&&e.css("width",g);f&&e.css("height",f);b.element.after(e);b.chartElement=e}else b.chartElement=b.element;b.chartElement.addClass("ui-widget");d=new Raphael(b.chartElement[0],g,f);b.canvas=d;c.disabled&&b.disable();d.customAttributes.rotation=function(a){this.transform("...R"+a)};d.customAttributes.scale=function(a){this.transform("...S"+a)};d.customAttributes.translation=function(a,b){this.transform(Raphael.format("...T{0},{1}",a,b))};b._bindLiveEvents()}},_getDefFill:function(){return["#00cc00","#0099cc","#0055cc","#2200cc","#8800cc","#d9007e","#ff0000","#ff6600","#ff9900","#ffcc00","#ffff00","#ace600"]},_getCulture:function(a){return Globalize.findClosestCulture(a||this.options.culture)},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(h){var d=this,e=d.options,b=h||d.element,c=b.offset(),g=e.width||b.outerWidth(),f=e.height||b.outerHeight();return a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:g,height:f,left:c.left,top:c.top})},_bindData:function(){var b=this,e=b.options,f=e.dataSource,g=e.seriesList,c=e.data,d;a.each(g,function(k,j){var a=j.data,h,i,g,e=j.dataSource||f;if(e&&a){h=a.x;i=a.y;g=a.y1;if(h&&h.bind)a.x=b._getBindData(e,h.bind);else if(c&&c.x&&c.x.bind){if(d===undefined)d=b._getBindData(e,c.x.bind);a.x=d}if(i&&i.bind)a.y=b._getBindData(e,i.bind);if(g&&g.bind)a.y1=b._getBindData(e,g.bind)}})},_getBindData:function(b,c){if(a.isArray(b)){var d=[];a.each(b,function(b,a){a&&a[c]!==undefined&&d.push(a[c])});return d}return null},_hanldSharedXData:function(){var e=this,c=e.options,d=c.seriesList,b=c.data;b&&a.each(d,function(e,d){var c=d.data;if(c.x===undefined||c.x===null&&a.isArray(b.x))c.x=b.x})},_init:function(){var b=this,c=b.options;b._bindData();b._hanldSharedXData();a.each(c.seriesList,function(f,b){var d=b.data,e;if(typeof d==="undefined"||d===null){e=a.inArray(b,c.seriesList);c.seriesList.splice(e,1)}});!b.rendered&&b._paint();a.Widget.prototype._init.apply(b,arguments)},destroy:function(){var b=this;b._unbindLiveEvents();b._clearChartElement();b.chartElement.removeClass("ui-widget");a(".wijchart-canvas-object",b.chartElement[0]).die(b.widgetName).die("."+b.widgetName);b.element!==b.chartElement&&b.chartElement.remove();b.element.empty();if(b.styles)b.styles=null;if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}a.Widget.prototype.destroy.apply(b,arguments)},getCanvas:function(){return this.canvas},addSeriesPoint:function(c,e,f){var b=this.options.seriesList,d=null,a=null;if(c>=b.length)return;d=b[c];a=d.data||[];a.x.push(e.x);a.y.push(e.y);if(f){a.x.shift();a.y.shift()}this._setOption("seriesList",b)},beginUpdate:function(){var a=this;a.updating++},endUpdate:function(){var a=this;a.updating--;a.redraw()},redraw:function(e){var a=this,d=a.options,c=0,b=0;if(a.updating>0)return;if(e&&a.rendered)return;c=d.width||a.element.width();b=d.height||a.element.height();if(c<1||b<1)return;a.canvas.setSize(c,b);a._paint()},_parseTable:function(){if(!this.element.is("table"))return;var d=this,e=d.element,b=d.options,c=a("caption",e),g=a("thead th",e),f=[],h=a("tbody tr",e);if(c.length){b.header=a.extend({visible:true,text:a.trim(a(c[0]).text())},b.header);if(c.length>1)b.footer=a.extend({visibel:true,text:a.trim(a(c[1]).text())},b.footer)}b.legend=a.extend({visible:true},b.legend);d._getSeriesFromTR(g,h,f);d.options.seriesList=f},_getSeriesFromTR:function(b,e,g){var c=[],f=null,d=null;b.length&&b.each(function(){f=a.trim(a(this).text());c.push(f)});e.length&&e.each(function(){var h=a("th",a(this)),f=a.trim(h.text()),b=[],e=a("td",a(this));e.length&&e.each(function(){var c=a(this);b.push(parseFloat(a.trim(c.text())))});d={label:f,legendEntry:true,data:{x:c,y:b}};g.push(d)})},_destroyRaphaelArray:function(c){if(!c)return;for(var f=c.length,e=0,b,d;f&&e<f;e++){b=c[e];if(b&&b[0]){d=a(b.node);d.unbind().removeData();b.wijRemove();d.remove();d=null}c[e]=null}},_clearChartElement:function(){var b=this,c=b.chartElement.data("fields");b._destroyRaphaelArray(b.headerEles);b._destroyRaphaelArray(b.footerEles);b._destroyRaphaelArray(b.legendEles);b._destroyRaphaelArray(b.legends);b._destroyRaphaelArray(b.legendIcons);b._destroyRaphaelArray(b.legendDots);b._destroyRaphaelArray(b.axisEles);b._destroyRaphaelArray(b.chartLabelEles);if(b.tooltip){b.tooltip.destroy();b.tooltip=null}if(c&&c.trackers){b._destroyRaphaelArray(c.trackers);c.trackers=null}b.headerEles=[];b.footerEles=[];b.legendEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.axisEles=[];b.chartLabelEles=[];if(c&&c.chartElements){a.each(c.chartElements,function(c,a){b._destroyRaphaelArray(a)});c.chartElements=null}if(c&&c.seriesEles)c.seriesEles=null;if(b.seriesEles)b.seriesEles=[];b.canvas.clear();b.innerState=null;b.axisInfo=null;b.seriesGroup=null;b.lastAxisOffset=null;b.innerState={}},_text:function(c,d,b){var a=this.canvas.text(c,d,b);if(this.options.disableDefaultTextStyle)a.node.style.cssText="";return a},_paint:function(){var b=this,c=b.options,a=b.element,f=a.css("display")==="none"||a.css("visibility")==="hidden",e={},d=null;if(f){e=a.css("left");d=a.css("position");a.css("left","-10000px");a.css("position","absolute");a.show()}if(a.is(":hidden")){if(f){a.css("left",e);a.css("position",d);a.hide()}return}b._clearChartElement();if(b._trigger("beforePaint")===false)return;b.canvasBounds={startX:0,endX:c.width||a.width(),startY:0,endY:c.height||a.height()};b._paintHeader();b._paintFooter();b._paintLegend();b._paintChartArea();b._paintChartLabels();b._paintTooltip();b._trigger("painted");b.rendered=true;if(b.styles){c.seriesStyles=b.styles.style;c.seriesHoverStyles=b.styles.hoverStyles}if(f){a.css("left",e);a.css("position",d);a.hide()}},_calculatePosition:function(g,f,e){var b={x:0,y:0},c=5,d=5,a=this.canvasBounds;switch(g){case"north":b.x=(a.endX-a.startX)/2;b.y=a.startY+e/2+d;a.startY=a.startY+d*2+e;break;case"south":b.x=(a.endX-a.startX)/2;b.y=a.endY-e/2-d;a.endY=a.endY-d*2-e;break;case"east":b.x=a.endX-f/2-c;b.y=(a.endY-a.startY)/2;a.endX=a.endX-c*2-f;break;case"west":b.x=a.startX+f/2+c;b.y=(a.endY-a.startY)/2;a.startX=a.startX+c*2+f}return b},_paintHeader:function(){var g=2,d=this,m=d.options,c=m.header,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-header-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-header-container");e.attr(c.style);e.toBack();d.headerEles.push(b);d.headerEles.push(e)}},_paintFooter:function(){var g=2,d=this,m=d.options,c=m.footer,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-footer-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-footer-container");e.attr(c.style);e.toBack();d.footerEles.push(b);d.footerEles.push(e)}},_getRotationByCompass:function(b){var a=0;if(b==="east")a=90;else if(b==="west")a=-90;return a},_paintLegend:function(){if(!this.options.legend.visible)return;var b=this,s=b.options,f=a.extend(true,{size:{width:22,height:10}},s.legend),g=2,L=s.seriesStyles,t=[].concat(s.seriesList),r=f.compass,x=f.orientation,h,J,e,d,u=b.canvasBounds,w=u.endX-u.startX,v=u.endY-u.startY,i=f.size.width,I=f.size.height,D,k=0,C=0,m=0,l=0,q=0,p=0,c=1,K=0,j=0,y=0,E=0,n=0,F,z,B,o,G=[],A=0,H=0;if(f.text&&f.text.length){h=b._text(0,0,f.text);a.wijraphael.addClass(a(h.node),"wijchart-legend-title");J=a.extend(true,{},s.textStyle,f.textStyle,f.titleStyle);h.attr(J);b.legendEles.push(h)}if(f.reversed)t=t.reverse();a.each(t,function(e,c){c=a.extend(true,{legendEntry:true,display:"show"},c);function d(d){var n=f.reversed?t.length-1-A:A,l=L[n],m=a.extend(true,{fill:"none",opacity:1,stroke:"black"},l),c,k,h,j=false,e=d.type,g;if(d.legendEntry&&d.display!=="exclude"){c=b._text(0,0,d.label);a.wijraphael.addClass(a(c.node),"wijchart-legend-text wijchart-legend");k=a.extend(true,{},s.textStyle,f.textStyle);c.attr(k);b.legends.push(c);h=a.extend(m,{"stroke-width":1});g=b.canvas.rect(0,0,i,I);a.wijraphael.addClass(a(g.node),"wijchart-legend-icon wijchart-legend");g.attr(h);b.legendIcons.push(g);G.push(h);if(b.widgetName==="wijcompositechart")j=e==="line"||e==="spline"||e==="bezier"||e==="area";else j=b.widgetName==="wijlinechart";if(d.visible===false&&!j){a(c.node).data("hidden",true).data("textOpacity",c.attr("opacity")||1);c.attr("opacity",.3)}a(c.node).data("legendIndex",H).data("index",A);H++}A++}if(c.type==="pie"&&c.legendEntry)a.each(c.data,function(e,b){b=a.extend({legendEntry:c.legendEntry},b);d(b)});else if(b._isPieChart())d(c);else{if(c.data.x===undefined&&c.data.xy===undefined||c.data.xy===undefined&&c.data.y===undefined)return true;d(c)}});e=b.legends.length;d=f.textMargin;if(h){D=h.wijGetBBox();k=D.height;C=D.width}a.each(b.legends,function(c,b){var a=b.wijGetBBox();if(a.width>m)m=a.width;if(a.height>l)l=a.height});if(r==="east"||r==="west"){if(x==="horizontal"){q=e*(m+i+g)+e*(d.left+d.right);if(q>w/2){c=Math.floor(w/2/m);if(c<1)c=1}else c=e}else if(x==="vertical"){p=l*e+k+e*(d.top+d.bottom);if(p>v)c=Math.ceil(p/v);else c=1}}else if(r==="south"||r==="north")if(x==="horizontal"){q=(m+i+g)*e+e*(d.left+d.right);if(q>w){c=Math.floor(e/q*w);if(c<1)c=1}else c=e}else if(x==="vertical"){p=l*e+k+e*(d.top+d.bottom);if(p>v/2){K=Math.floor(v-k)/2/l;c=Math.ceil(e/K)}else c=1}if(c===0)c=1;j=c*(m+i+g)+c*(d.left+d.right);y=l*Math.ceil(e/c)+k+Math.ceil(e/c)*(d.top+d.bottom);j=j>C?j:C;F=b._calculatePosition(r,j,y);z=F.x-j/2;B=F.y-y/2;o=b.canvas.rect(z-g,B-g,j+2*g,y+2*g);a.wijraphael.addClass(a(o.node),"wijchart-legend-container");o.attr(f.style);o.toBack();b.legendEles.push(o);h&&h.transform(Raphael.format("...T{0},{1}",z+j/2,B+k/2));E=k;a.each(b.legends,function(o,f){var j=f.wijGetBBox(),e=b.legendIcons[o],p=z+n*(i+m+g)+(n+1)*d.left+n*d.right,q=B+E+j.height/2+d.top,r=q-e.wijGetBBox().height/2,k,h;e.wijRemove();e=null;e=b.canvas.rect(p,r,i,I);a(e.node).data("legendIndex",a(f.node).data("legendIndex")).data("index",a(f.node).data("index"));a.wijraphael.addClass(a(e.node),"wijchart-legend-icon wijchart-legend");b.legendIcons[o]=e;k=G[o];if(k){e.attr(k);if(a(f.node).data("hidden")===true){a(f.node).data("iconOpacity",e.attr("opacity")||1);e.attr("opacity",.3)}}f.transform(Raphael.format("...T{0},{1}",p+i+g+j.width/2,q));if(Raphael.vml){h=b.canvas.rect(p+i+g,q-j.height/2,j.width,j.height).attr({stroke:"none",fill:"#000000",opacity:.01});a.wijraphael.addClass(a(h.node),"wijchart-legend-textCover wijchart-legend");a(h.node).data("legendIndex",a(f.node).data("legendIndex"));a(h.node).data("index",a(f.node).data("index"));b.legendEles.push(h)}f.toFront();n++;if(n===c){n=0;E+=l+d.top+d.bottom}})},_hasAxes:function(){return this.widgetName==="wijpiechart"?false:true},_applyAxisText:function(i){var j=this,h=i.text,c=null,d=null,b=null,f=0,e=0,g=j.canvasBounds;if(h!==null&&h!==undefined&&h.length>0){d=j._text(-100,-100,h);b=a.extend(true,{},j.options.textStyle,i.textStyle);d.attr(b);c=d.wijGetBBox();if(b["margin-left"])e+=parseFloat(b["margin-left"]);if(b["margin-top"])f+=parseFloat(b["margin-top"]);if(b["margin-right"])e+=parseFloat(b["margin-right"]);if(b["margin-bottom"])f+=parseFloat(b["margin-bottom"]);switch(i.compass){case"north":g.startY+=c.height+f;break;case"south":g.endY-=c.height+f;break;case"east":g.endX-=c.height+e;break;case"west":g.startX+=c.height+e}d.wijRemove();d=null}return c},_isSeriesDataEmpty:function(){var c=this,b=c.options.seriesList;if(!b||b.length===0)return true;a.each(b,function(b,a){if(!a.data||(!a.data.x||!a.data.y)&&!a.data.xy)return true});return false},_paintTooltip:function(){var b=this,h=b.options,d=h.hint,i=!h.disabled&&d.enable,c=d,f,e,g=a.isFunction;if(i&&!b.tooltip){c=a.extend(true,{},d,{});f=d.title;e=d.content;if(g(f))c.title=function(){return b._getTooltipText(f,this.target)};if(g(e))c.content=function(){return b._getTooltipText(e,this.target)};c.beforeShowing=function(){b._onBeforeTooltipShowing(this)};b.tooltip=b.canvas.tooltip(null,c)}},_getTooltipText:function(d,c){var b=a(c.node).data("wijchartDataObj"),e={data:b,label:b.label,x:b.x,y:b.y,target:c,fmt:d};return a.proxy(d,e)()},_onBeforeTooltipShowing:function(b){var a=b.target,c=this.options.hint.style;if(a)b.options.style.stroke=c.stroke||a.attrs.stroke||a.attrs.fill},_paintChartArea:function(){var b=this,p=b.options,c=p.axis,l=2,n=null,k=null,h={},m=5,f=0,g=0,j=a.isArray(c.y),o=0,i,d,e;b._applyMargins();b.isMultiYAxis=j;if(b._isSeriesDataEmpty())return;j&&a.each(c.y,function(d,b){c.y[d]=a.extend(true,{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":"0.5","stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},b)});if(b._hasAxes()){if(b.innerState.axisInfo){b.axisInfo=b.innerState.axisInfo;b.canvasBounds=b.innerState.canvasBounds}else{n=b._applyAxisText(c.x,{});b.axisInfo={x:{id:"x",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:n,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true},y:{}};if(j)a.each(c.y,function(a,c){k=b._applyAxisText(c,{});b.axisInfo.y[a.toString()]={id:"y"+a,tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true}});else{k=b._applyAxisText(c.y,{});b.axisInfo.y["0"]={id:"y",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true}}b._getSeriesGroup();h=b._getDataExtreme(j);if(c.x.autoMin&&b.axisInfo.x.autoMin)c.x.min=h.txn;else if(c.x.min&&b._isDate(c.x.min))c.x.min=a.toOADate(c.x.min);if(c.x.autoMax&&b.axisInfo.x.autoMax)c.x.max=h.txx;else if(c.x.max&&b._isDate(c.x.max))c.x.max=a.toOADate(c.x.max);a.each(h.y,function(){o++});for(i=0;i<o;i++){d=c.y[i]||c.y;e=i.toString();if(d.autoMin&&b.axisInfo.y[e].autoMin)d.min=h.y[e].tyn;else if(d.min&&b._isDate(d.min))d.min=a.toOADate(d.min);if(d.autoMax&&b.axisInfo.y[e].autoMax)d.max=h.y[e].tyx;else if(d.max&&b._isDate(d.max))d.max=a.toOADate(d.max);do{g=b._autoPosition(b.axisInfo,c,"y",e);f=b._autoPosition(b.axisInfo,c,"x",e);if(g===b.axisInfo.y[e].offset&&f===b.axisInfo.x.offset){m=0;break}if(!isNaN(f)&&!isNaN(g)){if(g!==b.axisInfo.y[e].offset&&g!==0){b.axisInfo.y[e].offset=g;b.axisInfo.y[e].vOffset=f}if(f!==b.axisInfo.x.offset&&f!==0){b.axisInfo.x.offset=f;b.axisInfo.x.vOffset=g}}m--}while(m>0)}b._adjustPlotArea(c.x,b.axisInfo.x);b._adjustPlotArea(c.y,b.axisInfo.y,true);b.innerState.axisInfo=b.axisInfo;b.innerState.canvasBounds=b.canvasBounds}b._paintAxes();b._paintPlotArea()}else b._paintPlotArea()},_getSeriesGroup:function(){var c=this,d=c.options,b={};a.each(d.seriesList,function(c,a){if(a.yAxis)if(b[a.yAxis.toString()])b[a.yAxis.toString()].push(a);else b[a.yAxis.toString()]=[a];else if(b["0"])b["0"].push(a);else b["0"]=[a]});c.seriesGroup=b},_adjustPlotArea:function(e,d,f){var c=this.canvasBounds,g,b={east:Number.MIN_VALUE,west:Number.MIN_VALUE,south:Number.MIN_VALUE,north:Number.MIN_VALUE};if(f){a.each(d,function(a){g=a});a.each(d,function(f,a){var c=e[f]||e,d=c.compass;c.max=a.max;c.min=a.min;switch(d){case"north":b.north=Math.max(a.offset,b.north);break;case"south":b.south=Math.max(a.offset,b.south);break;case"east":b.east=Math.max(a.offset,b.east);break;case"west":b.west=Math.max(a.offset,b.west)}});if(b.north!==Number.MIN_VALUE)c.startY+=b.north;if(b.south!==Number.MIN_VALUE)c.endY-=b.south;if(b.east!==Number.MIN_VALUE)c.endX-=b.east;if(b.west!==Number.MIN_VALUE)c.startX+=b.west}else{e.max=d.max;e.min=d.min;switch(e.compass){case"north":c.startY+=d.offset;break;case"south":c.endY-=d.offset;break;case"east":c.endX-=d.offset;break;case"west":c.startX+=d.offset}}},_autoPosition:function(b,a,c,d){return this._autoPositionCartesianAxis(b,a,c,d)},_autoPositionCartesianAxis:function(m,g,p,i){var h=this,o=null,b,e,k,n,c,j,q,r,f=h.lastAxisOffset||{},d,l;if(p==="y"){b=m.y[i];e=g.y[i]||g.y;n=g.x;k=m.x}else{b=m.x;e=g.x;k=m.y[i];n=g.y[i]||g.y}c=e.compass;j=n.origin;q=k.max;r=k.min;if(j!==null&&h._isDate(j))j=a.toOADate(j);h._calculateParameters(b,e);o=h._getMaxExtents(b,e);switch(c){case"north":case"south":d=o.height;b.maxExtent=d;break;case"east":case"west":d=o.width;b.maxExtent=d}if(p==="y"&&f[c]){a.each(f[c],function(b,a){if(b!==i)l=a});if(l){b.preStartOffset=l;d+=l}}if(p==="y"){if(f[c]===undefined)f[c]={};f[c][i]=d+h._getAxisLabelBox(e).width;h.lastAxisOffset=f}return d},_getAxisLabelBox:function(d){var f=this,m=f.options,l=d.text,j=0,h=0,i=0,g=0,c,e,k=f._isVertical(d.compass),b=a.extend(true,{},m.textStyle,d.textStyle);if(b["margin-top"])j=parseFloat(b["margin-top"]);if(b["margin-left"])i=parseFloat(b["margin-left"]);if(b["margin-right"])h=parseFloat(b["margin-right"]);if(b["margin-bottom"])g=parseFloat(b["margin-bottom"]);c=f._text(0,0,l);c.attr(b);k&&c.transform("...R-90");e=c.wijGetBBox();c.wijRemove();c=null;return{width:e.width+i+h,height:e.height+g+j}},_getMaxExtents:function(b,c,o){var d=this,p=d.options,i=null,f={width:0,height:0},u=b.min,t=b.max,s=b.isTime,e=c.annoFormatString,r=p.is100Percent,l=0,q=c.compass,h=c.labels,g,m=false,n=d.canvasBounds,j,k;b.majorTickRect=d._getTickRect(b,c,true,true,o);b.minorTickRect=d._getTickRect(b,c,false,true,o);i=d._getMajorTickValues(b,c);if(!c.textVisible)return f;if(!e||e.length===0)e=b.annoFormatString;g=a.extend(true,{},p.textStyle,c.textStyle,h.style);k=g.transform;k&&k.length&&a.each(k,function(b,a){if(a[0].toLowerCase()==="r"){m=true;return false}});g=a.extend(true,g,b.textStyle);j=n.endX-n.startX-b.vOffset-b.axisTextOffset;if(i&&i.length){j=j/(i.length-1);a.each(i,function(p,i){var n,k,o;if(i<u||i>t)return true;if(c.annoMethod==="valueLabels"){if(i<0)return true;if(l>=c.valueLabels.length)return false;i=c.valueLabels[l];if(i.text)i=i.text;else if(typeof i.value!=="undefined"){i=i.value;if(e&&e.length)i=Globalize.format(i,e,d._getCulture())}}else if(c.annoMethod==="values")if(e&&e.length){if(s)i=a.fromOADate(i);i=Globalize.format(i,e,d._getCulture())}else if(r&&b.id==="y")i=Globalize.format(i,"p0",d._getCulture());if(h.width)n=d.canvas.wrapText(-100,-100,i,h.width,h.textAlign,g);else n=d._text(-100,-100,i).attr(g);k=n.wijGetBBox();if(!d._isVertical(q)&&!m&&c.annoMethod==="valueLabels")if(k.width>j){n.attr({transform:"r-45"});k=n.wijGetBBox();if(p===0){g.transform="r-45";b.textStyle={transform:"r-45"};o=n.clone();o.attr({transform:"r0"});k=o.wijGetBBox();if(Math.sqrt(2)*k.height>j){n.attr({transform:"r-90"});g.transform="r-90";b.textStyle={transform:"r-90"}}o.wijRemove();o=null;k=n.wijGetBBox()}}n.wijRemove();n=null;if(k.width>f.width)f.width=k.width;if(k.height>f.height)f.height=k.height;l++})}if(f.width<h.width)f.width=h.width;b.labelWidth=f.width;return f},_getMajorTickValues:function(d,c){var e=[],b=c.valueLabels;b&&b.length>0&&a.each(b,function(c,a){if(typeof a.text!=="undefined"||typeof a.value!=="undefined")return false;if(typeof a==="string")b[c]={text:a,gridLine:false};else b[c]={value:a,gridLine:false}});if(c.annoMethod==="valueLabels"&&b&&b.length>0&&typeof b[0].value!=="undefined"){e=this._getSortedDataValues(d,c);return e}e=this._getTickValues(d.max,d.min,c.unitMajor,d.tprec,!d.isTime,c.autoMajor);return e},_getSortedDataValues:function(f,c){var e=this,b=[],d=c.valueLabels;a.each(d,function(f,d){var c=d.value;if(e._isDate(c))b.push(a.toOADate(c));else if(typeof c==="number")b.push(c);else b.push(f)});return b},_getMinorTickValues:function(a,b){var c=[];c=this._getTickValues(a.max,a.min,b.unitMinor,a.tprec,!a.isTime,b.autoMinor);return c},_getTickValues:function(f,b,c,g,o,l){var p=this,i=[],n=b,e=0,h=0,m=0,k=0,d=0,j=0;try{if(c===0)i=[f,b];else{if(l){if(g+1<0)g=-1;else if(g+1>15)g=14;j=a.round(p._signedCeiling(b/c)*c,g+1);if(j<f)b=j;m=parseInt(a.round(f/c,5),10);k=parseInt(a.round(b/c,5),10);d=parseInt(m-k+1,10);if(d>1){h=k*c;if(h<b){d--;b+=c}h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;b=n;c=f-b}}else{d=parseInt((f-b)/c+1,10);if(d>1){h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;c=f-b}}for(e=0;e<d;e++)if(o)if(l)i[e]=a.round(b+e*c,g+1);else i[e]=b+e*c;else i[e]=b+e*c}}catch(q){}return i},_getTickRect:function(m,d,l,e){var c=d.compass,f=0,a=null,j=3,k=2,i=2,g=d.tickMajor.factor,h=d.tickMinor.factor,b={x:0,y:0,width:0,height:0};if(l){a=d.tickMajor.position;g=g>0?g:1;f=j*g}else{a=d.tickMinor.position;h=h>0?h:1;f=k*h}if(a==="none"||a==="inside"&&e)f=0;if(c==="east"||c==="west"){b={x:0,y:-1,width:f*i,height:i};if(c==="east"&&(a==="outside"||a==="cross"&&e)||c==="west"&&a==="inside")b.width+=2;else if(!e){if(a==="cross")b.width<<=1;b.width+=2}}else{b={x:-1,y:0,width:i,height:f*i};if(c==="south"&&(a==="outside"||a==="corss"&&e)||c==="north"&&a==="inside")b.height+=2;else if(!e){if(a==="cross")b.height<<=1;b.height+=2}}return b},_applyMargins:function(){var c=this,b=c.options,a=c.canvasBounds;a.startX+=b.marginLeft;a.endX-=b.marginRight;a.startY+=b.marginTop;a.endY-=b.marginBottom},_paintAxes:function(){var b=this,h=b.options.axis,g=b.axisInfo,c=h.x,e=h.y,f=g.x,i=g.y,d;d=b._paintAxis(c,f);a.each(i,function(g,f){var a=e[g]||e;a.origin!==null&&b._translateAxisIfNeeded(d,c.compass,a.origin,a.compass,f.max,f.min)});a.each(i,function(h,g){var a=e[h]||e;d=b._paintAxis(a,g);c.origin!==null&&b._translateAxisIfNeeded(d,a.compass,c.origin,c.compass,f.max,f.min)})},_translateAxisIfNeeded:function(g,h,l,i,e,f){var j=this,k=i==="west"||i==="east",b=j.canvasBounds,c=l,d;if(j._isDate(c))c=a.toOADate(c);if(!k){if(h==="west")d=(c-f)/(e-f)*(b.endX-b.startX);else d=(c-e)/(e-f)*(b.endX-b.startX);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",d,0))})}else{if(h==="south")d=(f-c)/(e-f)*(b.endY-b.startY);else d=(e-c)/(e-f)*(b.endY-b.startY);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",0,d))})}},_paintAxis:function(b,c){var e=this,B=e.options,d=e.canvasBounds,f={x:0,y:0},g={x:0,y:0},s=b.compass,k=2,q=true,o=null,p=[],u=[],v=[],m=c.max,n=c.min,I=b.unitMajor,J=b.unitMinor,G=b.tickMajor.position,H=b.tickMinor.position,A=c.maxExtent,C=b.tickMajor.style,D=b.tickMinor.style,x=c.majorTickRect,y=c.minorTickRect,w=c.axisTextOffset,E=b.gridMajor,F=b.gridMinor,j=b.labels,t=0,z=[],l=0,h=b.annoFormatString,r=null,i=[];x=e._getTickRect(c,b,true,false);y=e._getTickRect(c,b,false,false);if(!h||h.length===0)h=c.annoFormatString;p=e._getMajorTickValues(c,b);u=e._getMinorTickValues(c,b);v=e._resetMinorTickValues(u,p);switch(s){case"south":f.x=d.startX;f.y=d.endY;g.x=d.endX;g.y=d.endY;q=false;break;case"north":f.x=d.startX;f.y=d.startY-k;g.x=d.endX;g.y=d.startY-k;q=false;break;case"east":f.x=d.endX-k;if(c.preStartOffset)f.x+=c.preStartOffset;f.y=d.endY;g.x=d.endX-k;g.y=d.startY;break;case"west":f.x=d.startX;if(c.preStartOffset)f.x-=c.preStartOffset;f.y=d.endY;g.x=d.startX;g.y=d.startY}if(b.visible){o=e.canvas.line(f.x,f.y,g.x,g.y).attr(b.style);a.wijraphael.addClass(a(o.node),"wijchart-axis");e.axisEles.push(o);i.push(o)}a.each(p,function(D,k){var d=k,y=c.isTime,v=B.is100Percent,p,o,u=false,q={};if(k<n||k>m){l++;return true}if(b.annoMethod==="valueLabels"){if(l>=b.valueLabels.length)return false;d=b.valueLabels[l];u=d.gridLine;q=d.gridLineStyle;if(d.text)d=d.text;else if(typeof d.value!=="undefined"){d=d.value;if(h&&h.length)d=Globalize.format(d,h,e._getCulture())}}else if(b.annoMethod==="values")if(h&&h.length){if(y)d=a.fromOADate(k);d=Globalize.format(d,h,e._getCulture())}else if(v&&c.id==="y")d=Globalize.format(k,"p0",e._getCulture());r=a.extend(true,{},B.textStyle,b.textStyle,j.style,c.textStyle);p=e._paintMajorMinor(m,n,k,G,I,x,s,f,g,A,w,C,d,E,b.textVisible,r,j.textAlign,j.width?c.labelWidth:null,u,q);if(p){if(p.elements)i=i.concat(p.elements);o=p.textInfo}if(o){z.push(o);if(t<o.len)t=o.len}l++});!j.width&&a.each(z,function(d,c){var b=c.text,a=(c.len-t)/2;a=j.textAlign==="near"?a*-1:a;if(q)b.transform(Raphael.format("...T{0},{1}",a,0));else b.transform(Raphael.format("...T{0},{1}",0,a))});a.each(v,function(h,d){var a;if(d>n&&d<m){a=e._paintMajorMinor(m,n,d,H,J,y,s,f,g,A,w,D,null,F,b.textVisible,r,j.textAlign,j.width?c.labelWidth:null);if(a&&a.elements)i=i.concat(a.elements)}});b.text&&b.text.length>0&&i.push(e._paintAxisText(b,c));return i},_paintAxisText:function(d,f){if(!d.text||d.text.length===0)return;var j=this,z=d.text,p=d.compass,x=d.alignment,l=j.canvasBounds,m=l.startX,n=l.startY,q=l.endX,r=l.endY,h=m,i=n,c=f.textBounds,o=j._isVertical(p),k=f.axisTextOffset,s=f.majorTickRect,y=d.tickMajor.position,e=o?s.width:s.height,b=null,g=null,w=0,v=0,u=0,t=0;b=a.extend(true,{},j.options.textStyle,d.textStyle);if(b["margin-top"])w=parseFloat(b["margin-top"]);if(b["margin-left"])v=parseFloat(b["margin-left"]);if(b["margin-right"])u=parseFloat(b["margin-right"]);if(b["margin-bottom"])t=parseFloat(b["margin-bottom"]);if(y==="cross")e=e/2;else if(y==="inside")e=0;if(o){switch(x){case"near":i=r-c.width/2;break;case"center":i=(n+r)/2;break;case"far":i=n+c.width/2}if(p==="west")h=m-(f.offset+k+e+c.height/2+u);else h=q+f.offset+k+e+c.height/2+v}else{switch(x){case"near":h=m+c.width/2;break;case"center":h=(m+q)/2;break;case"far":h=q-c.width/2}if(p==="north")i=n-(f.offset+k+e+c.height/2+t);else i=r+f.offset+k+e+c.height/2+w}g=j._text(h,i,z);a.wijraphael.addClass(a(g.node),"wijchart-axis-text");j.axisEles.push(g);g.attr(b);o&&g.transform("...R-90");return g},_resetMinorTickValues:function(a,d){for(var b=0,c=0,f=null,e=null,b=a.length-1;b>=0;b--){f=a[b];for(c=d.length-1;c>=0;c--){e=d[c];f===e&&a.splice(b,1)}}return a},_paintMajorMinor:function(J,u,K,h,L,c,j,t,G,o,k,x,A,q,C,F,E,l,D,B){var f=this,e=t.x,b=t.y,m=-1,n=-1,s=true,g=f.canvasBounds,H=null,r=null,y=[],p=[],d=null,z={"stroke-width":2},i={text:null,len:0},w=null,I={},v=[];switch(j){case"south":if(h==="inside")b-=c.height;else if(h==="cross")b-=c.height/2;if(l)n=b+k+c.height;else n=b+k+c.height+o/2;s=false;break;case"west":if(h==="outside")e-=c.width;else if(h==="cross")e-=c.width/2;if(l)m=e-(k+o);else m=e-(k+o/2);break;case"north":if(h==="outside")b-=c.height;else if(h==="cross")b-=c.height/2;if(l)n=b-(k+o);else n=b-(k+o/2);s=false;break;case"east":if(h==="inside")e-=c.width;else if(h==="cross")e-=c.width/2;if(l)m=e+k+c.width;else m=e+k+c.width+o/2}if(s){b+=(K-u)/(J-u)*(G.y-t.y);p=["M",g.startX,b,"H",g.endX];if(q.visible)if(b!==g.startY&&j==="east"||b!==g.endY&&j==="west"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(q.style);f.axisEles.push(d)}if(D)if(b!==g.startY&&j==="east"||b!==g.endY&&j==="west"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(a.extend(true,q.style,B));f.axisEles.push(d)}n=b;if(h!=="none"){y=["M",e,b,"h",c.width];x["stroke-width"]=c.height}}else{e+=(K-u)/(J-u)*(G.x-t.x);p=["M",e,g.startY,"V",g.endY];if(q.visible)if(e!==g.startX&&j==="south"||e!==g.endX&&j==="north"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(q.style);f.axisEles.push(d)}if(D)if(b!==g.startY&&j==="south"||b!==g.endY&&j==="north"){d=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(d.node),"wijchart-axis-gridline");d.attr(a.extend(true,{},q.style,B));f.axisEles.push(d)}if(l)m=e-l/2;else m=e;if(h!=="none"){y=["M",e,b,"v",c.height];x["stroke-width"]=c.width}}if(h!=="none"){r=f.canvas.path(y.concat(" "));a.wijraphael.addClass(a(r.node),"wijchart-axis-tick");z=a.extend(z,x);r.attr(z);f.axisEles.push(r);v.push(r)}if(A!==null&&C){if(l){i=f.canvas.wrapText(m,n,A.toString(),l,E,F);a.wijraphael.addClass(a(i.node),"wijchart-axis-label")}else{i=f._text(m,n,A.toString());a.wijraphael.addClass(a(i.node),"wijchart-axis-label");i.attr(F)}f.axisEles.push(i);v.push(i);!C&&i.hide();if(E!=="center"){w=i.getBBox();H={text:i,len:s?w.width:w.height}}}I={textInfo:H,elements:v};return I},_paintPlotArea:function(){},_paintChartLabels:function(){var c=this,b=c.options.chartLabels;b&&b.length&&a.each(b,function(e,b){var d;b=a.extend(true,{compass:"east",attachMethod:"coordinate",attachMethodData:{seriesIndex:-1,pointIndex:-1,x:-1,y:-1},offset:0,visible:false,text:"",connected:false},b);if(b.visible){d=c._getChartLabelPointPosition(b);if(typeof d.x!=="number"||typeof d.y!=="number")return false;c._setChartLabel(b,d)}})},_getChartLabelPointPosition:function(){},_setChartLabel:function(d,g,o,l){var c=this,n=d.compass,k=c.options,m=a.extend(true,{},k.textStyle,k.chartLabelStyle),e=c._text(0,0,d.text).attr(m),h=d.offset,i=0,j=0,b=null,f=null;a.wijraphael.addClass(a(e.node),"wijchart-label-text");c.chartLabelEles.push(e);b=c._getCompassTextPosition(n,e.wijGetBBox(),h,g,o);if(h&&d.connected){f=c.canvas.path("M"+g.x+" "+g.y+"L"+b.endPoint.x+" "+b.endPoint.y);a.wijraphael.addClass(a(f.node),"wijchart-label-connect");f.attr(l);c.chartLabelEles.push(f)}i=b.endPoint.x+b.offsetX;j=b.endPoint.y+b.offsetY;e.transform(Raphael.format("...T{0},{1}",i,j)).toFront()},_getCompassTextPosition:function(h,c,i,g,b){var d=0,e=0,f={x:0,y:0};switch(h.toLowerCase()){case"east":b=0;break;case"west":b=180;break;case"north":b=90;break;case"south":b=270;break;case"northeast":b=45;break;case"northwest":b=135;break;case"southeast":b=315;break;case"southwest":b=225}if(b>=0&&b<45/2||b>675/2&&b<360)d=c.width/2;else if(b>=45/2&&b<135/2){d=c.width/2;e=c.height/-2}else if(b>=135/2&&b<225/2)e=c.height/-2;else if(b>=225/2&&b<315/2){d=c.width/-2;e=c.height/-2}else if(b>=315/2&&b<405/2)d=c.width/-2;else if(b>=405/2&&b<495/2){d=c.width/-2;e=c.height/2}else if(b>=495/2&&b<585/2)e=c.height/2;else{d=c.width/2;e=c.height/2}f=a.wijraphael.getPositionByAngle(g.x,g.y,i,b);return{endPoint:f,offsetX:d,offsetY:e}},_mouseDown:function(b,a){this._trigger("mouseDown",b,a)},_mouseUp:function(b,a){this._trigger("mouseUp",b,a)},_mouseOver:function(b,a){this._trigger("mouseOver",b,a)},_mouseOut:function(b,a){this._trigger("mouseOut",b,a)},_mouseMove:function(b,a){this._trigger("mouseMove",b,a)},_click:function(b,a){this._trigger("click",b,a)},_mouseMoveInsidePlotArea:function(){},_mouseMoveOutsidePlotArea:function(){},_bindLiveEvents:function(){this._bindLegendEvents();this._bindCanvasEvents()},_bindCanvasEvents:function(){var a=this,b=a.chartElement;b.bind("mousemove",function(e){var f=b.offset(),d=a.canvasBounds,c={left:e.pageX-f.left,top:e.pageY-f.top},g=a.options.disabled;if(g)return;if(c.left>=d.startX&&c.left<=d.endX&&c.top>=d.startY&&c.top<=d.endY)a._mouseMoveInsidePlotArea(e,c);else a._mouseMoveOutsidePlotArea(e,c)})},_bindLegendEvents:function(){var b=this,d=b.chartElement,c=b.widgetName;a(".wijchart-legend",d[0]).live("click."+c,function(d){if(b.options.disabled)return;var c=a(d.target);if(c[0].tagName&&c[0].tagName==="tspan")c=c.parent();b._legendClick(c)})},_legendClick:function(j){if(typeof j.data("index")==="undefined")return;var c=this,n=c.options.legend,h=j.data("index"),k=j.data("legendIndex"),i=c.chartElement.data("fields"),l=c.seriesEles,f,e=c.legendIcons[k],g=c.legends[k],b=a(g.node),m=h,d;if(i&&i.seriesEles)l=i.seriesEles;if(c.legendDots&&c.legendDots.length>h)d=c.legendDots[h];if(n.reversed)m=c.legends.length-1-h;f=l[m];if(f)if(!b.data("hidden")){c._hideSerieEles(f);!b.data("textOpacity")&&b.data("textOpacity",g.attr("opacity")||1);!b.data("iconOpacity")&&b.data("iconOpacity",e.attr("opacity")||1);d&&!b.data("dotOpacity")&&b.data("dotOpacity",e.attr("opacity")||1);g.attr("opacity","0.3");e.attr("opacity","0.3");d&&d.attr("opacity","0.3");b.data("hidden",true)}else{c._showSerieEles(f);g.attr("opacity",b.data("textOpacity"));e.attr("opacity",b.data("iconOpacity"));d&&d.attr("opacity",b.data("dotOpacity"));b.data("hidden",false)}},_showSerieEles:function(){},_hideSerieEles:function(){},_unbindLiveEvents:function(){var d=this,c=this.chartElement,b=d.widgetName;a(".wijchart-legend",c[0]).die(b).die("."+b);c.unbind("mousemove")},_isBarChart:function(){return false},_isPieChart:function(){return false},_calculateParameters:function(c,f){var d=this,b=f.max,a=f.min,o=f.autoMax&&c.autoMax,m=f.autoMin&&c.autoMin,r=f.autoMajor&&c.autoMajor,s=f.autoMinor&&c.autoMinor,h=null,k=null,p=f.annoMethod==="valueLabels",e=0,i=0,j=0,g=0,l=0,n=c.isTime,q=d.options.adjustMinValue;if(o&&b!==Number.MIN_VALUE)if(c.id!=="x"&&d._isBarChart())if(b<0&&.5*(b-a)>-b)b=0;if(m&&a!==Number.MAX_VALUE)if(c.id!=="x"&&d._isBarChart())if(a>0&&.5*(b-a)>a)a=0;if(b===a){if(a!==0)a-=1;b+=1}g=b-a;if(n){h=f.annoFormatString;if(!h||h.length===0){h=d._getTimeDefaultFormat(b,a);c.annoFormatString=h}l=d._niceTimeUnit(0,h)}k=d._nicePrecision(g);c.tprec=k;if(o)if(n){i=d._roundTime(b,l,true);if(i<b)b=i+l;else b=i}else{i=d._precCeil(-k,b);if(typeof i==="number")b=i}if(m)if(n){j=d._roundTime(a,l,false);if(j>a)a=j-l;else a=j}else{j=d._precFloor(-k,a);if(typeof j==="number")a=j}c.max=b;c.min=a;c.annoFormatString=h;c.tinc=l;if(r||s){g=b-a;d._calculateMajorMinor(f,c);e=f.unitMajor;if(o&&e!==0&&!n&&!p){g=b-parseInt(b/e,10)*e;if(g!==0){b+=e-g;b=d._precCeil(-k,b)}}if(m&&e!==0&&!n&&!p){g=a-parseInt(a/e,10)*e;if(g!==0){if(g<0)g+=e;a-=Math.abs(g);a=d._precFloor(-k,a)}}if(m&&e!==0&&!p&&(typeof q==="undefined"||q===false)&&m&&a===f.min&&a-e>=0&&c.id==="y")a-=e}c.max=b;c.min=a},_roundTime:function(k,g,e){var c=this,d=g,f=a.fromOADate(k),b,h,j,i;if(d>0){b={year:f.getFullYear(),month:f.getMonth(),day:f.getDate(),hour:f.getHours(),minute:f.getMinutes(),second:f.getSeconds()};if(d<c._tmInc.minute){b.second=c._tround(b.second,d,e);return c._getTimeAsDouble(b)}b.second=0;if(d<c._tmInc.hour){d/=c._tmInc.minute;b.minute=c._tround(b.minute,d,e);return c._getTimeAsDouble(b)}b.minute=0;if(d<c._tmInc.day){d/=c._tmInc.hour;b.hour=c._tround(b.hour,d,e);return c._getTimeAsDouble(b)}b.hour=0;if(d<c._tmInc.month){d/=c._tmInc.day;b.day=c._tround(b.day,d,e);return c._getTimeAsDouble(b)}b.day=1;if(d<c._tmInc.year){d/=c._tmInc.month;b.month=c._tround(b.month,d,e);return c._getTimeAsDouble(b)}b.month=0;d/=c._tmInc.year;b.year=c._tround(b.year,d,e);return c._getTimeAsDouble(b)}else{h=f;j=h-d;i=parseInt(j/g,10)*g;if(e&&i!==j)i+=g;h=d+i;return h}},_tround:function(c,a,d){var b=parseInt(c/a*a,10);if(d&&b!==c)b+=parseInt(a,10);return b},_getTimeAsDouble:function(b){var e=0,d=0,c=null;if(b.day<1){d=-1-b.day;b.day=1}else if(b.day>28){d=b.day-28;b.day=28}if(b.month<0){e=-1-b.day;b.month=0}else if(b.month>11){e=b.month-11;b.month=11}c=new Date(b.year,b.month,b.day,b.hour,b.minute,b.second);c.setDate(c.getDate()+d);c.setMonth(c.getMonth()+e);return a.toOADate(c)},_getTimeDefaultFormat:function(d,e){var c=this,b=d-e,a="d";if(b>2*c._tmInc.year)a="yyyy";else if(b>c._tmInc.year)a="MMM yy";else if(b>3*c._tmInc.month)a="MMM";else if(b>2*c._tmInc.week)a="MMM d";else if(b>2*c._tmInc.day)a="ddd d";else if(b>c._tmInc.day)a="ddd H:mm";else if(b>c._tmInc.hour)a="H:mm";else if(b>=1e3)a="H:mm:ss";return a},_niceTimeUnit:function(c,b){var d=this,a=c;a=d._niceTimeSpan(a,b);return a},_niceTimeSpan:function(f,e){var a=this,c=a._manualTimeInc(e),d=0,b=0;d=Math.ceil(f);if(d===0)return a._timeSpanFromTmInc(c);b=1;if(c<a._tmInc.minute){if(d<a._tmInc.minute){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.minute}if(c<a._tmInc.hour){if(d<a._tmInc.hour){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.hour}if(c<a._tmInc.day){if(d<a._tmInc.day){b=a._getNiceInc([1,3,6,12],d,c);if(b!==0)return b}c=a._tmInc.day}if(c<a._tmInc.month){if(d<a._tmInc.month){b=a._getNiceInc([1,2,7,14],d,c);if(b!==0)return b}c=a._tmInc.month}if(c<a._tmInc.year){if(d<a._tmInc.year){b=a._getNiceInc([1,2,3,4,6],d,c);if(b!==0)return b}c=a._tmInc.year}b=100*a._tmInc.year;if(d<b){b=a._getNiceInc([1,2,5,10,20,50],d,c);if(b===0)b=100*a._tmInc.year}return b},_getNiceInc:function(c,f,d){for(var b=0,a=0,e=c.length,b=0;b<e;b++){a=c[b]*d;if(f<=a)return a}return 0},_timeSpanFromTmInc:function(a){var b=1e3,d=a,c=1;if(a!==this._tmInc.maxtime)if(a>this._tmInc.tickf1)b=a;else{a+=7;while(d>0){c*=10;d--}b=c}return b},_manualTimeInc:function(a){var c=this,b=c._tmInc.second;if(!a||a.length===0)return b;if(a.indexOf("s")>=0)b=c._tmInc.second;else if(a.indexOf("m")>=0)b=c._tmInc.minute;else if(a.indexOf("h")>=0||a.indexOf("H")>=0)b=c._tmInc.hour;else if(a.indexOf("d")>=0)b=c._tmInc.day;else if(a.indexOf("M")>=0)b=c._tmInc.month;else if(a.indexOf("y")>=0)b=c._tmInc.year;return b},_tmInc:{tickf7:-7e3,tickf6:-6e3,tickf5:-5e3,tickf4:-4e3,tickf3:-3e3,tickf2:-2e3,tickf1:-1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:26784e5,year:31536e6,maxtime:2147483647},_niceTickNumber:function(a){if(parseFloat(a)===0)return a;else if(a<0)a=-a;var e=Math.log(a)/Math.log(10),d=parseInt(this._signedFloor(e),10),c=a/Math.pow(10,d),b=10;if(c<=1)b=1;else if(c<=2)b=2;else if(c<=5)b=5;return b*Math.pow(10,d)},_niceNumber:function(c,d,e){if(parseFloat(c)===0)return c;else if(c<0)c=-c;var b=c/Math.pow(10,d),a=10;if(e){if(b<1.5)a=1;else if(b<3)a=2;else if(b<7)a=5}else if(b<=1)a=1;else if(b<=2)a=2;else if(b<=5)a=5;return a*Math.pow(10,d)},_nicePrecision:function(a){if(a<=0||typeof a!=="number")return 0;var c=Math.log(a)/Math.log(10),b=parseInt(this._signedFloor(c),10),d=a/Math.pow(10,b);if(d<3)b=-b+1;return b},_precCeil:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.ceil(a);return a*b},_precFloor:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.floor(a);return a*b},_signedCeiling:function(a){return a<0?Math.floor(a):Math.ceil(a)},_signedFloor:function(a){return a<0?Math.ceil(a):Math.floor(a)},_getDataExtreme:function(c){var b={txx:0,txn:0,tyx:0,tyn:0},a;a=this._getDataExtremes(b,c);if(a){if(a.txn>a.txx){a.txn=0;a.txx=1}return a}else{if(b.txn>b.txx){b.txn=0;b.txx=1}return b}},_getDataExtremes:function(b){var f=this,j=f.options,l=j.seriesList,n=j.stacked,m=j.is100Percent,c=j.axis,e=f.axisInfo,d=[],k=[],h=[],g,i={y:{}};if(!l||l.length===0)return b;f.seriesGroup&&a.each(f.seriesGroup,function(l,o){var j=[];a.each(o,function(o,h){if(h.type==="pie")return true;h=a.extend(true,{display:"show"},h);var c=h.data,m=0,i=0,l=[].concat(c.xy),p=l.length,e,g;if(h.display==="exclude")return true;d=[].concat(c.x);j=[].concat(c.y);if(c.xy&&p){d=[];j=[];while(i<p){d[m]=l[i];j[m]=l[i+1];i+=2;m++;c.x=d;c.y=j}}else if(!c.x){d=[];a.each(j,function(a){d.push(a)});c.x=d}n&&o>0&&a.each(j,function(a){j[a]+=k[a]});k=j;e=f._getMinMaxValue(d);g=f._getMinMaxValue(j);if(o===0){b.txx=e.max;b.txn=e.min;b.tyx=g.max;b.tyn=g.min}else{if(b.txx<e.max)b.txx=e.max;if(b.txn>e.min)b.txn=e.min;if(b.tyx<g.max)b.tyx=g.max;if(b.tyn>g.min)b.tyn=g.min}o++});if(m){b.tyx=1;b.tyn=0}i.y[l]={tyx:b.tyx,tyn:b.tyn};i.txx=b.txx;i.txn=b.txn;b.tyx=0;b.tyn=0;if(j.length){g=a.wijchart.getFirstValidListValue(j);if(f._isDate(g))e.y[l].isTime=true;else if(typeof g==="undefined")return true;else if(typeof g!=="number"){a.each(j,function(e,d){var b=c.y.annoFormatString,a=d;if(b&&b.length>0)a=Globalize.format(a,b,f._getCulture());else a=a.toString();h.push({text:a,value:d,gridLine:false})});c.y[parseInt(l,10)].annoMethod="valueLabels";c.y[parseInt(l,10)].valueLabels=h;c.x.max=j.length-1;c.x.min=0;c.y[parseInt(l,10)].unitMajor=1;c.x.unitMinor=.5;e.y[l].autoMax=false;e.y[l].autoMin=false;e.y[l].autoMajor=false;e.y[l].autoMinor=false}}});if(d.length){g=a.wijchart.getFirstValidListValue(d);if(f._isDate(g))e.x.isTime=true;else if(typeof g!=="number"){a.each(d,function(b,a){h.push({text:a,value:b,gridLine:false})});c.x.annoMethod="valueLabels";c.x.valueLabels=h;c.x.max=d.length-1;c.x.min=0;c.x.unitMajor=1;c.x.unitMinor=.5;e.x.autoMax=false;e.x.autoMin=false;e.x.autoMajor=false;e.x.autoMinor=false}}return i},_isDate:function(a){return!a?false:typeof a==="object"&&a.constructor===Date},_getMinMaxValue:function(c){var f=this,b={min:0,max:0},d=0,e;if(!c.length)return b;e=a.wijchart.getFirstValidListValue(c);if(typeof e!=="number")if(f._isDate(e)){b.min=e;b.max=e}else{b.min=0;b.max=c.length-1;return b}else{b.min=e;b.max=e}for(d=0;d<c.length;d++){if(c[d]===null||typeof c[d]==="undefined")continue;if(typeof c[d]==="number"&&isNaN(c[d]))continue;if(c[d]<b.min)b.min=c[d];else if(c[d]>b.max)b.max=c[d]}if(f._isDate(b.min)){b.min=a.toOADate(b.min);b.max=a.toOADate(b.max)}return b},_isVertical:function(a){return a==="west"||a==="east"},_calculateMajorMinor:function(f,d){var c=this,A=c.options,n=c.canvasBounds,y=f.autoMajor,z=f.autoMinor,p=d.max,q=d.min,v=d.isTime,x=d.tinc,r=d.annoFormatString,s=null,t=null,g=null,j=null,i=null,h=null,o=null,l=null,m=null,e=p-q,w=0,u=0,k=0,b=0;if(y){m=a.extend(true,{},A.textStyle,f.textStyle,f.labels.style);if(v){s=Globalize.format(a.fromOADate(p),r,c._getCulture());t=Globalize.format(a.fromOADate(q),r,c._getCulture());i=c._text(-1e3,-1e3,s).attr(m);h=c._text(-1e3,-1e3,t).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}else{o=c._nicePrecision(e);l=o+1;if(l<0||l>15)l=0;i=c._text(-1e3,-1e3,a.round(p,l)).attr(m);h=c._text(-1e3,-1e3,a.round(q,l)).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}if(g.width<j.width)g.width=j.width;if(g.height<j.height)g.height=j.height;if(!c._isVertical(f.compass)){w=n.endX-n.startX-d.vOffset-d.axisTextOffset;b=w/g.width;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}else{u=n.endY-n.startY-d.vOffset-d.axisTextOffset;b=u/g.height;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}b=e;if(k>0){e/=k;if(v)if(e<x)b=x;else b=c._niceTimeUnit(e,d.annoFormatString);else{d.tprec=c._nicePrecision(e);b=c._niceNumber(2*e,-o,true);if(b<e)b=c._niceNumber(e,-o+1,false);if(b<e)b=c._niceTickNumber(e)}}f.unitMajor=b}if(z&&f.unitMajor&&!isNaN(f.unitMajor))f.unitMinor=f.unitMajor/2}})})(jQuery); 
     14(function(a){"use strict";if(!window.Raphael)return;a.wijchart={getDiffAttrs:function(d,b){var c={};a.each(b,function(a){if(typeof d==="undefined")return true;else if(typeof d[a]==="undefined")c[a]=b[a];else if(d[a]!==b[a])c[a]=b[a]});return c},paintShadow:function(b,f,g){if(b.removed||a(b).parent().length===0)return;var c=b.clone(),d=f||1,e=g||"#cccccc";c.insertBefore(b);c.attr({transform:Raphael.format("...T{0},{1}",d,d),stroke:e,"stroke-width":d});c.toBack();c.offset=d;b.shadow=c},getScaling:function(b,d,e,c){var a=d-e;if(a===0)a=1;if(b)a=-a;return c/a},getTranslation:function(d,b,e,f,c){var a=0;if(d){a=b.y;a-=c*e}else{a=b.x;a-=c*f}return a},getXSortedPoints:function(e){var b=e.data.x,f=[].concat(b),g=[].concat(e.data.y),d=[],c=b;if(b===undefined||b.length===0)return;function h(a,b){return a-b}if(typeof b[0]==="number")c=[].concat(b).sort(h);a.each(c,function(c,b){a.each(f,function(e,a){if(b===a){if(typeof a!=="number")a=c;d.push({x:a,y:g[e]});f.splice(e,1);g.splice(e,1);return false}})});return d},sector:function(c,d,b,e,f){var g=a.wijraphael.getPositionByAngle(c,d,b,e),h=a.wijraphael.getPositionByAngle(c,d,b,f);return["M",c,d,"L",g.x,g.y,"A",b,b,0,+(f-e>180),0,h.x,h.y,"z"]},donut:function(e,f,c,b,g,h){var d=a.wijraphael.getPositionByAngle(e,f,c,g),l=a.wijraphael.getPositionByAngle(e,f,c,h),k=a.wijraphael.getPositionByAngle(e,f,b,g),j=a.wijraphael.getPositionByAngle(e,f,b,h),i=h-g>180;return["M",d.x,d.y,"A",c,c,0,+i,0,l.x,l.y,"L",j.x,j.y,"A",b,b,0,+i,1,k.x,k.y,"L",d.x,d.y,"z"]},getFirstValidListValue:function(c){var b;a.each(c,function(c,a){if(a===null)return true;else if(typeof a==="undefined")return true;else if(typeof a==="number"&&isNaN(a))return true;b=a;return false});return b},getLastValidListValue:function(b){var c=[].concat(b).reverse();return a.wijchart.getFirstValidListValue(c)},isHole:function(a,b){return a===null?true:typeof a==="undefined"?true:typeof a==="number"&&isNaN(a)?true:b===null?false:typeof a!=="undefined"?a-b===0?true:false:false}};var b={content:"",contentStyle:{},title:"",titleStyle:{},style:{fill:"white","fill-opacity":.5},closeBehavior:"auto",mouseTrailing:true,triggers:"hover",animated:"fade",showAnimated:null,hideAnimated:null,duration:500,showDuration:500,hideDuration:500,easing:null,showEasing:null,hideEasing:null,showDelay:150,hideDelay:150,relativeTo:"mouse",compass:"east",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"black"},calloutLength:12,calloutOffset:0,calloutAnimation:{easing:null,duration:500},windowCollisionDetection:"flip",calloutSide:null,width:null,height:null,beforeShowing:null};Raphael.fn.closeBtn=function(c,d,b){var a=Math.cos(Math.PI/4)*b,f=this.set(),h=["M",c-a,d-a,"L",c+a,d+a,"M",c-a,d+a,"L",c+a,d-a],g=this.path(h.concat(" ")),e=null;g.attr({cursor:"pointer"});f.push(g);e=this.rect(c-b,d-b,b*2,b*2);e.attr({fill:"white","fill-opacity":0,cursor:"pointer",stroke:"none"});f.push(e);return f};Raphael.fn.tooltip=function(p,Y){var c=a.extend(true,{},b,Y),h=this,A=null,P=0,Q=0,f,g,i,e,d,y=null,x=null,n=null,m=5,l=null,u=h.tooltip.animations,t=c.calloutOffset,C=c.width,B=c.height,s=c.calloutLength/2,q=0,j=0,k=0,o,U=function(c,d){var a=c.getBBox(),b={x:0,y:0};switch(d.toLowerCase()){case"east":b.x=a.x+a.width;b.y=a.y+a.height/2;break;case"eastnorth":b.x=a.x+a.width;b.y=a.y;break;case"eastsouth":b.x=a.x+a.width;b.y=a.y+a.height;break;case"west":b.x=a.x;b.y=a.y+a.height/2;break;case"westnorth":b.x=a.x;b.y=a.y;break;case"westsouth":b.x=a.x;b.y=a.y+a.height;break;case"north":b.x=a.x+a.width/2;b.y=a.y;break;case"northeast":b.x=a.x+a.width;b.y=a.y;break;case"northwest":b.x=a.x;b.y=a.y;break;case"south":b.x=a.x+a.width/2;b.y=a.y+a.height;break;case"southeast":b.x=a.x+a.width;b.y=a.y+a.height;break;case"southwest":b.x=a.x;b.y=a.y+a.height}return b},G=function(a){if(a){window.clearTimeout(a);a=null}},z=function(h){if(l){var a,b,j;if(c.hideAnimated||c.animated){a=c.hideAnimated;if(!a)a=c.animated;if(a&&u[a]){j={animated:a,duration:c.hideDuration||c.duration,easing:c.hideEasing||c.easing,context:l,show:false};u[a](j)}}b=c.hideDuration;if(h)b=h;window.setTimeout(function(){var a,b;if(f){f.wijRemove();f=null}if(g){g.wijRemove();g=null}if(i){i.wijRemove();i=null}if(e){for(a=0,b=e.length;a<b;a++)e[a].unclick();e.wijRemove();e=null}if(d){d.wijRemove();d=null}n=null;l=null},b)}},L=function(){y&&G(y);x&&G(x)},v=function(){L();if(c.hideDelay)x=window.setTimeout(function(){z()},c.hideDelay);else z()},D=function(b){var a="";switch(b.toLowerCase()){case"east":a="right-middle";j=2;k=0;break;case"eastnorth":a="right-top";j=2;k=-2;break;case"eastsouth":a="right-bottom";j=2;k=2;break;case"west":a="left-middle";j=-2;k=0;break;case"westnorth":a="left-top";j=-2;k=-2;break;case"westsouth":a="left-bottom";j=-2;k=2;break;case"north":a="top-middle";j=0;k=-2;break;case"northeast":a="top-right";j=2;k=-2;break;case"northwest":a="top-left";j=-2;k=-2;break;case"south":a="bottom-middle";j=0;k=2;break;case"southeast":a="bottom-right";j=2;k=2;break;case"southwest":a="bottom-left";j=-2;k=2}return a},K=function(b,a){var d=[],e=c.compass;if(c.calloutSide)e=c.calloutSide;switch(e.toLowerCase()){case"east":case"eastsouth":case"eastnorth":d=["M",b.x+a,b.y+a,"l",-a,-a,"l",a,-a,"Z"];break;case"west":case"westsouth":case"westnorth":d=["M",b.x-a,b.y-a,"l",a,a,"l",-a,a,"Z"];break;case"north":case"northeast":case"northwest":d=["M",b.x-a,b.y-a,"l",a,a,"l",a,-a,"Z"];break;case"south":case"southeast":case"southwest":d=["M",b.x-a,b.y+a,"l",a,-a,"l",a,a,"Z"]}return d},M=function(e,d){if(a.isFunction(e)){var g=null,f,c={target:null,fmt:e},b;if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=h.getById(b.raphaelid);c.target=f}else c.target=d.target}g=a.proxy(c.fmt,c);return g().toString()}return e},H=function(a){if(c.calloutSide){var b=s||q;switch(c.calloutSide){case"south":case"north":if(a)d.animate({translation:-C/2+b+t+",0"},a);else d.translate(-C/2+b+t,0);break;case"east":case"west":if(a)d.animate({translation:"0,"+(-B/2+b+t)},a);else d.translate(0,-B/2+b+t)}}},V=/\{([^\}]+)\}/g,S=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,W=function(c,d,b){var a=b;d.replace(S,function(f,b,e,c,d){b=b||c;if(a){if(a[b]!=="string")a=a[b];if(typeof a==="function"&&d)a=a()}});a=(a===null||a===b?c:a).toString();return a},ab=function(b,a){return String(b).replace(V,function(b,c){return W(b,c,a)})},N=function(i,w,u,v,g){var o=w.split("-"),e=5,q=u.getBBox(),t=c.padding,p=t&&!isNaN(t)?parseInt(t):0,d=Math.round(q.width+p*2),b=Math.round(q.height+p*2),j=Math.round(q.x-p)-e,k=Math.round(q.y-p)-e,a=0,f=0,m=0,n=0,r=null,l=null,s=null;if(c.width)d=d>c.width?d:c.width;if(c.height)b=b>c.height?b:c.height;C=d;B=b;a=Math.min(b/4,d/4,v);if(g)g=Math.min(b/4,d/4,g);if(g){f=g;r={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{offset},0,-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{offset},0,{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom},0-{offset},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},0,{offset},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"}}else r={top:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{gap},{gap}-{gap}-{gap}-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",bottom:"M{x},{y}l{left},0,{gap}-{gap},{gap},{gap},{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",right:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom}-{gap}-{gap},{gap}-{gap},0-{top}a{r},{r},0,0,1,{r}-{r}z",left:"M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},{gap},{gap}-{gap},{gap},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"};l=([{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:0,right:d-a*2-f*2,top:0,bottom:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,left:d/2-a-f,right:d/2-a-f,top:b/2-a-f,bottom:b/2-a-f,r:e,h:b,gap:a,offset:f*2},{x:j+e,y:k,w:d,w4:d/4,h4:b/4,right:0,left:d-a*2-f*2,bottom:0,top:b-a*2-f*2,r:e,h:b,gap:a,offset:f*2}])[o[1]==="middle"?1:(o[1]==="left"||o[1]==="top")*2];s=h.path(ab(r[o[0]],l));switch(o[0]){case"top":m=i.x-(j+e+l.left+a+g);n=i.y-(k+e+b+e+a+g);break;case"bottom":m=i.x-(j+e+l.left+a+g);n=i.y-(k-a-g);break;case"left":m=i.x-(j+e+d+e+a+g);n=i.y-(k+e+l.top+a+g);break;case"right":m=i.x-(j-a-f);n=i.y-(k+e+l.top+a+f)}s.translate(m,n);u.translate(m,n);return s},F=function(q,r,e,f,s,t,p){var c=q.getBBox(),d=0,b=r,i=c.x+s,j=c.y+t,n=h.width,m=h.height,k=e,l=f,g=q.attr("stroke-width"),o=p===true||p==="flip";if(h.raphael.vml){n=a(h.canvas).width();m=a(h.canvas).height()}if(i-g<0)if(o){if(b.toLowerCase().indexOf("west")===-1){if(i+c.width/2+c.width-e<=n){d++;b=b.toLowerCase()+"east";k=0-e}}else if(i+c.width+c.width-e<=n){d++;b=b.toLowerCase().replace("west","east");k=0-e}}else{d++;k=0-i+g+e}if(j-g<0)if(o){if(b.toLowerCase().indexOf("north")===-1){if(j+c.height/2+c.height-f<=m){d++;b=b.toLowerCase()+"south";l=0-f}}else if(j+c.height+c.height-f<=m){d++;b=b.toLowerCase().replace("north","south");l=0-f}}else{d++;l=0-j+g+f}if(i+c.width+g>n)if(o){if(b.toLowerCase().indexOf("east")===-1){if(i-c.width/2-e>=0){d++;b=b.toLowerCase()+"west";k=0-e}}else if(i-c.width-e>=0){d++;b=b.toLowerCase().replace("east","west");k=0-e}}else{d++;k=n-(i+c.width+g)+e}if(j+c.height+g>m)if(o){if(b.toLowerCase().indexOf("south")===-1){if(j-c.height/2-f>=0){d++;b=b.toLowerCase()+"north";l=0-f}}else if(j-c.height-f>=0){d++;b=b.toLowerCase().replace("south","north");l=0-f}}else{d++;l=m-(j+c.height+g)+f}return d?{compass:b,offsetX:k,offsetY:l}:false},w=function(I,B,A,C,L,M,O){var y,x,E,p=h.set(),G=null,r=null,Q=null,R=0,S=0,T=250,J=0,P=0,b,o={x:I.x,y:I.y},z=null,t=null;a.wijraphael.clearRaphaelCache();E=D(L);o.x+=M+j;o.y+=O+k;l=h.set();if(g){a.each(g,function(c,b){a(b.node).unbind(".Rtooltip")});g.wijRemove()}if(B&&B.length>0){g=h.htmlText(-1e3,-1e3,B,c.titleStyle);l.push(g);y=g.getBBox()}else y={left:-1e3,top:-1e3,width:0,height:0};if(f){a.each(f,function(c,b){a(b.node).unbind(".Rtooltip")});f.wijRemove()}if(A&&A.length>0){f=h.htmlText(-1e3,-1e3,A,c.contentStyle);l.push(f);x=f.getBBox()}else x={left:-1e3,top:-1e3,width:0,height:0};if(e){for(J=0,P=e.length;J<P;J++)e[J].unclick();e.wijRemove()}f&&f.transform(Raphael.format("T0,{0}",y.height/2+x.height/2));g&&g.transform(Raphael.format("T0,{0}",0));if(c.closeBehavior==="sticky"){e=h.closeBtn(-1e3,-1e3,m);l.push(e);if(c.width&&c.width>y.width+m*2&&c.width>x.width+m*2)e.transform(Raphael.format("T{0},{1}",c.width-m,m));else if(y.width>=x.width-m*2)e.transform(Raphael.format("T{0},{1}",y.width+m,m));else e.transform(Raphael.format("T{0},{1}",x.width-m,m));a.each(e,function(){this.click(function(a){v(a)})})}if(g){p.push(g);c.relatedElement&&g.insertBefore(c.relatedElement)}if(f){p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(e){p.push(e);c.relatedElement&&e.insertBefore(c.relatedElement)}if(!c.showCallout)s=0;if(c.calloutSide||c.calloutFilled){s=0;q=c.calloutLength/2;if(c.calloutSide)E=D(c.calloutSide)}if(c.calloutSide&&p.length===0){f=h.htmlText(-1e3,-1e3," ");p.push(f);c.relatedElement&&f.insertBefore(c.relatedElement)}if(d){a(d.node).unbind(".Rtooltip");d.wijRemove()}if(i){a(i.node).unbind(".Rtooltip");i.wijRemove()}if(n){if(c.showCallout&&(c.calloutSide||c.calloutFilled)){G=K(n,q);d=h.path(G.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}i=N(n,E,p,s,q);c.relatedElement&&i.insertBefore(c.relatedElement);if(C){b=F(i,L,M,O,o.x-n.x,o.y-n.y,C);if(b){w(I,B,A,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(i);R=o.x-n.x;S=o.y-n.y;t=Raphael.format("...T{0},{1}",R,S);z=Raphael.animation({transform:t},T);if(i)if(c.showAnimated||c.animated)i.animate(z);else i.attr("transform",t);if(g)if(c.showAnimated||c.animated)g.animate(z);else g.attr("transform",t);if(f)if(c.showAnimated||c.animated)f.animate(z);else f.attr("transform",t);if(e)if(c.showAnimated||c.animated)e.animate(z);else e.attr("transform",t);if(d)if(c.showAnimated||c.animated)d.animate(z);else d.attr("transform",t)}else{if(c.showCallout&&(c.calloutSide||c.calloutFilled)){G=K(o,q);d=h.path(G.concat(" "));c.relatedElement&&d.insertBefore(c.relatedElement);c.calloutFilled&&d.attr(c.calloutFilledStyle);c.calloutSide&&H(0)}i=N(o,E,p,s,q);c.relatedElement&&i.insertBefore(c.relatedElement);if(C){b=F(i,L,M,O,0,0,C);if(b){w(I,B,A,false,b.compass,b.offsetX,b.offsetY);return}}l.push(d);l.push(i);if(c.showAnimated||c.animated){r=c.showAnimated;if(!r)r=c.animated;if(r&&u[r]){Q={animated:r,duration:c.showDuration||c.duration,easing:c.showEasing||c.easing,context:l,show:true};u[r](Q)}}}n=o;i.attr(c.style);if(c.relatedElement){g&&g.insertBefore(c.relatedElement);f&&f.insertBefore(c.relatedElement);e&&e.insertBefore(c.relatedElement)}else p.toFront()},J=function(k,d){var g=null,e=null,j=null,f=null,i,b;if(a.isFunction(c.beforeShowing)){j=null;f={target:null,options:c,fmt:c.beforeShowing};if(d&&d.target){b=d.target;if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){i=h.getById(b.raphaelid);f.target=i}else{i=d.target;f.target=i}}j=a.proxy(f.fmt,f);if(j()===false)return}g=c.title;e=c.content;g=M(g,d);e=M(e,d);if(!g&&!e)return;w(k,g,e,c.windowCollisionDetection,c.compass,c.offsetX,c.offsetY)},R=function(a,b){L();if(c.showDelay)y=window.setTimeout(function(){J(a,b)},c.showDelay);else J(a,b)},r=function(e){A=a(h.canvas.parentNode).offset();P=A.left;Q=A.top;var g=c.relativeTo,d={x:0,y:0},f=null,b=e.target;switch(g){case"mouse":d.x=e.pageX-P;d.y=e.pageY-Q;break;case"element":if(!b.raphael||!b.raphaelid)b=b.parentNode;if(b.raphael&&b.raphaelid){f=h.getById(b.raphaelid);d=U(f,c.compass)}}R(d,e)},O=function(b){switch(c.triggers){case"hover":a(b.node).bind("mouseover.Rtooltip",function(a){r(a)}).bind("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&a(b.node).bind("mousemove.Rtooltip",function(a){r(a)});break;case"click":a(b.node).bind("click.Rtooltip",function(a){r(a)})}},I=function(a){var b,c;if(a)if(a.length)for(b=0,c=a.length;b<c;b++)O(a[b]);else O(a)},E=function(){if(o)switch(c.triggers){case"hover":o.live("mouseover.Rtooltip",function(a){r(a)}).live("mouseout.Rtooltip",function(a){c.closeBehavior==="auto"&&v(a)});c.mouseTrailing&&c.relativeTo==="mouse"&&o.live("mousemove.Rtooltip",function(a){r(a)});break;case"click":o.live("click.Rtooltip",function(a){r(a)})}},T=function(){var b,c;if(p)if(p.length)for(b=0,c=p.length;b<c;b++)a(p[b].node).unbind(".Rtooltip");else a(p.node).unbind(".Rtooltip");o&&o.die("Rtooltip").die(".Rtooltip")},X=function(){T();z(0)},Z=function(){this.hide=function(){v()};this.showAt=function(a){R(a)};this.resetCalloutOffset=function(e){var f=c.calloutOffset,a=c.calloutSide,b=c.calloutAnimation;if(d)if(a==="south"||a==="north")d.animate({translation:e-f+",0"},b.duration,b.easing);else(a==="east"||a==="west")&&d.animate({translation:"0,"+(e-f)},b.duration,b.easing);c.calloutOffset=e};this.destroy=function(){X()};this.getOptions=function(){return c};this.setTargets=function(a){I(a)};this.setSelector=function(a){o=a;E()};this.setOptions=function(b){c=a.extend(true,c,b)}};p&&I(p);o&&E(o);return new Z};Raphael.fn.tooltip.animations={fade:function(a){var b=a.context;if(a.show){b.attr({opacity:0});b.animate({opacity:1},a.duration,a.easing)}else b.animate({opacity:0},a.duration,a.easing)}}})(jQuery);(function(a){"use strict";a.widget("wijmo.wijchartcore",{options:{width:null,height:null,culture:"",seriesList:[],seriesStyles:[{stroke:"#00cc00",opacity:.9,"stroke-width":1},{stroke:"#0099cc",opacity:.9,"stroke-width":1},{stroke:"#0055cc",opacity:.9,"stroke-width":1},{stroke:"#2200cc",opacity:.9,"stroke-width":1},{stroke:"#8800cc",opacity:.9,"stroke-width":1},{stroke:"#d9007e",opacity:.9,"stroke-width":1},{stroke:"#ff0000",opacity:.9,"stroke-width":1},{stroke:"#ff6600",opacity:.9,"stroke-width":1},{stroke:"#ff9900",opacity:.9,"stroke-width":1},{stroke:"#ffcc00",opacity:.9,"stroke-width":1},{stroke:"#ffff00",opacity:.9,"stroke-width":1},{stroke:"#ace600",opacity:.9,"stroke-width":1}],seriesHoverStyles:[{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5},{opacity:1,"stroke-width":1.5}],marginTop:25,marginRight:25,marginBottom:25,marginLeft:25,textStyle:{fill:"#888","font-size":10,stroke:"none"},header:{text:"",style:{fill:"none",stroke:"none"},textStyle:{"font-size":18,fill:"#666",stroke:"none"},compass:"north",orientation:"horizontal",visible:true},footer:{text:"",style:{fill:"#fff",stroke:"none"},textStyle:{fill:"#000",stroke:"none"},compass:"south",orientation:"horizontal",visible:false},legend:{text:"",textMargin:{left:2,top:2,right:2,bottom:2},style:{fill:"none",stroke:"none"},textWidth:null,textStyle:{fill:"#333",stroke:"none"},titleStyle:{"font-weight":"bold",fill:"#000",stroke:"none"},compass:"east",orientation:"vertical",visible:true},axis:{x:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:true,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"near",width:null},compass:"south",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},y:{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":.5,"stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]}},hint:{enable:true,content:null,contentStyle:{fill:"#d1d1d1","font-size":16},title:null,titleStyle:{fill:"#d1d1d1","font-size":16},style:{fill:"#000000","stroke-width":2},animated:"fade",showAnimated:"fade",hideAnimated:"fade",duration:120,showDuration:120,hideDuration:120,easing:"",showEasing:"",hideEasing:"",showDelay:0,hideDelay:150,compass:"north",offsetX:0,offsetY:0,showCallout:true,calloutFilled:false,calloutFilledStyle:{fill:"#000"}},indicator:{visible:false,style:{stroke:"#000000"}},showChartLabels:true,chartLabelStyle:{},chartLabelFormatString:"",disableDefaultTextStyle:false,shadow:true,dataSource:null,data:null,beforeSeriesChange:null,seriesChanged:null,beforePaint:null,painted:null},innerState:{},_setOption:function(e,c){var d=this,b=d.options,q=null,p=0,g=0,k=b.axis.x.tickMajor.factor,l=b.axis.x.tickMinor.factor,m,n,f,j,i,o=a.wijmo.wijchartcore.prototype.options.axis,h;if(e==="dataSource"){d.seriesTransition=true;b.dataSource=c;if(d.seriesList)b.seriesList=a.arrayClone(d.seriesList);d._init()}if(e==="seriesList"){if(!c)c=[];q=a.Event("beforeserieschange");if(d._trigger("beforeSeriesChange",q,{oldSeriesList:b.seriesList,newSeriesList:c})===false)return false;b.seriesList=c;d.seriesList=a.arrayClone(c);d._trigger("seriesChanged",null,c);d.seriesTransition=true;d._init()}else if(a.isPlainObject(b[e])){if(e==="axis")if(a.isArray(b.axis.y))f=a.arrayClone(b.axis.y);else f=a.extend(true,{},b.axis.y);if(e==="axis"){a.extend(true,b.axis.x,c.x||{});if(a.isArray(b.axis.y)||a.isArray(c.y))h={};else h=b.axis.y;if(a.isArray(c.y)){a.each(c.y,function(d,b){c.y[d]=a.extend(true,{},o.y,h,b)});b.axis.y=c.y}else b.axis.y=a.extend(true,{},o.y,h,c.y)}else a.extend(true,b[e],c);if(e==="indicator"){this._unbindCanvasEvents();this._bindCanvasEvents()}if(e==="axis"){j=b.axis.y;if(b.axis.x.tickMajor.factor<0)b.axis.x.tickMajor.factor=k;if(b.axis.x.tickMinor.factor<0)b.axis.x.tickMinor.factor=l;if(!a.isArray(j)){if(a.isArray(f)){m=f[0].tickMajor.factor;n=f[0].tickMinor.factor}else{k=f.tickMajor.factor;l=f.tickMinor.factor}if(b.axis.y.tickMajor&&b.axis.y.tickMajor.factor!==undefined&&b.axis.y.tickMajor.factor<0)b.axis.y.tickMajor.factor=m;if(b.axis.y.tickMinor&&b.axis.y.tickMinor.factor!==undefined&&b.axis.y.tickMinor.factor<0)b.axis.y.tickMinor.factor=n}else{if(!a.isArray(f))f=[f];a.each(j,function(c,a){var b=f[c]||{};if(b.tickMajor&&b.tickMajor.factor&&a.tickMajor&&a.tickMajor.factor)if(a.tickMajor.factor<0)a.tickMajor.factor=b.tickMajor.factor;if(b.tickMinor&&b.tickMinor.factor&&a.tickMinor&&a.tickMinor.factor)if(a.tickMinor.factor<0)a.tickMinor.factor=b.tickMinor.factor})}}}else a.Widget.prototype._setOption.apply(d,arguments);e==="disabled"&&d._handleDisabledOption(c,d.chartElement);if(e==="seriesTransition"||e==="animation")return;p=b.seriesList.length;if(e==="seriesList"||e==="seriesStyles"||e==="seriesHoverStyles"){d.styles={style:[].concat(b.seriesStyles.slice(0,b.seriesStyles.length)),hoverStyles:[].concat(b.seriesHoverStyles.slice(0,b.seriesHoverStyles.length))};d._initStyles()}if(e==="seriesList"||e==="seriesHoverStyles"){i=b.seriesHoverStyles.length;for(g=i;g<p;g++)b.seriesHoverStyles[g]=b.seriesHoverStyles[g%i]}d.redraw()},_initStyles:function(){var b=this.options,g=b.seriesStyles,f=b.seriesHoverStyles,e,d,c,a;if(b.seriesList)d=b.seriesList.length||0;if(b.seriesStyles)e=b.seriesStyles.length||0;if(b.seriesHoverStyles)c=b.seriesHoverStyles.length||0;if(d>e&&e)for(a=e;a<d;a++)g[a]=g[a%e];if(d>c&&c)for(a=c;a<d;a++)f[a]=f[a%c]},_create:function(){var b=this,c=b.options,g=c.width||b.element.width(),f=c.height||b.element.height(),e=null,d;if(window.wijmoApplyWijTouchUtilEvents)a=window.wijmoApplyWijTouchUtilEvents(a);b.updating=0;b.innerState={};b.axisCompass={};b.element.is(":hidden")&&b.element.wijAddVisibilityObserver&&b.element.wijAddVisibilityObserver(function(){b.redraw();b.element.wijRemoveVisibilityObserver&&b.element.wijRemoveVisibilityObserver()},"wijchart");a.isFunction(window.wijmoASPNetParseOptions)&&wijmoASPNetParseOptions(c);b.styles={style:[].concat(c.seriesStyles.slice(0,c.seriesStyles.length)),hoverStyles:[].concat(c.seriesHoverStyles.slice(0,c.seriesHoverStyles.length))};b._initStyles();if(c.hint&&typeof c.hint.content==="string"&&window[c.hint.content])c.hint.content=window[c.hint.content];if(c.hint&&typeof c.hint.title==="string"&&window[c.hint.title])c.hint.title=window[c.hint.title];b.headerEles=[];b.footerEles=[];b.legendEles=[];b.axisEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.chartLabelEles=[];b.seriesEles=[];if(b.element.length>0){if(b.element.is("table")){b._parseTable();e=a("<div></div>");g&&e.css("width",g);f&&e.css("height",f);b.element.after(e);b.chartElement=e}else b.chartElement=b.element;b.chartElement.addClass("ui-widget");try{d=new Raphael(b.chartElement[0],g,f)}catch(i){var h=b.chartElement.css("display");e=a("<div></div>").insertBefore(b.chartElement).append(b.chartElement);b.chartElement.addClass("ui-helper-hidden-accessible").appendTo(a("body"));h==="none"&&b.chartElement.css("display","block");d=new Raphael(b.chartElement[0],g,f);b.chartElement.appendTo(e).unwrap().removeClass("ui-helper-hidden-accessible");h==="none"&&b.chartElement.css("display","none")}b.canvas=d;f===0&&c.height!==0&&b.element.height(d.height);c.disabled&&b.disable();d.customAttributes.rotation=function(a){this.transform("...R"+a)};d.customAttributes.scale=function(a){this.transform("...S"+a)};d.customAttributes.translation=function(a,b){this.transform(Raphael.format("...T{0},{1}",a,b))};b._bindLiveEvents()}},_hotFixForJQ1_9:function(){if(a.ui.version&&a.ui.version>="1.9"){this._extendArrayFromBase("seriesStyles");this._extendArrayFromBase("seriesHoverStyles")}},_extendArrayFromBase:function(b){var d=a.extend(true,{},a.wijmo.wijchartcore.prototype.options[b],this.options[b]),c=[];a.each(d,function(b,a){c.push(a)});this.options[b]=c},_getDefFill:function(){return["#00cc00","#0099cc","#0055cc","#2200cc","#8800cc","#d9007e","#ff0000","#ff6600","#ff9900","#ffcc00","#ffff00","#ace600"]},_getCulture:function(a){return Globalize.findClosestCulture(a||this.options.culture)},_handleDisabledOption:function(b,c){var a=this;if(b){if(!a.disabledDiv)a.disabledDiv=a._createDisabledDiv(c);a.disabledDiv.appendTo("body")}else if(a.disabledDiv){a.disabledDiv.remove();a.disabledDiv=null}},_createDisabledDiv:function(i){var e=this,f=e.options,c=i||e.element,d=c.offset(),h=f.width||c.outerWidth(),g=f.height||c.outerHeight(),b;b=a("<div></div>").addClass("ui-disabled").css({"z-index":"99999",position:"absolute",width:h,height:g,left:d.left,top:d.top});Raphael.vml&&b.addClass("ui-state-disabled").css("background-color","#fff");return b},_bindData:function(){var b=this,e=b.options,f=e.dataSource,g=e.seriesList,c=e.data,d;a.each(g,function(k,j){var a=j.data,h,i,g,e=j.dataSource||f;if(e&&a){h=a.x;i=a.y;g=a.y1;if(h&&h.bind)a.x=b._getBindData(e,h.bind);else if(c&&c.x&&c.x.bind){if(d===undefined)d=b._getBindData(e,c.x.bind);a.x=d}if(i&&i.bind)a.y=b._getBindData(e,i.bind);if(g&&g.bind)a.y1=b._getBindData(e,g.bind)}})},_getBindData:function(b,c){if(a.isArray(b)){var d=[];a.each(b,function(b,a){a&&a[c]!==undefined&&d.push(a[c])});return d}return null},_hanldSharedXData:function(){var e=this,c=e.options,d=c.seriesList,b=c.data;b&&a.each(d,function(e,d){var c=d.data;if(c.x===undefined||c.x===null&&a.isArray(b.x))c.x=b.x})},_init:function(){var b=this,c=b.options;if(!b.rendered)b.seriesList=a.arrayClone(c.seriesList);b._bindData();b._hanldSharedXData();a.each(c.seriesList,function(f,b){var d=b.data,e;if(typeof d==="undefined"||d===null){e=a.inArray(b,c.seriesList);c.seriesList.splice(e,1)}});!b.rendered&&b._paint();a.Widget.prototype._init.apply(b,arguments)},destroy:function(){var b=this;b._unbindLiveEvents();b._clearChartElement();b.chartElement.removeClass("ui-widget");a(".wijchart-canvas-object",b.chartElement[0]).die(b.widgetName).die("."+b.widgetName);b.element!==b.chartElement&&b.chartElement.remove();b.element.empty();if(b.styles)b.styles=null;if(b.disabledDiv){b.disabledDiv.remove();b.disabledDiv=null}a.Widget.prototype.destroy.apply(b,arguments)},getCanvas:function(){return this.canvas},addSeriesPoint:function(c,e,f){var b=this.options.seriesList,d=null,a=null;if(c>=b.length)return;d=b[c];a=d.data||[];a.x.push(e.x);a.y.push(e.y);if(f){a.x.shift();a.y.shift()}this._setOption("seriesList",b)},beginUpdate:function(){var a=this;a.updating++},endUpdate:function(){var a=this;a.updating--;a.redraw()},redraw:function(e){var a=this,d=a.options,c=0,b=0;if(a.updating>0)return;if(e&&a.rendered)return;c=d.width||a.element.width();b=d.height||a.element.height();if(c<1||b<1)return;a.canvas.setSize(c,b);a._paint()},_parseTable:function(){if(!this.element.is("table"))return;var d=this,e=d.element,b=d.options,c=a("caption",e),g=a("thead th",e),f=[],h=a("tbody tr",e);if(c.length){b.header=a.extend({visible:true,text:a.trim(a(c[0]).text())},b.header);if(c.length>1)b.footer=a.extend({visibel:true,text:a.trim(a(c[1]).text())},b.footer)}b.legend=a.extend({visible:true},b.legend);d._getSeriesFromTR(g,h,f);d.options.seriesList=f},_getSeriesFromTR:function(b,e,g){var c=[],f=null,d=null;b.length&&b.each(function(){f=a.trim(a(this).text());c.push(f)});e.length&&e.each(function(){var h=a("th",a(this)),f=a.trim(h.text()),b=[],e=a("td",a(this));e.length&&e.each(function(){var c=a(this);b.push(parseFloat(a.trim(c.text())))});d={label:f,legendEntry:true,data:{x:c,y:b}};g.push(d)})},_destroyRaphaelArray:function(c){if(!c)return;for(var f=c.length,e=0,b,d;f&&e<f;e++){b=c[e];if(b&&b[0]){d=a(b.node);d.unbind().removeData();b.wijRemove();d.remove();d=null}c[e]=null}},_clearChartElement:function(){var b=this,c=b.chartElement.data("fields");b._destroyRaphaelArray(b.headerEles);b._destroyRaphaelArray(b.footerEles);b._destroyRaphaelArray(b.legendEles);b._destroyRaphaelArray(b.legends);b._destroyRaphaelArray(b.legendIcons);b._destroyRaphaelArray(b.legendDots);b._destroyRaphaelArray(b.axisEles);b._destroyRaphaelArray(b.chartLabelEles);if(b.tooltip){b.tooltip.destroy();b.tooltip=null}b.dataPoints=null;b.pointXs=null;if(c&&c.trackers){b._destroyRaphaelArray(c.trackers);c.trackers=null}b.headerEles=[];b.footerEles=[];b.legendEles=[];b.legends=[];b.legendIcons=[];b.legendDots=[];b.axisEles=[];b.chartLabelEles=[];if(c&&c.chartElements){a.each(c.chartElements,function(c,a){b._destroyRaphaelArray(a)});c.chartElements=null}if(c&&c.seriesEles)c.seriesEles=null;if(b.seriesEles)b.seriesEles=[];b.canvas.clear();b.innerState=null;b.axisInfo=null;b.seriesGroup=null;b.lastAxisOffset=null;b.innerState={}},_text:function(c,d,b){var a=this.canvas.text(c,d,b);if(this.options.disableDefaultTextStyle)a.node.style.cssText="";return a},_paint:function(){var b=this,c=b.options,a=b.element,f=a.css("display")==="none"||a.css("visibility")==="hidden",e={},d=null;if(f){e=a.css("left");d=a.css("position");a.css("left","-10000px");a.css("position","absolute");a.show()}if(a.is(":hidden")){if(f){a.css("left",e);a.css("position",d);a.hide()}return}b._clearChartElement();if(b._trigger("beforePaint")===false)return;b.canvasBounds={startX:0,endX:c.width||a.width(),startY:0,endY:c.height||a.height()};b._paintHeader();b._paintFooter();b._paintLegend();b._paintChartArea();if(c.indicator&&c.indicator.visible)if(this.pointXs)this.pointXs=this.pointXs.sort(function(a,b){return a-b});b._paintTooltip();b._trigger("painted");b.rendered=true;if(b.styles){c.seriesStyles=b.styles.style;c.seriesHoverStyles=b.styles.hoverStyles}if(f){a.css("left",e);a.css("position",d);a.hide()}},_paintIndicater:function(){},_calculatePosition:function(g,f,e){var b={x:0,y:0},c=5,d=5,a=this.canvasBounds;switch(g){case"north":b.x=(a.endX-a.startX)/2;b.y=a.startY+e/2+d;a.startY=a.startY+d*2+e;break;case"south":b.x=(a.endX-a.startX)/2;b.y=a.endY-e/2-d;a.endY=a.endY-d*2-e;break;case"east":b.x=a.endX-f/2-c;b.y=(a.endY-a.startY)/2;a.endX=a.endX-c*2-f;break;case"west":b.x=a.startX+f/2+c;b.y=(a.endY-a.startY)/2;a.startX=a.startX+c*2+f}return b},_paintHeader:function(){var g=2,d=this,m=d.options,c=m.header,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-header-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-header-container");e.attr(c.style);e.toBack();d.headerEles.push(b);d.headerEles.push(e)}},_paintFooter:function(){var g=2,d=this,m=d.options,c=m.footer,h=null,b=null,k=null,j=null,i=null,f=null,l=0,e=null;if(c.text&&c.text.length>0&&c.visible){h=c.compass;b=d._text(0,0,c.text);a.wijraphael.addClass(a(b.node),"wijchart-footer-text");l=d._getRotationByCompass(h);k=a.extend(true,{},m.textStyle,c.textStyle);b.attr(k);b.transform("...R"+l);j=b.wijGetBBox();i=d._calculatePosition(h,j.width,j.height);b.transform(Raphael.format("...T{0},{1}",i.x,i.y));f=b.wijGetBBox();e=d.canvas.rect(f.x-g,f.y-g,f.width+2*g,f.height+2*g);a.wijraphael.addClass(a(e.node),"wijchart-footer-container");e.attr(c.style);e.toBack();d.footerEles.push(b);d.footerEles.push(e)}},_getRotationByCompass:function(b){var a=0;if(b==="east")a=90;else if(b==="west")a=-90;return a},_paintLegend:function(){if(!this.options.legend.visible)return;var b=this,t=b.options,c=a.extend(true,{size:{width:22,height:10}},t.legend),g=2,L=t.seriesStyles,u=[].concat(t.seriesList),r=c.compass,y=c.orientation,i,J,f,e,v=b.canvasBounds,x=v.endX-v.startX,w=v.endY-v.startY,h=c.size.width,I=c.size.height,E,l=0,D=0,m=0,j=0,q=0,p=0,d=1,K=0,k=0,z=0,F=0,n=0,G,A,B,o,H=[],s=0,C=0;if(c.text&&c.text.length){i=b._text(0,0,c.text);a.wijraphael.addClass(a(i.node),"wijchart-legend-title");J=a.extend(true,{},t.textStyle,c.textStyle,c.titleStyle);i.attr(J);b.legendEles.push(i)}if(c.reversed)u=u.reverse();a.each(u,function(f,d){d=a.extend(true,{legendEntry:true,display:"show"},d);function e(e){var n=c.reversed?u.length-1-s:s,l=L[n],m=a.extend(true,{fill:"none",opacity:1,stroke:"black"},l),d,j,k,g=false,f=e.type,i;if(e.legendEntry&&e.display!=="exclude"){j=a.extend(true,{},t.textStyle,c.textStyle);if(c.textWidth)d=b.canvas.wrapText(0,0,e.label,c.textWidth,"far",j);else{d=b._text(0,0,e.label);d.attr(j)}a.wijraphael.addClass(a(d.node),"wijchart-legend-text wijchart-legend");b.legends.push(d);k=a.extend(m,{"stroke-width":1});i=b.canvas.rect(0,0,h,I);a.wijraphael.addClass(a(i.node),"wijchart-legend-icon wijchart-legend");i.attr(k);b.legendIcons.push(i);H.push(k);if(b.widgetName==="wijcompositechart")g=f==="line"||f==="spline"||f==="bezier"||f==="area";else g=b.widgetName==="wijlinechart";if(c.textWidth)a.each(d,function(c,b){if(e.visible===false&&!g){a(b.node).data("hidden",true).data("textOpacity",b.attr("opacity")||1);b.attr("opacity",.3)}a.wijraphael.addClass(a(b.node),"wijchart-legend-text wijchart-legend");a(b.node).data("legendIndex",C).data("index",s)});else{if(e.visible===false&&!g){a(d.node).data("hidden",true).data("textOpacity",d.attr("opacity")||1);d.attr("opacity",.3)}a.wijraphael.addClass(a(d.node),"wijchart-legend-text wijchart-legend");a(d.node).data("legendIndex",C).data("index",s)}C++}s++}if(d.type==="pie"&&d.legendEntry)a.each(d.data,function(c,b){b=a.extend({legendEntry:d.legendEntry},b);e(b)});else if(b._isPieChart())e(d);else{if(d.data.x===undefined&&d.data.xy===undefined||d.data.xy===undefined&&d.data.y===undefined)return true;e(d)}});f=b.legends.length;e=c.textMargin;if(i){E=i.wijGetBBox();l=E.height;D=E.width}a.each(b.legends,function(c,b){var a=b.wijGetBBox();if(a.width>m)m=a.width;if(a.height>j)j=a.height});if(r==="east"||r==="west"){if(y==="horizontal"){q=f*(m+h+g)+f*(e.left+e.right);if(q>x/2){d=Math.floor(x/2/m);if(d<1)d=1}else d=f}else if(y==="vertical"){p=j*f+l+f*(e.top+e.bottom);if(p>w)d=Math.ceil(p/w);else d=1}}else if(r==="south"||r==="north")if(y==="horizontal"){q=(m+h+g)*f+f*(e.left+e.right);if(q>x){d=Math.floor(f/q*x);if(d<1)d=1}else d=f}else if(y==="vertical"){p=j*f+l+f*(e.top+e.bottom);if(p>w/2){K=Math.floor(w-l)/2/j;d=Math.ceil(f/K)}else d=1}if(d===0)d=1;k=d*(m+h+g)+d*(e.left+e.right);z=j*Math.ceil(f/d)+l+Math.ceil(f/d)*(e.top+e.bottom);k=k>D?k:D;G=b._calculatePosition(r,k,z);A=G.x-k/2;B=G.y-z/2;o=b.canvas.rect(A-g,B-g,k+2*g,z+2*g);a.wijraphael.addClass(a(o.node),"wijchart-legend-container");o.attr(c.style);o.toBack();b.legendEles.push(o);i&&i.transform(Raphael.format("...T{0},{1}",A+k/2,B+l/2));F=l;a.each(b.legends,function(s,l){var i=l.wijGetBBox(),f=b.legendIcons[s],p=A+n*(h+m+g)+(n+1)*e.left+n*e.right,q=B+F+i.height/2+e.top+j/2-i.height/2,t=q-f.wijGetBBox().height/2,r,o,k=l;f.wijRemove();f=null;f=b.canvas.rect(p,t,h,I);if(c.textWidth)k=l[0];a(f.node).data("legendIndex",a(k.node).data("legendIndex")).data("index",a(k.node).data("index"));a.wijraphael.addClass(a(f.node),"wijchart-legend-icon wijchart-legend");b.legendIcons[s]=f;r=H[s];if(r){f.attr(r);if(a(k.node).data("hidden")===true){a(k.node).data("iconOpacity",f.attr("opacity")||1);f.attr("opacity",.3)}}if(c.textStyle["text-anchor"]==="start")p-=i.width/2;if(c.textWidth)l.transform(Raphael.format("...T{0},{1}",p+h+g,q-i.height/2));else l.transform(Raphael.format("...T{0},{1}",p+h+g+i.width/2,q));if(Raphael.vml){o=b.canvas.rect(p+h+g,q-i.height/2,i.width,i.height).attr({stroke:"none",fill:"#000000",opacity:.01});a.wijraphael.addClass(a(o.node),"wijchart-legend-textCover wijchart-legend");a(o.node).data("legendIndex",a(k.node).data("legendIndex"));a(o.node).data("index",a(k.node).data("index"));b.legendEles.push(o)}l.toFront();n++;if(n===d){n=0;F+=j+e.top+e.bottom}})},_hasAxes:function(){return this.widgetName==="wijpiechart"?false:true},_applyAxisText:function(i){var j=this,h=i.text,c=null,d=null,b=null,f=0,e=0,g=j.canvasBounds;if(h!==null&&h!==undefined&&h.length>0){d=j._text(-100,-100,h);b=a.extend(true,{},j.options.textStyle,i.textStyle);d.attr(b);c=d.wijGetBBox();if(b["margin-left"])e+=parseFloat(b["margin-left"]);if(b["margin-top"])f+=parseFloat(b["margin-top"]);if(b["margin-right"])e+=parseFloat(b["margin-right"]);if(b["margin-bottom"])f+=parseFloat(b["margin-bottom"]);switch(i.compass){case"north":g.startY+=c.height+f;break;case"south":g.endY-=c.height+f;break;case"east":g.endX-=c.height+e;break;case"west":g.startX+=c.height+e}d.wijRemove();d=null}return c},_isSeriesDataEmpty:function(){var c=this,b=c.options.seriesList;if(!b||b.length===0)return true;a.each(b,function(b,a){if(!a.data||(!a.data.x||!a.data.y)&&!a.data.xy)return true});return false},_setTooltipContent:function(k){var i=this,b,f,d,e=i.tooltip,j,c={},h=i.options.hint,g=a.isFunction;if(e){b=[];a.each(k,function(f,c){var d=c.valX,e=c.valY;if(d&&e)b.push(a.extend({},c,{x:d,y:e}));else b.push(c)});j=e.getOptions();f=h.title;d=h.content;if(g(f))c.title=function(){return f.call(b)};if(g(d))c.content=function(){return d.call(b)};e.setOptions(c)}},_setTooltip:function(){var a=this,d=a.options,c=a.tooltip,b;if(c){b={closeBehavior:"none",style:{stroke:d.indicator.style.stroke},animated:false,showDelay:0,hideDelay:0,windowCollisionDetection:"fit",beforeShowing:function(){if(this.target&&a.indicatorLine)return false}};if(d.horizontal)b.compass="east";c.setOptions(b)}},_resetTooltip:function(){var d=this,i=d.options,c=i.hint,h=c.title,f=c.content,g=d.tooltip,e=a.isFunction,b={};if(g){b.animated=c.animated;b.showDelay=c.showDelay;b.hideDelay=c.hideDelay;b.title=c.title;b.content=c.content;b.closeBehavior=c.closeBehavior||"auto";b.windowCollisionDetection="fit";if(e(h))b.title=function(){return d._getTooltipText(h,this.target)};if(e(f))b.content=function(){return d._getTooltipText(f,this.target)};b.beforeShowing=function(){d._onBeforeTooltipShowing(this)};g.setOptions(b)}},_paintTooltip:function(){var b=this,h=b.options,c=h.hint,i=!h.disabled&&c.enable,e=c,f,d,g=a.isFunction;if(i&&!b.tooltip){e=a.extend(true,{},c,{});f=c.title;d=c.content;if(!d)d=c.content=function(){var b;if(a.isArray(this)){var c="";a.each(this,function(d,a){b=a.label;if(a.lineSeries&&a.lineSeries.label)b=a.lineSeries.label;c+=b+":"+a.y+"\n"});return c}else{b=this.label;if(this.lineSeries&&this.lineSeries.label)b=this.lineSeries.label;return b+":"+this.y}};if(g(f))e.title=function(){return b._getTooltipText(f,this.target)};if(g(d))e.content=function(){return b._getTooltipText(d,this.target)};e.beforeShowing=function(){b._onBeforeTooltipShowing(this)};b.tooltip=b.canvas.tooltip(null,e)}},_getTooltipText:function(d,c){var b=a(c.node).data("wijchartDataObj"),e={data:b,label:b.label,x:b.x,y:b.y,target:c,fmt:d};return a.proxy(d,e)()},_onBeforeTooltipShowing:function(b){var a=b.target,c=this.options.hint.style;if(a)b.options.style.stroke=c.stroke||a.attrs.stroke||a.attrs.fill},_paintChartArea:function(){var b=this,p=b.options,c=p.axis,l=2,n=null,k=null,f={},m=5,g=0,h=0,i=a.isArray(c.y),o=0,j,d,e;b._applyMargins();b.isMultiYAxis=i;if(b._isSeriesDataEmpty())return;i&&a.each(c.y,function(d,b){c.y[d]=a.extend(true,{alignment:"center",style:{stroke:"#999999","stroke-width":.5},visible:false,textVisible:true,text:"",textStyle:{fill:"#888","font-size":15,"font-weight":"bold"},labels:{style:{fill:"#333","font-size":11},textAlign:"center",width:null},compass:"west",autoMin:true,autoMax:true,min:null,max:null,origin:null,autoMajor:true,autoMinor:true,unitMajor:null,unitMinor:null,gridMajor:{visible:true,style:{stroke:"#999999","stroke-width":"0.5","stroke-dasharray":"none"}},gridMinor:{visible:false,style:{stroke:"#CACACA","stroke-dasharray":"- "}},tickMajor:{position:"none",style:{fill:"black"},factor:1},tickMinor:{position:"none",style:{fill:"black"},factor:1},annoMethod:"values",annoFormatString:"",valueLabels:[]},b)});if(b._hasAxes()){if(b.innerState.axisInfo){b.axisInfo=b.innerState.axisInfo;b.canvasBounds=b.innerState.canvasBounds}else{n=b._applyAxisText(c.x,{});b.axisInfo={x:{id:"x",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:n,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:c.x.annoMethod,valueLabels:c.x.valueLabels||[]},y:{}};b.axisCompass[c.x.compass]=true;if(i)a.each(c.y,function(c,a){k=b._applyAxisText(a,{});b.axisInfo.y[c.toString()]={id:"y"+c,tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:a.annoMethod,valueLabels:a.valueLabels||[]};if(!b.axisCompass[a.compass])b.axisCompass[a.compass]=true});else{k=b._applyAxisText(c.y,{});b.axisInfo.y["0"]={id:"y",tprec:0,isTime:false,offset:0,vOffset:0,max:0,min:0,majorTickRect:null,minorTickRect:null,annoFormatString:null,textBounds:k,axisTextOffset:l,autoMax:true,autoMin:true,autoMajor:true,autoMinor:true,annoMethod:c.y.annoMethod,valueLabels:c.y.valueLabels||[]};if(!b.axisCompass[c.y.compass])b.axisCompass[c.y.compass]=true}b._getSeriesGroup(i);f=b._getDataExtreme(i);if(c.x.autoMin&&b.axisInfo.x.autoMin)c.x.min=f.txn;else if(c.x.min&&b._isDate(c.x.min))c.x.min=a.toOADate(c.x.min);if(c.x.autoMax&&b.axisInfo.x.autoMax)c.x.max=f.txx;else if(c.x.max&&b._isDate(c.x.max))c.x.max=a.toOADate(c.x.max);a.each(f.y,function(){o++});for(j=0;j<(c.y.length||1);j++){d=c.y[j]||c.y;e=j.toString();if(d.autoMin&&b.axisInfo.y[e].autoMin&&f.y[e])d.min=f.y[e].tyn;else if(d.min&&b._isDate(d.min))d.min=a.toOADate(d.min);if(d.autoMax&&b.axisInfo.y[e].autoMax&&f.y[e])d.max=f.y[e].tyx||0;else if(d.max&&b._isDate(d.max))d.max=a.toOADate(d.max);do{h=b._autoPosition(b.axisInfo,c,"y",e);g=b._autoPosition(b.axisInfo,c,"x",e);if(h===b.axisInfo.y[e].offset&&g===b.axisInfo.x.offset){m=0;break}if(!isNaN(g)&&!isNaN(h)){if(h!==b.axisInfo.y[e].offset&&h!==0){b.axisInfo.y[e].offset=h;b.axisInfo.y[e].vOffset=g}if(g!==b.axisInfo.x.offset&&g!==0){b.axisInfo.x.offset=g;b.axisInfo.x.vOffset=h}}m--}while(m>0)}b._adjustPlotArea(c.x,b.axisInfo.x);b._adjustPlotArea(c.y,b.axisInfo.y,true);b.innerState.axisInfo=b.axisInfo;b.innerState.canvasBounds=b.canvasBounds}b._paintAxes();b._paintPlotArea()}else b._paintPlotArea()},_getSeriesGroup:function(d){var c=this,e=c.options,b={};a.each(e.seriesList,function(c,a){if(a.yAxis&&d)if(b[a.yAxis.toString()])b[a.yAxis.toString()].push(a);else b[a.yAxis.toString()]=[a];else if(b["0"])b["0"].push(a);else b["0"]=[a]});c.seriesGroup=b},_adjustPlotArea:function(e,d,f){var c=this.canvasBounds,g,b={east:Number.MIN_VALUE,west:Number.MIN_VALUE,south:Number.MIN_VALUE,north:Number.MIN_VALUE};if(f){a.each(d,function(a){g=a});a.each(d,function(f,a){var c=e[f]||e,d=c.compass;c.max=a.max;c.min=a.min;switch(d){case"north":b.north=Math.max(a.offset,b.north);break;case"south":b.south=Math.max(a.offset,b.south);break;case"east":b.east=Math.max(a.offset,b.east);break;case"west":b.west=Math.max(a.offset,b.west)}});if(b.north!==Number.MIN_VALUE)c.startY+=b.north;if(b.south!==Number.MIN_VALUE)c.endY-=b.south;if(b.east!==Number.MIN_VALUE)c.endX-=b.east;if(b.west!==Number.MIN_VALUE)c.startX+=b.west}else{e.max=d.max;e.min=d.min;switch(e.compass){case"north":c.startY+=d.offset;break;case"south":c.endY-=d.offset;break;case"east":c.endX-=d.offset;break;case"west":c.startX+=d.offset}}},_autoPosition:function(b,a,c,d){return this._autoPositionCartesianAxis(b,a,c,d)},_autoPositionCartesianAxis:function(m,g,p,i){var h=this,o=null,b,e,k,n,c,j,q,r,f=h.lastAxisOffset||{},d,l;if(p==="y"){b=m.y[i];e=g.y[i]||g.y;n=g.x;k=m.x}else{b=m.x;e=g.x;k=m.y[i];n=g.y[i]||g.y}c=e.compass;j=n.origin;q=k.max;r=k.min;if(j!==null&&h._isDate(j))j=a.toOADate(j);h._calculateParameters(b,e);o=h._getMaxExtents(b,e);switch(c){case"north":case"south":d=o.height;b.maxExtent=d;break;case"east":case"west":d=o.width;b.maxExtent=d}if(p==="y"&&f[c]){a.each(f[c],function(b,a){if(b!==i)l=a});if(l){b.preStartOffset=l;d+=l}}if(p==="y"){if(f[c]===undefined)f[c]={};f[c][i]=d+h._getAxisLabelBox(e).width;h.lastAxisOffset=f}return d},_getAxisLabelBox:function(d){var f=this,m=f.options,l=d.text,j=0,h=0,i=0,g=0,c,e,k=f._isVertical(d.compass),b=a.extend(true,{},m.textStyle,d.textStyle);if(b["margin-top"])j=parseFloat(b["margin-top"]);if(b["margin-left"])i=parseFloat(b["margin-left"]);if(b["margin-right"])h=parseFloat(b["margin-right"]);if(b["margin-bottom"])g=parseFloat(b["margin-bottom"]);c=f._text(0,0,l);c.attr(b);k&&c.transform("...R-90");e=c.wijGetBBox();c.wijRemove();c=null;return{width:e.width+i+h,height:e.height+g+j}},_getMaxExtents:function(b,f,o){var c=this,p=c.options,i=null,e={width:0,height:0},u=b.min,t=b.max,s=b.isTime,d=f.annoFormatString,r=p.is100Percent,l=0,q=f.compass,h=f.labels,g,m=false,n=c.canvasBounds,j,k;b.majorTickRect=c._getTickRect(b,f,true,true,o);b.minorTickRect=c._getTickRect(b,f,false,true,o);i=c._getMajorTickValues(b,f);if(!f.textVisible)return e;if(!d||d.length===0)d=b.annoFormatString;g=a.extend(true,{},p.textStyle,f.textStyle,h.style);k=g.transform;k&&k.length&&a.each(k,function(b,a){if(a[0].toLowerCase()==="r"){m=true;return false}});g=a.extend(true,g,b.textStyle);j=n.endX-n.startX-b.vOffset-b.axisTextOffset;if(i&&i.length){j=j/(i.length-1);a.each(i,function(o,f){var k,i,n;if(f<u||f>t)return true;if(b.annoMethod==="valueLabels"){if(f<0)return true;if(l>=b.valueLabels.length)return false;f=b.valueLabels[l];if(f.text)f=f.text;else if(typeof f.value!=="undefined"){f=f.value;if(d&&d.length)f=Globalize.format(f,d,c._getCulture())}}else if(b.annoMethod==="values")if(d&&d.length){if(s)f=a.fromOADate(f);f=Globalize.format(f,d,c._getCulture())}else if(r&&b.id==="y")f=Globalize.format(f,"p0",c._getCulture());if(h.width)k=c.canvas.wrapText(-100,-100,f,h.width,h.textAlign,g);else k=c._text(-100,-100,f).attr(g);i=k.wijGetBBox();if(!c._isVertical(q)&&!m&&b.annoMethod==="valueLabels")if(i.width>j){k.attr({transform:"r-45"});i=k.wijGetBBox();if(o===0){g.transform="r-45";b.textStyle={transform:"r-45"};n=k.clone();n.attr({transform:"r0"});i=n.wijGetBBox();if(Math.sqrt(2)*i.height>j){k.attr({transform:"r-90"});g.transform="r-90";b.textStyle={transform:"r-90"}}n.wijRemove();n=null;i=k.wijGetBBox()}}k.wijRemove();k=null;if(i.width>e.width)e.width=i.width;if(i.height>e.height)e.height=i.height;l++})}if(e.width<h.width)e.width=h.width;b.labelWidth=e.width;return e},_getMajorTickValues:function(c,e){var d=[],b=c.valueLabels;b&&b.length>0&&a.each(b,function(c,a){if(typeof a.text!=="undefined"||typeof a.value!=="undefined")return false;if(typeof a==="string")b[c]={text:a,gridLine:false};else b[c]={value:a,gridLine:false}});if(c.annoMethod==="valueLabels"&&b&&b.length>0&&typeof b[0].value!=="undefined"){d=this._getSortedDataValues(c,e);return d}d=this._getTickValues(c.max,c.min,e.unitMajor,c.tprec,!c.isTime,e.autoMajor);return d},_getSortedDataValues:function(d){var e=this,b=[],c=d.valueLabels;a.each(c,function(f,d){var c=d.value;if(e._isDate(c))b.push(a.toOADate(c));else if(typeof c==="number")b.push(c);else b.push(f)});return b},_getMinorTickValues:function(a,b){var c=[];c=this._getTickValues(a.max,a.min,b.unitMinor,a.tprec,!a.isTime,b.autoMinor);return c},_getTickValues:function(f,b,c,g,o,l){var p=this,i=[],n=b,e=0,h=0,m=0,k=0,d=0,j=0;try{if(c===0)i=[f,b];else{if(l){if(g+1<0)g=-1;else if(g+1>15)g=14;j=a.round(p._signedCeiling(b/c)*c,g+1);if(j<f)b=j;m=parseInt(a.round(f/c,5),10);k=parseInt(a.round(b/c,5),10);d=parseInt(m-k+1,10);if(d>1){h=k*c;if(h<b){d--;b+=c}h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;b=n;c=f-b}}else{d=parseInt((f-b)/c+1,10);if(d>1){h=b+(d-1)*c;if(h>f)d--}if(d<1){d=2;c=f-b}}for(e=0;e<d;e++)if(o)if(l)i[e]=a.round(b+e*c,g+1);else i[e]=b+e*c;else i[e]=b+e*c}}catch(q){}return i},_getTickRect:function(m,d,l,e){var c=d.compass,f=0,a=null,j=3,k=2,i=2,g=d.tickMajor.factor,h=d.tickMinor.factor,b={x:0,y:0,width:0,height:0};if(l){a=d.tickMajor.position;g=g>0?g:1;f=j*g}else{a=d.tickMinor.position;h=h>0?h:1;f=k*h}if(a==="none"||a==="inside"&&e)f=0;if(c==="east"||c==="west"){b={x:0,y:-1,width:f*i,height:i};if(c==="east"&&(a==="outside"||a==="cross"&&e)||c==="west"&&a==="inside")b.width+=2;else if(!e){if(a==="cross")b.width<<=1;b.width+=2}}else{b={x:-1,y:0,width:i,height:f*i};if(c==="south"&&(a==="outside"||a==="corss"&&e)||c==="north"&&a==="inside")b.height+=2;else if(!e){if(a==="cross")b.height<<=1;b.height+=2}}return b},_applyMargins:function(){var c=this,b=c.options,a=c.canvasBounds;a.startX+=b.marginLeft;a.endX-=b.marginRight;a.startY+=b.marginTop;a.endY-=b.marginBottom},_paintAxes:function(){var b=this,h=b.options.axis,g=b.axisInfo,c=h.x,e=h.y,f=g.x,i=g.y,d;d=b._paintAxis(c,f);a.each(i,function(g,f){var a=e[g]||e;a.origin!==null&&b._translateAxisIfNeeded(d,c.compass,a.origin,a.compass,f.max,f.min)});a.each(i,function(h,g){var a=e[h]||e;d=b._paintAxis(a,g);c.origin!==null&&b._translateAxisIfNeeded(d,a.compass,c.origin,c.compass,f.max,f.min)})},_translateAxisIfNeeded:function(g,h,l,i,e,f){var j=this,k=i==="west"||i==="east",b=j.canvasBounds,c=l,d;if(j._isDate(c))c=a.toOADate(c);if(!k){if(h==="west")d=(c-f)/(e-f)*(b.endX-b.startX);else d=(c-e)/(e-f)*(b.endX-b.startX);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",d,0))})}else{if(h==="south")d=(f-c)/(e-f)*(b.endY-b.startY);else d=(e-c)/(e-f)*(b.endY-b.startY);a.each(g,function(b,a){a.transform(Raphael.format("...T{0},{1}",0,d))})}},_paintAxis:function(c,b){var e=this,B=e.options,d=e.canvasBounds,f={x:0,y:0},g={x:0,y:0},s=c.compass,k=2,q=true,o=null,p=[],u=[],v=[],m=b.max,n=b.min,I=c.unitMajor,J=c.unitMinor,G=c.tickMajor.position,H=c.tickMinor.position,A=b.maxExtent,C=c.tickMajor.style,D=c.tickMinor.style,x=b.majorTickRect,y=b.minorTickRect,w=b.axisTextOffset,E=c.gridMajor,F=c.gridMinor,j=c.labels,t=0,z=[],l=0,h=c.annoFormatString,r=null,i=[];x=e._getTickRect(b,c,true,false);y=e._getTickRect(b,c,false,false);if(!h||h.length===0)h=b.annoFormatString;p=e._getMajorTickValues(b,c);u=e._getMinorTickValues(b,c);v=e._resetMinorTickValues(u,p);switch(s){case"south":f.x=d.startX;f.y=d.endY;g.x=d.endX;g.y=d.endY;q=false;break;case"north":f.x=d.startX;f.y=d.startY-k;g.x=d.endX;g.y=d.startY-k;q=false;break;case"east":f.x=d.endX-k;if(b.preStartOffset)f.x+=b.preStartOffset;f.y=d.endY;g.x=d.endX-k;g.y=d.startY;break;case"west":f.x=d.startX;if(b.preStartOffset)f.x-=b.preStartOffset;f.y=d.endY;g.x=d.startX;g.y=d.startY}if(c.visible){o=e.canvas.line(f.x,f.y,g.x,g.y).attr(c.style);a.wijraphael.addClass(a(o.node),"wijchart-axis");e.axisEles.push(o);i.push(o)}a.each(p,function(D,k){var d=k,y=b.isTime,v=B.is100Percent,p,o,u=false,q={};if(k<n||k>m){l++;return true}if(b.annoMethod==="valueLabels"){if(l>=b.valueLabels.length)return false;d=b.valueLabels[l];u=d.gridLine;q=d.gridLineStyle;if(d.text)d=d.text;else if(typeof d.value!=="undefined"){d=d.value;if(h&&h.length)d=Globalize.format(d,h,e._getCulture())}}else if(b.annoMethod==="values")if(h&&h.length){if(y)d=a.fromOADate(k);d=Globalize.format(d,h,e._getCulture())}else if(v&&b.id==="y")d=Globalize.format(k,"p0",e._getCulture());r=a.extend(true,{},B.textStyle,c.textStyle,j.style,b.textStyle);p=e._paintMajorMinor(m,n,k,G,I,x,s,f,g,A,w,C,d,E,c.textVisible,r,j.textAlign,j.width?b.labelWidth:null,u,q);if(p){if(p.elements)i=i.concat(p.elements);o=p.textInfo}if(o){z.push(o);if(t<o.len)t=o.len}l++});!j.width&&a.each(z,function(d,c){var b=c.text,a=(c.len-t)/2;a=j.textAlign==="near"?a*-1:a;if(q)b.transform(Raphael.format("...T{0},{1}",a,0));else b.transform(Raphael.format("...T{0},{1}",0,a))});a.each(v,function(h,d){var a;if(d>n&&d<m){a=e._paintMajorMinor(m,n,d,H,J,y,s,f,g,A,w,D,null,F,c.textVisible,r,j.textAlign,j.width?b.labelWidth:null);if(a&&a.elements)i=i.concat(a.elements)}});c.text&&c.text.length>0&&i.push(e._paintAxisText(c,b));return i},_paintAxisText:function(d,f){if(!d.text||d.text.length===0)return;var j=this,z=d.text,p=d.compass,x=d.alignment,l=j.canvasBounds,m=l.startX,n=l.startY,q=l.endX,r=l.endY,h=m,i=n,c=f.textBounds,o=j._isVertical(p),k=f.axisTextOffset,s=f.majorTickRect,y=d.tickMajor.position,e=o?s.width:s.height,b=null,g=null,w=0,v=0,u=0,t=0;b=a.extend(true,{},j.options.textStyle,d.textStyle);if(b["margin-top"])w=parseFloat(b["margin-top"]);if(b["margin-left"])v=parseFloat(b["margin-left"]);if(b["margin-right"])u=parseFloat(b["margin-right"]);if(b["margin-bottom"])t=parseFloat(b["margin-bottom"]);if(y==="cross")e=e/2;else if(y==="inside")e=0;if(o){switch(x){case"near":i=r-c.width/2;break;case"center":i=(n+r)/2;break;case"far":i=n+c.width/2}if(p==="west")h=m-(f.offset+k+e+c.height/2+u);else h=q+f.offset+k+e+c.height/2+v}else{switch(x){case"near":h=m+c.width/2;break;case"center":h=(m+q)/2;break;case"far":h=q-c.width/2}if(p==="north")i=n-(f.offset+k+e+c.height/2+t);else i=r+f.offset+k+e+c.height/2+w}g=j._text(h,i,z);a.wijraphael.addClass(a(g.node),"wijchart-axis-text");j.axisEles.push(g);g.attr(b);o&&g.transform("...R-90");return g},_resetMinorTickValues:function(a,d){for(var b=0,c=0,f=null,e=null,b=a.length-1;b>=0;b--){f=a[b];for(c=d.length-1;c>=0;c--){e=d[c];f===e&&a.splice(b,1)}}return a},_paintMajorMinor:function(J,u,K,h,M,d,L,t,G,o,j,x,A,q,C,F,E,l,D,B){var f=this,b=t.x,c=t.y,m=-1,n=-1,s=true,g=f.canvasBounds,H=null,r=null,y=[],p=[],e=null,z={"stroke-width":2},i={text:null,len:0},w=null,I={},v=[],k=f.axisCompass;switch(L){case"south":if(h==="inside")c-=d.height;else if(h==="cross")c-=d.height/2;if(l)n=c+j+d.height;else n=c+j+d.height+o/2;s=false;break;case"west":if(h==="outside")b-=d.width;else if(h==="cross")b-=d.width/2;if(l)m=b-(j+o);else m=b-(j+o/2);break;case"north":if(h==="outside")c-=d.height;else if(h==="cross")c-=d.height/2;if(l)n=c-(j+o);else n=c-(j+o/2);s=false;break;case"east":if(h==="inside")b-=d.width;else if(h==="cross")b-=d.width/2;if(l)m=b+j+d.width;else m=b+j+d.width+o/2}if(s){c+=(K-u)/(J-u)*(G.y-t.y);p=["M",g.startX,c,"H",g.endX];if(q.visible)if((c!==g.startY||!k.north)&&(c!==g.endY||!k.south)){e=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(e.node),"wijchart-axis-gridline");e.attr(q.style);f.axisEles.push(e)}if(D)if((c!==g.startY||!k.north)&&(c!==g.endY||!k.south)){e=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(e.node),"wijchart-axis-gridline");e.attr(a.extend(true,q.style,B));f.axisEles.push(e)}n=c;if(h!=="none"){y=["M",b,c,"h",d.width];x["stroke-width"]=d.height}}else{b+=(K-u)/(J-u)*(G.x-t.x);p=["M",b,g.startY,"V",g.endY];if(q.visible)if((b!==g.startX||!k.west)&&(b!==g.endX||!k.east)){e=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(e.node),"wijchart-axis-gridline");e.attr(q.style);f.axisEles.push(e)}if(D)if((b!==g.startX||!k.west)&&(b!==g.endX||!k.east)){e=f.canvas.path(p.concat(" "));a.wijraphael.addClass(a(e.node),"wijchart-axis-gridline");e.attr(a.extend(true,{},q.style,B));f.axisEles.push(e)}if(l)m=b-l/2;else m=b;if(h!=="none"){y=["M",b,c,"v",d.height];x["stroke-width"]=d.width}}if(h!=="none"){r=f.canvas.path(y.concat(" "));a.wijraphael.addClass(a(r.node),"wijchart-axis-tick");z=a.extend(z,x);r.attr(z);f.axisEles.push(r);v.push(r)}if(A!==null&&C){if(l){i=f.canvas.wrapText(m,n,A.toString(),l,E,F);a.wijraphael.addClass(a(i.node),"wijchart-axis-label")}else{i=f._text(m,n,A.toString());a.wijraphael.addClass(a(i.node),"wijchart-axis-label");i.attr(F)}f.axisEles.push(i);v.push(i);!C&&i.hide();if(E!=="center"){w=i.getBBox();H={text:i,len:s?w.width:w.height}}}I={textInfo:H,elements:v};return I},_paintPlotArea:function(){},_paintChartLabels:function(){var c=this,b=c.options.chartLabels;b&&b.length&&a.each(b,function(e,b){var d;b=a.extend(true,{compass:"east",attachMethod:"coordinate",attachMethodData:{seriesIndex:-1,pointIndex:-1,x:-1,y:-1},offset:0,visible:false,text:"",connected:false},b);if(b.visible){d=c._getChartLabelPointPosition(b);if(typeof d.x!=="number"||typeof d.y!=="number")return false;c._setChartLabel(b,d)}})},_getChartLabelPointPosition:function(){},_setChartLabel:function(d,g,o,l){var c=this,n=d.compass,k=c.options,m=a.extend(true,{},k.textStyle,k.chartLabelStyle),e=c._text(0,0,d.text).attr(m),h=d.offset,i=0,j=0,b=null,f=null;a.wijraphael.addClass(a(e.node),"wijchart-label-text");c.chartLabelEles.push(e);b=c._getCompassTextPosition(n,e.wijGetBBox(),h,g,o);if(h&&d.connected){f=c.canvas.path("M"+g.x+" "+g.y+"L"+b.endPoint.x+" "+b.endPoint.y);a.wijraphael.addClass(a(f.node),"wijchart-label-connect");f.attr(l);c.chartLabelEles.push(f)}i=b.endPoint.x+b.offsetX;j=b.endPoint.y+b.offsetY;e.transform(Raphael.format("...T{0},{1}",i,j)).toFront()},_getCompassTextPosition:function(h,c,i,g,b){var d=0,e=0,f={x:0,y:0};switch(h.toLowerCase()){case"east":b=0;break;case"west":b=180;break;case"north":b=90;break;case"south":b=270;break;case"northeast":b=45;break;case"northwest":b=135;break;case"southeast":b=315;break;case"southwest":b=225}if(b>=0&&b<45/2||b>675/2&&b<360)d=c.width/2;else if(b>=45/2&&b<135/2){d=c.width/2;e=c.height/-2}else if(b>=135/2&&b<225/2)e=c.height/-2;else if(b>=225/2&&b<315/2){d=c.width/-2;e=c.height/-2}else if(b>=315/2&&b<405/2)d=c.width/-2;else if(b>=405/2&&b<495/2){d=c.width/-2;e=c.height/2}else if(b>=495/2&&b<585/2)e=c.height/2;else{d=c.width/2;e=c.height/2}f=a.wijraphael.getPositionByAngle(g.x,g.y,i,b);return{endPoint:f,offsetX:d,offsetY:e}},_mouseDown:function(b,a){this._trigger("mouseDown",b,a)},_mouseUp:function(b,a){this._trigger("mouseUp",b,a)},_mouseOver:function(b,a){this._trigger("mouseOver",b,a)},_mouseOut:function(b,a){this._trigger("mouseOut",b,a)},_mouseMove:function(b,a){this._trigger("mouseMove",b,a)},_click:function(b,a){this._trigger("click",b,a)},_mouseMoveInsidePlotArea:function(m,h){var d=this,i=d.options,g=i.indicator,j=d.canvas,b,f,l,k=0,c=[],e=i.horizontal;if(g&&g.visible&&this.isPlotAreaMouseDown){if(e)b=this._calculatePositionByX(h.top);else b=this._calculatePositionByX(h.left);if(b&&this.indicatorLine)if(b.x!==this.lastIndicatorPosition){a.each(b.data,function(b,a){a.visible&&c.push(a)});if(c.length>0){f=d.canvasBounds;if(e)this.indicatorLine.transform("T0 "+b.x);else this.indicatorLine.transform("T"+b.x+" 0");this._setTooltipContent(c);if(e)this.tooltip.showAt({x:f.endX,y:b.x});else this.tooltip.showAt({x:b.x,y:f.startY});this.lastIndicatorPosition=b.x;d._indicatorLineShowing(c);this.lastIndicatorObjects=c}}}},_calculatePositionByX:function(e){var d=this,b=d.pointXs,a,c=d.dataPoints;if(b&&b.length>0)a=this._calculatePositionByXInternal(e,b);return c?{x:a,data:c[a.toString()]}:null},_calculatePositionByXInternal:function(c,a){var e=a.length,b,d;if(e===1)return a[0];else if(e===2)return Math.abs(c-a[0])>Math.abs(c-a[1])?a[1]:a[0];else{b=parseInt(e/2);if(c>a[b])d=a.slice(b);else d=a.slice(0,b+1);return this._calculatePositionByXInternal(c,d)}},_mouseMoveOutsidePlotArea:function(){if(this.indicatorLine){this.indicatorLine.wijRemove();this.indicatorLine=null;this.tooltip&&this.tooltip.hide();this._resetTooltip()}},_mouseDownInsidePlotArea:function(l,i){this.isPlotAreaMouseDown=true;var e=this,j=e.options,g=j.indicator,k=e.canvas,b,c,h,d=[],f=j.horizontal;if(g&&g.visible&&this.isPlotAreaMouseDown){e._setTooltip();if(f)b=this._calculatePositionByX(i.top);else b=this._calculatePositionByX(i.left);if(b){a.each(b.data,function(b,a){a.visible&&d.push(a)});if(d.length>0){c=e.canvasBounds;if(f)h=["M",c.startX,0,"H",c.endX];else h=["M",0,c.startY,"V",c.endY];this.indicatorLine&&this.indicatorLine.wijRemove();this.indicatorLine=k.path(h);this.indicatorLine.attr(g.style);if(f)this.indicatorLine.transform("T0 "+b.x);else this.indicatorLine.transform("T"+b.x+" 0");this._setTooltipContent(d);if(f)this.tooltip.showAt({x:c.endX,y:b.x});else this.tooltip.showAt({x:b.x,y:c.startY});this.lastIndicatorPosition=b.x;e._indicatorLineShowing(d);this.lastIndicatorObjects=d}}l.preventDefault()}},_indicatorLineShowing:function(){this.lastIndicatorObjects&&this._removeIndicatorStyles(this.lastIndicatorObjects)},_removeIndicatorStyles:function(){},_mouseUpInsidePlotArea:function(){this.isPlotAreaMouseDown=false;if(this.indicatorLine){this.indicatorLine.wijRemove();this.indicatorLine=null;this.tooltip&&this.tooltip.hide();this._resetTooltip()}if(this.lastIndicatorObjects){this._removeIndicatorStyles(this.lastIndicatorObjects);this.lastIndicatorObjects=null}},_bindLiveEvents:function(){this._bindLegendEvents();this._bindCanvasEvents()},_bindCanvasEvents:function(){var b=this,c=b.chartElement,d="",e="."+this.widgetName;window.navigator.msPointerEnabled&&c.css("-ms-touch-action","none");if(a.support.isTouchEnabled)d="wij";c.bind(d+"mousemove"+e,function(e){var f=c.offset(),d=b.canvasBounds,a={left:e.pageX-f.left,top:e.pageY-f.top},g=b.options.disabled;if(g)return;if(a.left>=d.startX&&a.left<=d.endX&&a.top>=d.startY&&a.top<=d.endY)b._mouseMoveInsidePlotArea(e,a);else b._mouseMoveOutsidePlotArea(e,a)});b.options.indicator&&b.options.indicator.visible&&c.bind(d+"mousedown"+e,function(e){var f=c.offset(),d=b.canvasBounds,a={left:e.pageX-f.left,top:e.pageY-f.top},g=b.options.disabled;if(g)return;a.left>=d.startX&&a.left<=d.endX&&a.top>=d.startY&&a.top<=d.endY&&b._mouseDownInsidePlotArea(e,a)}).bind(d+"mouseup"+e,function(e){var f=c.offset(),d=b.canvasBounds,a={left:e.pageX-f.left,top:e.pageY-f.top},g=b.options.disabled;if(g)return;a.left>=d.startX&&a.left<=d.endX&&a.top>=d.startY&&a.top<=d.endY&&b._mouseUpInsidePlotArea(e,a)})},_unbindCanvasEvents:function(){window.navigator.msPointerEnabled&&this.element.css("-ms-touch-action","");this.element.unbind("."+this.widgetName)},_bindLegendEvents:function(){var b=this,c=b.chartElement;c.delegate(".wijchart-legend","click.wijchartcore",function(d){if(b.options.disabled)return;var c=a(d.target);if(c[0].tagName&&c[0].tagName==="tspan")c=c.parent();b._legendClick(c)})},_legendClick:function(j){if(typeof j.data("index")==="undefined")return;var c=this,k=c.options.legend,h=j.data("index"),l=j.data("legendIndex"),i=c.chartElement.data("fields"),m=c.seriesEles,g,f=c.legendIcons[l],e=c.legends[l],b=k.textWidth?a(e[0].node):a(e.node),n=h,d;if(i&&i.seriesEles)m=i.seriesEles;if(c.legendDots&&c.legendDots.length>h)d=c.legendDots[h];if(k.reversed)n=c.legends.length-1-h;g=m[n];if(g)if(!b.data("hidden")){c._hideSerieEles(g);if(!b.data("textOpacity"))if(k.textWidth)b.data("textOpacity",e[0].attr("opacity")||1);else b.data("textOpacity",e.attr("opacity")||1);!b.data("iconOpacity")&&b.data("iconOpacity",f.attr("opacity")||1);d&&!b.data("dotOpacity")&&b.data("dotOpacity",f.attr("opacity")||1);e.attr("opacity","0.3");f.attr("opacity","0.3");d&&d.attr("opacity","0.3");b.data("hidden",true)}else{c._showSerieEles(g);e.attr("opacity",b.data("textOpacity"));f.attr("opacity",b.data("iconOpacity"));d&&d.attr("opacity",b.data("dotOpacity"));b.data("hidden",false)}},_showSerieEles:function(){},_hideSerieEles:function(){},_unbindLiveEvents:function(){var b=this,a=this.chartElement,c=b.widgetName;a.undelegate(".wijchart-legend",".wijchartcore").undelegate(".wijchart-legend","wijchartcore");this._unbindCanvasEvents()},_isBarChart:function(){return false},_isPieChart:function(){return false},_calculateParameters:function(c,g){var d=this,b=g.max,a=g.min,o=g.autoMax&&c.autoMax,m=g.autoMin&&c.autoMin,r=g.autoMajor&&c.autoMajor,s=g.autoMinor&&c.autoMinor,h=null,k=null,p=c.annoMethod==="valueLabels",e=0,i=0,j=0,f=0,l=0,n=c.isTime,q=d.options.adjustMinValue;if(o&&b!==Number.MIN_VALUE)if(c.id!=="x"&&d._isBarChart())if(b<0&&.5*(b-a)>-b)b=0;if(m&&a!==Number.MAX_VALUE)if(c.id!=="x"&&d._isBarChart())if(a>0&&.5*(b-a)>a)a=0;if(b===a){if(a!==0)a-=1;b+=1}f=b-a;if(n){h=g.annoFormatString;if(!h||h.length===0){h=d._getTimeDefaultFormat(b,a);c.annoFormatString=h}l=d._niceTimeUnit(0,h)}k=d._nicePrecision(f);c.tprec=k;if(o)if(n){i=d._roundTime(b,l,true);if(i<b)b=i+l;else b=i}else{i=d._precCeil(-k,b);if(typeof i==="number")b=i}if(m)if(n){j=d._roundTime(a,l,false);if(j>a)a=j-l;else a=j}else{j=d._precFloor(-k,a);if(typeof j==="number")a=j}c.max=b;c.min=a;c.annoFormatString=h;c.tinc=l;if(r||s){f=b-a;d._calculateMajorMinor(g,c);e=g.unitMajor;if(o&&e!==0&&!n&&!p){f=b-parseInt(b/e,10)*e;if(f!==0){b+=e-f;b=d._precCeil(-k,b)}}if(m&&e!==0&&!n&&!p){f=a-parseInt(a/e,10)*e;if(f!==0){if(f<0)f+=e;a-=Math.abs(f);a=d._precFloor(-k,a)}}if(m&&e!==0&&!p&&(typeof q==="undefined"||q===false)&&m&&a===g.min&&a-e>=0&&c.id==="y")a-=e}c.max=b;c.min=a},_roundTime:function(k,g,e){var c=this,d=g,f=a.fromOADate(k),b,h,j,i;if(d>0){b={year:f.getFullYear(),month:f.getMonth(),day:f.getDate(),hour:f.getHours(),minute:f.getMinutes(),second:f.getSeconds()};if(d<c._tmInc.minute){b.second=c._tround(b.second,d,e);return c._getTimeAsDouble(b)}b.second=0;if(d<c._tmInc.hour){d/=c._tmInc.minute;b.minute=c._tround(b.minute,d,e);return c._getTimeAsDouble(b)}b.minute=0;if(d<c._tmInc.day){d/=c._tmInc.hour;b.hour=c._tround(b.hour,d,e);return c._getTimeAsDouble(b)}b.hour=0;if(d<c._tmInc.month){d/=c._tmInc.day;b.day=c._tround(b.day,d,e);return c._getTimeAsDouble(b)}b.day=1;if(d<c._tmInc.year){d/=c._tmInc.month;b.month=c._tround(b.month,d,e);return c._getTimeAsDouble(b)}b.month=0;d/=c._tmInc.year;b.year=c._tround(b.year,d,e);return c._getTimeAsDouble(b)}else{h=f;j=h-d;i=parseInt(j/g,10)*g;if(e&&i!==j)i+=g;h=d+i;return h}},_tround:function(c,a,d){var b=parseInt(c/a*a,10);if(d&&b!==c)b+=parseInt(a,10);return b},_getTimeAsDouble:function(b){var e=0,d=0,c=null;if(b.day<1){d=-1-b.day;b.day=1}else if(b.day>28){d=b.day-28;b.day=28}if(b.month<0){e=-1-b.day;b.month=0}else if(b.month>11){e=b.month-11;b.month=11}c=new Date(b.year,b.month,b.day,b.hour,b.minute,b.second);c.setDate(c.getDate()+d);c.setMonth(c.getMonth()+e);return a.toOADate(c)},_getTimeDefaultFormat:function(d,e){var c=this,b=d-e,a="d";if(b>2*c._tmInc.year)a="yyyy";else if(b>c._tmInc.year)a="MMM yy";else if(b>3*c._tmInc.month)a="MMM";else if(b>2*c._tmInc.week)a="MMM d";else if(b>2*c._tmInc.day)a="ddd d";else if(b>c._tmInc.day)a="ddd H:mm";else if(b>c._tmInc.hour)a="H:mm";else if(b>=1e3)a="H:mm:ss";return a},_niceTimeUnit:function(c,b){var d=this,a=c;a=d._niceTimeSpan(a,b);return a},_niceTimeSpan:function(f,e){var a=this,c=a._manualTimeInc(e),d=0,b=0;d=Math.ceil(f);if(d===0)return a._timeSpanFromTmInc(c);b=1;if(c<a._tmInc.minute){if(d<a._tmInc.minute){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.minute}if(c<a._tmInc.hour){if(d<a._tmInc.hour){b=a._getNiceInc([1,2,5,10,15,30],d,c);if(b!==0)return b}c=a._tmInc.hour}if(c<a._tmInc.day){if(d<a._tmInc.day){b=a._getNiceInc([1,3,6,12],d,c);if(b!==0)return b}c=a._tmInc.day}if(c<a._tmInc.month){if(d<a._tmInc.month){b=a._getNiceInc([1,2,7,14],d,c);if(b!==0)return b}c=a._tmInc.month}if(c<a._tmInc.year){if(d<a._tmInc.year){b=a._getNiceInc([1,2,3,4,6],d,c);if(b!==0)return b}c=a._tmInc.year}b=100*a._tmInc.year;if(d<b){b=a._getNiceInc([1,2,5,10,20,50],d,c);if(b===0)b=100*a._tmInc.year}return b},_getNiceInc:function(c,f,d){for(var b=0,a=0,e=c.length,b=0;b<e;b++){a=c[b]*d;if(f<=a)return a}return 0},_timeSpanFromTmInc:function(a){var b=1e3,d=a,c=1;if(a!==this._tmInc.maxtime)if(a>this._tmInc.tickf1)b=a;else{a+=7;while(d>0){c*=10;d--}b=c}return b},_manualTimeInc:function(a){var c=this,b=c._tmInc.second;if(!a||a.length===0)return b;if(a.indexOf("s")>=0)b=c._tmInc.second;else if(a.indexOf("m")>=0)b=c._tmInc.minute;else if(a.indexOf("h")>=0||a.indexOf("H")>=0)b=c._tmInc.hour;else if(a.indexOf("d")>=0)b=c._tmInc.day;else if(a.indexOf("M")>=0)b=c._tmInc.month;else if(a.indexOf("y")>=0)b=c._tmInc.year;return b},_tmInc:{tickf7:-7e3,tickf6:-6e3,tickf5:-5e3,tickf4:-4e3,tickf3:-3e3,tickf2:-2e3,tickf1:-1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:26784e5,year:31536e6,maxtime:2147483647},_niceTickNumber:function(a){if(parseFloat(a)===0)return a;else if(a<0)a=-a;var e=Math.log(a)/Math.log(10),d=parseInt(this._signedFloor(e),10),c=a/Math.pow(10,d),b=10;if(c<=1)b=1;else if(c<=2)b=2;else if(c<=5)b=5;return b*Math.pow(10,d)},_niceNumber:function(c,d,e){if(parseFloat(c)===0)return c;else if(c<0)c=-c;var b=c/Math.pow(10,d),a=10;if(e){if(b<1.5)a=1;else if(b<3)a=2;else if(b<7)a=5}else if(b<=1)a=1;else if(b<=2)a=2;else if(b<=5)a=5;return a*Math.pow(10,d)},_nicePrecision:function(a){if(a<=0||typeof a!=="number")return 0;var c=Math.log(a)/Math.log(10),b=parseInt(this._signedFloor(c),10),d=a/Math.pow(10,b);if(d<3)b=-b+1;return b},_precCeil:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.ceil(a);return a*b},_precFloor:function(d,c){var b=Math.pow(10,d),a=c/b;a=Math.floor(a);return a*b},_signedCeiling:function(a){return a<0?Math.floor(a):Math.ceil(a)},_signedFloor:function(a){return a<0?Math.ceil(a):Math.floor(a)},_supportStacked:function(){return false},_getDataExtreme:function(c){var b={txx:0,txn:0,tyx:0,tyn:0},a;a=this._getDataExtremes(b,c);if(a){if(a.txn>a.txx){a.txn=0;a.txx=1}return a}else{if(b.txn>b.txx){b.txn=0;b.txx=1}return b}},_getDataExtremes:function(b){var f=this,k=f.options,n=k.seriesList,p=k.stacked&&f._supportStacked(),o=k.is100Percent,d=k.axis,c=f.axisInfo,e=[],l=[],i=[],h,j={y:{}},g=d.x.valueLabels,m=c.x.annoMethod,r=c.y.annoMethod;if(!n||n.length===0)return b;f.seriesGroup&&a.each(f.seriesGroup,function(k,n){var g=[],m=parseInt(k,10);a.each(n,function(n,i){if(i.type==="pie")return true;i=a.extend(true,{display:"show"},i);var c=i.data,m=0,j=0,k=[].concat(c.xy),o=k.length,d,h;if(i.display==="exclude")return true;e=[].concat(c.x);g=[].concat(c.y);if(c.xy&&o){e=[];g=[];while(j<o){e[m]=k[j];g[m]=k[j+1];j+=2;m++;c.x=e;c.y=g}}else if(!c.x){e=[];a.each(g,function(a){e.push(a)});c.x=e}p&&n>0&&a.each(g,function(a){g[a]+=l[a]});l=g;d=f._getMinMaxValue(e);h=f._getMinMaxValue(g);if(n===0){b.txx=d.max;b.txn=d.min;b.tyx=h.max;b.tyn=h.min}else{if(b.txx<d.max)b.txx=d.max;if(b.txn>d.min)b.txn=d.min;if(b.tyx<h.max)b.tyx=h.max;if(b.tyn>h.min)b.tyn=h.min}n++});if(o){b.tyx=1;b.tyn=0}j.y[k]={tyx:b.tyx,tyn:b.tyn};j.txx=b.txx;j.txn=b.txn;b.tyx=0;b.tyn=0;if(g.length){h=a.wijchart.getFirstValidListValue(g);if(f._isDate(h))c.y[k].isTime=true;else if(typeof h==="undefined")return true;else if(typeof h!=="number"){a.each(g,function(e,c){var b=d.y.annoFormatString,a=c;if(b&&b.length>0)a=Globalize.format(a,b,f._getCulture());else a=a.toString();i.push({text:a,value:c,gridLine:false})});c.y[k].annoMethod="valueLabels";if(!d.y[m].valueLabels&&d.y[m].valueLabels.length===0)c.y[k].valueLabels=i;else c.y[k].valueLabels=d.y[m].valueLabels;d.x.max=g.length-1;d.x.min=0;d.y[m].unitMajor=1;d.x.unitMinor=.5;c.y[k].autoMax=false;c.y[k].autoMin=false;c.y[k].autoMajor=false;c.y[k].autoMinor=false}}});if(e.length){h=a.wijchart.getFirstValidListValue(e);if(m==="valueLabels"&&g&&g.length>0)c.x.valueLabels=g;if(f._isDate(h))c.x.isTime=true;else if(typeof h!=="number"){a.each(e,function(d,h){var e={},b,c;if(m==="valueLabels"&&g&&g.length&&d<g.length){b=g[d];c=typeof b;if(c==="string")b={text:b};else if(c==="number"||f._isDate(b))b={value:b}}e=a.extend({text:h,value:d,gridLine:false},b);i.push(e)});d.x.max=e.length-1;d.x.min=0;d.x.unitMajor=1;d.x.unitMinor=.5;c.x.annoMethod="valueLabels";c.x.valueLabels=i;c.x.autoMax=false;c.x.autoMin=false;c.x.autoMajor=false;c.x.autoMinor=false}}return j},_isDate:function(a){return!a?false:typeof a==="object"&&a.constructor===Date},_getMinMaxValue:function(c){var f=this,b={min:0,max:0},d=0,e;if(!c.length)return b;e=a.wijchart.getFirstValidListValue(c);if(typeof e!=="number")if(f._isDate(e)){b.min=e;b.max=e}else{b.min=0;b.max=c.length-1;return b}else{b.min=e;b.max=e}for(d=0;d<c.length;d++){if(c[d]===null||typeof c[d]==="undefined")continue;if(typeof c[d]==="number"&&isNaN(c[d]))continue;if(c[d]<b.min)b.min=c[d];else if(c[d]>b.max)b.max=c[d]}if(f._isDate(b.min)){b.min=a.toOADate(b.min);b.max=a.toOADate(b.max)}return b},_isVertical:function(a){return a==="west"||a==="east"},_calculateMajorMinor:function(f,d){var c=this,A=c.options,n=c.canvasBounds,y=f.autoMajor,z=f.autoMinor,p=d.max,q=d.min,v=d.isTime,x=d.tinc,r=d.annoFormatString,s=null,t=null,g=null,j=null,i=null,h=null,o=null,l=null,m=null,e=p-q,w=0,u=0,k=0,b=0;if(y){m=a.extend(true,{},A.textStyle,f.textStyle,f.labels.style);if(v){s=Globalize.format(a.fromOADate(p),r,c._getCulture());t=Globalize.format(a.fromOADate(q),r,c._getCulture());i=c._text(-1e3,-1e3,s).attr(m);h=c._text(-1e3,-1e3,t).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}else{o=c._nicePrecision(e);l=o+1;if(l<0||l>15)l=0;i=c._text(-1e3,-1e3,a.round(p,l)).attr(m);h=c._text(-1e3,-1e3,a.round(q,l)).attr(m);g=i.wijGetBBox();j=h.wijGetBBox();i.wijRemove();i=null;h.wijRemove();h=null}if(g.width<j.width)g.width=j.width;if(g.height<j.height)g.height=j.height;if(!c._isVertical(f.compass)){w=n.endX-n.startX-d.vOffset-d.axisTextOffset;b=w/g.width;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}else{u=n.endY-n.startY-d.vOffset-d.axisTextOffset;b=u/g.height;if(Number.POSITIVE_INFINITY===b)k=0;else k=parseInt(b,10)}b=e;if(k>0){e/=k;if(v)if(e<x)b=x;else b=c._niceTimeUnit(e,d.annoFormatString);else{d.tprec=c._nicePrecision(e);b=c._niceNumber(2*e,-o,true);if(b<e)b=c._niceNumber(e,-o+1,false);if(b<e)b=c._niceTickNumber(e)}}f.unitMajor=b}if(z&&f.unitMajor&&!isNaN(f.unitMajor))f.unitMinor=f.unitMajor/2}})})(jQuery); 
  • wangguard/trunk/js/raphael-min.js

    r554861 r642891  
    66// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ 
    77// └─────────────────────────────────────────────────────────────────────┘ \\ 
    8 (function(a){var b="0.4.0",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=[];h=a,i=0;for(var s=0,t=f.length;s<t;s++)"zIndex"in f[s]&&(o.push(f[s].zIndex),f[s].zIndex<0&&(p[f[s].zIndex]=f[s]));o.sort(g);while(o[l]<0){n=p[o[l++]],q.push(n.apply(b,e));if(i){i=d;return q}}for(s=0;s<t;s++){n=f[s];if("zIndex"in n)if(n.zIndex==o[l]){q.push(n.apply(b,e));if(i){i=d;return q}do{l++,n=p[o[l]],n&&q.push(n.apply(b,e));if(i){i=d;return q}}while(n)}else p[n.zIndex]=n;else{q.push(n.apply(b,e));if(i){i=d;return q}}}i=d;return q.length?q:null};k.listeners=function(a){var b=a.split(d),c=j,f,g,h,i,k,l,m,n,o=[c],p=[];for(i=0,k=b.length;i<k;i++){n=[];for(l=0,m=o.length;l<m;l++){c=o[l].n,g=[c[b[i]],c[e]],h=2;while(h--)f=g[h],f&&(n.push(f),p=p.concat(f.f||[]))}o=n}return p},k.on=function(a,b){var c=a.split(d),e=j;for(var g=0,h=c.length;g<h;g++)e=e.n,!e[c[g]]&&(e[c[g]]={n:{}}),e=e[c[g]];e.f=e.f||[];for(g=0,h=e.f.length;g<h;g++)if(e.f[g]==b)return f;e.f.push(b);return function(a){+a==+a&&(b.zIndex=+a)}},k.stop=function(){i=1},k.nt=function(a){if(a)return(new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)")).test(h);return h},k.unbind=function(a,b){var f=a.split(d),g,h,i,k,l,m,n,o=[j];for(k=0,l=f.length;k<l;k++)for(m=0;m<o.length;m+=i.length-2){i=[m,1],g=o[m].n;if(f[k]!=e)g[f[k]]&&i.push(g[f[k]]);else for(h in g)g[c](h)&&i.push(g[h]);o.splice.apply(o,i)}for(k=0,l=o.length;k<l;k++){g=o[k];while(g.n){if(b){if(g.f){for(m=0,n=g.f.length;m<n;m++)if(g.f[m]==b){g.f.splice(m,1);break}!g.f.length&&delete g.f}for(h in g.n)if(g.n[c](h)&&g.n[h].f){var p=g.n[h].f;for(m=0,n=p.length;m<n;m++)if(p[m]==b){p.splice(m,1);break}!p.length&&delete g.n[h].f}}else{delete g.f;for(h in g.n)g.n[c](h)&&g.n[h].f&&delete g.n[h].f}g=g.n}}},k.once=function(a,b){var c=function(){b.apply(this,arguments),k.unbind(a,c)};return k.on(a,c)},k.version=b,k.toString=function(){return"You are running Eve "+b},typeof module!="undefined"&&module.exports?module.exports=k:a.eve=k})(this),function(){function cr(b,d,e,f,h,i){e=Q(e);var j,k,l,m=[],o,p,q,t=b.ms,u={},v={},w={};if(f)for(y=0,z=cl.length;y<z;y++){var x=cl[y];if(x.el.id==d.id&&x.anim==b){x.percent!=e?(cl.splice(y,1),l=1):k=x,d.attr(x.totalOrigin);break}}else f=+v;for(var y=0,z=b.percents.length;y<z;y++){if(b.percents[y]==e||b.percents[y]>f*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bG(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;y<z;y++){w[A][y]=[0];for(var F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(E[y][F]-u[A][y][F])/t}break;case"transform":var H=d._,I=bP(H[A],v[A]);if(I){u[A]=I.from,v[A]=I.to,w[A]=[],w[A].real=!0;for(y=0,z=u[A].length;y<z;y++){w[A][y]=[u[A][y][0]];for(F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(v[A][y][F]-u[A][y][F])/t}}else{var J=d.matrix||new bQ,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};u[A]=[J.a,J.b,J.c,J.d,J.e,J.f],bN(K,v[A]),v[A]=K._.transform,w[A]=[(K.matrix.a-J.a)/t,(K.matrix.b-J.b)/t,(K.matrix.c-J.c)/t,(K.matrix.d-J.d)/t,(K.matrix.e-J.e)/t,(K.matrix.e-J.f)/t]}break;case"csv":var L=r(j[A])[s](c),M=r(u[A])[s](c);if(A=="clip-rect"){u[A]=M,w[A]=[],y=M.length;while(y--)w[A][y]=(L[y]-u[A][y])/t}v[A]=L;break;default:L=[][n](j[A]),M=[][n](u[A]),w[A]=[],y=d.paper.customAttributes[A].length;while(y--)w[A][y]=((L[y]||0)-(M[y]||0))/t}}var O=j.easing,P=a.easing_formulas[O];if(!P){P=r(O).match(N);if(P&&P.length==5){var R=P;P=function(a){return cp(a,+R[1],+R[2],+R[3],+R[4],t)}}else P=be}q=j.start||b.start||+(new Date),x={anim:b,percent:e,timestamp:q,start:q+(b.del||0),status:0,initstatus:f||0,stop:!1,ms:t,easing:P,from:u,diff:w,to:v,el:d,callback:j.callback,prev:p,next:o,repeat:i||b.times,origin:d.attr(),totalOrigin:h},cl.push(x);if(f&&!k&&!l){x.stop=!0,x.start=new Date-t*f;if(cl.length==1)return cn()}l&&(x.start=new Date-x.ms*f),cl.length==1&&cm(cn)}else k.initstatus=f,k.start=new Date-k.ms*f;eve("anim.start."+d.id,d,b)}}function cq(a,b){var c=[],d={};this.ms=b,this.times=1;if(a){for(var e in a)a[g](e)&&(d[Q(e)]=a[e],c.push(Q(e)));c.sort(bc)}this.anim=d,this.top=c[c.length-1],this.percents=c}function cp(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(z(f)<b)return e;j=(3*i*e+2*h)*e+g;if(z(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(z(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cd(){return this.x+q+this.y+q+this.width+" × "+this.height}function cc(){return this.x+q+this.y}function bQ(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bw(a){var b=[];for(var c=0,d=a.length;d-2>c;c+=2){var e=[{x:+a[c],y:+a[c+1]},{x:+a[c],y:+a[c+1]},{x:+a[c+2],y:+a[c+3]},{x:+a[c+4],y:+a[c+5]}];d-4==c?(e[0]={x:+a[c-2],y:+a[c-1]},e[3]=e[2]):c&&(e[0]={x:+a[c-2],y:+a[c-1]}),b.push(["C",(-e[0].x+6*e[1].x+e[2].x)/6,(-e[0].y+6*e[1].y+e[2].y)/6,(e[1].x+6*e[2].x-e[3].x)/6,(e[1].y+6*e[2].y-e[3].y)/6,e[2].x,e[2].y])}return b}function bv(){return this.hex}function bt(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bs(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bs(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function a(c){if(a.is(c,"function"))return b?c():eve.on("DOMload",c);if(a.is(c,E))return a._engine.create[m](a,c.splice(0,3+a.is(c[0],C))).add(c);var d=Array.prototype.slice.call(arguments,0);if(a.is(d[d.length-1],"function")){var e=d.pop();return b?e.call(a._engine.create[m](a,d)):eve.on("DOMload",function(){e.call(a._engine.create[m](a,d))})}return a._engine.create[m](a,arguments)}a.version="2.0.1",a.eve=eve;var b,c=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},e=/\{(\d+)\}/g,f="prototype",g="hasOwnProperty",h={doc:document,win:window},i={was:Object.prototype[g].call(h.win,"Raphael"),is:h.win.Raphael},j=function(){this.ca=this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in h.doc,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v=r.prototype.toLowerCase,w=Math,x=w.max,y=w.min,z=w.abs,A=w.pow,B=w.PI,C="number",D="string",E="array",F="toString",G="fill",H=Object.prototype.toString,I={},J="push",K=a._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,L=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,M={NaN:1,Infinity:1,"-Infinity":1},N=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,O=w.round,P="setAttribute",Q=parseFloat,R=parseInt,S=r.prototype.toUpperCase,T=a._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},U=a._availableAnimAttrs={blur:C,"clip-rect":"csv",cx:C,cy:C,fill:"colour","fill-opacity":C,"font-size":C,height:C,opacity:C,path:"path",r:C,rx:C,ry:C,stroke:"colour","stroke-opacity":C,"stroke-width":C,transform:"transform",width:C,x:C,y:C},V=/\s*,\s*/,W={hs:1,rg:1},X=/,?([achlmqrstvxz]),?/gi,Y=/([achlmrqstvz])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig,Z=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig,$=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)\s*,?\s*/ig,_=a._radial_gradient=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,ba={},bb=function(a,b){return a.key-b.key},bc=function(a,b){return Q(a)-Q(b)},bd=function(){},be=function(a){return a},bf=a._rectPath=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bg=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bh=a._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bg(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bg(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return bf(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return bf(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return bf(b.x,b.y,b.width,b.height)}},bi=a.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;a=bG(a);for(e=0,g=a.length;e<g;e++){i=a[e];for(f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d}return a};a._g=h,a.type=h.win.SVGAngle||h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bj=h.doc.createElement("div"),bk;bj.innerHTML='<v:shape adj="1"/>',bk=bj.firstChild,bk.style.behavior="url(#default#VML)";if(!bk||typeof bk.adj!="object")return a.type=p;bj=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bl=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bm=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bm=bt(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bm=bt(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bm(b)},bn=function(){return"hsb("+[this.h,this.s,this.b]+")"},bo=function(){return"hsl("+[this.h,this.s,this.l]+")"},bp=function(){return this.hex},bq=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},br=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:bp};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=bp;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return br(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return br(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bq(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bn}},a.rgb2hsl=function(a,b,c){c=bq(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bo}},a._path2string=function(){return this.join(",").replace(X,"$1")};var bu=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bt(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bv};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bv};!W[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bm(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bv},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bv}},a),a.hsb=bt(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bt(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bt(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=bt(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=by(b)),d.length||r(b).replace(Y,function(a,b,e){var f=[],g=b.toLowerCase();e.replace($,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(d.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")d.push([b][n](f));else while(f.length>=c[g]){d.push([b][n](f.splice(0,c[g])));if(!c[g])break}}),d.toString=a._path2string;return d}),a.parseTransformString=bt(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=by(b)),d.length||r(b).replace(Z,function(a,b,c){var e=[],f=v.call(b);c.replace($,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d}),a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r<t)&&(z+=180);return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:x,y:y},alpha:z}},a._removedFactory=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}};var bx=bt(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bG(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a.length;g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d.push(b),e.push(c);else{var i=bF(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[n](i.min.x,i.max.x),e=e[n](i.min.y,i.max.y),b=f[5],c=f[6]}}var j=y[m](0,d),k=y[m](0,e);return{x:j,y:k,width:x[m](0,d)-j,height:x[m](0,e)-k}},null,function(a){return{x:a.x,y:a.y,width:a.width,height:a.height}}),by=function(b){var c=[];if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);for(var d=0,e=b.length;d<e;d++){c[d]=[];for(var f=0,g=b[d].length;f<g;f++)c[d][f]=b[d][f]}c.toString=a._path2string;return c},bz=a._pathToRelative=bt(function(b){if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=b[0][1],e=b[0][2],f=d,g=e,h++,c.push(["M",d,e]));for(var i=h,j=b.length;i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=v.call(l[0])){k[0]=v.call(l[0]);switch(k[0]){case"a":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]-d).toFixed(3),k[7]=+(l[7]-e).toFixed(3);break;case"v":k[1]=+(l[1]-e).toFixed(3);break;case"m":f=l[1],g=l[2];default:for(var m=1,n=l.length;m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[],l[0]=="m"&&(f=l[1]+d,g=l[2]+e);for(var o=0,p=l.length;o<p;o++)c[i][o]=l[o]}var q=c[i].length;switch(c[i][0]){case"z":d=f,e=g;break;case"h":d+=+c[i][q-1];break;case"v":e+=+c[i][q-1];break;default:d+=+c[i][q-2],e+=+c[i][q-1]}}c.toString=a._path2string;return c},0,by),bA=a._pathToAbsolute=bt(function(b){if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);if(!b||!b.length)return[["M",0,0]];var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=+b[0][1],e=+b[0][2],f=d,g=e,h++,c[0]=["M",d,e]);for(var i,j,k=h,l=b.length;k<l;k++){c.push(i=[]),j=b[k];if(j[0]!=S.call(j[0])){i[0]=S.call(j[0]);switch(i[0]){case"A":i[1]=j[1],i[2]=j[2],i[3]=j[3],i[4]=j[4],i[5]=j[5],i[6]=+(j[6]+d),i[7]=+(j[7]+e);break;case"V":i[1]=+j[1]+e;break;case"H":i[1]=+j[1]+d;break;case"R":var m=[d,e][n](j.slice(1));for(var o=2,p=m.length;o<p;o++)m[o]=+m[o]+d,m[++o]=+m[o]+e;c.pop(),c=c[n](bw(m));break;case"M":f=+j[1]+d,g=+j[2]+e;default:for(o=1,p=j.length;o<p;o++)i[o]=+j[o]+(o%2?d:e)}}else if(j[0]=="R")m=[d,e][n](j.slice(1)),c.pop(),c=c[n](bw(m)),i=["R"][n](j.slice(-2));else for(var q=0,r=j.length;q<r;q++)i[q]=j[q];switch(i[0]){case"Z":d=f,e=g;break;case"H":d=i[1];break;case"V":e=i[1];break;case"M":f=i[i.length-2],g=i[i.length-1];default:d=i[i.length-2],e=i[i.length-1]}}c.toString=a._path2string;return c},null,by),bB=function(a,b,c,d){return[a,b,c,d,c,d]},bC=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bD=function(a,b,c,d,e,f,g,h,i,j){var k=B*120/180,l=B/180*(+e||0),m=[],o,p=bt(function(a,b,c){var d=a*w.cos(c)-b*w.sin(c),e=a*w.sin(c)+b*w.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=w.cos(B/180*e),r=w.sin(B/180*e),t=(a-h)/2,u=(b-i)/2,v=t*t/(c*c)+u*u/(d*d);v>1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=a<C?B-E:E,F=h<C?B-F:F,E<0&&(E=B*2+E),F<0&&(F=B*2+F),g&&E>F&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bD(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W<X;W++)V[W]=W%2?p(m[W-1],m[W],l).y:p(m[W],m[W+1],l).x;return V},bE=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},bF=bt(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bE(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bE(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bE(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bE(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bG=a._path2curve=bt(function(a,b){var c=bA(a),d=b&&bA(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bD[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bC(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bC(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bB(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bB(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bB(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bB(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b].length>7){a[b].shift();var e=a[b];while(e.length)a.splice(b++,0,["C"][n](e.splice(0,6)));a.splice(b,1),k=x(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],k=x(c.length,d&&d.length||0))};for(var j=0,k=x(c.length,d&&d.length||0);j<k;j++){c[j]=g(c[j],e),h(c,j),d&&(d[j]=g(d[j],f)),d&&h(d,j),i(c,d,e,f,j),i(d,c,f,e,j);var l=c[j],o=d&&d[j],p=l.length,q=d&&o.length;e.x=l[p-2],e.y=l[p-1],e.bx=Q(l[p-4])||e.x,e.by=Q(l[p-3])||e.y,f.bx=d&&(Q(o[q-4])||f.x),f.by=d&&(Q(o[q-3])||f.y),f.x=d&&o[q-2],f.y=d&&o[q-1]}return d?[c,d]:c},null,by),bH=a._parseDots=bt(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=Q(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=Q(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bI=a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bJ=a._tofront=function(a,b){b.top!==a&&(bI(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bK=a._toback=function(a,b){b.bottom!==a&&(bI(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bL=a._insertafter=function(a,b,c){bI(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bM=a._insertbefore=function(a,b,c){bI(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bN=a._extractTransform=function(b,c){if(c==null)return b._.transform;c=r(c).replace(/\.{3}|\u2026/g,b._.transform||p);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new bQ;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],o=n.length,q=r(n[0]).toLowerCase(),s=n[0]!=q,t=s?k.invert():0,u,v,w,x,y;q=="t"&&o==3?s?(u=t.x(0,0),v=t.y(0,0),w=t.x(n[1],n[2]),x=t.y(n[1],n[2]),k.translate(w-u,x-v)):k.translate(n[1],n[2]):q=="r"?o==2?(y=y||b.getBBox(1),k.rotate(n[1],y.x+y.width/2,y.y+y.height/2),e+=n[1]):o==4&&(s?(w=t.x(n[2],n[3]),x=t.y(n[2],n[3]),k.rotate(n[1],w,x)):k.rotate(n[1],n[2],n[3]),e+=n[1]):q=="s"?o==2||o==3?(y=y||b.getBBox(1),k.scale(n[1],n[o-1],y.x+y.width/2,y.y+y.height/2),h*=n[1],i*=n[o-1]):o==5&&(s?(w=t.x(n[3],n[4]),x=t.y(n[3],n[4]),k.scale(n[1],n[2],w,x)):k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):q=="m"&&o==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},bO=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return a.length==4?[b,0,a[2],a[3]]:[b,0];case"s":return a.length==5?[b,1,1,a[3],a[4]]:a.length==3?[b,1,1]:[b,1]}},bP=a._equaliseTransform=function(b,c){c=r(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=x(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||bO(c[g]),k=c[g]||bO(j);if(j[0]!=k[0]||j[0].toLowerCase()=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0].toLowerCase()=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=x(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a._getContainer=function(b,c,d,e){var f;f=e==null&&!a.is(b,"object")?h.doc.getElementById(b):b;if(f!=null){if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d};return{container:1,x:b,y:c,width:d,height:e}}},a.pathToRelative=bz,a._engine={},a.path2curve=bG,a.matrix=function(a,b,c,d,e,f){return new bQ(a,b,c,d,e,f)},function(b){function d(a){var b=w.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}function c(a){return a[0]*a[0]+a[1]*a[1]}b.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],i=[[a,c,e],[b,d,f],[0,0,1]],j,k,l,m;a&&a instanceof bQ&&(i=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]);for(j=0;j<3;j++)for(k=0;k<3;k++){m=0;for(l=0;l<3;l++)m+=h[j][l]*i[l][k];g[j][k]=m}this.a=g[0][0],this.b=g[1][0],this.c=g[0][1],this.d=g[1][1],this.e=g[0][2],this.f=g[1][2]},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new bQ(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new bQ(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){this.add(1,0,0,1,a,b)},b.scale=function(a,b,c,d){b==null&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+w.cos(b).toFixed(9),f=+w.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[r.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];b.scalex=w.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=w.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley;var f=-e[0][1],g=e[1][1];g<0?(b.rotate=a.deg(w.acos(g)),f<0&&(b.rotate=360-b.rotate)):b.rotate=a.deg(w.asin(f)),b.isSimple=!+b.shear.toFixed(9)&&(b.scalex.toFixed(9)==b.scaley.toFixed(9)||!b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate;return b},b.toTransformString=function(a){var b=a||this[s]();if(b.isSimple){b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4);return(b.dx&&b.dy?"t"+[b.dx,b.dy]:p)+(b.scalex!=1||b.scaley!=1?"s"+[b.scalex,b.scaley,0,0]:p)+(b.rotate?"r"+[b.rotate,0,0]:p)}return"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(bQ.prototype);var bR=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(bR&&bR[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&bR&&bR[1]<8?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:k.safari=bd;var bS=function(){this.returnValue=!1},bT=function(){return this.originalEvent.preventDefault()},bU=function(){this.cancelBubble=!0},bV=function(){return this.originalEvent.stopPropagation()},bW=function(){if(h.doc.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,f=function(e){var f=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,i=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,j=e.clientX+i,k=e.clientY+f;if(o&&u[g](b))for(var l=0,m=e.targetTouches&&e.targetTouches.length;l<m;l++)if(e.targetTouches[l].target==a){var n=e;e=e.targetTouches[l],e.originalEvent=n,e.preventDefault=bT,e.stopPropagation=bV;break}return c.call(d,e,j,k)};a.addEventListener(e,f,!1);return function(){a.removeEventListener(e,f,!1);return!0}};if(h.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.win.event;var b=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;a.preventDefault=a.preventDefault||bS,a.stopPropagation=a.stopPropagation||bU;return c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),bX=[],bY=function(a){var b=a.clientX,c=a.clientY,d=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f,g=bX.length;while(g--){f=bX[g];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,n=k.parentNode,p=k.style.display;h.win.opera&&n.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,h.win.opera&&(m?n.insertBefore(k,m):n.appendChild(k)),l&&eve("drag.over."+f.el.id,f.el,l),b+=e,c+=d,eve("drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},bZ=function(b){a.unmousemove(bY).unmouseup(bZ);var c=bX.length,d;while(c--)d=bX[c],d.el._drag={},eve("drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);bX=[]},b$=a.el={};for(var b_=t.length;b_--;)(function(b){a[b]=b$[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:bW(this.shape||this.node||h.doc,b,c,d||this)}));return this},a["un"+b]=b$["un"+b]=function(a){var c=this.events,d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(t[b_]);b$.data=function(b,c){var d=ba[this.id]=ba[this.id]||{};if(arguments.length==1){if(a.is(b,"object")){for(var e in b)b[g](e)&&this.data(e,b[e]);return this}eve("data.get."+this.id,this,d[b],b);return d[b]}d[b]=c,eve("data.set."+this.id,this,c,b);return this},b$.removeData=function(a){a==null?ba[this.id]={}:ba[this.id]&&delete ba[this.id][a];return this},b$.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},b$.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var ca=[];b$.drag=function(b,c,d,e,f,g){function i(i){(i.originalEvent||i).preventDefault();var j=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,k=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!bX.length&&a.mousemove(bY).mouseup(bZ),bX.push({el:this,move_scope:e,start_scope:f,end_scope:g}),c&&eve.on("drag.start."+this.id,c),b&&eve.on("drag.move."+this.id,b),d&&eve.on("drag.end."+this.id,d),eve("drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},ca.push({el:this,start:i}),this.mousedown(i);return this},b$.onDragOver=function(a){a?eve.on("drag.over."+this.id,a):eve.unbind("drag.over."+this.id)},b$.undrag=function(){var b=ca.length;while(b--)ca[b].el==this&&(this.unmousedown(ca[b].start),ca.splice(b,1),eve.unbind("drag.*."+this.id));!ca.length&&a.unmousemove(bY).unmouseup(bZ)},k.circle=function(b,c,d){var e=a._engine.circle(this,b||0,c||0,d||0);this.__set__&&this.__set__.push(e);return e},k.rect=function(b,c,d,e,f){var g=a._engine.rect(this,b||0,c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.ellipse=function(b,c,d,e){var f=a._engine.ellipse(this,b||0,c||0,d||0,e||0);this.__set__&&this.__set__.push(f);return f},k.path=function(b){b&&!a.is(b,D)&&!a.is(b[0],E)&&(b+=p);var c=a._engine.path(a.format[m](a,arguments),this);this.__set__&&this.__set__.push(c);return c},k.image=function(b,c,d,e,f){var g=a._engine.image(this,b||"about:blank",c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.text=function(b,c,d){var e=a._engine.text(this,b||0,c||0,r(d));this.__set__&&this.__set__.push(e);return e},k.set=function(b){!a.is(b,"array")&&(b=Array.prototype.splice.call(arguments,0,arguments.length));var c=new cs(b);this.__set__&&this.__set__.push(c);return c},k.setStart=function(a){this.__set__=a||this.set()},k.setFinish=function(a){var b=this.__set__;delete this.__set__;return b},k.setSize=function(b,c){return a._engine.setSize.call(this,b,c)},k.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f)},k.top=k.bottom=null,k.raphael=a;var cb=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,i=b.top+(h.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(h.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:i,x:j}};k.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=h.doc.elementFromPoint(a,b);if(h.win.opera&&e.tagName=="svg"){var f=cb(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var i=d.getIntersectionList(g,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},k.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},k.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},b$.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bh[this.type](this),b.bboxwt=bx(this.realPath),b.bboxwt.toString=cd,b.dirty=0;return b.bboxwt}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bh[this.type](this);b.bbox=bx(bi(this.realPath,this.matrix)),b.bbox.toString=cd,b.dirty=b.dirtyT=0}return b.bbox},b$.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());this.__set__&&this.__set__.push(a);return a},b$.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bh[this.type](this);f=this.matrix?bi(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var ce={},cf=function(b,c,d,e,f,g,h,i,j){var k=0,l=100,m=[b,c,d,e,f,g,h,i].join(),n=ce[m],o,p;!n&&(ce[m]=n={data:[]}),n.timer&&clearTimeout(n.timer),n.timer=setTimeout(function(){delete ce[m]},2e3);if(j!=null&&!n.precision){var q=cf(b,c,d,e,f,g,h,i);n.precision=~~q*10,n.data=[]}l=n.precision||l;for(var r=0;r<l+1;r++){n.data[r*l]?p=n.data[r*l]:(p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l),n.data[r*l]=p),r&&(k+=A(A(o.x-p.x,2)+A(o.y-p.y,2),.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cg=function(b,c){return function(d,e,f){d=bG(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cf(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cf(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cf(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},ch=cg(1),ci=cg(),cj=cg(0,1);a.getTotalLength=ch,a.getPointAtLength=ci,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cj(a,b).end;var d=cj(a,c,1);return b?cj(d,b).end:d},b$.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return ch(this.attrs.path)}},b$.getPointAtLength=function(a){if(this.type=="path")return ci(this.attrs.path,a)},b$.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var ck=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};ck.easeIn=ck["ease-in"]=ck["<"],ck.easeOut=ck["ease-out"]=ck[">"],ck.easeInOut=ck["ease-in-out"]=ck["<>"],ck["back-in"]=ck.backIn,ck["back-out"]=ck.backOut;var cl=[],cm=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cn=function(){var b=+(new Date),c=0;for(;c<cl.length;c++){var d=cl[c];if(d.el.removed||d.paused)continue;var e=b-d.start,f=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,o={},p,r={},s;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*f,d.status=d.initstatus,delete d.initstatus,d.stop&&cl.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/f))/d.anim.top;if(e<0)continue;if(e<f){var t=h(e/f);for(var u in i)if(i[g](u)){switch(U[u]){case C:p=+i[u]+t*f*j[u];break;case"colour":p="rgb("+[co(O(i[u].r+t*f*j[u].r)),co(O(i[u].g+t*f*j[u].g)),co(O(i[u].b+t*f*j[u].b))].join(",")+")";break;case"path":p=[];for(var v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(var x=1,y=i[u][v].length;x<y;x++)p[v][x]=+i[u][v][x]+t*f*j[u][v][x];p[v]=p[v].join(q)}p=p.join(q);break;case"transform":if(j[u].real){p=[];for(v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(x=1,y=i[u][v].length;x<y;x++)p[v][x]=i[u][v][x]+t*f*j[u][v][x]}}else{var z=function(a){return+i[u][a]+t*f*j[u][a]};p=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if(u=="clip-rect"){p=[],v=4;while(v--)p[v]=+i[u][v]+t*f*j[u][v]}break;default:var A=[][n](i[u]);p=[],v=m.paper.customAttributes[u].length;while(v--)p[v]=+A[v]+t*f*j[u][v]}o[u]=p}m.attr(o),function(a,b,c){setTimeout(function(){eve("anim.frame."+a,b,c)})}(m.id,m,d.anim)}else{(function(b,c,d){setTimeout(function(){eve("anim.frame."+c.id,c,d),eve("anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),m.attr(k),cl.splice(c--,1);if(d.repeat>1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cr(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cr(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cl.length&&cm(cn)},co=function(a){return a>255?255:a<0?0:a};b$.animateWith=function(b,c,d,e,f,g){var h=d?a.animation(d,e,f,g):c,i=b.status(c);return this.animate(h).status(h,i*c.ms/h.ms)},b$.onAnimation=function(a){a?eve.on("anim.frame."+this.id,a):eve.unbind("anim.frame."+this.id);return this},cq.prototype.delay=function(a){var b=new cq(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cq.prototype.repeat=function(a){var b=new cq(this.anim,this.ms);b.del=this.del,b.times=w.floor(x(a,0))||1;return b},a.animation=function(b,c,d,e){if(b instanceof cq)return b;if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var f={},h,i;for(i in b)b[g](i)&&Q(i)!=i&&Q(i)+"%"!=i&&(h=!0,f[i]=b[i]);if(!h)return new cq(b,c);d&&(f.easing=d),e&&(f.callback=e);return new cq({100:f},c)},b$.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cq?b:a.animation(b,c,d,e);cr(g,f,g.percents[0],null,f.attr());return f},b$.setTime=function(a,b){a&&b!=null&&this.status(a,y(b,a.ms)/a.ms);return this},b$.status=function(a,b){var c=[],d=0,e,f;if(b!=null){cr(a,this,-1,y(b,1));return this}e=cl.length;for(;d<e;d++){f=cl[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},b$.pause=function(a){for(var b=0;b<cl.length;b++)cl[b].el.id==this.id&&(!a||cl[b].anim==a)&&eve("anim.pause."+this.id,this,cl[b].anim)!==!1&&(cl[b].paused=!0);return this},b$.resume=function(a){for(var b=0;b<cl.length;b++)if(cl[b].el.id==this.id&&(!a||cl[b].anim==a)){var c=cl[b];eve("anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},b$.stop=function(a){for(var b=0;b<cl.length;b++)cl[b].el.id==this.id&&(!a||cl[b].anim==a)&&eve("anim.stop."+this.id,this,cl[b].anim)!==!1&&cl.splice(b--,1);return this},b$.toString=function(){return"Raphaël’s object"};var cs=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==b$.constructor||a[b].constructor==cs)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},ct=cs.prototype;ct.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==b$.constructor||a.constructor==cs)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},ct.pop=function(){this.length&&delete this[this.length--];return this.items.pop()},ct.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var cu in b$)b$[g](cu)&&(ct[cu]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][m](c,b)})}}(cu));ct.attr=function(b,c){if(b&&a.is(b,E)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},ct.clear=function(){while(this.length)this.pop()},ct.splice=function(a,b,c){a=a<0?x(this.length+a,0):a,b=x(0,y(this.length-a,b));var d=[],e=[],f=[],g;for(g=2;g<arguments.length;g++)f.push(arguments[g]);for(g=0;g<b;g++)e.push(this[a+g]);for(;g<this.length-a;g++)d.push(this[a+g]);var h=f.length;for(g=0;g<h+d.length;g++)this.items[a+g]=this[a+g]=g<h?f[g]:d[g-h];g=this.items.length=this.length-=b-h;while(this[g])delete this[g++];return new cs(e)},ct.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a){this.splice(b,1);return!0}},ct.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;if(!f)return this;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,D)?d:j;var k=a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k);return this},ct.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},ct.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=y[m](0,a),b=y[m](0,b);return{x:a,y:b,width:x[m](0,c)-a,height:x[m](0,d)-b}},ct.clone=function(a){a=new cs;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},ct.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[g](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=R(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[g](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var h in f.k)f[g](h)&&(b.glyphs[e].k[h]=f.k[h])}}return a},k.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400;if(!!a.fonts){var f=a.fonts[b];if(!f){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[g](i)&&h.test(i)){f=a.fonts[i];break}}var j;if(f)for(var k=0,l=f.length;k<l;k++){j=f[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},k.print=function(b,d,e,f,g,h,i){h=h||"middle",i=x(y(i||0,1),-1);var j=this.set(),k=r(e)[s](p),l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox[s](c),q=+o[0],t=+o[1]+(h=="baseline"?o[3]-o[1]+ +f.face.descent:(o[3]-o[1])/2);for(var u=0,v=k.length;u<v;u++){var w=u&&f.glyphs[k[u-1]]||{},z=f.glyphs[k[u]];l+=u?(w.w||f.w)+(w.k&&w.k[k[u]]||0)+f.w*i:0,z&&z.d&&j.push(this.path(z.d).attr({fill:"#000",stroke:"none",transform:[["t",l*n,0]]}))}j.transform(["...s",n,n,q,t,"t",(b-q)/n,(d-t)/n])}return j},k.add=function(b){if(a.is(b,"array")){var c=this.set(),e=0,f=b.length,h;for(;e<f;e++)h=b[e]||{},d[g](h.type)&&c.push(this[h.type]().attr(h))}return c},a.format=function(b,c){var d=a.is(c,E)?[0][n](c):arguments;b&&a.is(b,D)&&d.length-1&&(b=b.replace(e,function(a,b){return d[++b]==null?p:d[b]}));return b||p},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),typeof e=="function"&&f&&(e=e()))}),e=(e==null||e==d?a:e)+"";return e};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),a.ninja=function(){i.was?h.win.Raphael=i.is:delete Raphael;return a},a.st=ct,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("DOMload")}b.readyState==null&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete"},!1),b.readyState="loading"),e()}(document,"DOMContentLoaded"),i.was?h.win.Raphael=a:Raphael=a,eve.on("DOMload",function(){b=!0})}(),window.Raphael.svg&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){typeof d=="string"&&(d=q(d));for(var f in e)e[b](f)&&(f.substring(0,6)=="xlink:"?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){e=c(e).replace(a._radial_gradient,function(a,b,c){j="radial";if(b&&c){m=d(b),n=d(c);var e=(n>.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}q(o,{fill:"url(#"+k+")",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1;return 1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if(d.type=="path"){var g=c(e).toLowerCase().split("-"),h=d.paper,i=f?"end":"start",j=d.node,k=d.attrs,l=k["stroke-width"],n=g.length,r="classic",s,t,u,v,w,x=3,y=3,z=5;while(n--)switch(g[n]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":r=g[n];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}r=="open"?(x+=2,y+=2,z+=2,u=1,v=f?4:1,w={fill:"none",stroke:k.stroke}):(v=u=x/2,w={fill:k.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={};if(r!="none"){var A="raphael-marker-"+r,B="raphael-marker-"+i+r+x+y;a._g.doc.getElementById(A)?p[A]++:(h.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[r],id:A})),p[A]=1);var C=a._g.doc.getElementById(B),D;C?(p[B]++,D=C.getElementsByTagName("use")[0]):(C=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:v,refY:y/2}),D=q(q("use"),{"xlink:href":"#"+A,transform:(f?" rotate(180 "+x/2+" "+y/2+") ":m)+"scale("+x/z+","+y/z+")","stroke-width":1/((x/z+y/z)/2)}),C.appendChild(D),h.defs.appendChild(C),p[B]=1),q(D,w);var E=u*(r!="diamond"&&r!="oval");f?(s=d._.arrows.startdx*l||0,t=a.getTotalLength(k.path)-E*l):(s=E*l,t=a.getTotalLength(k.path)-(d._.arrows.enddx*l||0)),w={},w["marker-"+i]="url(#"+B+")";if(t||s)w.d=Raphael.getSubpath(k.path,s,t);q(j,w),d._.arrows[i+"Path"]=A,d._.arrows[i+"Marker"]=B,d._.arrows[i+"dx"]=E,d._.arrows[i+"Type"]=r,d._.arrows[i+"String"]=e}else f?(s=d._.arrows.startdx*l||0,t=a.getTotalLength(k.path)-s):(s=0,t=a.getTotalLength(k.path)-(d._.arrows.enddx*l||0)),d._.arrows[i+"Path"]&&q(j,{d:Raphael.getSubpath(k.path,s,t)}),delete d._.arrows[i+"Path"],delete d._.arrows[i+"Marker"],delete d._.arrows[i+"dx"],delete d._.arrows[i+"Type"],delete d._.arrows[i+"String"];for(w in p)if(p[b](w)&&!p[w]){var F=a._g.doc.getElementById(w);F&&F.parentNode.removeChild(F)}}},u={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){b=u[c(b).toLowerCase()];if(b){var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;while(h--)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];k[o]=p;switch(o){case"blur":d.blur(p);break;case"href":case"title":case"target":var u=i.parentNode;if(u.tagName.toLowerCase()!="a"){var w=q("a");u.insertBefore(w,i),w.appendChild(i),u=w}o=="target"&&p=="blank"?u.setAttributeNS(n,"show","new"):u.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var x=c(p).split(j);if(x.length==4){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var z=q("clipPath"),A=q("rect");z.id=a.createUUID(),q(A,{x:x[0],y:x[1],width:x[2],height:x[3]}),z.appendChild(A),d.paper.defs.appendChild(z),q(i,{"clip-path":"url(#"+z.id+")"}),d.clip=A}if(!p){var B=i.getAttribute("clip-path");if(B){var C=a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g,l));C&&C.parentNode.removeChild(C),q(i,{"clip-path":l}),delete d.clip}}break;case"path":d.type=="path"&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":i.setAttribute(o,p),d._.dirty=1;if(k.fx)o="x",p=k.x;else break;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if(o=="rx"&&d.type=="rect")break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":i.setAttribute(o,p),d._.dirty=1;if(k.fy)o="y",p=k.y;else break;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if(o=="ry"&&d.type=="rect")break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":d.type=="rect"?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":d.type=="image"&&i.setAttributeNS(n,"href",p);break;case"stroke-width":if(d._.sx!=1||d._.sy!=1)p/=g(h(d._.sx),h(d._.sy))||1;d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var D=c(p).match(a._ISURL);if(D){z=q("pattern");var F=q("image");z.id=a.createUUID(),q(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(F,{x:0,y:0,"xlink:href":D[1]}),z.appendChild(F),function(b){a._preload(D[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(F,{width:a,height:c}),d.paper.safari()})}(z),d.paper.defs.appendChild(z),i.style.fill="url(#"+z.id+")",q(i,{fill:"url(#"+z.id+")"}),d.pattern=z,d.pattern&&s(d);break}var G=a.getRGB(p);if(!G.error)delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});else if((d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(H){var I=H.getElementsByTagName("stop");q(I[I.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}G[b]("opacity")&&q(i,{"fill-opacity":G.opacity>1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(p),i.setAttribute(o,G.hex),o=="stroke"&&G[b]("opacity")&&q(i,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity}),o=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),H&&(I=H.getElementsByTagName("stop"),q(I[I.length-1],{"stop-opacity":p}));break};default:o=="font-size"&&(p=e(p,10)+"px");var J=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[J]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n<o;n++)m=q("tspan"),n&&q(m,{dy:i*x,x:g.x}),m.appendChild(a._g.doc.createTextNode(j[n])),h.appendChild(m),k[n]=m}else{k=h.getElementsByTagName("tspan");for(n=0,o=k.length;n<o;n++)n?q(k[n],{dy:i*x,x:g.x}):q(k[0],{dy:0})}q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(k[0],{dy:r})}},z=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},A=a.el;z.prototype=A,A.constructor=z,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);d.type="path",w(d,{fill:"none",stroke:"#000",path:a});return d},A.rotate=function(a,b,e){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this.transform(this._.transform.concat([["r",a,b,e]]));return this},A.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]]));return this},A.translate=function(a,b){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]]));return this},A.transform=function(c){var d=this._;if(c==null)return d.transform;a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix});if(d.sx!=1||d.sy!=1){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this},A.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this},A.remove=function(){if(!this.removed){var b=this.paper;b.__set__&&b.__set__.exclude(this),k.unbind("*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),this.node.parentNode.removeChild(this.node);for(var c in this)this[c]=typeof this[c]=="function"?a._removedFactory(c):null;this.removed=!0}},A._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},A.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(c=="transform")return this._.transform;var g=c.split(j),h={};for(var i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(d==null&&a.is(c,"array")){h={};for(i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(d!=null){var m={};m[c]=d}else c!=null&&a.is(c,"object")&&(m=c);for(var n in m)k("attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}w(this,m);return this},A.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;b.top!=this&&a._tofront(this,b);return this},A.toBack=function(){if(this.removed)return this;var b=this.node.parentNode;b.tagName.toLowerCase()=="a"?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);var c=this.paper;return this},A.insertAfter=function(b){if(this.removed)return this;var c=b.node||b[b.length-1].node;c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},A.insertBefore=function(b){if(this.removed)return this;var c=b.node||b[0].node;c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper);return this},A.blur=function(b){var c=this;if(+b!==0){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter")},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs);return f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs);return h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs);return g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new z(f,b);g.attrs={x:c,y:d,"text-anchor":"middle",text:e,font:a._availableAttrs.font,stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs);return g},a._engine.setSize=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h=q("svg"),i="overflow:hidden;",j;d=d||0,e=e||0,f=f||512,g=g||342,q(h,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(h.style.cssText=i+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(h),j=1):(h.style.cssText=i+"position:relative",c.firstChild?c.insertBefore(h,c.firstChild):c.appendChild(h)),c=new a._Paper,c.width=f,c.height=g,c.canvas=h,c.clear(),c._left=c._top=0,j&&(c.renderfix=function(){}),c.renderfix();return c},a._engine.setViewBox=function(a,b,c,d,e){k("setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=g(c/this.width,d/this.height),h=this.top,i=e?"meet":"xMinYMin",j,l;a==null?(this._vbSize&&(f=1),delete this._vbSize,j="0 0 "+this.width+m+this.height):(this._vbSize=f,j=a+m+b+m+c+m+d),q(this.canvas,{viewBox:j,preserveAspectRatio:i});while(f&&h)l="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":l}),h._.dirty=1,h._.dirtyT=1,h=h.prev;this._viewBox=[a,b,c,d,!!e];return this},a.prototype.renderfix=function(){var a=this.canvas,b=a.style,c=a.getScreenCTM()||a.createSVGMatrix(),d=-c.e%1,e=-c.f%1;if(d||e)d&&(this._left=(this._left+d)%1,b.left=this._left+"px"),e&&(this._top=(this._top+e)%1,b.top=this._top+"px")},a.prototype.clear=function(){a.eve("clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null};var B=a.st;for(var C in A)A[b](C)&&!B[b](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}(window.Raphael),window.Raphael.vml&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/ig,e=a._pathToAbsolute;c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g;if(e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e=b.toLowerCase()=="m",g=p[b];c.replace(s,function(a){e&&d.length==2&&(g+=d+p[b=="m"?"l":"L"],d=[]),d.push(f(a*u))});return g+d});return g}var h=e(b),i,j;g=[];for(var k=0,l=h.length;k<l;k++){i=h[k],j=h[k][0].toLowerCase(),j=="z"&&(j="x");for(var m=1,r=i.length;m<r;m++)j+=f(i[m]*u)+(m!=r-1?",":o);g.push(j)}return g.join(n)},y=function(b,c,d){var e=a.matrix();e.rotate(-b,.5,.5);return{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q,r=u/b,s=u/c;m.visibility="hidden";if(!!b&&!!c){l.coordsize=i(r)+n+i(s),m.rotation=f*(b*c<0?-1:1);if(f){var t=y(f,d,e);d=t.dx,e=t.dy}b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-r+n+e*-s;if(k||g.fillsize){var v=l.getElementsByTagName(j);v=v&&v[0],l.removeChild(v),k&&(t=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),v.position=t.dx*o+n+t.dy*o),g.fillsize&&(v.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(v)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";while(g--)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q,r=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),s=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),t=e;for(var y in i)i[b](y)&&(m[y]=i[y]);r&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur);if(i.path&&e.type=="path"||r)l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e.type=="image"&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0));"transform"in i&&e.transform(i.transform);if(s){var B=+m.cx,D=+m.cy,E=+m.rx||+m.r||0,G=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((B-E)*u),f((D-G)*u),f((B+E)*u),f((D+G)*u),f(B*u))}if("clip-rect"in i){var H=c(i["clip-rect"]).split(k);if(H.length==4){H[2]=+H[2]+ +H[0],H[3]=+H[3]+ +H[1];var I=l.clipRect||a._g.doc.createElement("div"),J=I.style;J.clip=a.format("rect({1}px {2}px {3}px {0}px)",H),l.clipRect||(J.position="absolute",J.top=0,J.left=0,J.width=e.paper.width+"px",J.height=e.paper.height+"px",l.parentNode.insertBefore(I,l),I.appendChild(l),l.clipRect=I)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var K=e.textpath.style;i.font&&(K.font=i.font),i["font-family"]&&(K.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(K.fontSize=i["font-size"]),i["font-weight"]&&(K.fontWeight=i["font-weight"]),i["font-style"]&&(K.fontStyle=i["font-style"])}"arrow-start"in i&&A(t,i["arrow-start"]),"arrow-end"in i&&A(t,i["arrow-end"],1);if(i.opacity!=null||i["stroke-width"]!=null||i.fill!=null||i.src!=null||i.stroke!=null||i["stroke-width"]!=null||i["stroke-opacity"]!=null||i["fill-opacity"]!=null||i["stroke-dasharray"]!=null||i["stroke-miterlimit"]!=null||i["stroke-linejoin"]!=null||i["stroke-linecap"]!=null){var L=l.getElementsByTagName(j),M=!1;L=L&&L[0],!L&&(M=L=F(j)),e.type=="image"&&i.src&&(L.src=i.src),i.fill&&(L.on=!0);if(L.on==null||i.fill=="none"||i.fill===null)L.on=!1;if(L.on&&i.fill){var N=c(i.fill).match(a._ISURL);if(N){L.parentNode==l&&l.removeChild(L),L.rotate=!0,L.src=N[1],L.type="tile";var O=e.getBBox(1);L.position=O.x+n+O.y,e._.fillpos=[O.x,O.y],a._preload(N[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else L.color=a.getRGB(i.fill).hex,L.src=o,L.type="solid",a.getRGB(i.fill).error&&(t.type in{circle:1,ellipse:1}||c(i.fill).charAt()!="r")&&C(t,i.fill,L)&&(m.fill="none",m.gradient=i.fill,L.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var P=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);P=h(g(P,0),1),L.opacity=P,L.src&&(L.color="none")}l.appendChild(L);var Q=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],T=!1;!Q&&(T=Q=F("stroke"));if(i.stroke&&i.stroke!="none"||i["stroke-width"]||i["stroke-opacity"]!=null||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])Q.on=!0;(i.stroke=="none"||i.stroke===null||Q.on==null||i.stroke==0||i["stroke-width"]==0)&&(Q.on=!1);var U=a.getRGB(i.stroke);Q.on&&i.stroke&&(Q.color=U.hex),P=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+U.o+1||2)-1);var V=(d(i["stroke-width"])||1)*.75;P=h(g(P,0),1),i["stroke-width"]==null&&(V=m["stroke-width"]),i["stroke-width"]&&(Q.weight=V),V&&V<1&&(P*=V)&&(Q.weight=1),Q.opacity=P,i["stroke-linejoin"]&&(Q.joinstyle=i["stroke-linejoin"]||"miter"),Q.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(Q.endcap=i["stroke-linecap"]=="butt"?"flat":i["stroke-linecap"]=="square"?"square":"round");if(i["stroke-dasharray"]){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Q.dashstyle=W[b](i["stroke-dasharray"])?W[i["stroke-dasharray"]]:o}T&&l.appendChild(Q)}if(t.type=="text"){t.paper.canvas.style.display=o;var X=t.paper.span,Y=100,Z=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=X.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),Z=d(m["font-size"]||Z&&Z[0])||10,p.fontSize=Z*Y+"px",t.textpath.string&&(X.innerHTML=c(t.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba<bb;ba++)if(_[ba]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=b.attrs,i=Math.pow,j,k,l="linear",m=".5 .5";b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){l="radial",b&&c&&(b=d(b),c=d(c),i(b-.5,2)+i(c-.5,2)>.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s<t;s++)q[s].offset&&r.push(q[s].offset+n+q[s].color);g.colors=r.length?r.join():"0% "+g.color,l=="radial"?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=m,g.angle=0):(g.type="gradient",g.angle=(270-p)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(b==null)return this._.transform;var d=this.paper._viewBoxShift,e=d?"s"+[d.scale,d.scale]+"-1-1t"+[d.dx,d.dy]:o,f;d&&(f=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,e+b);var g=this.matrix.clone(),h=this.skew,i=this.node,j,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");g.translate(-0.5,-0.5);if(l||k||this.type=="image"){h.matrix="1 0 0 1",h.offset="0 0",j=g.split();if(k&&j.noRotation||!j.isSimple){i.style.filter=g.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;i.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else i.style.filter=o,z(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate)}else i.style.filter=o,h.matrix=c(g),h.offset=g.offset();f&&(this._.transform=f);return this},E.rotate=function(a,b,e){if(this.removed)return this;if(a!=null){a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]]));return this}},E.translate=function(a,b){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]]));return this},E.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1;return this},E.hide=function(){!this.removed&&(this.node.style.display="none");return this},E.show=function(){!this.removed&&(this.node.style.display=o);return this},E._getBBox=function(){if(this.removed)return{};return{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c==j&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var g=c.split(k),h={};for(var i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&d==null&&a.is(c,"array")){h={};for(i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;d!=null&&(n={},n[c]=d),d==null&&a.is(c,"object")&&(n=c);for(var o in n)l("attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&this.type=="text"&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper);return this},E.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper));return this},E.insertAfter=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},E.insertBefore=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper);return this},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(r,o),+b!==0?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect";return i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e});return f},a._engine.circle=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",B(e,{cx:b,cy:c,r:d});return e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0);return i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");m.on=!0,h.appendChild(m),k.skew=m,k.transform(o);return k},a._engine.setSize=function(b,c){var d=this.canvas.style;this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox);return this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("setViewBox",this,this._viewBox,[b,c,d,e,f]);var h=this.width,i=this.height,j=1/g(d/h,e/i),k,l;f&&(k=i/e,l=h/d,d*k<h&&(b-=(h-d*k)/2/k),e*l<i&&(c-=(i-e*l)/2/l)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:j},this.forEach(function(a){a.transform("...")});return this};var F;a._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael) 
     8(function (a) { var b = "0.4.0", c = "hasOwnProperty", d = /[\.\/]/, e = "*", f = function () { }, g = function (a, b) { return a - b }, h, i, j = { n: {} }, k = function (a, b) { var c = j, d = i, e = Array.prototype.slice.call(arguments, 2), f = k.listeners(a), l = 0, m = !1, n, o = [], p = {}, q = [], r = []; h = a, i = 0; for (var s = 0, t = f.length; s < t; s++) "zIndex" in f[s] && (o.push(f[s].zIndex), f[s].zIndex < 0 && (p[f[s].zIndex] = f[s])); o.sort(g); while (o[l] < 0) { n = p[o[l++]], q.push(n.apply(b, e)); if (i) { i = d; return q } } for (s = 0; s < t; s++) { n = f[s]; if ("zIndex" in n) if (n.zIndex == o[l]) { q.push(n.apply(b, e)); if (i) { i = d; return q } do { l++, n = p[o[l]], n && q.push(n.apply(b, e)); if (i) { i = d; return q } } while (n) } else p[n.zIndex] = n; else { q.push(n.apply(b, e)); if (i) { i = d; return q } } } i = d; return q.length ? q : null }; k.listeners = function (a) { var b = a.split(d), c = j, f, g, h, i, k, l, m, n, o = [c], p = []; for (i = 0, k = b.length; i < k; i++) { n = []; for (l = 0, m = o.length; l < m; l++) { c = o[l].n, g = [c[b[i]], c[e]], h = 2; while (h--) f = g[h], f && (n.push(f), p = p.concat(f.f || [])) } o = n } return p }, k.on = function (a, b) { var c = a.split(d), e = j; for (var g = 0, h = c.length; g < h; g++) e = e.n, !e[c[g]] && (e[c[g]] = { n: {} }), e = e[c[g]]; e.f = e.f || []; for (g = 0, h = e.f.length; g < h; g++) if (e.f[g] == b) return f; e.f.push(b); return function (a) { +a == +a && (b.zIndex = +a) } }, k.stop = function () { i = 1 }, k.nt = function (a) { if (a) return (new RegExp("(?:\\.|\\/|^)" + a + "(?:\\.|\\/|$)")).test(h); return h }, k.unbind = function (a, b) { var f = a.split(d), g, h, i, k, l, m, n, o = [j]; for (k = 0, l = f.length; k < l; k++) for (m = 0; m < o.length; m += i.length - 2) { i = [m, 1], g = o[m].n; if (f[k] != e) g[f[k]] && i.push(g[f[k]]); else for (h in g) g[c](h) && i.push(g[h]); o.splice.apply(o, i) } for (k = 0, l = o.length; k < l; k++) { g = o[k]; while (g.n) { if (b) { if (g.f) { for (m = 0, n = g.f.length; m < n; m++) if (g.f[m] == b) { g.f.splice(m, 1); break } !g.f.length && delete g.f } for (h in g.n) if (g.n[c](h) && g.n[h].f) { var p = g.n[h].f; for (m = 0, n = p.length; m < n; m++) if (p[m] == b) { p.splice(m, 1); break } !p.length && delete g.n[h].f } } else { delete g.f; for (h in g.n) g.n[c](h) && g.n[h].f && delete g.n[h].f } g = g.n } } }, k.once = function (a, b) { var c = function () { b.apply(this, arguments), k.unbind(a, c) }; return k.on(a, c) }, k.version = b, k.toString = function () { return "You are running Eve " + b }, typeof module != "undefined" && module.exports ? module.exports = k : a.eve = k })(this), function () { function cr(b, d, e, f, h, i) { e = Q(e); var j, k, l, m = [], o, p, q, t = b.ms, u = {}, v = {}, w = {}; if (f) for (y = 0, z = cl.length; y < z; y++) { var x = cl[y]; if (x.el.id == d.id && x.anim == b) { x.percent != e ? (cl.splice(y, 1), l = 1) : k = x, d.attr(x.totalOrigin); break } } else f = +v; for (var y = 0, z = b.percents.length; y < z; y++) { if (b.percents[y] == e || b.percents[y] > f * b.top) { e = b.percents[y], p = b.percents[y - 1] || 0, t = t / b.top * (e - p), o = b.percents[y + 1], j = b.anim[e]; break } f && d.attr(b.anim[b.percents[y]]) } if (!!j) { if (!k) { for (var A in j) if (j[g](A)) if (U[g](A) || d.paper.customAttributes[g](A)) { u[A] = d.attr(A), u[A] == null && (u[A] = T[A]), v[A] = j[A]; switch (U[A]) { case C: w[A] = (v[A] - u[A]) / t; break; case "colour": u[A] = a.getRGB(u[A]); var B = a.getRGB(v[A]); w[A] = { r: (B.r - u[A].r) / t, g: (B.g - u[A].g) / t, b: (B.b - u[A].b) / t }; break; case "path": var D = bG(u[A], v[A]), E = D[1]; u[A] = D[0], w[A] = []; for (y = 0, z = u[A].length; y < z; y++) { w[A][y] = [0]; for (var F = 1, G = u[A][y].length; F < G; F++) w[A][y][F] = (E[y][F] - u[A][y][F]) / t } break; case "transform": var H = d._, I = bP(H[A], v[A]); if (I) { u[A] = I.from, v[A] = I.to, w[A] = [], w[A].real = !0; for (y = 0, z = u[A].length; y < z; y++) { w[A][y] = [u[A][y][0]]; for (F = 1, G = u[A][y].length; F < G; F++) w[A][y][F] = (v[A][y][F] - u[A][y][F]) / t } } else { var J = d.matrix || new bQ, K = { _: { transform: H.transform }, getBBox: function () { return d.getBBox(1) } }; u[A] = [J.a, J.b, J.c, J.d, J.e, J.f], bN(K, v[A]), v[A] = K._.transform, w[A] = [(K.matrix.a - J.a) / t, (K.matrix.b - J.b) / t, (K.matrix.c - J.c) / t, (K.matrix.d - J.d) / t, (K.matrix.e - J.e) / t, (K.matrix.e - J.f) / t] } break; case "csv": var L = r(j[A])[s](c), M = r(u[A])[s](c); if (A == "clip-rect") { u[A] = M, w[A] = [], y = M.length; while (y--) w[A][y] = (L[y] - u[A][y]) / t } v[A] = L; break; default: L = [][n](j[A]), M = [][n](u[A]), w[A] = [], y = d.paper.customAttributes[A].length; while (y--) w[A][y] = ((L[y] || 0) - (M[y] || 0)) / t } } var O = j.easing, P = a.easing_formulas[O]; if (!P) { P = r(O).match(N); if (P && P.length == 5) { var R = P; P = function (a) { return cp(a, +R[1], +R[2], +R[3], +R[4], t) } } else P = be } q = j.start || b.start || +(new Date), x = { anim: b, percent: e, timestamp: q, start: q + (b.del || 0), status: 0, initstatus: f || 0, stop: !1, ms: t, easing: P, from: u, diff: w, to: v, el: d, callback: j.callback, prev: p, next: o, repeat: i || b.times, origin: d.attr(), totalOrigin: h }, cl.push(x); if (f && !k && !l) { x.stop = !0, x.start = new Date - t * f; if (cl.length == 1) return cn() } l && (x.start = new Date - x.ms * f), cl.length == 1 && cm(cn) } else k.initstatus = f, k.start = new Date - k.ms * f; eve("anim.start." + d.id, d, b) } } function cq(a, b) { var c = [], d = {}; this.ms = b, this.times = 1; if (a) { for (var e in a) a[g](e) && (d[Q(e)] = a[e], c.push(Q(e))); c.sort(bc) } this.anim = d, this.top = c[c.length - 1], this.percents = c } function cp(a, b, c, d, e, f) { function o(a, b) { var c, d, e, f, j, k; for (e = a, k = 0; k < 8; k++) { f = m(e) - a; if (z(f) < b) return e; j = (3 * i * e + 2 * h) * e + g; if (z(j) < 1e-6) break; e = e - f / j } c = 0, d = 1, e = a; if (e < c) return c; if (e > d) return d; while (c < d) { f = m(e); if (z(f - a) < b) return e; a > f ? c = e : d = e, e = (d - c) / 2 + c } return e } function n(a, b) { var c = o(a, b); return ((l * c + k) * c + j) * c } function m(a) { return ((i * a + h) * a + g) * a } var g = 3 * b, h = 3 * (d - b) - g, i = 1 - g - h, j = 3 * c, k = 3 * (e - c) - j, l = 1 - j - k; return n(a, 1 / (200 * f)) } function cd() { return this.x + q + this.y + q + this.width + " × " + this.height } function cc() { return this.x + q + this.y } function bQ(a, b, c, d, e, f) { a != null ? (this.a = +a, this.b = +b, this.c = +c, this.d = +d, this.e = +e, this.f = +f) : (this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.e = 0, this.f = 0) } function bw(a) { var b = []; for (var c = 0, d = a.length; d - 2 > c; c += 2) { var e = [{ x: +a[c], y: +a[c + 1] }, { x: +a[c], y: +a[c + 1] }, { x: +a[c + 2], y: +a[c + 3] }, { x: +a[c + 4], y: +a[c + 5]}]; d - 4 == c ? (e[0] = { x: +a[c - 2], y: +a[c - 1] }, e[3] = e[2]) : c && (e[0] = { x: +a[c - 2], y: +a[c - 1] }), b.push(["C", (-e[0].x + 6 * e[1].x + e[2].x) / 6, (-e[0].y + 6 * e[1].y + e[2].y) / 6, (e[1].x + 6 * e[2].x - e[3].x) / 6, (e[1].y + 6 * e[2].y - e[3].y) / 6, e[2].x, e[2].y]) } return b } function bv() { return this.hex } function bt(a, b, c) { function d() { var e = Array.prototype.slice.call(arguments, 0), f = e.join("␀"), h = d.cache = d.cache || {}, i = d.count = d.count || []; if (h[g](f)) { bs(i, f); return c ? c(h[f]) : h[f] } i.length >= 1e3 && delete h[i.shift()], i.push(f), h[f] = a[m](b, e); return c ? c(h[f]) : h[f] } return d } function bs(a, b) { for (var c = 0, d = a.length; c < d; c++) if (a[c] === b) return a.push(a.splice(c, 1)[0]) } function a(c) { if (a.is(c, "function")) return b ? c() : eve.on("DOMload", c); if (a.is(c, E)) return a._engine.create[m](a, c.splice(0, 3 + a.is(c[0], C))).add(c); var d = Array.prototype.slice.call(arguments, 0); if (a.is(d[d.length - 1], "function")) { var e = d.pop(); return b ? e.call(a._engine.create[m](a, d)) : eve.on("DOMload", function () { e.call(a._engine.create[m](a, d)) }) } return a._engine.create[m](a, arguments) } a.version = "2.0.1", a.eve = eve; var b, c = /[, ]+/, d = { circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1 }, e = /\{(\d+)\}/g, f = "prototype", g = "hasOwnProperty", h = { doc: document, win: window }, i = { was: Object.prototype[g].call(h.win, "Raphael"), is: h.win.Raphael }, j = function () { this.ca = this.customAttributes = {} }, k, l = "appendChild", m = "apply", n = "concat", o = "createTouch" in h.doc, p = "", q = " ", r = String, s = "split", t = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q), u = { mousedown: "touchstart", mousemove: "touchmove", mouseup: "touchend" }, v = r.prototype.toLowerCase, w = Math, x = w.max, y = w.min, z = w.abs, A = w.pow, B = w.PI, C = "number", D = "string", E = "array", F = "toString", G = "fill", H = Object.prototype.toString, I = {}, J = "push", K = a._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, L = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, M = { NaN: 1, Infinity: 1, "-Infinity": 1 }, N = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, O = w.round, P = "setAttribute", Q = parseFloat, R = parseInt, S = r.prototype.toUpperCase, T = a._availableAttrs = { "arrow-end": "none", "arrow-start": "none", blur: 0, "clip-rect": "0 0 1e9 1e9", cursor: "default", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", "letter-spacing": 0, opacity: 1, path: "M0,0", r: 0, rx: 0, ry: 0, src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", transform: "", width: 0, x: 0, y: 0 }, U = a._availableAnimAttrs = { blur: C, "clip-rect": "csv", cx: C, cy: C, fill: "colour", "fill-opacity": C, "font-size": C, height: C, opacity: C, path: "path", r: C, rx: C, ry: C, stroke: "colour", "stroke-opacity": C, "stroke-width": C, transform: "transform", width: C, x: C, y: C }, V = /\s*,\s*/, W = { hs: 1, rg: 1 }, X = /,?([achlmqrstvxz]),?/gi, Y = /([achlmrqstvz])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig, Z = /([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?\s*,?\s*)+)/ig, $ = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)\s*,?\s*/ig, _ = a._radial_gradient = /^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/, ba = {}, bb = function (a, b) { return a.key - b.key }, bc = function (a, b) { return Q(a) - Q(b) }, bd = function () { }, be = function (a) { return a }, bf = a._rectPath = function (a, b, c, d, e) { if (e) return [["M", a + e, b], ["l", c - e * 2, 0], ["a", e, e, 0, 0, 1, e, e], ["l", 0, d - e * 2], ["a", e, e, 0, 0, 1, -e, e], ["l", e * 2 - c, 0], ["a", e, e, 0, 0, 1, -e, -e], ["l", 0, e * 2 - d], ["a", e, e, 0, 0, 1, e, -e], ["z"]]; return [["M", a, b], ["l", c, 0], ["l", 0, d], ["l", -c, 0], ["z"]] }, bg = function (a, b, c, d) { d == null && (d = c); return [["M", a, b], ["m", 0, -d], ["a", c, d, 0, 1, 1, 0, 2 * d], ["a", c, d, 0, 1, 1, 0, -2 * d], ["z"]] }, bh = a._getPath = { path: function (a) { return a.attr("path") }, circle: function (a) { var b = a.attrs; return bg(b.cx, b.cy, b.r) }, ellipse: function (a) { var b = a.attrs; return bg(b.cx, b.cy, b.rx, b.ry) }, rect: function (a) { var b = a.attrs; return bf(b.x, b.y, b.width, b.height, b.r) }, image: function (a) { var b = a.attrs; return bf(b.x, b.y, b.width, b.height) }, text: function (a) { var b = a._getBBox(); return bf(b.x, b.y, b.width, b.height) } }, bi = a.mapPath = function (a, b) { if (!b) return a; var c, d, e, f, g, h, i; a = bG(a); for (e = 0, g = a.length; e < g; e++) { i = a[e]; for (f = 1, h = i.length; f < h; f += 2) c = b.x(i[f], i[f + 1]), d = b.y(i[f], i[f + 1]), i[f] = c, i[f + 1] = d } return a }; a._g = h, a.type = h.win.SVGAngle || h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"; if (a.type == "VML") { var bj = h.doc.createElement("div"), bk; bj.innerHTML = '<v:shape adj="1"/>', bk = bj.firstChild, bk.style.behavior = "url(#default#VML)"; if (!bk || typeof bk.adj != "object") return a.type = p; bj = null } a.svg = !(a.vml = a.type == "VML"), a._Paper = j, a.fn = k = j.prototype = a.prototype, a._id = 0, a._oid = 0, a.is = function (a, b) { b = v.call(b); if (b == "finite") return !M[g](+a); if (b == "array") return a instanceof Array; return b == "null" && a === null || b == typeof a && a !== null || b == "object" && a === Object(a) || b == "array" && Array.isArray && Array.isArray(a) || H.call(a).slice(8, -1).toLowerCase() == b }, a.angle = function (b, c, d, e, f, g) { if (f == null) { var h = b - d, i = c - e; if (!h && !i) return 0; return (180 + w.atan2(-i, -h) * 180 / B + 360) % 360 } return a.angle(b, c, f, g) - a.angle(d, e, f, g) }, a.rad = function (a) { return a % 360 * B / 180 }, a.deg = function (a) { return a * 180 / B % 360 }, a.snapTo = function (b, c, d) { d = a.is(d, "finite") ? d : 10; if (a.is(b, E)) { var e = b.length; while (e--) if (z(b[e] - c) <= d) return b[e] } else { b = +b; var f = c % b; if (f < d) return c - f; if (f > b - d) return c - f + b } return c }; var bl = a.createUUID = function (a, b) { return function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a, b).toUpperCase() } } (/[xy]/g, function (a) { var b = w.random() * 16 | 0, c = a == "x" ? b : b & 3 | 8; return c.toString(16) }); a.setWindow = function (b) { eve("setWindow", a, h.win, b), h.win = b, h.doc = h.win.document, a._engine.initWin && a._engine.initWin(h.win) }; var bm = function (b) { if (a.vml) { var c = /^\s+|\s+$/g, d; try { var e = new ActiveXObject("htmlfile"); e.write("<body>"), e.close(), d = e.body } catch (f) { d = createPopup().document.body } var g = d.createTextRange(); bm = bt(function (a) { try { d.style.color = r(a).replace(c, p); var b = g.queryCommandValue("ForeColor"); b = (b & 255) << 16 | b & 65280 | (b & 16711680) >>> 16; return "#" + ("000000" + b.toString(16)).slice(-6) } catch (e) { return "none" } }) } else { var i = h.doc.createElement("i"); i.title = "Raphaël Colour Picker", i.style.display = "none", h.doc.body.appendChild(i), bm = bt(function (a) { i.style.color = a; return h.doc.defaultView.getComputedStyle(i, p).getPropertyValue("color") }) } return bm(b) }, bn = function () { return "hsb(" + [this.h, this.s, this.b] + ")" }, bo = function () { return "hsl(" + [this.h, this.s, this.l] + ")" }, bp = function () { return this.hex }, bq = function (b, c, d) { c == null && a.is(b, "object") && "r" in b && "g" in b && "b" in b && (d = b.b, c = b.g, b = b.r); if (c == null && a.is(b, D)) { var e = a.getRGB(b); b = e.r, c = e.g, d = e.b } if (b > 1 || c > 1 || d > 1) b /= 255, c /= 255, d /= 255; return [b, c, d] }, br = function (b, c, d, e) { b *= 255, c *= 255, d *= 255; var f = { r: b, g: c, b: d, hex: a.rgb(b, c, d), toString: bp }; a.is(e, "finite") && (f.opacity = e); return f }; a.color = function (b) { var c; a.is(b, "object") && "h" in b && "s" in b && "b" in b ? (c = a.hsb2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : a.is(b, "object") && "h" in b && "s" in b && "l" in b ? (c = a.hsl2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : (a.is(b, "string") && (b = a.getRGB(b)), a.is(b, "object") && "r" in b && "g" in b && "b" in b ? (c = a.rgb2hsl(b), b.h = c.h, b.s = c.s, b.l = c.l, c = a.rgb2hsb(b), b.v = c.b) : (b = { hex: "none" }, b.r = b.g = b.b = b.h = b.s = b.v = b.l = -1)), b.toString = bp; return b }, a.hsb2rgb = function (a, b, c, d) { this.is(a, "object") && "h" in a && "s" in a && "b" in a && (c = a.b, b = a.s, a = a.h, d = a.o), a *= 360; var e, f, g, h, i; a = a % 360 / 60, i = c * b, h = i * (1 - z(a % 2 - 1)), e = f = g = c - i, a = ~ ~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; return br(e, f, g, d) }, a.hsl2rgb = function (a, b, c, d) { this.is(a, "object") && "h" in a && "s" in a && "l" in a && (c = a.l, b = a.s, a = a.h); if (a > 1 || b > 1 || c > 1) a /= 360, b /= 100, c /= 100; a *= 360; var e, f, g, h, i; a = a % 360 / 60, i = 2 * b * (c < .5 ? c : 1 - c), h = i * (1 - z(a % 2 - 1)), e = f = g = c - i / 2, a = ~ ~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; return br(e, f, g, d) }, a.rgb2hsb = function (a, b, c) { c = bq(a, b, c), a = c[0], b = c[1], c = c[2]; var d, e, f, g; f = x(a, b, c), g = f - y(a, b, c), d = g == 0 ? null : f == a ? (b - c) / g : f == b ? (c - a) / g + 2 : (a - b) / g + 4, d = (d + 360) % 6 * 60 / 360, e = g == 0 ? 0 : g / f; return { h: d, s: e, b: f, toString: bn} }, a.rgb2hsl = function (a, b, c) { c = bq(a, b, c), a = c[0], b = c[1], c = c[2]; var d, e, f, g, h, i; g = x(a, b, c), h = y(a, b, c), i = g - h, d = i == 0 ? null : g == a ? (b - c) / i : g == b ? (c - a) / i + 2 : (a - b) / i + 4, d = (d + 360) % 6 * 60 / 360, f = (g + h) / 2, e = i == 0 ? 0 : f < .5 ? i / (2 * f) : i / (2 - 2 * f); return { h: d, s: e, l: f, toString: bo} }, a._path2string = function () { return this.join(",").replace(X, "$1") }; var bu = a._preload = function (a, b) { var c = h.doc.createElement("img"); c.style.cssText = "position:absolute;left:-9999em;top:-9999em", c.onload = function () { b.call(this), this.onload = null, h.doc.body.removeChild(this) }, c.onerror = function () { h.doc.body.removeChild(this) }, h.doc.body.appendChild(c), c.src = a }; a.getRGB = bt(function (b) { if (!b || !!((b = r(b)).indexOf("-") + 1)) return { r: -1, g: -1, b: -1, hex: "none", error: 1, toString: bv }; if (b == "none") return { r: -1, g: -1, b: -1, hex: "none", toString: bv }; !W[g](b.toLowerCase().substring(0, 2)) && b.charAt() != "#" && (b = bm(b)); var c, d, e, f, h, i, j, k = b.match(L); if (k) { k[2] && (f = R(k[2].substring(5), 16), e = R(k[2].substring(3, 5), 16), d = R(k[2].substring(1, 3), 16)), k[3] && (f = R((i = k[3].charAt(3)) + i, 16), e = R((i = k[3].charAt(2)) + i, 16), d = R((i = k[3].charAt(1)) + i, 16)), k[4] && (j = k[4][s](V), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), k[1].toLowerCase().slice(0, 4) == "rgba" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100)); if (k[5]) { j = k[5][s](V), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), (j[0].slice(-3) == "deg" || j[0].slice(-1) == "°") && (d /= 360), k[1].toLowerCase().slice(0, 4) == "hsba" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100); return a.hsb2rgb(d, e, f, h) } if (k[6]) { j = k[6][s](V), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), (j[0].slice(-3) == "deg" || j[0].slice(-1) == "°") && (d /= 360), k[1].toLowerCase().slice(0, 4) == "hsla" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100); return a.hsl2rgb(d, e, f, h) } k = { r: d, g: e, b: f, toString: bv }, k.hex = "#" + (16777216 | f | e << 8 | d << 16).toString(16).slice(1), a.is(h, "finite") && (k.opacity = h); return k } return { r: -1, g: -1, b: -1, hex: "none", error: 1, toString: bv} }, a), a.hsb = bt(function (b, c, d) { return a.hsb2rgb(b, c, d).hex }), a.hsl = bt(function (b, c, d) { return a.hsl2rgb(b, c, d).hex }), a.rgb = bt(function (a, b, c) { return "#" + (16777216 | c | b << 8 | a << 16).toString(16).slice(1) }), a.getColor = function (a) { var b = this.getColor.start = this.getColor.start || { h: 0, s: 1, b: a || .75 }, c = this.hsb2rgb(b.h, b.s, b.b); b.h += .075, b.h > 1 && (b.h = 0, b.s -= .2, b.s <= 0 && (this.getColor.start = { h: 0, s: 1, b: b.b })); return c.hex }, a.getColor.reset = function () { delete this.start }, a.parsePathString = bt(function (b) { if (!b) return null; var c = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, d = []; a.is(b, E) && a.is(b[0], E) && (d = by(b)), d.length || r(b).replace(Y, function (a, b, e) { var f = [], g = b.toLowerCase(); e.replace($, function (a, b) { b && f.push(+b) }), g == "m" && f.length > 2 && (d.push([b][n](f.splice(0, 2))), g = "l", b = b == "m" ? "l" : "L"); if (g == "r") d.push([b][n](f)); else while (f.length >= c[g]) { d.push([b][n](f.splice(0, c[g]))); if (!c[g]) break } }), d.toString = a._path2string; return d }), a.parseTransformString = bt(function (b) { if (!b) return null; var c = { r: 3, s: 4, t: 2, m: 6 }, d = []; a.is(b, E) && a.is(b[0], E) && (d = by(b)), d.length || r(b).replace(Z, function (a, b, c) { var e = [], f = v.call(b); c.replace($, function (a, b) { b && e.push(+b) }), d.push([b][n](e)) }), d.toString = a._path2string; return d }), a.findDotsAtSegment = function (a, b, c, d, e, f, g, h, i) { var j = 1 - i, k = A(j, 3), l = A(j, 2), m = i * i, n = m * i, o = k * a + l * 3 * i * c + j * 3 * i * i * e + n * g, p = k * b + l * 3 * i * d + j * 3 * i * i * f + n * h, q = a + 2 * i * (c - a) + m * (e - 2 * c + a), r = b + 2 * i * (d - b) + m * (f - 2 * d + b), s = c + 2 * i * (e - c) + m * (g - 2 * e + c), t = d + 2 * i * (f - d) + m * (h - 2 * f + d), u = j * a + i * c, v = j * b + i * d, x = j * e + i * g, y = j * f + i * h, z = 90 - w.atan2(q - s, r - t) * 180 / B; (q > s || r < t) && (z += 180); return { x: o, y: p, m: { x: q, y: r }, n: { x: s, y: t }, start: { x: u, y: v }, end: { x: x, y: y }, alpha: z} }, a._removedFactory = function (a) { return function () { throw new Error("Raphaël: you are calling to method “" + a + "” of removed object") } }; var bx = bt(function (a) { if (!a) return { x: 0, y: 0, width: 0, height: 0 }; a = bG(a); var b = 0, c = 0, d = [], e = [], f; for (var g = 0, h = a.length; g < h; g++) { f = a[g]; if (f[0] == "M") b = f[1], c = f[2], d.push(b), e.push(c); else { var i = bF(b, c, f[1], f[2], f[3], f[4], f[5], f[6]); d = d[n](i.min.x, i.max.x), e = e[n](i.min.y, i.max.y), b = f[5], c = f[6] } } var j = y[m](0, d), k = y[m](0, e); return { x: j, y: k, width: x[m](0, d) - j, height: x[m](0, e) - k} }, null, function (a) { return { x: a.x, y: a.y, width: a.width, height: a.height} }), by = function (b) { var c = []; if (!a.is(b, E) || !a.is(b && b[0], E)) b = a.parsePathString(b); for (var d = 0, e = b.length; d < e; d++) { c[d] = []; for (var f = 0, g = b[d].length; f < g; f++) c[d][f] = b[d][f] } c.toString = a._path2string; return c }, bz = a._pathToRelative = bt(function (b) { if (!a.is(b, E) || !a.is(b && b[0], E)) b = a.parsePathString(b); var c = [], d = 0, e = 0, f = 0, g = 0, h = 0; b[0][0] == "M" && (d = b[0][1], e = b[0][2], f = d, g = e, h++, c.push(["M", d, e])); for (var i = h, j = b.length; i < j; i++) { var k = c[i] = [], l = b[i]; if (l[0] != v.call(l[0])) { k[0] = v.call(l[0]); switch (k[0]) { case "a": k[1] = l[1], k[2] = l[2], k[3] = l[3], k[4] = l[4], k[5] = l[5], k[6] = +(l[6] - d).toFixed(3), k[7] = +(l[7] - e).toFixed(3); break; case "v": k[1] = +(l[1] - e).toFixed(3); break; case "m": f = l[1], g = l[2]; default: for (var m = 1, n = l.length; m < n; m++) k[m] = +(l[m] - (m % 2 ? d : e)).toFixed(3) } } else { k = c[i] = [], l[0] == "m" && (f = l[1] + d, g = l[2] + e); for (var o = 0, p = l.length; o < p; o++) c[i][o] = l[o] } var q = c[i].length; switch (c[i][0]) { case "z": d = f, e = g; break; case "h": d += +c[i][q - 1]; break; case "v": e += +c[i][q - 1]; break; default: d += +c[i][q - 2], e += +c[i][q - 1] } } c.toString = a._path2string; return c }, 0, by), bA = a._pathToAbsolute = bt(function (b) { if (!a.is(b, E) || !a.is(b && b[0], E)) b = a.parsePathString(b); if (!b || !b.length) return [["M", 0, 0]]; var c = [], d = 0, e = 0, f = 0, g = 0, h = 0; b[0][0] == "M" && (d = +b[0][1], e = +b[0][2], f = d, g = e, h++, c[0] = ["M", d, e]); for (var i, j, k = h, l = b.length; k < l; k++) { c.push(i = []), j = b[k]; if (j[0] != S.call(j[0])) { i[0] = S.call(j[0]); switch (i[0]) { case "A": i[1] = j[1], i[2] = j[2], i[3] = j[3], i[4] = j[4], i[5] = j[5], i[6] = +(j[6] + d), i[7] = +(j[7] + e); break; case "V": i[1] = +j[1] + e; break; case "H": i[1] = +j[1] + d; break; case "R": var m = [d, e][n](j.slice(1)); for (var o = 2, p = m.length; o < p; o++) m[o] = +m[o] + d, m[++o] = +m[o] + e; c.pop(), c = c[n](bw(m)); break; case "M": f = +j[1] + d, g = +j[2] + e; default: for (o = 1, p = j.length; o < p; o++) i[o] = +j[o] + (o % 2 ? d : e) } } else if (j[0] == "R") m = [d, e][n](j.slice(1)), c.pop(), c = c[n](bw(m)), i = ["R"][n](j.slice(-2)); else for (var q = 0, r = j.length; q < r; q++) i[q] = j[q]; switch (i[0]) { case "Z": d = f, e = g; break; case "H": d = i[1]; break; case "V": e = i[1]; break; case "M": f = i[i.length - 2], g = i[i.length - 1]; default: d = i[i.length - 2], e = i[i.length - 1] } } c.toString = a._path2string; return c }, null, by), bB = function (a, b, c, d) { return [a, b, c, d, c, d] }, bC = function (a, b, c, d, e, f) { var g = 1 / 3, h = 2 / 3; return [g * a + h * c, g * b + h * d, g * e + h * c, g * f + h * d, e, f] }, bD = function (a, b, c, d, e, f, g, h, i, j) { var k = B * 120 / 180, l = B / 180 * (+e || 0), m = [], o, p = bt(function (a, b, c) { var d = a * w.cos(c) - b * w.sin(c), e = a * w.sin(c) + b * w.cos(c); return { x: d, y: e} }); if (!j) { o = p(a, b, -l), a = o.x, b = o.y, o = p(h, i, -l), h = o.x, i = o.y; var q = w.cos(B / 180 * e), r = w.sin(B / 180 * e), t = (a - h) / 2, u = (b - i) / 2, v = t * t / (c * c) + u * u / (d * d); v > 1 && (v = w.sqrt(v), c = v * c, d = v * d); var x = c * c, y = d * d, A = (f == g ? -1 : 1) * w.sqrt(z((x * y - x * u * u - y * t * t) / (x * u * u + y * t * t))), C = A * c * u / d + (a + h) / 2, D = A * -d * t / c + (b + i) / 2, E = w.asin(((b - D) / d).toFixed(9)), F = w.asin(((i - D) / d).toFixed(9)); E = a < C ? B - E : E, F = h < C ? B - F : F, E < 0 && (E = B * 2 + E), F < 0 && (F = B * 2 + F), g && E > F && (E = E - B * 2), !g && F > E && (F = F - B * 2) } else E = j[0], F = j[1], C = j[2], D = j[3]; var G = F - E; if (z(G) > k) { var H = F, I = h, J = i; F = E + k * (g && F > E ? 1 : -1), h = C + c * w.cos(F), i = D + d * w.sin(F), m = bD(h, i, c, d, e, 0, g, I, J, [F, H, C, D]) } G = F - E; var K = w.cos(E), L = w.sin(E), M = w.cos(F), N = w.sin(F), O = w.tan(G / 4), P = 4 / 3 * c * O, Q = 4 / 3 * d * O, R = [a, b], S = [a + P * L, b - Q * K], T = [h + P * N, i - Q * M], U = [h, i]; S[0] = 2 * R[0] - S[0], S[1] = 2 * R[1] - S[1]; if (j) return [S, T, U][n](m); m = [S, T, U][n](m).join()[s](","); var V = []; for (var W = 0, X = m.length; W < X; W++) V[W] = W % 2 ? p(m[W - 1], m[W], l).y : p(m[W], m[W + 1], l).x; return V }, bE = function (a, b, c, d, e, f, g, h, i) { var j = 1 - i; return { x: A(j, 3) * a + A(j, 2) * 3 * i * c + j * 3 * i * i * e + A(i, 3) * g, y: A(j, 3) * b + A(j, 2) * 3 * i * d + j * 3 * i * i * f + A(i, 3) * h} }, bF = bt(function (a, b, c, d, e, f, g, h) { var i = e - 2 * c + a - (g - 2 * e + c), j = 2 * (c - a) - 2 * (e - c), k = a - c, l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i, n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i, o = [b, h], p = [a, g], q; z(l) > "1e12" && (l = .5), z(n) > "1e12" && (n = .5), l > 0 && l < 1 && (q = bE(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bE(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)), i = f - 2 * d + b - (h - 2 * f + d), j = 2 * (d - b) - 2 * (f - d), k = b - d, l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i, n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i, z(l) > "1e12" && (l = .5), z(n) > "1e12" && (n = .5), l > 0 && l < 1 && (q = bE(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bE(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)); return { min: { x: y[m](0, p), y: y[m](0, o) }, max: { x: x[m](0, p), y: x[m](0, o)}} }), bG = a._path2curve = bt(function (a, b) { var c = bA(a), d = b && bA(b), e = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, f = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, g = function (a, b) { var c, d; if (!a) return ["C", b.x, b.y, b.x, b.y, b.x, b.y]; !(a[0] in { T: 1, Q: 1 }) && (b.qx = b.qy = null); switch (a[0]) { case "M": b.X = a[1], b.Y = a[2]; break; case "A": a = ["C"][n](bD[m](0, [b.x, b.y][n](a.slice(1)))); break; case "S": c = b.x + (b.x - (b.bx || b.x)), d = b.y + (b.y - (b.by || b.y)), a = ["C", c, d][n](a.slice(1)); break; case "T": b.qx = b.x + (b.x - (b.qx || b.x)), b.qy = b.y + (b.y - (b.qy || b.y)), a = ["C"][n](bC(b.x, b.y, b.qx, b.qy, a[1], a[2])); break; case "Q": b.qx = a[1], b.qy = a[2], a = ["C"][n](bC(b.x, b.y, a[1], a[2], a[3], a[4])); break; case "L": a = ["C"][n](bB(b.x, b.y, a[1], a[2])); break; case "H": a = ["C"][n](bB(b.x, b.y, a[1], b.y)); break; case "V": a = ["C"][n](bB(b.x, b.y, b.x, a[1])); break; case "Z": a = ["C"][n](bB(b.x, b.y, b.X, b.Y)) } return a }, h = function (a, b) { if (a[b].length > 7) { a[b].shift(); var e = a[b]; while (e.length) a.splice(b++, 0, ["C"][n](e.splice(0, 6))); a.splice(b, 1), k = x(c.length, d && d.length || 0) } }, i = function (a, b, e, f, g) { a && b && a[g][0] == "M" && b[g][0] != "M" && (b.splice(g, 0, ["M", f.x, f.y]), e.bx = 0, e.by = 0, e.x = a[g][1], e.y = a[g][2], k = x(c.length, d && d.length || 0)) }; for (var j = 0, k = x(c.length, d && d.length || 0); j < k; j++) { c[j] = g(c[j], e), h(c, j), d && (d[j] = g(d[j], f)), d && h(d, j), i(c, d, e, f, j), i(d, c, f, e, j); var l = c[j], o = d && d[j], p = l.length, q = d && o.length; e.x = l[p - 2], e.y = l[p - 1], e.bx = Q(l[p - 4]) || e.x, e.by = Q(l[p - 3]) || e.y, f.bx = d && (Q(o[q - 4]) || f.x), f.by = d && (Q(o[q - 3]) || f.y), f.x = d && o[q - 2], f.y = d && o[q - 1] } return d ? [c, d] : c }, null, by), bH = a._parseDots = bt(function (b) { var c = []; for (var d = 0, e = b.length; d < e; d++) { var f = {}, g = b[d].match(/^([^:]*):?([\d\.]*)/); f.color = a.getRGB(g[1]); if (f.color.error) return null; f.color = f.color.hex, g[2] && (f.offset = g[2] + "%"), c.push(f) } for (d = 1, e = c.length - 1; d < e; d++) if (!c[d].offset) { var h = Q(c[d - 1].offset || 0), i = 0; for (var j = d + 1; j < e; j++) if (c[j].offset) { i = c[j].offset; break } i || (i = 100, j = e), i = Q(i); var k = (i - h) / (j - d + 1); for (; d < j; d++) h += k, c[d].offset = h + "%" } return c }), bI = a._tear = function (a, b) { a == b.top && (b.top = a.prev), a == b.bottom && (b.bottom = a.next), a.next && (a.next.prev = a.prev), a.prev && (a.prev.next = a.next) }, bJ = a._tofront = function (a, b) { b.top !== a && (bI(a, b), a.next = null, a.prev = b.top, b.top.next = a, b.top = a) }, bK = a._toback = function (a, b) { b.bottom !== a && (bI(a, b), a.next = b.bottom, a.prev = null, b.bottom.prev = a, b.bottom = a) }, bL = a._insertafter = function (a, b, c) { bI(a, c), b == c.top && (c.top = a), b.next && (b.next.prev = a), a.next = b.next, a.prev = b, b.next = a }, bM = a._insertbefore = function (a, b, c) { bI(a, c), b == c.bottom && (c.bottom = a), b.prev && (b.prev.next = a), a.prev = b.prev, b.prev = a, a.next = b }, bN = a._extractTransform = function (b, c) { if (c == null) return b._.transform; c = r(c).replace(/\.{3}|\u2026/g, b._.transform || p); var d = a.parseTransformString(c), e = 0, f = 0, g = 0, h = 1, i = 1, j = b._, k = new bQ; j.transform = d || []; if (d) for (var l = 0, m = d.length; l < m; l++) { var n = d[l], o = n.length, q = r(n[0]).toLowerCase(), s = n[0] != q, t = s ? k.invert() : 0, u, v, w, x, y; q == "t" && o == 3 ? s ? (u = t.x(0, 0), v = t.y(0, 0), w = t.x(n[1], n[2]), x = t.y(n[1], n[2]), k.translate(w - u, x - v)) : k.translate(n[1], n[2]) : q == "r" ? o == 2 ? (y = y || b.getBBox(1), k.rotate(n[1], y.x + y.width / 2, y.y + y.height / 2), e += n[1]) : o == 4 && (s ? (w = t.x(n[2], n[3]), x = t.y(n[2], n[3]), k.rotate(n[1], w, x)) : k.rotate(n[1], n[2], n[3]), e += n[1]) : q == "s" ? o == 2 || o == 3 ? (y = y || b.getBBox(1), k.scale(n[1], n[o - 1], y.x + y.width / 2, y.y + y.height / 2), h *= n[1], i *= n[o - 1]) : o == 5 && (s ? (w = t.x(n[3], n[4]), x = t.y(n[3], n[4]), k.scale(n[1], n[2], w, x)) : k.scale(n[1], n[2], n[3], n[4]), h *= n[1], i *= n[2]) : q == "m" && o == 7 && k.add(n[1], n[2], n[3], n[4], n[5], n[6]), j.dirtyT = 1, b.matrix = k } b.matrix = k, j.sx = h, j.sy = i, j.deg = e, j.dx = f = k.e, j.dy = g = k.f, h == 1 && i == 1 && !e && j.bbox ? (j.bbox.x += +f, j.bbox.y += +g) : j.dirtyT = 1 }, bO = function (a) { var b = a[0]; switch (b.toLowerCase()) { case "t": return [b, 0, 0]; case "m": return [b, 1, 0, 0, 1, 0, 0]; case "r": return a.length == 4 ? [b, 0, a[2], a[3]] : [b, 0]; case "s": return a.length == 5 ? [b, 1, 1, a[3], a[4]] : a.length == 3 ? [b, 1, 1] : [b, 1] } }, bP = a._equaliseTransform = function (b, c) { c = r(c).replace(/\.{3}|\u2026/g, b), b = a.parseTransformString(b) || [], c = a.parseTransformString(c) || []; var d = x(b.length, c.length), e = [], f = [], g = 0, h, i, j, k; for (; g < d; g++) { j = b[g] || bO(c[g]), k = c[g] || bO(j); if (j[0] != k[0] || j[0].toLowerCase() == "r" && (j[2] != k[2] || j[3] != k[3]) || j[0].toLowerCase() == "s" && (j[3] != k[3] || j[4] != k[4])) return; e[g] = [], f[g] = []; for (h = 0, i = x(j.length, k.length); h < i; h++) h in j && (e[g][h] = j[h]), h in k && (f[g][h] = k[h]) } return { from: e, to: f} }; a._getContainer = function (b, c, d, e) { var f; f = e == null && !a.is(b, "object") ? h.doc.getElementById(b) : b; if (f != null) { if (f.tagName) return c == null ? { container: f, width: f.style.pixelWidth || f.offsetWidth, height: f.style.pixelHeight || f.offsetHeight} : { container: f, width: c, height: d }; return { container: 1, x: b, y: c, width: d, height: e} } }, a.pathToRelative = bz, a._engine = {}, a.path2curve = bG, a.matrix = function (a, b, c, d, e, f) { return new bQ(a, b, c, d, e, f) }, function (b) { function d(a) { var b = w.sqrt(c(a)); a[0] && (a[0] /= b), a[1] && (a[1] /= b) } function c(a) { return a[0] * a[0] + a[1] * a[1] } b.add = function (a, b, c, d, e, f) { var g = [[], [], []], h = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], i = [[a, c, e], [b, d, f], [0, 0, 1]], j, k, l, m; a && a instanceof bQ && (i = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]); for (j = 0; j < 3; j++) for (k = 0; k < 3; k++) { m = 0; for (l = 0; l < 3; l++) m += h[j][l] * i[l][k]; g[j][k] = m } this.a = g[0][0], this.b = g[1][0], this.c = g[0][1], this.d = g[1][1], this.e = g[0][2], this.f = g[1][2] }, b.invert = function () { var a = this, b = a.a * a.d - a.b * a.c; return new bQ(a.d / b, -a.b / b, -a.c / b, a.a / b, (a.c * a.f - a.d * a.e) / b, (a.b * a.e - a.a * a.f) / b) }, b.clone = function () { return new bQ(this.a, this.b, this.c, this.d, this.e, this.f) }, b.translate = function (a, b) { this.add(1, 0, 0, 1, a, b) }, b.scale = function (a, b, c, d) { b == null && (b = a), (c || d) && this.add(1, 0, 0, 1, c, d), this.add(a, 0, 0, b, 0, 0), (c || d) && this.add(1, 0, 0, 1, -c, -d) }, b.rotate = function (b, c, d) { b = a.rad(b), c = c || 0, d = d || 0; var e = +w.cos(b).toFixed(9), f = +w.sin(b).toFixed(9); this.add(e, f, -f, e, c, d), this.add(1, 0, 0, 1, -c, -d) }, b.x = function (a, b) { return a * this.a + b * this.c + this.e }, b.y = function (a, b) { return a * this.b + b * this.d + this.f }, b.get = function (a) { return +this[r.fromCharCode(97 + a)].toFixed(4) }, b.toString = function () { return a.svg ? "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join() }, b.toFilter = function () { return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')" }, b.offset = function () { return [this.e.toFixed(4), this.f.toFixed(4)] }, b.split = function () { var b = {}; b.dx = this.e, b.dy = this.f; var e = [[this.a, this.c], [this.b, this.d]]; b.scalex = w.sqrt(c(e[0])), d(e[0]), b.shear = e[0][0] * e[1][0] + e[0][1] * e[1][1], e[1] = [e[1][0] - e[0][0] * b.shear, e[1][1] - e[0][1] * b.shear], b.scaley = w.sqrt(c(e[1])), d(e[1]), b.shear /= b.scaley; var f = -e[0][1], g = e[1][1]; g < 0 ? (b.rotate = a.deg(w.acos(g)), f < 0 && (b.rotate = 360 - b.rotate)) : b.rotate = a.deg(w.asin(f)), b.isSimple = ! +b.shear.toFixed(9) && (b.scalex.toFixed(9) == b.scaley.toFixed(9) || !b.rotate), b.isSuperSimple = ! +b.shear.toFixed(9) && b.scalex.toFixed(9) == b.scaley.toFixed(9) && !b.rotate, b.noRotation = ! +b.shear.toFixed(9) && !b.rotate; return b }, b.toTransformString = function (a) { var b = a || this[s](); if (b.isSimple) { b.scalex = +b.scalex.toFixed(4), b.scaley = +b.scaley.toFixed(4), b.rotate = +b.rotate.toFixed(4); return (b.dx && b.dy ? "t" + [b.dx, b.dy] : p) + (b.scalex != 1 || b.scaley != 1 ? "s" + [b.scalex, b.scaley, 0, 0] : p) + (b.rotate ? "r" + [b.rotate, 0, 0] : p) } return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)] } } (bQ.prototype); var bR = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); navigator.vendor == "Apple Computer, Inc." && (bR && bR[1] < 4 || navigator.platform.slice(0, 2) == "iP") || navigator.vendor == "Google Inc." && bR && bR[1] < 8 ? k.safari = function () { var a = this.rect(-99, -99, this.width + 99, this.height + 99).attr({ stroke: "none" }); setTimeout(function () { a.remove() }) } : k.safari = bd; var bS = function () { this.returnValue = !1 }, bT = function () { return this.originalEvent.preventDefault() }, bU = function () { this.cancelBubble = !0 }, bV = function () { return this.originalEvent.stopPropagation() }, bW = function () { if (h.doc.addEventListener) return function (a, b, c, d) { var e = o && u[b] ? u[b] : b, f = function (e) { var f = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, i = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, j = e.clientX + i, k = e.clientY + f; if (o && u[g](b)) for (var l = 0, m = e.targetTouches && e.targetTouches.length; l < m; l++) if (e.targetTouches[l].target == a) { var n = e; e = e.targetTouches[l], e.originalEvent = n, e.preventDefault = bT, e.stopPropagation = bV; break } return c.call(d, e, j, k) }; a.addEventListener(e, f, !1); return function () { a.removeEventListener(e, f, !1); return !0 } }; if (h.doc.attachEvent) return function (a, b, c, d) { var e = function (a) { a = a || h.win.event; var b = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, f = a.clientX + e, g = a.clientY + b; a.preventDefault = a.preventDefault || bS, a.stopPropagation = a.stopPropagation || bU; return c.call(d, a, f, g) }; a.attachEvent("on" + b, e); var f = function () { a.detachEvent("on" + b, e); return !0 }; return f } } (), bX = [], bY = function (a) { var b = a.clientX, c = a.clientY, d = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, f, g = bX.length; while (g--) { f = bX[g]; if (o) { var i = a.touches.length, j; while (i--) { j = a.touches[i]; if (j.identifier == f.el._drag.id) { b = j.clientX, c = j.clientY, (a.originalEvent ? a.originalEvent : a).preventDefault(); break } } } else a.preventDefault(); var k = f.el.node, l, m = k.nextSibling, n = k.parentNode, p = k.style.display; h.win.opera && n.removeChild(k), k.style.display = "none", l = f.el.paper.getElementByPoint(b, c), k.style.display = p, h.win.opera && (m ? n.insertBefore(k, m) : n.appendChild(k)), l && eve("drag.over." + f.el.id, f.el, l), b += e, c += d, eve("drag.move." + f.el.id, f.move_scope || f.el, b - f.el._drag.x, c - f.el._drag.y, b, c, a) } }, bZ = function (b) { a.unmousemove(bY).unmouseup(bZ); var c = bX.length, d; while (c--) d = bX[c], d.el._drag = {}, eve("drag.end." + d.el.id, d.end_scope || d.start_scope || d.move_scope || d.el, b); bX = [] }, b$ = a.el = {}; for (var b_ = t.length; b_--; ) (function (b) { a[b] = b$[b] = function (c, d) { a.is(c, "function") && (this.events = this.events || [], this.events.push({ name: b, f: c, unbind: bW(this.shape || this.node || h.doc, b, c, d || this) })); return this }, a["un" + b] = b$["un" + b] = function (a) { var c = this.events, d = c.length; while (d--) if (c[d].name == b && c[d].f == a) { c[d].unbind(), c.splice(d, 1), !c.length && delete this.events; return this } return this } })(t[b_]); b$.data = function (b, c) { var d = ba[this.id] = ba[this.id] || {}; if (arguments.length == 1) { if (a.is(b, "object")) { for (var e in b) b[g](e) && this.data(e, b[e]); return this } eve("data.get." + this.id, this, d[b], b); return d[b] } d[b] = c, eve("data.set." + this.id, this, c, b); return this }, b$.removeData = function (a) { a == null ? ba[this.id] = {} : ba[this.id] && delete ba[this.id][a]; return this }, b$.hover = function (a, b, c, d) { return this.mouseover(a, c).mouseout(b, d || c) }, b$.unhover = function (a, b) { return this.unmouseover(a).unmouseout(b) }; var ca = []; b$.drag = function (b, c, d, e, f, g) { function i(i) { (i.originalEvent || i).preventDefault(); var j = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, k = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; this._drag.x = i.clientX + k, this._drag.y = i.clientY + j, this._drag.id = i.identifier, !bX.length && a.mousemove(bY).mouseup(bZ), bX.push({ el: this, move_scope: e, start_scope: f, end_scope: g }), c && eve.on("drag.start." + this.id, c), b && eve.on("drag.move." + this.id, b), d && eve.on("drag.end." + this.id, d), eve("drag.start." + this.id, f || e || this, i.clientX + k, i.clientY + j, i) } this._drag = {}, ca.push({ el: this, start: i }), this.mousedown(i); return this }, b$.onDragOver = function (a) { a ? eve.on("drag.over." + this.id, a) : eve.unbind("drag.over." + this.id) }, b$.undrag = function () { var b = ca.length; while (b--) ca[b].el == this && (this.unmousedown(ca[b].start), ca.splice(b, 1), eve.unbind("drag.*." + this.id)); !ca.length && a.unmousemove(bY).unmouseup(bZ) }, k.circle = function (b, c, d) { var e = a._engine.circle(this, b || 0, c || 0, d || 0); this.__set__ && this.__set__.push(e); return e }, k.rect = function (b, c, d, e, f) { var g = a._engine.rect(this, b || 0, c || 0, d || 0, e || 0, f || 0); this.__set__ && this.__set__.push(g); return g }, k.ellipse = function (b, c, d, e) { var f = a._engine.ellipse(this, b || 0, c || 0, d || 0, e || 0); this.__set__ && this.__set__.push(f); return f }, k.path = function (b) { b && !a.is(b, D) && !a.is(b[0], E) && (b += p); var c = a._engine.path(a.format[m](a, arguments), this); this.__set__ && this.__set__.push(c); return c }, k.image = function (b, c, d, e, f) { var g = a._engine.image(this, b || "about:blank", c || 0, d || 0, e || 0, f || 0); this.__set__ && this.__set__.push(g); return g }, k.text = function (b, c, d) { var e = a._engine.text(this, b || 0, c || 0, r(d)); this.__set__ && this.__set__.push(e); return e }, k.set = function (b) { !a.is(b, "array") && (b = Array.prototype.splice.call(arguments, 0, arguments.length)); var c = new cs(b); this.__set__ && this.__set__.push(c); return c }, k.setStart = function (a) { this.__set__ = a || this.set() }, k.setFinish = function (a) { var b = this.__set__; delete this.__set__; return b }, k.setSize = function (b, c) { return a._engine.setSize.call(this, b, c) }, k.setViewBox = function (b, c, d, e, f) { return a._engine.setViewBox.call(this, b, c, d, e, f) }, k.top = k.bottom = null, k.raphael = a; var cb = function (a) { var b = a.getBoundingClientRect(), c = a.ownerDocument, d = c.body, e = c.documentElement, f = e.clientTop || d.clientTop || 0, g = e.clientLeft || d.clientLeft || 0, i = b.top + (h.win.pageYOffset || e.scrollTop || d.scrollTop) - f, j = b.left + (h.win.pageXOffset || e.scrollLeft || d.scrollLeft) - g; return { y: i, x: j} }; k.getElementByPoint = function (a, b) { var c = this, d = c.canvas, e = h.doc.elementFromPoint(a, b); if (h.win.opera && e.tagName == "svg") { var f = cb(d), g = d.createSVGRect(); g.x = a - f.x, g.y = b - f.y, g.width = g.height = 1; var i = d.getIntersectionList(g, null); i.length && (e = i[i.length - 1]) } if (!e) return null; while (e.parentNode && e != d.parentNode && !e.raphael) e = e.parentNode; e == c.canvas.parentNode && (e = d), e = e && e.raphael ? c.getById(e.raphaelid) : null; return e }, k.getById = function (a) { var b = this.bottom; while (b) { if (b.id == a) return b; b = b.next } return null }, k.forEach = function (a, b) { var c = this.bottom; while (c) { if (a.call(b, c) === !1) return this; c = c.next } return this }, b$.getBBox = function (a) { if (this.removed) return {}; var b = this._; if (a) { if (b.dirty || !b.bboxwt) this.realPath = bh[this.type](this), b.bboxwt = bx(this.realPath), b.bboxwt.toString = cd, b.dirty = 0; return b.bboxwt } if (b.dirty || b.dirtyT || !b.bbox) { if (b.dirty || !this.realPath) b.bboxwt = 0, this.realPath = bh[this.type](this); b.bbox = bx(bi(this.realPath, this.matrix)), b.bbox.toString = cd, b.dirty = b.dirtyT = 0 } return b.bbox }, b$.clone = function () { if (this.removed) return null; var a = this.paper[this.type]().attr(this.attr()); this.__set__ && this.__set__.push(a); return a }, b$.glow = function (a) { if (this.type == "text") return null; a = a || {}; var b = { width: (a.width || 10) + (+this.attr("stroke-width") || 1), fill: a.fill || !1, opacity: a.opacity || .5, offsetx: a.offsetx || 0, offsety: a.offsety || 0, color: a.color || "#000" }, c = b.width / 2, d = this.paper, e = d.set(), f = this.realPath || bh[this.type](this); f = this.matrix ? bi(f, this.matrix) : f; for (var g = 1; g < c + 1; g++) e.push(d.path(f).attr({ stroke: b.color, fill: b.fill ? b.color : "none", "stroke-linejoin": "round", "stroke-linecap": "round", "stroke-width": +(b.width / c * g).toFixed(3), opacity: +(b.opacity / c).toFixed(3) })); return e.insertBefore(this).translate(b.offsetx, b.offsety) }; var ce = {}, cf = function (b, c, d, e, f, g, h, i, j) { var k = 0, l = 100, m = [b, c, d, e, f, g, h, i].join(), n = ce[m], o, p; !n && (ce[m] = n = { data: [] }), n.timer && clearTimeout(n.timer), n.timer = setTimeout(function () { delete ce[m] }, 2e3); if (j != null && !n.precision) { var q = cf(b, c, d, e, f, g, h, i); n.precision = ~ ~q * 10, n.data = [] } l = n.precision || l; for (var r = 0; r < l + 1; r++) { n.data[r * l] ? p = n.data[r * l] : (p = a.findDotsAtSegment(b, c, d, e, f, g, h, i, r / l), n.data[r * l] = p), r && (k += A(A(o.x - p.x, 2) + A(o.y - p.y, 2), .5)); if (j != null && k >= j) return p; o = p } if (j == null) return k }, cg = function (b, c) { return function (d, e, f) { d = bG(d); var g, h, i, j, k = "", l = {}, m, n = 0; for (var o = 0, p = d.length; o < p; o++) { i = d[o]; if (i[0] == "M") g = +i[1], h = +i[2]; else { j = cf(g, h, i[1], i[2], i[3], i[4], i[5], i[6]); if (n + j > e) { if (c && !l.start) { m = cf(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n), k += ["C" + m.start.x, m.start.y, m.m.x, m.m.y, m.x, m.y]; if (f) return k; l.start = k, k = ["M" + m.x, m.y + "C" + m.n.x, m.n.y, m.end.x, m.end.y, i[5], i[6]].join(), n += j, g = +i[5], h = +i[6]; continue } if (!b && !c) { m = cf(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n); return { x: m.x, y: m.y, alpha: m.alpha} } } n += j, g = +i[5], h = +i[6] } k += i.shift() + i } l.end = k, m = b ? n : c ? l : a.findDotsAtSegment(g, h, i[0], i[1], i[2], i[3], i[4], i[5], 1), m.alpha && (m = { x: m.x, y: m.y, alpha: m.alpha }); return m } }, ch = cg(1), ci = cg(), cj = cg(0, 1); a.getTotalLength = ch, a.getPointAtLength = ci, a.getSubpath = function (a, b, c) { if (this.getTotalLength(a) - c < 1e-6) return cj(a, b).end; var d = cj(a, c, 1); return b ? cj(d, b).end : d }, b$.getTotalLength = function () { if (this.type == "path") { if (this.node.getTotalLength) return this.node.getTotalLength(); return ch(this.attrs.path) } }, b$.getPointAtLength = function (a) { if (this.type == "path") return ci(this.attrs.path, a) }, b$.getSubpath = function (b, c) { if (this.type == "path") return a.getSubpath(this.attrs.path, b, c) }; var ck = a.easing_formulas = { linear: function (a) { return a }, "<": function (a) { return A(a, 1.7) }, ">": function (a) { return A(a, .48) }, "<>": function (a) { var b = .48 - a / 1.04, c = w.sqrt(.1734 + b * b), d = c - b, e = A(z(d), 1 / 3) * (d < 0 ? -1 : 1), f = -c - b, g = A(z(f), 1 / 3) * (f < 0 ? -1 : 1), h = e + g + .5; return (1 - h) * 3 * h * h + h * h * h }, backIn: function (a) { var b = 1.70158; return a * a * ((b + 1) * a - b) }, backOut: function (a) { a = a - 1; var b = 1.70158; return a * a * ((b + 1) * a + b) + 1 }, elastic: function (a) { if (a == !!a) return a; return A(2, -10 * a) * w.sin((a - .075) * 2 * B / .3) + 1 }, bounce: function (a) { var b = 7.5625, c = 2.75, d; a < 1 / c ? d = b * a * a : a < 2 / c ? (a -= 1.5 / c, d = b * a * a + .75) : a < 2.5 / c ? (a -= 2.25 / c, d = b * a * a + .9375) : (a -= 2.625 / c, d = b * a * a + .984375); return d } }; ck.easeIn = ck["ease-in"] = ck["<"], ck.easeOut = ck["ease-out"] = ck[">"], ck.easeInOut = ck["ease-in-out"] = ck["<>"], ck["back-in"] = ck.backIn, ck["back-out"] = ck.backOut; var cl = [], cm = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { setTimeout(a, 16) }, cn = function () { var b = +(new Date), c = 0; for (; c < cl.length; c++) { var d = cl[c]; if (d.el.removed || d.paused) continue; var e = b - d.start, f = d.ms, h = d.easing, i = d.from, j = d.diff, k = d.to, l = d.t, m = d.el, o = {}, p, r = {}, s; d.initstatus ? (e = (d.initstatus * d.anim.top - d.prev) / (d.percent - d.prev) * f, d.status = d.initstatus, delete d.initstatus, d.stop && cl.splice(c--, 1)) : d.status = (d.prev + (d.percent - d.prev) * (e / f)) / d.anim.top; if (e < 0) continue; if (e < f) { var t = h(e / f); for (var u in i) if (i[g](u)) { switch (U[u]) { case C: p = +i[u] + t * f * j[u]; break; case "colour": p = "rgb(" + [co(O(i[u].r + t * f * j[u].r)), co(O(i[u].g + t * f * j[u].g)), co(O(i[u].b + t * f * j[u].b))].join(",") + ")"; break; case "path": p = []; for (var v = 0, w = i[u].length; v < w; v++) { p[v] = [i[u][v][0]]; for (var x = 1, y = i[u][v].length; x < y; x++) p[v][x] = +i[u][v][x] + t * f * j[u][v][x]; p[v] = p[v].join(q) } p = p.join(q); break; case "transform": if (j[u].real) { p = []; for (v = 0, w = i[u].length; v < w; v++) { p[v] = [i[u][v][0]]; for (x = 1, y = i[u][v].length; x < y; x++) p[v][x] = i[u][v][x] + t * f * j[u][v][x] } } else { var z = function (a) { return +i[u][a] + t * f * j[u][a] }; p = [["m", z(0), z(1), z(2), z(3), z(4), z(5)]] } break; case "csv": if (u == "clip-rect") { p = [], v = 4; while (v--) p[v] = +i[u][v] + t * f * j[u][v] } break; default: var A = [][n](i[u]); p = [], v = m.paper.customAttributes[u].length; while (v--) p[v] = +A[v] + t * f * j[u][v] } o[u] = p } m.attr(o), function (a, b, c) { setTimeout(function () { eve("anim.frame." + a, b, c) }) } (m.id, m, d.anim) } else { (function (b, c, d) { setTimeout(function () { eve("anim.frame." + c.id, c, d), eve("anim.finish." + c.id, c, d), a.is(b, "function") && b.call(c) }) })(d.callback, m, d.anim), m.attr(k), cl.splice(c--, 1); if (d.repeat > 1 && !d.next) { for (s in k) k[g](s) && (r[s] = d.totalOrigin[s]); d.el.attr(r), cr(d.anim, d.el, d.anim.percents[0], null, d.totalOrigin, d.repeat - 1) } d.next && !d.stop && cr(d.anim, d.el, d.next, null, d.totalOrigin, d.repeat) } } a.svg && m && m.paper && m.paper.safari(), cl.length && cm(cn) }, co = function (a) { return a > 255 ? 255 : a < 0 ? 0 : a }; b$.animateWith = function (b, c, d, e, f, g) { var h = d ? a.animation(d, e, f, g) : c, i = b.status(c); return this.animate(h).status(h, i * c.ms / h.ms) }, b$.onAnimation = function (a) { a ? eve.on("anim.frame." + this.id, a) : eve.unbind("anim.frame." + this.id); return this }, cq.prototype.delay = function (a) { var b = new cq(this.anim, this.ms); b.times = this.times, b.del = +a || 0; return b }, cq.prototype.repeat = function (a) { var b = new cq(this.anim, this.ms); b.del = this.del, b.times = w.floor(x(a, 0)) || 1; return b }, a.animation = function (b, c, d, e) { if (b instanceof cq) return b; if (a.is(d, "function") || !d) e = e || d || null, d = null; b = Object(b), c = +c || 0; var f = {}, h, i; for (i in b) b[g](i) && Q(i) != i && Q(i) + "%" != i && (h = !0, f[i] = b[i]); if (!h) return new cq(b, c); d && (f.easing = d), e && (f.callback = e); return new cq({ 100: f }, c) }, b$.animate = function (b, c, d, e) { var f = this; if (f.removed) { e && e.call(f); return f } var g = b instanceof cq ? b : a.animation(b, c, d, e); cr(g, f, g.percents[0], null, f.attr()); return f }, b$.setTime = function (a, b) { a && b != null && this.status(a, y(b, a.ms) / a.ms); return this }, b$.status = function (a, b) { var c = [], d = 0, e, f; if (b != null) { cr(a, this, -1, y(b, 1)); return this } e = cl.length; for (; d < e; d++) { f = cl[d]; if (f.el.id == this.id && (!a || f.anim == a)) { if (a) return f.status; c.push({ anim: f.anim, status: f.status }) } } if (a) return 0; return c }, b$.pause = function (a) { for (var b = 0; b < cl.length; b++) cl[b].el.id == this.id && (!a || cl[b].anim == a) && eve("anim.pause." + this.id, this, cl[b].anim) !== !1 && (cl[b].paused = !0); return this }, b$.resume = function (a) { for (var b = 0; b < cl.length; b++) if (cl[b].el.id == this.id && (!a || cl[b].anim == a)) { var c = cl[b]; eve("anim.resume." + this.id, this, c.anim) !== !1 && (delete c.paused, this.status(c.anim, c.status)) } return this }, b$.stop = function (a) { for (var b = 0; b < cl.length; b++) cl[b].el.id == this.id && (!a || cl[b].anim == a) && eve("anim.stop." + this.id, this, cl[b].anim) !== !1 && cl.splice(b--, 1); return this }, b$.toString = function () { return "Raphaël’s object" }; var cs = function (a) { this.items = [], this.length = 0, this.type = "set"; if (a) for (var b = 0, c = a.length; b < c; b++) a[b] && (a[b].constructor == b$.constructor || a[b].constructor == cs) && (this[this.items.length] = this.items[this.items.length] = a[b], this.length++) }, ct = cs.prototype; ct.push = function () { var a, b; for (var c = 0, d = arguments.length; c < d; c++) a = arguments[c], a && (a.constructor == b$.constructor || a.constructor == cs) && (b = this.items.length, this[b] = this.items[b] = a, this.length++); return this }, ct.pop = function () { this.length && delete this[this.length--]; return this.items.pop() }, ct.forEach = function (a, b) { for (var c = 0, d = this.items.length; c < d; c++) if (a.call(b, this.items[c], c) === !1) return this; return this }; for (var cu in b$) b$[g](cu) && (ct[cu] = function (a) { return function () { var b = arguments; return this.forEach(function (c) { c[a][m](c, b) }) } } (cu)); ct.attr = function (b, c) { if (b && a.is(b, E) && a.is(b[0], "object")) for (var d = 0, e = b.length; d < e; d++) this.items[d].attr(b[d]); else for (var f = 0, g = this.items.length; f < g; f++) this.items[f].attr(b, c); return this }, ct.clear = function () { while (this.length) this.pop() }, ct.splice = function (a, b, c) { a = a < 0 ? x(this.length + a, 0) : a, b = x(0, y(this.length - a, b)); var d = [], e = [], f = [], g; for (g = 2; g < arguments.length; g++) f.push(arguments[g]); for (g = 0; g < b; g++) e.push(this[a + g]); for (; g < this.length - a; g++) d.push(this[a + g]); var h = f.length; for (g = 0; g < h + d.length; g++) this.items[a + g] = this[a + g] = g < h ? f[g] : d[g - h]; g = this.items.length = this.length -= b - h; while (this[g]) delete this[g++]; return new cs(e) }, ct.exclude = function (a) { for (var b = 0, c = this.length; b < c; b++) if (this[b] == a) { this.splice(b, 1); return !0 } }, ct.animate = function (b, c, d, e) { (a.is(d, "function") || !d) && (e = d || null); var f = this.items.length, g = f, h, i = this, j; if (!f) return this; e && (j = function () { ! --f && e.call(i) }), d = a.is(d, D) ? d : j; var k = a.animation(b, c, d, j); h = this.items[--g].animate(k); while (g--) this.items[g] && !this.items[g].removed && this.items[g].animateWith(h, k); return this }, ct.insertAfter = function (a) { var b = this.items.length; while (b--) this.items[b].insertAfter(a); return this }, ct.getBBox = function () { var a = [], b = [], c = [], d = []; for (var e = this.items.length; e--; ) if (!this.items[e].removed) { var f = this.items[e].getBBox(); a.push(f.x), b.push(f.y), c.push(f.x + f.width), d.push(f.y + f.height) } a = y[m](0, a), b = y[m](0, b); return { x: a, y: b, width: x[m](0, c) - a, height: x[m](0, d) - b} }, ct.clone = function (a) { a = new cs; for (var b = 0, c = this.items.length; b < c; b++) a.push(this.items[b].clone()); return a }, ct.toString = function () { return "Raphaël‘s set" }, a.registerFont = function (a) { if (!a.face) return a; this.fonts = this.fonts || {}; var b = { w: a.w, face: {}, glyphs: {} }, c = a.face["font-family"]; for (var d in a.face) a.face[g](d) && (b.face[d] = a.face[d]); this.fonts[c] ? this.fonts[c].push(b) : this.fonts[c] = [b]; if (!a.svg) { b.face["units-per-em"] = R(a.face["units-per-em"], 10); for (var e in a.glyphs) if (a.glyphs[g](e)) { var f = a.glyphs[e]; b.glyphs[e] = { w: f.w, k: {}, d: f.d && "M" + f.d.replace(/[mlcxtrv]/g, function (a) { return { l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[a] || "M" }) + "z" }; if (f.k) for (var h in f.k) f[g](h) && (b.glyphs[e].k[h] = f.k[h]) } } return a }, k.getFont = function (b, c, d, e) { e = e || "normal", d = d || "normal", c = +c || { normal: 400, bold: 700, lighter: 300, bolder: 800}[c] || 400; if (!!a.fonts) { var f = a.fonts[b]; if (!f) { var h = new RegExp("(^|\\s)" + b.replace(/[^\w\d\s+!~.:_-]/g, p) + "(\\s|$)", "i"); for (var i in a.fonts) if (a.fonts[g](i) && h.test(i)) { f = a.fonts[i]; break } } var j; if (f) for (var k = 0, l = f.length; k < l; k++) { j = f[k]; if (j.face["font-weight"] == c && (j.face["font-style"] == d || !j.face["font-style"]) && j.face["font-stretch"] == e) break } return j } }, k.print = function (b, d, e, f, g, h, i) { h = h || "middle", i = x(y(i || 0, 1), -1); var j = this.set(), k = r(e)[s](p), l = 0, m = p, n; a.is(f, e) && (f = this.getFont(f)); if (f) { n = (g || 16) / f.face["units-per-em"]; var o = f.face.bbox[s](c), q = +o[0], t = +o[1] + (h == "baseline" ? o[3] - o[1] + +f.face.descent : (o[3] - o[1]) / 2); for (var u = 0, v = k.length; u < v; u++) { var w = u && f.glyphs[k[u - 1]] || {}, z = f.glyphs[k[u]]; l += u ? (w.w || f.w) + (w.k && w.k[k[u]] || 0) + f.w * i : 0, z && z.d && j.push(this.path(z.d).attr({ fill: "#000", stroke: "none", transform: [["t", l * n, 0]] })) } j.transform(["...s", n, n, q, t, "t", (b - q) / n, (d - t) / n]) } return j }, k.add = function (b) { if (a.is(b, "array")) { var c = this.set(), e = 0, f = b.length, h; for (; e < f; e++) h = b[e] || {}, d[g](h.type) && c.push(this[h.type]().attr(h)) } return c }, a.format = function (b, c) { var d = a.is(c, E) ? [0][n](c) : arguments; b && a.is(b, D) && d.length - 1 && (b = b.replace(e, function (a, b) { return d[++b] == null ? p : d[b] })); return b || p }, a.fullfill = function () { var a = /\{([^\}]+)\}/g, b = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, c = function (a, c, d) { var e = d; c.replace(b, function (a, b, c, d, f) { b = b || d, e && (b in e && (e = e[b]), typeof e == "function" && f && (e = e())) }), e = (e == null || e == d ? a : e) + ""; return e }; return function (b, d) { return String(b).replace(a, function (a, b) { return c(a, b, d) }) } } (), a.ninja = function () { i.was ? h.win.Raphael = i.is : delete Raphael; return a }, a.st = ct, function (b, c, d) { function e() { /in/.test(b.readyState) ? setTimeout(e, 9) : a.eve("DOMload") } b.readyState == null && b.addEventListener && (b.addEventListener(c, d = function () { b.removeEventListener(c, d, !1), b.readyState = "complete" }, !1), b.readyState = "loading"), e() } (document, "DOMContentLoaded"), i.was ? h.win.Raphael = a : Raphael = a, eve.on("DOMload", function () { b = !0 }) } (), window.Raphael.svg && function (a) { var b = "hasOwnProperty", c = String, d = parseFloat, e = parseInt, f = Math, g = f.max, h = f.abs, i = f.pow, j = /[, ]+/, k = a.eve, l = "", m = " ", n = "http://www.w3.org/1999/xlink", o = { block: "M5,0 0,2.5 5,5z", classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", open: "M6,1 1,3.5 6,6", oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" }, p = {}; a.toString = function () { return "Your browser supports SVG.\nYou are running Raphaël " + this.version }; var q = function (d, e) { if (e) { typeof d == "string" && (d = q(d)); for (var f in e) e[b](f) && (f.substring(0, 6) == "xlink:" ? d.setAttributeNS(n, f.substring(6), c(e[f])) : d.setAttribute(f, c(e[f]))) } else d = a._g.doc.createElementNS("http://www.w3.org/2000/svg", d), d.style && (d.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); return d }, r = function (b, e) { var j = "linear", k = b.id + e, m = .5, n = .5, o = b.node, p = b.paper, r = o.style, s = a._g.doc.getElementById(k); if (!s) { e = c(e).replace(a._radial_gradient, function (a, b, c) { j = "radial"; if (b && c) { m = d(b), n = d(c); var e = (n > .5) * 2 - 1; i(m - .5, 2) + i(n - .5, 2) > .25 && (n = f.sqrt(.25 - i(m - .5, 2)) * e + .5) && n != .5 && (n = n.toFixed(5) - 1e-5 * e) } return l }), e = e.split(/\s*\-\s*/); if (j == "linear") { var t = e.shift(); t = -d(t); if (isNaN(t)) return null; var u = [0, 0, f.cos(a.rad(t)), f.sin(a.rad(t))], v = 1 / (g(h(u[2]), h(u[3])) || 1); u[2] *= v, u[3] *= v, u[2] < 0 && (u[0] = -u[2], u[2] = 0), u[3] < 0 && (u[1] = -u[3], u[3] = 0) } var w = a._parseDots(e); if (!w) return null; k = k.replace(/[\(\)\s,\xb0#]/g, "_"), b.gradient && k != b.gradient.id && (p.defs.removeChild(b.gradient), delete b.gradient); if (!b.gradient) { s = q(j + "Gradient", { id: k }), b.gradient = s, q(s, j == "radial" ? { fx: m, fy: n} : { x1: u[0], y1: u[1], x2: u[2], y2: u[3], gradientTransform: b.matrix.invert() }), p.defs.appendChild(s); for (var x = 0, y = w.length; x < y; x++) s.appendChild(q("stop", { offset: w[x].offset ? w[x].offset : x ? "100%" : "0%", "stop-color": w[x].color || "#fff" })) } } q(o, { fill: "url(#" + k + ")", opacity: 1, "fill-opacity": 1 }), r.fill = l, r.opacity = 1, r.fillOpacity = 1; return 1 }, s = function (a) { var b = a.getBBox(1); q(a.pattern, { patternTransform: a.matrix.invert() + " translate(" + b.x + "," + b.y + ")" }) }, t = function (d, e, f) { if (d.type == "path") { var g = c(e).toLowerCase().split("-"), h = d.paper, i = f ? "end" : "start", j = d.node, k = d.attrs, l = k["stroke-width"], n = g.length, r = "classic", s, t, u, v, w, x = 3, y = 3, z = 5; while (n--) switch (g[n]) { case "block": case "classic": case "oval": case "diamond": case "open": case "none": r = g[n]; break; case "wide": y = 5; break; case "narrow": y = 2; break; case "long": x = 5; break; case "short": x = 2 } r == "open" ? (x += 2, y += 2, z += 2, u = 1, v = f ? 4 : 1, w = { fill: "none", stroke: k.stroke }) : (v = u = x / 2, w = { fill: k.stroke, stroke: "none" }), d._.arrows ? f ? (d._.arrows.endPath && p[d._.arrows.endPath]--, d._.arrows.endMarker && p[d._.arrows.endMarker]--) : (d._.arrows.startPath && p[d._.arrows.startPath]--, d._.arrows.startMarker && p[d._.arrows.startMarker]--) : d._.arrows = {}; if (r != "none") { var A = "raphael-marker-" + r, B = "raphael-marker-" + i + r + x + y; a._g.doc.getElementById(A) ? p[A]++ : (h.defs.appendChild(q(q("path"), { "stroke-linecap": "round", d: o[r], id: A })), p[A] = 1); var C = a._g.doc.getElementById(B), D; C ? (p[B]++, D = C.getElementsByTagName("use")[0]) : (C = q(q("marker"), { id: B, markerHeight: y, markerWidth: x, orient: "auto", refX: v, refY: y / 2 }), D = q(q("use"), { "xlink:href": "#" + A, transform: (f ? " rotate(180 " + x / 2 + " " + y / 2 + ") " : m) + "scale(" + x / z + "," + y / z + ")", "stroke-width": 1 / ((x / z + y / z) / 2) }), C.appendChild(D), h.defs.appendChild(C), p[B] = 1), q(D, w); var E = u * (r != "diamond" && r != "oval"); f ? (s = d._.arrows.startdx * l || 0, t = a.getTotalLength(k.path) - E * l) : (s = E * l, t = a.getTotalLength(k.path) - (d._.arrows.enddx * l || 0)), w = {}, w["marker-" + i] = "url(#" + B + ")"; if (t || s) w.d = Raphael.getSubpath(k.path, s, t); q(j, w), d._.arrows[i + "Path"] = A, d._.arrows[i + "Marker"] = B, d._.arrows[i + "dx"] = E, d._.arrows[i + "Type"] = r, d._.arrows[i + "String"] = e } else f ? (s = d._.arrows.startdx * l || 0, t = a.getTotalLength(k.path) - s) : (s = 0, t = a.getTotalLength(k.path) - (d._.arrows.enddx * l || 0)), d._.arrows[i + "Path"] && q(j, { d: Raphael.getSubpath(k.path, s, t) }), delete d._.arrows[i + "Path"], delete d._.arrows[i + "Marker"], delete d._.arrows[i + "dx"], delete d._.arrows[i + "Type"], delete d._.arrows[i + "String"]; for (w in p) if (p[b](w) && !p[w]) { var F = a._g.doc.getElementById(w); F && F.parentNode.removeChild(F) } } }, u = { "": [0], none: [0], "-": [3, 1], ".": [1, 1], "-.": [3, 1, 1, 1], "-..": [3, 1, 1, 1, 1, 1], ". ": [1, 3], "- ": [4, 3], "--": [8, 3], "- .": [4, 3, 1, 3], "--.": [8, 3, 1, 3], "--..": [8, 3, 1, 3, 1, 3] }, v = function (a, b, d) { b = u[c(b).toLowerCase()]; if (b) { var e = a.attrs["stroke-width"] || "1", f = { round: e, square: e, butt: 0}[a.attrs["stroke-linecap"] || d["stroke-linecap"]] || 0, g = [], h = b.length; while (h--) g[h] = b[h] * e + (h % 2 ? 1 : -1) * f; q(a.node, { "stroke-dasharray": g.join(",") }) } }, w = function (d, f) { var i = d.node, k = d.attrs, m = i.style.visibility; i.style.visibility = "hidden"; for (var o in f) if (f[b](o)) { if (!a._availableAttrs[b](o)) continue; var p = f[o]; k[o] = p; switch (o) { case "blur": d.blur(p); break; case "href": case "title": case "target": var u = i.parentNode; if (u.tagName.toLowerCase() != "a") { var w = q("a"); u.insertBefore(w, i), w.appendChild(i), u = w } o == "target" && p == "blank" ? u.setAttributeNS(n, "show", "new") : u.setAttributeNS(n, o, p); break; case "cursor": i.style.cursor = p; break; case "transform": d.transform(p); break; case "arrow-start": t(d, p); break; case "arrow-end": t(d, p, 1); break; case "clip-rect": var x = c(p).split(j); if (x.length == 4) { d.clip && d.clip.parentNode.parentNode.removeChild(d.clip.parentNode); var z = q("clipPath"), A = q("rect"); z.id = a.createUUID(), q(A, { x: x[0], y: x[1], width: x[2], height: x[3] }), z.appendChild(A), d.paper.defs.appendChild(z), q(i, { "clip-path": "url(#" + z.id + ")" }), d.clip = A } if (!p) { var B = i.getAttribute("clip-path"); if (B) { var C = a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g, l)); C && C.parentNode.removeChild(C), q(i, { "clip-path": l }), delete d.clip } } break; case "path": d.type == "path" && (q(i, { d: p ? k.path = a._pathToAbsolute(p) : "M0,0" }), d._.dirty = 1, d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1))); break; case "width": i.setAttribute(o, p), d._.dirty = 1; if (k.fx) o = "x", p = k.x; else break; case "x": k.fx && (p = -k.x - (k.width || 0)); case "rx": if (o == "rx" && d.type == "rect") break; case "cx": i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case "height": i.setAttribute(o, p), d._.dirty = 1; if (k.fy) o = "y", p = k.y; else break; case "y": k.fy && (p = -k.y - (k.height || 0)); case "ry": if (o == "ry" && d.type == "rect") break; case "cy": i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case "r": d.type == "rect" ? q(i, { rx: p, ry: p }) : i.setAttribute(o, p), d._.dirty = 1; break; case "src": d.type == "image" && i.setAttributeNS(n, "href", p); break; case "stroke-width": if (d._.sx != 1 || d._.sy != 1) p /= g(h(d._.sx), h(d._.sy)) || 1; d.paper._vbSize && (p *= d.paper._vbSize), i.setAttribute(o, p), k["stroke-dasharray"] && v(d, k["stroke-dasharray"], f), d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1)); break; case "stroke-dasharray": v(d, p, f); break; case "fill": var D = c(p).match(a._ISURL); if (D) { z = q("pattern"); var F = q("image"); z.id = a.createUUID(), q(z, { x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1 }), q(F, { x: 0, y: 0, "xlink:href": D[1] }), z.appendChild(F), function (b) { a._preload(D[1], function () { var a = this.offsetWidth, c = this.offsetHeight; q(b, { width: a, height: c }), q(F, { width: a, height: c }), d.paper.safari() }) } (z), d.paper.defs.appendChild(z), i.style.fill = "url(#" + z.id + ")", q(i, { fill: "url(#" + z.id + ")" }), d.pattern = z, d.pattern && s(d); break } var G = a.getRGB(p); if (!G.error) delete f.gradient, delete k.gradient, !a.is(k.opacity, "undefined") && a.is(f.opacity, "undefined") && q(i, { opacity: k.opacity }), !a.is(k["fill-opacity"], "undefined") && a.is(f["fill-opacity"], "undefined") && q(i, { "fill-opacity": k["fill-opacity"] }); else if ((d.type == "circle" || d.type == "ellipse" || c(p).charAt() != "r") && r(d, p)) { if ("opacity" in k || "fill-opacity" in k) { var H = a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g, l)); if (H) { var I = H.getElementsByTagName("stop"); q(I[I.length - 1], { "stop-opacity": ("opacity" in k ? k.opacity : 1) * ("fill-opacity" in k ? k["fill-opacity"] : 1) }) } } k.gradient = p, k.fill = "none"; break } G[b]("opacity") && q(i, { "fill-opacity": G.opacity > 1 ? G.opacity / 100 : G.opacity }); case "stroke": G = a.getRGB(p), i.setAttribute(o, G.hex), o == "stroke" && G[b]("opacity") && q(i, { "stroke-opacity": G.opacity > 1 ? G.opacity / 100 : G.opacity }), o == "stroke" && d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1)); break; case "gradient": (d.type == "circle" || d.type == "ellipse" || c(p).charAt() != "r") && r(d, p); break; case "opacity": k.gradient && !k[b]("stroke-opacity") && q(i, { "stroke-opacity": p > 1 ? p / 100 : p }); case "fill-opacity": if (k.gradient) { H = a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g, l)), H && (I = H.getElementsByTagName("stop"), q(I[I.length - 1], { "stop-opacity": p })); break }; default: o == "font-size" && (p = e(p, 10) + "px"); var J = o.replace(/(\-.)/g, function (a) { return a.substring(1).toUpperCase() }); i.style[J] = p, d._.dirty = 1, i.setAttribute(o, p) } } y(d, f), i.style.visibility = m }, x = 1.2, y = function (d, f) { if (d.type == "text" && !!(f[b]("text") || f[b]("font") || f[b]("font-size") || f[b]("x") || f[b]("y"))) { var g = d.attrs, h = d.node, i = h.firstChild ? e(a._g.doc.defaultView.getComputedStyle(h.firstChild, l).getPropertyValue("font-size"), 10) : 10; if (f[b]("text")) { g.text = f.text; while (h.firstChild) h.removeChild(h.firstChild); var j = c(f.text).split("\n"), k = [], m; for (var n = 0, o = j.length; n < o; n++) m = q("tspan"), n && q(m, { dy: i * x, x: g.x }), m.appendChild(a._g.doc.createTextNode(j[n])), h.appendChild(m), k[n] = m } else { k = h.getElementsByTagName("tspan"); for (n = 0, o = k.length; n < o; n++) n ? q(k[n], { dy: i * x, x: g.x }) : q(k[0], { dy: 0 }) } q(h, { x: g.x, y: g.y }), d._.dirty = 1; var p = d._getBBox(), r = g.y - (p.y + p.height / 2); r && a.is(r, "finite") && q(k[0], { dy: r }) } }, z = function (b, c) { var d = 0, e = 0; this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.matrix = a.matrix(), this.realPath = null, this.paper = c, this.attrs = this.attrs || {}, this._ = { transform: [], sx: 1, sy: 1, deg: 0, dx: 0, dy: 0, dirty: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null }, A = a.el; z.prototype = A, A.constructor = z, a._engine.path = function (a, b) { var c = q("path"); b.canvas && b.canvas.appendChild(c); var d = new z(c, b); d.type = "path", w(d, { fill: "none", stroke: "#000", path: a }); return d }, A.rotate = function (a, b, e) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); if (b == null || e == null) { var f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2 } this.transform(this._.transform.concat([["r", a, b, e]])); return this }, A.scale = function (a, b, e, f) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3])), a = d(a[0]), b == null && (b = a), f == null && (e = f); if (e == null || f == null) var g = this.getBBox(1); e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([["s", a, b, e, f]])); return this }, A.translate = function (a, b) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this.transform(this._.transform.concat([["t", a, b]])); return this }, A.transform = function (c) { var d = this._; if (c == null) return d.transform; a._extractTransform(this, c), this.clip && q(this.clip, { transform: this.matrix.invert() }), this.pattern && s(this), this.node && q(this.node, { transform: this.matrix }); if (d.sx != 1 || d.sy != 1) { var e = this.attrs[b]("stroke-width") ? this.attrs["stroke-width"] : 1; this.attr({ "stroke-width": e }) } return this }, A.hide = function () { !this.removed && this.paper.safari(this.node.style.display = "none"); return this }, A.show = function () { !this.removed && this.paper.safari(this.node.style.display = ""); return this }, A.remove = function () { if (!this.removed) { var b = this.paper; b.__set__ && b.__set__.exclude(this), k.unbind("*.*." + this.id), this.gradient && b.defs.removeChild(this.gradient), a._tear(this, b), this.node.parentNode.removeChild(this.node); for (var c in this) this[c] = typeof this[c] == "function" ? a._removedFactory(c) : null; this.removed = !0 } }, A._getBBox = function () { if (this.node.style.display == "none") { this.show(); var a = !0 } var b = {}; try { b = this.node.getBBox() } catch (c) { } finally { b = b || {} } a && this.hide(); return b }, A.attr = function (c, d) { if (this.removed) return this; if (c == null) { var e = {}; for (var f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); e.gradient && e.fill == "none" && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; return e } if (d == null && a.is(c, "string")) { if (c == "fill" && this.attrs.fill == "none" && this.attrs.gradient) return this.attrs.gradient; if (c == "transform") return this._.transform; var g = c.split(j), h = {}; for (var i = 0, l = g.length; i < l; i++) c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], "function") ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; return l - 1 ? h : h[g[0]] } if (d == null && a.is(c, "array")) { h = {}; for (i = 0, l = c.length; i < l; i++) h[c[i]] = this.attr(c[i]); return h } if (d != null) { var m = {}; m[c] = d } else c != null && a.is(c, "object") && (m = c); for (var n in m) k("attr." + n + "." + this.id, this, m[n]); for (n in this.paper.customAttributes) if (this.paper.customAttributes[b](n) && m[b](n) && a.is(this.paper.customAttributes[n], "function")) { var o = this.paper.customAttributes[n].apply(this, [].concat(m[n])); this.attrs[n] = m[n]; for (var p in o) o[b](p) && (m[p] = o[p]) } w(this, m); return this }, A.toFront = function () { if (this.removed) return this; this.node.parentNode.tagName.toLowerCase() == "a" ? this.node.parentNode.parentNode.appendChild(this.node.parentNode) : this.node.parentNode.appendChild(this.node); var b = this.paper; b.top != this && a._tofront(this, b); return this }, A.toBack = function () { if (this.removed) return this; var b = this.node.parentNode; b.tagName.toLowerCase() == "a" ? b.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild) : b.firstChild != this.node && b.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper); var c = this.paper; return this }, A.insertAfter = function (b) { if (this.removed) return this; var c = b.node || b[b.length - 1].node; c.nextSibling ? c.parentNode.insertBefore(this.node, c.nextSibling) : c.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); return this }, A.insertBefore = function (b) { if (this.removed) return this; var c = b.node || b[0].node; c.parentNode.insertBefore(this.node, c), a._insertbefore(this, b, this.paper); return this }, A.blur = function (b) { var c = this; if (+b !== 0) { var d = q("filter"), e = q("feGaussianBlur"); c.attrs.blur = b, d.id = a.createUUID(), q(e, { stdDeviation: +b || 1.5 }), d.appendChild(e), c.paper.defs.appendChild(d), c._blur = d, q(c.node, { filter: "url(#" + d.id + ")" }) } else c._blur && (c._blur.parentNode.removeChild(c._blur), delete c._blur, delete c.attrs.blur), c.node.removeAttribute("filter") }, a._engine.circle = function (a, b, c, d) { var e = q("circle"); a.canvas && a.canvas.appendChild(e); var f = new z(e, a); f.attrs = { cx: b, cy: c, r: d, fill: "none", stroke: "#000" }, f.type = "circle", q(e, f.attrs); return f }, a._engine.rect = function (a, b, c, d, e, f) { var g = q("rect"); a.canvas && a.canvas.appendChild(g); var h = new z(g, a); h.attrs = { x: b, y: c, width: d, height: e, r: f || 0, rx: f || 0, ry: f || 0, fill: "none", stroke: "#000" }, h.type = "rect", q(g, h.attrs); return h }, a._engine.ellipse = function (a, b, c, d, e) { var f = q("ellipse"); a.canvas && a.canvas.appendChild(f); var g = new z(f, a); g.attrs = { cx: b, cy: c, rx: d, ry: e, fill: "none", stroke: "#000" }, g.type = "ellipse", q(f, g.attrs); return g }, a._engine.image = function (a, b, c, d, e, f) { var g = q("image"); q(g, { x: c, y: d, width: e, height: f, preserveAspectRatio: "none" }), g.setAttributeNS(n, "href", b), a.canvas && a.canvas.appendChild(g); var h = new z(g, a); h.attrs = { x: c, y: d, width: e, height: f, src: b }, h.type = "image"; return h }, a._engine.text = function (b, c, d, e) { var f = q("text"); b.canvas && b.canvas.appendChild(f); var g = new z(f, b); g.attrs = { x: c, y: d, "text-anchor": "middle", text: e, font: a._availableAttrs.font, stroke: "none", fill: "#000" }, g.type = "text", w(g, g.attrs); return g }, a._engine.setSize = function (a, b) { this.width = a || this.width, this.height = b || this.height, this.canvas.setAttribute("width", this.width), this.canvas.setAttribute("height", this.height), this._viewBox && this.setViewBox.apply(this, this._viewBox); return this }, a._engine.create = function () { var b = a._getContainer.apply(0, arguments), c = b && b.container, d = b.x, e = b.y, f = b.width, g = b.height; if (!c) throw new Error("SVG container not found."); var h = q("svg"), i = "overflow:hidden;", j; d = d || 0, e = e || 0, f = f || 512, g = g || 342, q(h, { height: g, version: 1.1, width: f, xmlns: "http://www.w3.org/2000/svg" }), c == 1 ? (h.style.cssText = i + "position:absolute;left:" + d + "px;top:" + e + "px", a._g.doc.body.appendChild(h), j = 1) : (h.style.cssText = i + "position:relative", c.firstChild ? c.insertBefore(h, c.firstChild) : c.appendChild(h)), c = new a._Paper, c.width = f, c.height = g, c.canvas = h, c.clear(), c._left = c._top = 0, j && (c.renderfix = function () { }), c.renderfix(); return c }, a._engine.setViewBox = function (a, b, c, d, e) { k("setViewBox", this, this._viewBox, [a, b, c, d, e]); var f = g(c / this.width, d / this.height), h = this.top, i = e ? "meet" : "xMinYMin", j, l; a == null ? (this._vbSize && (f = 1), delete this._vbSize, j = "0 0 " + this.width + m + this.height) : (this._vbSize = f, j = a + m + b + m + c + m + d), q(this.canvas, { viewBox: j, preserveAspectRatio: i }); while (f && h) l = "stroke-width" in h.attrs ? h.attrs["stroke-width"] : 1, h.attr({ "stroke-width": l }), h._.dirty = 1, h._.dirtyT = 1, h = h.prev; this._viewBox = [a, b, c, d, !!e]; return this }, a.prototype.renderfix = function () { var a = this.canvas, b = a.style, c; try { c = a.getScreenCTM() || a.createSVGMatrix() } catch (d) { c = a.createSVGMatrix() } var e = -c.e % 1, f = -c.f % 1; if (e || f) e && (this._left = (this._left + e) % 1, b.left = this._left + "px"), f && (this._top = (this._top + f) % 1, b.top = this._top + "px") }, a.prototype.clear = function () { a.eve("clear", this); var b = this.canvas; while (b.firstChild) b.removeChild(b.firstChild); this.bottom = this.top = null, (this.desc = q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël " + a.version)), b.appendChild(this.desc), b.appendChild(this.defs = q("defs")) }, a.prototype.remove = function () { k("remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null }; var B = a.st; for (var C in A) A[b](C) && !B[b](C) && (B[C] = function (a) { return function () { var b = arguments; return this.forEach(function (c) { c[a].apply(c, b) }) } } (C)) } (window.Raphael), window.Raphael.vml && function (a) { var b = "hasOwnProperty", c = String, d = parseFloat, e = Math, f = e.round, g = e.max, h = e.min, i = e.abs, j = "fill", k = /[, ]+/, l = a.eve, m = " progid:DXImageTransform.Microsoft", n = " ", o = "", p = { M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x" }, q = /([clmz]),?([^clmz]*)/gi, r = / progid:\S+Blur\([^\)]+\)/g, s = /-?[^,\s-]+/g, t = "position:absolute;left:0;top:0;width:1px;height:1px", u = 21600, v = { path: 1, rect: 1, image: 1 }, w = { circle: 1, ellipse: 1 }, x = function (b) { var d = /[ahqstv]/ig, e = a._pathToAbsolute; c(b).match(d) && (e = a._path2curve), d = /[clmz]/g; if (e == a._pathToAbsolute && !c(b).match(d)) { var g = c(b).replace(q, function (a, b, c) { var d = [], e = b.toLowerCase() == "m", g = p[b]; c.replace(s, function (a) { e && d.length == 2 && (g += d + p[b == "m" ? "l" : "L"], d = []), d.push(f(a * u)) }); return g + d }); return g } var h = e(b), i, j; g = []; for (var k = 0, l = h.length; k < l; k++) { i = h[k], j = h[k][0].toLowerCase(), j == "z" && (j = "x"); for (var m = 1, r = i.length; m < r; m++) j += f(i[m] * u) + (m != r - 1 ? "," : o); g.push(j) } return g.join(n) }, y = function (b, c, d) { var e = a.matrix(); e.rotate(-b, .5, .5); return { dx: e.x(c, d), dy: e.y(c, d)} }, z = function (a, b, c, d, e, f) { var g = a._, h = a.matrix, k = g.fillpos, l = a.node, m = l.style, o = 1, p = "", q, r = u / b, s = u / c; m.visibility = "hidden"; if (!!b && !!c) { l.coordsize = i(r) + n + i(s), m.rotation = f * (b * c < 0 ? -1 : 1); if (f) { var t = y(f, d, e); d = t.dx, e = t.dy } b < 0 && (p += "x"), c < 0 && (p += " y") && (o = -1), m.flip = p, l.coordorigin = d * -r + n + e * -s; if (k || g.fillsize) { var v = l.getElementsByTagName(j); v = v && v[0], l.removeChild(v), k && (t = y(f, h.x(k[0], k[1]), h.y(k[0], k[1])), v.position = t.dx * o + n + t.dy * o), g.fillsize && (v.size = g.fillsize[0] * i(b) + n + g.fillsize[1] * i(c)), l.appendChild(v) } m.visibility = "visible" } }; a.toString = function () { return "Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël " + this.version }; var A = function (a, b, d) { var e = c(b).toLowerCase().split("-"), f = d ? "end" : "start", g = e.length, h = "classic", i = "medium", j = "medium"; while (g--) switch (e[g]) { case "block": case "classic": case "oval": case "diamond": case "open": case "none": h = e[g]; break; case "wide": case "narrow": j = e[g]; break; case "long": case "short": i = e[g] } var k = a.node.getElementsByTagName("stroke")[0]; k[f + "arrow"] = h, k[f + "arrowlength"] = i, k[f + "arrowwidth"] = j }, B = function (e, i) { e.attrs = e.attrs || {}; var l = e.node, m = e.attrs, p = l.style, q, r = v[e.type] && (i.x != m.x || i.y != m.y || i.width != m.width || i.height != m.height || i.cx != m.cx || i.cy != m.cy || i.rx != m.rx || i.ry != m.ry || i.r != m.r), s = w[e.type] && (m.cx != i.cx || m.cy != i.cy || m.r != i.r || m.rx != i.rx || m.ry != i.ry), t = e; for (var y in i) i[b](y) && (m[y] = i[y]); r && (m.path = a._getPath[e.type](e), e._.dirty = 1), i.href && (l.href = i.href), i.title && (l.title = i.title), i.target && (l.target = i.target), i.cursor && (p.cursor = i.cursor), "blur" in i && e.blur(i.blur); if (i.path && e.type == "path" || r) l.path = x(~c(m.path).toLowerCase().indexOf("r") ? a._pathToAbsolute(m.path) : m.path), e.type == "image" && (e._.fillpos = [m.x, m.y], e._.fillsize = [m.width, m.height], z(e, 1, 1, 0, 0, 0)); "transform" in i && e.transform(i.transform); if (s) { var B = +m.cx, D = +m.cy, E = +m.rx || +m.r || 0, G = +m.ry || +m.r || 0; l.path = a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", f((B - E) * u), f((D - G) * u), f((B + E) * u), f((D + G) * u), f(B * u)) } if ("clip-rect" in i) { var H = c(i["clip-rect"]).split(k); if (H.length == 4) { H[2] = +H[2] + +H[0], H[3] = +H[3] + +H[1]; var I = l.clipRect || a._g.doc.createElement("div"), J = I.style; J.clip = a.format("rect({1}px {2}px {3}px {0}px)", H), l.clipRect || (J.position = "absolute", J.top = 0, J.left = 0, J.width = e.paper.width + "px", J.height = e.paper.height + "px", l.parentNode.insertBefore(I, l), I.appendChild(l), l.clipRect = I) } i["clip-rect"] || l.clipRect && (l.clipRect.style.clip = "auto") } if (e.textpath) { var K = e.textpath.style; i.font && (K.font = i.font), i["font-family"] && (K.fontFamily = '"' + i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, o) + '"'), i["font-size"] && (K.fontSize = i["font-size"]), i["font-weight"] && (K.fontWeight = i["font-weight"]), i["font-style"] && (K.fontStyle = i["font-style"]) } "arrow-start" in i && A(t, i["arrow-start"]), "arrow-end" in i && A(t, i["arrow-end"], 1); if (i.opacity != null || i["stroke-width"] != null || i.fill != null || i.src != null || i.stroke != null || i["stroke-width"] != null || i["stroke-opacity"] != null || i["fill-opacity"] != null || i["stroke-dasharray"] != null || i["stroke-miterlimit"] != null || i["stroke-linejoin"] != null || i["stroke-linecap"] != null) { var L = l.getElementsByTagName(j), M = !1; L = L && L[0], !L && (M = L = F(j)), e.type == "image" && i.src && (L.src = i.src), i.fill && (L.on = !0); if (L.on == null || i.fill == "none" || i.fill === null) L.on = !1; if (L.on && i.fill) { var N = c(i.fill).match(a._ISURL); if (N) { L.parentNode == l && l.removeChild(L), L.rotate = !0, L.src = N[1], L.type = "tile"; var O = e.getBBox(1); L.position = O.x + n + O.y, e._.fillpos = [O.x, O.y], a._preload(N[1], function () { e._.fillsize = [this.offsetWidth, this.offsetHeight] }) } else L.color = a.getRGB(i.fill).hex, L.src = o, L.type = "solid", a.getRGB(i.fill).error && (t.type in { circle: 1, ellipse: 1} || c(i.fill).charAt() != "r") && C(t, i.fill, L) && (m.fill = "none", m.gradient = i.fill, L.rotate = !1) } if ("fill-opacity" in i || "opacity" in i) { var P = ((+m["fill-opacity"] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+a.getRGB(i.fill).o + 1 || 2) - 1); P = h(g(P, 0), 1), L.opacity = P, L.src && (L.color = "none") } l.appendChild(L); var Q = l.getElementsByTagName("stroke") && l.getElementsByTagName("stroke")[0], T = !1; !Q && (T = Q = F("stroke")); if (i.stroke && i.stroke != "none" || i["stroke-width"] || i["stroke-opacity"] != null || i["stroke-dasharray"] || i["stroke-miterlimit"] || i["stroke-linejoin"] || i["stroke-linecap"]) Q.on = !0; (i.stroke == "none" || i.stroke === null || Q.on == null || i.stroke == 0 || i["stroke-width"] == 0) && (Q.on = !1); var U = a.getRGB(i.stroke); Q.on && i.stroke && (Q.color = U.hex), P = ((+m["stroke-opacity"] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+U.o + 1 || 2) - 1); var V = (d(i["stroke-width"]) || 1) * .75; P = h(g(P, 0), 1), i["stroke-width"] == null && (V = m["stroke-width"]), i["stroke-width"] && (Q.weight = V), V && V < 1 && (P *= V) && (Q.weight = 1), Q.opacity = P, i["stroke-linejoin"] && (Q.joinstyle = i["stroke-linejoin"] || "miter"), Q.miterlimit = i["stroke-miterlimit"] || 8, i["stroke-linecap"] && (Q.endcap = i["stroke-linecap"] == "butt" ? "flat" : i["stroke-linecap"] == "square" ? "square" : "round"); if (i["stroke-dasharray"]) { var W = { "-": "shortdash", ".": "shortdot", "-.": "shortdashdot", "-..": "shortdashdotdot", ". ": "dot", "- ": "dash", "--": "longdash", "- .": "dashdot", "--.": "longdashdot", "--..": "longdashdotdot" }; Q.dashstyle = W[b](i["stroke-dasharray"]) ? W[i["stroke-dasharray"]] : o } T && l.appendChild(Q) } if (t.type == "text") { t.paper.canvas.style.display = o; var X = t.paper.span, Y = 100, Z = m.font && m.font.match(/\d+(?:\.\d*)?(?=px)/); p = X.style, m.font && (p.font = m.font), m["font-family"] && (p.fontFamily = m["font-family"]), m["font-weight"] && (p.fontWeight = m["font-weight"]), m["font-style"] && (p.fontStyle = m["font-style"]), Z = d(m["font-size"] || Z && Z[0]) || 10, p.fontSize = Z * Y + "px", t.textpath.string && (X.innerHTML = c(t.textpath.string).replace(/</g, "&#60;").replace(/&/g, "&#38;").replace(/\n/g, "<br>")); var $ = X.getBoundingClientRect(); t.W = m.w = ($.right - $.left) / Y, t.H = m.h = ($.bottom - $.top) / Y, t.X = m.x, t.Y = m.y + t.H / 2, ("x" in i || "y" in i) && (t.path.v = a.format("m{0},{1}l{2},{1}", f(m.x * u), f(m.y * u), f(m.x * u) + 1)); var _ = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; for (var ba = 0, bb = _.length; ba < bb; ba++) if (_[ba] in i) { t._.dirty = 1; break } switch (m["text-anchor"]) { case "start": t.textpath.style["v-text-align"] = "left", t.bbx = t.W / 2; break; case "end": t.textpath.style["v-text-align"] = "right", t.bbx = -t.W / 2; break; default: t.textpath.style["v-text-align"] = "center", t.bbx = 0 } t.textpath.style["v-text-kern"] = !0 } }, C = function (b, f, g) { b.attrs = b.attrs || {}; var h = b.attrs, i = Math.pow, j, k, l = "linear", m = ".5 .5"; b.attrs.gradient = f, f = c(f).replace(a._radial_gradient, function (a, b, c) { l = "radial", b && c && (b = d(b), c = d(c), i(b - .5, 2) + i(c - .5, 2) > .25 && (c = e.sqrt(.25 - i(b - .5, 2)) * ((c > .5) * 2 - 1) + .5), m = b + n + c); return o }), f = f.split(/\s*\-\s*/); if (l == "linear") { var p = f.shift(); p = -d(p); if (isNaN(p)) return null } var q = a._parseDots(f); if (!q) return null; b = b.shape || b.node; if (q.length) { b.removeChild(g), g.on = !0, g.method = "none", g.color = q[0].color, g.color2 = q[q.length - 1].color; var r = []; for (var s = 0, t = q.length; s < t; s++) q[s].offset && r.push(q[s].offset + n + q[s].color); g.colors = r.length ? r.join() : "0% " + g.color, l == "radial" ? (g.type = "gradientTitle", g.focus = "100%", g.focussize = "0 0", g.focusposition = m, g.angle = 0) : (g.type = "gradient", g.angle = (270 - p) % 360), b.appendChild(g) } return 1 }, D = function (b, c) { this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.X = 0, this.Y = 0, this.attrs = {}, this.paper = c, this.matrix = a.matrix(), this._ = { transform: [], sx: 1, sy: 1, dx: 0, dy: 0, deg: 0, dirty: 1, dirtyT: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null }, E = a.el; D.prototype = E, E.constructor = D, E.transform = function (b) { if (b == null) return this._.transform; var d = this.paper._viewBoxShift, e = d ? "s" + [d.scale, d.scale] + "-1-1t" + [d.dx, d.dy] : o, f; d && (f = b = c(b).replace(/\.{3}|\u2026/g, this._.transform || o)), a._extractTransform(this, e + b); var g = this.matrix.clone(), h = this.skew, i = this.node, j, k = ~c(this.attrs.fill).indexOf("-"), l = !c(this.attrs.fill).indexOf("url("); g.translate(-0.5, -0.5); if (l || k || this.type == "image") { h.matrix = "1 0 0 1", h.offset = "0 0", j = g.split(); if (k && j.noRotation || !j.isSimple) { i.style.filter = g.toFilter(); var m = this.getBBox(), p = this.getBBox(1), q = m.x - p.x, r = m.y - p.y; i.coordorigin = q * -u + n + r * -u, z(this, 1, 1, q, r, 0) } else i.style.filter = o, z(this, j.scalex, j.scaley, j.dx, j.dy, j.rotate) } else i.style.filter = o, h.matrix = c(g), h.offset = g.offset(); f && (this._.transform = f); return this }, E.rotate = function (a, b, e) { if (this.removed) return this; if (a != null) { a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); if (b == null || e == null) { var f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2 } this._.dirtyT = 1, this.transform(this._.transform.concat([["r", a, b, e]])); return this } }, E.translate = function (a, b) { if (this.removed) return this; a = c(a).split(k), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this._.bbox && (this._.bbox.x += a, this._.bbox.y += b), this.transform(this._.transform.concat([["t", a, b]])); return this }, E.scale = function (a, b, e, f) { if (this.removed) return this; a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3]), isNaN(e) && (e = null), isNaN(f) && (f = null)), a = d(a[0]), b == null && (b = a), f == null && (e = f); if (e == null || f == null) var g = this.getBBox(1); e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([["s", a, b, e, f]])), this._.dirtyT = 1; return this }, E.hide = function () { !this.removed && (this.node.style.display = "none"); return this }, E.show = function () { !this.removed && (this.node.style.display = o); return this }, E._getBBox = function () { if (this.removed) return {}; return { x: this.X + (this.bbx || 0) - this.W / 2, y: this.Y - this.H, width: this.W, height: this.H} }, E.remove = function () { if (!this.removed) { this.paper.__set__ && this.paper.__set__.exclude(this), a.eve.unbind("*.*." + this.id), a._tear(this, this.paper), this.node.parentNode.removeChild(this.node), this.shape && this.shape.parentNode.removeChild(this.shape); for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null; this.removed = !0 } }, E.attr = function (c, d) { if (this.removed) return this; if (c == null) { var e = {}; for (var f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); e.gradient && e.fill == "none" && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; return e } if (d == null && a.is(c, "string")) { if (c == j && this.attrs.fill == "none" && this.attrs.gradient) return this.attrs.gradient; var g = c.split(k), h = {}; for (var i = 0, m = g.length; i < m; i++) c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], "function") ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; return m - 1 ? h : h[g[0]] } if (this.attrs && d == null && a.is(c, "array")) { h = {}; for (i = 0, m = c.length; i < m; i++) h[c[i]] = this.attr(c[i]); return h } var n; d != null && (n = {}, n[c] = d), d == null && a.is(c, "object") && (n = c); for (var o in n) l("attr." + o + "." + this.id, this, n[o]); if (n) { for (o in this.paper.customAttributes) if (this.paper.customAttributes[b](o) && n[b](o) && a.is(this.paper.customAttributes[o], "function")) { var p = this.paper.customAttributes[o].apply(this, [].concat(n[o])); this.attrs[o] = n[o]; for (var q in p) p[b](q) && (n[q] = p[q]) } n.text && this.type == "text" && (this.textpath.string = n.text), B(this, n) } return this }, E.toFront = function () { !this.removed && this.node.parentNode.appendChild(this.node), this.paper && this.paper.top != this && a._tofront(this, this.paper); return this }, E.toBack = function () { if (this.removed) return this; this.node.parentNode.firstChild != this.node && (this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper)); return this }, E.insertAfter = function (b) { if (this.removed) return this; b.constructor == a.st.constructor && (b = b[b.length - 1]), b.node.nextSibling ? b.node.parentNode.insertBefore(this.node, b.node.nextSibling) : b.node.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); return this }, E.insertBefore = function (b) { if (this.removed) return this; b.constructor == a.st.constructor && (b = b[0]), b.node.parentNode.insertBefore(this.node, b.node), a._insertbefore(this, b, this.paper); return this }, E.blur = function (b) { var c = this.node.runtimeStyle, d = c.filter; d = d.replace(r, o), +b !== 0 ? (this.attrs.blur = b, c.filter = d + n + m + ".Blur(pixelradius=" + (+b || 1.5) + ")", c.margin = a.format("-{0}px 0 0 -{0}px", f(+b || 1.5))) : (c.filter = d, c.margin = 0, delete this.attrs.blur) }, a._engine.path = function (a, b) { var c = F("shape"); c.style.cssText = t, c.coordsize = u + n + u, c.coordorigin = b.coordorigin; var d = new D(c, b), e = { fill: "none", stroke: "#000" }; a && (e.path = a), d.type = "path", d.path = [], d.Path = o, B(d, e), b.canvas.appendChild(c); var f = F("skew"); f.on = !0, c.appendChild(f), d.skew = f, d.transform(o); return d }, a._engine.rect = function (b, c, d, e, f, g) { var h = a._rectPath(c, d, e, f, g), i = b.path(h), j = i.attrs; i.X = j.x = c, i.Y = j.y = d, i.W = j.width = e, i.H = j.height = f, j.r = g, j.path = h, i.type = "rect"; return i }, a._engine.ellipse = function (a, b, c, d, e) { var f = a.path(), g = f.attrs; f.X = b - d, f.Y = c - e, f.W = d * 2, f.H = e * 2, f.type = "ellipse", B(f, { cx: b, cy: c, rx: d, ry: e }); return f }, a._engine.circle = function (a, b, c, d) { var e = a.path(), f = e.attrs; e.X = b - d, e.Y = c - d, e.W = e.H = d * 2, e.type = "circle", B(e, { cx: b, cy: c, r: d }); return e }, a._engine.image = function (b, c, d, e, f, g) { var h = a._rectPath(d, e, f, g), i = b.path(h).attr({ stroke: "none" }), k = i.attrs, l = i.node, m = l.getElementsByTagName(j)[0]; k.src = c, i.X = k.x = d, i.Y = k.y = e, i.W = k.width = f, i.H = k.height = g, k.path = h, i.type = "image", m.parentNode == l && l.removeChild(m), m.rotate = !0, m.src = c, m.type = "tile", i._.fillpos = [d, e], i._.fillsize = [f, g], l.appendChild(m), z(i, 1, 1, 0, 0, 0); return i }, a._engine.text = function (b, d, e, g) { var h = F("shape"), i = F("path"), j = F("textpath"); d = d || 0, e = e || 0, g = g || "", i.v = a.format("m{0},{1}l{2},{1}", f(d * u), f(e * u), f(d * u) + 1), i.textpathok = !0, j.string = c(g), j.on = !0, h.style.cssText = t, h.coordsize = u + n + u, h.coordorigin = "0 0"; var k = new D(h, b), l = { fill: "#000", stroke: "none", font: a._availableAttrs.font, text: g }; k.shape = h, k.path = i, k.textpath = j, k.type = "text", k.attrs.text = c(g), k.attrs.x = d, k.attrs.y = e, k.attrs.w = 1, k.attrs.h = 1, B(k, l), h.appendChild(j), h.appendChild(i), b.canvas.appendChild(h); var m = F("skew"); m.on = !0, h.appendChild(m), k.skew = m, k.transform(o); return k }, a._engine.setSize = function (b, c) { var d = this.canvas.style; this.width = b, this.height = c, b == +b && (b += "px"), c == +c && (c += "px"), d.width = b, d.height = c, d.clip = "rect(0 " + b + " " + c + " 0)", this._viewBox && a._engine.setViewBox.apply(this, this._viewBox); return this }, a._engine.setViewBox = function (b, c, d, e, f) { a.eve("setViewBox", this, this._viewBox, [b, c, d, e, f]); var h = this.width, i = this.height, j = 1 / g(d / h, e / i), k, l; f && (k = i / e, l = h / d, d * k < h && (b -= (h - d * k) / 2 / k), e * l < i && (c -= (i - e * l) / 2 / l)), this._viewBox = [b, c, d, e, !!f], this._viewBoxShift = { dx: -b, dy: -c, scale: j }, this.forEach(function (a) { a.transform("...") }); return this }; var F; a._engine.initWin = function (a) { var b = a.document; b.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); try { !b.namespaces.rvml && b.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"), F = function (a) { return b.createElement("<rvml:" + a + ' class="rvml">') } } catch (c) { F = function (a) { return b.createElement("<" + a + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">') } } }, a._engine.initWin(a._g.win), a._engine.create = function () { var b = a._getContainer.apply(0, arguments), c = b.container, d = b.height, e, f = b.width, g = b.x, h = b.y; if (!c) throw new Error("VML container not found."); var i = new a._Paper, j = i.canvas = a._g.doc.createElement("div"), k = j.style; g = g || 0, h = h || 0, f = f || 512, d = d || 342, i.width = f, i.height = d, f == +f && (f += "px"), d == +d && (d += "px"), i.coordsize = u * 1e3 + n + u * 1e3, i.coordorigin = "0 0", i.span = a._g.doc.createElement("span"), i.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;", j.appendChild(i.span), k.cssText = a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", f, d), c == 1 ? (a._g.doc.body.appendChild(j), k.left = g + "px", k.top = h + "px", k.position = "absolute") : c.firstChild ? c.insertBefore(j, c.firstChild) : c.appendChild(j), i.renderfix = function () { }; return i }, a.prototype.clear = function () { a.eve("clear", this), this.canvas.innerHTML = o, this.span = a._g.doc.createElement("span"), this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;", this.canvas.appendChild(this.span), this.bottom = this.top = null }, a.prototype.remove = function () { a.eve("remove", this), this.canvas.parentNode.removeChild(this.canvas); for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null; return !0 }; var G = a.st; for (var H in E) E[b](H) && !G[b](H) && (G[H] = function (a) { return function () { var b = arguments; return this.forEach(function (c) { c[a].apply(c, b) }) } } (H)) } (window.Raphael) 
  • wangguard/trunk/readme.txt

    r634135 r642891  
    55Requires at least: 2.8 
    66Tested up to: 3.5 
    7 Stable tag: 1.5.2 
     7Stable tag: 1.5.3 
    88License: GPLv2 
    99 
     
    288288== Changelog == 
    289289 
     290= 1.5.3 - 21 Dec 2012 = 
     291- Added the ability for other plugins to use WangGuard services to verify e-mail addresses. Check [the Wangguard Developers Page](http://www.wangguard.com/developers), we'll upload soon docs ands samples on how to use WangGuard services on your own plugins. 
     292- Fixed a Javascript issue on the Dashboard and Stats page due to the new jQuery version used in Wordpress 3.5 
     293 
    290294= 1.5.2 - 4 Dec 2012 = 
    291295- Added compatibility for WordPress 3.5. 
  • wangguard/trunk/wangguard-admin.php

    r634135 r642891  
    44Plugin URI: http://www.wangguard.com 
    55Description: <strong>Stop Sploggers</strong>. It is very important to use <a href="http://www.wangguard.com" target="_new">WangGuard</a> at least for a week, reporting your site's unwanted users as sploggers from the Users panel. WangGuard will learn at that time to protect your site from sploggers in a much more effective way. WangGuard protects each web site in a personalized way using information provided by Administrators who report sploggers world-wide, that's why it's very important that you report your sploggers to WangGuard. The longer you use WangGuard, the more effective it will become. 
    6 Version: 1.5.2 
     6Version: 1.5.3 
    77Author: WangGuard 
    88Author URI: http://www.wangguard.com 
     
    2626*/ 
    2727 
    28 define('WANGGUARD_VERSION', '1.5.2'); 
     28define('WANGGUARD_VERSION', '1.5.3'); 
    2929define('WANGGUARD_PLUGIN_FILE', 'wangguard/wangguard-admin.php'); 
    3030define('WANGGUARD_README_URL', 'http://plugins.trac.wordpress.org/browser/wangguard/trunk/readme.txt?format=txt'); 
     
    24212421        $activity = bp_activity_get_specific( array( 'activity_ids' => bp_get_activity_id() ) ); 
    24222422 
    2423         if ( $activity_type !== 'activity_liked' ) : 
     2423        if ( !empty( $activity['activities'][0] ) ) : 
    24242424            $user_id = $activity['activities'][0]->user_id; 
    24252425            $user_object = new WP_User($user_id); 
     
    27552755function wangguard_add_StatsJS() { 
    27562756    wangguard_add_jQueryJS(); 
     2757    wp_enqueue_script("jquery-ui-core"); 
    27572758    wp_enqueue_script("raphael" , "/" . PLUGINDIR . '/wangguard/js/raphael-min.js' , array('jquery-ui-widget')); 
    27582759    wp_enqueue_script("globalize" , "/" . PLUGINDIR . '/wangguard/js/globalize.min.js' , array('jquery-ui-widget' , 'raphael')); 
    2759     wp_enqueue_script("wijmo-wijraphael" , "/" . PLUGINDIR . '/wangguard/js/jquery.wijmo.raphael.min.js' , array('raphael' , 'jquery')); 
     2760    wp_enqueue_script("wijmo-wijraphael" , "/" . PLUGINDIR . '/wangguard/js/jquery.wijmo.raphael.min.js' , array('raphael' , 'jquery' , 'jquery-ui-core')); 
    27602761    wp_enqueue_script("wijmo-wijchartcore" , "/" . PLUGINDIR . '/wangguard/js/jquery.wijmo.wijchartcore.min.js' , array('raphael' , 'wijmo-wijraphael')); 
    27612762    wp_enqueue_script("wijmo.wijbarchart" , "/" . PLUGINDIR . '/wangguard/js/jquery.wijmo.wijbarchart.min.js' , array('wijmo-wijchartcore')); 
  • wangguard/trunk/wangguard-core.php

    r634135 r642891  
    578578} 
    579579 
     580 
     581 
     582/** 
     583 * wangguard_verify_email: takes a WP_User object and checks its status against WangGuard service, possible responses are: 
     584 *  
     585 * @param string $email: e-mail address to check 
     586 * @param string $clientIP: client IP 
     587 * @param string $proxyIP: client proxy ip if available - use the wangguard_getRemoteProxyIP() function to get the client proxy ip 
     588 * @return string: 
     589 * not-checked : user was not checked, admins aren't checked, also replied when a WangGuard server error occurs 
     590 * reported : user is reported on WangGuard 
     591 * checked : user isn't reported on WangGuard 
     592 * error:XXX : WangGuard server replied with an error code (mostly protocol issues) 
     593 */ 
     594function wangguard_verify_email($email , $clientIP , $proxyIP = '') { 
     595    global $wangguard_api_key; 
     596     
     597    $user_check_status = "not-checked"; 
     598 
     599    wangguard_stats_update("check"); 
     600 
     601    if ( wangguard_get_option("wangguard-do-not-check-client-ip")=='1') { 
     602        $clientIP = ''; 
     603        $proxyIP = ''; 
     604    } 
     605 
     606    //Rechecks the user agains WangGuard service 
     607    $response = wangguard_http_post("wg=<in><apikey>$wangguard_api_key</apikey><email>".$email."</email><ip>".$clientIP."</ip><proxyip>".$proxyIP."</proxyip></in>", 'query-email.php'); 
     608    $responseArr = XML_unserialize($response); 
     609    if ( is_array($responseArr)) { 
     610        if (($responseArr['out']['cod'] == '10') || ($responseArr['out']['cod'] == '11')) { 
     611            $user_check_status = 'reported'; 
     612            wangguard_stats_update("detected"); 
     613        } 
     614        else { 
     615            if ($responseArr['out']['cod'] == '20') { 
     616                $user_check_status = 'checked'; 
     617            } 
     618            else { 
     619                $user_check_status = 'error:'.$responseArr['out']['cod']; 
     620            } 
     621        } 
     622    } 
     623 
     624    return $user_check_status; 
     625} 
     626 
    580627//get option from the main blog's options table 
    581628function wangguard_get_option($option) { 
  • wangguard/trunk/wangguard-cronjobs.php

    r570632 r642891  
    2424    if ( !current_user_can('level_10') ) 
    2525        die(__('Cheatin&#8217; uh?', 'wangguard')); 
    26      
    2726     
    2827    ?> 
Note: See TracChangeset for help on using the changeset viewer.