"));r.append(c[n+1]);c[n+1].append(t("").text(i.effect))}c[n+1].append(t(" | ",{"class":"text-right"}).text(i.value))})});e.append(s.append(l).append(r));o.systemEffectDialog=e})}a.dialog({title:"System effect information",message:o.systemEffectDialog})}});define("dialog/jump_info",["jquery","app/init","app/util","app/render","bootbox"],function(t,e,n,i,a){"use strict";var s={jumpInfoDialogClass:"pf-jump-info-dialog"};t.fn.showJumpInfoDialog=function(){requirejs(["text!templates/dialog/jump_info.html","mustache"],function(t,e){var n={},i=e.render(t,n);a.dialog({className:s.jumpInfoDialogClass,title:"Wormhole jump information",message:i})})}});define("dialog/delete_account",["jquery","app/init","app/util","bootbox"],function(t,e,n,i){"use strict";var a={deleteAccountId:"pf-dialog-delete-account",captchaImageWrapperId:"pf-dialog-captcha-wrapper"};t.fn.showDeleteAccountDialog=function(){requirejs(["text!templates/dialog/delete_account.html","mustache"],function(s,o){var r={deleteAccountId:a.deleteAccountId,userData:n.getCurrentUserData(),captchaImageWrapperId:a.captchaImageWrapperId,formErrorContainerClass:n.config.formErrorContainerClass},l=o.render(s,r),c=i.dialog({title:"Delete account",message:l,buttons:{close:{label:"cancel",className:"btn-default"},success:{label:' delete account',className:"btn-danger",callback:function(){var i=t(this),s=i.find("form");s.validator("validate");var o=s.isValidForm();if(o){var r=s.getFormValues();if(!t.isEmptyObject(r)){var l={formData:r};i.find(".modal-content").showLoadingAnimation();t.ajax({type:"POST",url:e.path.deleteAccount,data:l,dataType:"json"}).done(function(e){i.find(".modal-content").hideLoadingAnimation();if(void 0!==e.reroute)n.redirect(e.reroute,[]);else if(e.error&&e.error.length>0){s.showFormMessage(e.error);t("#"+a.captchaImageWrapperId).showCaptchaImage("deleteAccount",function(){s.find('[name="captcha"], [name="password"]').resetFormFields()})}}).fail(function(t,e,a){i.find(".modal-content").hideLoadingAnimation();var s=e+" "+a;n.showNotify({title:t.status+": deleteAccount",text:s,type:"error"})})}}return!1}}}});c.on("shown.bs.modal",function(e){t("#"+a.captchaImageWrapperId).showCaptchaImage("deleteAccount")})})}});!function(t){var e={init:function(e){return this.each(function(){var n=t(this),i=n.data("lazyLinePainter");n.addClass("lazy-line");if(!i){var i=t.extend({width:null,height:null,strokeWidth:2,strokeColor:"#000",strokeOverColor:null,strokeCap:"round",strokeJoin:"round",strokeOpacity:1,arrowEnd:"none",onComplete:null,onStart:null,delay:null,overrideKey:null,drawSequential:!0,speedMultiplier:1,reverse:!1,responsive:!1},e),a=i.overrideKey?i.overrideKey:n.attr("id").replace("#",""),s=i.svgData[a].dimensions.width,o=i.svgData[a].dimensions.height;i.svgData=i.svgData[a].strokepath;null===i.width&&(i.width=s);null===i.height&&(i.height=o);i.responsive||n.css({width:i.width,height:i.height});a="0 0 "+s+" "+o;s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttributeNS(null,"viewBox",a);s.setAttribute("xmlns","http://www.w3.org/2000/svg");i.svg=t(s);n.append(i.svg);n.data("lazyLinePainter",i)}})},paint:function(){return this.each(function(){var e=t(this).data("lazyLinePainter"),n=function(){e.paths=[];e.longestDuration=0;for(var t=e.playhead=0,n=0,s=0,n=0;ne.longestDuration&&(e.longestDuration=t);var l;l=e.reverse?s-=t:e.playhead;e.paths.push({duration:t,drawStartTime:l,path:o,length:r});e.playhead+=t}e.totalDuration=e.drawSequential?e.playhead:e.longestDuration;e.rAF=requestAnimationFrame(function(t){i(t,e)});null!==e.onStart&&e.onStart()};null===e.delay?n():setTimeout(n,e.delay)})},pauseResume:function(){return this.each(function(){var e=t(this).data("lazyLinePainter");e.paused?(e.paused=!1,requestAnimationFrame(function(t){n(t,e)})):(e.paused=!0,cancelAnimationFrame(e.rAF))})},erase:function(){return this.each(function(){var e=t(this).data("lazyLinePainter");e.startTime=null;e.elapsedTime=null;cancelAnimationFrame(e.rAF);e.svg.empty()})},destroy:function(){return this.each(function(){var e=t(this);e.removeData("lazyLinePainter");e.remove()})}},n=function(t,e){e.startTime=t-e.elapsedTime;requestAnimationFrame(function(t){i(t,e)})},i=function(t,e){e.startTime||(e.startTime=t);e.elapsedTime=t-e.startTime;for(var n=0;na&&(a=0)):a=e.elapsedTime;a0?(a=a/e.paths[n].duration*e.paths[n].length,e.paths[n].path.style.strokeDashoffset=e.reverse||e.svgData[n].reverse?-e.paths[n].length+a:e.paths[n].length-a):a>e.paths[n].duration&&(e.paths[n].path.style.strokeDashoffset=0)}e.elapsedTime=w){C=!0;t("html").addClass("sb-init");c.hideControlClasses&&S.removeClass("sb-hide");i()}else if("number"==typeof c.disableOver&&c.disableOverf||m&&5>m)&&t("html").addClass("sb-static");var g=t("#sb-site, .sb-site-container");if(t(".sb-left").length)var v=t(".sb-left"),y=!1;if(t(".sb-right").length)var b=t(".sb-right"),x=!1;var C=!1,w=t(window).width(),S=t(".sb-toggle-left, .sb-toggle-right, .sb-open-left, .sb-open-right, .sb-close"),T=t(".sb-slide");n();t(window).resize(function(){var e=t(window).width();if(w!==e){w=e;n();y&&s("left");x&&s("right")}});var _;if(d&&h){_="translate";f&&4.4>f&&(_="side")}else _="jQuery";this.slidebars={open:s,close:o,toggle:r,init:function(){return C},active:function(t){return"left"===t&&v?y:"right"===t&&b?x:void 0},destroy:function(t){if("left"===t&&v){y&&o();setTimeout(function(){v.remove();v=!1},400)}if("right"===t&&b){x&&o();setTimeout(function(){b.remove();b=!1},400)}}};t(".sb-toggle-left").on("touchend click",function(e){l(e,t(this));r("left")});t(".sb-toggle-right").on("touchend click",function(e){l(e,t(this));r("right")});t(".sb-open-left").on("touchend click",function(e){l(e,t(this));s("left")});t(".sb-open-right").on("touchend click",function(e){l(e,t(this));s("right")});t(".sb-close").on("touchend click",function(e){l(e,t(this));var n;t(this).parents(".sb-slidebar")&&(t(this).is("a")?n=t(this).attr("href"):t(this).children("a")&&(n=t(this).children("a").attr("href")));o(n)});g.on("touchend click",function(e){if(c.siteClose&&(y||x)){l(e,t(this));o()}})}}(jQuery);define("slidebars",["jquery"],function(){});define("app/counter",["jquery"],function(t){"use strict";var e={counterDigitSmallClass:"pf-digit-counter-small",counterDigitLargeClass:"pf-digit-counter-large"},n=function(t,n){var i=new Date,a=n,s=(i-a)/1e3;s=Math.abs(Math.floor(s));var o=Math.floor(s/86400),r=s-24*o*60*60,l=Math.floor(r/3600);r-=60*l*60;var c=Math.floor(r/60);r-=60*c;var u=[];(o>0||u.length>0)&&u.push(''+o+"d");(l>0||u.length>0)&&u.push(''+l+"h");(c>0||u.length>0)&&u.push(''+c+"m");(r>=0||u.length>0)&&u.push(''+r+"s");t.html(u.join(" "))};t.fn.initTimestampCounter=function(){return this.each(function(){var e=t(this),i=parseInt(e.text());if(i>0){e.attr("data-counter","init");var a=new Date(1e3*i);n(e,a);var s=window.setInterval(function(){e.hasClass("stopCounter")?clearInterval(e.data("interval")):n(e,a)},100);e.data("interval",s)}})}});define("app/ui/system_info",["jquery","app/init","app/util","app/render"],function(t,e,n,i){"use strict";var a={moduleClass:"pf-module",systemInfoModuleClass:"pf-system-info-module",constellationLinkClass:"pf-system-info-constellation",regionLinkClass:"pf-system-info-region",typeLinkClass:"pf-system-info-type",systemInfoTableClass:"pf-system-info-table",systemInfoNameInfoClass:"pf-system-info-name",systemInfoEffectInfoClass:"pf-system-info-effect",systemInfoStatusLabelClass:"pf-system-info-status-label",systemInfoStatusAttributeName:"data-status",descriptionArea:"pf-system-info-description-area",addDescriptionButtonClass:"pf-system-info-description-button",moduleElementToolbarClass:"pf-table-tools",moduleToolbarActionId:"pf-system-info-collapse-container",descriptionTextareaElementClass:"pf-system-info-description",descriptionTextareaTooltipClass:"pf-system-info-description-tooltip"},s=!0,o=200,r=function(e){t(document).on("pf:updateSystemModules",function(t,n){n&&e.updateSystemInfoModule(n)})},l=function(){var e=t("#"+a.moduleToolbarActionId);e.velocity("stop").velocity({opacity:1,height:"75px"},{duration:o,display:"block",visibility:"visible"})},c=function(){var e=t("#"+a.moduleToolbarActionId);e.velocity("stop").velocity("reverse",{display:"none",visibility:"hidden"})};t.fn.updateSystemInfoModule=function(e){if(s!==!0){var i=t(this),o=i.data("id");if(o===e.id){var r=i.find("."+a.systemInfoStatusLabelClass),u=parseInt(r.attr(a.systemInfoStatusAttributeName));if(u!==e.status.id){var d=n.getStatusInfoForSystem(u,"class"),h=n.getStatusInfoForSystem(e.status.id,"class"),p=n.getStatusInfoForSystem(e.status.id,"label");r.removeClass(d).addClass(h).text(p);r.attr(a.systemInfoStatusAttributeName,e.status.id)}var f=i.find("."+a.descriptionTextareaElementClass),m=f.editable("getValue",!0);if(m!==e.description){var g=i.find("."+a.addDescriptionButtonClass);f.editable("setValue",e.description);if(0===e.description.length){g.show();c()}else{g.hide();l()}}var v=t(i).find("."+a.systemInfoNameInfoClass),y={created:e.created,updated:e.updated};v.addCharacterInfoTooltip(y)}t("."+a.descriptionArea).hideLoadingAnimation()}};var u=function(o,r,u){var h=t("",{"class":[a.moduleClass,a.systemInfoModuleClass].join(" "),css:{opacity:0}});h.data("id",u.id);o.prepend(h);var p=n.getEffectInfoForSystem(u.effect,"name"),f=n.getEffectInfoForSystem(u.effect,"class"),m={name:"modules/system_info",position:h,link:"append",functions:{after:function(){function i(e){e=t(e);var i=e.data("bs.popover");t.ajax({url:e.data("url"),success:function(t){var e=n.getSystemsInfoTable(t.systemData);i.options.content=e;i.show()}});return"Loading..."}t("."+a.descriptionArea).showLoadingAnimation();var o=t("."+a.systemInfoModuleClass),p=o.find("."+a.addDescriptionButtonClass),f=o.find("."+a.descriptionTextareaElementClass);f.editable({url:e.path.saveSystem,dataType:"json",pk:u.id,type:"textarea",mode:"inline",emptytext:"",onblur:"cancel",showbuttons:!0,value:"",rows:5,name:"description",inputclass:a.descriptionTextareaElementClass,params:function(t){t.mapData={id:r};t.systemData={};t.systemData.id=t.pk;t.systemData[t.name]=t.value;delete t.pk;delete t.name;delete t.value;return t},validate:function(e){return e.length>0&&0===t.trim(e).length?{newValue:""}:void 0},success:function(t,e){n.showNotify({title:"System updated",text:"Name: "+t.name,type:"success"})},error:function(e,i){var a="",s="";if(e.name){a=e.name;s="Error"}else{a=e.responseJSON.text;s=e.status}n.showNotify({title:s+": save system information",text:a,type:"warning"});t(document).setProgramStatus("problem");return a}});f.on("shown",function(t){s=!0;o.find("."+a.descriptionTextareaTooltipClass).tooltip("disable")});f.on("hidden",function(e){var n=t(this).editable("getValue",!0);if(0===n.length){c();p.show()}else o.find("."+a.descriptionTextareaTooltipClass).tooltip("enable");s=!1});p.on("click",function(t){t.stopPropagation();p.hide();f.editable("show");l()});var m=t("."+a.systemInfoModuleClass+' [data-toggle="tooltip"]');m.tooltip();var g=n.getSystemEffectData(u.security,u.effect);if(g!==!1){var v=t(h).find("."+a.systemInfoEffectInfoClass),y=n.getSystemEffectTable(g);v.popover({html:!0,trigger:"hover",placement:"top",delay:200,title:"System effects",container:"body",content:y})}o.find("a.popup-ajax").popover({html:!0,trigger:"hover",placement:"top",delay:200,container:"body",content:function(){return i(this)}});d(h)}}};if(u.statics)for(var g=0;g 0?o.velocity("transition.slideDownOut",{duration:e.animationSpeed.mapModule,complete:function(e){t(e).remove();u(s,n,i)}}):u(s,n,i)}});!function(t){var e,n,i="0.4.2",a="hasOwnProperty",s=/[\.\/]/,o="*",r=function(){},l=function(t,e){return t-e},c={n:{}},u=function(t,i){t=String(t);var a,s=n,o=Array.prototype.slice.call(arguments,2),r=u.listeners(t),c=0,d=[],h={},p=[],f=e;e=t,n=0;for(var m=0,g=r.length;g>m;m++)"zIndex"in r[m]&&(d.push(r[m].zIndex),r[m].zIndex<0&&(h[r[m].zIndex]=r[m]));for(d.sort(l);d[c]<0;)if(a=h[d[c++]],p.push(a.apply(i,o)),n)return n=s,p;for(m=0;g>m;m++)if(a=r[m],"zIndex"in a)if(a.zIndex==d[c]){if(p.push(a.apply(i,o)),n)break;do if(c++,a=h[d[c]],a&&p.push(a.apply(i,o)),n)break;while(a)}else h[a.zIndex]=a;else if(p.push(a.apply(i,o)),n)break;return n=s,e=f,p.length?p:null};u._events=c,u.listeners=function(t){var e,n,i,a,r,l,u,d,h=t.split(s),p=c,f=[p],m=[];for(a=0,r=h.length;r>a;a++){for(d=[],l=0,u=f.length;u>l;l++)for(p=f[l].n,n=[p[h[a]],p[o]],i=2;i--;)e=n[i],e&&(d.push(e),m=m.concat(e.f||[]));f=d}return m},u.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var n=t.split(s),i=c,a=0,o=n.length;o>a;a++)i=i.n,i=i.hasOwnProperty(n[a])&&i[n[a]]||(i[n[a]]={n:{}});for(i.f=i.f||[],a=0,o=i.f.length;o>a;a++)if(i.f[a]==e)return r;return i.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},u.f=function(t){var e=[].slice.call(arguments,1);return function(){u.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},u.stop=function(){n=1},u.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},u.nts=function(){return e.split(s)},u.off=u.unbind=function(t,e){if(!t)return void(u._events=c={n:{}});var n,i,r,l,d,h,p,f=t.split(s),m=[c];for(l=0,d=f.length;d>l;l++)for(h=0;hl;l++)for(n=m[l];n.n;){if(e){if(n.f){for(h=0,p=n.f.length;p>h;h++)if(n.f[h]==e){n.f.splice(h,1);break}!n.f.length&&delete n.f}for(i in n.n)if(n.n[a](i)&&n.n[i].f){var g=n.n[i].f;for(h=0,p=g.length;p>h;h++)if(g[h]==e){g.splice(h,1);break}!g.length&&delete n.n[i].f}}else{delete n.f;for(i in n.n)n.n[a](i)&&n.n[i].f&&delete n.n[i].f}n=n.n}},u.once=function(t,e){var n=function(){return u.unbind(t,n),e.apply(this,arguments)};return u.on(t,n)},u.version=i,u.toString=function(){return"You are running Eve "+i},"undefined"!=typeof module&&module.exports?module.exports=u:"undefined"!=typeof define?define("eve",[],function(){return u}):t.eve=u}(window||this),function(t,e){"function"==typeof define&&define.amd?define("raphael",["eve"],function(n){return e(t,n)}):e(t,t.eve)}(this,function(t,e){function n(t){if(n.is(t,"function"))return x?t():e.on("raphael.DOMload",t);if(n.is(t,Y))return n._engine.create[I](n,t.splice(0,3+n.is(t[0],q))).add(t);var i=Array.prototype.slice.call(arguments,0);if(n.is(i[i.length-1],"function")){var a=i.pop();return x?a.call(n._engine.create[I](n,i)):e.on("raphael.DOMload",function(){a.call(n._engine.create[I](n,i))})}return n._engine.create[I](n,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[_](n)&&(e[n]=i(t[n]));return e}function a(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}function s(t,e,n){function i(){var s=Array.prototype.slice.call(arguments,0),o=s.join("␀"),r=i.cache=i.cache||{},l=i.count=i.count||[];return r[_](o)?(a(l,o),n?n(r[o]):r[o]):(l.length>=1e3&&delete r[l.shift()],l.push(o),r[o]=t[I](e,s),n?n(r[o]):r[o])}return i}function o(){return this.hex}function r(t,e){for(var n=[],i=0,a=t.length;a-2*!e>i;i+=2){var s=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?a-4==i?s[3]={x:+t[0],y:+t[1]}:a-2==i&&(s[2]={x:+t[0],y:+t[1]},s[3]={x:+t[2],y:+t[3]}):s[0]={x:+t[a-2],y:+t[a-1]}:a-4==i?s[3]=s[2]:i||(s[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-s[0].x+6*s[1].x+s[2].x)/6,(-s[0].y+6*s[1].y+s[2].y)/6,(s[1].x+6*s[2].x-s[3].x)/6,(s[1].y+6*s[2].y-s[3].y)/6,s[2].x,s[2].y])}return n}function l(t,e,n,i,a){var s=-3*e+9*n-9*i+3*a,o=t*s+6*e-12*n+6*i;return t*o-3*e+3*n}function c(t,e,n,i,a,s,o,r,c){null==c&&(c=1),c=c>1?1:0>c?0:c;for(var u=c/2,d=12,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,m=0;d>m;m++){var g=u*h[m]+u,v=l(g,t,n,a,o),y=l(g,e,i,s,r),b=v*v+y*y;f+=p[m]*B.sqrt(b)}return u*f}function u(t,e,n,i,a,s,o,r,l){if(!(0>l||c(t,e,n,i,a,s,o,r)f;)h/=2,p+=(l>u?1:-1)*h,u=c(t,e,n,i,a,s,o,r,p);return p}}function d(t,e,n,i,a,s,o,r){if(!($(t,n)$(a,o)||$(e,i)$(s,r))){var l=(t*i-e*n)*(a-o)-(t-n)*(a*r-s*o),c=(t*i-e*n)*(s-r)-(e-i)*(a*r-s*o),u=(t-n)*(s-r)-(e-i)*(a-o);if(u){var d=l/u,h=c/u,p=+d.toFixed(2),f=+h.toFixed(2);if(!(p<+H(t,n).toFixed(2)||p>+$(t,n).toFixed(2)||p<+H(a,o).toFixed(2)||p>+$(a,o).toFixed(2)||f<+H(e,i).toFixed(2)||f>+$(e,i).toFixed(2)||f<+H(s,r).toFixed(2)||f>+$(s,r).toFixed(2)))return{x:d,y:h}}}}function h(t,e,i){var a=n.bezierBBox(t),s=n.bezierBBox(e);if(!n.isBBoxIntersect(a,s))return i?0:[];for(var o=c.apply(0,t),r=c.apply(0,e),l=$(~~(o/5),1),u=$(~~(r/5),1),h=[],p=[],f={},m=i?0:[],g=0;l+1>g;g++){var v=n.findDotsAtSegment.apply(n,t.concat(g/l));h.push({x:v.x,y:v.y,t:g/l})}for(g=0;u+1>g;g++)v=n.findDotsAtSegment.apply(n,e.concat(g/u)),p.push({x:v.x,y:v.y,t:g/u});for(g=0;l>g;g++)for(var y=0;u>y;y++){var b=h[g],x=h[g+1],C=p[y],w=p[y+1],S=U(x.x-b.x)<.001?"y":"x",T=U(w.x-C.x)<.001?"y":"x",_=d(b.x,b.y,x.x,x.y,C.x,C.y,w.x,w.y);if(_){if(f[_.x.toFixed(4)]==_.y.toFixed(4))continue;f[_.x.toFixed(4)]=_.y.toFixed(4);var D=b.t+U((_[S]-b[S])/(x[S]-b[S]))*(x.t-b.t),k=C.t+U((_[T]-C[T])/(w[T]-C[T]))*(w.t-C.t);D>=0&&1.001>=D&&k>=0&&1.001>=k&&(i?m++:m.push({x:_.x,y:_.y,t1:H(D,1),t2:H(k,1)}))}}return m}function p(t,e,i){t=n._path2curve(t),e=n._path2curve(e);for(var a,s,o,r,l,c,u,d,p,f,m=i?0:[],g=0,v=t.length;v>g;g++){var y=t[g];if("M"==y[0])a=l=y[1],s=c=y[2];else{"C"==y[0]?(p=[a,s].concat(y.slice(1)),a=p[6],s=p[7]):(p=[a,s,a,s,l,c,l,c],a=l,s=c);for(var b=0,x=e.length;x>b;b++){var C=e[b];if("M"==C[0])o=u=C[1],r=d=C[2];else{"C"==C[0]?(f=[o,r].concat(C.slice(1)),o=f[6],r=f[7]):(f=[o,r,o,r,u,d,u,d],o=u,r=d);var w=h(p,f,i);if(i)m+=w;else{for(var S=0,T=w.length;T>S;S++)w[S].segment1=g,w[S].segment2=b,w[S].bez1=p,w[S].bez2=f;m=m.concat(w)}}}}}return m}function f(t,e,n,i,a,s){null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+i,this.e=+a,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function m(){return this.x+M+this.y+M+this.width+" × "+this.height}function g(t,e,n,i,a,s){function o(t){return((d*t+u)*t+c)*t}function r(t,e){var n=l(t,e);return((f*n+p)*n+h)*n}function l(t,e){var n,i,a,s,r,l;for(a=t,l=0;8>l;l++){if(s=o(a)-t,U(s)a)return n;if(a>i)return i;for(;i>n;){if(s=o(a),U(s-t)s?n=a:i=a,a=(i-n)/2+n}return a}var c=3*e,u=3*(i-e)-c,d=1-c-u,h=3*n,p=3*(a-n)-h,f=1-h-p;return r(t,1/(200*s))}function v(t,e){var n=[],i={};if(this.ms=e,this.times=1,t){for(var a in t)t[_](a)&&(i[J(a)]=t[a],n.push(J(a)));n.sort(dt)}this.anim=i,this.top=n[n.length-1],this.percents=n}function y(t,i,a,s,o,r){a=J(a);var l,c,u,d,h,p,m=t.ms,v={},y={},b={};if(s)for(C=0,S=le.length;S>C;C++){var x=le[C];if(x.el.id==i.id&&x.anim==t){x.percent!=a?(le.splice(C,1),u=1):c=x,i.attr(x.totalOrigin);break}}else s=+y;for(var C=0,S=t.percents.length;S>C;C++){if(t.percents[C]==a||t.percents[C]>s*t.top){a=t.percents[C],h=t.percents[C-1]||0,m=m/t.top*(a-h),d=t.percents[C+1],l=t.anim[a];break}s&&i.attr(t.anim[t.percents[C]])}if(l){if(c)c.initstatus=s,c.start=new Date-c.ms*s;else{for(var T in l)if(l[_](T)&&(it[_](T)||i.paper.customAttributes[_](T)))switch(v[T]=i.attr(T),null==v[T]&&(v[T]=nt[T]),y[T]=l[T],it[T]){case q:b[T]=(y[T]-v[T])/m;break;case"colour":v[T]=n.getRGB(v[T]);var D=n.getRGB(y[T]);b[T]={r:(D.r-v[T].r)/m,g:(D.g-v[T].g)/m,b:(D.b-v[T].b)/m};break;case"path":var k=Ft(v[T],y[T]),P=k[1];for(v[T]=k[0],b[T]=[],C=0,S=v[T].length;S>C;C++){b[T][C]=[0];for(var I=1,A=v[T][C].length;A>I;I++)b[T][C][I]=(P[C][I]-v[T][C][I])/m}break;case"transform":var j=i._,M=Ht(j[T],y[T]);if(M)for(v[T]=M.from,y[T]=M.to,b[T]=[],b[T].real=!0,C=0,S=v[T].length;S>C;C++)for(b[T][C]=[v[T][C][0]],I=1,A=v[T][C].length;A>I;I++)b[T][C][I]=(y[T][C][I]-v[T][C][I])/m;else{var F=i.matrix||new f,N={_:{transform:j.transform},getBBox:function(){return i.getBBox(1)}};v[T]=[F.a,F.b,F.c,F.d,F.e,F.f],Bt(N,y[T]),y[T]=N._.transform,b[T]=[(N.matrix.a-F.a)/m,(N.matrix.b-F.b)/m,(N.matrix.c-F.c)/m,(N.matrix.d-F.d)/m,(N.matrix.e-F.e)/m,(N.matrix.f-F.f)/m]}break;case"csv":var R=O(l[T])[L](w),B=O(v[T])[L](w);if("clip-rect"==T)for(v[T]=B,b[T]=[],C=B.length;C--;)b[T][C]=(R[C]-v[T][C])/m;y[T]=R;break;default:for(R=[][E](l[T]),B=[][E](v[T]),b[T]=[],C=i.paper.customAttributes[T].length;C--;)b[T][C]=((R[C]||0)-(B[C]||0))/m}var $=l.easing,H=n.easing_formulas[$];if(!H)if(H=O($).match(Q),H&&5==H.length){var U=H;H=function(t){return g(t,+U[1],+U[2],+U[3],+U[4],m)}}else H=pt;if(p=l.start||t.start||+new Date,x={anim:t,percent:a,timestamp:p,start:p+(t.del||0),status:0,initstatus:s||0,stop:!1,ms:m,easing:H,from:v,diff:b,to:y,el:i,callback:l.callback,prev:h,next:d,repeat:r||t.times,origin:i.attr(),totalOrigin:o},le.push(x),s&&!c&&!u&&(x.stop=!0,x.start=new Date-m*s,1==le.length))return ue();u&&(x.start=new Date-x.ms*s),1==le.length&&ce(ue)}e("raphael.anim.start."+i.id,i,t)}}function b(t){for(var e=0;ea;a++)for(l=t[a],s=1,r=l.length;r>s;s+=2)n=e.x(l[s],l[s+1]),i=e.y(l[s],l[s+1]),l[s]=n,l[s+1]=i;return t};if(n._g=D,n.type=D.win.SVGAngle||D.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==n.type){var yt,bt=D.doc.createElement("div");if(bt.innerHTML='',yt=bt.firstChild,yt.style.behavior="url(#default#VML)",!yt||"object"!=typeof yt.adj)return n.type=j;bt=null}n.svg=!(n.vml="VML"==n.type),n._Paper=P,n.fn=C=P.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(t,e){return e=R.call(e),"finite"==e?!K[_](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||X.call(t).slice(8,-1).toLowerCase()==e},n.angle=function(t,e,i,a,s,o){if(null==s){var r=t-i,l=e-a;return r||l?(180+180*B.atan2(-l,-r)/z+360)%360:0}return n.angle(t,e,s,o)-n.angle(i,a,s,o)},n.rad=function(t){return t%360*z/180},n.deg=function(t){return 180*t/z%360},n.snapTo=function(t,e,i){if(i=n.is(i,"finite")?i:10,n.is(t,Y)){for(var a=t.length;a--;)if(U(t[a]-e)<=i)return t[a]}else{t=+t;var s=e%t;if(i>s)return e-s;if(s>t-i)return e-s+t}return e};n.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*B.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});n.setWindow=function(t){e("raphael.setWindow",n,D.win,t),D.win=t,D.doc=D.win.document,n._engine.initWin&&n._engine.initWin(D.win)};var xt=function(t){if(n.vml){var e,i=/^\s+|\s+$/g;try{var a=new ActiveXObject("htmlfile");a.write(""),a.close(),e=a.body}catch(o){e=createPopup().document.body}var r=e.createTextRange();xt=s(function(t){try{e.style.color=O(t).replace(i,j);var n=r.queryCommandValue("ForeColor");return n=(255&n)<<16|65280&n|(16711680&n)>>>16,"#"+("000000"+n.toString(16)).slice(-6)}catch(a){return"none"}})}else{var l=D.doc.createElement("i");l.title="Raphaël Colour Picker",l.style.display="none",D.doc.body.appendChild(l),xt=s(function(t){return l.style.color=t,D.doc.defaultView.getComputedStyle(l,j).getPropertyValue("color")})}return xt(t)},Ct=function(){return"hsb("+[this.h,this.s,this.b]+")"},wt=function(){return"hsl("+[this.h,this.s,this.l]+")"},St=function(){return this.hex},Tt=function(t,e,i){if(null==e&&n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,e=t.g,t=t.r),null==e&&n.is(t,V)){var a=n.getRGB(t);t=a.r,e=a.g,i=a.b}return(t>1||e>1||i>1)&&(t/=255,e/=255,i/=255),[t,e,i]},_t=function(t,e,i,a){t*=255,e*=255,i*=255;var s={r:t,g:e,b:i,hex:n.rgb(t,e,i),toString:St};return n.is(a,"finite")&&(s.opacity=a),s};n.color=function(t){var e;return n.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):n.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(n.is(t,"string")&&(t=n.getRGB(t)),n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=St,t},n.hsb2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,t=t.h,i=t.o),t*=360;var a,s,o,r,l;return t=t%360/60,l=n*e,r=l*(1-U(t%2-1)),a=s=o=n-l,t=~~t,a+=[l,r,0,0,r,l][t],s+=[r,l,l,r,0,0][t],o+=[0,0,r,l,l,r][t],_t(a,s,o,i)},n.hsl2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var a,s,o,r,l;return t=t%360/60,l=2*e*(.5>n?n:1-n),r=l*(1-U(t%2-1)),a=s=o=n-l/2,t=~~t,a+=[l,r,0,0,r,l][t],s+=[r,l,l,r,0,0][t],o+=[0,0,r,l,l,r][t],_t(a,s,o,i)},n.rgb2hsb=function(t,e,n){n=Tt(t,e,n),t=n[0],e=n[1],n=n[2];var i,a,s,o;return s=$(t,e,n),o=s-H(t,e,n),i=0==o?null:s==t?(e-n)/o:s==e?(n-t)/o+2:(t-e)/o+4,i=(i+360)%6*60/360,a=0==o?0:o/s,{h:i,s:a,b:s,toString:Ct}},n.rgb2hsl=function(t,e,n){n=Tt(t,e,n),t=n[0],e=n[1],n=n[2];var i,a,s,o,r,l;return o=$(t,e,n),r=H(t,e,n),l=o-r,i=0==l?null:o==t?(e-n)/l:o==e?(n-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,s=(o+r)/2,a=0==l?0:.5>s?l/(2*s):l/(2-2*s),{h:i,s:a,l:s,toString:wt}},n._path2string=function(){return this.join(",").replace(ot,"$1")};n._preload=function(t,e){var n=D.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},n.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(n),n.src=t};n.getRGB=s(function(t){if(!t||(t=O(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!(st[_](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=xt(t));var e,i,a,s,r,l,c=t.match(G);return c?(c[2]&&(a=tt(c[2].substring(5),16),i=tt(c[2].substring(3,5),16),e=tt(c[2].substring(1,3),16)),c[3]&&(a=tt((r=c[3].charAt(3))+r,16),i=tt((r=c[3].charAt(2))+r,16),e=tt((r=c[3].charAt(1))+r,16)),c[4]&&(l=c[4][L](at),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),a=J(l[2]),"%"==l[2].slice(-1)&&(a*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(s=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100)),c[5]?(l=c[5][L](at),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),a=J(l[2]),"%"==l[2].slice(-1)&&(a*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(s=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsb2rgb(e,i,a,s)):c[6]?(l=c[6][L](at),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),a=J(l[2]),"%"==l[2].slice(-1)&&(a*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(s=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(s/=100),n.hsl2rgb(e,i,a,s)):(c={r:e,g:i,b:a,toString:o},c.hex="#"+(16777216|a|i<<8|e<<16).toString(16).slice(1),n.is(s,"finite")&&(c.opacity=s),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},n),n.hsb=s(function(t,e,i){return n.hsb2rgb(t,e,i).hex}),n.hsl=s(function(t,e,i){return n.hsl2rgb(t,e,i).hex}),n.rgb=s(function(t,e,n){return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)}),n.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(t){if(!t)return null;var e=Dt(t);if(e.arr)return Pt(e.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},a=[];return n.is(t,Y)&&n.is(t[0],Y)&&(a=Pt(t)),a.length||O(t).replace(rt,function(t,e,n){var s=[],o=e.toLowerCase();if(n.replace(ct,function(t,e){e&&s.push(+e)}),"m"==o&&s.length>2&&(a.push([e][E](s.splice(0,2))),o="l",e="m"==e?"l":"L"),"r"==o)a.push([e][E](s));else for(;s.length>=i[o]&&(a.push([e][E](s.splice(0,i[o]))),i[o]););}),a.toString=n._path2string,e.arr=Pt(a),a},n.parseTransformString=s(function(t){if(!t)return null;var e=[];return n.is(t,Y)&&n.is(t[0],Y)&&(e=Pt(t)),e.length||O(t).replace(lt,function(t,n,i){var a=[];R.call(n);i.replace(ct,function(t,e){e&&a.push(+e)}),e.push([n][E](a))}),e.toString=n._path2string,e});var Dt=function(t){var e=Dt.ps=Dt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[_](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};n.findDotsAtSegment=function(t,e,n,i,a,s,o,r,l){var c=1-l,u=W(c,3),d=W(c,2),h=l*l,p=h*l,f=u*t+3*d*l*n+3*c*l*l*a+p*o,m=u*e+3*d*l*i+3*c*l*l*s+p*r,g=t+2*l*(n-t)+h*(a-2*n+t),v=e+2*l*(i-e)+h*(s-2*i+e),y=n+2*l*(a-n)+h*(o-2*a+n),b=i+2*l*(s-i)+h*(r-2*s+i),x=c*t+l*n,C=c*e+l*i,w=c*a+l*o,S=c*s+l*r,T=90-180*B.atan2(g-y,v-b)/z;return(g>y||b>v)&&(T+=180),{x:f,y:m,m:{x:g,y:v},n:{x:y,y:b},start:{x:x,y:C},end:{x:w,y:S},alpha:T}},n.bezierBBox=function(t,e,i,a,s,o,r,l){n.is(t,"array")||(t=[t,e,i,a,s,o,r,l]);var c=Lt.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},n.isPointInsideBBox=function(t,e,n){return e>=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},n.isBBoxIntersect=function(t,e){var i=n.isPointInsideBBox;return i(e,t.x,t.y)||i(e,t.x2,t.y)||i(e,t.x,t.y2)||i(e,t.x2,t.y2)||i(t,e.x,e.y)||i(t,e.x2,e.y)||i(t,e.x,e.y2)||i(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},n.pathIntersection=function(t,e){return p(t,e)},n.pathIntersectionNumber=function(t,e){return p(t,e,1)},n.isPointInsidePath=function(t,e,i){var a=n.pathBBox(t);return n.isPointInsideBBox(a,e,i)&&p(t,[["M",e,i],["H",a.x2+10]],1)%2==1},n._removedFactory=function(t){return function(){e("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var kt=n.pathBBox=function(t){var e=Dt(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ft(t);for(var n,a=0,s=0,o=[],r=[],l=0,c=t.length;c>l;l++)if(n=t[l],"M"==n[0])a=n[1],s=n[2],o.push(a),r.push(s);else{var u=Lt(a,s,n[1],n[2],n[3],n[4],n[5],n[6]);o=o[E](u.min.x,u.max.x),r=r[E](u.min.y,u.max.y),a=n[5],s=n[6]}var d=H[I](0,o),h=H[I](0,r),p=$[I](0,o),f=$[I](0,r),m=p-d,g=f-h,v={x:d,y:h,x2:p,y2:f,width:m,height:g,cx:d+m/2,cy:h+g/2};return e.bbox=i(v),v},Pt=function(t){var e=i(t);return e.toString=n._path2string,e},It=n._pathToRelative=function(t){var e=Dt(t);if(e.rel)return Pt(e.rel);n.is(t,Y)&&n.is(t&&t[0],Y)||(t=n.parsePathString(t));var i=[],a=0,s=0,o=0,r=0,l=0;"M"==t[0][0]&&(a=t[0][1],s=t[0][2],o=a,r=s,l++,i.push(["M",a,s]));for(var c=l,u=t.length;u>c;c++){var d=i[c]=[],h=t[c];if(h[0]!=R.call(h[0]))switch(d[0]=R.call(h[0]),d[0]){case"a":d[1]=h[1],d[2]=h[2],d[3]=h[3],d[4]=h[4],d[5]=h[5],d[6]=+(h[6]-a).toFixed(3),d[7]=+(h[7]-s).toFixed(3);break;case"v":d[1]=+(h[1]-s).toFixed(3);break;case"m":o=h[1],r=h[2];default:for(var p=1,f=h.length;f>p;p++)d[p]=+(h[p]-(p%2?a:s)).toFixed(3)}else{d=i[c]=[],"m"==h[0]&&(o=h[1]+a,r=h[2]+s);for(var m=0,g=h.length;g>m;m++)i[c][m]=h[m]}var v=i[c].length;switch(i[c][0]){case"z":a=o,s=r;break;case"h":a+=+i[c][v-1];break;case"v":s+=+i[c][v-1];break;default:a+=+i[c][v-2],s+=+i[c][v-1]}}return i.toString=n._path2string,e.rel=Pt(i),i},Et=n._pathToAbsolute=function(t){var e=Dt(t);if(e.abs)return Pt(e.abs);if(n.is(t,Y)&&n.is(t&&t[0],Y)||(t=n.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],a=0,s=0,o=0,l=0,c=0;"M"==t[0][0]&&(a=+t[0][1],s=+t[0][2],o=a,l=s,c++,i[0]=["M",a,s]);for(var u,d,h=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=c,f=t.length;f>p;p++){if(i.push(u=[]),d=t[p],d[0]!=et.call(d[0]))switch(u[0]=et.call(d[0]),u[0]){case"A":u[1]=d[1],u[2]=d[2],u[3]=d[3],u[4]=d[4],u[5]=d[5],u[6]=+(d[6]+a),u[7]=+(d[7]+s);break;case"V":u[1]=+d[1]+s;break;case"H":u[1]=+d[1]+a;break;case"R":for(var m=[a,s][E](d.slice(1)),g=2,v=m.length;v>g;g++)m[g]=+m[g]+a,m[++g]=+m[g]+s;i.pop(),i=i[E](r(m,h));break;case"M":o=+d[1]+a,l=+d[2]+s;default:for(g=1,v=d.length;v>g;g++)u[g]=+d[g]+(g%2?a:s)}else if("R"==d[0])m=[a,s][E](d.slice(1)),i.pop(),i=i[E](r(m,h)),u=["R"][E](d.slice(-2));else for(var y=0,b=d.length;b>y;y++)u[y]=d[y];switch(u[0]){case"Z":a=o,s=l;break;case"H":a=u[1];break;case"V":s=u[1];break;case"M":o=u[u.length-2],l=u[u.length-1];default:a=u[u.length-2],s=u[u.length-1]}}return i.toString=n._path2string,e.abs=Pt(i),i},At=function(t,e,n,i){return[t,e,n,i,n,i]},jt=function(t,e,n,i,a,s){var o=1/3,r=2/3;return[o*t+r*n,o*e+r*i,o*a+r*n,o*s+r*i,a,s]},Mt=function(t,e,n,i,a,o,r,l,c,u){var d,h=120*z/180,p=z/180*(+a||0),f=[],m=s(function(t,e,n){var i=t*B.cos(n)-e*B.sin(n),a=t*B.sin(n)+e*B.cos(n);return{x:i,y:a}});if(u)T=u[0],_=u[1],w=u[2],S=u[3];else{d=m(t,e,-p),t=d.x,e=d.y,d=m(l,c,-p),l=d.x,c=d.y;var g=(B.cos(z/180*a),B.sin(z/180*a),(t-l)/2),v=(e-c)/2,y=g*g/(n*n)+v*v/(i*i);y>1&&(y=B.sqrt(y),n=y*n,i=y*i);var b=n*n,x=i*i,C=(o==r?-1:1)*B.sqrt(U((b*x-b*v*v-x*g*g)/(b*v*v+x*g*g))),w=C*n*v/i+(t+l)/2,S=C*-i*g/n+(e+c)/2,T=B.asin(((e-S)/i).toFixed(9)),_=B.asin(((c-S)/i).toFixed(9));T=w>t?z-T:T,_=w>l?z-_:_,0>T&&(T=2*z+T),0>_&&(_=2*z+_),r&&T>_&&(T-=2*z),!r&&_>T&&(_-=2*z)}var D=_-T;if(U(D)>h){var k=_,P=l,I=c;_=T+h*(r&&_>T?1:-1),l=w+n*B.cos(_),c=S+i*B.sin(_),f=Mt(l,c,n,i,a,0,r,P,I,[_,k,w,S])}D=_-T;var A=B.cos(T),j=B.sin(T),M=B.cos(_),O=B.sin(_),F=B.tan(D/4),N=4/3*n*F,R=4/3*i*F,$=[t,e],H=[t+N*j,e-R*A],W=[l+N*O,c-R*M],q=[l,c];if(H[0]=2*$[0]-H[0],H[1]=2*$[1]-H[1],u)return[H,W,q][E](f);f=[H,W,q][E](f).join()[L](",");for(var V=[],Y=0,X=f.length;X>Y;Y++)V[Y]=Y%2?m(f[Y-1],f[Y],p).y:m(f[Y],f[Y+1],p).x;return V},Ot=function(t,e,n,i,a,s,o,r,l){var c=1-l;return{x:W(c,3)*t+3*W(c,2)*l*n+3*c*l*l*a+W(l,3)*o,y:W(c,3)*e+3*W(c,2)*l*i+3*c*l*l*s+W(l,3)*r}},Lt=s(function(t,e,n,i,a,s,o,r){var l,c=a-2*n+t-(o-2*a+n),u=2*(n-t)-2*(a-n),d=t-n,h=(-u+B.sqrt(u*u-4*c*d))/2/c,p=(-u-B.sqrt(u*u-4*c*d))/2/c,f=[e,r],m=[t,o];return U(h)>"1e12"&&(h=.5),U(p)>"1e12"&&(p=.5),h>0&&1>h&&(l=Ot(t,e,n,i,a,s,o,r,h),m.push(l.x),f.push(l.y)),p>0&&1>p&&(l=Ot(t,e,n,i,a,s,o,r,p),m.push(l.x),f.push(l.y)),c=s-2*i+e-(r-2*s+i),u=2*(i-e)-2*(s-i),d=e-i,h=(-u+B.sqrt(u*u-4*c*d))/2/c,p=(-u-B.sqrt(u*u-4*c*d))/2/c,U(h)>"1e12"&&(h=.5),U(p)>"1e12"&&(p=.5),h>0&&1>h&&(l=Ot(t,e,n,i,a,s,o,r,h),m.push(l.x),f.push(l.y)),p>0&&1>p&&(l=Ot(t,e,n,i,a,s,o,r,p),m.push(l.x),f.push(l.y)),{min:{x:H[I](0,m),y:H[I](0,f)},max:{x:$[I](0,m),y:$[I](0,f)}}}),Ft=n._path2curve=s(function(t,e){var n=!e&&Dt(t);if(!e&&n.curve)return Pt(n.curve);for(var i=Et(t),a=e&&Et(e),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=(function(t,e,n){var i,a,s={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in s)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][E](Mt[I](0,[e.x,e.y][E](t.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*e.x-e.bx,a=2*e.y-e.by):(i=e.x,a=e.y),t=["C",i,a][E](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][E](jt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][E](jt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][E](At(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][E](At(e.x,e.y,t[1],e.y));break;case"V":t=["C"][E](At(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][E](At(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)t.splice(e++,0,["C"][E](n.splice(0,6)));t.splice(e,1),d=$(i.length,a&&a.length||0)}},c=function(t,e,n,s,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",s.x,s.y]),n.bx=0,n.by=0,n.x=t[o][1],n.y=t[o][2],d=$(i.length,a&&a.length||0))},u=0,d=$(i.length,a&&a.length||0);d>u;u++){i[u]=r(i[u],s),l(i,u),a&&(a[u]=r(a[u],o)),a&&l(a,u),c(i,a,s,o,u),c(a,i,o,s,u);var h=i[u],p=a&&a[u],f=h.length,m=a&&p.length;s.x=h[f-2],s.y=h[f-1],s.bx=J(h[f-4])||s.x,s.by=J(h[f-3])||s.y,o.bx=a&&(J(p[m-4])||o.x),o.by=a&&(J(p[m-3])||o.y),o.x=a&&p[m-2],o.y=a&&p[m-1]}return a||(n.curve=Pt(i)),a?[i,a]:i},null,Pt),Nt=(n._parseDots=s(function(t){for(var e=[],i=0,a=t.length;a>i;i++){var s={},o=t[i].match(/^([^:]*):?([\d\.]*)/);if(s.color=n.getRGB(o[1]),s.color.error)return null;s.color=s.color.hex,o[2]&&(s.offset=o[2]+"%"),e.push(s)}for(i=1,a=e.length-1;a>i;i++)if(!e[i].offset){for(var r=J(e[i-1].offset||0),l=0,c=i+1;a>c;c++)if(e[c].offset){l=e[c].offset;break}l||(l=100,c=a),l=J(l);for(var u=(l-r)/(c-i+1);c>i;i++)r+=u,e[i].offset=r+"%"}return e}),n._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Rt=(n._tofront=function(t,e){e.top!==t&&(Nt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},n._toback=function(t,e){e.bottom!==t&&(Nt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},n._insertafter=function(t,e,n){Nt(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},n._insertbefore=function(t,e,n){Nt(t,n),e==n.bottom&&(n.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},n.toMatrix=function(t,e){var n=kt(t),i={_:{transform:j},getBBox:function(){return n}};return Bt(i,e),i.matrix}),Bt=(n.transformPath=function(t,e){return vt(t,Rt(t,e))},n._extractTransform=function(t,e){if(null==e)return t._.transform;e=O(e).replace(/\.{3}|\u2026/g,t._.transform||j);var i=n.parseTransformString(e),a=0,s=0,o=0,r=1,l=1,c=t._,u=new f;if(c.transform=i||[],i)for(var d=0,h=i.length;h>d;d++){var p,m,g,v,y,b=i[d],x=b.length,C=O(b[0]).toLowerCase(),w=b[0]!=C,S=w?u.invert():0;"t"==C&&3==x?w?(p=S.x(0,0),m=S.y(0,0),g=S.x(b[1],b[2]),v=S.y(b[1],b[2]),u.translate(g-p,v-m)):u.translate(b[1],b[2]):"r"==C?2==x?(y=y||t.getBBox(1),u.rotate(b[1],y.x+y.width/2,y.y+y.height/2),a+=b[1]):4==x&&(w?(g=S.x(b[2],b[3]),v=S.y(b[2],b[3]),u.rotate(b[1],g,v)):u.rotate(b[1],b[2],b[3]),a+=b[1]):"s"==C?2==x||3==x?(y=y||t.getBBox(1),u.scale(b[1],b[x-1],y.x+y.width/2,y.y+y.height/2),r*=b[1],l*=b[x-1]):5==x&&(w?(g=S.x(b[3],b[4]),v=S.y(b[3],b[4]),u.scale(b[1],b[2],g,v)):u.scale(b[1],b[2],b[3],b[4]),r*=b[1],l*=b[2]):"m"==C&&7==x&&u.add(b[1],b[2],b[3],b[4],b[5],b[6]),c.dirtyT=1,
-t.matrix=u}t.matrix=u,c.sx=r,c.sy=l,c.deg=a,c.dx=s=u.e,c.dy=o=u.f,1==r&&1==l&&!a&&c.bbox?(c.bbox.x+=+s,c.bbox.y+=+o):c.dirtyT=1}),$t=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Ht=n._equaliseTransform=function(t,e){e=O(e).replace(/\.{3}|\u2026/g,t),t=n.parseTransformString(t)||[],e=n.parseTransformString(e)||[];for(var i,a,s,o,r=$(t.length,e.length),l=[],c=[],u=0;r>u;u++){if(s=t[u]||$t(e[u]),o=e[u]||$t(s),s[0]!=o[0]||"r"==s[0].toLowerCase()&&(s[2]!=o[2]||s[3]!=o[3])||"s"==s[0].toLowerCase()&&(s[3]!=o[3]||s[4]!=o[4]))return;for(l[u]=[],c[u]=[],i=0,a=$(s.length,o.length);a>i;i++)i in s&&(l[u][i]=s[i]),i in o&&(c[u][i]=o[i])}return{from:l,to:c}};n._getContainer=function(t,e,i,a){var s;return s=null!=a||n.is(t,"object")?t:D.doc.getElementById(t),null!=s?s.tagName?null==e?{container:s,width:s.style.pixelWidth||s.offsetWidth,height:s.style.pixelHeight||s.offsetHeight}:{container:s,width:e,height:i}:{container:1,x:t,y:e,width:i,height:a}:void 0},n.pathToRelative=It,n._engine={},n.path2curve=Ft,n.matrix=function(t,e,n,i,a,s){return new f(t,e,n,i,a,s)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var n=B.sqrt(e(t));t[0]&&(t[0]/=n),t[1]&&(t[1]/=n)}t.add=function(t,e,n,i,a,s){var o,r,l,c,u=[[],[],[]],d=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],h=[[t,n,a],[e,i,s],[0,0,1]];for(t&&t instanceof f&&(h=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),o=0;3>o;o++)for(r=0;3>r;r++){for(c=0,l=0;3>l;l++)c+=d[o][l]*h[l][r];u[o][r]=c}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new f(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new f(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,n,i){null==e&&(e=t),(n||i)&&this.add(1,0,0,1,n,i),this.add(t,0,0,e,0,0),(n||i)&&this.add(1,0,0,1,-n,-i)},t.rotate=function(t,e,i){t=n.rad(t),e=e||0,i=i||0;var a=+B.cos(t).toFixed(9),s=+B.sin(t).toFixed(9);this.add(a,s,-s,a,e,i),this.add(1,0,0,1,-e,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[O.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return n.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()},t.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')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var a=[[this.a,this.c],[this.b,this.d]];t.scalex=B.sqrt(e(a[0])),i(a[0]),t.shear=a[0][0]*a[1][0]+a[0][1]*a[1][1],a[1]=[a[1][0]-a[0][0]*t.shear,a[1][1]-a[0][1]*t.shear],t.scaley=B.sqrt(e(a[1])),i(a[1]),t.shear/=t.scaley;var s=-a[0][1],o=a[1][1];return 0>o?(t.rotate=n.deg(B.acos(o)),0>s&&(t.rotate=360-t.rotate)):t.rotate=n.deg(B.asin(s)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[L]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:j)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:j)+(e.rotate?"r"+[e.rotate,0,0]:j)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(f.prototype);var Ut=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);C.safari="Apple Computer, Inc."==navigator.vendor&&(Ut&&Ut[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ut&&Ut[1]<8?function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:ht;for(var Wt=function(){this.returnValue=!1},zt=function(){return this.originalEvent.preventDefault()},qt=function(){this.cancelBubble=!0},Vt=function(){return this.originalEvent.stopPropagation()},Yt=function(t){var e=D.doc.documentElement.scrollTop||D.doc.body.scrollTop,n=D.doc.documentElement.scrollLeft||D.doc.body.scrollLeft;return{x:t.clientX+n,y:t.clientY+e}},Xt=function(){return D.doc.addEventListener?function(t,e,n,i){var a=function(t){var e=Yt(t);return n.call(i,t,e.x,e.y)};if(t.addEventListener(e,a,!1),A&&N[e]){var s=function(e){for(var a=Yt(e),s=e,o=0,r=e.targetTouches&&e.targetTouches.length;r>o;o++)if(e.targetTouches[o].target==t){e=e.targetTouches[o],e.originalEvent=s,e.preventDefault=zt,e.stopPropagation=Vt;break}return n.call(i,e,a.x,a.y)};t.addEventListener(N[e],s,!1)}return function(){return t.removeEventListener(e,a,!1),A&&N[e]&&t.removeEventListener(N[e],a,!1),!0}}:D.doc.attachEvent?function(t,e,n,i){var a=function(t){t=t||D.win.event;var e=D.doc.documentElement.scrollTop||D.doc.body.scrollTop,a=D.doc.documentElement.scrollLeft||D.doc.body.scrollLeft,s=t.clientX+a,o=t.clientY+e;return t.preventDefault=t.preventDefault||Wt,t.stopPropagation=t.stopPropagation||qt,n.call(i,t,s,o)};t.attachEvent("on"+e,a);var s=function(){return t.detachEvent("on"+e,a),!0};return s}:void 0}(),Gt=[],Kt=function(t){for(var n,i=t.clientX,a=t.clientY,s=D.doc.documentElement.scrollTop||D.doc.body.scrollTop,o=D.doc.documentElement.scrollLeft||D.doc.body.scrollLeft,r=Gt.length;r--;){if(n=Gt[r],A&&t.touches){for(var l,c=t.touches.length;c--;)if(l=t.touches[c],l.identifier==n.el._drag.id){i=l.clientX,a=l.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u,d=n.el.node,h=d.nextSibling,p=d.parentNode,f=d.style.display;D.win.opera&&p.removeChild(d),d.style.display="none",u=n.el.paper.getElementByPoint(i,a),d.style.display=f,D.win.opera&&(h?p.insertBefore(d,h):p.appendChild(d)),u&&e("raphael.drag.over."+n.el.id,n.el,u),i+=o,a+=s,e("raphael.drag.move."+n.el.id,n.move_scope||n.el,i-n.el._drag.x,a-n.el._drag.y,i,a,t)}},Qt=function(t){n.unmousemove(Kt).unmouseup(Qt);for(var i,a=Gt.length;a--;)i=Gt[a],i.el._drag={},e("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,t);Gt=[]},Zt=n.el={},Jt=F.length;Jt--;)!function(t){n[t]=Zt[t]=function(e,i){return n.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Xt(this.shape||this.node||D.doc,t,e,i||this)})),this},n["un"+t]=Zt["un"+t]=function(e){for(var i=this.events||[],a=i.length;a--;)i[a].name!=t||!n.is(e,"undefined")&&i[a].f!=e||(i[a].unbind(),i.splice(a,1),!i.length&&delete this.events);return this}}(F[Jt]);Zt.data=function(t,i){var a=ut[this.id]=ut[this.id]||{};if(0==arguments.length)return a;if(1==arguments.length){if(n.is(t,"object")){for(var s in t)t[_](s)&&this.data(s,t[s]);return this}return e("raphael.data.get."+this.id,this,a[t],t),a[t]}return a[t]=i,e("raphael.data.set."+this.id,this,i,t),this},Zt.removeData=function(t){return null==t?ut[this.id]={}:ut[this.id]&&delete ut[this.id][t],this},Zt.getData=function(){return i(ut[this.id]||{})},Zt.hover=function(t,e,n,i){return this.mouseover(t,n).mouseout(e,i||n)},Zt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var te=[];Zt.drag=function(t,i,a,s,o,r){function l(l){(l.originalEvent||l).preventDefault();var c=l.clientX,u=l.clientY,d=D.doc.documentElement.scrollTop||D.doc.body.scrollTop,h=D.doc.documentElement.scrollLeft||D.doc.body.scrollLeft;if(this._drag.id=l.identifier,A&&l.touches)for(var p,f=l.touches.length;f--;)if(p=l.touches[f],this._drag.id=p.identifier,p.identifier==this._drag.id){c=p.clientX,u=p.clientY;break}this._drag.x=c+h,this._drag.y=u+d,!Gt.length&&n.mousemove(Kt).mouseup(Qt),Gt.push({el:this,move_scope:s,start_scope:o,end_scope:r}),i&&e.on("raphael.drag.start."+this.id,i),t&&e.on("raphael.drag.move."+this.id,t),a&&e.on("raphael.drag.end."+this.id,a),e("raphael.drag.start."+this.id,o||s||this,l.clientX+h,l.clientY+d,l)}return this._drag={},te.push({el:this,start:l}),this.mousedown(l),this},Zt.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},Zt.undrag=function(){for(var t=te.length;t--;)te[t].el==this&&(this.unmousedown(te[t].start),te.splice(t,1),e.unbind("raphael.drag.*."+this.id));!te.length&&n.unmousemove(Kt).unmouseup(Qt),Gt=[]},C.circle=function(t,e,i){var a=n._engine.circle(this,t||0,e||0,i||0);return this.__set__&&this.__set__.push(a),a},C.rect=function(t,e,i,a,s){var o=n._engine.rect(this,t||0,e||0,i||0,a||0,s||0);return this.__set__&&this.__set__.push(o),o},C.ellipse=function(t,e,i,a){var s=n._engine.ellipse(this,t||0,e||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},C.path=function(t){t&&!n.is(t,V)&&!n.is(t[0],Y)&&(t+=j);var e=n._engine.path(n.format[I](n,arguments),this);return this.__set__&&this.__set__.push(e),e},C.image=function(t,e,i,a,s){var o=n._engine.image(this,t||"about:blank",e||0,i||0,a||0,s||0);return this.__set__&&this.__set__.push(o),o},C.text=function(t,e,i){var a=n._engine.text(this,t||0,e||0,O(i));return this.__set__&&this.__set__.push(a),a},C.set=function(t){!n.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new he(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},C.setStart=function(t){this.__set__=t||this.set()},C.setFinish=function(){var t=this.__set__;return delete this.__set__,t},C.setSize=function(t,e){return n._engine.setSize.call(this,t,e)},C.setViewBox=function(t,e,i,a,s){return n._engine.setViewBox.call(this,t,e,i,a,s)},C.top=C.bottom=null,C.raphael=n;var ee=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,i=n.body,a=n.documentElement,s=a.clientTop||i.clientTop||0,o=a.clientLeft||i.clientLeft||0,r=e.top+(D.win.pageYOffset||a.scrollTop||i.scrollTop)-s,l=e.left+(D.win.pageXOffset||a.scrollLeft||i.scrollLeft)-o;return{y:r,x:l}};C.getElementByPoint=function(t,e){var n=this,i=n.canvas,a=D.doc.elementFromPoint(t,e);if(D.win.opera&&"svg"==a.tagName){var s=ee(i),o=i.createSVGRect();o.x=t-s.x,o.y=e-s.y,o.width=o.height=1;var r=i.getIntersectionList(o,null);r.length&&(a=r[r.length-1])}if(!a)return null;for(;a.parentNode&&a!=i.parentNode&&!a.raphael;)a=a.parentNode;return a==n.canvas.parentNode&&(a=i),a=a&&a.raphael?n.getById(a.raphaelid):null},C.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(i){n.isBBoxIntersect(i.getBBox(),t)&&e.push(i)}),e},C.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},C.forEach=function(t,e){for(var n=this.bottom;n;){if(t.call(e,n)===!1)return this;n=n.next}return this},C.getElementsByPoint=function(t,e){var n=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&n.push(i)}),n},Zt.isPointInside=function(t,e){var i=this.realPath=gt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=n.transformPath(i,this.attr("transform"))),n.isPointInsidePath(i,t,e)},Zt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=gt[this.type](this),e.bboxwt=kt(this.realPath),e.bboxwt.toString=m,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=gt[this.type](this)),e.bbox=kt(vt(this.realPath,this.matrix)),e.bbox.toString=m,e.dirty=e.dirtyT=0),e.bbox)},Zt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Zt.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},n=e.width/2,i=this.paper,a=i.set(),s=this.realPath||gt[this.type](this);s=this.matrix?vt(s,this.matrix):s;for(var o=1;n+1>o;o++)a.push(i.path(s).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/n*o).toFixed(3),opacity:+(e.opacity/n).toFixed(3)}));return a.insertBefore(this).translate(e.offsetx,e.offsety)};var ne=function(t,e,i,a,s,o,r,l,d){return null==d?c(t,e,i,a,s,o,r,l):n.findDotsAtSegment(t,e,i,a,s,o,r,l,u(t,e,i,a,s,o,r,l,d))},ie=function(t,e){return function(i,a,s){i=Ft(i);for(var o,r,l,c,u,d="",h={},p=0,f=0,m=i.length;m>f;f++){if(l=i[f],"M"==l[0])o=+l[1],r=+l[2];else{if(c=ne(o,r,l[1],l[2],l[3],l[4],l[5],l[6]),p+c>a){if(e&&!h.start){if(u=ne(o,r,l[1],l[2],l[3],l[4],l[5],l[6],a-p),d+=["C"+u.start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],s)return d;h.start=d,d=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=c,o=+l[5],r=+l[6];continue}if(!t&&!e)return u=ne(o,r,l[1],l[2],l[3],l[4],l[5],l[6],a-p),{x:u.x,y:u.y,alpha:u.alpha}}p+=c,o=+l[5],r=+l[6]}d+=l.shift()+l}return h.end=d,u=t?p:e?h:n.findDotsAtSegment(o,r,l[0],l[1],l[2],l[3],l[4],l[5],1),u.alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},ae=ie(1),se=ie(),oe=ie(0,1);n.getTotalLength=ae,n.getPointAtLength=se,n.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return oe(t,e).end;var i=oe(t,n,1);return e?oe(i,e).end:i},Zt.getTotalLength=function(){var t=this.getPath();return t?this.node.getTotalLength?this.node.getTotalLength():ae(t):void 0},Zt.getPointAtLength=function(t){var e=this.getPath();return e?se(e,t):void 0},Zt.getPath=function(){var t,e=n._getPath[this.type];return"text"!=this.type&&"set"!=this.type?(e&&(t=e(this)),t):void 0},Zt.getSubpath=function(t,e){var i=this.getPath();return i?n.getSubpath(i,t,e):void 0};var re=n.easing_formulas={linear:function(t){return t},"<":function(t){return W(t,1.7)},">":function(t){return W(t,.48)},"<>":function(t){var e=.48-t/1.04,n=B.sqrt(.1734+e*e),i=n-e,a=W(U(i),1/3)*(0>i?-1:1),s=-n-e,o=W(U(s),1/3)*(0>s?-1:1),r=a+o+.5;return 3*(1-r)*r*r+r*r*r},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:W(2,-10*t)*B.sin(2*(t-.075)*z/.3)+1},bounce:function(t){var e,n=7.5625,i=2.75;return 1/i>t?e=n*t*t:2/i>t?(t-=1.5/i,e=n*t*t+.75):2.5/i>t?(t-=2.25/i,e=n*t*t+.9375):(t-=2.625/i,e=n*t*t+.984375),e}};re.easeIn=re["ease-in"]=re["<"],re.easeOut=re["ease-out"]=re[">"],re.easeInOut=re["ease-in-out"]=re["<>"],re["back-in"]=re.backIn,re["back-out"]=re.backOut;var le=[],ce=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},ue=function(){for(var t=+new Date,i=0;ir))if(l>r){var g=c(r/l);for(var v in u)if(u[_](v)){switch(it[v]){case q:s=+u[v]+g*l*d[v];break;case"colour":s="rgb("+[de(Z(u[v].r+g*l*d[v].r)),de(Z(u[v].g+g*l*d[v].g)),de(Z(u[v].b+g*l*d[v].b))].join(",")+")";break;case"path":s=[];for(var b=0,x=u[v].length;x>b;b++){s[b]=[u[v][b][0]];for(var C=1,w=u[v][b].length;w>C;C++)s[b][C]=+u[v][b][C]+g*l*d[v][b][C];s[b]=s[b].join(M)}s=s.join(M);break;case"transform":if(d[v].real)for(s=[],b=0,x=u[v].length;x>b;b++)for(s[b]=[u[v][b][0]],C=1,w=u[v][b].length;w>C;C++)s[b][C]=u[v][b][C]+g*l*d[v][b][C];else{var S=function(t){return+u[v][t]+g*l*d[v][t]};s=[["m",S(0),S(1),S(2),S(3),S(4),S(5)]]}break;case"csv":if("clip-rect"==v)for(s=[],b=4;b--;)s[b]=+u[v][b]+g*l*d[v][b];break;default:var T=[][E](u[v]);for(s=[],b=p.paper.customAttributes[v].length;b--;)s[b]=+T[b]+g*l*d[v][b]}f[v]=s}p.attr(f),function(t,n,i){setTimeout(function(){e("raphael.anim.frame."+t,n,i)})}(p.id,p,a.anim)}else{if(function(t,i,a){setTimeout(function(){e("raphael.anim.frame."+i.id,i,a),e("raphael.anim.finish."+i.id,i,a),n.is(t,"function")&&t.call(i)})}(a.callback,p,a.anim),p.attr(h),le.splice(i--,1),a.repeat>1&&!a.next){for(o in h)h[_](o)&&(m[o]=a.totalOrigin[o]);a.el.attr(m),y(a.anim,a.el,a.anim.percents[0],null,a.totalOrigin,a.repeat-1)}a.next&&!a.stop&&y(a.anim,a.el,a.next,null,a.totalOrigin,a.repeat)}}}n.svg&&p&&p.paper&&p.paper.safari(),le.length&&ce(ue)},de=function(t){return t>255?255:0>t?0:t};Zt.animateWith=function(t,e,i,a,s,o){var r=this;if(r.removed)return o&&o.call(r),r;var l=i instanceof v?i:n.animation(i,a,s,o);y(l,r,l.percents[0],null,r.attr());for(var c=0,u=le.length;u>c;c++)if(le[c].anim==e&&le[c].el==t){le[u-1].start=le[c].start;break}return r},Zt.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},v.prototype.delay=function(t){var e=new v(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},v.prototype.repeat=function(t){var e=new v(this.anim,this.ms);return e.del=this.del,e.times=B.floor($(t,0))||1,e},n.animation=function(t,e,i,a){if(t instanceof v)return t;(n.is(i,"function")||!i)&&(a=a||i||null,i=null),t=Object(t),e=+e||0;var s,o,r={};for(o in t)t[_](o)&&J(o)!=o&&J(o)+"%"!=o&&(s=!0,r[o]=t[o]);return s?(i&&(r.easing=i),a&&(r.callback=a),new v({100:r},e)):new v(t,e)},Zt.animate=function(t,e,i,a){var s=this;if(s.removed)return a&&a.call(s),s;var o=t instanceof v?t:n.animation(t,e,i,a);return y(o,s,o.percents[0],null,s.attr()),s},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,H(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,i,a=[],s=0;if(null!=e)return y(t,this,-1,H(e,1)),this;for(n=le.length;n>s;s++)if(i=le[s],i.el.id==this.id&&(!t||i.anim==t)){if(t)return i.status;a.push({anim:i.anim,status:i.status})}return t?0:a},Zt.pause=function(t){for(var n=0;ne;e++)!t[e]||t[e].constructor!=Zt.constructor&&t[e].constructor!=he||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},pe=he.prototype;pe.push=function(){for(var t,e,n=0,i=arguments.length;i>n;n++)t=arguments[n],!t||t.constructor!=Zt.constructor&&t.constructor!=he||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},pe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},pe.forEach=function(t,e){for(var n=0,i=this.items.length;i>n;n++)if(t.call(e,this.items[n],n)===!1)return this;return this};for(var fe in Zt)Zt[_](fe)&&(pe[fe]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t][I](n,e)})}}(fe));return pe.attr=function(t,e){if(t&&n.is(t,Y)&&n.is(t[0],"object"))for(var i=0,a=t.length;a>i;i++)this.items[i].attr(t[i]);else for(var s=0,o=this.items.length;o>s;s++)this.items[s].attr(t,e);return this},pe.clear=function(){for(;this.length;)this.pop()},pe.splice=function(t,e){t=0>t?$(this.length+t,0):t,e=$(0,H(this.length-t,e));var n,i=[],a=[],s=[];for(n=2;nn;n++)a.push(this[t+n]);for(;nn?s[n]:i[n-o];for(n=this.items.length=this.length-=e-o;this[n];)delete this[n++];return new he(a)},pe.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0},pe.animate=function(t,e,i,a){(n.is(i,"function")||!i)&&(a=i||null);var s,o,r=this.items.length,l=r,c=this;if(!r)return this;a&&(o=function(){!--r&&a.call(c)}),i=n.is(i,V)?i:o;var u=n.animation(t,e,i,o);for(s=this.items[--l].animate(u);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(s,u,u),this.items[l]&&!this.items[l].removed||r--;return this},pe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},pe.getBBox=function(){for(var t=[],e=[],n=[],i=[],a=this.items.length;a--;)if(!this.items[a].removed){var s=this.items[a].getBBox();t.push(s.x),e.push(s.y),n.push(s.x+s.width),i.push(s.y+s.height)}return t=H[I](0,t),e=H[I](0,e),n=$[I](0,n),i=$[I](0,i),{x:t,y:e,x2:n,y2:i,width:n-t,height:i-e}},pe.clone=function(t){t=this.paper.set();for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},pe.toString=function(){return"Raphaël‘s set"},pe.glow=function(t){var e=this.paper.set();return this.forEach(function(n){var i=n.glow(t);null!=i&&i.forEach(function(t){e.push(t)})}),e},pe.isPointInside=function(t,e){var n=!1;return this.forEach(function(i){return i.isPointInside(t,e)?(n=!0,!1):void 0}),n},n.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},n=t.face["font-family"];for(var i in t.face)t.face[_](i)&&(e.face[i]=t.face[i]);if(this.fonts[n]?this.fonts[n].push(e):this.fonts[n]=[e],!t.svg){e.face["units-per-em"]=tt(t.face["units-per-em"],10);for(var a in t.glyphs)if(t.glyphs[_](a)){var s=t.glyphs[a];if(e.glyphs[a]={w:s.w,k:{},d:s.d&&"M"+s.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},s.k)for(var o in s.k)s[_](o)&&(e.glyphs[a].k[o]=s.k[o])}}return t},C.getFont=function(t,e,i,a){if(a=a||"normal",i=i||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,n.fonts){var s=n.fonts[t];if(!s){var o=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,j)+"(\\s|$)","i");for(var r in n.fonts)if(n.fonts[_](r)&&o.test(r)){s=n.fonts[r];break}}var l;if(s)for(var c=0,u=s.length;u>c&&(l=s[c],l.face["font-weight"]!=e||l.face["font-style"]!=i&&l.face["font-style"]||l.face["font-stretch"]!=a);c++);return l}},C.print=function(t,e,i,a,s,o,r,l){o=o||"middle",r=$(H(r||0,1),-1),l=$(H(l||1,3),1);var c,u=O(i)[L](j),d=0,h=0,p=j;if(n.is(a,"string")&&(a=this.getFont(a)),a){c=(s||16)/a.face["units-per-em"];for(var f=a.face.bbox[L](w),m=+f[0],g=f[3]-f[1],v=0,y=+f[1]+("baseline"==o?g+ +a.face.descent:g/2),b=0,x=u.length;x>b;b++){if("\n"==u[b])d=0,S=0,h=0,v+=g*l;else{var C=h&&a.glyphs[u[b-1]]||{},S=a.glyphs[u[b]];d+=h?(C.w||a.w)+(C.k&&C.k[u[b]]||0)+a.w*r:0,h=1}S&&S.d&&(p+=n.transformPath(S.d,["t",d*c,v*c,"s",c,c,m,y,"t",(t-m)/c,(e-y)/c]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},C.add=function(t){if(n.is(t,"array"))for(var e,i=this.set(),a=0,s=t.length;s>a;a++)e=t[a]||{},S[_](e.type)&&i.push(this[e.type]().attr(e));return i},n.format=function(t,e){var i=n.is(e,Y)?[0][E](e):arguments;return t&&n.is(t,V)&&i.length-1&&(t=t.replace(T,function(t,e){return null==i[++e]?j:i[e]})),t||j},n.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(t,n,i){var a=i;return n.replace(e,function(t,e,n,i,s){e=e||i,a&&(e in a&&(a=a[e]),"function"==typeof a&&s&&(a=a()))}),a=(null==a||a==i?t:a)+""};return function(e,i){return String(e).replace(t,function(t,e){return n(t,e,i)})}}(),n.ninja=function(){return k.was?D.win.Raphael=k.is:delete Raphael,n},n.st=pe,function(t,e,i){function a(){/in/.test(t.readyState)?setTimeout(a,9):n.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(e,i=function(){t.removeEventListener(e,i,!1),t.readyState="complete"},!1),t.readyState="loading"),a()}(document,"DOMContentLoaded"),e.on("raphael.DOMload",function(){x=!0}),function(){if(n.svg){var t="hasOwnProperty",e=String,i=parseFloat,a=parseInt,s=Math,o=s.max,r=s.abs,l=s.pow,c=/[, ]+/,u=n.eve,d="",h=" ",p="http://www.w3.org/1999/xlink",f={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"},m={};n.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var g=function(i,a){if(a){"string"==typeof i&&(i=g(i));for(var s in a)a[t](s)&&("xlink:"==s.substring(0,6)?i.setAttributeNS(p,s.substring(6),e(a[s])):i.setAttribute(s,e(a[s])))}else i=n._g.doc.createElementNS("http://www.w3.org/2000/svg",i),i.style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(t,a){var c="linear",u=t.id+a,h=.5,p=.5,f=t.node,m=t.paper,v=f.style,y=n._g.doc.getElementById(u);if(!y){if(a=e(a).replace(n._radial_gradient,function(t,e,n){if(c="radial",e&&n){h=i(e),p=i(n);var a=2*(p>.5)-1;l(h-.5,2)+l(p-.5,2)>.25&&(p=s.sqrt(.25-l(h-.5,2))*a+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*a)}return d}),a=a.split(/\s*\-\s*/),"linear"==c){var b=a.shift();if(b=-i(b),isNaN(b))return null;var x=[0,0,s.cos(n.rad(b)),s.sin(n.rad(b))],C=1/(o(r(x[2]),r(x[3]))||1);x[2]*=C,x[3]*=C,x[2]<0&&(x[0]=-x[2],x[2]=0),x[3]<0&&(x[1]=-x[3],x[3]=0)}var w=n._parseDots(a);if(!w)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&u!=t.gradient.id&&(m.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){y=g(c+"Gradient",{id:u}),t.gradient=y,g(y,"radial"==c?{fx:h,fy:p}:{x1:x[0],y1:x[1],x2:x[2],y2:x[3],gradientTransform:t.matrix.invert()}),m.defs.appendChild(y);for(var S=0,T=w.length;T>S;S++)y.appendChild(g("stop",{offset:w[S].offset?w[S].offset:S?"100%":"0%","stop-color":w[S].color||"#fff"}))}}return g(f,{fill:"url(#"+u+")",opacity:1,"fill-opacity":1}),v.fill=d,v.opacity=1,v.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},b=function(i,a,s){if("path"==i.type){for(var o,r,l,c,u,h=e(a).toLowerCase().split("-"),p=i.paper,v=s?"end":"start",y=i.node,b=i.attrs,x=b["stroke-width"],C=h.length,w="classic",S=3,T=3,_=5;C--;)switch(h[C]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=h[C];break;case"wide":T=5;break;case"narrow":T=2;break;case"long":S=5;break;case"short":S=2}if("open"==w?(S+=2,T+=2,_+=2,l=1,c=s?4:1,u={fill:"none",stroke:b.stroke}):(c=l=S/2,u={fill:b.stroke,stroke:"none"}),i._.arrows?s?(i._.arrows.endPath&&m[i._.arrows.endPath]--,i._.arrows.endMarker&&m[i._.arrows.endMarker]--):(i._.arrows.startPath&&m[i._.arrows.startPath]--,i._.arrows.startMarker&&m[i._.arrows.startMarker]--):i._.arrows={},"none"!=w){var D="raphael-marker-"+w,k="raphael-marker-"+v+w+S+T;n._g.doc.getElementById(D)?m[D]++:(p.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:f[w],id:D})),m[D]=1);var P,I=n._g.doc.getElementById(k);I?(m[k]++,P=I.getElementsByTagName("use")[0]):(I=g(g("marker"),{id:k,markerHeight:T,markerWidth:S,orient:"auto",refX:c,refY:T/2}),P=g(g("use"),{"xlink:href":"#"+D,transform:(s?"rotate(180 "+S/2+" "+T/2+") ":d)+"scale("+S/_+","+T/_+")","stroke-width":(1/((S/_+T/_)/2)).toFixed(4)}),I.appendChild(P),p.defs.appendChild(I),m[k]=1),g(P,u);var E=l*("diamond"!=w&&"oval"!=w);s?(o=i._.arrows.startdx*x||0,r=n.getTotalLength(b.path)-E*x):(o=E*x,r=n.getTotalLength(b.path)-(i._.arrows.enddx*x||0)),u={},u["marker-"+v]="url(#"+k+")",(r||o)&&(u.d=n.getSubpath(b.path,o,r)),g(y,u),i._.arrows[v+"Path"]=D,i._.arrows[v+"Marker"]=k,i._.arrows[v+"dx"]=E,i._.arrows[v+"Type"]=w,i._.arrows[v+"String"]=a}else s?(o=i._.arrows.startdx*x||0,r=n.getTotalLength(b.path)-o):(o=0,r=n.getTotalLength(b.path)-(i._.arrows.enddx*x||0)),i._.arrows[v+"Path"]&&g(y,{d:n.getSubpath(b.path,o,r)}),delete i._.arrows[v+"Path"],delete i._.arrows[v+"Marker"],delete i._.arrows[v+"dx"],delete i._.arrows[v+"Type"],delete i._.arrows[v+"String"];for(u in m)if(m[t](u)&&!m[u]){var A=n._g.doc.getElementById(u);A&&A.parentNode.removeChild(A)}}},x={"":[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]},C=function(t,n,i){if(n=x[e(n).toLowerCase()]){for(var a=t.attrs["stroke-width"]||"1",s={round:a,square:a,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,o=[],r=n.length;r--;)o[r]=n[r]*a+(r%2?1:-1)*s;g(t.node,{"stroke-dasharray":o.join(",")})}},w=function(i,s){var l=i.node,u=i.attrs,h=l.style.visibility;l.style.visibility="hidden";for(var f in s)if(s[t](f)){if(!n._availableAttrs[t](f))continue;var m=s[f];switch(u[f]=m,f){case"blur":i.blur(m);break;case"title":var x=l.getElementsByTagName("title");if(x.length&&(x=x[0]))x.firstChild.nodeValue=m;else{x=g("title");var w=n._g.doc.createTextNode(m);x.appendChild(w),l.appendChild(x)}break;case"href":case"target":var S=l.parentNode;if("a"!=S.tagName.toLowerCase()){var _=g("a");S.insertBefore(_,l),_.appendChild(l),S=_}"target"==f?S.setAttributeNS(p,"show","blank"==m?"new":m):S.setAttributeNS(p,f,m);break;case"cursor":l.style.cursor=m;break;case"transform":i.transform(m);break;case"arrow-start":b(i,m);break;case"arrow-end":b(i,m,1);break;case"clip-rect":var D=e(m).split(c);if(4==D.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var k=g("clipPath"),P=g("rect");k.id=n.createUUID(),g(P,{x:D[0],y:D[1],width:D[2],height:D[3]}),k.appendChild(P),i.paper.defs.appendChild(k),g(l,{"clip-path":"url(#"+k.id+")"}),i.clip=P}if(!m){var I=l.getAttribute("clip-path");if(I){var E=n._g.doc.getElementById(I.replace(/(^url\(#|\)$)/g,d));E&&E.parentNode.removeChild(E),g(l,{"clip-path":d}),delete i.clip}}break;case"path":"path"==i.type&&(g(l,{d:m?u.path=n._pathToAbsolute(m):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(f,m),i._.dirty=1,!u.fx)break;f="x",m=u.x;case"x":u.fx&&(m=-u.x-(u.width||0));case"rx":if("rx"==f&&"rect"==i.type)break;case"cx":l.setAttribute(f,m),i.pattern&&y(i),i._.dirty=1;break;case"height":if(l.setAttribute(f,m),i._.dirty=1,!u.fy)break;f="y",m=u.y;case"y":u.fy&&(m=-u.y-(u.height||0));case"ry":if("ry"==f&&"rect"==i.type)break;case"cy":l.setAttribute(f,m),i.pattern&&y(i),i._.dirty=1;break;case"r":"rect"==i.type?g(l,{rx:m,ry:m}):l.setAttribute(f,m),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(p,"href",m);break;case"stroke-width":(1!=i._.sx||1!=i._.sy)&&(m/=o(r(i._.sx),r(i._.sy))||1),i.paper._vbSize&&(m*=i.paper._vbSize),l.setAttribute(f,m),u["stroke-dasharray"]&&C(i,u["stroke-dasharray"],s),i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1));break;case"stroke-dasharray":C(i,m,s);break;case"fill":var A=e(m).match(n._ISURL);if(A){k=g("pattern");var j=g("image");k.id=n.createUUID(),g(k,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(j,{x:0,y:0,"xlink:href":A[1]}),k.appendChild(j),function(t){n._preload(A[1],function(){var e=this.offsetWidth,n=this.offsetHeight;g(t,{width:e,height:n}),g(j,{width:e,height:n}),i.paper.safari()})}(k),i.paper.defs.appendChild(k),g(l,{fill:"url(#"+k.id+")"}),i.pattern=k,i.pattern&&y(i);break}var M=n.getRGB(m);if(M.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=e(m).charAt())&&v(i,m)){if("opacity"in u||"fill-opacity"in u){var O=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d));if(O){var L=O.getElementsByTagName("stop");g(L[L.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=m,u.fill="none";break}}else delete s.gradient,delete u.gradient,!n.is(u.opacity,"undefined")&&n.is(s.opacity,"undefined")&&g(l,{opacity:u.opacity}),!n.is(u["fill-opacity"],"undefined")&&n.is(s["fill-opacity"],"undefined")&&g(l,{"fill-opacity":u["fill-opacity"]});M[t]("opacity")&&g(l,{"fill-opacity":M.opacity>1?M.opacity/100:M.opacity});case"stroke":M=n.getRGB(m),l.setAttribute(f,M.hex),"stroke"==f&&M[t]("opacity")&&g(l,{
-"stroke-opacity":M.opacity>1?M.opacity/100:M.opacity}),"stroke"==f&&i._.arrows&&("startString"in i._.arrows&&b(i,i._.arrows.startString),"endString"in i._.arrows&&b(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=e(m).charAt())&&v(i,m);break;case"opacity":u.gradient&&!u[t]("stroke-opacity")&&g(l,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(u.gradient){O=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d)),O&&(L=O.getElementsByTagName("stop"),g(L[L.length-1],{"stop-opacity":m}));break}default:"font-size"==f&&(m=a(m,10)+"px");var F=f.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[F]=m,i._.dirty=1,l.setAttribute(f,m)}}T(i,s),l.style.visibility=h},S=1.2,T=function(i,s){if("text"==i.type&&(s[t]("text")||s[t]("font")||s[t]("font-size")||s[t]("x")||s[t]("y"))){var o=i.attrs,r=i.node,l=r.firstChild?a(n._g.doc.defaultView.getComputedStyle(r.firstChild,d).getPropertyValue("font-size"),10):10;if(s[t]("text")){for(o.text=s.text;r.firstChild;)r.removeChild(r.firstChild);for(var c,u=e(s.text).split("\n"),h=[],p=0,f=u.length;f>p;p++)c=g("tspan"),p&&g(c,{dy:l*S,x:o.x}),c.appendChild(n._g.doc.createTextNode(u[p])),r.appendChild(c),h[p]=c}else for(h=r.getElementsByTagName("tspan"),p=0,f=h.length;f>p;p++)p?g(h[p],{dy:l*S,x:o.x}):g(h[0],{dy:0});g(r,{x:o.x,y:o.y}),i._.dirty=1;var m=i._getBBox(),v=o.y-(m.y+m.height/2);v&&n.is(v,"finite")&&g(h[0],{dy:v})}},_=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.matrix=n.matrix(),this.realPath=null,this.paper=e,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},D=n.el;_.prototype=D,D.constructor=_,n._engine.path=function(t,e){var n=g("path");e.canvas&&e.canvas.appendChild(n);var i=new _(n,e);return i.type="path",w(i,{fill:"none",stroke:"#000",path:t}),i},D.rotate=function(t,n,a){if(this.removed)return this;if(t=e(t).split(c),t.length-1&&(n=i(t[1]),a=i(t[2])),t=i(t[0]),null==a&&(n=a),null==n||null==a){var s=this.getBBox(1);n=s.x+s.width/2,a=s.y+s.height/2}return this.transform(this._.transform.concat([["r",t,n,a]])),this},D.scale=function(t,n,a,s){if(this.removed)return this;if(t=e(t).split(c),t.length-1&&(n=i(t[1]),a=i(t[2]),s=i(t[3])),t=i(t[0]),null==n&&(n=t),null==s&&(a=s),null==a||null==s)var o=this.getBBox(1);return a=null==a?o.x+o.width/2:a,s=null==s?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",t,n,a,s]])),this},D.translate=function(t,n){return this.removed?this:(t=e(t).split(c),t.length-1&&(n=i(t[1])),t=i(t[0])||0,n=+n||0,this.transform(this._.transform.concat([["t",t,n]])),this)},D.transform=function(e){var i=this._;if(null==e)return i.transform;if(n._extractTransform(this,e),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&g(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var a=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":a})}return this},D.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},D.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},D.remove=function(){if(!this.removed&&this.node.parentNode){var t=this.paper;t.__set__&&t.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),n._tear(this,t),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var e in this)this[e]="function"==typeof this[e]?n._removedFactory(e):null;this.removed=!0}},D._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(n){}finally{e=e||{}}return t&&this.hide(),e},D.attr=function(e,i){if(this.removed)return this;if(null==e){var a={};for(var s in this.attrs)this.attrs[t](s)&&(a[s]=this.attrs[s]);return a.gradient&&"none"==a.fill&&(a.fill=a.gradient)&&delete a.gradient,a.transform=this._.transform,a}if(null==i&&n.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==e)return this._.transform;for(var o=e.split(c),r={},l=0,d=o.length;d>l;l++)e=o[l],r[e]=e in this.attrs?this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?this.paper.customAttributes[e].def:n._availableAttrs[e];return d-1?r:r[o[0]]}if(null==i&&n.is(e,"array")){for(r={},l=0,d=e.length;d>l;l++)r[e[l]]=this.attr(e[l]);return r}if(null!=i){var h={};h[e]=i}else null!=e&&n.is(e,"object")&&(h=e);for(var p in h)u("raphael.attr."+p+"."+this.id,this,h[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&h[t](p)&&n.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(h[p]));this.attrs[p]=h[p];for(var m in f)f[t](m)&&(h[m]=f[m])}return w(this,h),this},D.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&n._tofront(this,t),this},D.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;"a"==t.tagName.toLowerCase()?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper);this.paper;return this},D.insertAfter=function(t){if(this.removed)return this;var e=t.node||t[t.length-1].node;return e.nextSibling?e.parentNode.insertBefore(this.node,e.nextSibling):e.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this},D.insertBefore=function(t){if(this.removed)return this;var e=t.node||t[0].node;return e.parentNode.insertBefore(this.node,e),n._insertbefore(this,t,this.paper),this},D.blur=function(t){var e=this;if(0!==+t){var i=g("filter"),a=g("feGaussianBlur");e.attrs.blur=t,i.id=n.createUUID(),g(a,{stdDeviation:+t||1.5}),i.appendChild(a),e.paper.defs.appendChild(i),e._blur=i,g(e.node,{filter:"url(#"+i.id+")"})}else e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter");return e},n._engine.circle=function(t,e,n,i){var a=g("circle");t.canvas&&t.canvas.appendChild(a);var s=new _(a,t);return s.attrs={cx:e,cy:n,r:i,fill:"none",stroke:"#000"},s.type="circle",g(a,s.attrs),s},n._engine.rect=function(t,e,n,i,a,s){var o=g("rect");t.canvas&&t.canvas.appendChild(o);var r=new _(o,t);return r.attrs={x:e,y:n,width:i,height:a,r:s||0,rx:s||0,ry:s||0,fill:"none",stroke:"#000"},r.type="rect",g(o,r.attrs),r},n._engine.ellipse=function(t,e,n,i,a){var s=g("ellipse");t.canvas&&t.canvas.appendChild(s);var o=new _(s,t);return o.attrs={cx:e,cy:n,rx:i,ry:a,fill:"none",stroke:"#000"},o.type="ellipse",g(s,o.attrs),o},n._engine.image=function(t,e,n,i,a,s){var o=g("image");g(o,{x:n,y:i,width:a,height:s,preserveAspectRatio:"none"}),o.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(o);var r=new _(o,t);return r.attrs={x:n,y:i,width:a,height:s,src:e},r.type="image",r},n._engine.text=function(t,e,i,a){var s=g("text");t.canvas&&t.canvas.appendChild(s);var o=new _(s,t);return o.attrs={x:e,y:i,"text-anchor":"middle",text:a,font:n._availableAttrs.font,stroke:"none",fill:"#000"},o.type="text",w(o,o.attrs),o},n._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t&&t.container,i=t.x,a=t.y,s=t.width,o=t.height;if(!e)throw new Error("SVG container not found.");var r,l=g("svg"),c="overflow:hidden;";return i=i||0,a=a||0,s=s||512,o=o||342,g(l,{height:o,version:1.1,width:s,xmlns:"http://www.w3.org/2000/svg"}),1==e?(l.style.cssText=c+"position:absolute;left:"+i+"px;top:"+a+"px",n._g.doc.body.appendChild(l),r=1):(l.style.cssText=c+"position:relative",e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)),e=new n._Paper,e.width=s,e.height=o,e.canvas=l,e.clear(),e._left=e._top=0,r&&(e.renderfix=function(){}),e.renderfix(),e},n._engine.setViewBox=function(t,e,n,i,a){u("raphael.setViewBox",this,this._viewBox,[t,e,n,i,a]);var s,r,l=o(n/this.width,i/this.height),c=this.top,d=a?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(l=1),delete this._vbSize,s="0 0 "+this.width+h+this.height):(this._vbSize=l,s=t+h+e+h+n+h+i),g(this.canvas,{viewBox:s,preserveAspectRatio:d});l&&c;)r="stroke-width"in c.attrs?c.attrs["stroke-width"]:1,c.attr({"stroke-width":r}),c._.dirty=1,c._.dirtyT=1,c=c.prev;return this._viewBox=[t,e,n,i,!!a],this},n.prototype.renderfix=function(){var t,e=this.canvas,n=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var a=-t.e%1,s=-t.f%1;(a||s)&&(a&&(this._left=(this._left+a)%1,n.left=this._left+"px"),s&&(this._top=(this._top+s)%1,n.top=this._top+"px"))},n.prototype.clear=function(){n.eve("raphael.clear",this);for(var t=this.canvas;t.firstChild;)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(n._g.doc.createTextNode("Created with Raphaël "+n.version)),t.appendChild(this.desc),t.appendChild(this.defs=g("defs"))},n.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null};var k=n.st;for(var P in D)D[t](P)&&!k[t](P)&&(k[P]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(P))}}(),function(){if(n.vml){var t="hasOwnProperty",e=String,i=parseFloat,a=Math,s=a.round,o=a.max,r=a.min,l=a.abs,c="fill",u=/[, ]+/,d=n.eve,h=" progid:DXImageTransform.Microsoft",p=" ",f="",m={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},g=/([clmz]),?([^clmz]*)/gi,v=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px",x=21600,C={path:1,rect:1,image:1},w={circle:1,ellipse:1},S=function(t){var i=/[ahqstv]/gi,a=n._pathToAbsolute;if(e(t).match(i)&&(a=n._path2curve),i=/[clmz]/g,a==n._pathToAbsolute&&!e(t).match(i)){var o=e(t).replace(g,function(t,e,n){var i=[],a="m"==e.toLowerCase(),o=m[e];return n.replace(y,function(t){a&&2==i.length&&(o+=i+m["m"==e?"l":"L"],i=[]),i.push(s(t*x))}),o+i});return o}var r,l,c=a(t);o=[];for(var u=0,d=c.length;d>u;u++){r=c[u],l=c[u][0].toLowerCase(),"z"==l&&(l="x");for(var h=1,v=r.length;v>h;h++)l+=s(r[h]*x)+(h!=v-1?",":f);o.push(l)}return o.join(p)},T=function(t,e,i){var a=n.matrix();return a.rotate(-t,.5,.5),{dx:a.x(e,i),dy:a.y(e,i)}},_=function(t,e,n,i,a,s){var o=t._,r=t.matrix,u=o.fillpos,d=t.node,h=d.style,f=1,m="",g=x/e,v=x/n;if(h.visibility="hidden",e&&n){if(d.coordsize=l(g)+p+l(v),h.rotation=s*(0>e*n?-1:1),s){var y=T(s,i,a);i=y.dx,a=y.dy}if(0>e&&(m+="x"),0>n&&(m+=" y")&&(f=-1),h.flip=m,d.coordorigin=i*-g+p+a*-v,u||o.fillsize){var b=d.getElementsByTagName(c);b=b&&b[0],d.removeChild(b),u&&(y=T(s,r.x(u[0],u[1]),r.y(u[0],u[1])),b.position=y.dx*f+p+y.dy*f),o.fillsize&&(b.size=o.fillsize[0]*l(e)+p+o.fillsize[1]*l(n)),d.appendChild(b)}h.visibility="visible"}};n.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var D=function(t,n,i){for(var a=e(n).toLowerCase().split("-"),s=i?"end":"start",o=a.length,r="classic",l="medium",c="medium";o--;)switch(a[o]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":r=a[o];break;case"wide":case"narrow":c=a[o];break;case"long":case"short":l=a[o]}var u=t.node.getElementsByTagName("stroke")[0];u[s+"arrow"]=r,u[s+"arrowlength"]=l,u[s+"arrowwidth"]=c},k=function(a,l){a.attrs=a.attrs||{};var d=a.node,h=a.attrs,m=d.style,g=C[a.type]&&(l.x!=h.x||l.y!=h.y||l.width!=h.width||l.height!=h.height||l.cx!=h.cx||l.cy!=h.cy||l.rx!=h.rx||l.ry!=h.ry||l.r!=h.r),v=w[a.type]&&(h.cx!=l.cx||h.cy!=l.cy||h.r!=l.r||h.rx!=l.rx||h.ry!=l.ry),y=a;for(var b in l)l[t](b)&&(h[b]=l[b]);if(g&&(h.path=n._getPath[a.type](a),a._.dirty=1),l.href&&(d.href=l.href),l.title&&(d.title=l.title),l.target&&(d.target=l.target),l.cursor&&(m.cursor=l.cursor),"blur"in l&&a.blur(l.blur),(l.path&&"path"==a.type||g)&&(d.path=S(~e(h.path).toLowerCase().indexOf("r")?n._pathToAbsolute(h.path):h.path),"image"==a.type&&(a._.fillpos=[h.x,h.y],a._.fillsize=[h.width,h.height],_(a,1,1,0,0,0))),"transform"in l&&a.transform(l.transform),v){var T=+h.cx,k=+h.cy,I=+h.rx||+h.r||0,E=+h.ry||+h.r||0;d.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",s((T-I)*x),s((k-E)*x),s((T+I)*x),s((k+E)*x),s(T*x)),a._.dirty=1}if("clip-rect"in l){var j=e(l["clip-rect"]).split(u);if(4==j.length){j[2]=+j[2]+ +j[0],j[3]=+j[3]+ +j[1];var M=d.clipRect||n._g.doc.createElement("div"),O=M.style;O.clip=n.format("rect({1}px {2}px {3}px {0}px)",j),d.clipRect||(O.position="absolute",O.top=0,O.left=0,O.width=a.paper.width+"px",O.height=a.paper.height+"px",d.parentNode.insertBefore(M,d),M.appendChild(d),d.clipRect=M)}l["clip-rect"]||d.clipRect&&(d.clipRect.style.clip="auto")}if(a.textpath){var L=a.textpath.style;l.font&&(L.font=l.font),l["font-family"]&&(L.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,f)+'"'),l["font-size"]&&(L.fontSize=l["font-size"]),l["font-weight"]&&(L.fontWeight=l["font-weight"]),l["font-style"]&&(L.fontStyle=l["font-style"])}if("arrow-start"in l&&D(y,l["arrow-start"]),"arrow-end"in l&&D(y,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var F=d.getElementsByTagName(c),N=!1;if(F=F&&F[0],!F&&(N=F=A(c)),"image"==a.type&&l.src&&(F.src=l.src),l.fill&&(F.on=!0),(null==F.on||"none"==l.fill||null===l.fill)&&(F.on=!1),F.on&&l.fill){var R=e(l.fill).match(n._ISURL);if(R){F.parentNode==d&&d.removeChild(F),F.rotate=!0,F.src=R[1],F.type="tile";var B=a.getBBox(1);F.position=B.x+p+B.y,a._.fillpos=[B.x,B.y],n._preload(R[1],function(){a._.fillsize=[this.offsetWidth,this.offsetHeight]})}else F.color=n.getRGB(l.fill).hex,F.src=f,F.type="solid",n.getRGB(l.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=e(l.fill).charAt())&&P(y,l.fill,F)&&(h.fill="none",h.gradient=l.fill,F.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var $=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+n.getRGB(l.fill).o+1||2)-1);$=r(o($,0),1),F.opacity=$,F.src&&(F.color="none")}d.appendChild(F);var H=d.getElementsByTagName("stroke")&&d.getElementsByTagName("stroke")[0],U=!1;!H&&(U=H=A("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(H.on=!0),("none"==l.stroke||null===l.stroke||null==H.on||0==l.stroke||0==l["stroke-width"])&&(H.on=!1);var W=n.getRGB(l.stroke);H.on&&l.stroke&&(H.color=W.hex),$=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+W.o+1||2)-1);var z=.75*(i(l["stroke-width"])||1);if($=r(o($,0),1),null==l["stroke-width"]&&(z=h["stroke-width"]),l["stroke-width"]&&(H.weight=z),z&&1>z&&($*=z)&&(H.weight=1),H.opacity=$,l["stroke-linejoin"]&&(H.joinstyle=l["stroke-linejoin"]||"miter"),H.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(H.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var q={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};H.dashstyle=q[t](l["stroke-dasharray"])?q[l["stroke-dasharray"]]:f}U&&d.appendChild(H)}if("text"==y.type){y.paper.canvas.style.display=f;var V=y.paper.span,Y=100,X=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);m=V.style,h.font&&(m.font=h.font),h["font-family"]&&(m.fontFamily=h["font-family"]),h["font-weight"]&&(m.fontWeight=h["font-weight"]),h["font-style"]&&(m.fontStyle=h["font-style"]),X=i(h["font-size"]||X&&X[0])||10,m.fontSize=X*Y+"px",y.textpath.string&&(V.innerHTML=e(y.textpath.string).replace(/"));var G=V.getBoundingClientRect();y.W=h.w=(G.right-G.left)/Y,y.H=h.h=(G.bottom-G.top)/Y,y.X=h.x,y.Y=h.y+y.H/2,("x"in l||"y"in l)&&(y.path.v=n.format("m{0},{1}l{2},{1}",s(h.x*x),s(h.y*x),s(h.x*x)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],Q=0,Z=K.length;Z>Q;Q++)if(K[Q]in l){y._.dirty=1;break}switch(h["text-anchor"]){case"start":y.textpath.style["v-text-align"]="left",y.bbx=y.W/2;break;case"end":y.textpath.style["v-text-align"]="right",y.bbx=-y.W/2;break;default:y.textpath.style["v-text-align"]="center",y.bbx=0}y.textpath.style["v-text-kern"]=!0}},P=function(t,s,o){t.attrs=t.attrs||{};var r=(t.attrs,Math.pow),l="linear",c=".5 .5";if(t.attrs.gradient=s,s=e(s).replace(n._radial_gradient,function(t,e,n){return l="radial",e&&n&&(e=i(e),n=i(n),r(e-.5,2)+r(n-.5,2)>.25&&(n=a.sqrt(.25-r(e-.5,2))*(2*(n>.5)-1)+.5),c=e+p+n),f}),s=s.split(/\s*\-\s*/),"linear"==l){var u=s.shift();if(u=-i(u),isNaN(u))return null}var d=n._parseDots(s);if(!d)return null;if(t=t.shape||t.node,d.length){t.removeChild(o),o.on=!0,o.method="none",o.color=d[0].color,o.color2=d[d.length-1].color;for(var h=[],m=0,g=d.length;g>m;m++)d[m].offset&&h.push(d[m].offset+p+d[m].color);o.colors=h.length?h.join():"0% "+o.color,"radial"==l?(o.type="gradientTitle",o.focus="100%",o.focussize="0 0",o.focusposition=c,o.angle=0):(o.type="gradient",o.angle=(270-u)%360),t.appendChild(o)}return 1},I=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=e,this.matrix=n.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},E=n.el;I.prototype=E,E.constructor=I,E.transform=function(t){if(null==t)return this._.transform;var i,a=this.paper._viewBoxShift,s=a?"s"+[a.scale,a.scale]+"-1-1t"+[a.dx,a.dy]:f;a&&(i=t=e(t).replace(/\.{3}|\u2026/g,this._.transform||f)),n._extractTransform(this,s+t);var o,r=this.matrix.clone(),l=this.skew,c=this.node,u=~e(this.attrs.fill).indexOf("-"),d=!e(this.attrs.fill).indexOf("url(");if(r.translate(1,1),d||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",o=r.split(),u&&o.noRotation||!o.isSimple){c.style.filter=r.toFilter();var h=this.getBBox(),m=this.getBBox(1),g=h.x-m.x,v=h.y-m.y;c.coordorigin=g*-x+p+v*-x,_(this,1,1,g,v,0)}else c.style.filter=f,_(this,o.scalex,o.scaley,o.dx,o.dy,o.rotate);else c.style.filter=f,l.matrix=e(r),l.offset=r.offset();return i&&(this._.transform=i),this},E.rotate=function(t,n,a){if(this.removed)return this;if(null!=t){if(t=e(t).split(u),t.length-1&&(n=i(t[1]),a=i(t[2])),t=i(t[0]),null==a&&(n=a),null==n||null==a){var s=this.getBBox(1);n=s.x+s.width/2,a=s.y+s.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,n,a]])),this}},E.translate=function(t,n){return this.removed?this:(t=e(t).split(u),t.length-1&&(n=i(t[1])),t=i(t[0])||0,n=+n||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=n),this.transform(this._.transform.concat([["t",t,n]])),this)},E.scale=function(t,n,a,s){if(this.removed)return this;if(t=e(t).split(u),t.length-1&&(n=i(t[1]),a=i(t[2]),s=i(t[3]),isNaN(a)&&(a=null),isNaN(s)&&(s=null)),t=i(t[0]),null==n&&(n=t),null==s&&(a=s),null==a||null==s)var o=this.getBBox(1);return a=null==a?o.x+o.width/2:a,s=null==s?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",t,n,a,s]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=f),this},E._getBBox=function(){return this.removed?{}:{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.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),n.eve.unbind("raphael.*.*."+this.id),n._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;this.removed=!0}},E.attr=function(e,i){if(this.removed)return this;if(null==e){var a={};for(var s in this.attrs)this.attrs[t](s)&&(a[s]=this.attrs[s]);return a.gradient&&"none"==a.fill&&(a.fill=a.gradient)&&delete a.gradient,a.transform=this._.transform,a}if(null==i&&n.is(e,"string")){if(e==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var o=e.split(u),r={},l=0,h=o.length;h>l;l++)e=o[l],r[e]=e in this.attrs?this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?this.paper.customAttributes[e].def:n._availableAttrs[e];return h-1?r:r[o[0]]}if(this.attrs&&null==i&&n.is(e,"array")){for(r={},l=0,h=e.length;h>l;l++)r[e[l]]=this.attr(e[l]);return r}var p;null!=i&&(p={},p[e]=i),null==i&&n.is(e,"object")&&(p=e);for(var f in p)d("raphael.attr."+f+"."+this.id,this,p[f]);if(p){for(f in this.paper.customAttributes)if(this.paper.customAttributes[t](f)&&p[t](f)&&n.is(this.paper.customAttributes[f],"function")){var m=this.paper.customAttributes[f].apply(this,[].concat(p[f]));this.attrs[f]=p[f];for(var g in m)m[t](g)&&(p[g]=m[g])}p.text&&"text"==this.type&&(this.textpath.string=p.text),k(this,p)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper)),this)},E.insertAfter=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this)},E.insertBefore=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),n._insertbefore(this,t,this.paper),this)},E.blur=function(t){var e=this.node.runtimeStyle,i=e.filter;return i=i.replace(v,f),0!==+t?(this.attrs.blur=t,e.filter=i+p+h+".Blur(pixelradius="+(+t||1.5)+")",e.margin=n.format("-{0}px 0 0 -{0}px",s(+t||1.5))):(e.filter=i,e.margin=0,delete this.attrs.blur),this},n._engine.path=function(t,e){var n=A("shape");n.style.cssText=b,n.coordsize=x+p+x,n.coordorigin=e.coordorigin;var i=new I(n,e),a={fill:"none",stroke:"#000"};t&&(a.path=t),i.type="path",i.path=[],i.Path=f,k(i,a),e.canvas.appendChild(n);var s=A("skew");return s.on=!0,n.appendChild(s),i.skew=s,i.transform(f),i},n._engine.rect=function(t,e,i,a,s,o){var r=n._rectPath(e,i,a,s,o),l=t.path(r),c=l.attrs;return l.X=c.x=e,l.Y=c.y=i,l.W=c.width=a,l.H=c.height=s,c.r=o,c.path=r,l.type="rect",l},n._engine.ellipse=function(t,e,n,i,a){var s=t.path();s.attrs;return s.X=e-i,s.Y=n-a,s.W=2*i,s.H=2*a,s.type="ellipse",k(s,{cx:e,cy:n,rx:i,ry:a}),s},n._engine.circle=function(t,e,n,i){var a=t.path();a.attrs;return a.X=e-i,a.Y=n-i,a.W=a.H=2*i,a.type="circle",k(a,{cx:e,cy:n,r:i}),a},n._engine.image=function(t,e,i,a,s,o){var r=n._rectPath(i,a,s,o),l=t.path(r).attr({stroke:"none"}),u=l.attrs,d=l.node,h=d.getElementsByTagName(c)[0];return u.src=e,l.X=u.x=i,l.Y=u.y=a,l.W=u.width=s,l.H=u.height=o,u.path=r,l.type="image",h.parentNode==d&&d.removeChild(h),h.rotate=!0,h.src=e,h.type="tile",l._.fillpos=[i,a],l._.fillsize=[s,o],d.appendChild(h),_(l,1,1,0,0,0),l},n._engine.text=function(t,i,a,o){var r=A("shape"),l=A("path"),c=A("textpath");i=i||0,a=a||0,o=o||"",l.v=n.format("m{0},{1}l{2},{1}",s(i*x),s(a*x),s(i*x)+1),l.textpathok=!0,c.string=e(o),c.on=!0,r.style.cssText=b,r.coordsize=x+p+x,r.coordorigin="0 0";var u=new I(r,t),d={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:o};u.shape=r,u.path=l,u.textpath=c,u.type="text",u.attrs.text=e(o),u.attrs.x=i,u.attrs.y=a,u.attrs.w=1,u.attrs.h=1,k(u,d),r.appendChild(c),r.appendChild(l),t.canvas.appendChild(r);var h=A("skew");return h.on=!0,r.appendChild(h),u.skew=h,u.transform(f),u},n._engine.setSize=function(t,e){var i=this.canvas.style;return this.width=t,this.height=e,t==+t&&(t+="px"),e==+e&&(e+="px"),i.width=t,i.height=e,i.clip="rect(0 "+t+" "+e+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this},n._engine.setViewBox=function(t,e,i,a,s){n.eve("raphael.setViewBox",this,this._viewBox,[t,e,i,a,s]);var r,l,c=this.width,u=this.height,d=1/o(i/c,a/u);return s&&(r=u/a,l=c/i,c>i*r&&(t-=(c-i*r)/2/r),u>a*l&&(e-=(u-a*l)/2/l)),this._viewBox=[t,e,i,a,!!s],this._viewBoxShift={dx:-t,dy:-e,scale:d},this.forEach(function(t){t.transform("...")}),this};var A;n._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),A=function(t){return e.createElement("')}}catch(n){A=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},n._engine.initWin(n._g.win),n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t.container,i=t.height,a=t.width,s=t.x,o=t.y;if(!e)throw new Error("VML container not found.");var r=new n._Paper,l=r.canvas=n._g.doc.createElement("div"),c=l.style;return s=s||0,o=o||0,a=a||512,i=i||342,r.width=a,r.height=i,a==+a&&(a+="px"),i==+i&&(i+="px"),r.coordsize=1e3*x+p+1e3*x,r.coordorigin="0 0",r.span=n._g.doc.createElement("span"),r.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(r.span),c.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",a,i),1==e?(n._g.doc.body.appendChild(l),c.left=s+"px",c.top=o+"px",c.position="absolute"):e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l),r.renderfix=function(){},r},n.prototype.clear=function(){n.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=n._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},n.prototype.remove=function(){n.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;return!0};var j=n.st;for(var M in E)E[t](M)&&!j[t](M)&&(j[M]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(M))}}(),k.was?D.win.Raphael=n:Raphael=n,n});(function(){var t,e,n,i,a=[].slice,s=function(t,e){return function(){return t.apply(e,arguments)}},o={}.hasOwnProperty,r=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=window.Morris={},t=jQuery,e.EventEmitter=function(){function t(){}return t.prototype.on=function(t,e){return null==this.handlers&&(this.handlers={}),null==this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this},t.prototype.fire=function(){var t,e,n,i,s,o,r;if(n=arguments[0],t=2<=arguments.length?a.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[n]){for(o=this.handlers[n],r=[],i=0,s=o.length;s>i;i++)e=o[i],r.push(e.apply(null,t));return r}},t}(),e.commas=function(t){var e,n,i,a;return null!=t?(i=0>t?"-":"",e=Math.abs(t),n=Math.floor(e).toFixed(0),i+=n.replace(/(?=(?:\d{3})+$)(?!^)/g,","),a=e.toString(),a.length>n.length&&(i+=a.slice(n.length)),i):"-"},e.pad2=function(t){return(10>t?"0":"")+t},e.Grid=function(n){function i(e){this.resizeHandler=s(this.resizeHandler,this);var n=this;if(this.el=t("string"==typeof e.element?document.getElementById(e.element):e.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},e),"string"==typeof this.options.units&&(this.options.postUnits=e.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(t){var e,i,a,s,o;return i=n.el.offset(),o=t.pageX-i.left,n.selectFrom?(e=n.data[n.hitTest(Math.min(o,n.selectFrom))]._x,a=n.data[n.hitTest(Math.max(o,n.selectFrom))]._x,s=a-e,n.selectionRect.attr({x:e,width:s})):n.fire("hovermove",o,t.pageY-i.top)}),this.el.bind("mouseleave",function(){return n.selectFrom&&(n.selectionRect.hide(),n.selectFrom=null),n.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(t){var e,i;return i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],e=n.el.offset(),n.fire("hovermove",i.pageX-e.left,i.pageY-e.top)}),this.el.bind("click",function(t){var e;return e=n.el.offset(),n.fire("gridclick",t.pageX-e.left,t.pageY-e.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(t){var e;return e=n.el.offset(),n.startRange(t.pageX-e.left)}),this.el.bind("mouseup",function(t){var e;return e=n.el.offset(),n.endRange(t.pageX-e.left),n.fire("hovermove",t.pageX-e.left,t.pageY-e.top)})),this.options.resize&&t(window).bind("resize",function(){return null!=n.timeoutId&&window.clearTimeout(n.timeoutId),n.timeoutId=window.setTimeout(n.resizeHandler,100)}),this.el.css("-webkit-tap-highlight-color","rgba(0,0,0,0)"),this.postInit&&this.postInit()}return r(i,n),i.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},i.prototype.setData=function(t,n){var i,a,s,o,r,l,c,u,d,h,p,f,m,g,v;return null==n&&(n=!0),this.options.data=t,null==t||0===t.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(f=this.cumulative?0:null,m=this.cumulative?0:null,this.options.goals.length>0&&(r=Math.min.apply(Math,this.options.goals),o=Math.max.apply(Math,this.options.goals),m=null!=m?Math.min(m,r):r,f=null!=f?Math.max(f,o):o),this.data=function(){var n,i,o;for(o=[],s=n=0,i=t.length;i>n;s=++n)c=t[s],l={src:c},l.label=c[this.options.xkey],this.options.parseTime?(l.x=e.parseDate(l.label),this.options.dateFormat?l.label=this.options.dateFormat(l.x):"number"==typeof l.label&&(l.label=new Date(l.label).toString())):(l.x=s,this.options.xLabelFormat&&(l.label=this.options.xLabelFormat(l))),d=0,l.y=function(){var t,e,n,i;for(n=this.options.ykeys,i=[],a=t=0,e=n.length;e>t;a=++t)p=n[a],g=c[p],"string"==typeof g&&(g=parseFloat(g)),null!=g&&"number"!=typeof g&&(g=null),null!=g&&(this.cumulative?d+=g:null!=f?(f=Math.max(g,f),m=Math.min(g,m)):f=m=g),this.cumulative&&null!=d&&(f=Math.max(d,f),m=Math.min(d,m)),i.push(g);return i}.call(this),o.push(l);return o}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(t,e){return(t.x>e.x)-(e.x>t.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],
-this.options.events.length>0&&(this.events=this.options.parseTime?function(){var t,n,a,s;for(a=this.options.events,s=[],t=0,n=a.length;n>t;t++)i=a[t],s.push(e.parseDate(i));return s}.call(this):this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",m),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(m&&(this.ymin-=1),this.ymax+=1),((v=this.options.axes)===!0||"both"===v||"y"===v||this.options.grid===!0)&&(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(u=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var t,e,n,i;for(i=[],h=t=e=this.ymin,n=this.ymax;u>0?n>=t:t>=n;h=t+=u)i.push(h);return i}.call(this))),this.dirty=!0,n?this.redraw():void 0)},i.prototype.yboundary=function(t,e){var n,i;return n=this.options["y"+t],"string"==typeof n?"auto"===n.slice(0,4)?n.length>5?(i=parseInt(n.slice(5),10),null==e?i:Math[t](e,i)):null!=e?e:0:parseInt(n,10):n},i.prototype.autoGridLines=function(t,e,n){var i,a,s,o,r,l,c,u,d;return r=e-t,d=Math.floor(Math.log(r)/Math.log(10)),c=Math.pow(10,d),a=Math.floor(t/c)*c,i=Math.ceil(e/c)*c,l=(i-a)/(n-1),1===c&&l>1&&Math.ceil(l)!==l&&(l=Math.ceil(l),i=a+l*(n-1)),0>a&&i>0&&(a=Math.floor(t/l)*l,i=Math.ceil(e/l)*l),1>l?(o=Math.floor(Math.log(l)/Math.log(10)),s=function(){var t,e;for(e=[],u=t=a;l>0?i>=t:t>=i;u=t+=l)e.push(parseFloat(u.toFixed(1-o)));return e}()):s=function(){var t,e;for(e=[],u=t=a;l>0?i>=t:t>=i;u=t+=l)e.push(u);return e}(),s},i.prototype._calc=function(){var t,e,n,i,a,s,o,r;return a=this.el.width(),n=this.el.height(),(this.elementWidth!==a||this.elementHeight!==n||this.dirty)&&(this.elementWidth=a,this.elementHeight=n,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,((o=this.options.axes)===!0||"both"===o||"y"===o)&&(s=function(){var t,n,i,a;for(i=this.grid,a=[],t=0,n=i.length;n>t;t++)e=i[t],a.push(this.measureText(this.yAxisFormat(e)).width);return a}.call(this),this.left+=Math.max.apply(Math,s)),((r=this.options.axes)===!0||"both"===r||"x"===r)&&(t=function(){var t,e,n;for(n=[],i=t=0,e=this.data.length;e>=0?e>t:t>e;i=e>=0?++t:--t)n.push(this.measureText(this.data[i].text,-this.options.xLabelAngle).height);return n}.call(this),this.bottom-=Math.max.apply(Math,t)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},i.prototype.transY=function(t){return this.bottom-(t-this.ymin)*this.dy},i.prototype.transX=function(t){return 1===this.data.length?(this.left+this.right)/2:this.left+(t-this.xmin)*this.dx},i.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},i.prototype.measureText=function(t,e){var n,i;return null==e&&(e=0),i=this.raphael.text(100,100,t).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(e),n=i.getBBox(),i.remove(),n},i.prototype.yAxisFormat=function(t){return this.yLabelFormat(t)},i.prototype.yLabelFormat=function(t){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(t):""+this.options.preUnits+e.commas(t)+this.options.postUnits},i.prototype.drawGrid=function(){var t,e,n,i,a,s,o,r;if(this.options.grid!==!1||(a=this.options.axes)===!0||"both"===a||"y"===a){for(s=this.grid,r=[],n=0,i=s.length;i>n;n++)t=s[n],e=this.transY(t),((o=this.options.axes)===!0||"both"===o||"y"===o)&&this.drawYAxisLabel(this.left-this.options.padding/2,e,this.yAxisFormat(t)),this.options.grid?r.push(this.drawGridLine("M"+this.left+","+e+"H"+(this.left+this.width))):r.push(void 0);return r}},i.prototype.drawGoals=function(){var t,e,n,i,a,s,o;for(s=this.options.goals,o=[],n=i=0,a=s.length;a>i;n=++i)e=s[n],t=this.options.goalLineColors[n%this.options.goalLineColors.length],o.push(this.drawGoal(e,t));return o},i.prototype.drawEvents=function(){var t,e,n,i,a,s,o;for(s=this.events,o=[],n=i=0,a=s.length;a>i;n=++i)e=s[n],t=this.options.eventLineColors[n%this.options.eventLineColors.length],o.push(this.drawEvent(e,t));return o},i.prototype.drawGoal=function(t,e){return this.raphael.path("M"+this.left+","+this.transY(t)+"H"+this.right).attr("stroke",e).attr("stroke-width",this.options.goalStrokeWidth)},i.prototype.drawEvent=function(t,e){return this.raphael.path("M"+this.transX(t)+","+this.bottom+"V"+this.top).attr("stroke",e).attr("stroke-width",this.options.eventStrokeWidth)},i.prototype.drawYAxisLabel=function(t,e,n){return this.raphael.text(t,e,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},i.prototype.drawGridLine=function(t){return this.raphael.path(t).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},i.prototype.startRange=function(t){return this.hover.hide(),this.selectFrom=t,this.selectionRect.attr({x:t,width:0}).show()},i.prototype.endRange=function(t){var e,n;return this.selectFrom?(n=Math.min(this.selectFrom,t),e=Math.max(this.selectFrom,t),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(n)].x,end:this.data[this.hitTest(e)].x}),this.selectFrom=null):void 0},i.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},i}(e.EventEmitter),e.parseDate=function(t){var e,n,i,a,s,o,r,l,c,u,d;return"number"==typeof t?t:(n=t.match(/^(\d+) Q(\d)$/),a=t.match(/^(\d+)-(\d+)$/),s=t.match(/^(\d+)-(\d+)-(\d+)$/),r=t.match(/^(\d+) W(\d+)$/),l=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),c=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),n?new Date(parseInt(n[1],10),3*parseInt(n[2],10)-1,1).getTime():a?new Date(parseInt(a[1],10),parseInt(a[2],10)-1,1).getTime():s?new Date(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10)).getTime():r?(u=new Date(parseInt(r[1],10),0,1),4!==u.getDay()&&u.setMonth(0,1+(4-u.getDay()+7)%7),u.getTime()+6048e5*parseInt(r[2],10)):l?l[6]?(o=0,"Z"!==l[6]&&(o=60*parseInt(l[8],10)+parseInt(l[9],10),"+"===l[7]&&(o=0-o)),Date.UTC(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)+o)):new Date(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)).getTime():c?(d=parseFloat(c[6]),e=Math.floor(d),i=Math.round(1e3*(d-e)),c[8]?(o=0,"Z"!==c[8]&&(o=60*parseInt(c[10],10)+parseInt(c[11],10),"+"===c[9]&&(o=0-o)),Date.UTC(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10)+o,e,i)):new Date(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10),e,i).getTime()):new Date(parseInt(t,10),0,1).getTime())},e.Hover=function(){function n(n){null==n&&(n={}),this.options=t.extend({},e.Hover.defaults,n),this.el=t(""),this.el.hide(),this.options.parent.append(this.el)}return n.defaults={"class":"morris-hover morris-default-style"},n.prototype.update=function(t,e,n){return t?(this.html(t),this.show(),this.moveTo(e,n)):this.hide()},n.prototype.html=function(t){return this.el.html(t)},n.prototype.moveTo=function(t,e){var n,i,a,s,o,r;return o=this.options.parent.innerWidth(),s=this.options.parent.innerHeight(),i=this.el.outerWidth(),n=this.el.outerHeight(),a=Math.min(Math.max(0,t-i/2),o-i),null!=e?(r=e-n-10,0>r&&(r=e+10,r+n>s&&(r=s/2-n/2))):r=s/2-n/2,this.el.css({left:a+"px",top:parseInt(r)+"px"})},n.prototype.show=function(){return this.el.show()},n.prototype.hide=function(){return this.el.hide()},n}(),e.Line=function(t){function n(t){return this.hilight=s(this.hilight,this),this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),this instanceof e.Line?void n.__super__.constructor.call(this,t):new e.Line(t)}return r(n,t),n.prototype.init=function(){return"always"!==this.options.hideHover?(this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},n.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,hideHover:!1},n.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},n.prototype.calcPoints=function(){var t,e,n,i,a,s;for(a=this.data,s=[],n=0,i=a.length;i>n;n++)t=a[n],t._x=this.transX(t.x),t._y=function(){var n,i,a,s;for(a=t.y,s=[],n=0,i=a.length;i>n;n++)e=a[n],null!=e?s.push(this.transY(e)):s.push(e);return s}.call(this),s.push(t._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var n,i,a,s;for(a=t._y,s=[],n=0,i=a.length;i>n;n++)e=a[n],null!=e&&s.push(e);return s}())));return s},n.prototype.hitTest=function(t){var e,n,i,a,s;if(0===this.data.length)return null;for(s=this.data.slice(1),e=i=0,a=s.length;a>i&&(n=s[e],!(t<(n._x+this.data[e]._x)/2));e=++i);return e},n.prototype.onGridClick=function(t,e){var n;return n=this.hitTest(t),this.fire("click",n,this.data[n].src,t,e)},n.prototype.onHoverMove=function(t){var e;return e=this.hitTest(t),this.displayHoverForRow(e)},n.prototype.onHoverOut=function(){return this.options.hideHover!==!1?this.displayHoverForRow(null):void 0},n.prototype.displayHoverForRow=function(t){var e;return null!=t?((e=this.hover).update.apply(e,this.hoverContentForRow(t)),this.hilight(t)):(this.hover.hide(),this.hilight())},n.prototype.hoverContentForRow=function(t){var e,n,i,a,s,o,r;for(i=this.data[t],e=""+i.label+" ",r=i.y,n=s=0,o=r.length;o>s;n=++s)a=r[n],e+="\n "+this.options.labels[n]+":\n "+this.yLabelFormat(a)+"\n ";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,i.src)),[e,i._x,i._ymax]},n.prototype.generatePaths=function(){var t,n,i,a;return this.paths=function(){var s,o,r,c;for(c=[],n=s=0,o=this.options.ykeys.length;o>=0?o>s:s>o;n=o>=0?++s:--s)a="boolean"==typeof this.options.smooth?this.options.smooth:(r=this.options.ykeys[n],l.call(this.options.smooth,r)>=0),t=function(){var t,e,a,s;for(a=this.data,s=[],t=0,e=a.length;e>t;t++)i=a[t],void 0!==i._y[n]&&s.push({x:i._x,y:i._y[n]});return s}.call(this),t.length>1?c.push(e.Line.createPath(t,a,this.bottom)):c.push(null);return c}.call(this)},n.prototype.draw=function(){var t;return((t=this.options.axes)===!0||"both"===t||"x"===t)&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},n.prototype.drawXAxis=function(){var t,n,i,a,s,o,r,l,c,u,d=this;for(r=this.bottom+this.options.padding/2,s=null,a=null,t=function(t,e){var n,i,o,l,c;return n=d.drawXAxisLabel(d.transX(e),r,t),c=n.getBBox(),n.transform("r"+-d.options.xLabelAngle),i=n.getBBox(),n.transform("t0,"+i.height/2+"..."),0!==d.options.xLabelAngle&&(l=-.5*c.width*Math.cos(d.options.xLabelAngle*Math.PI/180),n.transform("t"+l+",0...")),i=n.getBBox(),(null==s||s>=i.x+i.width||null!=a&&a>=i.x)&&i.x>=0&&i.x+i.widtht;t++)o=n[t],i.push([o.label,o.x]);return i}.call(this),i.reverse(),u=[],l=0,c=i.length;c>l;l++)n=i[l],u.push(t(n[0],n[1]));return u},n.prototype.drawSeries=function(){var t,e,n,i,a,s;for(this.seriesPoints=[],t=e=i=this.options.ykeys.length-1;0>=i?0>=e:e>=0;t=0>=i?++e:--e)this._drawLineFor(t);for(s=[],t=n=a=this.options.ykeys.length-1;0>=a?0>=n:n>=0;t=0>=a?++n:--n)s.push(this._drawPointFor(t));return s},n.prototype._drawPointFor=function(t){var e,n,i,a,s,o;for(this.seriesPoints[t]=[],s=this.data,o=[],i=0,a=s.length;a>i;i++)n=s[i],e=null,null!=n._y[t]&&(e=this.drawLinePoint(n._x,n._y[t],this.colorFor(n,t,"point"),t)),o.push(this.seriesPoints[t].push(e));return o},n.prototype._drawLineFor=function(t){var e;return e=this.paths[t],null!==e?this.drawLinePath(e,this.colorFor(null,t,"line"),t):void 0},n.createPath=function(t,n,i){var a,s,o,r,l,c,u,d,h,p,f,m,g,v;for(u="",n&&(o=e.Line.gradients(t)),d={y:null},r=g=0,v=t.length;v>g;r=++g)a=t[r],null!=a.y&&(null!=d.y?n?(s=o[r],c=o[r-1],l=(a.x-d.x)/4,h=d.x+l,f=Math.min(i,d.y+l*c),p=a.x-l,m=Math.min(i,a.y-l*s),u+="C"+h+","+f+","+p+","+m+","+a.x+","+a.y):u+="L"+a.x+","+a.y:n&&null==o[r]||(u+="M"+a.x+","+a.y)),d=a;return u},n.gradients=function(t){var e,n,i,a,s,o,r,l;for(n=function(t,e){return(t.y-e.y)/(t.x-e.x)},l=[],i=o=0,r=t.length;r>o;i=++o)e=t[i],null!=e.y?(a=t[i+1]||{y:null},s=t[i-1]||{y:null},null!=s.y&&null!=a.y?l.push(n(s,a)):null!=s.y?l.push(n(s,e)):null!=a.y?l.push(n(e,a)):l.push(null)):l.push(null);return l},n.prototype.hilight=function(t){var e,n,i,a,s;if(null!==this.prevHilight&&this.prevHilight!==t)for(e=n=0,a=this.seriesPoints.length-1;a>=0?a>=n:n>=a;e=a>=0?++n:--n)this.seriesPoints[e][this.prevHilight]&&this.seriesPoints[e][this.prevHilight].animate(this.pointShrinkSeries(e));if(null!==t&&this.prevHilight!==t)for(e=i=0,s=this.seriesPoints.length-1;s>=0?s>=i:i>=s;e=s>=0?++i:--i)this.seriesPoints[e][t]&&this.seriesPoints[e][t].animate(this.pointGrowSeries(e));return this.prevHilight=t},n.prototype.colorFor=function(t,e,n){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,t,e,n):"point"===n?this.options.pointFillColors[e%this.options.pointFillColors.length]||this.options.lineColors[e%this.options.lineColors.length]:this.options.lineColors[e%this.options.lineColors.length]},n.prototype.drawXAxisLabel=function(t,e,n){return this.raphael.text(t,e,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawLinePath=function(t,e,n){return this.raphael.path(t).attr("stroke",e).attr("stroke-width",this.lineWidthForSeries(n))},n.prototype.drawLinePoint=function(t,e,n,i){return this.raphael.circle(t,e,this.pointSizeForSeries(i)).attr("fill",n).attr("stroke-width",this.pointStrokeWidthForSeries(i)).attr("stroke",this.pointStrokeColorForSeries(i))},n.prototype.pointStrokeWidthForSeries=function(t){return this.options.pointStrokeWidths[t%this.options.pointStrokeWidths.length]},n.prototype.pointStrokeColorForSeries=function(t){return this.options.pointStrokeColors[t%this.options.pointStrokeColors.length]},n.prototype.lineWidthForSeries=function(t){return this.options.lineWidth instanceof Array?this.options.lineWidth[t%this.options.lineWidth.length]:this.options.lineWidth},n.prototype.pointSizeForSeries=function(t){return this.options.pointSize instanceof Array?this.options.pointSize[t%this.options.pointSize.length]:this.options.pointSize},n.prototype.pointGrowSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)+3},25,"linear")},n.prototype.pointShrinkSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)},25,"linear")},n}(e.Grid),e.labelSeries=function(n,i,a,s,o){var r,l,c,u,d,h,p,f,m,g,v;if(c=200*(i-n)/a,l=new Date(n),p=e.LABEL_SPECS[s],void 0===p)for(v=e.AUTO_LABEL_ORDER,m=0,g=v.length;g>m;m++)if(u=v[m],h=e.LABEL_SPECS[u],c>=h.span){p=h;break}for(void 0===p&&(p=e.LABEL_SPECS.second),o&&(p=t.extend({},p,{fmt:o})),r=p.start(l),d=[];(f=r.getTime())<=i;)f>=n&&d.push([p.fmt(r),f]),p.incr(r);return d},n=function(t){return{span:60*t*1e3,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours())},fmt:function(t){return""+e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())},incr:function(e){return e.setUTCMinutes(e.getUTCMinutes()+t)}}},i=function(t){return{span:1e3*t,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes())},fmt:function(t){return""+e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())+":"+e.pad2(t.getSeconds())},incr:function(e){return e.setUTCSeconds(e.getUTCSeconds()+t)}}},e.LABEL_SPECS={decade:{span:1728e8,start:function(t){return new Date(t.getFullYear()-t.getFullYear()%10,0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+10)}},year:{span:1728e7,start:function(t){return new Date(t.getFullYear(),0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+1)}},month:{span:24192e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),1)},fmt:function(t){return""+t.getFullYear()+"-"+e.pad2(t.getMonth()+1)},incr:function(t){return t.setMonth(t.getMonth()+1)}},week:{span:6048e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return""+t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+7)}},day:{span:864e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return""+t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+1)}},hour:n(60),"30min":n(30),"15min":n(15),"10min":n(10),"5min":n(5),minute:n(1),"30sec":i(30),"15sec":i(15),"10sec":i(10),"5sec":i(5),second:i(1)},e.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],e.Area=function(n){function i(n){var s;return this instanceof e.Area?(s=t.extend({},a,n),this.cumulative=!s.behaveLikeLine,"auto"===s.fillOpacity&&(s.fillOpacity=s.behaveLikeLine?.8:1),void i.__super__.constructor.call(this,s)):new e.Area(n)}var a;return r(i,n),a={fillOpacity:"auto",behaveLikeLine:!1},i.prototype.calcPoints=function(){var t,e,n,i,a,s,o;for(s=this.data,o=[],i=0,a=s.length;a>i;i++)t=s[i],t._x=this.transX(t.x),e=0,t._y=function(){var i,a,s,o;for(s=t.y,o=[],i=0,a=s.length;a>i;i++)n=s[i],this.options.behaveLikeLine?o.push(this.transY(n)):(e+=n||0,o.push(this.transY(e)));return o}.call(this),o.push(t._ymax=Math.max.apply(Math,t._y));return o},i.prototype.drawSeries=function(){var t,e,n,i,a,s,o,r;for(this.seriesPoints=[],e=this.options.behaveLikeLine?function(){s=[];for(var t=0,e=this.options.ykeys.length-1;e>=0?e>=t:t>=e;e>=0?t++:t--)s.push(t);return s}.apply(this):function(){o=[];for(var t=a=this.options.ykeys.length-1;0>=a?0>=t:t>=0;0>=a?t++:t--)o.push(t);return o}.apply(this),r=[],n=0,i=e.length;i>n;n++)t=e[n],this._drawFillFor(t),this._drawLineFor(t),r.push(this._drawPointFor(t));return r},i.prototype._drawFillFor=function(t){var e;return e=this.paths[t],null!==e?(e+="L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(e,this.fillForSeries(t))):void 0},i.prototype.fillForSeries=function(t){var e;return e=Raphael.rgb2hsl(this.colorFor(this.data[t],t,"line")),Raphael.hsl(e.h,this.options.behaveLikeLine?.9*e.s:.75*e.s,Math.min(.98,this.options.behaveLikeLine?1.2*e.l:1.25*e.l))},i.prototype.drawFilledPath=function(t,e){return this.raphael.path(t).attr("fill",e).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},i}(e.Line),e.Bar=function(n){function i(n){return this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),this instanceof e.Bar?void i.__super__.constructor.call(this,t.extend({},n,{parseTime:!1})):new e.Bar(n)}return r(i,n),i.prototype.init=function(){return this.cumulative=this.options.stacked,"always"!==this.options.hideHover?(this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},i.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},i.prototype.calc=function(){var t;return this.calcBars(),this.options.hideHover===!1?(t=this.hover).update.apply(t,this.hoverContentForRow(this.data.length-1)):void 0},i.prototype.calcBars=function(){var t,e,n,i,a,s,o;for(s=this.data,o=[],t=i=0,a=s.length;a>i;t=++i)e=s[t],e._x=this.left+this.width*(t+.5)/this.data.length,o.push(e._y=function(){var t,i,a,s;for(a=e.y,s=[],t=0,i=a.length;i>t;t++)n=a[t],null!=n?s.push(this.transY(n)):s.push(null);return s}.call(this));return o},i.prototype.draw=function(){var t;return((t=this.options.axes)===!0||"both"===t||"x"===t)&&this.drawXAxis(),this.drawSeries()},i.prototype.drawXAxis=function(){var t,e,n,i,a,s,o,r,l,c,u,d,h;for(c=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),o=null,s=null,h=[],t=u=0,d=this.data.length;d>=0?d>u:u>d;t=d>=0?++u:--u)r=this.data[this.data.length-1-t],e=this.drawXAxisLabel(r._x,c,r.label),l=e.getBBox(),e.transform("r"+-this.options.xLabelAngle),n=e.getBBox(),e.transform("t0,"+n.height/2+"..."),0!==this.options.xLabelAngle&&(a=-.5*l.width*Math.cos(this.options.xLabelAngle*Math.PI/180),e.transform("t"+a+",0...")),(null==o||o>=n.x+n.width||null!=s&&s>=n.x)&&n.x>=0&&n.x+n.width=0?this.transY(0):null,this.bars=function(){var r,d,m,g;for(m=this.data,g=[],i=r=0,d=m.length;d>r;i=++r)l=m[i],a=0,g.push(function(){var r,d,m,g;for(m=l._y,g=[],c=r=0,d=m.length;d>r;c=++r)p=m[c],null!==p?(f?(h=Math.min(p,f),e=Math.max(p,f)):(h=p,e=this.bottom),s=this.left+i*n+o,this.options.stacked||(s+=c*(t+this.options.barGap)),u=e-h,this.options.verticalGridCondition&&this.options.verticalGridCondition(l.x)&&this.drawBar(this.left+i*n,this.top,n,Math.abs(this.top-this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius),this.options.stacked&&(h-=a),this.drawBar(s,h,t,u,this.colorFor(l,c,"bar"),this.options.barOpacity,this.options.barRadius),g.push(a+=u)):g.push(null);return g}.call(this));return g}.call(this)},i.prototype.colorFor=function(t,e,n){var i,a;return"function"==typeof this.options.barColors?(i={x:t.x,y:t.y[e],label:t.label},a={index:e,key:this.options.ykeys[e],label:this.options.labels[e]},this.options.barColors.call(this,i,a,n)):this.options.barColors[e%this.options.barColors.length]},i.prototype.hitTest=function(t){return 0===this.data.length?null:(t=Math.max(Math.min(t,this.right),this.left),Math.min(this.data.length-1,Math.floor((t-this.left)/(this.width/this.data.length))))},i.prototype.onGridClick=function(t,e){var n;return n=this.hitTest(t),this.fire("click",n,this.data[n].src,t,e)},i.prototype.onHoverMove=function(t){var e,n;return e=this.hitTest(t),(n=this.hover).update.apply(n,this.hoverContentForRow(e))},i.prototype.onHoverOut=function(){return this.options.hideHover!==!1?this.hover.hide():void 0},i.prototype.hoverContentForRow=function(t){var e,n,i,a,s,o,r,l;for(i=this.data[t],e=""+i.label+" ",l=i.y,n=o=0,r=l.length;r>o;n=++o)s=l[n],e+="\n "+this.options.labels[n]+":\n "+this.yLabelFormat(s)+"\n ";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,i.src)),a=this.left+(t+.5)*this.width/this.data.length,[e,a]},i.prototype.drawXAxisLabel=function(t,e,n){var i;return i=this.raphael.text(t,e,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},i.prototype.drawBar=function(t,e,n,i,a,s,o){var r,l;return r=Math.max.apply(Math,o),l=0===r||r>i?this.raphael.rect(t,e,n,i):this.raphael.path(this.roundedRect(t,e,n,i,o)),l.attr("fill",a).attr("fill-opacity",s).attr("stroke","none")},i.prototype.roundedRect=function(t,e,n,i,a){return null==a&&(a=[0,0,0,0]),["M",t,a[0]+e,"Q",t,e,t+a[0],e,"L",t+n-a[1],e,"Q",t+n,e,t+n,e+a[1],"L",t+n,e+i-a[2],"Q",t+n,e+i,t+n-a[2],e+i,"L",t+a[3],e+i,"Q",t,e+i,t,e+i-a[3],"Z"]},i}(e.Grid),e.Donut=function(n){function i(n){this.resizeHandler=s(this.resizeHandler,this),this.select=s(this.select,this),this.click=s(this.click,this);var i=this;if(!(this instanceof e.Donut))return new e.Donut(n);if(this.options=t.extend({},this.defaults,n),this.el=t("string"==typeof n.element?document.getElementById(n.element):n.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==n.data&&0!==n.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(){return null!=i.timeoutId&&window.clearTimeout(i.timeoutId),i.timeoutId=window.setTimeout(i.resizeHandler,100)}),this.setData(n.data))}return r(i,n),i.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:e.commas,resize:!1},i.prototype.redraw=function(){var t,n,i,a,s,o,r,l,c,u,d,h,p,f,m,g,v,y,b,x,C,w,S;for(this.raphael.clear(),n=this.el.width()/2,i=this.el.height()/2,p=(Math.min(n,i)-10)/3,d=0,x=this.values,f=0,v=x.length;v>f;f++)h=x[f],d+=h;for(l=5/(2*p),t=1.9999*Math.PI-l*this.data.length,o=0,s=0,this.segments=[],C=this.values,a=m=0,y=C.length;y>m;a=++m)h=C[a],c=o+l+t*(h/d),u=new e.DonutSegment(n,i,2*p,p,o,c,this.data[a].color||this.options.colors[s%this.options.colors.length],this.options.backgroundColor,s,this.raphael),u.render(),this.segments.push(u),u.on("hover",this.select),u.on("click",this.click),o=c,s+=1;for(this.text1=this.drawEmptyDonutLabel(n,i-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(n,i+10,this.options.labelColor,14),r=Math.max.apply(Math,this.values),s=0,w=this.values,S=[],g=0,b=w.length;b>g;g++){if(h=w[g],h===r){this.select(s);break}S.push(s+=1)}return S},i.prototype.setData=function(t){var e;return this.data=t,this.values=function(){var t,n,i,a;for(i=this.data,a=[],t=0,n=i.length;n>t;t++)e=i[t],a.push(parseFloat(e.value));return a}.call(this),this.redraw()},i.prototype.click=function(t){return this.fire("click",t,this.data[t])},i.prototype.select=function(t){var e,n,i,a,s,o;for(o=this.segments,a=0,s=o.length;s>a;a++)n=o[a],n.deselect();return i=this.segments[t],i.select(),e=this.data[t],this.setLabels(e.label,this.options.formatter(e.value,e))},i.prototype.setLabels=function(t,e){var n,i,a,s,o,r,l,c;return n=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,s=1.8*n,a=n/2,i=n/3,this.text1.attr({text:t,transform:""}),o=this.text1.getBBox(),r=Math.min(s/o.width,a/o.height),this.text1.attr({transform:"S"+r+","+r+","+(o.x+o.width/2)+","+(o.y+o.height)}),this.text2.attr({text:e,transform:""}),l=this.text2.getBBox(),c=Math.min(s/l.width,i/l.height),this.text2.attr({transform:"S"+c+","+c+","+(l.x+l.width/2)+","+l.y})},i.prototype.drawEmptyDonutLabel=function(t,e,n,i,a){var s;return s=this.raphael.text(t,e,"").attr("font-size",i).attr("fill",n),null!=a&&s.attr("font-weight",a),s},i.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},i}(e.EventEmitter),e.DonutSegment=function(t){function e(t,e,n,i,a,o,r,l,c,u){this.cx=t,this.cy=e,this.inner=n,this.outer=i,this.color=r,this.backgroundColor=l,this.index=c,this.raphael=u,this.deselect=s(this.deselect,this),this.select=s(this.select,this),this.sin_p0=Math.sin(a),this.cos_p0=Math.cos(a),this.sin_p1=Math.sin(o),this.cos_p1=Math.cos(o),this.is_long=o-a>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return r(e,t),e.prototype.calcArcPoints=function(t){return[this.cx+t*this.sin_p0,this.cy+t*this.cos_p0,this.cx+t*this.sin_p1,this.cy+t*this.cos_p1]},e.prototype.calcSegment=function(t,e){var n,i,a,s,o,r,l,c,u,d;return u=this.calcArcPoints(t),n=u[0],a=u[1],i=u[2],s=u[3],d=this.calcArcPoints(e),o=d[0],l=d[1],r=d[2],c=d[3],"M"+n+","+a+("A"+t+","+t+",0,"+this.is_long+",0,"+i+","+s)+("L"+r+","+c)+("A"+e+","+e+",0,"+this.is_long+",1,"+o+","+l)+"Z"},e.prototype.calcArc=function(t){var e,n,i,a,s;return s=this.calcArcPoints(t),e=s[0],i=s[1],n=s[2],a=s[3],"M"+e+","+i+("A"+t+","+t+",0,"+this.is_long+",0,"+n+","+a)},e.prototype.render=function(){var t=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return t.fire("hover",t.index)},function(){return t.fire("click",t.index)})},e.prototype.drawDonutArc=function(t,e){return this.raphael.path(t).attr({stroke:e,"stroke-width":2,opacity:0})},e.prototype.drawDonutSegment=function(t,e,n,i,a){return this.raphael.path(t).attr({fill:e,stroke:n,"stroke-width":3}).hover(i).click(a)},e.prototype.select=function(){return this.selected?void 0:(this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0)},e.prototype.deselect=function(){return this.selected?(this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1):void 0},e}(e.EventEmitter)}).call(this);define("morris",["jquery","raphael"],function(t){return function(){var e;return e||t.Morris}}(this));define("app/ui/system_graph",["jquery","app/init","app/util","morris"],function(t,e,n,i){"use strict";var a={moduleClass:"pf-module",systemGraphModuleClass:"pf-system-graph-module",systemGraphClass:"pf-system-graph",systemGraphLabels:{jumps:{headline:"Jumps",units:"jumps",ykeys:["y"],labels:["jumps"],lineColors:["#375959"],pointFillColors:["#477372"]},shipKills:{headline:"Ship/POD Kills",units:"kills",ykeys:["y","z"],labels:["Ship kills","POD kills"],lineColors:["#375959","#477372"],pointFillColors:["#477372","#568a89"]},factionKills:{headline:"NPC Kills",units:"kills",ykeys:["y"],labels:["kills"],lineColors:["#375959"],pointFillColors:["#477372"]}}},s=function(t,e){var n="";a.systemGraphLabels.hasOwnProperty(t)&&(n=a.systemGraphLabels[t][e]);return n},o=function(t,e,n,a){if(n.length>0){var o=function(t){return Math.round(t)},r={element:t,data:n,xkey:"x",ykeys:s(e,"ykeys"),labels:s(e,"labels"),parseTime:!1,ymin:0,yLabelFormat:o,padding:10,hideHover:!0,pointSize:3,lineColors:s(e,"lineColors"),pointFillColors:s(e,"pointFillColors"),pointStrokeColors:["#141413"],lineWidth:2,grid:!0,gridStrokeWidth:.3,gridTextSize:9,gridTextFamily:"Oxygen Bold",gridTextColor:"#63676a",behaveLikeLine:!1,goals:[],goalLineColors:["#5cb85c"],smooth:!0,fillOpacity:.2,resize:!0,redraw:!0,eventStrokeWidth:2,eventLineColors:["#5CB85C"]};a>=0&&(r.events=[a]);i.Area(r)}},r=function(i,r){if(2===r.type.id){var l={systemIds:[r.systemId]},c=n.getServerTime(),u=Math.floor(c.getTime()/1e3),d=u-r.updated,h=Math.floor(d/3600),p=Math.floor(d%3600/60),f=(p/60).toFixed(2),m=h+f;
-m=23-m;t.ajax({type:"POST",url:e.path.getSystemGraphData,data:l,dataType:"json"}).done(function(n){var r=t("",{"class":[a.moduleClass,a.systemGraphModuleClass].join(" "),css:{opacity:0}});1===t(i).children().length?t(i).append(r):t(i).find(">:first-child").after(r);var l=t(" ",{"class":"row"});r.append(l);t.each(n,function(e,n){t.each(n,function(e,n){var i=t(" ",{"class":["col-xs-12","col-sm-6","col-md-4"].join(" ")}),r=t(" |