Файл: templates/backend/default/assets/plugins/shape-hover/js/snap.svg-min.min.js
Строк: 3513
<?php
!function(e){var t,l,n="0.4.2",i="hasOwnProperty",a=/[./]/,o="*",r=function(){},s=function(e,t){return e-t},c={n:{}},u=function(e,n){e=String(e);var i,a=l,o=Array.prototype.slice.call(arguments,2),r=u.listeners(e),c=0,d=[],h={},f=[],p=t;t=e,l=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(s);d[c]<0;)if(i=h[d[c++]],f.push(i.apply(n,o)),l)return l=a,f;for(m=0;g>m;m++)if(i=r[m],"zIndex"in i)if(i.zIndex==d[c]){if(f.push(i.apply(n,o)),l)break;do if(c++,i=h[d[c]],i&&f.push(i.apply(n,o)),l)break;while(i)}else h[i.zIndex]=i;else if(f.push(i.apply(n,o)),l)break;return l=a,t=p,f.length?f:null};u._events=c,u.listeners=function(e){var t,l,n,i,r,s,u,d,h=e.split(a),f=c,p=[f],m=[];for(i=0,r=h.length;r>i;i++){for(d=[],s=0,u=p.length;u>s;s++)for(f=p[s].n,l=[f[h[i]],f[o]],n=2;n--;)t=l[n],t&&(d.push(t),m=m.concat(t.f||[]));p=d}return m},u.on=function(e,t){if(e=String(e),"function"!=typeof t)return function(){};for(var l=e.split(a),n=c,i=0,o=l.length;o>i;i++)n=n.n,n=n.hasOwnProperty(l[i])&&n[l[i]]||(n[l[i]]={n:{}});for(n.f=n.f||[],i=0,o=n.f.length;o>i;i++)if(n.f[i]==t)return r;return n.f.push(t),function(e){+e==+e&&(t.zIndex=+e)}},u.f=function(e){var t=[].slice.call(arguments,1);return function(){u.apply(null,[e,null].concat(t).concat([].slice.call(arguments,0)))}},u.stop=function(){l=1},u.nt=function(e){return e?new RegExp("(?:\.|\/|^)"+e+"(?:\.|\/|$)").test(t):t},u.nts=function(){return t.split(a)},u.off=u.unbind=function(e,t){if(!e)return u._events=c={n:{}},void 0;var l,n,r,s,d,h,f,p=e.split(a),m=[c];for(s=0,d=p.length;d>s;s++)for(h=0;h<m.length;h+=r.length-2){if(r=[h,1],l=m[h].n,p[s]!=o)l[p[s]]&&r.push(l[p[s]]);else for(n in l)l[i](n)&&r.push(l[n]);m.splice.apply(m,r)}for(s=0,d=m.length;d>s;s++)for(l=m[s];l.n;){if(t){if(l.f){for(h=0,f=l.f.length;f>h;h++)if(l.f[h]==t){l.f.splice(h,1);break}!l.f.length&&delete l.f}for(n in l.n)if(l.n[i](n)&&l.n[n].f){var g=l.n[n].f;for(h=0,f=g.length;f>h;h++)if(g[h]==t){g.splice(h,1);break}!g.length&&delete l.n[n].f}}else{delete l.f;for(n in l.n)l.n[i](n)&&l.n[n].f&&delete l.n[n].f}l=l.n}},u.once=function(e,t){var l=function(){return u.unbind(e,l),t.apply(this,arguments)};return u.on(e,l)},u.version=n,u.toString=function(){return"You are running Eve "+n},"undefined"!=typeof module&&module.exports?module.exports=u:"undefined"!=typeof define?define("eve",[],function(){return u}):e.eve=u}(this),function(e,t){"function"==typeof define&&define.amd?define(["eve"],function(l){return t(e,l)}):t(e,e.eve)}(this,function(e,t){var l=function(t){var l={},n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,16)},i=Array.isArray||function(e){return e instanceof Array||"[object Array]"==Object.prototype.toString.call(e)},a=0,o="M"+(+new Date).toString(36),r=function(){return o+(a++).toString(36)},s=Date.now||function(){return+new Date},c=function(e){var t=this;if(null==e)return t.s;var l=t.s-e;t.b+=t.dur*l,t.B+=t.dur*l,t.s=e},u=function(e){var t=this;return null==e?t.spd:(t.spd=e,void 0)},d=function(e){var t=this;return null==e?t.dur:(t.s=t.s*e/t.dur,t.dur=e,void 0)},h=function(){var e=this;delete l[e.id],t("mina.stop."+e.id,e)},f=function(){var e=this;e.pdif||(delete l[e.id],e.pdif=e.get()-e.b)},p=function(){var e=this;e.pdif&&(e.b=e.get()-e.pdif,delete e.pdif,l[e.id]=e)},m=function(){var e=0;for(var a in l)if(l.hasOwnProperty(a)){var o,r=l[a],s=r.get();if(e++,r.s=(s-r.b)/(r.dur/r.spd),r.s>=1&&(delete l[a],r.s=1,e--,function(e){setTimeout(function(){t("mina.finish."+e.id,e)})}(r)),i(r.start)){o=[];for(var c=0,u=r.start.length;u>c;c++)o[c]=+r.start[c]+(r.end[c]-r.start[c])*r.easing(r.s)}else o=+r.start+(r.end-r.start)*r.easing(r.s);r.set(o)}e&&n(m)},g=function(e,t,i,a,o,s,v){var y={id:r(),start:e,end:t,b:i,s:0,dur:a-i,spd:1,get:o,set:s,easing:v||g.linear,status:c,speed:u,duration:d,stop:h,pause:f,resume:p};l[y.id]=y;var b,C=0;for(b in l)if(l.hasOwnProperty(b)&&(C++,2==C))break;return 1==C&&n(m),y};return g.time=s,g.getById=function(e){return l[e]||null},g.linear=function(e){return e},g.easeout=function(e){return Math.pow(e,1.7)},g.easein=function(e){return Math.pow(e,.48)},g.easeinout=function(e){if(1==e)return 1;if(0==e)return 0;var t=.48-e/1.04,l=Math.sqrt(.1734+t*t),n=l-t,i=Math.pow(Math.abs(n),1/3)*(0>n?-1:1),a=-l-t,o=Math.pow(Math.abs(a),1/3)*(0>a?-1:1),r=i+o+.5;return 3*(1-r)*r*r+r*r*r},g.backin=function(e){if(1==e)return 1;var t=1.70158;return e*e*((t+1)*e-t)},g.backout=function(e){if(0==e)return 0;e-=1;var t=1.70158;return e*e*((t+1)*e+t)+1},g.elastic=function(e){return e==!!e?e:Math.pow(2,-10*e)*Math.sin(2*(e-.075)*Math.PI/.3)+1},g.bounce=function(e){var t,l=7.5625,n=2.75;return 1/n>e?t=l*e*e:2/n>e?(e-=1.5/n,t=l*e*e+.75):2.5/n>e?(e-=2.25/n,t=l*e*e+.9375):(e-=2.625/n,t=l*e*e+.984375),t},e.mina=g,g}("undefined"==typeof t?function(){}:t),n=function(){function n(e,t){if(e){if(e.tagName)return x(e);if(e instanceof C)return e;if(null==t)return e=L.doc.querySelector(e),x(e)}return e=null==e?"100%":e,t=null==t?"100%":t,new D(e,t)}function i(e,t){if(t){if("string"==typeof e&&(e=i(e)),"string"==typeof t)return"xlink:"==t.substring(0,6)?e.getAttributeNS(at,t.substring(6)):"xml:"==t.substring(0,4)?e.getAttributeNS(ot,t.substring(4)):e.getAttribute(t);for(var l in t)if(t[A](l)){var n=K(t[l]);n?"xlink:"==l.substring(0,6)?e.setAttributeNS(at,l.substring(6),n):"xml:"==l.substring(0,4)?e.setAttributeNS(ot,l.substring(4),n):e.setAttribute(l,n):e.removeAttribute(l)}}else e=L.doc.createElementNS(ot,e);return e}function a(e,t){return t=K.prototype.toLowerCase.call(t),"finite"==t?isFinite(e):"array"==t&&(e instanceof Array||Array.isArray&&Array.isArray(e))?!0:"null"==t&&null===e||t==typeof e&&null!==e||"object"==t&&e===Object(e)||W.call(e).slice(8,-1).toLowerCase()==t}function o(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var l in e)e[A](l)&&(t[l]=o(e[l]));return t}function r(e,t){for(var l=0,n=e.length;n>l;l++)if(e[l]===t)return e.push(e.splice(l,1)[0])}function s(e,t,l){function n(){var i=Array.prototype.slice.call(arguments,0),a=i.join("␀"),o=n.cache=n.cache||{},s=n.count=n.count||[];return o[A](a)?(r(s,a),l?l(o[a]):o[a]):(s.length>=1e3&&delete o[s.shift()],s.push(a),o[a]=e.apply(t,i),l?l(o[a]):o[a])}return n}function c(e,t,l,n,i,a){if(null==i){var o=e-l,r=t-n;return o||r?(180+180*B.atan2(-r,-o)/Z+360)%360:0}return c(e,t,i,a)-c(l,n,i,a)}function u(e){return e%360*Z/180}function d(e){return 180*e/Z%360}function h(e,t,l,n,i,a){return null==t&&"[object SVGMatrix]"==W.call(e)?(this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.e=e.e,this.f=e.f,void 0):(null!=e?(this.a=+e,this.b=+t,this.c=+l,this.d=+n,this.e=+i,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0),void 0)}function f(e){var t=[];return e=e.replace(/(?:^|s)(w+)(([^)]+))/g,function(e,l,n){return n=n.split(/s*,s*|s+/),"rotate"==l&&1==n.length&&n.push(0,0),"scale"==l&&(2==n.length&&n.push(0,0),1==n.length&&n.push(n[0],0,0)),"skewX"==l?t.push(["m",1,0,B.tan(u(n[0])),1,0,0]):"skewY"==l?t.push(["m",1,B.tan(u(n[0])),0,1,0,0]):t.push([l.charAt(0)].concat(n)),e}),t}function p(e,t){var l=gt(e),n=new h;if(l)for(var i=0,a=l.length;a>i;i++){var o,r,s,c,u,d=l[i],f=d.length,p=K(d[0]).toLowerCase(),m=d[0]!=p,g=m?n.invert():0;"t"==p&&2==f?n.translate(d[1],0):"t"==p&&3==f?m?(o=g.x(0,0),r=g.y(0,0),s=g.x(d[1],d[2]),c=g.y(d[1],d[2]),n.translate(s-o,c-r)):n.translate(d[1],d[2]):"r"==p?2==f?(u=u||t,n.rotate(d[1],u.x+u.width/2,u.y+u.height/2)):4==f&&(m?(s=g.x(d[2],d[3]),c=g.y(d[2],d[3]),n.rotate(d[1],s,c)):n.rotate(d[1],d[2],d[3])):"s"==p?2==f||3==f?(u=u||t,n.scale(d[1],d[f-1],u.x+u.width/2,u.y+u.height/2)):4==f?m?(s=g.x(d[2],d[3]),c=g.y(d[2],d[3]),n.scale(d[1],d[1],s,c)):n.scale(d[1],d[1],d[2],d[3]):5==f&&(m?(s=g.x(d[3],d[4]),c=g.y(d[3],d[4]),n.scale(d[1],d[2],s,c)):n.scale(d[1],d[2],d[3],d[4])):"m"==p&&7==f&&n.add(d[1],d[2],d[3],d[4],d[5],d[6])}return n}function m(e,t){if(null==t){var l=!0;if(t="linearGradient"==e.type||"radialGradient"==e.type?e.node.getAttribute("gradientTransform"):"pattern"==e.type?e.node.getAttribute("patternTransform"):e.node.getAttribute("transform"),!t)return new h;t=f(t)}else t=n._.rgTransform.test(t)?K(t).replace(/.{3}|u2026/g,e._.transform||U):f(t),a(t,"array")&&(t=n.path?n.path.toString.call(t):K(t)),e._.transform=t;var i=p(t,e.getBBox(1));return l?i:(e.matrix=i,void 0)}function v(e){var t=n._.someDefs;if(t&&vt(t.ownerDocument.documentElement,t))return t;var l=e.node.ownerSVGElement&&x(e.node.ownerSVGElement)||e.node.parentNode&&x(e.node.parentNode)||n.select("svg")||n(0,0),i=l.select("defs"),a=null==i?!1:i.node;return a||(a=E("defs",l.node).node),n._.someDefs=a,a}function y(e,t,l){function n(e){return null==e?U:e==+e?e:(i(c,{width:e}),c.getBBox().width)}function a(e){return null==e?U:e==+e?e:(i(c,{height:e}),c.getBBox().height)}function o(n,i){null==t?s[n]=i(e.attr(n)):n==t&&(s=i(null==l?e.attr(n):l))}var r=v(e),s={},c=r.querySelector(".svg---mgr");switch(c||(c=i("rect"),i(c,{width:10,height:10,"class":"svg---mgr"}),r.appendChild(c)),e.type){case"rect":o("rx",n),o("ry",a);case"image":o("width",n),o("height",a);case"text":o("x",n),o("y",a);break;case"circle":o("cx",n),o("cy",a),o("r",n);break;case"ellipse":o("cx",n),o("cy",a),o("rx",n),o("ry",a);break;case"line":o("x1",n),o("x2",n),o("y1",a),o("y2",a);break;case"marker":o("refX",n),o("markerWidth",n),o("refY",a),o("markerHeight",a);break;case"radialGradient":o("fx",n),o("fy",a);break;case"tspan":o("dx",n),o("dy",a);break;default:o(t,n)}return s}function b(e){a(e,"array")||(e=Array.prototype.slice.call(arguments,0));for(var t=0,l=0,n=this.node;this[t];)delete this[t++];for(t=0;t<e.length;t++)"set"==e[t].type?e[t].forEach(function(e){n.appendChild(e.node)}):n.appendChild(e[t].node);var i=n.childNodes;for(t=0;t<i.length;t++)this[l++]=x(i[t]);return this}function C(e){if(e.snap in rt)return rt[e.snap];var t,l=this.id=it();try{t=e.ownerSVGElement}catch(n){}if(this.node=e,t&&(this.paper=new D(t)),this.type=e.tagName,this.anims={},this._={transform:[]},e.snap=l,rt[l]=this,"g"==this.type){this.add=b;for(var i in D.prototype)D.prototype[A](i)&&(this[i]=D.prototype[i])}}function T(e){for(var t,l=0,n=e.length;n>l;l++)if(t=t||e[l])return t}function w(e){this.node=e}function E(e,t){var l=i(e);t.appendChild(l);var n=x(l);return n.type=e,n}function D(e,t){var l,n,a,o=D.prototype;if(e&&"svg"==e.tagName){if(e.snap in rt)return rt[e.snap];l=new C(e),n=e.getElementsByTagName("desc")[0],a=e.getElementsByTagName("defs")[0],n||(n=i("desc"),n.appendChild(L.doc.createTextNode("Created with Snap")),l.node.appendChild(n)),a||(a=i("defs"),l.node.appendChild(a)),l.defs=a;for(var r in o)o[A](r)&&(l[r]=o[r]);l.paper=l.root=l}else l=E("svg",L.doc.body),i(l.node,{height:t,version:1.1,width:e,xmlns:ot});return l}function x(e){return e?e instanceof C||e instanceof w?e:"svg"==e.tagName?new D(e):new C(e):e}function S(){return this.selectAll("stop")}function _(e,t){var l=i("stop"),a={offset:+t+"%"};return e=n.color(e),a["stop-color"]=e.hex,e.opacity<1&&(a["stop-opacity"]=e.opacity),i(l,a),this.node.appendChild(l),this}function I(){if("linearGradient"==this.type){var e=i(this.node,"x1")||0,t=i(this.node,"x2")||1,l=i(this.node,"y1")||0,a=i(this.node,"y2")||0;return n._.box(e,l,B.abs(t-e),B.abs(a-l))}var o=this.node.cx||.5,r=this.node.cy||.5,s=this.node.r||0;return n._.box(o-s,r-s,2*s,2*s)}function k(e,l){function n(e,t){for(var l=(t-c)/(e-u),n=u;e>n;n++)r[n].offset=+(+c+l*(n-u)).toFixed(2);u=e,c=t}var a,o=T(t("snap.util.grad.parse",null,l));if(!o)return null;o.params.unshift(e),a="l"==o.type.toLowerCase()?O.apply(0,o.params):R.apply(0,o.params),o.type!=o.type.toLowerCase()&&i(a.node,{gradientUnits:"userSpaceOnUse"});var r=o.stops,s=r.length,c=0,u=0;s--;for(var d=0;s>d;d++)"offset"in r[d]&&n(d,r[d].offset);for(r[s].offset=r[s].offset||100,n(s,r[s].offset),d=0;s>=d;d++){var h=r[d];a.addStop(h.color,h.offset)}return a}function O(e,t,l,n,a){var o=E("linearGradient",e);return o.stops=S,o.addStop=_,o.getBBox=I,null!=t&&i(o.node,{x1:t,y1:l,x2:n,y2:a}),o}function R(e,t,l,n,a,o){var r=E("radialGradient",e);return r.stops=S,r.addStop=_,r.getBBox=I,null!=t&&i(r.node,{cx:t,cy:l,r:n}),null!=a&&null!=o&&i(r.node,{fx:a,fy:o}),r}function M(e){return function(l){if(t.stop(),l instanceof w&&1==l.node.childNodes.length&&("radialGradient"==l.node.firstChild.tagName||"linearGradient"==l.node.firstChild.tagName||"pattern"==l.node.firstChild.tagName)&&(l=l.node.firstChild,v(this).appendChild(l),l=x(l)),l instanceof C)if("radialGradient"==l.type||"linearGradient"==l.type||"pattern"==l.type){l.node.id||i(l.node,{id:l.id});var a=st(l.node.id)}else a=l.attr(e);else if(a=n.color(l),a.error){var o=k(v(this),l);o?(o.node.id||i(o.node,{id:o.id}),a=st(o.node.id)):a=l}else a=K(a);var r={};r[e]=a,i(this.node,r),this.node.style[e]=U}}function N(e){for(var t=[],l=e.childNodes,n=0,i=l.length;i>n;n++){var a=l[n];3==a.nodeType&&t.push(a.nodeValue),"tspan"==a.tagName&&(1==a.childNodes.length&&3==a.firstChild.nodeType?t.push(a.firstChild.nodeValue):t.push(N(a)))}return t}n.version="0.2.0",n.toString=function(){return"Snap v"+this.version},n._={};var L={win:e,doc:e.document};n._.glob=L;var A="hasOwnProperty",K=String,P=parseFloat,F=parseInt,B=Math,z=B.max,$=B.min,H=B.abs,Z=(B.pow,B.PI),U=(B.round,""),j=" ",W=Object.prototype.toString,V=/^s*((#[a-fd]{6})|(#[a-fd]{3})|rgba?(s*([d.]+%?s*,s*[d.]+%?s*,s*[d.]+%?(?:s*,s*[d.]+%?)?)s*)|hsba?(s*([d.]+(?:deg|xb0|%)?s*,s*[d.]+%?s*,s*[d.]+(?:%?s*,s*[d.]+)?%?)s*)|hsla?(s*([d.]+(?:deg|xb0|%)?s*,s*[d.]+%?s*,s*[d.]+(?:%?s*,s*[d.]+)?%?)s*))s*$/i,q=/^url(#?([^)]+))$/,G=" nfr u2028u2029",Y=new RegExp("[,"+G+"]+"),X=(new RegExp("["+G+"]","g"),new RegExp("["+G+"]*,["+G+"]*")),J={hs:1,rg:1},Q=new RegExp("([a-z])["+G+",]*((-?\d*\.?\d*(?:e[\-+]?\d+)?["+G+"]*,?["+G+"]*)+)","ig"),et=new RegExp("([rstm])["+G+",]*((-?\d*\.?\d*(?:e[\-+]?\d+)?["+G+"]*,?["+G+"]*)+)","ig"),tt=new RegExp("(-?\d*\.?\d*(?:e[\-+]?\d+)?)["+G+"]*,?["+G+"]*","ig"),lt=0,nt="S"+(+new Date).toString(36),it=function(){return nt+(lt++).toString(36)},at="http://www.w3.org/1999/xlink",ot="http://www.w3.org/2000/svg",rt={},st=n.url=function(e){return"url('#"+e+"')"};n._.$=i,n._.id=it,n.format=function(){var e=/{([^}]+)}/g,t=/(?:(?:^|.)(.+?)(?=[|.|$|()|[('|")(.+?)2])(())?/g,l=function(e,l,n){var i=n;return l.replace(t,function(e,t,l,n,a){t=t||n,i&&(t in i&&(i=i[t]),"function"==typeof i&&a&&(i=i()))}),i=(null==i||i==n?e:i)+""};return function(t,n){return K(t).replace(e,function(e,t){return l(e,t,n)})}}();var ct=function(){function e(){this.parentNode.removeChild(this)}return function(t,l){var n=L.doc.createElement("img"),i=L.doc.body;n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){l.call(n),n.onload=n.onerror=null,i.removeChild(n)},n.onerror=e,i.appendChild(n),n.src=t}}();n._.clone=o,n._.cacher=s,n.rad=u,n.deg=d,n.angle=c,n.is=a,n.snapTo=function(e,t,l){if(l=a(l,"finite")?l:10,a(e,"array")){for(var n=e.length;n--;)if(H(e[n]-t)<=l)return e[n]}else{e=+e;var i=t%e;if(l>i)return t-i;if(i>e-l)return t-i+e}return t},function(e){function t(e){return e[0]*e[0]+e[1]*e[1]}function l(e){var l=B.sqrt(t(e));e[0]&&(e[0]/=l),e[1]&&(e[1]/=l)}e.add=function(e,t,l,n,i,a){var o,r,s,c,u=[[],[],[]],d=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[e,l,i],[t,n,a],[0,0,1]];for(e&&e instanceof h&&(f=[[e.a,e.c,e.e],[e.b,e.d,e.f],[0,0,1]]),o=0;3>o;o++)for(r=0;3>r;r++){for(c=0,s=0;3>s;s++)c+=d[o][s]*f[s][r];u[o][r]=c}return 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],this},e.invert=function(){var e=this,t=e.a*e.d-e.b*e.c;return new h(e.d/t,-e.b/t,-e.c/t,e.a/t,(e.c*e.f-e.d*e.e)/t,(e.b*e.e-e.a*e.f)/t)},e.clone=function(){return new h(this.a,this.b,this.c,this.d,this.e,this.f)},e.translate=function(e,t){return this.add(1,0,0,1,e,t)},e.scale=function(e,t,l,n){return null==t&&(t=e),(l||n)&&this.add(1,0,0,1,l,n),this.add(e,0,0,t,0,0),(l||n)&&this.add(1,0,0,1,-l,-n),this},e.rotate=function(e,t,l){e=u(e),t=t||0,l=l||0;var n=+B.cos(e).toFixed(9),i=+B.sin(e).toFixed(9);return this.add(n,i,-i,n,t,l),this.add(1,0,0,1,-t,-l)},e.x=function(e,t){return e*this.a+t*this.c+this.e},e.y=function(e,t){return e*this.b+t*this.d+this.f},e.get=function(e){return+this[K.fromCharCode(97+e)].toFixed(4)},e.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},e.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},e.split=function(){var e={};e.dx=this.e,e.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];e.scalex=B.sqrt(t(n[0])),l(n[0]),e.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*e.shear,n[1][1]-n[0][1]*e.shear],e.scaley=B.sqrt(t(n[1])),l(n[1]),e.shear/=e.scaley;var i=-n[0][1],a=n[1][1];return 0>a?(e.rotate=d(B.acos(a)),0>i&&(e.rotate=360-e.rotate)):e.rotate=d(B.asin(i)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e},e.toTransformString=function(e){var t=e||this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[+t.dx.toFixed(4),+t.dy.toFixed(4)]:U)+(1!=t.scalex||1!=t.scaley?"s"+[t.scalex,t.scaley,0,0]:U)+(t.rotate?"r"+[+t.rotate.toFixed(4),0,0]:U)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(h.prototype),n.Matrix=h,n.getRGB=s(function(e){if(!e||(e=K(e)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ft};if("none"==e)return{r:-1,g:-1,b:-1,hex:"none",toString:ft};if(!(J[A](e.toLowerCase().substring(0,2))||"#"==e.charAt())&&(e=ut(e)),!e)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ft};var t,l,i,o,r,s,c=e.match(V);return c?(c[2]&&(i=F(c[2].substring(5),16),l=F(c[2].substring(3,5),16),t=F(c[2].substring(1,3),16)),c[3]&&(i=F((r=c[3].charAt(3))+r,16),l=F((r=c[3].charAt(2))+r,16),t=F((r=c[3].charAt(1))+r,16)),c[4]&&(s=c[4].split(X),t=P(s[0]),"%"==s[0].slice(-1)&&(t*=2.55),l=P(s[1]),"%"==s[1].slice(-1)&&(l*=2.55),i=P(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(o=P(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100)),c[5]?(s=c[5].split(X),t=P(s[0]),"%"==s[0].slice(-1)&&(t/=100),l=P(s[1]),"%"==s[1].slice(-1)&&(l/=100),i=P(s[2]),"%"==s[2].slice(-1)&&(i/=100),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(t/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(o=P(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100),n.hsb2rgb(t,l,i,o)):c[6]?(s=c[6].split(X),t=P(s[0]),"%"==s[0].slice(-1)&&(t/=100),l=P(s[1]),"%"==s[1].slice(-1)&&(l/=100),i=P(s[2]),"%"==s[2].slice(-1)&&(i/=100),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(t/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(o=P(s[3])),s[3]&&"%"==s[3].slice(-1)&&(o/=100),n.hsl2rgb(t,l,i,o)):(t=$(B.round(t),255),l=$(B.round(l),255),i=$(B.round(i),255),o=$(z(o,0),1),c={r:t,g:l,b:i,toString:ft},c.hex="#"+(16777216|i|l<<8|t<<16).toString(16).slice(1),c.opacity=a(o,"finite")?o:1,c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ft}},n),n.hsb=s(function(e,t,l){return n.hsb2rgb(e,t,l).hex}),n.hsl=s(function(e,t,l){return n.hsl2rgb(e,t,l).hex}),n.rgb=s(function(e,t,l,n){if(a(n,"finite")){var i=B.round;return"rgba("+[i(e),i(t),i(l),+n.toFixed(2)]+")"}return"#"+(16777216|l|t<<8|e<<16).toString(16).slice(1)});var ut=function(e){var t=L.doc.getElementsByTagName("head")[0],l="rgb(255, 0, 0)";return ut=s(function(e){if("red"==e.toLowerCase())return l;t.style.color=l,t.style.color=e;var n=L.doc.defaultView.getComputedStyle(t,U).getPropertyValue("color");return n==l?null:n}),ut(e)},dt=function(){return"hsb("+[this.h,this.s,this.b]+")"},ht=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},pt=function(e,t,l){if(null==t&&a(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(l=e.b,t=e.g,e=e.r),null==t&&a(e,string)){var i=n.getRGB(e);e=i.r,t=i.g,l=i.b}return(e>1||t>1||l>1)&&(e/=255,t/=255,l/=255),[e,t,l]},mt=function(e,t,l,i){e=B.round(255*e),t=B.round(255*t),l=B.round(255*l);var o={r:e,g:t,b:l,opacity:a(i,"finite")?i:1,hex:n.rgb(e,t,l),toString:ft};return a(i,"finite")&&(o.opacity=i),o};n.color=function(e){var t;return a(e,"object")&&"h"in e&&"s"in e&&"b"in e?(t=n.hsb2rgb(e),e.r=t.r,e.g=t.g,e.b=t.b,e.opacity=1,e.hex=t.hex):a(e,"object")&&"h"in e&&"s"in e&&"l"in e?(t=n.hsl2rgb(e),e.r=t.r,e.g=t.g,e.b=t.b,e.opacity=1,e.hex=t.hex):(a(e,"string")&&(e=n.getRGB(e)),a(e,"object")&&"r"in e&&"g"in e&&"b"in e&&!("error"in e)?(t=n.rgb2hsl(e),e.h=t.h,e.s=t.s,e.l=t.l,t=n.rgb2hsb(e),e.v=t.b):(e={hex:"none"},e.r=e.g=e.b=e.h=e.s=e.v=e.l=-1,e.error=1)),e.toString=ft,e},n.hsb2rgb=function(e,t,l,n){a(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(l=e.b,t=e.s,e=e.h,n=e.o),e*=360;var i,o,r,s,c;return e=e%360/60,c=l*t,s=c*(1-H(e%2-1)),i=o=r=l-c,e=~~e,i+=[c,s,0,0,s,c][e],o+=[s,c,c,s,0,0][e],r+=[0,0,s,c,c,s][e],mt(i,o,r,n)},n.hsl2rgb=function(e,t,l,n){a(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(l=e.l,t=e.s,e=e.h),(e>1||t>1||l>1)&&(e/=360,t/=100,l/=100),e*=360;var i,o,r,s,c;return e=e%360/60,c=2*t*(.5>l?l:1-l),s=c*(1-H(e%2-1)),i=o=r=l-c/2,e=~~e,i+=[c,s,0,0,s,c][e],o+=[s,c,c,s,0,0][e],r+=[0,0,s,c,c,s][e],mt(i,o,r,n)},n.rgb2hsb=function(e,t,l){l=pt(e,t,l),e=l[0],t=l[1],l=l[2];var n,i,a,o;return a=z(e,t,l),o=a-$(e,t,l),n=0==o?null:a==e?(t-l)/o:a==t?(l-e)/o+2:(e-t)/o+4,n=60*((n+360)%6)/360,i=0==o?0:o/a,{h:n,s:i,b:a,toString:dt}},n.rgb2hsl=function(e,t,l){l=pt(e,t,l),e=l[0],t=l[1],l=l[2];var n,i,a,o,r,s;return o=z(e,t,l),r=$(e,t,l),s=o-r,n=0==s?null:o==e?(t-l)/s:o==t?(l-e)/s+2:(e-t)/s+4,n=60*((n+360)%6)/360,a=(o+r)/2,i=0==s?0:.5>a?s/(2*a):s/(2-2*a),{h:n,s:i,l:a,toString:ht}},n.parsePathString=function(e){if(!e)return null;var t=n.path(e);if(t.arr)return n.path.clone(t.arr);var l={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return a(e,"array")&&a(e[0],"array")&&(i=n.path.clone(e)),i.length||K(e).replace(Q,function(e,t,n){var a=[],o=t.toLowerCase();if(n.replace(tt,function(e,t){t&&a.push(+t)}),"m"==o&&a.length>2&&(i.push([t].concat(a.splice(0,2))),o="l",t="m"==t?"l":"L"),"o"==o&&1==a.length&&i.push([t,a[0]]),"r"==o)i.push([t].concat(a));else for(;a.length>=l[o]&&(i.push([t].concat(a.splice(0,l[o]))),l[o]););}),i.toString=n.path.toString,t.arr=n.path.clone(i),i};var gt=n.parseTransformString=function(e){if(!e)return null;var t=[];return a(e,"array")&&a(e[0],"array")&&(t=n.path.clone(e)),t.length||K(e).replace(et,function(e,l,n){var i=[];l.toLowerCase(),n.replace(tt,function(e,t){t&&i.push(+t)}),t.push([l].concat(i))}),t.toString=n.path.toString,t};n._.svgTransform2string=f,n._.rgTransform=new RegExp("^[a-z]["+G+"]*-?\.?\d","i"),n._.transform2matrix=p,n._unit2px=y;var vt=L.doc.contains||L.doc.compareDocumentPosition?function(e,t){var l=9==e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e==n||!(!n||1!=n.nodeType||!(l.contains?l.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t;)if(t=t.parentNode,t==e)return!0;return!1};n._.getSomeDefs=v,n.select=function(e){return x(L.doc.querySelector(e))},n.selectAll=function(e){for(var t=L.doc.querySelectorAll(e),l=(n.set||Array)(),i=0;i<t.length;i++)l.push(x(t[i]));return l},function(e){function o(e){function t(e,t){var l=i(e.node,t);l=l&&l.match(o),l=l&&l[2],l&&"#"==l.charAt()&&(l=l.substring(1),l&&(s[l]=(s[l]||[]).concat(function(l){var n={};n[t]=st(l),i(e.node,n)})))}function l(e){var t=i(e.node,"xlink:href");t&&"#"==t.charAt()&&(t=t.substring(1),t&&(s[t]=(s[t]||[]).concat(function(t){e.attr("xlink:href","#"+t)})))}for(var n,a=e.selectAll("*"),o=/^s*url(("|'|)(.*)1)s*$/,r=[],s={},c=0,u=a.length;u>c;c++){n=a[c],t(n,"fill"),t(n,"stroke"),t(n,"filter"),t(n,"mask"),t(n,"clip-path"),l(n);var d=i(n.node,"id");d&&(i(n.node,{id:n.id}),r.push({old:d,id:n.id}))}for(c=0,u=r.length;u>c;c++){var h=s[r[c].old];if(h)for(var f=0,p=h.length;p>f;f++)h[f](r[c].id)}}function r(e,t,l){return function(n){var i=n.slice(e,t);return 1==i.length&&(i=i[0]),l?l(i):i}}function s(e){return function(){var t=e?"<"+this.type:"",l=this.node.attributes,n=this.node.childNodes;if(e)for(var i=0,a=l.length;a>i;i++)t+=" "+l[i].name+'="'+l[i].value.replace(/"/g,'\"')+'"';if(n.length){for(e&&(t+=">"),i=0,a=n.length;a>i;i++)3==n[i].nodeType?t+=n[i].nodeValue:1==n[i].nodeType&&(t+=x(n[i]).toString());e&&(t+="</"+this.type+">")}else e&&(t+="/>");return t}}e.attr=function(e,l){var n=this;if(n.node,!e)return n;if(a(e,"string")){if(!(arguments.length>1))return T(t("snap.util.getattr."+e,n));var i={};i[e]=l,e=i}for(var o in e)e[A](o)&&t("snap.util.attr."+o,n,e[o]);return n},e.getBBox=function(e){var t=this;if("use"==t.type&&(t=t.original),t.removed)return{};var l=t._;return e?(l.bboxwt=n.path.get[t.type]?n.path.getBBox(t.realPath=n.path.get[t.type](t)):n._.box(t.node.getBBox()),n._.box(l.bboxwt)):(t.realPath=(n.path.get[t.type]||n.path.get.deflt)(t),l.bbox=n.path.getBBox(n.path.map(t.realPath,t.matrix)),n._.box(l.bbox))};var c=function(){return this.string};e.transform=function(e){var t=this._;if(null==e){var l=new h(this.node.getCTM()),n=m(this),a=n.toTransformString(),o=K(n)==K(this.matrix)?t.transform:a;return{string:o,globalMatrix:l,localMatrix:n,diffMatrix:l.clone().add(n.invert()),global:l.toTransformString(),local:a,toString:c}}return e instanceof h&&(e=e.toTransformString()),m(this,e),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?i(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?i(this.node,{patternTransform:this.matrix}):i(this.node,{transform:this.matrix})),this},e.parent=function(){return x(this.node.parentNode)},e.append=e.add=function(e){if(e){if("set"==e.type){var t=this;return e.forEach(function(e){t.add(e)}),this}e=x(e),this.node.appendChild(e.node),e.paper=this.paper}return this},e.appendTo=function(e){return e&&(e=x(e),e.append(this)),this},e.prepend=function(e){if(e){e=x(e);var t=e.parent();this.node.insertBefore(e.node,this.node.firstChild),this.add&&this.add(),e.paper=this.paper,this.parent()&&this.parent().add(),t&&t.add()}return this},e.prependTo=function(e){return e=x(e),e.prepend(this),this},e.before=function(e){if("set"==e.type){var t=this;return e.forEach(function(e){var l=e.parent();t.node.parentNode.insertBefore(e.node,t.node),l&&l.add()}),this.parent().add(),this}e=x(e);var l=e.parent();return this.node.parentNode.insertBefore(e.node,this.node),this.parent()&&this.parent().add(),l&&l.add(),e.paper=this.paper,this},e.after=function(e){e=x(e);var t=e.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(e.node,this.node.nextSibling):this.node.parentNode.appendChild(e.node),this.parent()&&this.parent().add(),t&&t.add(),e.paper=this.paper,this},e.insertBefore=function(e){e=x(e);var t=this.parent();return e.node.parentNode.insertBefore(this.node,e.node),this.paper=e.paper,t&&t.add(),e.parent()&&e.parent().add(),this},e.insertAfter=function(e){e=x(e);var t=this.parent();return e.node.parentNode.insertBefore(this.node,e.node.nextSibling),this.paper=e.paper,t&&t.add(),e.parent()&&e.parent().add(),this},e.remove=function(){var e=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,e&&e.add(),this},e.select=function(e){return x(this.node.querySelector(e))},e.selectAll=function(e){for(var t=this.node.querySelectorAll(e),l=(n.set||Array)(),i=0;i<t.length;i++)l.push(x(t[i]));return l},e.asPX=function(e,t){return null==t&&(t=this.attr(e)),+y(this,e,t)},e.use=function(){var e,t=this.node.id;return t||(t=this.id,i(this.node,{id:t})),e="linearGradient"==this.type||"radialGradient"==this.type||"pattern"==this.type?E(this.type,this.node.parentNode):E("use",this.node.parentNode),i(e.node,{"xlink:href":"#"+t}),e.original=this,e},e.clone=function(){var e=x(this.node.cloneNode(!0));return i(e.node,"id")&&i(e.node,{id:e.id}),o(e),e.insertAfter(this),e},e.toDefs=function(){var e=v(this);return e.appendChild(this.node),this},e.pattern=function(e,t,l,n){var o=E("pattern",v(this));return null==e&&(e=this.getBBox()),a(e,"object")&&"x"in e&&(t=e.y,l=e.width,n=e.height,e=e.x),i(o.node,{x:e,y:t,width:l,height:n,patternUnits:"userSpaceOnUse",id:o.id,viewBox:[e,t,l,n].join(" ")}),o.node.appendChild(this.node),o},e.marker=function(e,t,l,n,o,r){var s=E("marker",v(this));return null==e&&(e=this.getBBox()),a(e,"object")&&"x"in e&&(t=e.y,l=e.width,n=e.height,o=e.refX||e.cx,r=e.refY||e.cy,e=e.x),i(s.node,{viewBox:[e,t,l,n].join(j),markerWidth:l,markerHeight:n,orient:"auto",refX:o||0,refY:r||0,id:s.id}),s.node.appendChild(this.node),s};var u=function(e,t,n,i){"function"!=typeof n||n.length||(i=n,n=l.linear),this.attr=e,this.dur=t,n&&(this.easing=n),i&&(this.callback=i)};n.animation=function(e,t,l,n){return new u(e,t,l,n)},e.inAnim=function(){var e=this,t=[];for(var l in e.anims)e.anims[A](l)&&!function(e){t.push({anim:new u(e._attrs,e.dur,e.easing,e._callback),curStatus:e.status(),status:function(t){return e.status(t)},stop:function(){e.stop()}})}(e.anims[l]);return t},n.animate=function(e,n,i,a,o,r){"function"!=typeof o||o.length||(r=o,o=l.linear);var s=l.time(),c=l(e,n,s,s+a,l.time,i,o);return r&&t.once("mina.finish."+c.id,r),c},e.stop=function(){for(var e=this.inAnim(),t=0,l=e.length;l>t;t++)e[t].stop();return this},e.animate=function(e,n,i,o){"function"!=typeof i||i.length||(o=i,i=l.linear),e instanceof u&&(o=e.callback,i=e.easing,n=i.dur,e=e.attr);var s,c,d,h,f=[],p=[],m={},g=this;for(var v in e)if(e[A](v)){g.equal?(h=g.equal(v,K(e[v])),s=h.from,c=h.to,d=h.f):(s=+g.attr(v),c=+e[v]);var y=a(s,"array")?s.length:1;m[v]=r(f.length,f.length+y,d),f=f.concat(s),p=p.concat(c)}var b=l.time(),C=l(f,p,b,b+n,l.time,function(e){var t={};for(var l in m)m[A](l)&&(t[l]=m[l](e));g.attr(t)},i);return g.anims[C.id]=C,C._attrs=e,C._callback=o,t.once("mina.finish."+C.id,function(){delete g.anims[C.id],o&&o.call(g)}),t.once("mina.stop."+C.id,function(){delete g.anims[C.id]}),g};var d={};e.data=function(e,l){var i=d[this.id]=d[this.id]||{};if(0==arguments.length)return t("snap.data.get."+this.id,this,i,null),i;if(1==arguments.length){if(n.is(e,"object")){for(var a in e)e[A](a)&&this.data(a,e[a]);return this}return t("snap.data.get."+this.id,this,i[e],e),i[e]}return i[e]=l,t("snap.data.set."+this.id,this,l,e),this},e.removeData=function(e){return null==e?d[this.id]={}:d[this.id]&&delete d[this.id][e],this},e.outerSVG=e.toString=s(1),e.innerSVG=s()}(C.prototype),n.parse=function(e){var t=L.doc.createDocumentFragment(),l=!0,n=L.doc.createElement("div");if(e=K(e),e.match(/^s*<s*svg(?:s|>)/)||(e="<svg>"+e+"</svg>",l=!1),n.innerHTML=e,e=n.getElementsByTagName("svg")[0])if(l)t=e;else for(;e.firstChild;)t.appendChild(e.firstChild);return n.innerHTML=U,new w(t)},w.prototype.select=C.prototype.select,w.prototype.selectAll=C.prototype.selectAll,n.fragment=function(){for(var e=Array.prototype.slice.call(arguments,0),t=L.doc.createDocumentFragment(),l=0,i=e.length;i>l;l++){var a=e[l];a.node&&a.node.nodeType&&t.appendChild(a.node),a.nodeType&&t.appendChild(a),"string"==typeof a&&t.appendChild(n.parse(a).node)}return new w(t)},function(e){e.el=function(e,t){return E(e,this.node).attr(t)},e.rect=function(e,t,l,n,i,o){var r;return null==o&&(o=i),a(e,"object")&&"x"in e?r=e:null!=e&&(r={x:e,y:t,width:l,height:n},null!=i&&(r.rx=i,r.ry=o)),this.el("rect",r)},e.circle=function(e,t,l){var n;return a(e,"object")&&"cx"in e?n=e:null!=e&&(n={cx:e,cy:t,r:l}),this.el("circle",n)},e.image=function(e,t,l,n,o){var r=E("image",this.node);if(a(e,"object")&&"src"in e)r.attr(e);else if(null!=e){var s={"xlink:href":e,preserveAspectRatio:"none"};null!=t&&null!=l&&(s.x=t,s.y=l),null!=n&&null!=o?(s.width=n,s.height=o):ct(e,function(){i(r.node,{width:this.offsetWidth,height:this.offsetHeight})}),i(r.node,s)}return r},e.ellipse=function(e,t,l,n){var i=E("ellipse",this.node);
return a(e,"object")&&"cx"in e?i.attr(e):null!=e&&i.attr({cx:e,cy:t,rx:l,ry:n}),i},e.path=function(e){var t=E("path",this.node);return a(e,"object")&&!a(e,"array")?t.attr(e):e&&t.attr({d:e}),t},e.group=e.g=function(t){var l=E("g",this.node);l.add=b;for(var n in e)e[A](n)&&(l[n]=e[n]);return 1==arguments.length&&t&&!t.type?l.attr(t):arguments.length&&l.add(Array.prototype.slice.call(arguments,0)),l},e.text=function(e,t,l){var n=E("text",this.node);return a(e,"object")?n.attr(e):null!=e&&n.attr({x:e,y:t,text:l||""}),n},e.line=function(e,t,l,n){var i=E("line",this.node);return a(e,"object")?i.attr(e):null!=e&&i.attr({x1:e,x2:l,y1:t,y2:n}),i},e.polyline=function(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments,0));var t=E("polyline",this.node);return a(e,"object")&&!a(e,"array")?t.attr(e):null!=e&&t.attr({points:e}),t},e.polygon=function(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments,0));var t=E("polygon",this.node);return a(e,"object")&&!a(e,"array")?t.attr(e):null!=e&&t.attr({points:e}),t},function(){e.gradient=function(e){return k(this.defs,e)},e.gradientLinear=function(e,t,l,n){return O(this.defs,e,t,l,n)},e.gradientRadial=function(e,t,l,n,i){return R(this.defs,e,t,l,n,i)},e.toString=function(){var e,t=L.doc.createDocumentFragment(),l=L.doc.createElement("div"),n=this.node.cloneNode(!0);return t.appendChild(l),l.appendChild(n),i(n,{xmlns:ot}),e=l.innerHTML,t.removeChild(t.firstChild),e},e.clear=function(){for(var e,t=this.node.firstChild;t;)e=t.nextSibling,"defs"!=t.tagName&&t.parentNode.removeChild(t),t=e}}()}(D.prototype),n.ajax=function(e,l,n,i){var o=new XMLHttpRequest,r=it();if(o){if(a(l,"function"))i=n,n=l,l=null;else if(a(l,"object")){var s=[];for(var c in l)l.hasOwnProperty(c)&&s.push(encodeURIComponent(c)+"="+encodeURIComponent(l[c]));l=s.join("&")}return o.open(l?"POST":"GET",e,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),l&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n&&(t.once("snap.ajax."+r+".0",n),t.once("snap.ajax."+r+".200",n),t.once("snap.ajax."+r+".304",n)),o.onreadystatechange=function(){4==o.readyState&&t("snap.ajax."+r+"."+o.status,i,o)},4==o.readyState?o:(o.send(l),o)}},n.load=function(e,t,l){n.ajax(e,function(e){var i=n.parse(e.responseText);l?t.call(l,i):t(i)})},t.on("snap.util.attr.mask",function(e){if(e instanceof C||e instanceof w){if(t.stop(),e instanceof w&&1==e.node.childNodes.length&&(e=e.node.firstChild,v(this).appendChild(e),e=x(e)),"mask"==e.type)var l=e;else l=E("mask",v(this)),l.node.appendChild(e.node),!l.node.id&&i(l.node,{id:l.id});i(this.node,{mask:st(l.id)})}}),function(e){t.on("snap.util.attr.clip",e),t.on("snap.util.attr.clip-path",e),t.on("snap.util.attr.clipPath",e)}(function(e){if(e instanceof C||e instanceof w){if(t.stop(),"clipPath"==e.type)var l=e;else l=E("clipPath",v(this)),l.node.appendChild(e.node),!l.node.id&&i(l.node,{id:l.id});i(this.node,{"clip-path":st(l.id)})}}),t.on("snap.util.attr.fill",M("fill")),t.on("snap.util.attr.stroke",M("stroke"));var yt=/^([lr])(?:(([^)]*)))?(.*)$/i;t.on("snap.util.grad.parse",function(e){e=K(e);var t=e.match(yt);if(!t)return null;var l=t[1],n=t[2],i=t[3];return n=n.split(/s*,s*/).map(function(e){return+e==e?+e:e}),1==n.length&&0==n[0]&&(n=[]),i=i.split("-"),i=i.map(function(e){e=e.split(":");var t={color:e[0]};return e[1]&&(t.offset=e[1]),t}),{type:l,params:n,stops:i}}),t.on("snap.util.attr.d",function(e){t.stop(),a(e,"array")&&a(e[0],"array")&&(e=n.path.toString.call(e)),e=K(e),e.match(/[ruo]/i)&&(e=n.path.toAbsolute(e)),i(this.node,{d:e})})(-1),t.on("snap.util.attr.#text",function(e){t.stop(),e=K(e);for(var l=L.doc.createTextNode(e);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(l)})(-1),t.on("snap.util.attr.path",function(e){t.stop(),this.attr({d:e})})(-1),t.on("snap.util.attr.viewBox",function(e){var l;l=a(e,"object")&&"x"in e?[e.x,e.y,e.width,e.height].join(" "):a(e,"array")?e.join(" "):e,i(this.node,{viewBox:l}),t.stop()})(-1),t.on("snap.util.attr.transform",function(e){this.transform(e),t.stop()})(-1),t.on("snap.util.attr.r",function(e){"rect"==this.type&&(t.stop(),i(this.node,{rx:e,ry:e}))})(-1),t.on("snap.util.attr.textpath",function(e){if(t.stop(),"text"==this.type){var l,n,o;if(!e&&this.textPath){for(n=this.textPath;n.node.firstChild;)this.node.appendChild(n.node.firstChild);return n.remove(),delete this.textPath,void 0}if(a(e,"string")){var r=v(this),s=x(r.parentNode).path(e);r.appendChild(s.node),l=s.id,s.attr({id:l})}else e=x(e),e instanceof C&&(l=e.attr("id"),l||(l=e.id,e.attr({id:l})));if(l)if(n=this.textPath,o=this.node,n)n.attr({"xlink:href":"#"+l});else{for(n=i("textPath",{"xlink:href":"#"+l});o.firstChild;)n.appendChild(o.firstChild);o.appendChild(n),this.textPath=x(n)}}})(-1),t.on("snap.util.attr.text",function(e){if("text"==this.type){for(var l=this.node,n=function(e){var t=i("tspan");if(a(e,"array"))for(var l=0;l<e.length;l++)t.appendChild(n(e[l]));else t.appendChild(L.doc.createTextNode(e));return t.normalize&&t.normalize(),t};l.firstChild;)l.removeChild(l.firstChild);for(var o=n(e);o.firstChild;)l.appendChild(o.firstChild)}t.stop()})(-1);var bt={"alignment-baseline":0,"baseline-shift":0,clip:0,"clip-path":0,"clip-rule":0,color:0,"color-interpolation":0,"color-interpolation-filters":0,"color-profile":0,"color-rendering":0,cursor:0,direction:0,display:0,"dominant-baseline":0,"enable-background":0,fill:0,"fill-opacity":0,"fill-rule":0,filter:0,"flood-color":0,"flood-opacity":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0,"glyph-orientation-horizontal":0,"glyph-orientation-vertical":0,"image-rendering":0,kerning:0,"letter-spacing":0,"lighting-color":0,marker:0,"marker-end":0,"marker-mid":0,"marker-start":0,mask:0,opacity:0,overflow:0,"pointer-events":0,"shape-rendering":0,"stop-color":0,"stop-opacity":0,stroke:0,"stroke-dasharray":0,"stroke-dashoffset":0,"stroke-linecap":0,"stroke-linejoin":0,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":0,"text-decoration":0,"text-rendering":0,"unicode-bidi":0,visibility:0,"word-spacing":0,"writing-mode":0};t.on("snap.util.attr",function(e){var l=t.nt(),n={};l=l.substring(l.lastIndexOf(".")+1),n[l]=e;var a=l.replace(/-(w)/gi,function(e,t){return t.toUpperCase()}),o=l.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});bt[A](o)?this.node.style[a]=null==e?U:e:i(this.node,n)}),t.on("snap.util.getattr.transform",function(){return t.stop(),this.transform()})(-1),t.on("snap.util.getattr.textpath",function(){return t.stop(),this.textPath})(-1),function(){function e(e){return function(){t.stop();var l=L.doc.defaultView.getComputedStyle(this.node,null).getPropertyValue("marker-"+e);return"none"==l?l:n(L.doc.getElementById(l.match(q)[1]))}}function l(e){return function(l){t.stop();var n="marker"+e.charAt(0).toUpperCase()+e.substring(1);if(""==l||!l)return this.node.style[n]="none",void 0;if("marker"==l.type){var a=l.node.id;return a||i(l.node,{id:l.id}),this.node.style[n]=st(a),void 0}}}t.on("snap.util.getattr.marker-end",e("end"))(-1),t.on("snap.util.getattr.markerEnd",e("end"))(-1),t.on("snap.util.getattr.marker-start",e("start"))(-1),t.on("snap.util.getattr.markerStart",e("start"))(-1),t.on("snap.util.getattr.marker-mid",e("mid"))(-1),t.on("snap.util.getattr.markerMid",e("mid"))(-1),t.on("snap.util.attr.marker-end",l("end"))(-1),t.on("snap.util.attr.markerEnd",l("end"))(-1),t.on("snap.util.attr.marker-start",l("start"))(-1),t.on("snap.util.attr.markerStart",l("start"))(-1),t.on("snap.util.attr.marker-mid",l("mid"))(-1),t.on("snap.util.attr.markerMid",l("mid"))(-1)}(),t.on("snap.util.getattr.r",function(){return"rect"==this.type&&i(this.node,"rx")==i(this.node,"ry")?(t.stop(),i(this.node,"rx")):void 0})(-1),t.on("snap.util.getattr.text",function(){if("text"==this.type||"tspan"==this.type){t.stop();var e=N(this.node);return 1==e.length?e[0]:e}})(-1),t.on("snap.util.getattr.#text",function(){return this.node.textContent})(-1),t.on("snap.util.getattr.viewBox",function(){t.stop();var e=i(this.node,"viewBox").split(Y);return n._.box(+e[0],+e[1],+e[2],+e[3])})(-1),t.on("snap.util.getattr.points",function(){var e=i(this.node,"points");return t.stop(),e.split(Y)}),t.on("snap.util.getattr.path",function(){var e=i(this.node,"d");return t.stop(),e}),t.on("snap.util.getattr",function(){var e=t.nt();e=e.substring(e.lastIndexOf(".")+1);var l=e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});return bt[A](l)?L.doc.defaultView.getComputedStyle(this.node,null).getPropertyValue(l):i(this.node,e)});var Ct=function(e){var t=e.getBoundingClientRect(),l=e.ownerDocument,n=l.body,i=l.documentElement,a=i.clientTop||n.clientTop||0,o=i.clientLeft||n.clientLeft||0,r=t.top+(g.win.pageYOffset||i.scrollTop||n.scrollTop)-a,s=t.left+(g.win.pageXOffset||i.scrollLeft||n.scrollLeft)-o;return{y:r,x:s}};return n.getElementByPoint=function(e,t){var l=this,n=(l.canvas,L.doc.elementFromPoint(e,t));if(L.win.opera&&"svg"==n.tagName){var i=Ct(n),a=n.createSVGRect();a.x=e-i.x,a.y=t-i.y,a.width=a.height=1;var o=n.getIntersectionList(a,null);o.length&&(n=o[o.length-1])}return n?x(n):null},n.plugin=function(e){e(n,C,D,L)},L.win.Snap=n,n}();return n.plugin(function(e,t){function l(e){var t=l.ps=l.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var l in t)t[P](l)&&l!=e&&(t[l].sleep--,!t[l].sleep&&delete t[l])}),t[e]}function n(e,t,l,n){return null==e&&(e=t=l=n=0),null==t&&(t=e.y,l=e.width,n=e.height,e=e.x),{x:e,y:t,width:l,w:l,height:n,h:n,x2:e+l,y2:t+n,cx:e+l/2,cy:t+n/2,r1:z.min(l,n)/2,r2:z.max(l,n)/2,r0:z.sqrt(l*l+n*n)/2,path:w(e,t,l,n),vb:[e,t,l,n].join(" ")}}function i(){return this.join(",").replace(F,"$1")}function a(e){var t=K(e);return t.toString=i,t}function o(e,t,l,n,i,a,o,r,c){return null==c?f(e,t,l,n,i,a,o,r):s(e,t,l,n,i,a,o,r,p(e,t,l,n,i,a,o,r,c))}function r(l,n){function i(e){return+(+e).toFixed(3)}return e._.cacher(function(e,a,r){e instanceof t&&(e=e.attr("d")),e=R(e);for(var c,u,d,h,f,p="",m={},g=0,v=0,y=e.length;y>v;v++){if(d=e[v],"M"==d[0])c=+d[1],u=+d[2];else{if(h=o(c,u,d[1],d[2],d[3],d[4],d[5],d[6]),g+h>a){if(n&&!m.start){if(f=o(c,u,d[1],d[2],d[3],d[4],d[5],d[6],a-g),p+=["C"+i(f.start.x),i(f.start.y),i(f.m.x),i(f.m.y),i(f.x),i(f.y)],r)return p;m.start=p,p=["M"+i(f.x),i(f.y)+"C"+i(f.n.x),i(f.n.y),i(f.end.x),i(f.end.y),i(d[5]),i(d[6])].join(),g+=h,c=+d[5],u=+d[6];continue}if(!l&&!n)return f=o(c,u,d[1],d[2],d[3],d[4],d[5],d[6],a-g)}g+=h,c=+d[5],u=+d[6]}p+=d.shift()+d}return m.end=p,f=l?g:n?m:s(c,u,d[0],d[1],d[2],d[3],d[4],d[5],1)},null,e._.clone)}function s(e,t,l,n,i,a,o,r,s){var c=1-s,u=U(c,3),d=U(c,2),h=s*s,f=h*s,p=u*e+3*d*s*l+3*c*s*s*i+f*o,m=u*t+3*d*s*n+3*c*s*s*a+f*r,g=e+2*s*(l-e)+h*(i-2*l+e),v=t+2*s*(n-t)+h*(a-2*n+t),y=l+2*s*(i-l)+h*(o-2*i+l),b=n+2*s*(a-n)+h*(r-2*a+n),C=c*e+s*l,T=c*t+s*n,w=c*i+s*o,E=c*a+s*r,D=90-180*z.atan2(g-y,v-b)/$;return{x:p,y:m,m:{x:g,y:v},n:{x:y,y:b},start:{x:C,y:T},end:{x:w,y:E},alpha:D}}function c(t,l,i,a,o,r,s,c){e.is(t,"array")||(t=[t,l,i,a,o,r,s,c]);var u=O.apply(null,t);return n(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)}function u(e,t,l){return t>=e.x&&t<=e.x+e.width&&l>=e.y&&l<=e.y+e.height}function d(e,t){return e=n(e),t=n(t),u(t,e.x,e.y)||u(t,e.x2,e.y)||u(t,e.x,e.y2)||u(t,e.x2,e.y2)||u(e,t.x,t.y)||u(e,t.x2,t.y)||u(e,t.x,t.y2)||u(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}function h(e,t,l,n,i){var a=-3*t+9*l-9*n+3*i,o=e*a+6*t-12*l+6*n;return e*o-3*t+3*l}function f(e,t,l,n,i,a,o,r,s){null==s&&(s=1),s=s>1?1:0>s?0:s;for(var c=s/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,m=0;u>m;m++){var g=c*d[m]+c,v=h(g,e,l,i,o),y=h(g,t,n,a,r),b=v*v+y*y;p+=f[m]*z.sqrt(b)}return c*p}function p(e,t,l,n,i,a,o,r,s){if(!(0>s||f(e,t,l,n,i,a,o,r)<s)){var c,u=1,d=u/2,h=u-d,p=.01;for(c=f(e,t,l,n,i,a,o,r,h);j(c-s)>p;)d/=2,h+=(s>c?1:-1)*d,c=f(e,t,l,n,i,a,o,r,h);return h}}function m(e,t,l,n,i,a,o,r){if(!(Z(e,l)<H(i,o)||H(e,l)>Z(i,o)||Z(t,n)<H(a,r)||H(t,n)>Z(a,r))){var s=(e*n-t*l)*(i-o)-(e-l)*(i*r-a*o),c=(e*n-t*l)*(a-r)-(t-n)*(i*r-a*o),u=(e-l)*(a-r)-(t-n)*(i-o);if(u){var d=s/u,h=c/u,f=+d.toFixed(2),p=+h.toFixed(2);if(!(f<+H(e,l).toFixed(2)||f>+Z(e,l).toFixed(2)||f<+H(i,o).toFixed(2)||f>+Z(i,o).toFixed(2)||p<+H(t,n).toFixed(2)||p>+Z(t,n).toFixed(2)||p<+H(a,r).toFixed(2)||p>+Z(a,r).toFixed(2)))return{x:d,y:h}}}}function g(e,t,l){var n=c(e),i=c(t);if(!d(n,i))return l?0:[];for(var a=f.apply(0,e),o=f.apply(0,t),r=~~(a/5),u=~~(o/5),h=[],p=[],g={},v=l?0:[],y=0;r+1>y;y++){var b=s.apply(0,e.concat(y/r));h.push({x:b.x,y:b.y,t:y/r})}for(y=0;u+1>y;y++)b=s.apply(0,t.concat(y/u)),p.push({x:b.x,y:b.y,t:y/u});for(y=0;r>y;y++)for(var C=0;u>C;C++){var T=h[y],w=h[y+1],E=p[C],D=p[C+1],x=j(w.x-T.x)<.001?"y":"x",S=j(D.x-E.x)<.001?"y":"x",_=m(T.x,T.y,w.x,w.y,E.x,E.y,D.x,D.y);if(_){if(g[_.x.toFixed(4)]==_.y.toFixed(4))continue;g[_.x.toFixed(4)]=_.y.toFixed(4);var I=T.t+j((_[x]-T[x])/(w[x]-T[x]))*(w.t-T.t),k=E.t+j((_[S]-E[S])/(D[S]-E[S]))*(D.t-E.t);I>=0&&1>=I&&k>=0&&1>=k&&(l?v++:v.push({x:_.x,y:_.y,t1:I,t2:k}))}}return v}function v(e,t){return b(e,t)}function y(e,t){return b(e,t,1)}function b(e,t,l){e=R(e),t=R(t);for(var n,i,a,o,r,s,c,u,d,h,f=l?0:[],p=0,m=e.length;m>p;p++){var v=e[p];if("M"==v[0])n=r=v[1],i=s=v[2];else{"C"==v[0]?(d=[n,i].concat(v.slice(1)),n=d[6],i=d[7]):(d=[n,i,n,i,r,s,r,s],n=r,i=s);for(var y=0,b=t.length;b>y;y++){var C=t[y];if("M"==C[0])a=c=C[1],o=u=C[2];else{"C"==C[0]?(h=[a,o].concat(C.slice(1)),a=h[6],o=h[7]):(h=[a,o,a,o,c,u,c,u],a=c,o=u);var T=g(d,h,l);if(l)f+=T;else{for(var w=0,E=T.length;E>w;w++)T[w].segment1=p,T[w].segment2=y,T[w].bez1=d,T[w].bez2=h;f=f.concat(T)}}}}}return f}function C(e,t,l){var n=T(e);return u(n,t,l)&&1==b(e,[["M",t,l],["H",n.x2+10]],1)%2}function T(e){var t=l(e);if(t.bbox)return K(t.bbox);if(!e)return n();e=R(e);for(var i,a=0,o=0,r=[],s=[],c=0,u=e.length;u>c;c++)if(i=e[c],"M"==i[0])a=i[1],o=i[2],r.push(a),s.push(o);else{var d=O(a,o,i[1],i[2],i[3],i[4],i[5],i[6]);r=r.concat(d.min.x,d.max.x),s=s.concat(d.min.y,d.max.y),a=i[5],o=i[6]}var h=H.apply(0,r),f=H.apply(0,s),p=Z.apply(0,r),m=Z.apply(0,s),g=n(h,f,p-h,m-f);return t.bbox=K(g),g}function w(e,t,l,n,a){if(a)return[["M",e+a,t],["l",l-2*a,0],["a",a,a,0,0,1,a,a],["l",0,n-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-l,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-n],["a",a,a,0,0,1,a,-a],["z"]];var o=[["M",e,t],["l",l,0],["l",0,n],["l",-l,0],["z"]];return o.toString=i,o}function E(e,t,l,n,a){if(null==a&&null==n&&(n=l),null!=a)var o=Math.PI/180,r=e+l*Math.cos(-n*o),s=e+l*Math.cos(-a*o),c=t+l*Math.sin(-n*o),u=t+l*Math.sin(-a*o),d=[["M",r,c],["A",l,l,0,+(a-n>180),0,s,u]];else d=[["M",e,t],["m",0,-n],["a",l,n,0,1,1,0,2*n],["a",l,n,0,1,1,0,-2*n],["z"]];return d.toString=i,d}function D(t){var n=l(t),o=String.prototype.toLowerCase;if(n.rel)return a(n.rel);e.is(t,"array")&&e.is(t&&t[0],"array")||(t=e.parsePathString(t));var r=[],s=0,c=0,u=0,d=0,h=0;"M"==t[0][0]&&(s=t[0][1],c=t[0][2],u=s,d=c,h++,r.push(["M",s,c]));for(var f=h,p=t.length;p>f;f++){var m=r[f]=[],g=t[f];if(g[0]!=o.call(g[0]))switch(m[0]=o.call(g[0]),m[0]){case"a":m[1]=g[1],m[2]=g[2],m[3]=g[3],m[4]=g[4],m[5]=g[5],m[6]=+(g[6]-s).toFixed(3),m[7]=+(g[7]-c).toFixed(3);break;case"v":m[1]=+(g[1]-c).toFixed(3);break;case"m":u=g[1],d=g[2];default:for(var v=1,y=g.length;y>v;v++)m[v]=+(g[v]-(v%2?s:c)).toFixed(3)}else{m=r[f]=[],"m"==g[0]&&(u=g[1]+s,d=g[2]+c);for(var b=0,C=g.length;C>b;b++)r[f][b]=g[b]}var T=r[f].length;switch(r[f][0]){case"z":s=u,c=d;break;case"h":s+=+r[f][T-1];break;case"v":c+=+r[f][T-1];break;default:s+=+r[f][T-2],c+=+r[f][T-1]}}return r.toString=i,n.rel=a(r),r}function x(t){var n=l(t);if(n.abs)return a(n.abs);if(A(t,"array")&&A(t&&t[0],"array")||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var o,r=[],s=0,c=0,u=0,d=0,h=0;"M"==t[0][0]&&(s=+t[0][1],c=+t[0][2],u=s,d=c,h++,r[0]=["M",s,c]);for(var f,p,m=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),g=h,v=t.length;v>g;g++){if(r.push(f=[]),p=t[g],o=p[0],o!=o.toUpperCase())switch(f[0]=o.toUpperCase(),f[0]){case"A":f[1]=p[1],f[2]=p[2],f[3]=p[3],f[4]=p[4],f[5]=p[5],f[6]=+(p[6]+s),f[7]=+(p[7]+c);break;case"V":f[1]=+p[1]+c;break;case"H":f[1]=+p[1]+s;break;case"R":for(var y=[s,c].concat(p.slice(1)),b=2,C=y.length;C>b;b++)y[b]=+y[b]+s,y[++b]=+y[b]+c;r.pop(),r=r.concat(N(y,m));break;case"O":r.pop(),y=E(s,c,p[1],p[2]),y.push(y[0]),r=r.concat(y);break;case"U":r.pop(),r=r.concat(E(s,c,p[1],p[2],p[3])),f=["U"].concat(r[r.length-1].slice(-2));break;case"M":u=+p[1]+s,d=+p[2]+c;default:for(b=1,C=p.length;C>b;b++)f[b]=+p[b]+(b%2?s:c)}else if("R"==o)y=[s,c].concat(p.slice(1)),r.pop(),r=r.concat(N(y,m)),f=["R"].concat(p.slice(-2));else if("O"==o)r.pop(),y=E(s,c,p[1],p[2]),y.push(y[0]),r=r.concat(y);else if("U"==o)r.pop(),r=r.concat(E(s,c,p[1],p[2],p[3])),f=["U"].concat(r[r.length-1].slice(-2));else for(var T=0,w=p.length;w>T;T++)f[T]=p[T];if(o=o.toUpperCase(),"O"!=o)switch(f[0]){case"Z":s=u,c=d;break;case"H":s=f[1];break;case"V":c=f[1];break;case"M":u=f[f.length-2],d=f[f.length-1];default:s=f[f.length-2],c=f[f.length-1]}}return r.toString=i,n.abs=a(r),r}function S(e,t,l,n){return[e,t,l,n,l,n]}function _(e,t,l,n,i,a){var o=1/3,r=2/3;return[o*e+r*l,o*t+r*n,o*i+r*l,o*a+r*n,i,a]}function I(t,l,n,i,a,o,r,s,c,u){var d,h=120*$/180,f=$/180*(+a||0),p=[],m=e._.cacher(function(e,t,l){var n=e*z.cos(l)-t*z.sin(l),i=e*z.sin(l)+t*z.cos(l);return{x:n,y:i}});if(u)D=u[0],x=u[1],w=u[2],E=u[3];else{d=m(t,l,-f),t=d.x,l=d.y,d=m(s,c,-f),s=d.x,c=d.y;var g=(z.cos($/180*a),z.sin($/180*a),(t-s)/2),v=(l-c)/2,y=g*g/(n*n)+v*v/(i*i);y>1&&(y=z.sqrt(y),n=y*n,i=y*i);var b=n*n,C=i*i,T=(o==r?-1:1)*z.sqrt(j((b*C-b*v*v-C*g*g)/(b*v*v+C*g*g))),w=T*n*v/i+(t+s)/2,E=T*-i*g/n+(l+c)/2,D=z.asin(((l-E)/i).toFixed(9)),x=z.asin(((c-E)/i).toFixed(9));D=w>t?$-D:D,x=w>s?$-x:x,0>D&&(D=2*$+D),0>x&&(x=2*$+x),r&&D>x&&(D-=2*$),!r&&x>D&&(x-=2*$)}var S=x-D;if(j(S)>h){var _=x,k=s,O=c;x=D+h*(r&&x>D?1:-1),s=w+n*z.cos(x),c=E+i*z.sin(x),p=I(s,c,n,i,a,0,r,k,O,[x,_,w,E])}S=x-D;var R=z.cos(D),M=z.sin(D),N=z.cos(x),L=z.sin(x),A=z.tan(S/4),K=4/3*n*A,P=4/3*i*A,F=[t,l],B=[t+K*M,l-P*R],H=[s+K*L,c-P*N],Z=[s,c];if(B[0]=2*F[0]-B[0],B[1]=2*F[1]-B[1],u)return[B,H,Z].concat(p);p=[B,H,Z].concat(p).join().split(",");for(var U=[],W=0,V=p.length;V>W;W++)U[W]=W%2?m(p[W-1],p[W],f).y:m(p[W],p[W+1],f).x;return U}function k(e,t,l,n,i,a,o,r,s){var c=1-s;return{x:U(c,3)*e+3*U(c,2)*s*l+3*c*s*s*i+U(s,3)*o,y:U(c,3)*t+3*U(c,2)*s*n+3*c*s*s*a+U(s,3)*r}}function O(e,t,l,n,i,a,o,r){var s,c=i-2*l+e-(o-2*i+l),u=2*(l-e)-2*(i-l),d=e-l,h=(-u+z.sqrt(u*u-4*c*d))/2/c,f=(-u-z.sqrt(u*u-4*c*d))/2/c,p=[t,r],m=[e,o];return j(h)>"1e12"&&(h=.5),j(f)>"1e12"&&(f=.5),h>0&&1>h&&(s=k(e,t,l,n,i,a,o,r,h),m.push(s.x),p.push(s.y)),f>0&&1>f&&(s=k(e,t,l,n,i,a,o,r,f),m.push(s.x),p.push(s.y)),c=a-2*n+t-(r-2*a+n),u=2*(n-t)-2*(a-n),d=t-n,h=(-u+z.sqrt(u*u-4*c*d))/2/c,f=(-u-z.sqrt(u*u-4*c*d))/2/c,j(h)>"1e12"&&(h=.5),j(f)>"1e12"&&(f=.5),h>0&&1>h&&(s=k(e,t,l,n,i,a,o,r,h),m.push(s.x),p.push(s.y)),f>0&&1>f&&(s=k(e,t,l,n,i,a,o,r,f),m.push(s.x),p.push(s.y)),{min:{x:H.apply(0,m),y:H.apply(0,p)},max:{x:Z.apply(0,m),y:Z.apply(0,p)}}}function R(e,t){var n=!t&&l(e);if(!t&&n.curve)return a(n.curve);for(var i=x(e),o=t&&x(t),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c=(function(e,t){var l,n;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(I.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":l=t.x+(t.x-(t.bx||t.x)),n=t.y+(t.y-(t.by||t.y)),e=["C",l,n].concat(e.slice(1));break;case"T":t.qx=t.x+(t.x-(t.qx||t.x)),t.qy=t.y+(t.y-(t.qy||t.y)),e=["C"].concat(_(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(_(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(S(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(S(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(S(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(S(t.x,t.y,t.X,t.Y))}return e}),u=function(e,t){if(e[t].length>7){e[t].shift();for(var l=e[t];l.length;)e.splice(t++,0,["C"].concat(l.splice(0,6)));e.splice(t,1),f=Z(i.length,o&&o.length||0)}},d=function(e,t,l,n,a){e&&t&&"M"==e[a][0]&&"M"!=t[a][0]&&(t.splice(a,0,["M",n.x,n.y]),l.bx=0,l.by=0,l.x=e[a][1],l.y=e[a][2],f=Z(i.length,o&&o.length||0))},h=0,f=Z(i.length,o&&o.length||0);f>h;h++){i[h]=c(i[h],r),u(i,h),o&&(o[h]=c(o[h],s)),o&&u(o,h),d(i,o,r,s,h),d(o,i,s,r,h);var p=i[h],m=o&&o[h],g=p.length,v=o&&m.length;r.x=p[g-2],r.y=p[g-1],r.bx=B(p[g-4])||r.x,r.by=B(p[g-3])||r.y,s.bx=o&&(B(m[v-4])||s.x),s.by=o&&(B(m[v-3])||s.y),s.x=o&&m[v-2],s.y=o&&m[v-1]}return o||(n.curve=a(i)),o?[i,o]:i}function M(e,t){if(!t)return e;var l,n,i,a,o,r,s;for(e=R(e),i=0,o=e.length;o>i;i++)for(s=e[i],a=1,r=s.length;r>a;a+=2)l=t.x(s[a],s[a+1]),n=t.y(s[a],s[a+1]),s[a]=l,s[a+1]=n;return e}function N(e,t){for(var l=[],n=0,i=e.length;i-2*!t>n;n+=2){var a=[{x:+e[n-2],y:+e[n-1]},{x:+e[n],y:+e[n+1]},{x:+e[n+2],y:+e[n+3]},{x:+e[n+4],y:+e[n+5]}];t?n?i-4==n?a[3]={x:+e[0],y:+e[1]}:i-2==n&&(a[2]={x:+e[0],y:+e[1]},a[3]={x:+e[2],y:+e[3]}):a[0]={x:+e[i-2],y:+e[i-1]}:i-4==n?a[3]=a[2]:n||(a[0]={x:+e[n],y:+e[n+1]}),l.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return l}var L=t.prototype,A=e.is,K=e._.clone,P="hasOwnProperty",F=/,?([a-z]),?/gi,B=parseFloat,z=Math,$=z.PI,H=z.min,Z=z.max,U=z.pow,j=z.abs,W=r(1),V=r(),q=r(0,1),G=e._unit2px,Y={path:function(e){return e.attr("path")},circle:function(e){var t=G(e);return E(t.cx,t.cy,t.r)},ellipse:function(e){var t=G(e);return E(t.cx,t.cy,t.rx,t.ry)},rect:function(e){var t=G(e);return w(t.x,t.y,t.width,t.height,t.rx,t.ry)},image:function(e){var t=G(e);return w(t.x,t.y,t.width,t.height)},text:function(e){var t=e.node.getBBox();return w(t.x,t.y,t.width,t.height)},g:function(e){var t=e.node.getBBox();return w(t.x,t.y,t.width,t.height)},symbol:function(e){var t=e.getBBox();return w(t.x,t.y,t.width,t.height)},line:function(e){return"M"+[e.attr("x1"),e.attr("y1"),e.attr("x2"),e.attr("y2")]},polyline:function(e){return"M"+e.attr("points")},polygon:function(e){return"M"+e.attr("points")+"z"},svg:function(e){var t=e.node.getBBox();return w(t.x,t.y,t.width,t.height)},deflt:function(e){var t=e.node.getBBox();return w(t.x,t.y,t.width,t.height)}};e.path=l,e.path.getTotalLength=W,e.path.getPointAtLength=V,e.path.getSubpath=function(e,t,l){if(this.getTotalLength(e)-l<1e-6)return q(e,t).end;var n=q(e,l,1);return t?q(n,t).end:n},L.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},L.getPointAtLength=function(e){return V(this.attr("d"),e)},L.getSubpath=function(t,l){return e.path.getSubpath(this.attr("d"),t,l)},e._.box=n,e.path.findDotsAtSegment=s,e.path.bezierBBox=c,e.path.isPointInsideBBox=u,e.path.isBBoxIntersect=d,e.path.intersection=v,e.path.intersectionNumber=y,e.path.isPointInside=C,e.path.getBBox=T,e.path.get=Y,e.path.toRelative=D,e.path.toAbsolute=x,e.path.toCubic=R,e.path.map=M,e.path.toString=i,e.path.clone=a}),n.plugin(function(e){var t=Math.max,l=Math.min,n=function(e){if(this.items=[],this.length=0,this.type="set",e)for(var t=0,l=e.length;l>t;t++)e[t]&&(this[this.items.length]=this.items[this.items.length]=e[t],this.length++)},i=n.prototype;i.push=function(){for(var e,t,l=0,n=arguments.length;n>l;l++)e=arguments[l],e&&(t=this.items.length,this[t]=this.items[t]=e,this.length++);return this},i.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},i.forEach=function(e,t){for(var l=0,n=this.items.length;n>l;l++)if(e.call(t,this.items[l],l)===!1)return this;return this},i.remove=function(){for(;this.length;)this.pop().remove();return this},i.attr=function(e){for(var t=0,l=this.items.length;l>t;t++)this.items[t].attr(e);return this},i.clear=function(){for(;this.length;)this.pop()},i.splice=function(e,i){e=0>e?t(this.length+e,0):e,i=t(0,l(this.length-e,i));var a,o=[],r=[],s=[];for(a=2;a<arguments.length;a++)s.push(arguments[a]);for(a=0;i>a;a++)r.push(this[e+a]);for(;a<this.length-e;a++)o.push(this[e+a]);var c=s.length;for(a=0;a<c+o.length;a++)this.items[e+a]=this[e+a]=c>a?s[a]:o[a-c];for(a=this.items.length=this.length-=i-c;this[a];)delete this[a++];return new n(r)},i.exclude=function(e){for(var t=0,l=this.length;l>t;t++)if(this[t]==e)return this.splice(t,1),!0;return!1},i.insertAfter=function(e){for(var t=this.items.length;t--;)this.items[t].insertAfter(e);return this},i.getBBox=function(){for(var e=[],n=[],i=[],a=[],o=this.items.length;o--;)if(!this.items[o].removed){var r=this.items[o].getBBox();e.push(r.x),n.push(r.y),i.push(r.x+r.width),a.push(r.y+r.height)}return e=l.apply(0,e),n=l.apply(0,n),i=t.apply(0,i),a=t.apply(0,a),{x:e,y:n,x2:i,y2:a,width:i-e,height:a-n,cx:e+(i-e)/2,cy:n+(a-n)/2}},i.clone=function(e){e=new n;for(var t=0,l=this.items.length;l>t;t++)e.push(this.items[t].clone());return e},i.toString=function(){return"Snap‘s set"},i.type="set",e.set=function(){var e=new n;return arguments.length&&e.push.apply(e,Array.prototype.slice.call(arguments,0)),e}}),n.plugin(function(e,t){function l(e){var t=e[0];switch(t.toLowerCase()){case"t":return[t,0,0];case"m":return[t,1,0,0,1,0,0];case"r":return 4==e.length?[t,0,e[2],e[3]]:[t,0];case"s":return 5==e.length?[t,1,1,e[3],e[4]]:3==e.length?[t,1,1]:[t,1]}}function n(t,n,i){n=d(n).replace(/.{3}|u2026/g,t),t=e.parseTransformString(t)||[],n=e.parseTransformString(n)||[];for(var a,o,c,u,h=Math.max(t.length,n.length),f=[],p=[],m=0;h>m;m++){if(c=t[m]||l(n[m]),u=n[m]||l(c),c[0]!=u[0]||"r"==c[0].toLowerCase()&&(c[2]!=u[2]||c[3]!=u[3])||"s"==c[0].toLowerCase()&&(c[3]!=u[3]||c[4]!=u[4])){t=e._.transform2matrix(t,i()),n=e._.transform2matrix(n,i()),f=[["m",t.a,t.b,t.c,t.d,t.e,t.f]],p=[["m",n.a,n.b,n.c,n.d,n.e,n.f]];break}for(f[m]=[],p[m]=[],a=0,o=Math.max(c.length,u.length);o>a;a++)a in c&&(f[m][a]=c[a]),a in u&&(p[m][a]=u[a])}return{from:s(f),to:s(p),f:r(f)}}function i(e){return e}function a(e){return function(t){return+t.toFixed(3)+e}}function o(t){return e.rgb(t[0],t[1],t[2])}function r(e){var t,l,n,i,a,o,r=0,s=[];for(t=0,l=e.length;l>t;t++){for(a="[",o=['"'+e[t][0]+'"'],n=1,i=e[t].length;i>n;n++)o[n]="val["+r++ +"]";a+=o+"]",s[t]=a}return Function("val","return Snap.path.toString.call(["+s+"])")}function s(e){for(var t=[],l=0,n=e.length;n>l;l++)for(var i=1,a=e[l].length;a>i;i++)t.push(e[l][i]);return t}var c={},u=/[a-z]+$/i,d=String;c.stroke=c.fill="colour",t.prototype.equal=function(t,l){var h,f,p=d(this.attr(t)||""),m=this;if(p==+p&&l==+l)return{from:+p,to:+l,f:i};if("colour"==c[t])return h=e.color(p),f=e.color(l),{from:[h.r,h.g,h.b,h.opacity],to:[f.r,f.g,f.b,f.opacity],f:o};if("transform"==t||"gradientTransform"==t||"patternTransform"==t)return l instanceof e.Matrix&&(l=l.toTransformString()),e._.rgTransform.test(l)||(l=e._.svgTransform2string(l)),n(p,l,function(){return m.getBBox(1)});if("d"==t||"path"==t)return h=e.path.toCubic(p,l),{from:s(h[0]),to:s(h[1]),f:r(h[0])};if("points"==t)return h=d(p).split(","),f=d(l).split(","),{from:h,to:f,f:function(e){return e}};var g=p.match(u),v=d(l).match(u);return g&&g==v?{from:parseFloat(p),to:parseFloat(l),f:a(g)}:{from:this.asPX(t),to:this.asPX(t,l),f:i}}}),n.plugin(function(e,l,n,i){for(var a=l.prototype,o="hasOwnProperty",r=("createTouch"in i.doc),s=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","touchstart","touchmove","touchend","touchcancel"],c={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},u=function(e){var t="y"==e?"scrollTop":"scrollLeft";return i.doc.documentElement[t]||i.doc.body[t]},d=function(){this.returnValue=!1},h=function(){return this.originalEvent.preventDefault()},f=function(){this.cancelBubble=!0},p=function(){return this.originalEvent.stopPropagation()},m=function(){return i.doc.addEventListener?function(e,t,l,n){var i=r&&c[t]?c[t]:t,a=function(i){var a=u("y"),s=u("x");if(r&&c[o](t))for(var d=0,f=i.targetTouches&&i.targetTouches.length;f>d;d++)if(i.targetTouches[d].target==e||e.contains(i.targetTouches[d].target)){var m=i;i=i.targetTouches[d],i.originalEvent=m,i.preventDefault=h,i.stopPropagation=p;break}var g=i.clientX+s,v=i.clientY+a;return l.call(n,i,g,v)};return t!==i&&e.addEventListener(t,a,!1),e.addEventListener(i,a,!1),function(){return t!==i&&e.removeEventListener(t,a,!1),e.removeEventListener(i,a,!1),!0}}:i.doc.attachEvent?function(e,t,l,n){var a=function(e){e=e||i.win.event;var t=u("y"),a=u("x"),o=e.clientX+a,r=e.clientY+t;return e.preventDefault=e.preventDefault||d,e.stopPropagation=e.stopPropagation||f,l.call(n,e,o,r)};e.attachEvent("on"+t,a);var o=function(){return e.detachEvent("on"+t,a),!0};return o}:void 0}(),g=[],v=function(l){for(var n,i=l.clientX,a=l.clientY,o=u("y"),s=u("x"),c=g.length;c--;){if(n=g[c],r){for(var d,h=l.touches&&l.touches.length;h--;)if(d=l.touches[h],d.identifier==n.el._drag.id||n.el.node.contains(d.target)){i=d.clientX,a=d.clientY,(l.originalEvent?l.originalEvent:l).preventDefault();break}}else l.preventDefault();var f=n.el.node;e._.glob,f.nextSibling,f.parentNode,f.style.display,i+=s,a+=o,t("snap.drag.move."+n.el.id,n.move_scope||n.el,i-n.el._drag.x,a-n.el._drag.y,i,a,l)}},y=function(l){e.unmousemove(v).unmouseup(y);for(var n,i=g.length;i--;)n=g[i],n.el._drag={},t("snap.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,l);g=[]},b=s.length;b--;)!function(t){e[t]=a[t]=function(l,n){return e.is(l,"function")&&(this.events=this.events||[],this.events.push({name:t,f:l,unbind:m(this.shape||this.node||i.doc,t,l,n||this)})),this},e["un"+t]=a["un"+t]=function(e){for(var l=this.events||[],n=l.length;n--;)if(l[n].name==t&&(l[n].f==e||!e))return l[n].unbind(),l.splice(n,1),!l.length&&delete this.events,this;return this}}(s[b]);a.hover=function(e,t,l,n){return this.mouseover(e,l).mouseout(t,n||l)},a.unhover=function(e,t){return this.unmouseover(e).unmouseout(t)};var C=[];a.drag=function(l,n,i,a,o,r){function s(s,c,u){(s.originalEvent||s).preventDefault(),this._drag.x=c,this._drag.y=u,this._drag.id=s.identifier,!g.length&&e.mousemove(v).mouseup(y),g.push({el:this,move_scope:a,start_scope:o,end_scope:r}),n&&t.on("snap.drag.start."+this.id,n),l&&t.on("snap.drag.move."+this.id,l),i&&t.on("snap.drag.end."+this.id,i),t("snap.drag.start."+this.id,o||a||this,c,u,s)}if(!arguments.length){var c;return this.drag(function(e,t){this.attr({transform:c+(c?"T":"t")+[e,t]})},function(){c=this.transform().local})}return this._drag={},C.push({el:this,start:s}),this.mousedown(s),this},a.undrag=function(){for(var l=C.length;l--;)C[l].el==this&&(this.unmousedown(C[l].start),C.splice(l,1),t.unbind("snap.drag.*."+this.id));return!C.length&&e.unmousemove(v).unmouseup(y),this}}),n.plugin(function(e,l,n){var i=(l.prototype,n.prototype),a=/^s*url((.+))/,o=String,r=e._.$;e.filter={},i.filter=function(t){var n=this;"svg"!=n.type&&(n=n.paper);var i=e.parse(o(t)),a=e._.id(),s=(n.node.offsetWidth,n.node.offsetHeight,r("filter"));return r(s,{id:a,filterUnits:"userSpaceOnUse"}),s.appendChild(i.node),n.defs.appendChild(s),new l(s)},t.on("snap.util.getattr.filter",function(){t.stop();var l=r(this.node,"filter");if(l){var n=o(l).match(a);return n&&e.select(n[1])}}),t.on("snap.util.attr.filter",function(n){if(n instanceof l&&"filter"==n.type){t.stop();var i=n.node.id;i||(r(n.node,{id:n.id}),i=n.id),r(this.node,{filter:e.url(i)})}n&&"none"!=n||(t.stop(),this.node.removeAttribute("filter"))}),e.filter.blur=function(t,l){null==t&&(t=2);var n=null==l?t:[t,l];return e.format('<feGaussianBlur stdDeviation="{def}"/>',{def:n})},e.filter.blur.toString=function(){return this()},e.filter.shadow=function(t,l,n,i){return i=i||"#000",null==n&&(n=4),"string"==typeof n&&(i=n,n=4),null==t&&(t=0,l=2),null==l&&(l=t),i=e.color(i),e.format('<feGaussianBlur in="SourceAlpha" stdDeviation="{blur}"/><feOffset dx="{dx}" dy="{dy}" result="offsetblur"/><feFlood flood-color="{color}"/><feComposite in2="offsetblur" operator="in"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>',{color:i,dx:t,dy:l,blur:n})
},e.filter.shadow.toString=function(){return this()},e.filter.grayscale=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {b} {h} 0 0 0 0 0 1 0"/>',{a:.2126+.7874*(1-t),b:.7152-.7152*(1-t),c:.0722-.0722*(1-t),d:.2126-.2126*(1-t),e:.7152+.2848*(1-t),f:.0722-.0722*(1-t),g:.2126-.2126*(1-t),h:.0722+.9278*(1-t)})},e.filter.grayscale.toString=function(){return this()},e.filter.sepia=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="matrix" values="{a} {b} {c} 0 0 {d} {e} {f} 0 0 {g} {h} {i} 0 0 0 0 0 1 0"/>',{a:.393+.607*(1-t),b:.769-.769*(1-t),c:.189-.189*(1-t),d:.349-.349*(1-t),e:.686+.314*(1-t),f:.168-.168*(1-t),g:.272-.272*(1-t),h:.534-.534*(1-t),i:.131+.869*(1-t)})},e.filter.sepia.toString=function(){return this()},e.filter.saturate=function(t){return null==t&&(t=1),e.format('<feColorMatrix type="saturate" values="{amount}"/>',{amount:1-t})},e.filter.saturate.toString=function(){return this()},e.filter.hueRotate=function(t){return t=t||0,e.format('<feColorMatrix type="hueRotate" values="{angle}"/>',{angle:t})},e.filter.hueRotate.toString=function(){return this()},e.filter.invert=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="table" tableValues="{amount} {amount2}"/><feFuncG type="table" tableValues="{amount} {amount2}"/><feFuncB type="table" tableValues="{amount} {amount2}"/></feComponentTransfer>',{amount:t,amount2:1-t})},e.filter.invert.toString=function(){return this()},e.filter.brightness=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}"/><feFuncG type="linear" slope="{amount}"/><feFuncB type="linear" slope="{amount}"/></feComponentTransfer>',{amount:t})},e.filter.brightness.toString=function(){return this()},e.filter.contrast=function(t){return null==t&&(t=1),e.format('<feComponentTransfer><feFuncR type="linear" slope="{amount}" intercept="{amount2}"/><feFuncG type="linear" slope="{amount}" intercept="{amount2}"/><feFuncB type="linear" slope="{amount}" intercept="{amount2}"/></feComponentTransfer>',{amount:t,amount2:.5-t/2})},e.filter.contrast.toString=function(){return this()}}),n});
?>