dolt 0.29.0 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- data/dolt.gemspec +1 -1
- data/lib/dolt/sinatra/multi_repo_browser.rb +11 -31
- data/lib/dolt/sinatra/repo_browser.rb +47 -0
- data/lib/dolt/sinatra/single_repo_browser.rb +15 -29
- metadata +4 -75
- data/vendor/ui/.gitignore +0 -4
- data/vendor/ui/.gitmodules +0 -39
- data/vendor/ui/Makefile +0 -48
- data/vendor/ui/autolint.js +0 -13
- data/vendor/ui/buster.js +0 -31
- data/vendor/ui/css/gitorious.css +0 -660
- data/vendor/ui/css/syntax-highlight.css +0 -140
- data/vendor/ui/dist/gitorious3-capillary.min.js +0 -12
- data/vendor/ui/dist/gitorious3.min.css +0 -1
- data/vendor/ui/dist/gitorious3.min.js +0 -3
- data/vendor/ui/favicon.ico +0 -0
- data/vendor/ui/iconic/lock_stroke.svg +0 -17
- data/vendor/ui/images/f5f5f5-980x1.png +0 -0
- data/vendor/ui/images/gitorious.png +0 -0
- data/vendor/ui/images/gitorious2013.png +0 -0
- data/vendor/ui/images/powered-by.png +0 -0
- data/vendor/ui/images/white-980x1.png +0 -0
- data/vendor/ui/js/src/app.js +0 -20
- data/vendor/ui/js/src/cache.js +0 -27
- data/vendor/ui/js/src/capillary.js +0 -7
- data/vendor/ui/js/src/components/abbrev.js +0 -24
- data/vendor/ui/js/src/components/blob.js +0 -154
- data/vendor/ui/js/src/components/capillary.js +0 -51
- data/vendor/ui/js/src/components/clone-name-suggestion.js +0 -38
- data/vendor/ui/js/src/components/clone-url-selection.js +0 -35
- data/vendor/ui/js/src/components/collapse.js +0 -17
- data/vendor/ui/js/src/components/comments.js +0 -111
- data/vendor/ui/js/src/components/commit-linker.js +0 -26
- data/vendor/ui/js/src/components/dropdown.js +0 -74
- data/vendor/ui/js/src/components/ganalytics.js +0 -19
- data/vendor/ui/js/src/components/live-markdown-preview.js +0 -35
- data/vendor/ui/js/src/components/loading.js +0 -33
- data/vendor/ui/js/src/components/oid-ref-interpolator.js +0 -9
- data/vendor/ui/js/src/components/profile-menu.js +0 -36
- data/vendor/ui/js/src/components/rails-links.js +0 -24
- data/vendor/ui/js/src/components/ref-selector.js +0 -116
- data/vendor/ui/js/src/components/repository.js +0 -162
- data/vendor/ui/js/src/components/select-details.js +0 -20
- data/vendor/ui/js/src/components/slugify.js +0 -32
- data/vendor/ui/js/src/components/timeago.js +0 -38
- data/vendor/ui/js/src/components/tree-history.js +0 -140
- data/vendor/ui/js/src/components/url.js +0 -65
- data/vendor/ui/js/src/components/user-repo-view-state.js +0 -4
- data/vendor/ui/js/src/gitorious.js +0 -171
- data/vendor/ui/js/src/json-request.js +0 -6
- data/vendor/ui/js/src/logger.js +0 -84
- data/vendor/ui/js/src/spacer.js +0 -5
- data/vendor/ui/js/test-libs/jquery-1.9.1.min.js +0 -5
- data/vendor/ui/js/test/cache-test.js +0 -47
- data/vendor/ui/js/test/components/abbrev-test.js +0 -22
- data/vendor/ui/js/test/components/blob-test.js +0 -90
- data/vendor/ui/js/test/components/clone-name-suggestion-test.js +0 -37
- data/vendor/ui/js/test/components/clone-url-selection-test.js +0 -25
- data/vendor/ui/js/test/components/comments-test.js +0 -139
- data/vendor/ui/js/test/components/commit-linker-test.js +0 -46
- data/vendor/ui/js/test/components/live-markdown-preview-test.js +0 -37
- data/vendor/ui/js/test/components/profile-menu-test.js +0 -46
- data/vendor/ui/js/test/components/ref-selector-test.js +0 -140
- data/vendor/ui/js/test/components/repository-admin-test.js +0 -37
- data/vendor/ui/js/test/components/repository-watching-test.js +0 -74
- data/vendor/ui/js/test/components/timeago-test.js +0 -74
- data/vendor/ui/js/test/components/tree-history-test.js +0 -324
- data/vendor/ui/js/test/components/url-template-test.js +0 -65
- data/vendor/ui/js/test/test-helper.js +0 -2
- data/vendor/ui/lib/bootstrap/css/bootstrap-responsive.min.css +0 -9
- data/vendor/ui/lib/bootstrap/css/bootstrap.min.css +0 -9
- data/vendor/ui/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/vendor/ui/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/vendor/ui/lib/bootstrap/js/bootstrap.min.js +0 -6
- data/vendor/ui/package.json +0 -21
- data/vendor/ui/todo.org +0 -4
@@ -1,140 +0,0 @@
|
|
1
|
-
.prettyprint {
|
2
|
-
background-color: #f7f7f9;
|
3
|
-
border: 1px solid #e1e1e8;
|
4
|
-
padding: 8px;
|
5
|
-
}
|
6
|
-
|
7
|
-
.gts-file .prettyprint {
|
8
|
-
background: #fefefe;
|
9
|
-
}
|
10
|
-
|
11
|
-
.prettyprint.linenums {
|
12
|
-
box-shadow: 47px 0 0 #fbfbfc inset, 48px 0 0 #ececF0 inset;
|
13
|
-
}
|
14
|
-
|
15
|
-
ol.linenums {
|
16
|
-
margin: 0 0 0 40px;
|
17
|
-
}
|
18
|
-
|
19
|
-
ol.linenums li {
|
20
|
-
color: #bebec5;
|
21
|
-
line-height: 18px;
|
22
|
-
padding-left: 12px;
|
23
|
-
text-shadow: 0 1px 0 #fff;
|
24
|
-
}
|
25
|
-
|
26
|
-
.linenums .line {
|
27
|
-
display: block;
|
28
|
-
min-height: 18px;
|
29
|
-
}
|
30
|
-
|
31
|
-
.c, /* Comment */
|
32
|
-
.cm, /* Comment.Multiline */
|
33
|
-
.c1, /* Comment.Single */
|
34
|
-
.cs /* Comment.Special */
|
35
|
-
{ color: #93A1A1; }
|
36
|
-
|
37
|
-
.k, /* Keyword */
|
38
|
-
.kc, /* Keyword.Constant */
|
39
|
-
.kd, /* Keyword.Declaration */
|
40
|
-
.kn, /* Keyword.Namespace */
|
41
|
-
.kr, /* Keyword.Reserved */
|
42
|
-
.kp, /* Keyword.Pseudo */
|
43
|
-
.nb, /* Name.Builtin */
|
44
|
-
.sx, /* Literal.String.Other */
|
45
|
-
.bp /* Name.Builtin.Pseudo */
|
46
|
-
{ color: #1e347b; }
|
47
|
-
|
48
|
-
.nc, /* Name.Class */
|
49
|
-
.nn, /* Name.Namespace */
|
50
|
-
.nf, /* Name.Function */
|
51
|
-
.no /* Name.Constant */
|
52
|
-
{ color: #dc322f; }
|
53
|
-
|
54
|
-
.s, /* Literal.String */
|
55
|
-
.sb, /* Literal.String.Backtick */
|
56
|
-
.sc, /* Literal.String.Char */
|
57
|
-
.sd, /* Literal.String.Doc */
|
58
|
-
.s2, /* Literal.String.Double */
|
59
|
-
.sh, /* Literal.String.Heredoc */
|
60
|
-
.s1, /* Literal.String.Single */
|
61
|
-
.se, /* Literal.String.Escape */
|
62
|
-
.si /* Literal.String.Interpol */
|
63
|
-
{ color: #dd1144; }
|
64
|
-
|
65
|
-
.nt, /* Name.Tag */
|
66
|
-
.m, /* Literal.Number */
|
67
|
-
.mf, /* Literal.Number.Float */
|
68
|
-
.mh, /* Literal.Number.Hex */
|
69
|
-
.mi, /* Literal.Number.Integer */
|
70
|
-
.mo, /* Literal.Number.Oct */
|
71
|
-
.il, /* Literal.Number.Integer.Long */
|
72
|
-
.vi, /* Name.Variable.Instance */
|
73
|
-
.ow, /* Operator.Word */
|
74
|
-
.na, /* Name.Attribute */
|
75
|
-
.n,
|
76
|
-
.nx,
|
77
|
-
.p,
|
78
|
-
.line
|
79
|
-
{ color: #48484c; }
|
80
|
-
|
81
|
-
.vc, /* Name.Variable.Class */
|
82
|
-
.vg, /* Name.Variable.Global */
|
83
|
-
.nv /* Name.Variable */
|
84
|
-
{ color: #a74e4c; }
|
85
|
-
|
86
|
-
.ss, /* Literal.String.Symbol */
|
87
|
-
.sr, /* Literal.String.Regex */
|
88
|
-
.cp /* Comment.Preproc */
|
89
|
-
{ color: #bc7a00 }
|
90
|
-
|
91
|
-
.sd { font-style: italic; }
|
92
|
-
|
93
|
-
.vi, .k, .kc, .kd, .kn, .kr, .nt, .nc, .nn, .no, .nb, .nf, .ow, .si { font-weight: bold; }
|
94
|
-
|
95
|
-
/* --- */
|
96
|
-
|
97
|
-
.html-erb .cp { color: #48484c; }
|
98
|
-
.common-lisp .nv { color: #48484c; }
|
99
|
-
|
100
|
-
/* --- */
|
101
|
-
|
102
|
-
.hll { background-color: #ffffcc; }
|
103
|
-
.err { border: 1px solid #ff0000; } /* Error */
|
104
|
-
.o { color: #666; } /* Operator */
|
105
|
-
.gd { color: #a00000; } /* Generic.Deleted */
|
106
|
-
.ge { font-style: italic; } /* Generic.Emph */
|
107
|
-
.gr { color: #f00; } /* Generic.Error */
|
108
|
-
.gh { color: #000080; font-weight: bold; } /* Generic.Heading */
|
109
|
-
.gi { color: #00a000; } /* Generic.Inserted */
|
110
|
-
.go { color: #888; } /* Generic.Output */
|
111
|
-
.gp { color: #000080; font-weight: bold; } /* Generic.Prompt */
|
112
|
-
.gs { font-weight: bold; } /* Generic.Strong */
|
113
|
-
.gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
|
114
|
-
.gt { color: #04d; } /* Generic.Traceback */
|
115
|
-
.kt { color: #b00040; } /* Keyword.Type */
|
116
|
-
.nd { color: #a2f; } /* Name.Decorator */
|
117
|
-
.ni { color: #999; font-weight: bold; } /* Name.Entity */
|
118
|
-
.ne { color: #d2413a; font-weight: bold; } /* Name.Exception */
|
119
|
-
.nl { color: #a0a000; } /* Name.Label */
|
120
|
-
.w { color: #bbb; } /* Text.Whitespace */
|
121
|
-
|
122
|
-
/* Regions marked over the URL */
|
123
|
-
ol.linenums li.region .line {
|
124
|
-
background: #ffd;
|
125
|
-
}
|
126
|
-
|
127
|
-
/* Mouseover */
|
128
|
-
ol.linenums li.focus {
|
129
|
-
color: #48484e;
|
130
|
-
border-right: 1px solid #e1e1e8;
|
131
|
-
}
|
132
|
-
|
133
|
-
.linenums li.region .line,
|
134
|
-
ol.linenums li.focus .line {
|
135
|
-
background: #ffc;
|
136
|
-
margin-left: -60px;
|
137
|
-
padding-left: 60px;
|
138
|
-
margin-right: -8px;
|
139
|
-
padding-right: 8px;
|
140
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
// ┌────────────────────────────────────────────────────────────────────┐ \\
|
2
|
-
// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\
|
3
|
-
// ├────────────────────────────────────────────────────────────────────┤ \\
|
4
|
-
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
|
5
|
-
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
|
6
|
-
// ├────────────────────────────────────────────────────────────────────┤ \\
|
7
|
-
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
|
8
|
-
// └────────────────────────────────────────────────────────────────────┘ \\
|
9
|
-
(function(e){var t,n,r="0.4.2",i="hasOwnProperty",s=/[\.\/]/,o="*",u=function(){},a=function(e,t){return e-t},f={n:{}},l=function(e,r){e+="";var i,s=n,o=Array.prototype.slice.call(arguments,2),u=l.listeners(e),f=0,c=[],h={},p=[],d=t;t=e,n=0;for(var v=0,m=u.length;m>v;v++)"zIndex"in u[v]&&(c.push(u[v].zIndex),0>u[v].zIndex&&(h[u[v].zIndex]=u[v]));for(c.sort(a);0>c[f];)if(i=h[c[f++]],p.push(i.apply(r,o)),n)return n=s,p;for(v=0;m>v;v++)if(i=u[v],"zIndex"in i)if(i.zIndex==c[f]){if(p.push(i.apply(r,o)),n)break;do if(f++,i=h[c[f]],i&&p.push(i.apply(r,o)),n)break;while(i)}else h[i.zIndex]=i;else if(p.push(i.apply(r,o)),n)break;return n=s,t=d,p.length?p:null};l._events=f,l.listeners=function(e){var t,n,r,i,u,a,l,c,p=e.split(s),d=f,v=[d],m=[];for(i=0,u=p.length;u>i;i++){for(c=[],a=0,l=v.length;l>a;a++)for(d=v[a].n,n=[d[p[i]],d[o]],r=2;r--;)t=n[r],t&&(c.push(t),m=m.concat(t.f||[]));v=c}return m},l.on=function(e,t){if(e+="","function"!=typeof t)return function(){};for(var n=e.split(s),r=f,i=0,o=n.length;o>i;i++)r=r.n,r=r.hasOwnProperty(n[i])&&r[n[i]]||(r[n[i]]={n:{}});for(r.f=r.f||[],i=0,o=r.f.length;o>i;i++)if(r.f[i]==t)return u;return r.f.push(t),function(e){+e==+e&&(t.zIndex=+e)}},l.f=function(e){var t=[].slice.call(arguments,1);return function(){l.apply(null,[e,null].concat(t).concat([].slice.call(arguments,0)))}},l.stop=function(){n=1},l.nt=function(e){return e?RegExp("(?:\\.|\\/|^)"+e+"(?:\\.|\\/|$)").test(t):t},l.nts=function(){return t.split(s)},l.off=l.unbind=function(e,t){if(!e)return l._events=f={n:{}},void 0;var n,r,u,a,c,p,d,v=e.split(s),m=[f];for(a=0,c=v.length;c>a;a++)for(p=0;m.length>p;p+=u.length-2){if(u=[p,1],n=m[p].n,v[a]!=o)n[v[a]]&&u.push(n[v[a]]);else for(r in n)n[i](r)&&u.push(n[r]);m.splice.apply(m,u)}for(a=0,c=m.length;c>a;a++)for(n=m[a];n.n;){if(t){if(n.f){for(p=0,d=n.f.length;d>p;p++)if(n.f[p]==t){n.f.splice(p,1);break}!n.f.length&&delete n.f}for(r in n.n)if(n.n[i](r)&&n.n[r].f){var g=n.n[r].f;for(p=0,d=g.length;d>p;p++)if(g[p]==t){g.splice(p,1);break}!g.length&&delete n.n[r].f}}else{delete n.f;for(r in n.n)n.n[i](r)&&n.n[r].f&&delete n.n[r].f}n=n.n}},l.once=function(e,t){var n=function(){return l.unbind(e,n),t.apply(this,arguments)};return l.on(e,n)},l.version=r,l.toString=function(){return"You are running Eve "+r},"undefined"!=typeof module&&module.exports?module.exports=l:"undefined"!=typeof define?define("eve",[],function(){return l}):e.eve=l})(this),function(e,t){"function"==typeof define&&define.amd?define(["eve"],function(n){return t(e,n)}):t(e,e.eve)}(this,function(e,t){function n(e){if(n.is(e,"function"))return w?e():t.on("raphael.DOMload",e);if(n.is(e,$))return n._engine.create[A](n,e.splice(0,3+n.is(e[0],X))).add(e);var r=Array.prototype.slice.call(arguments,0);if(n.is(r[r.length-1],"function")){var i=r.pop();return w?i.call(n._engine.create[A](n,r)):t.on("raphael.DOMload",function(){i.call(n._engine.create[A](n,r))})}return n._engine.create[A](n,arguments)}function r(e){if(Object(e)!==e)return e;var t=new e.constructor;for(var n in e)e[N](n)&&(t[n]=r(e[n]));return t}function i(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function s(e,t,n){function r(){var s=Array.prototype.slice.call(arguments,0),o=s.join("␀"),u=r.cache=r.cache||{},a=r.count=r.count||[];return u[N](o)?(i(a,o),n?n(u[o]):u[o]):(a.length>=1e3&&delete u[a.shift()],a.push(o),u[o]=e[A](t,s),n?n(u[o]):u[o])}return r}function o(){return this.hex}function u(e,t){for(var n=[],r=0,i=e.length;i-2*!t>r;r+=2){var s=[{x:+e[r-2],y:+e[r-1]},{x:+e[r],y:+e[r+1]},{x:+e[r+2],y:+e[r+3]},{x:+e[r+4],y:+e[r+5]}];t?r?i-4==r?s[3]={x:+e[0],y:+e[1]}:i-2==r&&(s[2]={x:+e[0],y:+e[1]},s[3]={x:+e[2],y:+e[3]}):s[0]={x:+e[i-2],y:+e[i-1]}:i-4==r?s[3]=s[2]:r||(s[0]={x:+e[r],y:+e[r+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 a(e,t,n,r,i){var s=-3*t+9*n-9*r+3*i,o=e*s+6*t-12*n+6*r;return e*o-3*t+3*n}function f(e,t,n,r,i,s,o,u,f){null==f&&(f=1),f=f>1?1:0>f?0:f;for(var l=f/2,c=12,h=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,v=0;c>v;v++){var m=l*h[v]+l,g=a(m,e,n,i,o),y=a(m,t,r,s,u),b=g*g+y*y;d+=p[v]*I.sqrt(b)}return l*d}function l(e,t,n,r,i,s,o,u,a){if(!(0>a||a>f(e,t,n,r,i,s,o,u))){var l,c=1,h=c/2,p=c-h,d=.01;for(l=f(e,t,n,r,i,s,o,u,p);U(l-a)>d;)h/=2,p+=(a>l?1:-1)*h,l=f(e,t,n,r,i,s,o,u,p);return p}}function c(e,t,n,r,i,s,o,u){if(!(q(e,n)<R(i,o)||R(e,n)>q(i,o)||q(t,r)<R(s,u)||R(t,r)>q(s,u))){var a=(e*r-t*n)*(i-o)-(e-n)*(i*u-s*o),f=(e*r-t*n)*(s-u)-(t-r)*(i*u-s*o),l=(e-n)*(s-u)-(t-r)*(i-o);if(l){var c=a/l,h=f/l,p=+c.toFixed(2),d=+h.toFixed(2);if(!(+R(e,n).toFixed(2)>p||p>+q(e,n).toFixed(2)||+R(i,o).toFixed(2)>p||p>+q(i,o).toFixed(2)||+R(t,r).toFixed(2)>d||d>+q(t,r).toFixed(2)||+R(s,u).toFixed(2)>d||d>+q(s,u).toFixed(2)))return{x:c,y:h}}}}function h(e,t,r){var i=n.bezierBBox(e),s=n.bezierBBox(t);if(!n.isBBoxIntersect(i,s))return r?0:[];for(var o=f.apply(0,e),u=f.apply(0,t),a=~~(o/5),l=~~(u/5),h=[],p=[],d={},v=r?0:[],m=0;a+1>m;m++){var g=n.findDotsAtSegment.apply(n,e.concat(m/a));h.push({x:g.x,y:g.y,t:m/a})}for(m=0;l+1>m;m++)g=n.findDotsAtSegment.apply(n,t.concat(m/l)),p.push({x:g.x,y:g.y,t:m/l});for(m=0;a>m;m++)for(var y=0;l>y;y++){var b=h[m],w=h[m+1],E=p[y],S=p[y+1],x=.001>U(w.x-b.x)?"y":"x",T=.001>U(S.x-E.x)?"y":"x",N=c(b.x,b.y,w.x,w.y,E.x,E.y,S.x,S.y);if(N){if(d[N.x.toFixed(4)]==N.y.toFixed(4))continue;d[N.x.toFixed(4)]=N.y.toFixed(4);var C=b.t+U((N[x]-b[x])/(w[x]-b[x]))*(w.t-b.t),k=E.t+U((N[T]-E[T])/(S[T]-E[T]))*(S.t-E.t);C>=0&&1>=C&&k>=0&&1>=k&&(r?v++:v.push({x:N.x,y:N.y,t1:C,t2:k}))}}return v}function p(e,t,r){e=n._path2curve(e),t=n._path2curve(t);for(var i,s,o,u,a,f,l,c,p,d,v=r?0:[],m=0,g=e.length;g>m;m++){var y=e[m];if("M"==y[0])i=a=y[1],s=f=y[2];else{"C"==y[0]?(p=[i,s].concat(y.slice(1)),i=p[6],s=p[7]):(p=[i,s,i,s,a,f,a,f],i=a,s=f);for(var b=0,w=t.length;w>b;b++){var E=t[b];if("M"==E[0])o=l=E[1],u=c=E[2];else{"C"==E[0]?(d=[o,u].concat(E.slice(1)),o=d[6],u=d[7]):(d=[o,u,o,u,l,c,l,c],o=l,u=c);var S=h(p,d,r);if(r)v+=S;else{for(var x=0,T=S.length;T>x;x++)S[x].segment1=m,S[x].segment2=b,S[x].bez1=p,S[x].bez2=d;v=v.concat(S)}}}}}return v}function d(e,t,n,r,i,s){null!=e?(this.a=+e,this.b=+t,this.c=+n,this.d=+r,this.e=+i,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function v(){return this.x+D+this.y+D+this.width+" × "+this.height}function m(e,t,n,r,i,s){function o(e){return((c*e+l)*e+f)*e}function u(e,t){var n=a(e,t);return((d*n+p)*n+h)*n}function a(e,t){var n,r,i,s,u,a;for(i=e,a=0;8>a;a++){if(s=o(i)-e,t>U(s))return i;if(u=(3*c*i+2*l)*i+f,1e-6>U(u))break;i-=s/u}if(n=0,r=1,i=e,n>i)return n;if(i>r)return r;for(;r>n;){if(s=o(i),t>U(s-e))return i;e>s?n=i:r=i,i=(r-n)/2+n}return i}var f=3*t,l=3*(r-t)-f,c=1-f-l,h=3*n,p=3*(i-n)-h,d=1-h-p;return u(e,1/(200*s))}function g(e,t){var n=[],r={};if(this.ms=t,this.times=1,e){for(var i in e)e[N](i)&&(r[Z(i)]=e[i],n.push(Z(i)));n.sort(ct)}this.anim=r,this.top=n[n.length-1],this.percents=n}function y(e,r,i,s,o,u){i=Z(i);var a,f,l,c,h,p,v=e.ms,g={},y={},b={};if(s)for(E=0,x=fn.length;x>E;E++){var w=fn[E];if(w.el.id==r.id&&w.anim==e){w.percent!=i?(fn.splice(E,1),l=1):f=w,r.attr(w.totalOrigin);break}}else s=+y;for(var E=0,x=e.percents.length;x>E;E++){if(e.percents[E]==i||e.percents[E]>s*e.top){i=e.percents[E],h=e.percents[E-1]||0,v=v/e.top*(i-h),c=e.percents[E+1],a=e.anim[i];break}s&&r.attr(e.anim[e.percents[E]])}if(a){if(f)f.initstatus=s,f.start=new Date-f.ms*s;else{for(var T in a)if(a[N](T)&&(rt[N](T)||r.paper.customAttributes[N](T)))switch(g[T]=r.attr(T),null==g[T]&&(g[T]=nt[T]),y[T]=a[T],rt[T]){case X:b[T]=(y[T]-g[T])/v;break;case"colour":g[T]=n.getRGB(g[T]);var C=n.getRGB(y[T]);b[T]={r:(C.r-g[T].r)/v,g:(C.g-g[T].g)/v,b:(C.b-g[T].b)/v};break;case"path":var k=Bt(g[T],y[T]),L=k[1];for(g[T]=k[0],b[T]=[],E=0,x=g[T].length;x>E;E++){b[T][E]=[0];for(var A=1,M=g[T][E].length;M>A;A++)b[T][E][A]=(L[E][A]-g[T][E][A])/v}break;case"transform":var _=r._,D=Rt(_[T],y[T]);if(D)for(g[T]=D.from,y[T]=D.to,b[T]=[],b[T].real=!0,E=0,x=g[T].length;x>E;E++)for(b[T][E]=[g[T][E][0]],A=1,M=g[T][E].length;M>A;A++)b[T][E][A]=(y[T][E][A]-g[T][E][A])/v;else{var B=r.matrix||new d,j={_:{transform:_.transform},getBBox:function(){return r.getBBox(1)}};g[T]=[B.a,B.b,B.c,B.d,B.e,B.f],It(j,y[T]),y[T]=j._.transform,b[T]=[(j.matrix.a-B.a)/v,(j.matrix.b-B.b)/v,(j.matrix.c-B.c)/v,(j.matrix.d-B.d)/v,(j.matrix.e-B.e)/v,(j.matrix.f-B.f)/v]}break;case"csv":var F=P(a[T])[H](S),I=P(g[T])[H](S);if("clip-rect"==T)for(g[T]=I,b[T]=[],E=I.length;E--;)b[T][E]=(F[E]-g[T][E])/v;y[T]=F;break;default:for(F=[][O](a[T]),I=[][O](g[T]),b[T]=[],E=r.paper.customAttributes[T].length;E--;)b[T][E]=((F[E]||0)-(I[E]||0))/v}var q=a.easing,R=n.easing_formulas[q];if(!R)if(R=P(q).match(G),R&&5==R.length){var U=R;R=function(e){return m(e,+U[1],+U[2],+U[3],+U[4],v)}}else R=pt;if(p=a.start||e.start||+(new Date),w={anim:e,percent:i,timestamp:p,start:p+(e.del||0),status:0,initstatus:s||0,stop:!1,ms:v,easing:R,from:g,diff:b,to:y,el:r,callback:a.callback,prev:h,next:c,repeat:u||e.times,origin:r.attr(),totalOrigin:o},fn.push(w),s&&!f&&!l&&(w.stop=!0,w.start=new Date-v*s,1==fn.length))return cn();l&&(w.start=new Date-w.ms*s),1==fn.length&&ln(cn)}t("raphael.anim.start."+r.id,r,e)}}function b(e){for(var t=0;fn.length>t;t++)fn[t].el.paper==e&&fn.splice(t--,1)}n.version="2.1.0",n.eve=t;var w,E,S=/[, ]+/,x={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},T=/\{(\d+)\}/g,N="hasOwnProperty",C={doc:document,win:e},k={was:Object.prototype[N].call(C.win,"Raphael"),is:C.win.Raphael},L=function(){this.ca=this.customAttributes={}},A="apply",O="concat",M="ontouchstart"in C.win||C.win.DocumentTouch&&C.doc instanceof DocumentTouch,_="",D=" ",P=String,H="split",B="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[H](D),j={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},F=P.prototype.toLowerCase,I=Math,q=I.max,R=I.min,U=I.abs,z=I.pow,W=I.PI,X="number",V="string",$="array",J=Object.prototype.toString,K=(n._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),Q={NaN:1,Infinity:1,"-Infinity":1},G=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Y=I.round,Z=parseFloat,et=parseInt,tt=P.prototype.toUpperCase,nt=n._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},rt=n._availableAnimAttrs={blur:X,"clip-rect":"csv",cx:X,cy:X,fill:"colour","fill-opacity":X,"font-size":X,height:X,opacity:X,path:"path",r:X,rx:X,ry:X,stroke:"colour","stroke-opacity":X,"stroke-width":X,transform:"transform",width:X,x:X,y:X},it=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,st={hs:1,rg:1},ot=/,?([achlmqrstvxz]),?/gi,ut=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,at=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ft=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,lt=(n._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ct=function(e,t){return Z(e)-Z(t)},ht=function(){},pt=function(e){return e},dt=n._rectPath=function(e,t,n,r,i){return i?[["M",e+i,t],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",e,t],["l",n,0],["l",0,r],["l",-n,0],["z"]]},vt=function(e,t,n,r){return null==r&&(r=n),[["M",e,t],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]]},mt=n._getPath={path:function(e){return e.attr("path")},circle:function(e){var t=e.attrs;return vt(t.cx,t.cy,t.r)},ellipse:function(e){var t=e.attrs;return vt(t.cx,t.cy,t.rx,t.ry)},rect:function(e){var t=e.attrs;return dt(t.x,t.y,t.width,t.height,t.r)},image:function(e){var t=e.attrs;return dt(t.x,t.y,t.width,t.height)},text:function(e){var t=e._getBBox();return dt(t.x,t.y,t.width,t.height)},set:function(e){var t=e._getBBox();return dt(t.x,t.y,t.width,t.height)}},gt=n.mapPath=function(e,t){if(!t)return e;var n,r,i,s,o,u,a;for(e=Bt(e),i=0,o=e.length;o>i;i++)for(a=e[i],s=1,u=a.length;u>s;s+=2)n=t.x(a[s],a[s+1]),r=t.y(a[s],a[s+1]),a[s]=n,a[s+1]=r;return e};if(n._g=C,n.type=C.win.SVGAngle||C.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==n.type){var yt,bt=C.doc.createElement("div");if(bt.innerHTML='<v:shape adj="1"/>',yt=bt.firstChild,yt.style.behavior="url(#default#VML)",!yt||"object"!=typeof yt.adj)return n.type=_;bt=null}n.svg=!(n.vml="VML"==n.type),n._Paper=L,n.fn=E=L.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(e,t){return t=F.call(t),"finite"==t?!Q[N](+e):"array"==t?e instanceof Array:"null"==t&&null===e||t==typeof e&&null!==e||"object"==t&&e===Object(e)||"array"==t&&Array.isArray&&Array.isArray(e)||J.call(e).slice(8,-1).toLowerCase()==t},n.angle=function(e,t,r,i,s,o){if(null==s){var u=e-r,a=t-i;return u||a?(180+180*I.atan2(-a,-u)/W+360)%360:0}return n.angle(e,t,s,o)-n.angle(r,i,s,o)},n.rad=function(e){return e%360*W/180},n.deg=function(e){return 180*e/W%360},n.snapTo=function(e,t,r){if(r=n.is(r,"finite")?r:10,n.is(e,$)){for(var i=e.length;i--;)if(r>=U(e[i]-t))return e[i]}else{e=+e;var s=t%e;if(r>s)return t-s;if(s>e-r)return t-s+e}return t},n.createUUID=function(e,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e,t).toUpperCase()}}(/[xy]/g,function(e){var t=0|16*I.random(),n="x"==e?t:8|3&t;return n.toString(16)}),n.setWindow=function(e){t("raphael.setWindow",n,C.win,e),C.win=e,C.doc=C.win.document,n._engine.initWin&&n._engine.initWin(C.win)};var wt=function(e){if(n.vml){var t,r=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write("<body>"),i.close(),t=i.body}catch(o){t=createPopup().document.body}var u=t.createTextRange();wt=s(function(e){try{t.style.color=P(e).replace(r,_);var n=u.queryCommandValue("ForeColor");return n=(255&n)<<16|65280&n|(16711680&n)>>>16,"#"+("000000"+n.toString(16)).slice(-6)}catch(i){return"none"}})}else{var a=C.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",C.doc.body.appendChild(a),wt=s(function(e){return a.style.color=e,C.doc.defaultView.getComputedStyle(a,_).getPropertyValue("color")})}return wt(e)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},St=function(){return"hsl("+[this.h,this.s,this.l]+")"},xt=function(){return this.hex},Tt=function(e,t,r){if(null==t&&n.is(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(r=e.b,t=e.g,e=e.r),null==t&&n.is(e,V)){var i=n.getRGB(e);e=i.r,t=i.g,r=i.b}return(e>1||t>1||r>1)&&(e/=255,t/=255,r/=255),[e,t,r]},Nt=function(e,t,r,i){e*=255,t*=255,r*=255;var s={r:e,g:t,b:r,hex:n.rgb(e,t,r),toString:xt};return n.is(i,"finite")&&(s.opacity=i),s};n.color=function(e){var t;return n.is(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.hex=t.hex):n.is(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.hex=t.hex):(n.is(e,"string")&&(e=n.getRGB(e)),n.is(e,"object")&&"r"in e&&"g"in e&&"b"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.toString=xt,e},n.hsb2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(n=e.b,t=e.s,e=e.h,r=e.o),e*=360;var i,s,o,u,a;return e=e%360/60,a=n*t,u=a*(1-U(e%2-1)),i=s=o=n-a,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],Nt(i,s,o,r)},n.hsl2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(n=e.l,t=e.s,e=e.h),(e>1||t>1||n>1)&&(e/=360,t/=100,n/=100),e*=360;var i,s,o,u,a;return e=e%360/60,a=2*t*(.5>n?n:1-n),u=a*(1-U(e%2-1)),i=s=o=n-a/2,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],Nt(i,s,o,r)},n.rgb2hsb=function(e,t,n){n=Tt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o;return s=q(e,t,n),o=s-R(e,t,n),r=0==o?null:s==e?(t-n)/o:s==t?(n-e)/o+2:(e-t)/o+4,r=60*((r+360)%6)/360,i=0==o?0:o/s,{h:r,s:i,b:s,toString:Et}},n.rgb2hsl=function(e,t,n){n=Tt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o,u,a;return o=q(e,t,n),u=R(e,t,n),a=o-u,r=0==a?null:o==e?(t-n)/a:o==t?(n-e)/a+2:(e-t)/a+4,r=60*((r+360)%6)/360,s=(o+u)/2,i=0==a?0:.5>s?a/(2*s):a/(2-2*s),{h:r,s:i,l:s,toString:St}},n._path2string=function(){return this.join(",").replace(ot,"$1")},n._preload=function(e,t){var n=C.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){t.call(this),this.onload=null,C.doc.body.removeChild(this)},n.onerror=function(){C.doc.body.removeChild(this)},C.doc.body.appendChild(n),n.src=e},n.getRGB=s(function(e){if(!e||(e=P(e)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o};if("none"==e)return{r:-1,g:-1,b:-1,hex:"none",toString:o};!st[N](e.toLowerCase().substring(0,2))&&"#"!=e.charAt()&&(e=wt(e));var t,r,i,s,u,a,f=e.match(K);return f?(f[2]&&(i=et(f[2].substring(5),16),r=et(f[2].substring(3,5),16),t=et(f[2].substring(1,3),16)),f[3]&&(i=et((u=f[3].charAt(3))+u,16),r=et((u=f[3].charAt(2))+u,16),t=et((u=f[3].charAt(1))+u,16)),f[4]&&(a=f[4][H](it),t=Z(a[0]),"%"==a[0].slice(-1)&&(t*=2.55),r=Z(a[1]),"%"==a[1].slice(-1)&&(r*=2.55),i=Z(a[2]),"%"==a[2].slice(-1)&&(i*=2.55),"rgba"==f[1].toLowerCase().slice(0,4)&&(s=Z(a[3])),a[3]&&"%"==a[3].slice(-1)&&(s/=100)),f[5]?(a=f[5][H](it),t=Z(a[0]),"%"==a[0].slice(-1)&&(t*=2.55),r=Z(a[1]),"%"==a[1].slice(-1)&&(r*=2.55),i=Z(a[2]),"%"==a[2].slice(-1)&&(i*=2.55),("deg"==a[0].slice(-3)||"°"==a[0].slice(-1))&&(t/=360),"hsba"==f[1].toLowerCase().slice(0,4)&&(s=Z(a[3])),a[3]&&"%"==a[3].slice(-1)&&(s/=100),n.hsb2rgb(t,r,i,s)):f[6]?(a=f[6][H](it),t=Z(a[0]),"%"==a[0].slice(-1)&&(t*=2.55),r=Z(a[1]),"%"==a[1].slice(-1)&&(r*=2.55),i=Z(a[2]),"%"==a[2].slice(-1)&&(i*=2.55),("deg"==a[0].slice(-3)||"°"==a[0].slice(-1))&&(t/=360),"hsla"==f[1].toLowerCase().slice(0,4)&&(s=Z(a[3])),a[3]&&"%"==a[3].slice(-1)&&(s/=100),n.hsl2rgb(t,r,i,s)):(f={r:t,g:r,b:i,toString:o},f.hex="#"+(16777216|i|r<<8|t<<16).toString(16).slice(1),n.is(s,"finite")&&(f.opacity=s),f)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:o}},n),n.hsb=s(function(e,t,r){return n.hsb2rgb(e,t,r).hex}),n.hsl=s(function(e,t,r){return n.hsl2rgb(e,t,r).hex}),n.rgb=s(function(e,t,n){return"#"+(16777216|n|t<<8|e<<16).toString(16).slice(1)}),n.getColor=function(e){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||.75},n=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,0>=t.s&&(this.getColor.start={h:0,s:1,b:t.b})),n.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(e){if(!e)return null;var t=Ct(e);if(t.arr)return Lt(t.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return n.is(e,$)&&n.is(e[0],$)&&(i=Lt(e)),i.length||P(e).replace(ut,function(e,t,n){var s=[],o=t.toLowerCase();if(n.replace(ft,function(e,t){t&&s.push(+t)}),"m"==o&&s.length>2&&(i.push([t][O](s.splice(0,2))),o="l",t="m"==t?"l":"L"),"r"==o)i.push([t][O](s));else for(;s.length>=r[o]&&(i.push([t][O](s.splice(0,r[o]))),r[o]););}),i.toString=n._path2string,t.arr=Lt(i),i},n.parseTransformString=s(function(e){if(!e)return null;var t=[];return n.is(e,$)&&n.is(e[0],$)&&(t=Lt(e)),t.length||P(e).replace(at,function(e,n,r){var i=[];F.call(n),r.replace(ft,function(e,t){t&&i.push(+t)}),t.push([n][O](i))}),t.toString=n._path2string,t});var Ct=function(e){var t=Ct.ps=Ct.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)t[N](n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]};n.findDotsAtSegment=function(e,t,n,r,i,s,o,u,a){var f=1-a,l=z(f,3),c=z(f,2),h=a*a,p=h*a,d=l*e+3*c*a*n+3*f*a*a*i+p*o,v=l*t+3*c*a*r+3*f*a*a*s+p*u,m=e+2*a*(n-e)+h*(i-2*n+e),g=t+2*a*(r-t)+h*(s-2*r+t),y=n+2*a*(i-n)+h*(o-2*i+n),b=r+2*a*(s-r)+h*(u-2*s+r),w=f*e+a*n,E=f*t+a*r,S=f*i+a*o,x=f*s+a*u,T=90-180*I.atan2(m-y,g-b)/W;return(m>y||b>g)&&(T+=180),{x:d,y:v,m:{x:m,y:g},n:{x:y,y:b},start:{x:w,y:E},end:{x:S,y:x},alpha:T}},n.bezierBBox=function(e,t,r,i,s,o,u,a){n.is(e,"array")||(e=[e,t,r,i,s,o,u,a]);var f=Ht.apply(null,e);return{x:f.min.x,y:f.min.y,x2:f.max.x,y2:f.max.y,width:f.max.x-f.min.x,height:f.max.y-f.min.y}},n.isPointInsideBBox=function(e,t,n){return t>=e.x&&e.x2>=t&&n>=e.y&&e.y2>=n},n.isBBoxIntersect=function(e,t){var r=n.isPointInsideBBox;return r(t,e.x,e.y)||r(t,e.x2,e.y)||r(t,e.x,e.y2)||r(t,e.x2,e.y2)||r(e,t.x,t.y)||r(e,t.x2,t.y)||r(e,t.x,t.y2)||r(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)},n.pathIntersection=function(e,t){return p(e,t)},n.pathIntersectionNumber=function(e,t){return p(e,t,1)},n.isPointInsidePath=function(e,t,r){var i=n.pathBBox(e);return n.isPointInsideBBox(i,t,r)&&1==p(e,[["M",t,r],["H",i.x2+10]],1)%2},n._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var kt=n.pathBBox=function(e){var t=Ct(e);if(t.bbox)return r(t.bbox);if(!e)return{x:0,y:0,width:0,height:0,x2:0,y2:0};e=Bt(e);for(var n,i=0,s=0,o=[],u=[],a=0,f=e.length;f>a;a++)if(n=e[a],"M"==n[0])i=n[1],s=n[2],o.push(i),u.push(s);else{var l=Ht(i,s,n[1],n[2],n[3],n[4],n[5],n[6]);o=o[O](l.min.x,l.max.x),u=u[O](l.min.y,l.max.y),i=n[5],s=n[6]}var c=R[A](0,o),h=R[A](0,u),p=q[A](0,o),d=q[A](0,u),v=p-c,m=d-h,g={x:c,y:h,x2:p,y2:d,width:v,height:m,cx:c+v/2,cy:h+m/2};return t.bbox=r(g),g},Lt=function(e){var t=r(e);return t.toString=n._path2string,t},At=n._pathToRelative=function(e){var t=Ct(e);if(t.rel)return Lt(t.rel);n.is(e,$)&&n.is(e&&e[0],$)||(e=n.parsePathString(e));var r=[],i=0,s=0,o=0,u=0,a=0;"M"==e[0][0]&&(i=e[0][1],s=e[0][2],o=i,u=s,a++,r.push(["M",i,s]));for(var f=a,l=e.length;l>f;f++){var c=r[f]=[],h=e[f];if(h[0]!=F.call(h[0]))switch(c[0]=F.call(h[0]),c[0]){case"a":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+(h[6]-i).toFixed(3),c[7]=+(h[7]-s).toFixed(3);break;case"v":c[1]=+(h[1]-s).toFixed(3);break;case"m":o=h[1],u=h[2];default:for(var p=1,d=h.length;d>p;p++)c[p]=+(h[p]-(p%2?i:s)).toFixed(3)}else{c=r[f]=[],"m"==h[0]&&(o=h[1]+i,u=h[2]+s);for(var v=0,m=h.length;m>v;v++)r[f][v]=h[v]}var g=r[f].length;switch(r[f][0]){case"z":i=o,s=u;break;case"h":i+=+r[f][g-1];break;case"v":s+=+r[f][g-1];break;default:i+=+r[f][g-2],s+=+r[f][g-1]}}return r.toString=n._path2string,t.rel=Lt(r),r},Ot=n._pathToAbsolute=function(e){var t=Ct(e);if(t.abs)return Lt(t.abs);if(n.is(e,$)&&n.is(e&&e[0],$)||(e=n.parsePathString(e)),!e||!e.length)return[["M",0,0]];var r=[],i=0,s=0,o=0,a=0,f=0;"M"==e[0][0]&&(i=+e[0][1],s=+e[0][2],o=i,a=s,f++,r[0]=["M",i,s]);for(var l,c,h=3==e.length&&"M"==e[0][0]&&"R"==e[1][0].toUpperCase()&&"Z"==e[2][0].toUpperCase(),p=f,d=e.length;d>p;p++){if(r.push(l=[]),c=e[p],c[0]!=tt.call(c[0]))switch(l[0]=tt.call(c[0]),l[0]){case"A":l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=+(c[6]+i),l[7]=+(c[7]+s);break;case"V":l[1]=+c[1]+s;break;case"H":l[1]=+c[1]+i;break;case"R":for(var v=[i,s][O](c.slice(1)),m=2,g=v.length;g>m;m++)v[m]=+v[m]+i,v[++m]=+v[m]+s;r.pop(),r=r[O](u(v,h));break;case"M":o=+c[1]+i,a=+c[2]+s;default:for(m=1,g=c.length;g>m;m++)l[m]=+c[m]+(m%2?i:s)}else if("R"==c[0])v=[i,s][O](c.slice(1)),r.pop(),r=r[O](u(v,h)),l=["R"][O](c.slice(-2));else for(var y=0,b=c.length;b>y;y++)l[y]=c[y];switch(l[0]){case"Z":i=o,s=a;break;case"H":i=l[1];break;case"V":s=l[1];break;case"M":o=l[l.length-2],a=l[l.length-1];default:i=l[l.length-2],s=l[l.length-1]}}return r.toString=n._path2string,t.abs=Lt(r),r},Mt=function(e,t,n,r){return[e,t,n,r,n,r]},_t=function(e,t,n,r,i,s){var o=1/3,u=2/3;return[o*e+u*n,o*t+u*r,o*i+u*n,o*s+u*r,i,s]},Dt=function(e,t,n,r,i,o,u,a,f,l){var c,h=120*W/180,p=W/180*(+i||0),d=[],v=s(function(e,t,n){var r=e*I.cos(n)-t*I.sin(n),i=e*I.sin(n)+t*I.cos(n);return{x:r,y:i}});if(l)T=l[0],N=l[1],S=l[2],x=l[3];else{c=v(e,t,-p),e=c.x,t=c.y,c=v(a,f,-p),a=c.x,f=c.y;var m=(I.cos(W/180*i),I.sin(W/180*i),(e-a)/2),g=(t-f)/2,y=m*m/(n*n)+g*g/(r*r);y>1&&(y=I.sqrt(y),n=y*n,r=y*r);var b=n*n,w=r*r,E=(o==u?-1:1)*I.sqrt(U((b*w-b*g*g-w*m*m)/(b*g*g+w*m*m))),S=E*n*g/r+(e+a)/2,x=E*-r*m/n+(t+f)/2,T=I.asin(((t-x)/r).toFixed(9)),N=I.asin(((f-x)/r).toFixed(9));T=S>e?W-T:T,N=S>a?W-N:N,0>T&&(T=2*W+T),0>N&&(N=2*W+N),u&&T>N&&(T-=2*W),!u&&N>T&&(N-=2*W)}var C=N-T;if(U(C)>h){var k=N,L=a,A=f;N=T+h*(u&&N>T?1:-1),a=S+n*I.cos(N),f=x+r*I.sin(N),d=Dt(a,f,n,r,i,0,u,L,A,[N,k,S,x])}C=N-T;var M=I.cos(T),_=I.sin(T),D=I.cos(N),P=I.sin(N),B=I.tan(C/4),j=4/3*n*B,F=4/3*r*B,q=[e,t],R=[e+j*_,t-F*M],z=[a+j*P,f-F*D],X=[a,f];if(R[0]=2*q[0]-R[0],R[1]=2*q[1]-R[1],l)return[R,z,X][O](d);d=[R,z,X][O](d).join()[H](",");for(var V=[],$=0,J=d.length;J>$;$++)V[$]=$%2?v(d[$-1],d[$],p).y:v(d[$],d[$+1],p).x;return V},Pt=function(e,t,n,r,i,s,o,u,a){var f=1-a;return{x:z(f,3)*e+3*z(f,2)*a*n+3*f*a*a*i+z(a,3)*o,y:z(f,3)*t+3*z(f,2)*a*r+3*f*a*a*s+z(a,3)*u}},Ht=s(function(e,t,n,r,i,s,o,u){var a,f=i-2*n+e-(o-2*i+n),l=2*(n-e)-2*(i-n),c=e-n,h=(-l+I.sqrt(l*l-4*f*c))/2/f,p=(-l-I.sqrt(l*l-4*f*c))/2/f,d=[t,u],v=[e,o];return U(h)>"1e12"&&(h=.5),U(p)>"1e12"&&(p=.5),h>0&&1>h&&(a=Pt(e,t,n,r,i,s,o,u,h),v.push(a.x),d.push(a.y)),p>0&&1>p&&(a=Pt(e,t,n,r,i,s,o,u,p),v.push(a.x),d.push(a.y)),f=s-2*r+t-(u-2*s+r),l=2*(r-t)-2*(s-r),c=t-r,h=(-l+I.sqrt(l*l-4*f*c))/2/f,p=(-l-I.sqrt(l*l-4*f*c))/2/f,U(h)>"1e12"&&(h=.5),U(p)>"1e12"&&(p=.5),h>0&&1>h&&(a=Pt(e,t,n,r,i,s,o,u,h),v.push(a.x),d.push(a.y)),p>0&&1>p&&(a=Pt(e,t,n,r,i,s,o,u,p),v.push(a.x),d.push(a.y)),{min:{x:R[A](0,v),y:R[A](0,d)},max:{x:q[A](0,v),y:q[A](0,d)}}}),Bt=n._path2curve=s(function(e,t){var n=!t&&Ct(e);if(!t&&n.curve)return Lt(n.curve);for(var r=Ot(e),i=t&&Ot(t),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},u=function(e,t){var n,r;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"][O](Dt[A](0,[t.x,t.y][O](e.slice(1))));break;case"S":n=t.x+(t.x-(t.bx||t.x)),r=t.y+(t.y-(t.by||t.y)),e=["C",n,r][O](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"][O](_t(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"][O](_t(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"][O](Mt(t.x,t.y,e[1],e[2]));break;case"H":e=["C"][O](Mt(t.x,t.y,e[1],t.y));break;case"V":e=["C"][O](Mt(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"][O](Mt(t.x,t.y,t.X,t.Y))}return e},a=function(e,t){if(e[t].length>7){e[t].shift();for(var n=e[t];n.length;)e.splice(t++,0,["C"][O](n.splice(0,6)));e.splice(t,1),c=q(r.length,i&&i.length||0)}},f=function(e,t,n,s,o){e&&t&&"M"==e[o][0]&&"M"!=t[o][0]&&(t.splice(o,0,["M",s.x,s.y]),n.bx=0,n.by=0,n.x=e[o][1],n.y=e[o][2],c=q(r.length,i&&i.length||0))},l=0,c=q(r.length,i&&i.length||0);c>l;l++){r[l]=u(r[l],s),a(r,l),i&&(i[l]=u(i[l],o)),i&&a(i,l),f(r,i,s,o,l),f(i,r,o,s,l);var h=r[l],p=i&&i[l],d=h.length,v=i&&p.length;s.x=h[d-2],s.y=h[d-1],s.bx=Z(h[d-4])||s.x,s.by=Z(h[d-3])||s.y,o.bx=i&&(Z(p[v-4])||o.x),o.by=i&&(Z(p[v-3])||o.y),o.x=i&&p[v-2],o.y=i&&p[v-1]}return i||(n.curve=Lt(r)),i?[r,i]:r},null,Lt),jt=(n._parseDots=s(function(e){for(var t=[],r=0,i=e.length;i>r;r++){var s={},o=e[r].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]+"%"),t.push(s)}for(r=1,i=t.length-1;i>r;r++)if(!t[r].offset){for(var u=Z(t[r-1].offset||0),a=0,f=r+1;i>f;f++)if(t[f].offset){a=t[f].offset;break}a||(a=100,f=i),a=Z(a);for(var l=(a-u)/(f-r+1);f>r;r++)u+=l,t[r].offset=u+"%"}return t}),n._tear=function(e,t){e==t.top&&(t.top=e.prev),e==t.bottom&&(t.bottom=e.next),e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next)}),Ft=(n._tofront=function(e,t){t.top!==e&&(jt(e,t),e.next=null,e.prev=t.top,t.top.next=e,t.top=e)},n._toback=function(e,t){t.bottom!==e&&(jt(e,t),e.next=t.bottom,e.prev=null,t.bottom.prev=e,t.bottom=e)},n._insertafter=function(e,t,n){jt(e,n),t==n.top&&(n.top=e),t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e},n._insertbefore=function(e,t,n){jt(e,n),t==n.bottom&&(n.bottom=e),t.prev&&(t.prev.next=e),e.prev=t.prev,t.prev=e,e.next=t},n.toMatrix=function(e,t){var n=kt(e),r={_:{transform:_},getBBox:function(){return n}};return It(r,t),r.matrix}),It=(n.transformPath=function(e,t){return gt(e,Ft(e,t))},n._extractTransform=function(e,t){if(null==t)return e._.transform;t=P(t).replace(/\.{3}|\u2026/g,e._.transform||_);var r=n.parseTransformString(t),i=0,s=0,o=0,u=1,a=1,f=e._,l=new d;if(f.transform=r||[],r)for(var c=0,h=r.length;h>c;c++){var p,v,m,g,y,b=r[c],w=b.length,E=P(b[0]).toLowerCase(),S=b[0]!=E,x=S?l.invert():0;"t"==E&&3==w?S?(p=x.x(0,0),v=x.y(0,0),m=x.x(b[1],b[2]),g=x.y(b[1],b[2]),l.translate(m-p,g-v)):l.translate(b[1],b[2]):"r"==E?2==w?(y=y||e.getBBox(1),l.rotate(b[1],y.x+y.width/2,y.y+y.height/2),i+=b[1]):4==w&&(S?(m=x.x(b[2],b[3]),g=x.y(b[2],b[3]),l.rotate(b[1],m,g)):l.rotate(b[1],b[2],b[3]),i+=b[1]):"s"==E?2==w||3==w?(y=y||e.getBBox(1),l.scale(b[1],b[w-1],y.x+y.width/2,y.y+y.height/2),u*=b[1],a*=b[w-1]):5==w&&(S?(m=x.x(b[3],b[4]),g=x.y(b[3],b[4]),l.scale(b[1],b[2],m,g)):l.scale(b[1],b[2],b[3],b[4]),u*=b[1],a*=b[2]):"m"==E&&7==w&&l.add(b[1],b[2],b[3],b[4],b[5],b[6]),f.dirtyT=1,e.matrix=l}e.matrix=l,f.sx=u,f.sy=a,f.deg=i,f.dx=s=l.e,f.dy=o=l.f,1==u&&1==a&&!i&&f.bbox?(f.bbox.x+=+s,f.bbox.y+=+o):f.dirtyT=1}),qt=function(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]}},Rt=n._equaliseTransform=function(e,t){t=P(t).replace(/\.{3}|\u2026/g,e),e=n.parseTransformString(e)||[],t=n.parseTransformString(t)||[];for(var r,i,s,o,u=q(e.length,t.length),a=[],f=[],l=0;u>l;l++){if(s=e[l]||qt(t[l]),o=t[l]||qt(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(a[l]=[],f[l]=[],r=0,i=q(s.length,o.length);i>r;r++)r in s&&(a[l][r]=s[r]),r in o&&(f[l][r]=o[r])}return{from:a,to:f}};n._getContainer=function(e,t,r,i){var s;return s=null!=i||n.is(e,"object")?e:C.doc.getElementById(e),null!=s?s.tagName?null==t?{container
|
10
|
-
:s,width:s.style.pixelWidth||s.offsetWidth,height:s.style.pixelHeight||s.offsetHeight}:{container:s,width:t,height:r}:{container:1,x:e,y:t,width:r,height:i}:void 0},n.pathToRelative=At,n._engine={},n.path2curve=Bt,n.matrix=function(e,t,n,r,i,s){return new d(e,t,n,r,i,s)},function(e){function t(e){return e[0]*e[0]+e[1]*e[1]}function r(e){var n=I.sqrt(t(e));e[0]&&(e[0]/=n),e[1]&&(e[1]/=n)}e.add=function(e,t,n,r,i,s){var o,u,a,f,l=[[],[],[]],c=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],h=[[e,n,i],[t,r,s],[0,0,1]];for(e&&e instanceof d&&(h=[[e.a,e.c,e.e],[e.b,e.d,e.f],[0,0,1]]),o=0;3>o;o++)for(u=0;3>u;u++){for(f=0,a=0;3>a;a++)f+=c[o][a]*h[a][u];l[o][u]=f}this.a=l[0][0],this.b=l[1][0],this.c=l[0][1],this.d=l[1][1],this.e=l[0][2],this.f=l[1][2]},e.invert=function(){var e=this,t=e.a*e.d-e.b*e.c;return new d(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 d(this.a,this.b,this.c,this.d,this.e,this.f)},e.translate=function(e,t){this.add(1,0,0,1,e,t)},e.scale=function(e,t,n,r){null==t&&(t=e),(n||r)&&this.add(1,0,0,1,n,r),this.add(e,0,0,t,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},e.rotate=function(e,t,r){e=n.rad(e),t=t||0,r=r||0;var i=+I.cos(e).toFixed(9),s=+I.sin(e).toFixed(9);this.add(i,s,-s,i,t,r),this.add(1,0,0,1,-t,-r)},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[P.fromCharCode(97+e)].toFixed(4)},e.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()},e.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')"},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 i=[[this.a,this.c],[this.b,this.d]];e.scalex=I.sqrt(t(i[0])),r(i[0]),e.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*e.shear,i[1][1]-i[0][1]*e.shear],e.scaley=I.sqrt(t(i[1])),r(i[1]),e.shear/=e.scaley;var s=-i[0][1],o=i[1][1];return 0>o?(e.rotate=n.deg(I.acos(o)),0>s&&(e.rotate=360-e.rotate)):e.rotate=n.deg(I.asin(s)),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[H]();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,t.dy]:_)+(1!=t.scalex||1!=t.scaley?"s"+[t.scalex,t.scaley,0,0]:_)+(t.rotate?"r"+[t.rotate,0,0]:_)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(d.prototype);var Ut=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);E.safari="Apple Computer, Inc."==navigator.vendor&&(Ut&&4>Ut[1]||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ut&&8>Ut[1]?function(){var e=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){e.remove()})}:ht;for(var zt=function(){this.returnValue=!1},Wt=function(){return this.originalEvent.preventDefault()},Xt=function(){this.cancelBubble=!0},Vt=function(){return this.originalEvent.stopPropagation()},$t=function(e){var t=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,n=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft;return{x:e.clientX+n,y:e.clientY+t}},Jt=function(){return C.doc.addEventListener?function(e,t,n,r){var i=function(e){var t=$t(e);return n.call(r,e,t.x,t.y)};if(e.addEventListener(t,i,!1),M&&j[t]){var s=function(t){for(var i=$t(t),s=t,o=0,u=t.targetTouches&&t.targetTouches.length;u>o;o++)if(t.targetTouches[o].target==e){t=t.targetTouches[o],t.originalEvent=s,t.preventDefault=Wt,t.stopPropagation=Vt;break}return n.call(r,t,i.x,i.y)};e.addEventListener(j[t],s,!1)}return function(){return e.removeEventListener(t,i,!1),M&&j[t]&&e.removeEventListener(j[t],i,!1),!0}}:C.doc.attachEvent?function(e,t,n,r){var i=function(e){e=e||C.win.event;var t=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,i=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft,s=e.clientX+i,o=e.clientY+t;return e.preventDefault=e.preventDefault||zt,e.stopPropagation=e.stopPropagation||Xt,n.call(r,e,s,o)};e.attachEvent("on"+t,i);var s=function(){return e.detachEvent("on"+t,i),!0};return s}:void 0}(),Kt=[],Qt=function(e){for(var n,r=e.clientX,i=e.clientY,s=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,o=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft,u=Kt.length;u--;){if(n=Kt[u],M&&e.touches){for(var a,f=e.touches.length;f--;)if(a=e.touches[f],a.identifier==n.el._drag.id){r=a.clientX,i=a.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var l,c=n.el.node,h=c.nextSibling,p=c.parentNode,d=c.style.display;C.win.opera&&p.removeChild(c),c.style.display="none",l=n.el.paper.getElementByPoint(r,i),c.style.display=d,C.win.opera&&(h?p.insertBefore(c,h):p.appendChild(c)),l&&t("raphael.drag.over."+n.el.id,n.el,l),r+=o,i+=s,t("raphael.drag.move."+n.el.id,n.move_scope||n.el,r-n.el._drag.x,i-n.el._drag.y,r,i,e)}},Gt=function(e){n.unmousemove(Qt).unmouseup(Gt);for(var r,i=Kt.length;i--;)r=Kt[i],r.el._drag={},t("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,e);Kt=[]},Yt=n.el={},Zt=B.length;Zt--;)(function(e){n[e]=Yt[e]=function(t,r){return n.is(t,"function")&&(this.events=this.events||[],this.events.push({name:e,f:t,unbind:Jt(this.shape||this.node||C.doc,e,t,r||this)})),this},n["un"+e]=Yt["un"+e]=function(t){for(var r=this.events||[],i=r.length;i--;)r[i].name!=e||!n.is(t,"undefined")&&r[i].f!=t||(r[i].unbind(),r.splice(i,1),!r.length&&delete this.events);return this}})(B[Zt]);Yt.data=function(e,r){var i=lt[this.id]=lt[this.id]||{};if(0==arguments.length)return i;if(1==arguments.length){if(n.is(e,"object")){for(var s in e)e[N](s)&&this.data(s,e[s]);return this}return t("raphael.data.get."+this.id,this,i[e],e),i[e]}return i[e]=r,t("raphael.data.set."+this.id,this,r,e),this},Yt.removeData=function(e){return null==e?lt[this.id]={}:lt[this.id]&&delete lt[this.id][e],this},Yt.getData=function(){return r(lt[this.id]||{})},Yt.hover=function(e,t,n,r){return this.mouseover(e,n).mouseout(t,r||n)},Yt.unhover=function(e,t){return this.unmouseover(e).unmouseout(t)};var en=[];Yt.drag=function(e,r,i,s,o,u){function a(a){(a.originalEvent||a).preventDefault();var f=C.doc.documentElement.scrollTop||C.doc.body.scrollTop,l=C.doc.documentElement.scrollLeft||C.doc.body.scrollLeft;this._drag.x=a.clientX+l,this._drag.y=a.clientY+f,this._drag.id=a.identifier,!Kt.length&&n.mousemove(Qt).mouseup(Gt),Kt.push({el:this,move_scope:s,start_scope:o,end_scope:u}),r&&t.on("raphael.drag.start."+this.id,r),e&&t.on("raphael.drag.move."+this.id,e),i&&t.on("raphael.drag.end."+this.id,i),t("raphael.drag.start."+this.id,o||s||this,a.clientX+l,a.clientY+f,a)}return this._drag={},en.push({el:this,start:a}),this.mousedown(a),this},Yt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Yt.undrag=function(){for(var e=en.length;e--;)en[e].el==this&&(this.unmousedown(en[e].start),en.splice(e,1),t.unbind("raphael.drag.*."+this.id));!en.length&&n.unmousemove(Qt).unmouseup(Gt),Kt=[]},E.circle=function(e,t,r){var i=n._engine.circle(this,e||0,t||0,r||0);return this.__set__&&this.__set__.push(i),i},E.rect=function(e,t,r,i,s){var o=n._engine.rect(this,e||0,t||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},E.ellipse=function(e,t,r,i){var s=n._engine.ellipse(this,e||0,t||0,r||0,i||0);return this.__set__&&this.__set__.push(s),s},E.path=function(e){e&&!n.is(e,V)&&!n.is(e[0],$)&&(e+=_);var t=n._engine.path(n.format[A](n,arguments),this);return this.__set__&&this.__set__.push(t),t},E.image=function(e,t,r,i,s){var o=n._engine.image(this,e||"about:blank",t||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},E.text=function(e,t,r){var i=n._engine.text(this,e||0,t||0,P(r));return this.__set__&&this.__set__.push(i),i},E.set=function(e){!n.is(e,"array")&&(e=Array.prototype.splice.call(arguments,0,arguments.length));var t=new pn(e);return this.__set__&&this.__set__.push(t),t.paper=this,t.type="set",t},E.setStart=function(e){this.__set__=e||this.set()},E.setFinish=function(){var e=this.__set__;return delete this.__set__,e},E.setSize=function(e,t){return n._engine.setSize.call(this,e,t)},E.setViewBox=function(e,t,r,i,s){return n._engine.setViewBox.call(this,e,t,r,i,s)},E.top=E.bottom=null,E.raphael=n;var tn=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.body,i=n.documentElement,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,u=t.top+(C.win.pageYOffset||i.scrollTop||r.scrollTop)-s,a=t.left+(C.win.pageXOffset||i.scrollLeft||r.scrollLeft)-o;return{y:u,x:a}};E.getElementByPoint=function(e,t){var n=this,r=n.canvas,i=C.doc.elementFromPoint(e,t);if(C.win.opera&&"svg"==i.tagName){var s=tn(r),o=r.createSVGRect();o.x=e-s.x,o.y=t-s.y,o.width=o.height=1;var u=r.getIntersectionList(o,null);u.length&&(i=u[u.length-1])}if(!i)return null;for(;i.parentNode&&i!=r.parentNode&&!i.raphael;)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i=i&&i.raphael?n.getById(i.raphaelid):null},E.getElementsByBBox=function(e){var t=this.set();return this.forEach(function(r){n.isBBoxIntersect(r.getBBox(),e)&&t.push(r)}),t},E.getById=function(e){for(var t=this.bottom;t;){if(t.id==e)return t;t=t.next}return null},E.forEach=function(e,t){for(var n=this.bottom;n;){if(e.call(t,n)===!1)return this;n=n.next}return this},E.getElementsByPoint=function(e,t){var n=this.set();return this.forEach(function(r){r.isPointInside(e,t)&&n.push(r)}),n},Yt.isPointInside=function(e,t){var r=this.realPath=this.realPath||mt[this.type](this);return n.isPointInsidePath(r,e,t)},Yt.getBBox=function(e){if(this.removed)return{};var t=this._;return e?((t.dirty||!t.bboxwt)&&(this.realPath=mt[this.type](this),t.bboxwt=kt(this.realPath),t.bboxwt.toString=v,t.dirty=0),t.bboxwt):((t.dirty||t.dirtyT||!t.bbox)&&((t.dirty||!this.realPath)&&(t.bboxwt=0,this.realPath=mt[this.type](this)),t.bbox=kt(gt(this.realPath,this.matrix)),t.bbox.toString=v,t.dirty=t.dirtyT=0),t.bbox)},Yt.clone=function(){if(this.removed)return null;var e=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(e),e},Yt.glow=function(e){if("text"==this.type)return null;e=e||{};var t={width:(e.width||10)+(+this.attr("stroke-width")||1),fill:e.fill||!1,opacity:e.opacity||.5,offsetx:e.offsetx||0,offsety:e.offsety||0,color:e.color||"#000"},n=t.width/2,r=this.paper,i=r.set(),s=this.realPath||mt[this.type](this);s=this.matrix?gt(s,this.matrix):s;for(var o=1;n+1>o;o++)i.push(r.path(s).attr({stroke:t.color,fill:t.fill?t.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/n*o).toFixed(3),opacity:+(t.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(t.offsetx,t.offsety)};var nn=function(e,t,r,i,s,o,u,a,c){return null==c?f(e,t,r,i,s,o,u,a):n.findDotsAtSegment(e,t,r,i,s,o,u,a,l(e,t,r,i,s,o,u,a,c))},rn=function(e,t){return function(r,i,s){r=Bt(r);for(var o,u,a,f,l,c="",h={},p=0,d=0,v=r.length;v>d;d++){if(a=r[d],"M"==a[0])o=+a[1],u=+a[2];else{if(f=nn(o,u,a[1],a[2],a[3],a[4],a[5],a[6]),p+f>i){if(t&&!h.start){if(l=nn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),c+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],s)return c;h.start=c,c=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,a[5],a[6]].join(),p+=f,o=+a[5],u=+a[6];continue}if(!e&&!t)return l=nn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),{x:l.x,y:l.y,alpha:l.alpha}}p+=f,o=+a[5],u=+a[6]}c+=a.shift()+a}return h.end=c,l=e?p:t?h:n.findDotsAtSegment(o,u,a[0],a[1],a[2],a[3],a[4],a[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},sn=rn(1),on=rn(),un=rn(0,1);n.getTotalLength=sn,n.getPointAtLength=on,n.getSubpath=function(e,t,n){if(1e-6>this.getTotalLength(e)-n)return un(e,t).end;var r=un(e,n,1);return t?un(r,t).end:r},Yt.getTotalLength=function(){var e=this.getPath();if(e)return this.node.getTotalLength?this.node.getTotalLength():sn(e)},Yt.getPointAtLength=function(e){var t=this.getPath();if(t)return on(t,e)},Yt.getPath=function(){var e,t=n._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return t&&(e=t(this)),e},Yt.getSubpath=function(e,t){var r=this.getPath();if(r)return n.getSubpath(r,e,t)};var an=n.easing_formulas={linear:function(e){return e},"<":function(e){return z(e,1.7)},">":function(e){return z(e,.48)},"<>":function(e){var t=.48-e/1.04,n=I.sqrt(.1734+t*t),r=n-t,i=z(U(r),1/3)*(0>r?-1:1),s=-n-t,o=z(U(s),1/3)*(0>s?-1:1),u=i+o+.5;return 3*(1-u)*u*u+u*u*u},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){e-=1;var t=1.70158;return e*e*((t+1)*e+t)+1},elastic:function(e){return e==!!e?e:z(2,-10*e)*I.sin((e-.075)*2*W/.3)+1},bounce:function(e){var t,n=7.5625,r=2.75;return 1/r>e?t=n*e*e:2/r>e?(e-=1.5/r,t=n*e*e+.75):2.5/r>e?(e-=2.25/r,t=n*e*e+.9375):(e-=2.625/r,t=n*e*e+.984375),t}};an.easeIn=an["ease-in"]=an["<"],an.easeOut=an["ease-out"]=an[">"],an.easeInOut=an["ease-in-out"]=an["<>"],an["back-in"]=an.backIn,an["back-out"]=an.backOut;var fn=[],ln=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,16)},cn=function(){for(var e=+(new Date),r=0;fn.length>r;r++){var i=fn[r];if(!i.el.removed&&!i.paused){var s,o,u=e-i.start,a=i.ms,f=i.easing,l=i.from,c=i.diff,h=i.to,p=(i.t,i.el),d={},v={};if(i.initstatus?(u=(i.initstatus*i.anim.top-i.prev)/(i.percent-i.prev)*a,i.status=i.initstatus,delete i.initstatus,i.stop&&fn.splice(r--,1)):i.status=(i.prev+(i.percent-i.prev)*(u/a))/i.anim.top,!(0>u))if(a>u){var m=f(u/a);for(var g in l)if(l[N](g)){switch(rt[g]){case X:s=+l[g]+m*a*c[g];break;case"colour":s="rgb("+[hn(Y(l[g].r+m*a*c[g].r)),hn(Y(l[g].g+m*a*c[g].g)),hn(Y(l[g].b+m*a*c[g].b))].join(",")+")";break;case"path":s=[];for(var b=0,w=l[g].length;w>b;b++){s[b]=[l[g][b][0]];for(var E=1,S=l[g][b].length;S>E;E++)s[b][E]=+l[g][b][E]+m*a*c[g][b][E];s[b]=s[b].join(D)}s=s.join(D);break;case"transform":if(c[g].real)for(s=[],b=0,w=l[g].length;w>b;b++)for(s[b]=[l[g][b][0]],E=1,S=l[g][b].length;S>E;E++)s[b][E]=l[g][b][E]+m*a*c[g][b][E];else{var x=function(e){return+l[g][e]+m*a*c[g][e]};s=[["m",x(0),x(1),x(2),x(3),x(4),x(5)]]}break;case"csv":if("clip-rect"==g)for(s=[],b=4;b--;)s[b]=+l[g][b]+m*a*c[g][b];break;default:var T=[][O](l[g]);for(s=[],b=p.paper.customAttributes[g].length;b--;)s[b]=+T[b]+m*a*c[g][b]}d[g]=s}p.attr(d),function(e,n,r){setTimeout(function(){t("raphael.anim.frame."+e,n,r)})}(p.id,p,i.anim)}else{if(function(e,r,i){setTimeout(function(){t("raphael.anim.frame."+r.id,r,i),t("raphael.anim.finish."+r.id,r,i),n.is(e,"function")&&e.call(r)})}(i.callback,p,i.anim),p.attr(h),fn.splice(r--,1),i.repeat>1&&!i.next){for(o in h)h[N](o)&&(v[o]=i.totalOrigin[o]);i.el.attr(v),y(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&y(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}n.svg&&p&&p.paper&&p.paper.safari(),fn.length&&ln(cn)},hn=function(e){return e>255?255:0>e?0:e};Yt.animateWith=function(e,t,r,i,s,o){var u=this;if(u.removed)return o&&o.call(u),u;var a=r instanceof g?r:n.animation(r,i,s,o);y(a,u,a.percents[0],null,u.attr());for(var f=0,l=fn.length;l>f;f++)if(fn[f].anim==t&&fn[f].el==e){fn[l-1].start=fn[f].start;break}return u},Yt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},g.prototype.delay=function(e){var t=new g(this.anim,this.ms);return t.times=this.times,t.del=+e||0,t},g.prototype.repeat=function(e){var t=new g(this.anim,this.ms);return t.del=this.del,t.times=I.floor(q(e,0))||1,t},n.animation=function(e,t,r,i){if(e instanceof g)return e;(n.is(r,"function")||!r)&&(i=i||r||null,r=null),e=Object(e),t=+t||0;var s,o,u={};for(o in e)e[N](o)&&Z(o)!=o&&Z(o)+"%"!=o&&(s=!0,u[o]=e[o]);return s?(r&&(u.easing=r),i&&(u.callback=i),new g({100:u},t)):new g(e,t)},Yt.animate=function(e,t,r,i){var s=this;if(s.removed)return i&&i.call(s),s;var o=e instanceof g?e:n.animation(e,t,r,i);return y(o,s,o.percents[0],null,s.attr()),s},Yt.setTime=function(e,t){return e&&null!=t&&this.status(e,R(t,e.ms)/e.ms),this},Yt.status=function(e,t){var n,r,i=[],s=0;if(null!=t)return y(e,this,-1,R(t,1)),this;for(n=fn.length;n>s;s++)if(r=fn[s],r.el.id==this.id&&(!e||r.anim==e)){if(e)return r.status;i.push({anim:r.anim,status:r.status})}return e?0:i},Yt.pause=function(e){for(var n=0;fn.length>n;n++)fn[n].el.id!=this.id||e&&fn[n].anim!=e||t("raphael.anim.pause."+this.id,this,fn[n].anim)!==!1&&(fn[n].paused=!0);return this},Yt.resume=function(e){for(var n=0;fn.length>n;n++)if(fn[n].el.id==this.id&&(!e||fn[n].anim==e)){var r=fn[n];t("raphael.anim.resume."+this.id,this,r.anim)!==!1&&(delete r.paused,this.status(r.anim,r.status))}return this},Yt.stop=function(e){for(var n=0;fn.length>n;n++)fn[n].el.id!=this.id||e&&fn[n].anim!=e||t("raphael.anim.stop."+this.id,this,fn[n].anim)!==!1&&fn.splice(n--,1);return this},t.on("raphael.remove",b),t.on("raphael.clear",b),Yt.toString=function(){return"Raphaël’s object"};var pn=function(e){if(this.items=[],this.length=0,this.type="set",e)for(var t=0,n=e.length;n>t;t++)!e[t]||e[t].constructor!=Yt.constructor&&e[t].constructor!=pn||(this[this.items.length]=this.items[this.items.length]=e[t],this.length++)},dn=pn.prototype;dn.push=function(){for(var e,t,n=0,r=arguments.length;r>n;n++)e=arguments[n],!e||e.constructor!=Yt.constructor&&e.constructor!=pn||(t=this.items.length,this[t]=this.items[t]=e,this.length++);return this},dn.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},dn.forEach=function(e,t){for(var n=0,r=this.items.length;r>n;n++)if(e.call(t,this.items[n],n)===!1)return this;return this};for(var vn in Yt)Yt[N](vn)&&(dn[vn]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e][A](n,t)})}}(vn));return dn.attr=function(e,t){if(e&&n.is(e,$)&&n.is(e[0],"object"))for(var r=0,i=e.length;i>r;r++)this.items[r].attr(e[r]);else for(var s=0,o=this.items.length;o>s;s++)this.items[s].attr(e,t);return this},dn.clear=function(){for(;this.length;)this.pop()},dn.splice=function(e,t){e=0>e?q(this.length+e,0):e,t=q(0,R(this.length-e,t));var n,r=[],i=[],s=[];for(n=2;arguments.length>n;n++)s.push(arguments[n]);for(n=0;t>n;n++)i.push(this[e+n]);for(;this.length-e>n;n++)r.push(this[e+n]);var o=s.length;for(n=0;o+r.length>n;n++)this.items[e+n]=this[e+n]=o>n?s[n]:r[n-o];for(n=this.items.length=this.length-=t-o;this[n];)delete this[n++];return new pn(i)},dn.exclude=function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]==e)return this.splice(t,1),!0},dn.animate=function(e,t,r,i){(n.is(r,"function")||!r)&&(i=r||null);var s,o,u=this.items.length,a=u,f=this;if(!u)return this;i&&(o=function(){!--u&&i.call(f)}),r=n.is(r,V)?r:o;var l=n.animation(e,t,r,o);for(s=this.items[--a].animate(l);a--;)this.items[a]&&!this.items[a].removed&&this.items[a].animateWith(s,l,l),this.items[a]&&!this.items[a].removed||u--;return this},dn.insertAfter=function(e){for(var t=this.items.length;t--;)this.items[t].insertAfter(e);return this},dn.getBBox=function(){for(var e=[],t=[],n=[],r=[],i=this.items.length;i--;)if(!this.items[i].removed){var s=this.items[i].getBBox();e.push(s.x),t.push(s.y),n.push(s.x+s.width),r.push(s.y+s.height)}return e=R[A](0,e),t=R[A](0,t),n=q[A](0,n),r=q[A](0,r),{x:e,y:t,x2:n,y2:r,width:n-e,height:r-t}},dn.clone=function(e){e=this.paper.set();for(var t=0,n=this.items.length;n>t;t++)e.push(this.items[t].clone());return e},dn.toString=function(){return"Raphaël‘s set"},dn.glow=function(e){var t=this.paper.set();return this.forEach(function(n){var r=n.glow(e);null!=r&&r.forEach(function(e){t.push(e)})}),t},dn.isPointInside=function(e,t){var n=!1;return this.forEach(function(r){return r.isPointInside(e,t)?(console.log("runned"),n=!0,!1):void 0}),n},n.registerFont=function(e){if(!e.face)return e;this.fonts=this.fonts||{};var t={w:e.w,face:{},glyphs:{}},n=e.face["font-family"];for(var r in e.face)e.face[N](r)&&(t.face[r]=e.face[r]);if(this.fonts[n]?this.fonts[n].push(t):this.fonts[n]=[t],!e.svg){t.face["units-per-em"]=et(e.face["units-per-em"],10);for(var i in e.glyphs)if(e.glyphs[N](i)){var s=e.glyphs[i];if(t.glyphs[i]={w:s.w,k:{},d:s.d&&"M"+s.d.replace(/[mlcxtrv]/g,function(e){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[e]||"M"})+"z"},s.k)for(var o in s.k)s[N](o)&&(t.glyphs[i].k[o]=s.k[o])}}return e},E.getFont=function(e,t,r,i){if(i=i||"normal",r=r||"normal",t=+t||{normal:400,bold:700,lighter:300,bolder:800}[t]||400,n.fonts){var s=n.fonts[e];if(!s){var o=RegExp("(^|\\s)"+e.replace(/[^\w\d\s+!~.:_-]/g,_)+"(\\s|$)","i");for(var u in n.fonts)if(n.fonts[N](u)&&o.test(u)){s=n.fonts[u];break}}var a;if(s)for(var f=0,l=s.length;l>f&&(a=s[f],a.face["font-weight"]!=t||a.face["font-style"]!=r&&a.face["font-style"]||a.face["font-stretch"]!=i);f++);return a}},E.print=function(e,t,r,i,s,o,u,a){o=o||"middle",u=q(R(u||0,1),-1),a=q(R(a||1,3),1);var f,l=P(r)[H](_),c=0,h=0,p=_;if(n.is(i,"string")&&(i=this.getFont(i)),i){f=(s||16)/i.face["units-per-em"];for(var d=i.face.bbox[H](S),v=+d[0],m=d[3]-d[1],g=0,y=+d[1]+("baseline"==o?m+ +i.face.descent:m/2),b=0,w=l.length;w>b;b++){if("\n"==l[b])c=0,x=0,h=0,g+=m*a;else{var E=h&&i.glyphs[l[b-1]]||{},x=i.glyphs[l[b]];c+=h?(E.w||i.w)+(E.k&&E.k[l[b]]||0)+i.w*u:0,h=1}x&&x.d&&(p+=n.transformPath(x.d,["t",c*f,g*f,"s",f,f,v,y,"t",(e-v)/f,(t-y)/f]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},E.add=function(e){if(n.is(e,"array"))for(var t,r=this.set(),i=0,s=e.length;s>i;i++)t=e[i]||{},x[N](t.type)&&r.push(this[t.type]().attr(t));return r},n.format=function(e,t){var r=n.is(t,$)?[0][O](t):arguments;return e&&n.is(e,V)&&r.length-1&&(e=e.replace(T,function(e,t){return null==r[++t]?_:r[t]})),e||_},n.fullfill=function(){var e=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(e,n,r){var i=r;return n.replace(t,function(e,t,n,r,s){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&s&&(i=i()))}),i=(null==i||i==r?e:i)+""};return function(t,r){return(t+"").replace(e,function(e,t){return n(e,t,r)})}}(),n.ninja=function(){return k.was?C.win.Raphael=k.is:delete Raphael,n},n.st=dn,function(e,t,r){function i(){/in/.test(e.readyState)?setTimeout(i,9):n.eve("raphael.DOMload")}null==e.readyState&&e.addEventListener&&(e.addEventListener(t,r=function(){e.removeEventListener(t,r,!1),e.readyState="complete"},!1),e.readyState="loading"),i()}(document,"DOMContentLoaded"),t.on("raphael.DOMload",function(){w=!0}),function(){if(n.svg){var e="hasOwnProperty",t=String,r=parseFloat,i=parseInt,s=Math,o=s.max,u=s.abs,a=s.pow,f=/[, ]+/,l=n.eve,c="",h=" ",p="http://www.w3.org/1999/xlink",d={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"},v={};n.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var m=function(r,i){if(i){"string"==typeof r&&(r=m(r));for(var s in i)i[e](s)&&("xlink:"==s.substring(0,6)?r.setAttributeNS(p,s.substring(6),t(i[s])):r.setAttribute(s,t(i[s])))}else r=n._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},g=function(e,i){var f="linear",l=e.id+i,h=.5,p=.5,d=e.node,v=e.paper,g=d.style,y=n._g.doc.getElementById(l);if(!y){if(i=t(i).replace(n._radial_gradient,function(e,t,n){if(f="radial",t&&n){h=r(t),p=r(n);var i=2*(p>.5)-1;a(h-.5,2)+a(p-.5,2)>.25&&(p=s.sqrt(.25-a(h-.5,2))*i+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*i)}return c}),i=i.split(/\s*\-\s*/),"linear"==f){var b=i.shift();if(b=-r(b),isNaN(b))return null;var w=[0,0,s.cos(n.rad(b)),s.sin(n.rad(b))],E=1/(o(u(w[2]),u(w[3]))||1);w[2]*=E,w[3]*=E,0>w[2]&&(w[0]=-w[2],w[2]=0),0>w[3]&&(w[1]=-w[3],w[3]=0)}var S=n._parseDots(i);if(!S)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(v.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=m(f+"Gradient",{id:l}),e.gradient=y,m(y,"radial"==f?{fx:h,fy:p}:{x1:w[0],y1:w[1],x2:w[2],y2:w[3],gradientTransform:e.matrix.invert()}),v.defs.appendChild(y);for(var x=0,T=S.length;T>x;x++)y.appendChild(m("stop",{offset:S[x].offset?S[x].offset:x?"100%":"0%","stop-color":S[x].color||"#fff"}))}}return m(d,{fill:"url(#"+l+")",opacity:1,"fill-opacity":1}),g.fill=c,g.opacity=1,g.fillOpacity=1,1},y=function(e){var t=e.getBBox(1);m(e.pattern,{patternTransform:e.matrix.invert()+" translate("+t.x+","+t.y+")"})},b=function(r,i,s){if("path"==r.type){for(var o,u,a,f,l,h=t(i).toLowerCase().split("-"),p=r.paper,g=s?"end":"start",y=r.node,b=r.attrs,w=b["stroke-width"],E=h.length,S="classic",x=3,T=3,N=5;E--;)switch(h[E]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":S=h[E];break;case"wide":T=5;break;case"narrow":T=2;break;case"long":x=5;break;case"short":x=2}if("open"==S?(x+=2,T+=2,N+=2,a=1,f=s?4:1,l={fill:"none",stroke:b.stroke}):(f=a=x/2,l={fill:b.stroke,stroke:"none"}),r._.arrows?s?(r._.arrows.endPath&&v[r._.arrows.endPath]--,r._.arrows.endMarker&&v[r._.arrows.endMarker]--):(r._.arrows.startPath&&v[r._.arrows.startPath]--,r._.arrows.startMarker&&v[r._.arrows.startMarker]--):r._.arrows={},"none"!=S){var C="raphael-marker-"+S,k="raphael-marker-"+g+S+x+T;n._g.doc.getElementById(C)?v[C]++:(p.defs.appendChild(m(m("path"),{"stroke-linecap":"round",d:d[S],id:C})),v[C]=1);var L,A=n._g.doc.getElementById(k);A?(v[k]++,L=A.getElementsByTagName("use")[0]):(A=m(m("marker"),{id:k,markerHeight:T,markerWidth:x,orient:"auto",refX:f,refY:T/2}),L=m(m("use"),{"xlink:href":"#"+C,transform:(s?"rotate(180 "+x/2+" "+T/2+") ":c)+"scale("+x/N+","+T/N+")","stroke-width":(1/((x/N+T/N)/2)).toFixed(4)}),A.appendChild(L),p.defs.appendChild(A),v[k]=1),m(L,l);var O=a*("diamond"!=S&&"oval"!=S);s?(o=r._.arrows.startdx*w||0,u=n.getTotalLength(b.path)-O*w):(o=O*w,u=n.getTotalLength(b.path)-(r._.arrows.enddx*w||0)),l={},l["marker-"+g]="url(#"+k+")",(u||o)&&(l.d=n.getSubpath(b.path,o,u)),m(y,l),r._.arrows[g+"Path"]=C,r._.arrows[g+"Marker"]=k,r._.arrows[g+"dx"]=O,r._.arrows[g+"Type"]=S,r._.arrows[g+"String"]=i}else s?(o=r._.arrows.startdx*w||0,u=n.getTotalLength(b.path)-o):(o=0,u=n.getTotalLength(b.path)-(r._.arrows.enddx*w||0)),r._.arrows[g+"Path"]&&m(y,{d:n.getSubpath(b.path,o,u)}),delete r._.arrows[g+"Path"],delete r._.arrows[g+"Marker"],delete r._.arrows[g+"dx"],delete r._.arrows[g+"Type"],delete r._.arrows[g+"String"];for(l in v)if(v[e](l)&&!v[l]){var M=n._g.doc.getElementById(l);M&&M.parentNode.removeChild(M)}}},w={"":[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]},E=function(e,n,r){if(n=w[t(n).toLowerCase()]){for(var i=e.attrs["stroke-width"]||"1",s={round:i,square:i,butt:0}[e.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],u=n.length;u--;)o[u]=n[u]*i+(u%2?1:-1)*s;m(e.node,{"stroke-dasharray":o.join(",")})}},S=function(r,s){var a=r.node,l=r.attrs,h=a.style.visibility;a.style.visibility="hidden";for(var d in s)if(s[e](d)){if(!n._availableAttrs[e](d))continue;var v=s[d];switch(l[d]=v,d){case"blur":r.blur(v);break;case"href":case"title":case"target":var w=a.parentNode;if("a"!=w.tagName.toLowerCase()){var S=m("a");w.insertBefore(S,a),S.appendChild(a),w=S}"target"==d?w.setAttributeNS(p,"show","blank"==v?"new":v):w.setAttributeNS(p,d,v);break;case"cursor":a.style.cursor=v;break;case"transform":r.transform(v);break;case"arrow-start":b(r,v);break;case"arrow-end":b(r,v,1);break;case"clip-rect":var x=t(v).split(f);if(4==x.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var N=m("clipPath"),C=m("rect");N.id=n.createUUID(),m(C,{x:x[0],y:x[1],width:x[2],height:x[3]}),N.appendChild(C),r.paper.defs.appendChild(N),m(a,{"clip-path":"url(#"+N.id+")"}),r.clip=C}if(!v){var k=a.getAttribute("clip-path");if(k){var L=n._g.doc.getElementById(k.replace(/(^url\(#|\)$)/g,c));L&&L.parentNode.removeChild(L),m(a,{"clip-path":c}),delete r.clip}}break;case"path":"path"==r.type&&(m(a,{d:v?l.path=n._pathToAbsolute(v):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1)));break;case"width":if(a.setAttribute(d,v),r._.dirty=1,!l.fx)break;d="x",v=l.x;case"x":l.fx&&(v=-l.x-(l.width||0));case"rx":if("rx"==d&&"rect"==r.type)break;case"cx":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"height":if(a.setAttribute(d,v),r._.dirty=1,!l.fy)break;d="y",v=l.y;case"y":l.fy&&(v=-l.y-(l.height||0));case"ry":if("ry"==d&&"rect"==r.type)break;case"cy":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"r":"rect"==r.type?m(a,{rx:v,ry:v}):a.setAttribute(d,v),r._.dirty=1;break;case"src":"image"==r.type&&a.setAttributeNS(p,"href",v);break;case"stroke-width":(1!=r._.sx||1!=r._.sy)&&(v/=o(u(r._.sx),u(r._.sy))||1),r.paper._vbSize&&(v*=r.paper._vbSize),a.setAttribute(d,v),l["stroke-dasharray"]&&E(r,l["stroke-dasharray"],s),r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"stroke-dasharray":E(r,v,s);break;case"fill":var A=t(v).match(n._ISURL);if(A){N=m("pattern");var O=m("image");N.id=n.createUUID(),m(N,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),m(O,{x:0,y:0,"xlink:href":A[1]}),N.appendChild(O),function(e){n._preload(A[1],function(){var t=this.offsetWidth,n=this.offsetHeight;m(e,{width:t,height:n}),m(O,{width:t,height:n}),r.paper.safari()})}(N),r.paper.defs.appendChild(N),m(a,{fill:"url(#"+N.id+")"}),r.pattern=N,r.pattern&&y(r);break}var M=n.getRGB(v);if(M.error){if(("circle"==r.type||"ellipse"==r.type||"r"!=t(v).charAt())&&g(r,v)){if("opacity"in l||"fill-opacity"in l){var _=n._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(_){var D=_.getElementsByTagName("stop");m(D[D.length-1],{"stop-opacity":("opacity"in l?l.opacity:1)*("fill-opacity"in l?l["fill-opacity"]:1)})}}l.gradient=v,l.fill="none";break}}else delete s.gradient,delete l.gradient,!n.is(l.opacity,"undefined")&&n.is(s.opacity,"undefined")&&m(a,{opacity:l.opacity}),!n.is(l["fill-opacity"],"undefined")&&n.is(s["fill-opacity"],"undefined")&&m(a,{"fill-opacity":l["fill-opacity"]});M[e]("opacity")&&m(a,{"fill-opacity":M.opacity>1?M.opacity/100:M.opacity});case"stroke":M=n.getRGB(v),a.setAttribute(d,M.hex),"stroke"==d&&M[e]("opacity")&&m(a,{"stroke-opacity":M.opacity>1?M.opacity/100:M.opacity}),"stroke"==d&&r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"gradient":("circle"==r.type||"ellipse"==r.type||"r"!=t(v).charAt())&&g(r,v);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&m(a,{"stroke-opacity":v>1?v/100:v});case"fill-opacity":if(l.gradient){_=n._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c)),_&&(D=_.getElementsByTagName("stop"),m(D[D.length-1],{"stop-opacity":v}));break};default:"font-size"==d&&(v=i(v,10)+"px");var P=d.replace(/(\-.)/g,function(e){return e.substring(1).toUpperCase()});a.style[P]=v,r._.dirty=1,a.setAttribute(d,v)}}T(r,s),a.style.visibility=h},x=1.2,T=function(r,s){if("text"==r.type&&(s[e]("text")||s[e]("font")||s[e]("font-size")||s[e]("x")||s[e]("y"))){var o=r.attrs,u=r.node,a=u.firstChild?i(n._g.doc.defaultView.getComputedStyle(u.firstChild,c).getPropertyValue("font-size"),10):10;if(s[e]("text")){for(o.text=s.text;u.firstChild;)u.removeChild(u.firstChild);for(var f,l=t(s.text).split("\n"),h=[],p=0,d=l.length;d>p;p++)f=m("tspan"),p&&m(f,{dy:a*x,x:o.x}),f.appendChild(n._g.doc.createTextNode(l[p])),u.appendChild(f),h[p]=f}else for(h=u.getElementsByTagName("tspan"),p=0,d=h.length;d>p;p++)p?m(h[p],{dy:a*x,x:o.x}):m(h[0],{dy:0});m(u,{x:o.x,y:o.y}),r._.dirty=1;var v=r._getBBox(),g=o.y-(v.y+v.height/2);g&&n.is(g,"finite")&&m(h[0],{dy:g})}},N=function(e,t){this[0]=this.node=e,e.raphael=!0,this.id=n._oid++,e.raphaelid=this.id,this.matrix=n.matrix(),this.realPath=null,this.paper=t,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!t.bottom&&(t.bottom=this),this.prev=t.top,t.top&&(t.top.next=this),t.top=this,this.next=null},C=n.el;N.prototype=C,C.constructor=N,n._engine.path=function(e,t){var n=m("path");t.canvas&&t.canvas.appendChild(n);var r=new N(n,t);return r.type="path",S(r,{fill:"none",stroke:"#000",path:e}),r},C.rotate=function(e,n,i){if(this.removed)return this;if(e=t(e).split(f),e.length-1&&(n=r(e[1]),i=r(e[2])),e=r(e[0]),null==i&&(n=i),null==n||null==i){var s=this.getBBox
|
11
|
-
(1);n=s.x+s.width/2,i=s.y+s.height/2}return this.transform(this._.transform.concat([["r",e,n,i]])),this},C.scale=function(e,n,i,s){if(this.removed)return this;if(e=t(e).split(f),e.length-1&&(n=r(e[1]),i=r(e[2]),s=r(e[3])),e=r(e[0]),null==n&&(n=e),null==s&&(i=s),null==i||null==s)var o=this.getBBox(1);return i=null==i?o.x+o.width/2:i,s=null==s?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,n,i,s]])),this},C.translate=function(e,n){return this.removed?this:(e=t(e).split(f),e.length-1&&(n=r(e[1])),e=r(e[0])||0,n=+n||0,this.transform(this._.transform.concat([["t",e,n]])),this)},C.transform=function(t){var r=this._;if(null==t)return r.transform;if(n._extractTransform(this,t),this.clip&&m(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&m(this.node,{transform:this.matrix}),1!=r.sx||1!=r.sy){var i=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},C.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},C.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},C.remove=function(){if(!this.removed&&this.node.parentNode){var e=this.paper;e.__set__&&e.__set__.exclude(this),l.unbind("raphael.*.*."+this.id),this.gradient&&e.defs.removeChild(this.gradient),n._tear(this,e),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;this.removed=!0}},C._getBBox=function(){if("none"==this.node.style.display){this.show();var e=!0}var t={};try{t=this.node.getBBox()}catch(n){}finally{t=t||{}}return e&&this.hide(),t},C.attr=function(t,r){if(this.removed)return this;if(null==t){var i={};for(var s in this.attrs)this.attrs[e](s)&&(i[s]=this.attrs[s]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&n.is(t,"string")){if("fill"==t&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==t)return this._.transform;for(var o=t.split(f),u={},a=0,c=o.length;c>a;a++)t=o[a],u[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return c-1?u:u[o[0]]}if(null==r&&n.is(t,"array")){for(u={},a=0,c=t.length;c>a;a++)u[t[a]]=this.attr(t[a]);return u}if(null!=r){var h={};h[t]=r}else null!=t&&n.is(t,"object")&&(h=t);for(var p in h)l("raphael.attr."+p+"."+this.id,this,h[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&h[e](p)&&n.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(h[p]));this.attrs[p]=h[p];for(var v in d)d[e](v)&&(h[v]=d[v])}return S(this,h),this},C.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 e=this.paper;return e.top!=this&&n._tofront(this,e),this},C.toBack=function(){if(this.removed)return this;var e=this.node.parentNode;return"a"==e.tagName.toLowerCase()?e.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):e.firstChild!=this.node&&e.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper),this.paper,this},C.insertAfter=function(e){if(this.removed)return this;var t=e.node||e[e.length-1].node;return t.nextSibling?t.parentNode.insertBefore(this.node,t.nextSibling):t.parentNode.appendChild(this.node),n._insertafter(this,e,this.paper),this},C.insertBefore=function(e){if(this.removed)return this;var t=e.node||e[0].node;return t.parentNode.insertBefore(this.node,t),n._insertbefore(this,e,this.paper),this},C.blur=function(e){var t=this;if(0!==+e){var r=m("filter"),i=m("feGaussianBlur");t.attrs.blur=e,r.id=n.createUUID(),m(i,{stdDeviation:+e||1.5}),r.appendChild(i),t.paper.defs.appendChild(r),t._blur=r,m(t.node,{filter:"url(#"+r.id+")"})}else t._blur&&(t._blur.parentNode.removeChild(t._blur),delete t._blur,delete t.attrs.blur),t.node.removeAttribute("filter");return t},n._engine.circle=function(e,t,n,r){var i=m("circle");e.canvas&&e.canvas.appendChild(i);var s=new N(i,e);return s.attrs={cx:t,cy:n,r:r,fill:"none",stroke:"#000"},s.type="circle",m(i,s.attrs),s},n._engine.rect=function(e,t,n,r,i,s){var o=m("rect");e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:t,y:n,width:r,height:i,r:s||0,rx:s||0,ry:s||0,fill:"none",stroke:"#000"},u.type="rect",m(o,u.attrs),u},n._engine.ellipse=function(e,t,n,r,i){var s=m("ellipse");e.canvas&&e.canvas.appendChild(s);var o=new N(s,e);return o.attrs={cx:t,cy:n,rx:r,ry:i,fill:"none",stroke:"#000"},o.type="ellipse",m(s,o.attrs),o},n._engine.image=function(e,t,n,r,i,s){var o=m("image");m(o,{x:n,y:r,width:i,height:s,preserveAspectRatio:"none"}),o.setAttributeNS(p,"href",t),e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:n,y:r,width:i,height:s,src:t},u.type="image",u},n._engine.text=function(e,t,r,i){var s=m("text");e.canvas&&e.canvas.appendChild(s);var o=new N(s,e);return o.attrs={x:t,y:r,"text-anchor":"middle",text:i,font:n._availableAttrs.font,stroke:"none",fill:"#000"},o.type="text",S(o,o.attrs),o},n._engine.setSize=function(e,t){return this.width=e||this.width,this.height=t||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 e=n._getContainer.apply(0,arguments),t=e&&e.container,r=e.x,i=e.y,s=e.width,o=e.height;if(!t)throw Error("SVG container not found.");var u,a=m("svg"),f="overflow:hidden;";return r=r||0,i=i||0,s=s||512,o=o||342,m(a,{height:o,version:1.1,width:s,xmlns:"http://www.w3.org/2000/svg"}),1==t?(a.style.cssText=f+"position:absolute;left:"+r+"px;top:"+i+"px",n._g.doc.body.appendChild(a),u=1):(a.style.cssText=f+"position:relative",t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a)),t=new n._Paper,t.width=s,t.height=o,t.canvas=a,t.clear(),t._left=t._top=0,u&&(t.renderfix=function(){}),t.renderfix(),t},n._engine.setViewBox=function(e,t,n,r,i){l("raphael.setViewBox",this,this._viewBox,[e,t,n,r,i]);var s,u,a=o(n/this.width,r/this.height),f=this.top,c=i?"meet":"xMinYMin";for(null==e?(this._vbSize&&(a=1),delete this._vbSize,s="0 0 "+this.width+h+this.height):(this._vbSize=a,s=e+h+t+h+n+h+r),m(this.canvas,{viewBox:s,preserveAspectRatio:c});a&&f;)u="stroke-width"in f.attrs?f.attrs["stroke-width"]:1,f.attr({"stroke-width":u}),f._.dirty=1,f._.dirtyT=1,f=f.prev;return this._viewBox=[e,t,n,r,!!i],this},n.prototype.renderfix=function(){var e,t=this.canvas,n=t.style;try{e=t.getScreenCTM()||t.createSVGMatrix()}catch(r){e=t.createSVGMatrix()}var i=-e.e%1,s=-e.f%1;(i||s)&&(i&&(this._left=(this._left+i)%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 e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=m("desc")).appendChild(n._g.doc.createTextNode("Created with Raphaël "+n.version)),e.appendChild(this.desc),e.appendChild(this.defs=m("defs"))},n.prototype.remove=function(){l("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?n._removedFactory(e):null};var k=n.st;for(var L in C)C[e](L)&&!k[e](L)&&(k[L]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(L))}}(),function(){if(n.vml){var e="hasOwnProperty",t=String,r=parseFloat,i=Math,s=i.round,o=i.max,u=i.min,a=i.abs,f="fill",l=/[, ]+/,c=n.eve,h=" progid:DXImageTransform.Microsoft",p=" ",d="",v={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px",w=21600,E={path:1,rect:1,image:1},S={circle:1,ellipse:1},x=function(e){var r=/[ahqstv]/gi,i=n._pathToAbsolute;if(t(e).match(r)&&(i=n._path2curve),r=/[clmz]/g,i==n._pathToAbsolute&&!t(e).match(r)){var o=t(e).replace(m,function(e,t,n){var r=[],i="m"==t.toLowerCase(),o=v[t];return n.replace(y,function(e){i&&2==r.length&&(o+=r+v["m"==t?"l":"L"],r=[]),r.push(s(e*w))}),o+r});return o}var u,a,f=i(e);o=[];for(var l=0,c=f.length;c>l;l++){u=f[l],a=f[l][0].toLowerCase(),"z"==a&&(a="x");for(var h=1,g=u.length;g>h;h++)a+=s(u[h]*w)+(h!=g-1?",":d);o.push(a)}return o.join(p)},T=function(e,t,r){var i=n.matrix();return i.rotate(-e,.5,.5),{dx:i.x(t,r),dy:i.y(t,r)}},N=function(e,t,n,r,i,s){var o=e._,u=e.matrix,l=o.fillpos,c=e.node,h=c.style,d=1,v="",m=w/t,g=w/n;if(h.visibility="hidden",t&&n){if(c.coordsize=a(m)+p+a(g),h.rotation=s*(0>t*n?-1:1),s){var y=T(s,r,i);r=y.dx,i=y.dy}if(0>t&&(v+="x"),0>n&&(v+=" y")&&(d=-1),h.flip=v,c.coordorigin=r*-m+p+i*-g,l||o.fillsize){var b=c.getElementsByTagName(f);b=b&&b[0],c.removeChild(b),l&&(y=T(s,u.x(l[0],l[1]),u.y(l[0],l[1])),b.position=y.dx*d+p+y.dy*d),o.fillsize&&(b.size=o.fillsize[0]*a(t)+p+o.fillsize[1]*a(n)),c.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 C=function(e,n,r){for(var i=t(n).toLowerCase().split("-"),s=r?"end":"start",o=i.length,u="classic",a="medium",f="medium";o--;)switch(i[o]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":u=i[o];break;case"wide":case"narrow":f=i[o];break;case"long":case"short":a=i[o]}var l=e.node.getElementsByTagName("stroke")[0];l[s+"arrow"]=u,l[s+"arrowlength"]=a,l[s+"arrowwidth"]=f},k=function(i,a){i.attrs=i.attrs||{};var c=i.node,h=i.attrs,v=c.style,m=E[i.type]&&(a.x!=h.x||a.y!=h.y||a.width!=h.width||a.height!=h.height||a.cx!=h.cx||a.cy!=h.cy||a.rx!=h.rx||a.ry!=h.ry||a.r!=h.r),g=S[i.type]&&(h.cx!=a.cx||h.cy!=a.cy||h.r!=a.r||h.rx!=a.rx||h.ry!=a.ry),y=i;for(var b in a)a[e](b)&&(h[b]=a[b]);if(m&&(h.path=n._getPath[i.type](i),i._.dirty=1),a.href&&(c.href=a.href),a.title&&(c.title=a.title),a.target&&(c.target=a.target),a.cursor&&(v.cursor=a.cursor),"blur"in a&&i.blur(a.blur),(a.path&&"path"==i.type||m)&&(c.path=x(~t(h.path).toLowerCase().indexOf("r")?n._pathToAbsolute(h.path):h.path),"image"==i.type&&(i._.fillpos=[h.x,h.y],i._.fillsize=[h.width,h.height],N(i,1,1,0,0,0))),"transform"in a&&i.transform(a.transform),g){var T=+h.cx,k=+h.cy,A=+h.rx||+h.r||0,O=+h.ry||+h.r||0;c.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",s((T-A)*w),s((k-O)*w),s((T+A)*w),s((k+O)*w),s(T*w)),i._.dirty=1}if("clip-rect"in a){var _=t(a["clip-rect"]).split(l);if(4==_.length){_[2]=+_[2]+ +_[0],_[3]=+_[3]+ +_[1];var D=c.clipRect||n._g.doc.createElement("div"),P=D.style;P.clip=n.format("rect({1}px {2}px {3}px {0}px)",_),c.clipRect||(P.position="absolute",P.top=0,P.left=0,P.width=i.paper.width+"px",P.height=i.paper.height+"px",c.parentNode.insertBefore(D,c),D.appendChild(c),c.clipRect=D)}a["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(i.textpath){var H=i.textpath.style;a.font&&(H.font=a.font),a["font-family"]&&(H.fontFamily='"'+a["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),a["font-size"]&&(H.fontSize=a["font-size"]),a["font-weight"]&&(H.fontWeight=a["font-weight"]),a["font-style"]&&(H.fontStyle=a["font-style"])}if("arrow-start"in a&&C(y,a["arrow-start"]),"arrow-end"in a&&C(y,a["arrow-end"],1),null!=a.opacity||null!=a["stroke-width"]||null!=a.fill||null!=a.src||null!=a.stroke||null!=a["stroke-width"]||null!=a["stroke-opacity"]||null!=a["fill-opacity"]||null!=a["stroke-dasharray"]||null!=a["stroke-miterlimit"]||null!=a["stroke-linejoin"]||null!=a["stroke-linecap"]){var B=c.getElementsByTagName(f),j=!1;if(B=B&&B[0],!B&&(j=B=M(f)),"image"==i.type&&a.src&&(B.src=a.src),a.fill&&(B.on=!0),(null==B.on||"none"==a.fill||null===a.fill)&&(B.on=!1),B.on&&a.fill){var F=t(a.fill).match(n._ISURL);if(F){B.parentNode==c&&c.removeChild(B),B.rotate=!0,B.src=F[1],B.type="tile";var I=i.getBBox(1);B.position=I.x+p+I.y,i._.fillpos=[I.x,I.y],n._preload(F[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else B.color=n.getRGB(a.fill).hex,B.src=d,B.type="solid",n.getRGB(a.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=t(a.fill).charAt())&&L(y,a.fill,B)&&(h.fill="none",h.gradient=a.fill,B.rotate=!1)}if("fill-opacity"in a||"opacity"in a){var q=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+n.getRGB(a.fill).o+1||2)-1);q=u(o(q,0),1),B.opacity=q,B.src&&(B.color="none")}c.appendChild(B);var R=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],U=!1;!R&&(U=R=M("stroke")),(a.stroke&&"none"!=a.stroke||a["stroke-width"]||null!=a["stroke-opacity"]||a["stroke-dasharray"]||a["stroke-miterlimit"]||a["stroke-linejoin"]||a["stroke-linecap"])&&(R.on=!0),("none"==a.stroke||null===a.stroke||null==R.on||0==a.stroke||0==a["stroke-width"])&&(R.on=!1);var z=n.getRGB(a.stroke);R.on&&a.stroke&&(R.color=z.hex),q=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+z.o+1||2)-1);var W=.75*(r(a["stroke-width"])||1);if(q=u(o(q,0),1),null==a["stroke-width"]&&(W=h["stroke-width"]),a["stroke-width"]&&(R.weight=W),W&&1>W&&(q*=W)&&(R.weight=1),R.opacity=q,a["stroke-linejoin"]&&(R.joinstyle=a["stroke-linejoin"]||"miter"),R.miterlimit=a["stroke-miterlimit"]||8,a["stroke-linecap"]&&(R.endcap="butt"==a["stroke-linecap"]?"flat":"square"==a["stroke-linecap"]?"square":"round"),a["stroke-dasharray"]){var X={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=X[e](a["stroke-dasharray"])?X[a["stroke-dasharray"]]:d}U&&c.appendChild(R)}if("text"==y.type){y.paper.canvas.style.display=d;var V=y.paper.span,$=100,J=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);v=V.style,h.font&&(v.font=h.font),h["font-family"]&&(v.fontFamily=h["font-family"]),h["font-weight"]&&(v.fontWeight=h["font-weight"]),h["font-style"]&&(v.fontStyle=h["font-style"]),J=r(h["font-size"]||J&&J[0])||10,v.fontSize=J*$+"px",y.textpath.string&&(V.innerHTML=t(y.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var K=V.getBoundingClientRect();y.W=h.w=(K.right-K.left)/$,y.H=h.h=(K.bottom-K.top)/$,y.X=h.x,y.Y=h.y+y.H/2,("x"in a||"y"in a)&&(y.path.v=n.format("m{0},{1}l{2},{1}",s(h.x*w),s(h.y*w),s(h.x*w)+1));for(var Q=["x","y","text","font","font-family","font-weight","font-style","font-size"],G=0,Y=Q.length;Y>G;G++)if(Q[G]in a){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}},L=function(e,s,o){e.attrs=e.attrs||{};var u=(e.attrs,Math.pow),a="linear",f=".5 .5";if(e.attrs.gradient=s,s=t(s).replace(n._radial_gradient,function(e,t,n){return a="radial",t&&n&&(t=r(t),n=r(n),u(t-.5,2)+u(n-.5,2)>.25&&(n=i.sqrt(.25-u(t-.5,2))*(2*(n>.5)-1)+.5),f=t+p+n),d}),s=s.split(/\s*\-\s*/),"linear"==a){var l=s.shift();if(l=-r(l),isNaN(l))return null}var c=n._parseDots(s);if(!c)return null;if(e=e.shape||e.node,c.length){e.removeChild(o),o.on=!0,o.method="none",o.color=c[0].color,o.color2=c[c.length-1].color;for(var h=[],v=0,m=c.length;m>v;v++)c[v].offset&&h.push(c[v].offset+p+c[v].color);o.colors=h.length?h.join():"0% "+o.color,"radial"==a?(o.type="gradientTitle",o.focus="100%",o.focussize="0 0",o.focusposition=f,o.angle=0):(o.type="gradient",o.angle=(270-l)%360),e.appendChild(o)}return 1},A=function(e,t){this[0]=this.node=e,e.raphael=!0,this.id=n._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=t,this.matrix=n.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!t.bottom&&(t.bottom=this),this.prev=t.top,t.top&&(t.top.next=this),t.top=this,this.next=null},O=n.el;A.prototype=O,O.constructor=A,O.transform=function(e){if(null==e)return this._.transform;var r,i=this.paper._viewBoxShift,s=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d;i&&(r=e=t(e).replace(/\.{3}|\u2026/g,this._.transform||d)),n._extractTransform(this,s+e);var o,u=this.matrix.clone(),a=this.skew,f=this.node,l=~t(this.attrs.fill).indexOf("-"),c=!t(this.attrs.fill).indexOf("url(");if(u.translate(-0.5,-0.5),c||l||"image"==this.type)if(a.matrix="1 0 0 1",a.offset="0 0",o=u.split(),l&&o.noRotation||!o.isSimple){f.style.filter=u.toFilter();var h=this.getBBox(),v=this.getBBox(1),m=h.x-v.x,g=h.y-v.y;f.coordorigin=m*-w+p+g*-w,N(this,1,1,m,g,0)}else f.style.filter=d,N(this,o.scalex,o.scaley,o.dx,o.dy,o.rotate);else f.style.filter=d,a.matrix=t(u),a.offset=u.offset();return r&&(this._.transform=r),this},O.rotate=function(e,n,i){if(this.removed)return this;if(null!=e){if(e=t(e).split(l),e.length-1&&(n=r(e[1]),i=r(e[2])),e=r(e[0]),null==i&&(n=i),null==n||null==i){var s=this.getBBox(1);n=s.x+s.width/2,i=s.y+s.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",e,n,i]])),this}},O.translate=function(e,n){return this.removed?this:(e=t(e).split(l),e.length-1&&(n=r(e[1])),e=r(e[0])||0,n=+n||0,this._.bbox&&(this._.bbox.x+=e,this._.bbox.y+=n),this.transform(this._.transform.concat([["t",e,n]])),this)},O.scale=function(e,n,i,s){if(this.removed)return this;if(e=t(e).split(l),e.length-1&&(n=r(e[1]),i=r(e[2]),s=r(e[3]),isNaN(i)&&(i=null),isNaN(s)&&(s=null)),e=r(e[0]),null==n&&(n=e),null==s&&(i=s),null==i||null==s)var o=this.getBBox(1);return i=null==i?o.x+o.width/2:i,s=null==s?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,n,i,s]])),this._.dirtyT=1,this},O.hide=function(){return!this.removed&&(this.node.style.display="none"),this},O.show=function(){return!this.removed&&(this.node.style.display=d),this},O._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}},O.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 e in this)this[e]="function"==typeof this[e]?n._removedFactory(e):null;this.removed=!0}},O.attr=function(t,r){if(this.removed)return this;if(null==t){var i={};for(var s in this.attrs)this.attrs[e](s)&&(i[s]=this.attrs[s]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==r&&n.is(t,"string")){if(t==f&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var o=t.split(l),u={},a=0,h=o.length;h>a;a++)t=o[a],u[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return h-1?u:u[o[0]]}if(this.attrs&&null==r&&n.is(t,"array")){for(u={},a=0,h=t.length;h>a;a++)u[t[a]]=this.attr(t[a]);return u}var p;null!=r&&(p={},p[t]=r),null==r&&n.is(t,"object")&&(p=t);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&p[e](d)&&n.is(this.paper.customAttributes[d],"function")){var v=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var m in v)v[e](m)&&(p[m]=v[m])}p.text&&"text"==this.type&&(this.textpath.string=p.text),k(this,p)}return this},O.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this},O.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)},O.insertAfter=function(e){return this.removed?this:(e.constructor==n.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),n._insertafter(this,e,this.paper),this)},O.insertBefore=function(e){return this.removed?this:(e.constructor==n.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),n._insertbefore(this,e,this.paper),this)},O.blur=function(e){var t=this.node.runtimeStyle,r=t.filter;return r=r.replace(g,d),0!==+e?(this.attrs.blur=e,t.filter=r+p+h+".Blur(pixelradius="+(+e||1.5)+")",t.margin=n.format("-{0}px 0 0 -{0}px",s(+e||1.5))):(t.filter=r,t.margin=0,delete this.attrs.blur),this},n._engine.path=function(e,t){var n=M("shape");n.style.cssText=b,n.coordsize=w+p+w,n.coordorigin=t.coordorigin;var r=new A(n,t),i={fill:"none",stroke:"#000"};e&&(i.path=e),r.type="path",r.path=[],r.Path=d,k(r,i),t.canvas.appendChild(n);var s=M("skew");return s.on=!0,n.appendChild(s),r.skew=s,r.transform(d),r},n._engine.rect=function(e,t,r,i,s,o){var u=n._rectPath(t,r,i,s,o),a=e.path(u),f=a.attrs;return a.X=f.x=t,a.Y=f.y=r,a.W=f.width=i,a.H=f.height=s,f.r=o,f.path=u,a.type="rect",a},n._engine.ellipse=function(e,t,n,r,i){var s=e.path();return s.attrs,s.X=t-r,s.Y=n-i,s.W=2*r,s.H=2*i,s.type="ellipse",k(s,{cx:t,cy:n,rx:r,ry:i}),s},n._engine.circle=function(e,t,n,r){var i=e.path();return i.attrs,i.X=t-r,i.Y=n-r,i.W=i.H=2*r,i.type="circle",k(i,{cx:t,cy:n,r:r}),i},n._engine.image=function(e,t,r,i,s,o){var u=n._rectPath(r,i,s,o),a=e.path(u).attr({stroke:"none"}),l=a.attrs,c=a.node,h=c.getElementsByTagName(f)[0];return l.src=t,a.X=l.x=r,a.Y=l.y=i,a.W=l.width=s,a.H=l.height=o,l.path=u,a.type="image",h.parentNode==c&&c.removeChild(h),h.rotate=!0,h.src=t,h.type="tile",a._.fillpos=[r,i],a._.fillsize=[s,o],c.appendChild(h),N(a,1,1,0,0,0),a},n._engine.text=function(e,r,i,o){var u=M("shape"),a=M("path"),f=M("textpath");r=r||0,i=i||0,o=o||"",a.v=n.format("m{0},{1}l{2},{1}",s(r*w),s(i*w),s(r*w)+1),a.textpathok=!0,f.string=t(o),f.on=!0,u.style.cssText=b,u.coordsize=w+p+w,u.coordorigin="0 0";var l=new A(u,e),c={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:o};l.shape=u,l.path=a,l.textpath=f,l.type="text",l.attrs.text=t(o),l.attrs.x=r,l.attrs.y=i,l.attrs.w=1,l.attrs.h=1,k(l,c),u.appendChild(f),u.appendChild(a),e.canvas.appendChild(u);var h=M("skew");return h.on=!0,u.appendChild(h),l.skew=h,l.transform(d),l},n._engine.setSize=function(e,t){var r=this.canvas.style;return this.width=e,this.height=t,e==+e&&(e+="px"),t==+t&&(t+="px"),r.width=e,r.height=t,r.clip="rect(0 "+e+" "+t+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this},n._engine.setViewBox=function(e,t,r,i,s){n.eve("raphael.setViewBox",this,this._viewBox,[e,t,r,i,s]);var u,a,f=this.width,l=this.height,c=1/o(r/f,i/l);return s&&(u=l/i,a=f/r,f>r*u&&(e-=(f-r*u)/2/u),l>i*a&&(t-=(l-i*a)/2/a)),this._viewBox=[e,t,r,i,!!s],this._viewBoxShift={dx:-e,dy:-t,scale:c},this.forEach(function(e){e.transform("...")}),this};var M;n._engine.initWin=function(e){var t=e.document;t.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!t.namespaces.rvml&&t.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),M=function(e){return t.createElement("<rvml:"+e+' class="rvml">')}}catch(n){M=function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},n._engine.initWin(n._g.win),n._engine.create=function(){var e=n._getContainer.apply(0,arguments),t=e.container,r=e.height,i=e.width,s=e.x,o=e.y;if(!t)throw Error("VML container not found.");var u=new n._Paper,a=u.canvas=n._g.doc.createElement("div"),f=a.style;return s=s||0,o=o||0,i=i||512,r=r||342,u.width=i,u.height=r,i==+i&&(i+="px"),r==+r&&(r+="px"),u.coordsize=1e3*w+p+1e3*w,u.coordorigin="0 0",u.span=n._g.doc.createElement("span"),u.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",a.appendChild(u.span),f.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,r),1==t?(n._g.doc.body.appendChild(a),f.left=s+"px",f.top=o+"px",f.position="absolute"):t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),u.renderfix=function(){},u},n.prototype.clear=function(){n.eve("raphael.clear",this),this.canvas.innerHTML=d,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 e in this)this[e]="function"==typeof this[e]?n._removedFactory(e):null;return!0};var _=n.st;for(var D in O)O[e](D)&&!_[e](D)&&(_[D]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(D))}}(),k.was?C.win.Raphael=n:Raphael=n,n});var capillary={};typeof module=="object"&&typeof require=="function"&&(module.exports={branch:require("./capillary/branch"),graph:require("./capillary/graph")});var capillary=this.capillary||{};(function(){function e(e){this.commits=e.slice(0)}capillary.branch=e.prototype={create:function(t){return new e(t)},fromArray:function(e){if(!e)return[];var t=[],n;for(var r=0,i=e.length;r<i;++r)n=capillary.branch.create(e[r]),n.id=n.id||r,t.push(n);return t},fromJSON:function(e){try{return this.fromArray(JSON.parse(e))}catch(t){return[]}}}})(),typeof module=="object"&&typeof require=="function"&&(module.exports=capillary.branch);var capillary=this.capillary||{},isCommonJS=typeof module=="object"&&typeof require=="function";if(isCommonJS)var bane=require("bane");(function(){function e(e){var t=0,n,r,i,s,o;for(n=0,r=e.length;n<r;++n){o=e[n].commits;for(i=0,s=o.length;i<s;++i)t=Math.max(t,o[i].seqId)}return t}function t(e){return e&&e.parentIds||[]}function n(){this.positions={},this.availableColumns=[],this.columnsClosedUntil=[],this.branchColumns={},this.maxY=0,this.lastPosInCol=[],this.lastPosInRow=[]}capillary.graph=n.prototype=bane.createEventEmitter({branchCount:0,create:function(){return new n},graphBranches:function(n){this.holdTheDots=!0;var r=[],i;this.maxY=e(n),t(n[0].commits[0]).length>0&&(this.maxY+=1);for(var s=0,o=n.length;s<o;++s)this.graphBranch(n[s]),i=n[s].commits,r.push(i[i.length-1]);this.emitDots(),this.emitCommits(),this.holdTheDots=!1},graphBranch:function(e){this.emitLines(e);var n=e.commits[e.commits.length-1],r;t(n).length>0&&(this.positions[n.parentIds[0]]||(r=this.positions[n.id],this.emitPath(r,[r[0],this.maxY],e))),this.holdTheDots||this.emitDots(),this.branchCount+=1},emitLines:function(e){var t,n,r,i=e.commits;for(var s=0,o=i.length;s<o;++s){n=t,t=this.commitPosition(i[s]),r||(r=n||t);if(!n)continue;this.isMerge(r,t)&&(this.drawMergePath(r,t,e),r=t),this.isMergeBase(r,t)&&(this.drawMergeBasePath(r,t,e),r=t)}return this.emitPath(r,t,e),t},isMerge:function(e,t){return t[0]-e[0]>=1},drawMergePath:function(e,t,n){var r=t[0]-e[0],i=t[1]-e[1];r>1&&(e=this.emitPath(e,[t[0]-1,e[1]],n)),e=this.emitPath(e,[t[0],e[1]+1],n),this.emitPath(e,t,n)},isMergeBase:function(e,t){return e[0]-t[0]>=1},drawMergeBasePath:function(e,t,n){var r=e[0]-t[0],i=t[1]-e[1];i>1&&(e=this.emitPath(e,[e[0],t[1]-1],n)),r>1&&(e=this.emitPath(e,[e[0]-1,t[1]],n)),this.emitPath(e,t,n)},emitPath:function(e,t,n){if(e[0]==t[0]&&e[1]==t[1])return;e[1]<t[1]&&e[0]==t[0]&&this.reserveColumn(t[0],t[1]),e[1]<t[1]&&e[0]>t[0]&&this.releaseColumn(e[0],t[1]),e[1]==t[1]&&e[0]>t[0],e[1]<t[1]&&e[0]<t[0]&&this.reserveColumn(t[0],t[1]);for(var r=e[1];r<=t[1];++r)this.markLastPositionInRow(r,e[0]);return this.emit("graph:line",[e,t],n),t},markLastPositionInRow:function(e,t){this.lastPosInRow[e]=Math.max(t,this.lastPosInRow[e]||0)},commitPosition:function(e){var t=this.positions[e.id];if(!t){var n=e.seqId,r=this.branchColumn(this.branchCount,n);t=[r,n],t.branch={id:this.branchCount},t.commit=e,this.positions[e.id]=t,this.maxY=Math.max(this.maxY,t[1]),this.lastPosInCol[t[0]]=t[1],this.markLastPositionInRow(t[1],t[0])}return t},branchColumn:function(e,t){var n=this.branchColumns[e],r=n;return typeof n!="number"&&(n=this.nextFreeColumnFromRow(t),this.branchColumns[e]=n),n},nextFreeColumnFromRow:function(e){for(var t=0,n=this.availableColumns.length;t<n;++t)if(this.availableColumns[t]>0&&this.availableColumns[t]<e)return t;return this.releaseColumn(this.availableColumns.length,e)},emitDots:function(){var e;for(var t in this.positions)e=this.positions[t],this.emit("graph:dot",[e[0],e[1]],e.commit,e.branch)},emitCommits:function(e){var t,n;for(var r in this.positions)t=this.positions[r],n=[this.lastPosInRow[t[1]]+1,t[1]],this.emit("graph:commit",t.commit,n)},reserveColumn:function(e,t){return this.columnsClosedUntil[e]=t,this.availableColumns[e]=-1,e},releaseColumn:function(e,t){var n=this.columnsClosedUntil[e];if(n&&n>=t)return;return this.availableColumns[e]=t,e},extendUnclosedLinesBeyondGraphStart:function(){for(var e=0,t=this.availableColumns.length;e<t;++e)this.availableColumns[e]<=0&&this.emitPath([e,this.lastPosInCol[e]],[e,this.maxY+1])}}),isCommonJS&&(module.exports=capillary.graph)})();var capillary=this.capillary||{};capillary.formatters=capillary.formatters||{};if(typeof module=="object"&&typeof require=="function")var bane=require("bane");(function(){function e(e){if(typeof e.scale=="number"||typeof e.scale=="string")this.scale=Number(e.scale);this.offset=e.offset||{}}capillary.formatters.scale=e.prototype=bane.createEventEmitter({scale:1,bindGraph:function(t,n){var r=new e(n||{});return t.bind(r,["graph:dot","graph:line","graph:commit"])},"graph:dot":function(e,t,n){this.emit("graph:dot",this.scalePoint(e),t,n)},"graph:line":function(e,t){this.emit("graph:line",[this.scalePoint(e[0]),this.scalePoint(e[1])],t)},"graph:commit":function(e,t){this.emit("graph:commit",e,this.scalePoint(t))},scalePoint:function(e){return[(this.offset.x||0)+e[0]*this.scale,(this.offset.y||0)+e[1]*this.scale]}})})(),typeof module=="object"&&typeof require=="function"&&(module.exports=capillary.formatters.scale);var capillary=this.capillary||{};capillary.formatters=capillary.formatters||{};if(typeof module=="object"&&typeof require=="function")var bane=require("bane");(function(){function e(){this.data=[]}capillary.formatters.svgData=e.prototype=bane.createEventEmitter({bindGraph:function(t){return t.bind(new e,["graph:dot","graph:line"])},"graph:dot":function(e,t,n){var r={type:"circle",cx:e[0],cy:e[1],branch:(n||{}).id};this.data.push(r),this.emit("graph:dot",r,t,n)},"graph:line":function(e,t){var n={type:"path",path:"M"+e[0][0]+" "+e[0][1]+"L"+e[1][0]+" "+e[1][1]};this.data.push(n),this.emit("graph:line",n,t)}})})(),typeof module=="object"&&typeof require=="function"&&(module.exports=capillary.formatters.svgData);var capillary=this.capillary||{};capillary.formatters=capillary.formatters||{},function(){function e(e){this.dotRadius=e.dotRadius||5,this.canvas=e.canvas,this.dotColors=e.dotColors,this.lineColors=e.lineColors||["#aaa"],this.positions={}}capillary.formatters.raphael=e.prototype={bindGraph:function(t,n){var r=new e(n||{});return t.bind(r,["graph:dot","graph:line"])},"graph:dot":function(e,t,n){if(this.isMergeCommit(e.cx,e.cy))return;var r=this.drawCircleAt(e.cx,e.cy);if(this.dotColors&&typeof n.id=="number"){var i=this.dotColors[n.id%this.dotColors.length];r.attr({fill:i,stroke:i})}},"graph:line":function(e,t){var n=this.canvas.path(e.path);n.attr({stroke:this.lineColors[t.id%this.lineColors.length]})},isMergeCommit:function(e,t){return!!this.positions[e+","+t]},drawCircleAt:function(e,t){return this.positions[e+","+t]=!0,this.canvas.circle(e,t,this.dotRadius)}}}(),typeof module=="object"&&typeof require=="function"&&(module.exports=capillary.formatters.raphael);var capillary=this.capillary||{};capillary.formatters=capillary.formatters||{};if(typeof module=="object"&&typeof require=="function")var bane=require("bane");(function(){function e(e,t,n){var r="ref-name ref-type-"+n;if(t){var i=t.replace("{{id}}",e);return'<a class="'+r+'" href="'+i+'">'+e+"</a> "}return'<span class="'+r+'">'+e+"</span> "}function t(t,n){var r=t.renderRefTypes||[],i=n.refs||{},s="",o=t.refUrl||t.idUrl,u,a,f,l,c,h,p;for(u=0,a=r.length;u<a;++u){c=i[r[u]]||[];if(c.length==0)continue;p=r[u].replace(/s$/,"");for(f=0,l=c.length;f<l;++f)s+=e(c[f],o,p)}return s}function n(e,t){var n=t.id.slice(0,7);if(!e.idUrl)return n;var r=e.idUrl.replace("{{id}}",t.id);return'<a class="id" href="'+r+'">'+n+"</a>"}function r(e,t){if(!e.messageUrl)return t.message;var n=e.messageUrl.replace("{{id}}",t.id);return'<a class="msg" href="'+n+'">'+t.message+"</a>"}function i(e){this.root=e.root,this.idUrl=e.idUrl,this.messageUrl=e.messageUrl,this.offset=e.offset||[0,0],this.renderRefTypes=e.renderRefTypes||["tags","heads"]}capillary.formatters.messageMarkup=i.prototype=bane.createEventEmitter({bindGraph:function(
|
12
|
-
e,t){return e.bind(new i(t||{}),["graph:commit"])},"graph:commit":function(e,i){var s=document.createElement("li");s.style.position="absolute",s.style.left=i[0]+this.offset[0]+"px",s.style.top=i[1]+this.offset[1]+"px",s.innerHTML=t(this,e)+n(this,e)+" "+r(this,e),this.root.appendChild(s)}})})(),typeof module=="object"&&typeof require=="function"&&(module.exports=capillary.formatters.messageMarkup),this.gts=this.gts||{},this.gts.capillary=function(e,t,n,r){dome.cn.rm("loading",e),e.innerHTML="",e.style.position="relative";var i=25,s,o,u,a,f=0,l={};for(s=0,a=t.length;s<a;++s)for(o=0,u=t[s].length;o<u;++o)l[t[s][o].id]||(f+=1,l[t[s][o].id]=!0);var c=capillary.formatters,h=capillary.graph.create(),p=new Raphael(e,(t.length+1)*i,f*i),d=6,v=["#3d4250","#5ea861","#d36c6d","#5b82d2","#ccc62e","#d28e23","#917549","#9198aa","#5bbad2","#65ccab","#92de2f","#8a2c2c","#855bd2","#c157c8"],m=c.scale.bindGraph(h,{scale:i,offset:{x:30,y:10}});c.raphael.bindGraph(c.svgData.bindGraph(m),{dotRadius:d,canvas:p,dotColors:v}),c.messageMarkup.bindGraph(m,{offset:[0,-(d+2)],root:e,idUrl:r,messageUrl:n}),h.graphBranches(capillary.branch.fromArray(t))},gts.app.data("capillary-data",this.gts.jsonRequest,{depends:["capillary-url"]}),gts.app.feature("capillary",gts.capillary,{elements:["capillary-graph"],depends:["capillary-data","capillary-message-url","capillary-id-url"]});
|
@@ -1 +0,0 @@
|
|
1
|
-
.prettyprint{background-color:#f7f7f9;border:1px solid #e1e1e8;padding:8px}.gts-file .prettyprint{background:#fefefe}.prettyprint.linenums{box-shadow:47px 0 0 #fbfbfc inset,48px 0 0 #ececf0 inset}ol.linenums{margin:0 0 0 40px}ol.linenums li{color:#bebec5;line-height:18px;padding-left:12px;text-shadow:0 1px 0 #fff}.linenums .line{display:block;min-height:18px}.c,.cm,.c1,.cs{color:#93a1a1}.k,.kc,.kd,.kn,.kr,.kp,.nb,.sx,.bp{color:#1e347b}.nc,.nn,.nf,.no{color:#dc322f}.s,.sb,.sc,.sd,.s2,.sh,.s1,.se,.si{color:#d14}.nt,.m,.mf,.mh,.mi,.mo,.il,.vi,.ow,.na,.n,.nx,.p,.line{color:#48484c}.vc,.vg,.nv{color:#a74e4c}.ss,.sr,.cp{color:#bc7a00}.sd{font-style:italic}.vi,.k,.kc,.kd,.kn,.kr,.nt,.nc,.nn,.no,.nb,.nf,.ow,.si{font-weight:bold}.html-erb .cp{color:#48484c}.common-lisp .nv{color:#48484c}.hll{background-color:#ffc}.err{border:1px solid #f00}.o{color:#666}.gd{color:#a00000}.ge{font-style:italic}.gr{color:#f00}.gh{color:#000080;font-weight:bold}.gi{color:#00a000}.go{color:#888}.gp{color:#000080;font-weight:bold}.gs{font-weight:bold}.gu{color:#800080;font-weight:bold}.gt{color:#04d}.kt{color:#b00040}.nd{color:#a2f}.ni{color:#999;font-weight:bold}.ne{color:#d2413a;font-weight:bold}.nl{color:#a0a000}.w{color:#bbb}ol.linenums li.region .line{background:#ffd}ol.linenums li.focus{color:#48484e;border-right:1px solid #e1e1e8}.linenums li.region .line,ol.linenums li.focus .line{background:#ffc;margin-left:-60px;padding-left:60px;margin-right:-8px;padding-right:8px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{max-width:940px}body h1{margin-bottom:.25em}.collapse{max-height:0;-webkit-transition:max-height 1.35s ease;-moz-transition:max-height 1.35s ease;-ms-transition:max-height 1.35s ease;-o-transition:max-height 1.35s ease;transition:max-height 1.35s ease}.collapse.in{max-height:2000px}.span8 .input-xxlarge{width:95%}body .gts-masthead{margin-bottom:0}.gts-masthead .navbar-inner{border-radius:0;background-image:-moz-linear-gradient(center top,#201e1e,#222);background-color:#201e1e}.gts-masthead .container{padding-bottom:8px;padding-top:20px}.gts-logo{float:left;margin:-4px 20px 6px 0}.gts-masthead .navbar-inner .btn-group{padding-right:0}.gts-site-header{background:#f5f5f5;border-bottom:1px solid #ddd;margin-bottom:20px;padding:20px 0 0}.gts-clone-source{margin-left:30px}tt{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.gts-private .gts-site-header{background:url(../images/f5f5f5-980x1.png?jcb=1349199357) repeat-y 50% 0 #222;border-bottom:0}.gts-new-repo{padding-bottom:40px}.gts-site-header+.footer{margin-top:-21px}.gts-notification{background:#fff;border-bottom:1px solid #ddd;padding:20px 0 0}.gts-site-header .nav-tabs{margin-bottom:-1px}.nav-tabs .dropdown-menu{margin-top:-1px}.dropdown-label{border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;margin-top:-5px;overflow:hidden}.dropdown-label strong{background:#f5f5f5;border-bottom:1px solid #ccc;border-top:1px solid #ccc;display:block;padding:3px 15px}li+.dropdown-label{border-radius:0;margin-top:12px}.dropdown-toggle em{font-style:normal;color:#48484c}.open .dropdown-toggle em{color:#000}.gts-site-header .row,.gts-description{margin-bottom:10px}.gts-site-header .gts-help{clear:both;margin-bottom:0}.gts-site-header .gts-branch-selector+.gts-branch-selector{padding-left:0}.gts-branch-selector .disabled{color:#999}.gts-branch-selector{margin:0 12px 12px 0;position:relative;z-index:1}.gts-browser .gts-branch-selector{margin-top:8px}.gts-file{margin-bottom:12px}.gts-file h1{margin:12px 0}.gts-download{padding-right:12px}.gts-file .breadcrumb{margin:0 0 -2px;position:relative}.gts-inline{display:inline-block;line-height:1;padding-right:12px;vertical-align:middle}.gts-markup{font-size:1.1em;line-height:1.5}.gts-markup h1{margin-top:1em}.gts-markup h1,.gts-markup h2,.gts-markup h3,.gts-markup h4,.gts-markup h5,.gts-markup h6{margin-bottom:.25em}.gts-markup p,.gts-markup ul,.gts-markup ol,.gts-markup pre{margin-bottom:1em}.prettyprint ol.linenums{margin-bottom:0}.table td ul{margin-left:15px}.gts-blob-view{margin-right:12px;margin-top:8px;min-height:21px;position:relative;z-index:1}ul.gts-blob-view li{display:inline-block;padding:0 6px}.gts-tree-explorer{display:inline-table;position:relative;top:-8px}.gts-branch-selector+.gts-tree-explorer{display:inline-table;position:relative;top:-38px}.gts-tree-explorer .gts-col-commit,.gts-cell-big{width:80%}.gts-tree-explorer .icon{padding-right:6px}.gts-tree-explorer .gts-name{white-space:nowrap}.gts-tree-explorer .gts-commit-oid{padding-right:0}.gts-private{background:url(../images/white-980x1.png?jcb=1349199357) repeat-y 50% 0 #222}.gts-private .gts-site-header .container{background-image:url(../iconic/lock_stroke.svg?jcb=1349199357);background-repeat:no-repeat;background-position:100% 0}.gts-repo-url{position:relative;z-index:1}.gts-repo-url .url{display:none}input[type=url].gts-current-repo-url{float:left;left:-2px;padding-left:6px;position:relative;z-index:0}.gts-repo-urls button.gts-repo-url-help{float:right;margin-left:-4px}.gts-body{margin-bottom:35px}.gts-date-heading{background-color:#f7f7f9;border-bottom:1px solid #e1e1e8;clear:both;font-weight:bold}.gts-date-heading-inner{background-color:#f7f7f9;border-bottom:1px solid #fff;color:#333;display:block;padding:4px 8px;text-shadow:0 1px 0 #fff}.gts-avatar{margin:0 6px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.gts-comment-summary{color:#48484c;padding-left:10px}.gts-log-message{font-size:1.2em}.gts-commit{padding:6px 6px 8px}.gts-commit+.gts-commit{border-top:1px solid #e1e1e8;padding-top:12px}.gts-commit .gts-avatar{margin-left:0}.gts-commit-linker .gts-commit-oid{color:#08c;cursor:pointer}.gts-commit-linker .gts-commit-oid:hover{color:#005580;text-decoration:underline}.footer{border-top:1px solid #e5e5e5;margin-top:45px}.footer .container{padding:20px 0}.gts-private .footer{border-color:#222}.gts-footer-blurb{border-top:1px solid #f5f5f5;margin-top:12px;padding-top:12px}.capillary p{white-space:normal}.capillary li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.capillary .ref-name{background:#ddd;color:#4e4e4e;border-radius:4px;display:inline-block;margin:0 5px 0 0;padding:0 5px}.capillary .ref-type-tag{background:#eeb}.capillary a.ref-name:hover{text-decoration:underline}.capillary li .msg{color:#48484c}.capillary li a:hover{text-decoration:underline}.capillary{margin-left:-10px}.gts-code-listing{border:1px solid #e1e1e8;position:relative;top:-5px;width:100%}.gts-code-listing tr:first-child td{padding-top:6px}.gts-code-listing tr:last-child td{padding-bottom:6px}.gts-code-listing td{padding:0;vertical-align:top}.gts-code-listing .gts-code{background:#fefefe}.gts-code-listing code{background:transparent;border:0;color:#48484c;display:block;line-height:18px;min-height:18px;padding:0 0 0 12px;white-space:pre-wrap}.gts-code-listing .linenum{background-color:#f7f7f9;border:1px solid #e1e1e8;color:#bebec5;padding:0 12px;text-align:right;text-shadow:0 1px 0 #fff;width:10px}.gts-code-listing .gts-commit-oid{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.gts-code-listing .gts-annotated{border-top:1px solid #e1e1e8}.gts-code-listing .gts-blame-annotation{white-space:nowrap;background:#f0f0f0;padding-left:12px;padding-right:12px}.gts-code-listing .line{white-space:nowrap}.gts-code-listing .gts-diff-rm .gts-code{background:#fdd}.gts-code-listing del{background:#f2acad;text-decoration:none}.gts-neg,.gts-diff-summary .gts-diff-rm{color:#9d261d}.gts-code-listing .gts-diff-add .gts-code{background:#dfd}.gts-code-listing ins{background:#bafbad;text-decoration:none}.gts-pos,.gts-diff-summary .gts-diff-add{color:#46a546}.gts-diff-summary .gts-diff-rm,.gts-diff-summary .gts-diff-add{font-weight:bold}.gts-diffs h1{margin-bottom:18px}.gts-commit blockquote p{margin-bottom:12px}.gts-commit-sha1{float:left;font-size:13px;line-height:18px}.gts-commit-parent{float:right}.gts-commit h1{clear:both}.gts-side-by-side .gts-code{width:50%}.gts-commit-summary{margin-bottom:12px}.gts-comment{padding-top:8px;margin-bottom:12px}.gts-comment+.gts-comment{border-top:1px solid #e5e5e5}.gts-bordered-row{background:#f5f5f5;border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5;padding:8px}.form-horizontal div.gts-markdown-preview{margin:-12px 160px 24px}.gts-help .table{width:auto}.gts-item-author,.gts-item-status,.gts-item-age{white-space:nowrap}.form-horizontal legend+p{margin:-20px 0 27px}.gts-ref-input,input[type=text].gts-ref-input{border:0;border-radius:0;-moz-border-radius:0;box-shadow:0;display:inline;height:18px;margin:0;padding:1px 4px 3px;position:relative;top:0;width:10em}.gts-branch-selector .dropdown-menu{min-width:246px}.gts-dropdown-input{border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;margin-top:-5px;overflow:hidden}.gts-dropdown-input strong{background:#f5f5f5;border-bottom:1px solid #ccc;border-top:1px solid #ccc;display:block;padding:0 15px}.gts-dropdown-input+.dropdown-label{margin-top:-1px}.gts-commit-date,.table .gts-cell-small{white-space:nowrap}.table td.gts-commit-oid{width:1em}.gts-markup code{border:0;color:inherit;font-size:.9em;padding:2px}.gts-markup pre code{font-size:inherit}.gts-readme{background-color:#fff;border:1px solid #e3e3e3;border-radius:4px 4px 4px 4px;box-shadow:0 1px 1px rgba(0,0,0,0.05) inset;margin-bottom:20px;min-height:20px;padding:19px}.gts-readme .gts-page-header{background-color:#f5f5f5;border-radius:4px 0 0 4px;margin:-19px -19px 10px -19px;padding:10px 20px 10px 20px}.gts-placeholder{display:none}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
var cull=function(){"use strict";function e(e){return!!e&&"object"==typeof e&&"number"==typeof e.length&&!e.tagName}function n(e){return"[object Array]"===P.call(e)?e:"[object Arguments]"===P.call(e)?M.call(e):"undefined"==typeof e||null===e?[]:M.call(arguments)}function t(e,n){var t,r;for(t=0,r=n.length;r>t;++t)e(n[t],t,n);return n}function r(e){return"function"==typeof e}function o(e,n,t){var r,o=0,i=t,a=n;for(2===arguments.length&&(i=n,a=i[0],o=1),"string"==typeof i&&(i=i.split("")),r=i.length;r>o;++o)a=e(a,i[o]);return a}function i(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(!e(n[t]))return!1;return!0}function a(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e(n[t]))return!0;return!1}function u(e,n){var t,r,o,i;for(t=0,r=n.length;r>t;++t)if(e(n[t])?o=!0:i=!0,o&&i)return!0;return!1}function s(e){return e.trim&&e.trim()||e.replace(/^\s+|\s+$/,"")}function c(e){return e}function l(e){return"undefined"!=typeof e&&null!==e}function f(e){return function(n){return e.call(this,n)}}function p(e){return function(n){return n[e]}}function d(e,t){return function(r){return r[e].apply(r,n(t))}}function h(e){return function(n){return e===n}}function m(e,t){var r=n(e);return function(){for(var e=r.length,n=arguments;e--;)n=[r[e].apply(t||this,n)];return n[0]}}function g(){var e=arguments;return function(n){return n.apply(this,e)}}function v(e){var n=M.call(arguments,1);return function(){return e.apply(this,n.concat(M.call(arguments)))}}function y(e,n){var t="string"==typeof n?e[n]:n,r=M.call(arguments,2);return function(){return t.apply(e,r.concat(M.call(arguments)))}}function w(n){var t,r,o=[];for(t=0,r=n.length;r>t;t++)o=o.concat(e(n[t])?w(n[t]):n[t]);return o}function b(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e===n[t])return t;return-1}function x(e){var n,t,r=[];for(n=0,t=e.length;t>n;++n)b(e[n],r)<0&&r.push(e[n]);return r}function E(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e(n[t]))return n[t]}function _(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;++t)e(n[t])&&o.push(n[t]);return o}function q(e,n){return _(function(e){return b(e,n)<0},e)}function C(e){var n,t=[];for(n in e)e.hasOwnProperty(n)&&t.push(n);return t}function A(e){var n,t=[];for(n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function S(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t++)o.push(e(n[t]));return o}function j(e){return function(){return!e.apply(this,arguments)}}function k(e,n){return _(j(e),n)}function N(e,t){return n(e).concat(n(t))}function T(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t+=e)o.push(n.slice(t,t+e));return o}function $(e,n){return I(S(e,I(n)))}function H(e,n){return o(N,S(e,n))}function L(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t+=1)o.push(n[t]),r-1>t&&o.push(e);return o}function z(e,n,t){var r=e[n];e[n]=function(){var e=r.apply(this,arguments),n=t.apply(this,[e].concat(M.call(arguments)));return"undefined"!=typeof n?n:e}}function O(e,n,t){var r=e[n];e[n]=function(){return t.apply(this,arguments),r.apply(this,arguments)}}function R(e,n,t){var r=v(t,e[n]);e[n]=function(){return r.apply(this,arguments)}}var M=Array.prototype.slice,P=Object.prototype.toString,I=v(_,l);return{trim:s,doall:t,reduce:o,all:i,some:a,onlySome:u,isFunction:r,isList:e,toList:n,identity:c,defined:l,unary:f,prop:p,func:d,eq:h,compose:m,callWith:g,partial:v,bind:y,keys:C,values:A,concat:N,flatten:w,uniq:x,first:E,select:_,negate:j,reject:k,seldef:I,map:S,mapdef:$,mapcat:H,partition:T,difference:q,interpose:L,indexOf:b,after:z,before:O,around:R}}(this);"function"==typeof require&&"undefined"!=typeof module&&(module.exports=cull);var dome=function(e){function n(t){if(e.isList(t))return e.flatten(e.map(n,t));for(var r=[],o=t.firstChild;o;)1===o.nodeType&&r.push(o),o=o.nextSibling;return r}function t(e){return document.getElementById(e)}function r(e,n){var t=n||document;if(t.getElementsByClassName)return t.getElementsByClassName(e);var r,o,i=t.getElementsByTagName("*"),a=[],u=new RegExp("(^|\\s)"+e+"(\\s|$)");for(r=0,o=i.length;o>r;++r)u.test(i[r].className)&&a.push(i[r]);return a}function o(e){e.parentNode.removeChild(e)}function i(e,n){e.parentNode&&(e.parentNode.insertBefore(n,e),e.parentNode.removeChild(e))}function a(e,n){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return t.test(n.className)}function u(n,t){return e.isList(t)?e.doall(e.partial(u,n),t):(a(n,t)||(t.className=e.trim(t.className+" "+n)),void 0)}function s(n,t){if(e.isList(t))return e.doall(e.partial(s,n),t);if(a(n,t)){var r=new RegExp("\\b"+n+"\\b","g");t.className=e.trim(t.className.replace(r,""))}}function c(e){var n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;var t="";for(e=e.firstChild;e;e=e.nextSibling)t+=c(e);return t}return 3===n||4===n?e.nodeValue:""}function l(n){var t=document.createDocumentFragment();return e.doall(e.bind(t,"appendChild"),e.toList(n)),t}function f(e){return e?("number"!=typeof e._dome_uuid&&(e._dome_uuid=w++),e._dome_uuid):null}function p(e,n){if(!n||!e)return!1;var t=f(e);if(b[t]||(b[t]={}),b[t][f(n)])return!0;for(var r=[];n&&n!==e;)r.push(f(n)),n=n.parentNode;for(var o=!!n,i=0,a=r.length;a>i;i++)b[t][r[i]]=o;return o}function d(e,n){var t;e=e||{};for(t in e)e.hasOwnProperty(t)&&(n.setAttribute("data-"+t,e[t]),n["data-"+t]=e[t])}function h(e,n){return n.getAttribute("data-"+e)}function m(e,n){var t,r;e=e||{};for(t in e)e.hasOwnProperty(t)&&(r=E[t],r?r(n,e[t]):n[t]=e[t])}function g(n,t){n=e.toList(n);var r,o;for(r=0,o=n.length;o>r;++r)"string"==typeof n[r]?t.appendChild(document.createTextNode(n[r])):t.appendChild(n[r])}function v(e,n){n.innerHTML="",g(e,n)}var y,w=0,b={},x=function(n){return null!==n&&"undefined"!=typeof n&&("undefined"!=typeof n.nodeType||"string"==typeof n||e.isList(n))},E={style:function(e,n){var t;for(t in n)n.hasOwnProperty(t)&&(e.style[t]=n[t])},data:function(e,n){d(n,e)}};return y=function(e,n,t){if(!t&&x(n))return y(e,{},n);var r=document.createElement(e);return m(n,r),g(t||[],r),r},y.toString=function(){return"dome.el()"},e.doall(function(n){y[n]=e.partial(y,n)},["a","br","div","fieldset","form","h2","h3","h4","h5","img","input","label","li","p","span","strong","textarea","ul","span","select","option","ol","iframe","table","tr","td","pre","button","i"]),{propmap:E,el:y,setProp:m,append:g,setContent:v,children:n,id:t,byClass:r,remove:o,replace:i,frag:l,text:c,data:{get:h,set:d},cn:{has:a,add:u,rm:s},uuid:f,contains:p}}(this.cull);!function(e,n){function t(e,n){return/^(?:function|object|unknown)$/.test(typeof e[n])}function r(e,n){return function(t){n.call(c[e],t||window.event)}}function o(e,n){return{handler:n,wrappedHandler:r(e,n)}}function i(e,n,t,r){a(n,t,function(n){e(n.target,t,n)&&r.call(n.target,n)})}var a,u,s=function(){if("undefined"!=typeof document.documentElement.uniqueID)return function(e){return e.uniqueID};var e=0;return function(n){return n.__uniqueID||(n.__uniqueID="uniqueID__"+e,e+=1),n.__uniqueID}}(),c={},l=document.documentElement;if(t(l,"addEventListener")&&t(l,"removeEventListener")&&t(window,"addEventListener")&&t(window,"removeEventListener"))a=function(e,n,t){return e.addEventListener(n,t,!1),{cancel:function(){u(e,n,t)}}},u=function(e,n,t){e.removeEventListener(n,t,!1)};else if(t(l,"attachEvent")&&t(l,"detachEvent")&&t(window,"attachEvent")&&t("detachEvent")){var f={};a=function(e,n,t){var r=s(e);c[r]=e,f[r]||(f[r]={}),f[r][n]||(f[r][n]=[]);var i=o(r,t);return f[r][n].push(i),e.attachEvent("on"+n,i.wrappedHandler),{cancel:function(){u(e,n,t)}}},u=function(n,t,r){var o=s(n);f[o]&&f[o][t]&&(f[o][t]=e.select(function(e){return e.handler!==r?!0:(n.detachEvent("on"+t,e.wrappedHandler),void 0)},f[o][t]))}}i.bycn=function(t,r,o,a){i(e.partial(n.cn.has,t),r,o,a)},dome.events={mouseenter:function(e,n){var t=null,r=a(e,"mouseover",function(r){t!==e&&(n.call(e,r),t=e)}),o=a(e,"mouseout",function(n){var r=n.relatedTarget||n.toElement;try{r&&!r.nodeName&&(r=r.parentNode)}catch(n){return}e===r||dome.contains(e,r)||(t=null)});return{cancel:function(){r.cancel(),o.cancel()}}},mouseleave:function(e,n){return a(e,"mouseout",function(t){dome.contains(e,t.relatedTarget)||e===t.relatedTarget||n.call(e,t)})}},dome.on=function(e,n,t){return dome.events[n]?dome.events[n](e,t):a(e,n,t)},dome.off=u,dome.delegate=i,dome.propmap.events=function(n,t){e.doall(function(e){a(n,e,t[e])},e.keys(t))}}(cull,dome),!function(e,n,t){function r(e,t){var r,o=n.createElement(e||"div");for(r in t)o[r]=t[r];return o}function o(e){for(var n=1,t=arguments.length;t>n;n++)e.appendChild(arguments[n]);return e}function i(e,n,t,r){var o=["opacity",n,~~(100*e),t,r].join("-"),i=.01+100*(t/r),a=Math.max(1-(1-e)/n*(100-i),e),u=f.substring(0,f.indexOf("Animation")).toLowerCase(),s=u&&"-"+u+"-"||"";return d[o]||(h.insertRule("@"+s+"keyframes "+o+"{"+"0%{opacity:"+a+"}"+i+"%{opacity:"+e+"}"+(i+.01)+"%{opacity:1}"+(i+n)%100+"%{opacity:"+e+"}"+"100%{opacity:"+a+"}"+"}",h.cssRules.length),d[o]=1),o}function a(e,n){var r,o,i=e.style;if(i[n]!==t)return n;for(n=n.charAt(0).toUpperCase()+n.slice(1),o=0;o<p.length;o++)if(r=p[o]+n,i[r]!==t)return r}function u(e,n){for(var t in n)e.style[a(e,t)||t]=n[t];return e}function s(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)e[o]===t&&(e[o]=r[o])}return e}function c(e){for(var n={x:e.offsetLeft,y:e.offsetTop};e=e.offsetParent;)n.x+=e.offsetLeft,n.y+=e.offsetTop;return n}function l(e){return this.spin?(this.opts=s(e||{},l.defaults,m),void 0):new l(e)}var f,p=["webkit","Moz","ms","O"],d={},h=function(){var e=r("style",{type:"text/css"});return o(n.getElementsByTagName("head")[0],e),e.sheet||e.styleSheet}(),m={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};l.defaults={},s(l.prototype,{spin:function(e){this.stop();var n,t,o=this,i=o.opts,a=o.el=u(r(0,{className:i.className}),{position:i.position,width:0,zIndex:i.zIndex}),s=i.radius+i.length+i.width;if(e&&(e.insertBefore(a,e.firstChild||null),t=c(e),n=c(a),u(a,{left:("auto"==i.left?t.x-n.x+(e.offsetWidth>>1):parseInt(i.left,10)+s)+"px",top:("auto"==i.top?t.y-n.y+(e.offsetHeight>>1):parseInt(i.top,10)+s)+"px"})),a.setAttribute("aria-role","progressbar"),o.lines(a,o.opts),!f){var l=0,p=i.fps,d=p/i.speed,h=(1-i.opacity)/(d*i.trail/100),m=d/i.lines;!function g(){l++;for(var e=i.lines;e;e--){var n=Math.max(1-(l+e*m)%d*h,i.opacity);o.opacity(a,i.lines-e,n,i)}o.timeout=o.el&&setTimeout(g,~~(1e3/p))}()}return o},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=t),this},lines:function(e,n){function t(e,t){return u(r(),{position:"absolute",width:n.length+n.width+"px",height:n.width+"px",background:e,boxShadow:t,transformOrigin:"left",transform:"rotate("+~~(360/n.lines*s+n.rotate)+"deg) translate("+n.radius+"px"+",0)",borderRadius:(n.corners*n.width>>1)+"px"})}for(var a,s=0;s<n.lines;s++)a=u(r(),{position:"absolute",top:1+~(n.width/2)+"px",transform:n.hwaccel?"translate3d(0,0,0)":"",opacity:n.opacity,animation:f&&i(n.opacity,n.trail,s,n.lines)+" "+1/n.speed+"s linear infinite"}),n.shadow&&o(a,u(t("#000","0 0 4px #000"),{top:"2px"})),o(e,o(a,t(n.color,"0 0 1px rgba(0,0,0,.1)")));return e},opacity:function(e,n,t){n<e.childNodes.length&&(e.childNodes[n].style.opacity=t)}}),function(){function e(e,n){return r("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',n)}var n=u(r("group"),{behavior:"url(#default#VML)"});!a(n,"transform")&&n.adj?(h.addRule(".spin-vml","behavior:url(#default#VML)"),l.prototype.lines=function(n,t){function r(){return u(e("group",{coordsize:c+" "+c,coordorigin:-s+" "+-s}),{width:c,height:c})}function i(n,i,a){o(f,o(u(r(),{rotation:360/t.lines*n+"deg",left:~~i}),o(u(e("roundrect",{arcsize:t.corners}),{width:s,height:t.width,left:t.radius,top:-t.width>>1,filter:a}),e("fill",{color:t.color,opacity:t.opacity}),e("stroke",{opacity:0}))))}var a,s=t.length+t.width,c=2*s,l=2*-(t.width+t.length)+"px",f=u(r(),{position:"absolute",top:l,left:l});if(t.shadow)for(a=1;a<=t.lines;a++)i(a,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(a=1;a<=t.lines;a++)i(a);return o(n,f)},l.prototype.opacity=function(e,n,t,r){var o=e.firstChild;r=r.shadow&&r.lines||0,o&&n+r<o.childNodes.length&&(o=o.childNodes[n+r],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=t))}):f=a(n,"animation")}(),"function"==typeof define&&define.amd?define(function(){return l}):e.Spinner=l}(window,document),function(e){"use strict";e(function(){function e(e,t,r,o){return n(e).then(t,r,o)}function n(e){var n,t;return e instanceof r?n=e:u(e)?(t=a(),e.then(function(e){t.resolve(e)},function(e){t.reject(e)},function(e){t.progress(e)}),n=t.promise):n=o(e),n}function t(n){return e(n,i)}function r(e){this.then=e}function o(e){var t=new r(function(t){try{return n("function"==typeof t?t(e):e)}catch(r){return i(r)}});return t}function i(e){var t=new r(function(t,r){try{return n("function"==typeof r?r(e):i(e))}catch(o){return i(o)}});return t}function a(){function e(e,n,t){return p(e,n,t)}function t(e){return h(n(e))}function o(e){return h(i(e))}function u(e){return d(e)}var s,c,l,f,p,d,h;return c=new r(e),s={then:e,resolve:t,reject:o,progress:u,promise:c,resolver:{resolve:t,reject:o,progress:u}},l=[],f=[],p=function(e,n,t){var r,o;return r=a(),o="function"==typeof t?function(e){try{r.progress(t(e))}catch(n){r.progress(n)}}:function(e){r.progress(e)},l.push(function(t){t.then(e,n).then(r.resolve,r.reject,o)}),f.push(o),r.promise},d=function(e){return m(f,e),e},h=function(e){return p=e.then,h=n,d=y,m(l,e),f=l=x,e},s}function u(e){return e&&"function"==typeof e.then}function s(n,t,r,o,i){return g(2,arguments),e(n,function(n){function u(e){m(e)}function s(e){h(e)}var c,l,f,p,d,h,m,g,y,w;if(y=n.length>>>0,c=Math.max(0,Math.min(t,y)),f=[],l=y-c+1,p=[],d=a(),c)for(g=d.progress,m=function(e){p.push(e),--l||(h=m=v,d.reject(p))},h=function(e){f.push(e),--c||(h=m=v,d.resolve(f))},w=0;y>w;++w)w in n&&e(n[w],s,u,g);else d.resolve(f);return d.promise.then(r,o,i)})}function c(e,n,t,r){function o(e){return n?n(e[0]):e[0]}return s(e,1,o,t,r)}function l(e,n,t,r){return g(1,arguments),p(e,y).then(n,t,r)}function f(){return p(arguments,y)}function p(n,t){return e(n,function(n){var r,o,i,u,s,c;if(i=o=n.length>>>0,r=[],c=a(),i)for(u=function(n,o){e(n,t).then(function(e){r[o]=e,--i||c.resolve(r)},c.reject)},s=0;o>s;s++)s in n?u(n[s],s):--i;else c.resolve(r);return c.promise})}function d(n,t){var r=b.call(arguments,1);return e(n,function(n){var o;return o=n.length,r[0]=function(n,r,i){return e(n,function(n){return e(r,function(e){return t(n,e,i,o)})})},w.apply(n,r)})}function h(n,t,r){var o=arguments.length>2;return e(n,function(e){return e=o?r:e,t.resolve(e),e},function(e){return t.reject(e),i(e)},t.progress)}function m(e,n){for(var t,r=0;t=e[r++];)t(n)}function g(e,n){for(var t,r=n.length;r>e;)if(t=n[--r],null!=t&&"function"!=typeof t)throw new Error("arg "+r+" must be a function")}function v(){}function y(e){return e}var w,b,x;return e.defer=a,e.resolve=n,e.reject=t,e.join=f,e.all=l,e.map=p,e.reduce=d,e.any=c,e.some=s,e.chain=h,e.isPromise=u,r.prototype={always:function(e,n){return this.then(e,e,n)},otherwise:function(e){return this.then(x,e)},yield:function(e){return this.then(function(){return e})},spread:function(e){return this.then(function(n){return l(n,function(n){return e.apply(x,n)})})}},b=[].slice,w=[].reduce||function(e){var n,t,r,o,i;if(i=0,n=Object(this),o=n.length>>>0,t=arguments,t.length<=1)for(;;){if(i in n){r=n[i++];break}if(++i>=o)throw new TypeError}else r=t[1];for(;o>i;++i)i in n&&(r=e(r,n[i],i,n));return r},e})}("function"==typeof define&&define.amd?define:function(e){"object"==typeof exports?module.exports=e():this.when=e()}),("function"==typeof define&&define.amd&&function(e){define(e)}||"object"==typeof module&&function(e){module.exports=e()}||function(e){this.bane=e()})(function(){"use strict";function e(e,n,t){var r,o=t.length;if(o>0)for(r=0;o>r;++r)t[r](e,n);else setTimeout(function(){throw n.message=e+" listener threw error: "+n.message,n},0)}function n(e){if("function"!=typeof e)throw new TypeError("Listener is not function");return e}function t(e){return e.supervisors||(e.supervisors=[]),e.supervisors}function r(e,n){return e.listeners||(e.listeners={}),n&&!e.listeners[n]&&(e.listeners[n]=[]),n?e.listeners[n]:e.listeners}function o(e){return e.errbacks||(e.errbacks=[]),e.errbacks}function i(i){function u(n,t,r){try{t.listener.apply(t.thisp||i,r)}catch(a){e(n,a,o(i))}}return i=i||{},i.on=function(e,o,i){return"function"==typeof e?t(this).push({listener:e,thisp:o}):(r(this,e).push({listener:n(o),thisp:i}),void 0)},i.off=function(e,n){var i,a,u,s;if(!e){i=t(this),i.splice(0,i.length),a=r(this);for(u in a)a.hasOwnProperty(u)&&(i=r(this,u),i.splice(0,i.length));return i=o(this),i.splice(0,i.length),void 0}if("function"==typeof e?(i=t(this),n=e):i=r(this,e),!n)return i.splice(0,i.length),void 0;for(u=0,s=i.length;s>u;++u)if(i[u].listener===n)return i.splice(u,1),void 0},i.once=function(e,n,t){var r=function(){i.off(e,r),n.apply(this,arguments)};i.on(e,r,t)},i.bind=function(e,n){var t,r,o;if(n)for(r=0,o=n.length;o>r;++r){if("function"!=typeof e[n[r]])throw new Error("No such method "+n[r]);this.on(n[r],e[n[r]],e)}else for(t in e)"function"==typeof e[t]&&this.on(t,e[t],e);return e},i.emit=function(e){var n,o,i=t(this),s=a.call(arguments);for(n=0,o=i.length;o>n;++n)u(e,i[n],s);for(i=r(this,e).slice(),s=a.call(arguments,1),n=0,o=i.length;o>n;++n)u(e,i[n],s)},i.errback=function(e){this.errbacks||(this.errbacks=[]),this.errbacks.push(n(e))},i}var a=Array.prototype.slice;return{createEventEmitter:i}}),function(e,n,t){"undefined"!=typeof module&&module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):n[e]=t()}("reqwest",this,function(){function handleReadyState(e,n,t){return function(){e&&4==e[readyState]&&(e.onreadystatechange=noop,twoHundo.test(e.status)?n(e):t(e))}}function setHeaders(e,n){var t,r=n.headers||{};r.Accept=r.Accept||defaultHeaders.accept[n.type]||defaultHeaders.accept["*"],n.crossOrigin||r[requestedWith]||(r[requestedWith]=defaultHeaders.requestedWith),r[contentType]||(r[contentType]=n.contentType||defaultHeaders.contentType);for(t in r)r.hasOwnProperty(t)&&e.setRequestHeader(t,r[t])}function setCredentials(e,n){"undefined"!=typeof n.withCredentials&&"undefined"!=typeof e.withCredentials&&(e.withCredentials=!!n.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,n){return e+(/\?/.test(e)?"&":"?")+n}function handleJsonp(e,n,t,r){var o=uniqid++,i=e.jsonpCallback||"callback",a=e.jsonpCallbackName||reqwest.getcallbackPrefix(o),u=new RegExp("((^|\\?|&)"+i+")=([^&]+)"),s=r.match(u),c=doc.createElement("script"),l=0,f=-1!==navigator.userAgent.indexOf("MSIE 10.0");s?"?"===s[3]?r=r.replace(u,"$1="+a):a=s[3]:r=urlappend(r,i+"="+a),win[a]=generalCallback,c.type="text/javascript",c.src=r,c.async=!0,"undefined"==typeof c.onreadystatechange||f||(c.event="onclick",c.htmlFor=c.id="_reqwest_"+o),c.onload=c.onreadystatechange=function(){return c[readyState]&&"complete"!==c[readyState]&&"loaded"!==c[readyState]||l?!1:(c.onload=c.onreadystatechange=null,c.onclick&&c.onclick(),e.success&&e.success(lastValue),lastValue=void 0,head.removeChild(c),l=1,void 0)},head.appendChild(c)}function getRequest(e,n,t){var r,o=(e.method||"GET").toUpperCase(),i="string"==typeof e?e:e.url,a=e.processData!==!1&&e.data&&"string"!=typeof e.data?reqwest.toQueryString(e.data):e.data||null;return"jsonp"!=e.type&&"GET"!=o||!a||(i=urlappend(i,a),a=null),"jsonp"==e.type?handleJsonp(e,n,t,i):(r=xhr(),r.open(o,i,!0),setHeaders(r,e),setCredentials(r,e),r.onreadystatechange=handleReadyState(r,n,t),e.before&&e.before(r),r.send(a),r)}function Reqwest(e,n){this.o=e,this.fn=n,init.apply(this,arguments)}function setType(e){var n=e.match(/\.(json|jsonp|html|xml)(\?|$)/);return n?n[1]:"js"}function init(o,fn){function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var r=resp.responseText;if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp);self._fulfillmentHandlers.length>0;)self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(e,n,t){for(self._responseArgs.resp=e,self._responseArgs.msg=n,self._responseArgs.t=t,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,n,t);complete(e)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),o.success&&this._fulfillmentHandlers.push(function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest(o,success,error)}function reqwest(e,n){return new Reqwest(e,n)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,n){var t=e.name,r=e.tagName.toLowerCase(),o=function(e){e&&!e.disabled&&n(t,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&t)switch(r){case"input":if(!/reset|button|image|file/i.test(e.type)){var i=/checkbox/i.test(e.type),a=/radio/i.test(e.type),u=e.value;(!(i||a)||e.checked)&&n(t,normalize(i&&""===u?"on":u))}break;case"textarea":n(t,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())o(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(var s=0;e.length&&s<e.length;s++)e.options[s].selected&&o(e.options[s])}}function eachFormElement(){var e,n,t,r=this,o=function(e,n){for(var o=0;o<n.length;o++){var i=e[byTag](n[o]);for(t=0;t<i.length;t++)serial(i[t],r)}};for(n=0;n<arguments.length;n++)e=arguments[n],/input|select|textarea/i.test(e.tagName)&&serial(e,r),o(e,["input","select","textarea"])}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var e={};return eachFormElement.apply(function(n,t){n in e?(e[n]&&!isArray(e[n])&&(e[n]=[e[n]]),e[n].push(t)):e[n]=t},arguments),e}var win=window,doc=document,twoHundo=/^20\d$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=win[xmlHttpRequest]?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};return Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)},then:function(e,n){return this._fulfilled?e(this._responseArgs.resp):this._erred?n(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):(this._fulfillmentHandlers.push(e),this._errorHandlers.push(n)),this},always:function(e){return this._fulfilled||this._erred?e(this._responseArgs.resp):this._completeHandlers.push(e),this},fail:function(e){return this._erred?e(this._responseArgs.resp,this._responseArgs.msg,this._responseArgs.t):this._errorHandlers.push(e),this}},reqwest.serializeArray=function(){var e=[];return eachFormElement.apply(function(n,t){e.push({name:n,value:t})},arguments),e},reqwest.serialize=function(){if(0===arguments.length)return"";var e,n,t=Array.prototype.slice.call(arguments,0);return e=t.pop(),e&&e.nodeType&&t.push(e)&&(e=null),e&&(e=e.type),n="map"==e?serializeHash:"array"==e?reqwest.serializeArray:serializeQueryString,n.apply(null,t)},reqwest.toQueryString=function(e){var n,t="",r=encodeURIComponent,o=function(e,n){t+=r(e)+"="+r(n)+"&"};if(isArray(e))for(n=0;e&&n<e.length;n++)o(e[n].name,e[n].value);else for(var i in e)if(Object.hasOwnProperty.call(e,i)){var a=e[i];if(isArray(a))for(n=0;n<a.length;n++)o(i,a[n]);else o(i,e[i])}return t.replace(/&$/,"").replace(/%20/g,"+")},reqwest.getcallbackPrefix=function(){return callbackPrefix},reqwest.compat=function(e,n){return e&&(e.type&&(e.method=e.type)&&delete e.type,e.dataType&&(e.type=e.dataType),e.jsonpCallback&&(e.jsonpCallbackName=e.jsonpCallback)&&delete e.jsonpCallback,e.jsonp&&(e.jsonpCallback=e.jsonp)),new Reqwest(e,n)},reqwest}),this.uinit=function(){function e(e,n){return b.reduce(function(n,t){return n&&e[t]&&e[t].loaded},!0,n.depends||[])}function n(e,n){return b.map(function(n){return e[n].result},n)}function t(e,n){t.cache[e.name]=n}function r(e,n){var r=t.cache[e.name];if(!r)return!1;for(var o=0,i=n.length;i>o;++o)if(!uinit.areEqual(n[o],r[o]))return!1;return!0}function o(e,o,i,a){i.reloading?e.emit("reloading",i):e.emit("loading",i);var u=n(o,i.depends||[]),s=when.defer();return when.all(u).then(function(n){var o=(a?[a]:[]).concat(n),u=i.serializeArgs.apply(i,o);if(i.reloading&&r(i,u))return e.emit("skip",i),s.resolve();t(i,u);try{var c=i.action.apply(null,o);(c||i.nullable)&&(i.loaded=!0,i.result=c,e.emit("loaded",i,c))}catch(l){e.emit("error",i,l)}s.resolve()},function(n){e.emit("error",i,n),s.resolve()}),s.promise}function i(e,n){var t=b.partial(o,e,e.features,n);return n.elements?when.all(b.map(t,dome.byClass(n.elements,e.context))):t()}function a(n,t){return!t.lazy&&!t.loaded&&t.action&&e(n,t)}function u(e){return e&&e.lazy&&!e.loaded}function s(e,n){var t=function(n){return e[n]};return b.uniq(b.reduce(function(e,n){return e.concat(b.select(u,b.map(t,n.depends||[])))},[],n))}function c(e,n){return b.doall(function(e){b.doall(function(t){e[t]=n[t]},b.keys(n))},e)}function l(e){return c(e,{lazy:!1,wasLazy:!0})}function f(e){b.doall(function(e){e.action&&(e.loaded=!1,delete e.reloading),e.wasLazy&&(delete e.wasLazy,e.lazy=!0)},e)}function p(e,n){e.listeners&&e.listeners.pending&&b.doall(b.bind(e,"emit","pending"),b.select(function(e){return!e.ready&&!e.loaded&&!e.reloading},n))}function d(e,n,t){function r(){var o=b.first(u,c);return o?(i(e,o).then(function(){if(!o.loaded){var e=b.indexOf(o,c);c=c.slice(0,e).concat(c.slice(e+1))}r()}),void 0):(p(e,n),"function"==typeof t?t():null)}var o=l(s(e.features,n)),u=b.partial(a,e.features),c=b.uniq(o.concat(n));r()}function h(e,n){if(e[n])throw new Error("Cannot add duplicate "+n)}function m(){return b.map(function(e){return x.features[e]||{name:e,type:"Unknown"}},this.depends||[])}function g(e,n){n.hasOwnProperty("nullable")||(n.nullable=!0),n.hasOwnProperty("serializeArgs")||(n.serializeArgs=function(){return b.map(function(e){return e&&e.tagName&&e.appendChild?dome.uuid(e):e},arguments)}),n.dependencies=m,e.features[n.name]=n,e.tryPending()}function v(e,n){var t,r=[],o=b.values(n);do t=r.length,cull.doall(function(e){r=r.concat(b.select(function(n){return b.indexOf(e,n.depends||[])>=0},o))},e),r=b.uniq(r),e=b.map(b.prop("name"),r);while(t!==r.length);return r}function y(e,n,t){if("function"==typeof e&&(t=n,n=e,e=n.name),!e)throw new Error("Name cannot be blank");var r=t||{};return r.name=e,r.action=n,r}function w(e,n){var t=v([n],e.features);f(t),b.doall(function(e){e.reloading=!0},t),d(e,t)}var b=cull;t.cache={};var x;return x=bane.createEventEmitter({features:{},env:function(e,n){null!==n&&void 0!==n&&this.nullableEnv(e,n)},nullableEnv:function(e,n){var t=!!this.env[e];t||h(this.features,e);var r=n!==this.env[e];this.env[e]=n,g(this,{name:e,result:n,loaded:!0}),t&&this.loaded&&r&&w(this,e)},data:function(e,n,t){var r=y(e,n,t);return h(this.features,r.name),"boolean"!=typeof r.lazy&&(r.lazy=!0),"boolean"!=typeof r.nullable&&(r.nullable=!1),g(this,r)},feature:function(e,n,t){var r=y(e,n,t);if(h(this.features,r.name),"function"!=typeof r.action)throw new Error("Cannot add feature "+r.name+", action is not a function ("+typeof r.action+")");g(this,r)},scanEnvAttrs:function(e,n){for(var t,r,o,i,a=e.getElementsByTagName("*"),u=[e].concat([].slice.call(a,0)),s=0,c=u.length;c>s;++s)for(r=u[s].attributes,o=0,i=r.length;i>o;++o)t=r.item(o),0===t.nodeName.indexOf(n)&&this.env(t.nodeName.slice(n.length),t.nodeValue)},load:function(e){this.loaded&&f(b.values(this.features)),this.loaded=!0,this.context=e,this.tryPending()},tryPending:function(){this.loaded&&(this.emit("init"),d(this,b.values(this.features)))}})},this.uinit.areEqual=function(e,n){return e===n};var Showdown={extensions:{}},forEach=Showdown.forEach=function(e,n){if("function"==typeof e.forEach)e.forEach(n);else{var t,r=e.length;for(t=0;r>t;t++)n(e[t],t,e)}},stdExtName=function(e){return e.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(e){var n,t,r,o=0,i=[],a=[];if("undefind"!=typeof module&&"undefined"!=typeof exports&&"undefind"!=typeof require){var u=require("fs");if(u){var s=u.readdirSync((__dirname||".")+"/extensions").filter(function(e){return~e.indexOf(".js")}).map(function(e){return e.replace(/\.js$/,"")});Showdown.forEach(s,function(e){var n=stdExtName(e);Showdown.extensions[n]=require("./extensions/"+e)})}}if(this.makeHtml=function(e){return n={},t={},r=[],e=e.replace(/~/g,"~T"),e=e.replace(/\$/g,"~D"),e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n"),e="\n\n"+e+"\n\n",e=M(e),e=e.replace(/^[ \t]+$/gm,""),Showdown.forEach(i,function(n){e=f(n,e)}),e=C(e),e=d(e),e=p(e),e=m(e),e=O(e),e=e.replace(/~D/g,"$$"),e=e.replace(/~T/g,"~"),Showdown.forEach(a,function(n){e=f(n,e)}),e},e&&e.extensions){var c=this;Showdown.forEach(e.extensions,function(e){if("string"==typeof e&&(e=Showdown.extensions[stdExtName(e)]),"function"!=typeof e)throw"Extension '"+e+"' could not be loaded. It was either not found or is not a valid extension.";Showdown.forEach(e(c),function(e){e.type?"language"===e.type||"lang"===e.type?i.push(e):("output"===e.type||"html"===e.type)&&a.push(e):a.push(e)})})}var l,f=function(e,n){if(e.regex){var t=new RegExp(e.regex,"g");return n.replace(t,e.replace)}return e.filter?e.filter(n):void 0},p=function(e){return e+="~0",e=e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(e,r,o,i,a){return r=r.toLowerCase(),n[r]=$(o),i?i+a:(a&&(t[r]=a.replace(/"/g,""")),"")}),e=e.replace(/~0/,"")},d=function(e){return e=e.replace(/\n/g,"\n\n"),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,h),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,h),e=e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,h),e=e.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,h),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,h),e=e.replace(/\n\n/g,"\n")},h=function(e,n){var t=n;return t=t.replace(/\n\n/g,"\n"),t=t.replace(/^\n/,""),t=t.replace(/\n+$/g,""),t="\n\n~K"+(r.push(t)-1)+"K\n\n"},m=function(e){e=E(e);var n=A("<hr />");return e=e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,n),e=e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,n),e=e.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,n),e=_(e),e=q(e),e=N(e),e=d(e),e=T(e)},g=function(e){return e=S(e),e=v(e),e=H(e),e=b(e),e=y(e),e=L(e),e=$(e),e=k(e),e=e.replace(/ +\n/g," <br />\n")},v=function(e){var n=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;return e=e.replace(n,function(e){var n=e.replace(/(.)<\/?code>(?=.)/g,"$1`");
|
2
|
-
return n=P(n,"\\`*_")})},y=function(e){return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,w),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,w),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,w)},w=function(e,r,o,i,a,u,s,c){void 0==c&&(c="");var l=r,f=o,p=i.toLowerCase(),d=a,h=c;if(""==d)if(""==p&&(p=f.toLowerCase().replace(/ ?\n/g," ")),d="#"+p,void 0!=n[p])d=n[p],void 0!=t[p]&&(h=t[p]);else{if(!(l.search(/\(\s*\)$/m)>-1))return l;d=""}d=P(d,"*_");var m='<a href="'+d+'"';return""!=h&&(h=h.replace(/"/g,"""),h=P(h,"*_"),m+=' title="'+h+'"'),m+=">"+f+"</a>"},b=function(e){return e=e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,x),e=e.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,x)},x=function(e,r,o,i,a,u,s,c){var l=r,f=o,p=i.toLowerCase(),d=a,h=c;if(h||(h=""),""==d){if(""==p&&(p=f.toLowerCase().replace(/ ?\n/g," ")),d="#"+p,void 0==n[p])return l;d=n[p],void 0!=t[p]&&(h=t[p])}f=f.replace(/"/g,"""),d=P(d,"*_");var m='<img src="'+d+'" alt="'+f+'"';return h=h.replace(/"/g,"""),h=P(h,"*_"),m+=' title="'+h+'"',m+=" />"},E=function(e){function n(e){return e.replace(/[^\w]/g,"").toLowerCase()}return e=e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(e,t){return A('<h1 id="'+n(t)+'">'+g(t)+"</h1>")}),e=e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(e,t){return A('<h2 id="'+n(t)+'">'+g(t)+"</h2>")}),e=e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(e,t,r){var o=t.length;return A("<h"+o+' id="'+n(r)+'">'+g(r)+"</h"+o+">")})},_=function(e){e+="~0";var n=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return o?e=e.replace(n,function(e,n,t){var r=n,o=t.search(/[*+-]/g)>-1?"ul":"ol";r=r.replace(/\n{2,}/g,"\n\n\n");var i=l(r);return i=i.replace(/\s+$/,""),i="<"+o+">"+i+"</"+o+">\n"}):(n=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,e=e.replace(n,function(e,n,t,r){var o=n,i=t,a=r.search(/[*+-]/g)>-1?"ul":"ol",i=i.replace(/\n{2,}/g,"\n\n\n"),u=l(i);return u=o+"<"+a+">\n"+u+"</"+a+">\n"})),e=e.replace(/~0/,"")};l=function(e){return o++,e=e.replace(/\n{2,}$/,"\n"),e+="~0",e=e.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(e,n,t,r,o){var i=o,a=n;return a||i.search(/\n{2,}/)>-1?i=m(R(i)):(i=_(R(i)),i=i.replace(/\n$/,""),i=g(i)),"<li>"+i+"</li>\n"}),e=e.replace(/~0/g,""),o--,e};var q=function(e){return e+="~0",e=e.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(e,n,t){var r=n,o=t;return r=j(R(r)),r=M(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="<pre><code>"+r+"\n</code></pre>",A(r)+o}),e=e.replace(/~0/,"")},C=function(e){return e+="~0",e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,n,t){var r=n,o=t;return o=j(o),o=M(o),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),o="<pre><code"+(r?' class="'+r+'"':"")+">"+o+"\n</code></pre>",A(o)}),e=e.replace(/~0/,"")},A=function(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(r.push(e)-1)+"K\n\n"},S=function(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,t,r){var o=r;return o=o.replace(/^([ \t]*)/g,""),o=o.replace(/[ \t]*$/g,""),o=j(o),n+"<code>"+o+"</code>"})},j=function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=P(e,"*_{}[]\\",!1)},k=function(e){return e=e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>"),e=e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>")},N=function(e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,n){var t=n;return t=t.replace(/^[ \t]*>[ \t]?/gm,"~0"),t=t.replace(/~0/g,""),t=t.replace(/^[ \t]+$/gm,""),t=m(t),t=t.replace(/(^|\n)/g,"$1 "),t=t.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,n){var t=n;return t=t.replace(/^ /gm,"~0"),t=t.replace(/~0/g,"")}),A("<blockquote>\n"+t+"\n</blockquote>")})},T=function(e){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var n=e.split(/\n{2,}/g),t=[],o=n.length,i=0;o>i;i++){var a=n[i];a.search(/~K(\d+)K/g)>=0?t.push(a):a.search(/\S/)>=0&&(a=g(a),a=a.replace(/^([ \t]*)/g,"<p>"),a+="</p>",t.push(a))}o=t.length;for(var i=0;o>i;i++)for(;t[i].search(/~K(\d+)K/)>=0;){var u=r[RegExp.$1];u=u.replace(/\$/g,"$$$$"),t[i]=t[i].replace(/~K\d+K/,u)}return t.join("\n\n")},$=function(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?\$!])/gi,"<")},H=function(e){return e=e.replace(/\\(\\)/g,I),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,I)},L=function(e){return e=e.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>'),e=e.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(e,n){return z(O(n))})},z=function(e){var n=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e="mailto:"+e,e=e.replace(/./g,function(e){if("@"==e)e=n[Math.floor(2*Math.random())](e);else if(":"!=e){var t=Math.random();e=t>.9?n[2](e):t>.45?n[1](e):n[0](e)}return e}),e='<a href="'+e+'">'+e+"</a>",e=e.replace(/">.+:/g,'">')},O=function(e){return e=e.replace(/~E(\d+)E/g,function(e,n){var t=parseInt(n);return String.fromCharCode(t)})},R=function(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")},M=function(e){return e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"~A~B"),e=e.replace(/~B(.+?)~A/g,function(e,n){for(var t=n,r=4-t.length%4,o=0;r>o;o++)t+=" ";return t}),e=e.replace(/~A/g," "),e=e.replace(/~B/g,"")},P=function(e,n,t){var r="(["+n.replace(/([\[\]\\])/g,"\\$1")+"])";t&&(r="\\\\"+r);var o=new RegExp(r,"g");return e=e.replace(o,I)},I=function(e,n){var t=n.charCodeAt(0);return"~E"+t+"E"}},"undefined"!=typeof module&&(module.exports=Showdown),"function"==typeof define&&define.amd&&define("showdown",function(){return Showdown}),function(e){"function"==typeof define&&define.amd?define([],e):this.timeago=e()}(function(){function e(e,n,t,r){var o="function"==typeof n?n(r,t):n,i=e.numbers&&e.numbers[r]||r;return o.replace(/%d/i,i)}function n(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function t(e){this.locale=e;for(var n in o)"undefined"==typeof this.locale[n]&&(this.locale[n]=o[n])}var r,o={prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]};return t.prototype=r={locale:o,locales:{en:o},configure:function(e){var n=new t(e||r.locales.en);return n},relative:function(e){return this.inWords((new Date).getTime()-e.getTime())},inWords:function(t){var r=this.locale,o=r.prefixAgo,i=r.suffixAgo;0>t&&(o=r.prefixFromNow,i=r.suffixFromNow);var a=Math.abs(t)/1e3,u=a/60,s=u/60,c=s/24,l=c/365,f=45>a&&e(r,r.seconds,t,Math.round(a))||90>a&&e(r,r.minute,t,1)||45>u&&e(r,r.minutes,t,Math.round(u))||90>u&&e(r,r.hour,t,1)||24>s&&e(r,r.hours,t,Math.round(s))||42>s&&e(r,r.day,t,1)||30>c&&e(r,r.days,t,Math.round(c))||45>c&&e(r,r.month,t,1)||365>c&&e(r,r.months,t,Math.round(c/30))||1.5>l&&e(r,r.year,t,1)||e(r,r.years,t,Math.round(l));return f=[o,f,i].join("string"==typeof r.wordSeparator?r.wordSeparator:""),n(f)},parse:function(e){var t=n(e);return t=t.replace(/\.\d+/,""),t=t.replace(/-/,"/").replace(/-/,"/"),t=t.replace(/T/," ").replace(/Z/," UTC"),t=t.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(t)}},r});// Set up a global, shared app instance
|
3
|
-
this.gts=this.gts||{},this.gts.app=this.uinit(),function(){var e=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};this.uinit.areEqual=function t(n,r){if(n===r)return!0;if(e(n)||!e(r))return n.length!==r.length;var i,s;for(i=0,s=n.length;i<s;++i)if(!t(n[i],r[i]))return!1;return!0}}(),this.gts=this.gts||{},this.gts.cache=function(e){function n(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;++n)if(e[n]!==t[n])return!1;return!0}var t=[];return function(){var r=[].slice.call(arguments),i,s,o,u,a;for(i=0,s=t.length;i<s;++i)if(n(t[i].args,r))return t[i].result;return a=e.apply(self,r),t.push({args:r,result:a}),a}},this.gts=this.gts||{},this.gts.jsonRequest=function(e){return reqwest({url:e,type:"json"})},this.gts.dropdown=function(e){return function(n){function s(){r&&(r.parentNode.removeChild(r),r=null),e.cn.rm("open",n),i=!1}function o(t){if(i)return s();document.documentElement.hasOwnProperty("ontouchstart")&&(r=e.el("div",{className:"dropdown-backdrop",events:{click:s}}),t.insertBefore(r,t)),e.cn.add("open",t),i=!0}var r,i=!1;e.on(n,"click",function(e){var t=e.target.tagName==="A"?e.target:e.target.parentNode;if(!dome.cn.has("dropdown-toggle",t))return;o(this),e.preventDefault(),e.stopPropagation()}),e.on(document.body,"click",s),e.on(document.body,"keydown",function(e){if(e.keyCode!==27)return;s(),e.preventDefault(),e.stopPropagation()})}}(dome);var gts=this.gts||{};gts.googleAnalytics=function(e,t){window._gaq=window._gaq||[],window._gaq.push(["_setAccount",e]),t&&window._gaq.push(["_setDomainName",t]),window._gaq.push(["_trackPageview"]);var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=("https:"===document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(n)},this.gts=this.gts||{},this.gts.abbrev=function(e,t,n){return e.length<=t?e:(n=n||"",cull.reduce(function(e,r){return e.join(" ").length+r.length+n.length<=t&&e.push(r),e},[],e.split(" ")).join(" ")+n)},this.gts=this.gts||{},this.gts.url=function(){function e(e){var t=e.split("/");return t.shift(),t.shift(),t.shift(),"/"+t.join("/")}function t(t,n){return cull.reduce(function(e,t){return e.replace(new RegExp(n[t],"g"),"#{"+t+"}")},e(t),cull.keys(n))}function n(e,t){return cull.reduce(function(e,n){return e.replace(new RegExp("#{"+n+"}","g"),t[n])},e,cull.keys(t))}function r(e){var t=/(blame|blob|tree|history|raw|source|readme|commits)\//,n=e.split(t)[2];return n&&n.split(":")[0]||null}return{templatize:t,render:n,currentRef:r}}(),this.gts=this.gts||{},this.gts.refSelector=function(e){function t(e,t){return(e||"#{ref}").replace(/#\{ref\}/g,t)}function n(e,t,n){return cull.select(function(e){return e[0]===t||e[1]===t},n[e]||[])[0]}function r(t,r){var i=n("heads",r,t),s="branch";return i||(i=n("tags",r,t),s="tag"),i||(s="ref"),e.a({href:"#",className:"dropdown-toggle",innerHTML:'<span class="caret"></span> <em>'+s+":</em> "+(i&&i[0]||r)})}function i(n){var r=e.input({type:"text",className:"gts-ref-input"}),i=e.form({className:"gts-ref-input",events:{submit:function(e){e.preventDefault(),window.location=t(n,r.value)}}},[r]);return e.li({className:"gts-dropdown-input",events:{click:function(e){e.stopPropagation()}}},[e.strong(["Enter ref: ",i])])}function s(n,r,i){var s=[e.li({className:"dropdown-label"},[e.strong(n)])];return cull.reduce(function(n,r){var s=t(i,r[1]);return n.push(e.li(e.a({href:s},r[0]))),n},s,r.sort())}function o(t,n){return e.ul({className:"dropdown-menu"},[i(n)].concat(s("Branches",t.heads||[],n)).concat(s("Tags",t.tags||[],n)))}function u(t,n,i){return e.div({className:"dropdown gts-branch-selector pull-right"},[r(t,n),o(t,i)])}function a(e,t,n,r){var i=u(t,n,r);e.parentNode.insertBefore(i,e),e.parentNode.removeChild(e),this.gts.dropdown(i)}return a.build=u,a.getCurrentRef=n,a}(dome.el),this.gts=this.gts||{},this.gts.treeHistory=function(e,t){function n(e,t){return e.getElementsByTagName(t)}function s(t,n){return e.select(function(e){return e.name===t},n)[0]}function o(e){if(!Date.parse)return"";var t=new Date(Date.parse(e));return i[t.getMonth()]+" "+t.getDate()+" "+t.getFullYear()}function u(e){var t,n;for(t=0,n=e.length;t<n;++t)if(dome.cn.has("gts-name",e[t]))return t;return t}function a(e){return(e&&dome.text(e)||"").trim()}var r=function(e,t){var i=n(n(e,"tbody")[0],"td")[2],s=(new Spinner({lines:13,length:1,width:2,radius:6,corners:1,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!0,className:"spinner",zIndex:2e9,top:"auto",left:"auto"})).spin(i);reqwest({url:t,type:"json",success:function(t){s.stop(),r.annotate(e,t)}})},i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"];return r.annotateRow=function(e,t){var r=n(t,"td"),i=u(r),f=s(a(r[i]),e);if(!f)return;var l=f.history[0];r[i+1].innerHTML=o(l.date),dome.data.set({"gts-commit-oid":l.oid},r[i+2]),r[i+2].innerHTML="#"+l.oid.slice(0,7);var c=l.summary.trim();r[i+3].innerHTML=gts.abbrev(c,50," [...]")+" ("+l.author.name+")"},r.annotate=function(t,i){e.doall(e.partial(function(e,t){r.annotateRow(e,t)},i),n(n(t,"tbody")[0],"tr"))},r}(cull);var gts=this.gts||{};(function(e,t){gts.commitLinker=function(e,n,r){t.cn.add("gts-commit-linker",e),t.delegate.bycn("gts-commit-oid",e,"click",function(e){r(gts.url.render(n,{oid:dome.data.get("gts-commit-oid",this)}))})}})(cull.partial,dome),this.gts.userRepoViewState=function(e){return reqwest({url:e,type:"json"})};var gts=this.gts||{};(function(e,t){function n(e,n,r){e=" "+e;var i=r?[t.i({className:"icon-"+r}),e]:[e];return t.li(t.a({href:n},i))}gts.profileMenu=function(r,i){if(!i)return;e.setContent([t.a({className:"btn btn-inverse",href:i.dashboardPath},[t.i({className:"icon-user icon-white"}),i.login]),t.a({className:"btn btn-inverse dropdown-toggle",href:"#",data:{toggle:"dropdown"}},t.span({className:"caret"}," ")),t.ul({className:"dropdown-menu"},[n("Edit",i.editPath,"pencil"),n("Messages",i.messagesPath,"envelope"),t.li({className:"divider"}),n("Dashboard",i.dashboardPath),n("Public profile",i.profilePath),n("Log out",i.logoutPath)])],r),gts.dropdown(r)}})(dome,dome.el),this.gts=this.gts||{},this.gts.cloneUrlSelection=function(){function e(e,t){var n=dome.byClass("gts-repo-url",e);cull.doall(cull.partial(dome.cn.rm,"active"),n);if(t){dome.cn.add("active",t);var r=dome.byClass("gts-current-repo-url",e)[0];r.value=t.getAttribute("href").replace("ssh://",""),r.focus()}}function t(t){var n=t.getElementsByTagName("input")[0];n&&dome.on(n,"focus",function(e){this.select()}),dome.delegate.bycn("gts-repo-url",t,"click",function(n){n.preventDefault(),n.stopPropagation(),e(t,n.target)})}return t.select=e,t}(),this.gts=this.gts||{},this.gts.blob=function(){function e(e,t){var n=t[0]-1,r=t[1]-1,i=e.getElementsByTagName("li");cull.doall(function(e,t){var i=n<=t&&t<=r;dome.cn[i?"add":"rm"]("region",e)},e.getElementsByTagName("li"))}function t(e){while(e&&e.tagName!=="LI")e=e.parentNode;var t=e&&e.className.match(/L(\d+)/)[1];if(!t)return;return parseInt(t,10)}function n(t,n,r){var i=n[0];i+=n[1]!==n[0]?"-"+n[1]:"",r("#L"+i),e(t,n)}function r(e,t){return t=typeof t=="number"?t:e,[Math.min(e,t),Math.max(e,t)]}function i(e,i){var s=!1,o,u=[];dome.on(document.body,"keydown",function(e){s=e.which===16}),dome.on(document.body,"keyup",function(e){s=e.which!==16}),dome.on(e,"click",function(u){var a,f=t(u.target);if(!s||!o)o=u.target;o&&s?(a=r(t(o),f),u.preventDefault()):a=[f,f],n(e,a,i)})}function s(e,t){var n=function(){dome.cn.add("focus",this)},r=function(){dome.cn.rm("focus",this)};cull.doall(function(e){dome.on(e,"mouseenter",n),dome.on(e,"mouseleave",r)},e.getElementsByTagName("li")),i(e,t)}function o(e){var t=e.match(/\#l(\d+)(?:-(\d+))?/i);if(!t)return;return r(t[1],t[2]&&Number(t[2]))}return{trackFocus:s,regionFromUrl:o,highlightRegion:e}}(),this.gts.liveMarkdownPreview=function(t){function u(e){r.style.display=e?"block":"none",r.getElementsByTagName("div")[0].innerHTML=e}function a(){o=t.value,o!==s&&(s=o,u(i.makeHtml(o))),setTimeout(a,20)}var n=t.getAttribute("data-gts-preview-target"),r=document.getElementById(n);if(!r||typeof Showdown=="undefined")return;var i=new Showdown.converter,s,o;a()},this.gts=this.gts||{},this.gts.timeago=function(e){function t(t,n){var r=e.parse(n||t.title);if(isNaN(r.getTime()))return t;var i=t.innerHTML.trim()||t.title;return t.innerHTML=e.relative(r),t.title=i,t}var n={};return t.periodic=function(e){return n[e]||(n[e]=[],setInterval(function(){for(var t=0,r=n[e].length,i;t<r;++t)i=n[e][t],gts.timeago(i.element,i.time)},e)),function(r){return n[e].push({element:r,time:r.title}),t(r,r.title)}},t}(timeago),this.gts.collapse=function(){dome.on(document.body,"click",function(e){if(dome.data.get("toggle",e.target)!=="collapse")return;var t=dome.id(dome.data.get("target",e.target).slice(1));if(!t)return;dome.cn[dome.cn.has("in",t)?"rm":"add"]("in",t),e.preventDefault(),e.stopPropagation()})},this.gts=this.gts||{},this.gts.repository=function(e){function t(t,n){return[e.i({className:t})," "+n]}function n(n,r,i){return e.a({href:n},t(r,i))}function r(r,i){return e[i||"li"]({className:"pull-right dropdown"},[e.a({href:"#","data-toggle":"dropdown",className:"dropdown-toggle"},t("icon-cog","Admin")),e.ul({className:"dropdown-menu"},[e.li(n(r.editPath,"icon-pencil","Edit repository")),e.li(n(r.destroyPath,"icon-trash","Delete repository")),e.li({className:"divider"}),e.li(n(r.webHooksPath,"i","Web hooks")),e.li(n(r.ownershipPath,"i","Transfer ownership")),e.li(n(r.committershipsPath,"i","Manage collaborators"))])])}function i(e,t){var n=r(t,e.tagName.toLowerCase());dome.replace(e,n),this.gts.dropdown(n),dome.data.get("gts-active",n.parentNode)==="admin"&&dome.cn.add("active",n)}function s(e,t){t.watching?(e.innerHTML='<i class="icon icon-star"></i> Unwatch',e.href=t.unwatchPath):(e.innerHTML='<i class="icon icon-star-empty"></i> Watch',e.href=t.watchPath)}function o(e,t){gts.request({url:t.unwatchPath,method:"delete",type:"js",headers:{Accept:"application/javascript, text/javascript"},success:function(n){t.watching=!1,s(e,t)},error:function(){e.innerHTML="Failed, try watching again"}})}function u(e,t){gts.request({url:t.watchPath,method:"post",type:"text",headers:{Accept:"application/javascript, text/javascript"},success:function(n){t.watching=!0,t.unwatchPath=n.getResponseHeader("location"),s(e,t)},error:function(){e.innerHTML="Failed, try unwatching again"}})}function a(e,t){gts.loading(e),t.watching?o(e,t):u(e,t)}function f(e,t){var n=dome.el("a",{className:"btn"});dome.replace(e,n),s(n,t),dome.on(n,"click",function(e){e.preventDefault(),e.stopPropagation(),a(n,t)})}function l(e,t){if(!t.clonePath)return;dome.replace(e,dome.el("a",{href:t.clonePath,className:"btn"},"Clone"))}function c(e,t){if(!t.requestMergePath)return;dome.replace(e,dome.el("li",{className:"pull-right"},[dome.el("a",{href:t.requestMergePath},[dome.el("i",{className:"icon icon-random"})," Request merge"])]))}return i.build=r,f.watch=u,f.unwatch=o,f.toggleState=a,f.render=s,{admin:i,watching:f,cloning:l,mergeRequest:c}}(dome.el),this.gts=this.gts||{},this.gts.railsLinks=function(e,t){dome.on(document.body,"click",function(n){var r=dome.data.get("method",n.target);if(!r||r==="get")return!0;n.preventDefault(),n.stopPropagation();var i=n.target.href,s=dome.el("form",{method:"post",action:i,style:{display:"none"}},[dome.el("input",{name:"_method",value:r,type:"hidden"}),dome.el("input",{name:e,value:t,type:"hidden"})]);document.body.appendChild(s),s.submit()})},this.gts=this.gts||{},this.gts.cloneNameSuggestion=function(){function e(e,t){var n=/s$/.test(e)?e:e+"s";return n+"-"+t}return function(n){function f(){if(u.value&&cull.indexOf(u.value,a)<0)return;if(i.checked){u.value=a[0];return}if(s.checked){var t=o.options[o.selectedIndex];u.value=e(t.innerHTML,r)}}var r=dome.data.get("gts-repository-to-clone",n),i=dome.id("repository_owner_type_user"),s=dome.id("repository_owner_type_group"),o=dome.id("repository_owner_id_group_select"),u=dome.id("repository_name"),a=cull.reduce(function(t,n){return t.concat(e(n.innerHTML,r))},[e(dome.data.get("gts-owner",i),r)],o.options);dome.on(i,"click",f),dome.on(s,"click",f),dome.on(o,"change",f),f()}}(),this.gts=this.gts||{},this.gts.loading=function(e,t){dome.cn.add("loading",e),e.innerHTML="",t=t||{};var n=(new Spinner({lines:t.hasOwnProperty("lines")?t.lines:8,length:t.hasOwnProperty("length")?t.length:2,width:t.hasOwnProperty("width")?t.width:2,radius:t.hasOwnProperty("radius")?t.radius:3,color:t.color||"#000",speed:t.hasOwnProperty("speed")?t.speed:1,trail:t.hasOwnProperty("trail")?t.trail:100,shadow:t.hasOwnProperty("shadow")?t.shadow:!1})).spin();n.el.style.top=t.topPos||"10px",e.appendChild(n.el);var r=t.hasOwnProperty("text")?t.text:"Loading...";if(r){var i=document.createElement("span");i.innerHTML=r,e.appendChild(i)}},this.gts=this.gts||{},this.gts.oidRefInterpolator=function(e,t,n){var r=this.gts.refSelector.getCurrentRef("heads",e.innerHTML,t);r&&(e.title=r[1],e.innerHTML=r[0])},this.gts=this.gts||{},this.gts.comments=function(e){function t(t){var n=this.gts.timeago(e.span({title:t.createdAt}));return t.createdAt===t.updatedAt?n:e.span([n,"(edited ",this.gts.timeago(e.span({title:t.updatedAt})),")"])}function n(e){console.log("Edit")}function r(t){if(!t.editPath)return"";var r=e.a({href:t.editPath,events:{click:function(e){e.preventDefault(),e.stopPropagation(),n(r.parentNode.parentNode)}}},"Edit comment");return r}function i(n){var i=n.author;return e.div({className:"gts-comment"},[e.p({innerHTML:n.body}),e.p([e.img({src:i.avatarPath}),e.a({href:i.profilePath},i.name),t(n),r(n)])])}function s(e,t){if(e.length===0)return;t.style.display="block";var n=document.createElement("div");t.appendChild(n),dome.setContent(cull.map(i,e),n)}function o(e){return e<10?"0"+e:e}function u(t,n){n.style.display="block";var r=dome.byClass("gts-comment-author-ph",n)[0];if(!r)return r;var i=new Date;return dome.replace(r,e.p([e.img({src:t.avatarPath}),e.a({href:t.profilePath},t.name)," "+o(i.getHours())+":"+o(i.getMinutes())]))}return{renderComments:s,renderComment:i,personalizeForm:u}}(dome.el),this.gts=this.gts||{},this.gts.slugify=function(){function e(e){return e.toLowerCase().replace(/[^a-z0-9_\-]+/g,"-").replace(/^\-|\-$/g,"")}function t(t,n){return n===""||e(t)===n}return function(r,i){function o(){t(s,i.value)&&(i.value=e(r.value),s=r.value)}var s=r.value;dome.on(r,"keyup",o),dome.on(r,"focus",o),o()}}(),this.gts=this.gts||{},this.gts.selectDetails=function(e){function n(n){t.innerHTML=dome.data.get("description",e.options[e.selectedIndex])}var t=document.getElementById(dome.data.get("target",e));if(!t)return;dome.on(e,"change",n),n()},gts.app.env("url",window.location.href),gts.app.env("redirect",function(e){window.location=e}),window.hasOwnProperty("onpopstate")&&(window.onpopstate=function(e){gts.app.env("url",window.location.href)}),cull.doall(function(e){e.name==="csrf-param"&>s.app.env("csrf-param",e.content),e.name==="csrf-token"&>s.app.env("csrf-token",e.content)},document.getElementsByTagName("meta")),gts.request=function(e){e.headers=e.headers||{},e.headers["X-CSRF-Token"]=gts.app.env["csrf-token"],reqwest(e)},function(){var e=document.getElementById("project_title");e&>s.app.env("project-title-input",e),e=document.getElementById("project_slug"),e&>s.app.env("project-slug-input",e)}(),gts.app.data("ref-url-template",function(e,t){return gts.url.templatize(e,{ref:t})},{depends:["url","current-ref"],serializeArgs:function(e,t){return[e.split("#")[0],t]}}),gts.app.data("repository-refs",this.gts.jsonRequest,{depends:["repository-refs-url"]}),gts.app.data("current-ref",gts.url.currentRef,{depends:["url"]}),gts.app.data("user-repo-view-state",gts.cache(gts.userRepoViewState),{depends:["user-repository-path"]}),gts.app.data("current-user",cull.prop("user"),{depends:["user-repo-view-state"]}),gts.app.data("current-repository",cull.prop("repository"),{depends:["user-repo-view-state"]}),gts.app.data("repository-watch",cull.prop("watch"),{depends:["current-repository"]}),gts.app.data("repository-admin",cull.prop("admin"),{depends:["current-repository"]}),gts.app.data("blob-region",gts.blob.regionFromUrl,{depends:["url"]}),gts.app.feature("google-analytics",gts.googleAnalytics,{depends:["analytics-account","analytics-domain-name"]}),gts.app.feature("dropdown",gts.dropdown,{elements:["dropdown"]}),gts.app.feature("ref-selector",gts.refSelector,{elements:["gts-ref-selector-ph"],depends:["repository-refs","current-ref","ref-url-template"]}),gts.app.feature("oid-ref-interpolator",gts.oidRefInterpolator,{elements:["gts-oid"],depends:["repository-refs","ref-url-template"]}),gts.app.feature("tree-history",gts.treeHistory,{elements:["gts-tree-explorer"],depends:["tree-history-url"]}),gts.app.feature("commit-linker",gts.commitLinker,{elements:["gts-body"],depends:["commit-url-template","redirect"]}),gts.app.feature("profile-menu",gts.profileMenu,{elements:["login_button"],depends:["current-user"]}),gts.app.feature("clone-url-selection",gts.cloneUrlSelection,{elements:["gts-repo-urls"]}),gts.app.feature("highlight-region",gts.blob.highlightRegion,{elements:["gts-lines"],depends:["blob-region"]}),gts.app.feature("track-blob-focus",gts.blob.trackFocus,{elements:["gts-lines"],depends:["redirect"]}),gts.app.feature("live-markdown-preview",gts.liveMarkdownPreview,{elements:["gts-live-markdown-preview"]}),gts.app.feature("timeago",gts.timeago.periodic(6e4),{elements:["timeago"]}),gts.app.feature("collapse",gts.collapse),gts.app.feature("clone-name-suggestion",gts.cloneNameSuggestion,{elements:["clone-repository-form"]}),gts.app.feature("loading",gts.loading,{elements:["loading"]}),gts.app.feature("rails-links",gts.railsLinks,{depends:["csrf-param","csrf-token"]}),gts.app.feature("repository-admin-menu",gts.repository.admin,{elements:["gts-repository-admin-ph"],depends:["repository-admin"]}),gts.app.feature("repository-watching",gts.repository.watching,{elements:["gts-watch-repository-ph"],depends:["repository-watch"]}),gts.app.feature("repository-cloning",gts.repository.cloning,{elements:["gts-clone-repository-ph"],depends:["current-repository"]}),gts.app.feature("repository-merge-request",gts.repository.mergeRequest,{elements:["gts-request-merge-ph"],depends:["current-repository"]}),gts.app.feature("slugify-project-title",gts.slugify,{depends:["project-title-input","project-slug-input"]}),gts.app.feature("select-details",gts.selectDetails,{elements:["gts-option-details"]}),setTimeout(function(){gts.app.scanEnvAttrs(document.body,"data-gts-env-"),gts.app.load(document.documentElement)},10);
|
data/vendor/ui/favicon.ico
DELETED
Binary file
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
|
5
|
-
height="32px" viewBox="0 0 24 32" style="enable-background:new 0 0 24 32;" xml:space="preserve">
|
6
|
-
<g id="Layer_1">
|
7
|
-
</g>
|
8
|
-
<g id="lock_x5F_stroke">
|
9
|
-
<g>
|
10
|
-
<path style="fill:#4E4E50;" d="M14.004,0c-5.51,0-9.998,4.484-9.998,10v2H0v14c0,3.305,2.695,6,5.998,6H18c3.312,0,6-2.695,6-6V10
|
11
|
-
C24,4.484,19.516,0,14.004,0z M8.006,10c0-3.312,2.693-6,5.998-6C17.312,4,20,6.688,20,10v2H8.006V10z M18,28H5.998
|
12
|
-
c-1.102,0-2-0.898-2-2V16H20v10C20,27.102,19.109,28,18,28z"/>
|
13
|
-
<path style="fill:#4E4E50;" d="M14.004,22c0,1.102-0.898,2-2,2c-1.109,0-2-0.898-2-2c0-1.109,0.891-2,2-2
|
14
|
-
C13.105,20,14.004,20.891,14.004,22z"/>
|
15
|
-
</g>
|
16
|
-
</g>
|
17
|
-
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/ui/js/src/app.js
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
// Set up a global, shared app instance
|
2
|
-
this.gts = this.gts || {};
|
3
|
-
this.gts.app = this.uinit();
|
4
|
-
|
5
|
-
(function () {
|
6
|
-
var isArray = Array.isArray || function (arr) {
|
7
|
-
return Object.prototype.toString.call(arr) === "[object Array]";
|
8
|
-
};
|
9
|
-
|
10
|
-
this.uinit.areEqual = function areEqual(a, b) {
|
11
|
-
if (a === b) { return true; }
|
12
|
-
if (isArray(a) || !isArray(b)) { return a.length !== b.length; }
|
13
|
-
|
14
|
-
var i, l;
|
15
|
-
for (i = 0, l = a.length; i < l; ++i) {
|
16
|
-
if (!areEqual(a[i], b[i])) { return false; }
|
17
|
-
}
|
18
|
-
return true;
|
19
|
-
};
|
20
|
-
}());
|
data/vendor/ui/js/src/cache.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
this.gts = this.gts || {};
|
2
|
-
|
3
|
-
this.gts.cache = function (fn) {
|
4
|
-
var cache = [];
|
5
|
-
|
6
|
-
function equal(arr1, arr2) {
|
7
|
-
if (arr1.length !== arr2.length) { return false; }
|
8
|
-
for (var i = 0, l = arr1.length; i < l; ++i) {
|
9
|
-
if (arr1[i] !== arr2[i]) { return false; }
|
10
|
-
}
|
11
|
-
return true;
|
12
|
-
}
|
13
|
-
|
14
|
-
return function () {
|
15
|
-
var args = [].slice.call(arguments);
|
16
|
-
var i, l, j, k, result;
|
17
|
-
for (i = 0, l = cache.length; i < l; ++i) {
|
18
|
-
if (equal(cache[i].args, args)) {
|
19
|
-
return cache[i].result;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
result = fn.apply(self, args);
|
24
|
-
cache.push({ args: args, result: result });
|
25
|
-
return result;
|
26
|
-
};
|
27
|
-
};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/*global cull*/
|
2
|
-
this.gts = this.gts || {};
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Abbreviates a string to fit within a predefined width. If the
|
6
|
-
* string is shorter than, or just as long as the specified width, it
|
7
|
-
* is returned untouched.
|
8
|
-
*
|
9
|
-
* If the optional suffix is provided, it is appended to the
|
10
|
-
* abbreviated string, and the full length of the abbreviated string
|
11
|
-
* with the suffix is guaranteed to not be wider than the specified
|
12
|
-
* width.
|
13
|
-
*/
|
14
|
-
this.gts.abbrev = function (sentence, width, suffix) {
|
15
|
-
if (sentence.length <= width) { return sentence; }
|
16
|
-
suffix = suffix || "";
|
17
|
-
|
18
|
-
return cull.reduce(function (words, word) {
|
19
|
-
if (words.join(" ").length + word.length + suffix.length <= width) {
|
20
|
-
words.push(word);
|
21
|
-
}
|
22
|
-
return words;
|
23
|
-
}, [], sentence.split(" ")).join(" ") + suffix;
|
24
|
-
};
|
@@ -1,154 +0,0 @@
|
|
1
|
-
/*global cull, dome*/
|
2
|
-
this.gts = this.gts || {};
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Utilities for working with syntax highligted blobs. Assumes the markup for
|
6
|
-
* blobs generated by Dolt. Exports three functions:
|
7
|
-
*
|
8
|
-
* * trackFocus
|
9
|
-
* Sets up events to highlight lines on mouseover, and allows the user to
|
10
|
-
* highlight regions
|
11
|
-
* * regionFromUrl
|
12
|
-
* Parses the URL and finds line number or region to highlight
|
13
|
-
* * highlightRegion
|
14
|
-
* Highlights a region
|
15
|
-
*
|
16
|
-
* The following functions all assume that a blob is contained in some root
|
17
|
-
* element that represents each line in the file as an li element.
|
18
|
-
*
|
19
|
-
* A "region" is an array of two numbers, denoting the first and last line of
|
20
|
-
* a consecutive region. Both boundaries are inclusive. Regions start at 1 (not
|
21
|
-
* 0).
|
22
|
-
* [1, 2] - The region consisting of the first and second line, inclusive
|
23
|
-
* [1, 1] - The first line
|
24
|
-
* [10, 14] - The region of lines 10, 11, 12, 13 and 14
|
25
|
-
*/
|
26
|
-
this.gts.blob = (function () {
|
27
|
-
/**
|
28
|
-
* Accepts the root element of a blob and a region, and adds the "region"
|
29
|
-
* class name to all li elements in the region.
|
30
|
-
*/
|
31
|
-
function highlightRegion(element, region) {
|
32
|
-
// Line numbers are 1-based, but ElementLists are 0-indexed,
|
33
|
-
// offset region accordingly
|
34
|
-
var start = region[0] - 1;
|
35
|
-
var end = region[1] - 1;
|
36
|
-
var lines = element.getElementsByTagName("li");
|
37
|
-
|
38
|
-
cull.doall(function (li, num) {
|
39
|
-
var inRegion = start <= num && num <= end;
|
40
|
-
dome.cn[inRegion ? "add" : "rm"]("region", li);
|
41
|
-
}, element.getElementsByTagName("li"));
|
42
|
-
}
|
43
|
-
|
44
|
-
/**
|
45
|
-
* Given an li element representing a line, return which line number it
|
46
|
-
* represents.
|
47
|
-
*/
|
48
|
-
function getLineNum(element) {
|
49
|
-
while (element && element.tagName !== "LI") {
|
50
|
-
element = element.parentNode;
|
51
|
-
}
|
52
|
-
var lineNum = element && element.className.match(/L(\d+)/)[1];
|
53
|
-
if (!lineNum) { return; }
|
54
|
-
return parseInt(lineNum, 10);
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* Set the active region. Marks the region and updates the URL with the
|
59
|
-
* new region as an anchor ("#L<start>-<end>").
|
60
|
-
*/
|
61
|
-
function setRegion(element, region, redirect) {
|
62
|
-
var regionStr = region[0];
|
63
|
-
regionStr += region[1] !== region[0] ? "-" + region[1] : "";
|
64
|
-
redirect("#L" + regionStr);
|
65
|
-
highlightRegion(element, region);
|
66
|
-
}
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Given two numbers, return a region where the lowest number is the start
|
70
|
-
* and the highest number is the end. The end is optional, in which case
|
71
|
-
* the [start, start] region is returned.
|
72
|
-
*/
|
73
|
-
function orderedRegion(start, end) {
|
74
|
-
end = typeof end === "number" ? end : start;
|
75
|
-
return [Math.min(start, end), Math.max(start, end)];
|
76
|
-
}
|
77
|
-
|
78
|
-
/**
|
79
|
-
* Track selected region through clicks on lines.
|
80
|
-
*
|
81
|
-
* Clicking a line highlights it by setting the region to that line
|
82
|
-
* (e.g [n, n]).
|
83
|
-
*
|
84
|
-
* Holding shift while clicking a line makes a region starting at the
|
85
|
-
* previously clicked line and ending at the line being clicked. Example:
|
86
|
-
*
|
87
|
-
* Click on line 4. Press shift, click line 9. Lines 4, 5, 6, 7, 8 and 9
|
88
|
-
* will be highlighted. While holding shift, click line 1. Lines 1, 2, 3 and
|
89
|
-
* 4 will be highlighted. Release shift, click line 5, line 5 (and no
|
90
|
-
* others) will be highlighted.
|
91
|
-
*/
|
92
|
-
function trackSelectedRegion(element, redirect) {
|
93
|
-
var shift = false, anchor;
|
94
|
-
var events = [];
|
95
|
-
|
96
|
-
dome.on(document.body, "keydown", function (e) {
|
97
|
-
shift = e.which === 16;
|
98
|
-
});
|
99
|
-
dome.on(document.body, "keyup", function (e) {
|
100
|
-
shift = e.which !== 16;
|
101
|
-
});
|
102
|
-
|
103
|
-
dome.on(element, "click", function (e) {
|
104
|
-
var region, currLine = getLineNum(e.target);
|
105
|
-
if (!shift || !anchor) { anchor = e.target; }
|
106
|
-
|
107
|
-
if (anchor && shift) {
|
108
|
-
region = orderedRegion(getLineNum(anchor), currLine);
|
109
|
-
e.preventDefault();
|
110
|
-
} else {
|
111
|
-
region = [currLine, currLine];
|
112
|
-
}
|
113
|
-
|
114
|
-
setRegion(element, region, redirect);
|
115
|
-
});
|
116
|
-
}
|
117
|
-
|
118
|
-
/**
|
119
|
-
* Track focus on lines by highlighting lines as the cursor hovers them, and
|
120
|
-
* by highlighting (and selecting) regions as lines are clicked (see the
|
121
|
-
* above function)
|
122
|
-
*/
|
123
|
-
function trackFocus(element, redirect) {
|
124
|
-
var highlight = function () { dome.cn.add("focus", this); };
|
125
|
-
var dim = function () { dome.cn.rm("focus", this); };
|
126
|
-
|
127
|
-
cull.doall(function (li) {
|
128
|
-
dome.on(li, "mouseenter", highlight);
|
129
|
-
dome.on(li, "mouseleave", dim);
|
130
|
-
}, element.getElementsByTagName("li"));
|
131
|
-
|
132
|
-
trackSelectedRegion(element, redirect);
|
133
|
-
}
|
134
|
-
|
135
|
-
/**
|
136
|
-
* Regions can be specified over the URL by using the #L<start>[-<end>]
|
137
|
-
* syntax. This function extracts it. Examples:
|
138
|
-
*
|
139
|
-
* /some/url#L1 - [1, 1]
|
140
|
-
* /some/url#L1-2 - [1, 2]
|
141
|
-
* /some/url#l12-2 - [2, 12] (ordered)
|
142
|
-
*/
|
143
|
-
function regionFromUrl(url) {
|
144
|
-
var matches = url.match(/\#l(\d+)(?:-(\d+))?/i);
|
145
|
-
if (!matches) { return; }
|
146
|
-
return orderedRegion(matches[1], matches[2] && Number(matches[2]));
|
147
|
-
}
|
148
|
-
|
149
|
-
return {
|
150
|
-
trackFocus: trackFocus,
|
151
|
-
regionFromUrl: regionFromUrl,
|
152
|
-
highlightRegion: highlightRegion
|
153
|
-
};
|
154
|
-
}());
|
@@ -1,51 +0,0 @@
|
|
1
|
-
/*global cull, dome, capillary, Raphael*/
|
2
|
-
this.gts = this.gts || {};
|
3
|
-
|
4
|
-
this.gts.capillary = function (element, data, messageUrl, idUrl) {
|
5
|
-
dome.cn.rm("loading", element);
|
6
|
-
element.innerHTML = "";
|
7
|
-
element.style.position = "relative";
|
8
|
-
|
9
|
-
var scale = 25;
|
10
|
-
var i, j, k, l, commits = 0, used = {};
|
11
|
-
|
12
|
-
for (i = 0, l = data.length; i < l; ++i) {
|
13
|
-
for (j = 0, k = data[i].length; j < k; ++j) {
|
14
|
-
if (!used[data[i][j].id]) {
|
15
|
-
commits += 1;
|
16
|
-
used[data[i][j].id] = true;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
var F = capillary.formatters;
|
22
|
-
var graph = capillary.graph.create();
|
23
|
-
var canvas = new Raphael(element, (data.length + 1) * scale, commits * scale);
|
24
|
-
|
25
|
-
var dotRadius = 6;
|
26
|
-
var colors = ["#3d4250", "#5ea861", "#d36c6d", "#5b82d2", "#ccc62e", "#d28e23",
|
27
|
-
"#917549", "#9198aa", "#5bbad2", "#65ccab", "#92de2f", "#8a2c2c",
|
28
|
-
"#855bd2", "#c157c8"];
|
29
|
-
|
30
|
-
var scaled = F.scale.bindGraph(graph, {
|
31
|
-
scale: scale,
|
32
|
-
offset: { x: 30, y: 10 }
|
33
|
-
});
|
34
|
-
|
35
|
-
F.raphael.bindGraph(F.svgData.bindGraph(scaled), {
|
36
|
-
dotRadius: dotRadius,
|
37
|
-
canvas: canvas,
|
38
|
-
dotColors: colors
|
39
|
-
/*,lineColors: colors*/
|
40
|
-
});
|
41
|
-
|
42
|
-
F.messageMarkup.bindGraph(scaled, {
|
43
|
-
offset: [0, -(dotRadius + 2)],
|
44
|
-
root: element,
|
45
|
-
idUrl: idUrl,
|
46
|
-
messageUrl: messageUrl
|
47
|
-
/*,renderRefTypes: ["tags", "heads"]*/
|
48
|
-
});
|
49
|
-
|
50
|
-
graph.graphBranches(capillary.branch.fromArray(data));
|
51
|
-
};
|