/**
 * @license almond 0.3.0 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/almond for details
 */

// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.2 - JavaScript Vector Library                          │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
// └────────────────────────────────────────────────────────────────────┘ \\
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ┌────────────────────────────────────────────────────────────┐ \\
// │ Eve 0.4.2 - JavaScript Events Library                      │ \\
// ├────────────────────────────────────────────────────────────┤ \\
// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\
// └────────────────────────────────────────────────────────────┘ \\

// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ "Raphaël 2.1.2" - JavaScript Vector Library                         │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
// └─────────────────────────────────────────────────────────────────────┘ \\

// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël - JavaScript Vector Library                                 │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ SVG Module                                                          │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
// └─────────────────────────────────────────────────────────────────────┘ \\

// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël - JavaScript Vector Library                                 │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ VML Module                                                          │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
// └─────────────────────────────────────────────────────────────────────┘ \\

var requirejs,require,define;if(function(t){function e(t,e){return v.call(t,e)}function r(t,e){var r,n,i,a,s,o,c,h,u,l,f,p=e&&e.split("/"),d=g.map,x=d&&d["*"]||{};if(t&&"."===t.charAt(0))if(e){for(p=p.slice(0,p.length-1),t=t.split("/"),s=t.length-1,g.nodeIdCompat&&m.test(t[s])&&(t[s]=t[s].replace(m,"")),t=p.concat(t),u=0;u<t.length;u+=1)if(f=t[u],"."===f)t.splice(u,1),u-=1;else if(".."===f){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||x)&&d){for(r=t.split("/"),u=r.length;u>0;u-=1){if(n=r.slice(0,u).join("/"),p)for(l=p.length;l>0;l-=1)if(i=d[p.slice(0,l).join("/")],i&&(i=i[n])){a=i,o=u;break}if(a)break;!c&&x&&x[n]&&(c=x[n],h=u)}!a&&c&&(a=c,o=h),a&&(r.splice(0,o,a),t=r.join("/"))}return t}function n(e,r){return function(){var n=y.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(t,n.concat([e,r]))}}function i(t){return function(e){return r(e,t)}}function a(t){return function(e){p[t]=e}}function s(r){if(e(d,r)){var n=d[r];delete d[r],x[r]=!0,h.apply(t,n)}if(!e(p,r)&&!e(x,r))throw new Error("No "+r);return p[r]}function o(t){var e,r=t?t.indexOf("!"):-1;return r>-1&&(e=t.substring(0,r),t=t.substring(r+1,t.length)),[e,t]}function c(t){return function(){return g&&g.config&&g.config[t]||{}}}var h,u,l,f,p={},d={},g={},x={},v=Object.prototype.hasOwnProperty,y=[].slice,m=/\.js$/;l=function(t,e){var n,a=o(t),c=a[0];return t=a[1],c&&(c=r(c,e),n=s(c)),c?t=n&&n.normalize?n.normalize(t,i(e)):r(t,e):(t=r(t,e),a=o(t),c=a[0],t=a[1],c&&(n=s(c))),{f:c?c+"!"+t:t,n:t,pr:c,p:n}},f={require:function(t){return n(t)},exports:function(t){var e=p[t];return"undefined"!=typeof e?e:p[t]={}},module:function(t){return{id:t,uri:"",exports:p[t],config:c(t)}}},h=function(r,i,o,c){var h,u,g,v,y,m,b=[],_=typeof o;if(c=c||r,"undefined"===_||"function"===_){for(i=!i.length&&o.length?["require","exports","module"]:i,y=0;y<i.length;y+=1)if(v=l(i[y],c),u=v.f,"require"===u)b[y]=f.require(r);else if("exports"===u)b[y]=f.exports(r),m=!0;else if("module"===u)h=b[y]=f.module(r);else if(e(p,u)||e(d,u)||e(x,u))b[y]=s(u);else{if(!v.p)throw new Error(r+" missing "+u);v.p.load(v.n,n(c,!0),a(u),{}),b[y]=p[u]}g=o?o.apply(p[r],b):void 0,r&&(h&&h.exports!==t&&h.exports!==p[r]?p[r]=h.exports:g===t&&m||(p[r]=g))}else r&&(p[r]=o)},requirejs=require=u=function(e,r,n,i,a){if("string"==typeof e)return f[e]?f[e](r):s(l(e,r).f);if(!e.splice){if(g=e,g.deps&&u(g.deps,g.callback),!r)return;r.splice?(e=r,r=n,n=null):e=t}return r=r||function(){},"function"==typeof n&&(n=i,i=a),i?h(t,e,r,n):setTimeout(function(){h(t,e,r,n)},4),u},u.config=function(t){return u(t)},requirejs._defined=p,define=function(t,r,n){r.splice||(n=r,r=[]),e(p,t)||e(d,t)||(d[t]=[t,r,n])},define.amd={jQuery:!0}}(),define("libs/almond",function(){}),"function"!=typeof define)var define=require("amdefine")(module);if(define("Kit",[],function(){function t(e,a){return e._Set?e:(a||(e=n(e)),e.contains=function(t,n){return!!~r(e,t,n)},e.indexOf=function(t,n){return r(e,t,n)},e.toArray=function(){return i(e)},e.union=function(r){r=t(r);for(var n=e.length+r.length,a=new e.constructor(n),s=0,o=0,c=0;c<n;c++)e[s]===r[o]?(a[c]=e[s++],o++,n--):e[s]<r[o]?a[c]=e[s++]:a[c]=r[o++];return a.length=n,t(a.length===n?a:i(a,n),!0)},e.inspect=e.toArray,e._Set=!0,e)}function e(t,e){return t<e?E:t===e?C:k}function r(t,r,n){var i,a,s=0,o=t.length,c=o-1;if(o<1)return-1;if(n=n||e,1===o)return n(r,t[s])===C?s:-1;if(n(r,t[s])===E||n(r,t[c])===k)return-1;do{if(i=s+(c-s+1>>1),a=n(r,t[i]),a===C)return i;a===E?c=i-1:s=i+1}while(s<=c);return-1}function n(t){var e=t.length;if(e<=1)return t;for(var r,n,a,s=1,o=e/3|0;s<o;)s=3*s+1;for(;s>0;){for(r=s;r<e;r++)for(n=r;n>=s&&t[n]<t[n-s];n-=s)a=t[n],t[n]=t[n-s],t[n-s]=a;s=s/3|0}var c,h=t[0];for(r=1,n=1;r<e;r++)c=t[r],c!==h&&(h=t[n++]=t[r]);return t.length=n,t.length===n?t:i(t,n)}function i(t,e){e="undefined"==typeof e?t.length:e;for(var r=new t.constructor(e),n=e;n--;)r[n]=t[n];return r}function a(t){for(var e,r={},n=0,i=0,a=t.length;n<a;n++)e=t[n],r.hasOwnProperty(e)||(r[e]=1,t[i++]=e);return t.length=i,t}function s(t){var e,r,n,i=t.length,a=(1e10*Math.random()).toString(32)+(+new Date).toString(32);for(e=r=0;e<i;e++)n=t[e],null!=n&&(n.hasOwnProperty(a)||(Object.defineProperty(n,a,{value:1,enumerable:!1}),t[r++]=n));for(e=r;e--;)t[e][a]=void 0;return t.length=r,t}function o(t){t=t.map(function(t){return t[1]?t:t+t});var e,r,i,a,s,o;t=n(t),o=t.length;var c,h,u=Object.create(null),l=Object.create(null),f=Object.create(null);for(e=0;e<o;e++)for(s=t[e],h=s[1],l[s[0]]=!0,f[h]=!0,r=e;r<o;r++)if(c=t[r][0],c>=h){c===h&&(u[h]=!0);break}var g=n(t.join("").split("")),x=Object.keys(u),v=g[0],y=Object.create(null),m=Object.create(null);for(e=0;e<o;e++)y[t[e]]=[];if(u[v])for(e=0;e<o;e++)if(s=t[e],s[0]===v)y[s].push(v);else if(s[0]>v)break;for(e=0,a=g.length-1;e<a;e++){if(c=g[e],h=g[e+1],f[c]&&(c=d(c)),l[h]&&(h=p(h)),c<=h)for(v=c===h?c:c+h,r=0;r<o&&(s=t[r],!(s[0]>h));r++)s[0]<=c&&h<=s[1]&&(y[s].push(v),x.push(v));if(c=g[e],h=g[e+1],u[h])for(r=0;r<o&&(s=t[r],!(s[0]>h));r++)s[0]<=h&&h<=s[1]&&y[s].push(h)}x=n(x);for(i in y)m[i[0]===i[1]?i[0]:i]=y[i];return{ranges:x,map:m}}function c(t){var e="\0",r=String.fromCharCode(65535);t=o(t).ranges;var n=[];if(!t.length)return n;t[0][0]!==e&&t.unshift(r);var i=t.length-1;return(t[i][1]||t[i][0])!==r&&t.push(e),t.reduce(function(t,e){var r=d(t[1]||t[0]),i=p(e[0]);return r<i&&n.push(r+i),r===i&&n.push(r),e}),n}function h(t){t=t.split("");var e=[],r=[],n="^"===t[0]&&t.length>1&&t.shift();return t.forEach(function(t){if("-"==e[0]&&e.length>1){if(e[1]>t)throw new Error("Charset range out of order:"+e[1]+"-"+t+"!");r.push(e[1]+t),e.splice(0,2)}else e.unshift(t)}),r=r.concat(e),n?c(r):o(r).ranges}function u(t){if(!t.length)return[];var e=[t[0]];return t.reduce(function(t,r){var n=e.length-1;return t[t.length-1]===p(r[0])?e[n]=e[n][0]+r[r.length-1]:(e.push(r),r)}),e.reduce(function(t,e){return 2===e.length&&e[0]===p(e[1])?(t.push(e[0]),t.push(e[1])):t.push(e),t},[])}function l(t){return String.fromCharCode(t)}function f(t){return t.charCodeAt(0)}function p(t){return String.fromCharCode(t.charCodeAt(0)-1)}function d(t){return String.fromCharCode(t.charCodeAt(0)+1)}function g(t,e){var r=/[\x00-\x1F\x7F-\x9F]/,n=/[\u009F-\uFFFF]/;return t=t.split("").map(function(t){return!e&&S.hasOwnProperty(t)?S[t]:n.test(t)?"\\u"+("00"+f(t).toString(16).toUpperCase()).slice(-4):r.test(t)?"\\x"+("0"+f(t).toString(16).toUpperCase()).slice(-2):t}).join("")}function x(t){return[].concat.apply([],t)}function v(t,e){return new Array(e+1).join(t)}function y(){var t=_.call(arguments);if(w)Function.prototype.apply.apply(console.log,[console,t]);else{var e="util",r=require(e);t.forEach(function(t){console.log(r.inspect(t,{showHidden:!1,customInspect:!0,depth:64,colors:!0}))})}}function m(t){for(var e,r=t.toString(),n=/^\s+function\s+([a-zA-Z]\w+)\s*\(/gm,i=[];e=n.exec(r);)i.push(e[1]);for(var t,a=[];t=i.pop();)a.push(t+":"+t);return"{\n"+a.join(",\n")+"\n}"}var b=Array.prototype,_=b.slice,w=function(){return"[object Window]"===this.toString()}(),E=-1,C=0,k=1,S={"\n":"\\n","\t":"\\t","\f":"\\f","\r":"\\r"," ":" ","\\":"\\\\","\0":"\\0"};return{sortUnique:n,idUnique:s,hashUnique:a,Set:t,repeats:v,negate:c,coalesce:u,classify:o,parseCharset:h,chr:l,ord:f,pred:p,succ:d,toPrint:g,flatten2:x,log:y,isBrowser:w,locals:m}}),"function"!=typeof define)var define=require("amdefine")(module);if(define("NFA",["./Kit"],function(t){function e(e){e=e.compact?c(e):e;var s,o={},h=e.trans,u={};for(s=0,n=e.accepts.length;s<n;s++)o[e.accepts[s]]=!0;var l;for(s=0,n=h.length;s<n;s++)l=h[s],l.charset?l.ranges="string"==typeof l.charset?t.parseCharset(l.charset):l.charset:l.eMove=!0,l.from.forEach(function(t){var e=u[t]=u[t]||{eMoveStates:[],eMove:[],charMove:{},trans:[],ranges:[]};l.eMove?e.eMoveStates=e.eMoveStates.concat(l.to):e.ranges=e.ranges.concat(l.ranges),e.trans.push(l)});var f=Object.keys(u);return f.forEach(function(e){var r=u[e],n=r.trans,i=r.charMove,a=r.eMove,s=r.ranges,o=t.classify(s),c=o.map;n.forEach(function(e){e.eMove?e.to.forEach(function(t){a.push({to:t,action:e.action,assert:e.assert,eMove:!0})}):t.flatten2(e.ranges.map(function(t){return c[t]})).forEach(function(t){(i[t]=i[t]||[]).push(e)})}),s=t.Set(o.ranges.filter(function(t){return!!t[1]})),r.ranges=s,Object.keys(i).forEach(function(t){var e=i[t],r=[];n.forEach(function(t){t.to.forEach(function(n){(t.eMove||~e.indexOf(t))&&r.push({to:n,action:t.action,assert:t.assert,eMove:t.eMove})})}),i[t]=r}),delete r.trans,delete r.eMoveStates}),{accepts:o,router:u,input:a,assertDFA:i,accept:r}}function r(t){return this.accepts.hasOwnProperty(t)}function i(){for(var e,r=this.router,n=Object.keys(r),i=0,a=n.length;i<a;i++){if(e=r[n[i]],e.eMove.length>1)throw new Error("DFA Assertion Fail!\nFrom state `"+n[i]+"` can goto to multi ε-move states!");for(var s=e.charMove,o=Object.keys(s),c=0,h=o.length;c<h;c++){var u=s[o[c]];if(1!==u.length)throw t.log(s),new Error("DFA Assertion Fail!\nFrom state `"+n[i]+"` via charset `"+o[c]+"` can goto to multi states!")}if(o.length&&e.eMove.length)throw new Error("DFA Assertion Fail!\nFrom state `"+n[i]+"` can goto extra ε-move state!")}return!0}function a(e,r,n){function i(e,r,o,c,h){t:for(;;){var u,l,f,p,d=a.router[o];if(!d)break;var g,x=d.eMove,v=d.charMove;r<e.length?(u=e[r],g=v.hasOwnProperty(u)?v[u]:(l=s(d.ranges,u))?v[l]:x):g=x;for(var y,m,b,_=c.length,w=h,E=0,C=g.length;E<C;E++){if(y=g[E],f=y.eMove?0:1,h=w,c.splice(0,c.length-_),_=c.length,y.assert){if((m=y.assert(c,u,r,o,e))===!1)continue;"number"==typeof m&&(r+=m,h+=m)}if(y.action&&(c=y.action(c,u,r,o,e)||c),h=y.eMove?h:r,n&&t.log(u+":"+o+">"+y.to),E===C-1){r+=f,o=y.to;continue t}if(b=i(e,r+f,y.to,c,h),b.acceptable)return b;p=b}if(p)return p;break}return{stack:c,lastIndex:h,lastState:o,acceptable:a.accept(o)}}r=r||0;var a=this;return i(e,r,"start",[],r-1)}function s(t,e){var r=t.indexOf(e,o);return!!~r&&t[r]}function o(t,e){var r=e[0],n=e[1];return t>n?1:t<r?-1:0}function c(t){t.accepts=t.accepts.split(",");for(var e,r,n,i,a=t.trans,s=a.length;s--;)e=a[s],r=e[0].split(">"),n=r[0].split(","),i=r[1].split(","),a[s]={from:n,to:i,charset:e[1],action:e[2],assert:e[3]};return t.compact=!1,t}return e}),"function"!=typeof define)var define=require("amdefine")(module);if(define("parse",["./NFA","./Kit"],function(t,e){function r(){var t=Object.keys(p).map(function(t){return t+"="+JSON.stringify(p[t])}).join(";"),e=function(){return this}();e.eval(t)}function n(t){this.raw=t.raw,this.tree=t.tree,this.groupCount=t.groupCount}function i(t,e){d=e;var r,i,s,p=a();r=p.input(t,0,e),i=r.stack,i=v.endChoice(i),s=r.lastState;var g=r.acceptable&&r.lastIndex===t.length-1;if(!g){var x;switch(s){case"charsetRangeEndWithNullChar":x={type:"CharsetRangeEndWithNullChar",message:"Charset range end with NUL char does not make sense!\nBecause [a-\\0] is not a valid range.\nAnd [\\0-\\0] should be rewritten into [\\0]."};break;case"repeatErrorFinal":x={type:"NothingRepeat",message:"Nothing to repeat!"};break;case"digitFollowNullError":x={type:"DigitFollowNullError",message:"The '\\0' represents the <NUL> char and cannot be followed by a decimal digit!"};break;case"charsetRangeEndClass":x={type:"CharsetRangeEndClass",message:'Charset range ends with class such as "\\w\\W\\d\\D\\s\\S" is invalid!'};break;case"charsetOctEscape":x={type:"DecimalEscape",message:"Decimal escape appears in charset is invalid.Because it can't be explained as  backreference.And octal escape is deprecated!"};break;default:0===s.indexOf("charset")?x={type:"UnclosedCharset",message:"Unterminated character class!"}:")"===t[r.lastIndex]?x={type:"UnmatchedParen",message:"Unmatched end parenthesis!"}:(x={type:"UnexpectedChar",message:"Unexpected char!"},r.lastIndex++)}if(x)throw x.lastIndex=r.lastIndex,x.astStack=r.stack,x.lastState=s,new f(x)}if(i._parentGroup)throw new f({type:"UnterminatedGroup",message:"Unterminated group!",lastIndex:i._parentGroup.indices[0],lastState:s,astStack:i});if(g){var y=i.groupCounter?i.groupCounter.i:0;delete i.groupCounter,h(i,t,t.length),i=o(i);var m=new n({raw:t,groupCount:y,tree:i});return m.traverse(l,CHARSET_NODE),m.traverse(u,ASSERT_NODE),c(i),d=!1,m}}function a(){return g||(g=t(M,d)),g}function s(t,e,r){Object.defineProperty(t,e,{value:r,enumerable:d,writable:!0,configurable:!0})}function o(t){return t.filter(function(t){return t.type==EXACT_NODE&&t.concatTemp?(delete t.concatTemp,!!t.chars):(t.sub?t.sub=o(t.sub):t.branches&&(t.branches=t.branches.map(o)),!0)})}function c(t){function e(t){t.sub?c(t.sub):t.branches&&t.branches.map(c)}var r=t[0];e(r);for(var n,i=1,a=1,s=t.length;i<s;i++){if(n=t[i],n.type===EXACT_NODE){if(r.type===EXACT_NODE&&!r.repeat&&!n.repeat){r.indices[1]=n.indices[1],r.raw+=n.raw,r.chars+=n.chars;continue}}else e(n);t[a++]=n,r=n}r&&(t.length=a)}function h(t,e,r){return t.length?(t.reduce(function(t,r){return r.indices.push(t),r.raw=e.slice(r.indices[0],t),r.type===GROUP_NODE||r.type===ASSERT_NODE&&r.sub?h(r.sub,e,r.endParenIndex):r.type===CHOICE_NODE?(r.branches.reduce(function(t,r){h(r,e,t);var n=r[0];return(n?n.indices[0]:t)-1},t),r.branches.reverse()):r.type===EXACT_NODE&&(r.concatTemp||(r.chars=r.chars||r.raw)),r.indices[0]},r),void t.reverse()):void t.push({type:EMPTY_NODE,indices:[r,r]})}function u(t){if(t.repeat){var e=t.assertionType,r="Nothing to repeat! Repeat after assertion doesn't make sense!";if("AssertLookahead"===e||"AssertNegativeLookahead"===e){var n="AssertLookahead"===e?"?=":"?!",i="("+n+"b)";r+="\n/a"+i+"+/、/a"+i+"{1,n}/ are the same as /a"+i+"/。\n/a"+i+"*/、/a"+i+"{0,n}/、/a"+i+"?/ are the same as /a/。"}throw new f({type:"NothingRepeat",lastIndex:t.indices[1]-1,message:r})}}function l(t){t.ranges=e.sortUnique(t.ranges.map(function(t){if(t[0]>t[1])throw new f({type:"OutOfOrder",lastIndex:t.lastIndex,message:"Range ["+t.join("-")+"] out of order in character class!"});return t.join("")}))}function f(t){this.name="RegexSyntaxError",this.type=t.type,this.lastIndex=t.lastIndex,this.lastState=t.lastState,this.astStack=t.astStack,this.message=t.message,Object.defineProperty(this,"stack",{value:new Error(t.message).stack,enumerable:!1})}var p={EXACT_NODE:"exact",CHARSET_NODE:"charset",CHOICE_NODE:"choice",GROUP_NODE:"group",ASSERT_NODE:"assert",DOT_NODE:"dot",BACKREF_NODE:"backref",EMPTY_NODE:"empty",AssertLookahead:"AssertLookahead",AssertNegativeLookahead:"AssertNegativeLookahead",AssertNonWordBoundary:"AssertNonWordBoundary",AssertWordBoundary:"AssertWordBoundary",AssertEnd:"AssertEnd",AssertBegin:"AssertBegin"};r(),n.prototype.traverse=function(t,e){function r(t,n){t.forEach(function(t){e&&t.type!==e||n(t),t.sub?r(t.sub,n):t.branches&&t.branches.forEach(function(t){r(t,n)})})}r(this.tree,t)};var d;i.Constants=p,i.exportConstants=r,i.RegexSyntaxError=f,i.getNFAParser=a;var g;f.prototype.toString=function(){return this.name+" "+this.type+":"+this.message};var x={n:"\n",r:"\r",t:"\t",v:"\v",f:"\f"},v=function(){function t(t,e,r){var n=t[0];(!n||n.type!=EXACT_NODE||n.repeat||n.chars&&!n.concatTemp)&&t.unshift({type:EXACT_NODE,indices:[r]}),n&&n.concatTemp&&(n.chars+=e)}function e(t,e,r){t.unshift({type:DOT_NODE,indices:[r]})}function r(t,e,r){t.unshift({type:EXACT_NODE,chars:"\0",indices:[r-1]})}function n(t,e,r){t.unshift({type:ASSERT_NODE,indices:[r],assertionType:AssertBegin})}function i(t,e,r,n,i){t.unshift({type:ASSERT_NODE,indices:[r],assertionType:AssertEnd})}function a(t,e,r){t.unshift({type:ASSERT_NODE,indices:[r-1],assertionType:"b"==e?AssertWordBoundary:AssertNonWordBoundary})}function o(t,e,r){var n=t[0];n.type!==EXACT_NODE&&t.unshift({type:EXACT_NODE,indices:[r]})}function c(t,e,r){var n=t[0];s(n,"_commaIndex",r)}function h(t,e,r,n,i){var a,s=t[0],o=i.lastIndexOf("{",r),c=parseInt(i.slice(o+1,s._commaIndex||r),10);if(s._commaIndex){if(a=s._commaIndex+1==r?1/0:parseInt(i.slice(s._commaIndex+1,r),10),a<c)throw new f({type:"OutOfOrder",lastState:n,lastIndex:r,astStack:t,message:"Numbers out of order in {} quantifier!"});delete s._commaIndex}else a=c;s.indices[0]>=o&&t.shift(),d(t,c,a,o,i)}function u(t,e,r,n,i){d(t,0,1/0,r,i)}function l(t,e,r,n,i){d(t,0,1,r,i)}function p(t,e,r,n,i){d(t,1,1/0,r,i)}function d(t,e,r,n,i){var a=t[0],o={min:e,max:r,nonGreedy:!1},c=n-1;if(a.chars&&1===a.chars.length&&(c=a.indices[0]),a.type===EXACT_NODE){var h={type:EXACT_NODE,repeat:o,chars:a.chars?a.chars:i[c],indices:[c]};a.indices[0]===c&&t.shift(),t.unshift(h)}else a.repeat=o;s(o,"beginIndex",n-t[0].indices[0])}function g(t){t[0].repeat.nonGreedy=!0}function v(t,e,r){t.unshift({concatTemp:!0,type:EXACT_NODE,chars:"",indices:[r]})}function y(t,e,r){x.hasOwnProperty(e)&&(e=x[e]),t.unshift({type:EXACT_NODE,chars:e,indices:[r-1]})}function m(t,e,r){t.unshift({type:CHARSET_NODE,indices:[r-1],chars:"",ranges:[],classes:[e],exclude:!1})}function b(t,e,r,n,i){e=String.fromCharCode(parseInt(i[r-1]+e,16)),t.shift(),t.unshift({type:EXACT_NODE,chars:e,indices:[r-3]})}function _(t,e,r,n,i){e=String.fromCharCode(parseInt(i.slice(r-3,r+1),16)),t.shift(),t.unshift({type:EXACT_NODE,chars:e,indices:[r-5]})}function w(t,e,r){var n=t.groupCounter=t.groupCounter||{i:0};n.i++;var i={type:GROUP_NODE,num:n.i,sub:[],indices:[r],_parentStack:t};return t=i.sub,s(t,"_parentGroup",i),t.groupCounter=n,t}function E(t){var e=t._parentGroup;e.nonCapture=!0,e.num=void 0,t.groupCounter.i--}function C(t,e,r){var n=t._parentGroup;n.type=ASSERT_NODE,n.assertionType="="==e?AssertLookahead:AssertNegativeLookahead,n.num=void 0,t.groupCounter.i--}function k(t,e,r,n,i){t=A(t);var a=t._parentGroup;if(!a)throw new f({type:"UnexpectedChar",lastIndex:r,lastState:n,astStack:t,message:"Unexpected end parenthesis!"});return delete t._parentGroup,delete t.groupCounter,t=a._parentStack,delete a._parentStack,t.unshift(a),a.endParenIndex=r,t}function S(t,e,r){var n,i=[];if(t._parentChoice)n=t._parentChoice,n.branches.unshift(i),s(i,"_parentChoice",n),s(i,"_parentGroup",n),i.groupCounter=t.groupCounter,delete t._parentChoice,delete t.groupCounter;else{var a=t[t.length-1];n={type:CHOICE_NODE,indices:[a?a.indices[0]:r-1],branches:[]},s(n,"_parentStack",t),n.branches.unshift(t.slice()),t.length=0,t.unshift(n),i.groupCounter=t.groupCounter,s(i,"_parentChoice",n),s(i,"_parentGroup",n),n.branches.unshift(i)}return i}function A(t){if(t._parentChoice){var e=t._parentChoice;delete t._parentChoice,delete t._parentGroup,delete t.groupCounter;var r=e._parentStack;return delete e._parentStack,r}return t}function B(t,e,r){t.unshift({type:CHARSET_NODE,indices:[r],classes:[],ranges:[],chars:""})}function N(t){t[0].exclude=!0}function O(t,e,r){t[0].chars+=e}function T(t,e,r){x.hasOwnProperty(e)&&(e=x[e]),t[0].chars+=e}function R(t,e,r){t[0].chars+="\0"}function I(t,e){t[0].classes.push(e)}function M(t,e,r,n,i){var a=t[0];e=String.fromCharCode(parseInt(a.chars.slice(-1)+e,16)),a.chars=a.chars.slice(0,-2),a.chars+=e}function F(t,e,r,n,i){var a=t[0];e=String.fromCharCode(parseInt(a.chars.slice(-3)+e,16)),a.chars=a.chars.slice(0,-4),a.chars+=e}function D(t,e,r,n,i){var a=t[0],s=a.chars.slice(-2);s=[s[0],e],s.lastIndex=r,a.ranges.push(s),a.chars=a.chars.slice(0,-2)}function P(t,e){x.hasOwnProperty(e)&&(e=x[e]),D.apply(this,arguments)}function L(t,e,r){var n=t[0],i=n.chars.slice(-3)+e;n.chars=n.chars.slice(0,-3);var a=n.ranges.pop();e=String.fromCharCode(parseInt(i,16)),a=[a[0],e],a.lastIndex=r,n.ranges.push(a)}function z(t,e,r){var n=t[0],i=n.chars.slice(-1)+e;n.chars=n.chars.slice(0,-1);var a=n.ranges.pop();e=String.fromCharCode(parseInt(i,16)),a=[a[0],e],a.lastIndex=r,n.ranges.push(a)}function j(t,e,r,n){function i(t,e){return!!e._parentGroup&&(e._parentGroup.num==t?t:i(t,e._parentGroup._parentStack))}var a=t[0],s=parseInt(e,10),o="escape"===n,c=t.groupCounter,h=c&&c.i||0;if(o?(a={type:BACKREF_NODE,indices:[r-1]},t.unshift(a)):s=parseInt(a.num+""+s,10),s>h)throw new f({type:"InvalidBackReference",lastIndex:r,astStack:t,lastState:n,message:"Back reference number("+s+") greater than current groups count("+h+")."});if(i(s,t))throw new f({type:"InvalidBackReference",lastIndex:r,astStack:t,lastState:n,message:"Recursive back reference in group ("+s+") itself."});a.num=s}return{escapeStart:v,exact:t,dot:e,nullChar:r,assertBegin:n,assertEnd:i,assertWordBoundary:a,repeatnStart:o,repeatnComma:c,repeatNonGreedy:g,repeatnEnd:h,repeat1:p,repeat01:l,repeat0:u,charClassEscape:m,normalEscape:y,unicodeEscape:_,hexEscape:b,charClassEscape:m,groupStart:w,groupNonCapture:E,backref:j,groupToAssertion:C,groupEnd:k,choice:S,endChoice:A,charsetStart:B,charsetExclude:N,charsetContent:O,charsetNullChar:R,charsetClassEscape:I,charsetHexEscape:M,charsetUnicodeEscape:F,charsetRangeEnd:D,charsetNormalEscape:T,charsetRangeEndNormalEscape:P,charsetRangeEndUnicodeEscape:L,charsetRangeEndHexEscape:z}}(),y="0-9",m="0-9a-fA-F",b="^+*?^$.|(){[\\",_="dDwWsS",w="u",E="x",C="^"+_+w+E+"0-9",k=C+"bB1-9",S="repeatnStart,repeatn_1,repeatn_2,repeatnErrorStart,repeatnError_1,repeatnError_2",A="hexEscape1,hexEscape2",B="unicodeEscape1,unicodeEscape2,unicodeEscape3,unicodeEscape4",N=A+","+B,O="charsetUnicodeEscape1,charsetUnicodeEscape2,charsetUnicodeEscape3,charsetUnicodeEscape4,charsetHexEscape1,charsetHexEscape2",T="charsetRangeEndUnicodeEscape1,charsetRangeEndHexEscape1",R="charsetRangeEndUnicodeEscape2,charsetRangeEndUnicodeEscape3,charsetRangeEndUnicodeEscape4,charsetRangeEndHexEscape2",I=T+","+R,M={compact:!0,accepts:"start,begin,end,repeat0,repeat1,exact,repeatn,repeat01,repeatNonGreedy,choice,"+(S+",nullChar,digitBackref,"+B+","+A),trans:[["start,begin,end,exact,repeatNonGreedy,repeat0,repeat1,repeat01,groupStart,groupQualifiedStart,choice,repeatn>exact",b,v.exact],[N+">exact",b+m,v.exact],["nullChar>exact",b+y,v.exact],[S+",nullChar,digitBackref,"+B+","+A+",start,begin,end,exact,repeatNonGreedy,repeat0,repeat1,repeat01,groupStart,groupQualifiedStart,choice,repeatn>exact",".",v.dot],["start,groupStart,groupQualifiedStart,end,begin,exact,repeat0,repeat1,repeat01,repeatn,repeatNonGreedy,choice,"+S+",nullChar,digitBackref,"+B+","+A+">begin","^",v.assertBegin],[S+",nullChar,digitBackref,"+B+","+A+",exact>repeatnStart","{",v.repeatnStart],["start,begin,end,groupQualifiedStart,groupStart,repeat0,repeat1,repeatn,repeat01,repeatNonGreedy,choice>repeatnErrorStart","{",v.exact],["repeatnStart>repeatn_1",y,v.exact],["repeatn_1>repeatn_1",y,v.exact],["repeatn_1>repeatn_2",",",v.repeatnComma],["repeatn_2>repeatn_2",y,v.exact],["repeatn_1,repeatn_2>repeatn","}",v.repeatnEnd],["repeatnStart,repeatnErrorStart>exact","}",v.exact],["repeatnStart,repeatnErrorStart>exact",b+"0-9}",v.exact],["repeatnErrorStart>repeatnError_1",y,v.exact],["repeatnError_1>repeatnError_1",y,v.exact],["repeatnError_1>repeatnError_2",",",v.exact],["repeatnError_2>repeatnError_2",y,v.exact],["repeatnError_2,repeatnError_1>repeatErrorFinal","}"],["repeatn_1,repeatnError_1>exact",b+y+",}",v.exact],["repeatn_2,repeatnError_2>exact",b+y+"}",v.exact],["exact,"+(S+",nullChar,digitBackref,"+B+","+A)+">repeat0","*",v.repeat0],["exact,"+(S+",nullChar,digitBackref,"+B+","+A)+">repeat1","+",v.repeat1],["exact,"+(S+",nullChar,digitBackref,"+B+","+A)+">repeat01","?",v.repeat01],["choice>repeatErrorFinal","*+?"],["repeat0,repeat1,repeat01,repeatn>repeatNonGreedy","?",v.repeatNonGreedy],["repeat0,repeat1,repeat01,repeatn>repeatErrorFinal","+*"],["start,begin,end,groupStart,groupQualifiedStart,exact,repeatNonGreedy,repeat0,repeat1,repeat01,repeatn,choice,"+(S+",nullChar,digitBackref,"+B+","+A)+">escape","\\",v.escapeStart],["escape>nullChar","0",v.nullChar],["nullChar>digitFollowNullError","0-9"],["escape>exact",k,v.normalEscape],["escape>exact","bB",v.assertWordBoundary],["escape>exact",_,v.charClassEscape],["escape>unicodeEscape1",w,v.exact],["unicodeEscape1>unicodeEscape2",m,v.exact],["unicodeEscape2>unicodeEscape3",m,v.exact],["unicodeEscape3>unicodeEscape4",m,v.exact],["unicodeEscape4>exact",m,v.unicodeEscape],["escape>hexEscape1",E,v.exact],["hexEscape1>hexEscape2",m,v.exact],["hexEscape2>exact",m,v.hexEscape],["escape>digitBackref","1-9",v.backref],["digitBackref>digitBackref",y,v.backref],["digitBackref>exact",b+y,v.exact],["exact,begin,end,repeat0,repeat1,repeat01,repeatn,repeatNonGreedy,start,groupStart,groupQualifiedStart,choice,"+(S+",nullChar,digitBackref,"+B+","+A)+">groupStart","(",v.groupStart],["groupStart>groupQualify","?"],["groupQualify>groupQualifiedStart",":",v.groupNonCapture],["groupQualify>groupQualifiedStart","=",v.groupToAssertion],["groupQualify>groupQualifiedStart","!",v.groupToAssertion],[S+",nullChar,digitBackref,"+B+","+A+",groupStart,groupQualifiedStart,begin,end,exact,repeat1,repeat0,repeat01,repeatn,repeatNonGreedy,choice>exact",")",v.groupEnd],["start,begin,end,groupStart,groupQualifiedStart,exact,repeat0,repeat1,repeat01,repeatn,repeatNonGreedy,choice,"+(S+",nullChar,digitBackref,"+B+","+A)+">choice","|",v.choice],["start,groupStart,groupQualifiedStart,begin,exact,repeat0,repeat1,repeat01,repeatn,repeatNonGreedy,choice,"+(S+",nullChar,digitBackref,"+B+","+A)+">end","$",v.assertEnd],["exact,begin,end,repeat0,repeat1,repeat01,repeatn,repeatNonGreedy,groupQualifiedStart,groupStart,start,choice,"+(S+",nullChar,digitBackref,"+B+","+A)+">charsetStart","[",v.charsetStart],["charsetStart>charsetExclude","^",v.charsetExclude],["charsetStart>charsetContent","^\\]^",v.charsetContent],["charsetExclude>charsetContent","^\\]",v.charsetContent],["charsetContent,charsetClass>charsetContent","^\\]-",v.charsetContent],["charsetClass>charsetContent","-",v.charsetContent],[O+",charsetStart,charsetContent,charsetNullChar,charsetClass,charsetExclude,charsetRangeEnd>charsetEscape","\\"],["charsetEscape>charsetContent",C,v.charsetNormalEscape],["charsetEscape>charsetNullChar","0",v.charsetNullChar],["charsetEscape>charsetOctEscape","1-9"],["charsetRangeEndEscape>charsetOctEscape","1-9"],["charsetNullChar>digitFollowNullError",y],["charsetNullChar>charsetContent","^0-9\\]-",v.charsetContent],["charsetEscape>charsetClass",_,v.charsetClassEscape],["charsetEscape>charsetUnicodeEscape1",w,v.charsetContent],["charsetUnicodeEscape1>charsetUnicodeEscape2",m,v.charsetContent],["charsetUnicodeEscape2>charsetUnicodeEscape3",m,v.charsetContent],["charsetUnicodeEscape3>charsetUnicodeEscape4",m,v.charsetContent],["charsetUnicodeEscape4>charsetContent",m,v.charsetUnicodeEscape],["charsetEscape>charsetHexEscape1",E,v.charsetContent],["charsetHexEscape1>charsetHexEscape2",m,v.charsetContent],["charsetHexEscape2>charsetContent",m,v.charsetHexEscape],[O+">charsetContent","^\\]"+m+"-",v.charsetContent],[O+",charsetNullChar,charsetContent>charsetRangeStart","-",v.charsetContent],["charsetRangeStart>charsetRangeEnd","^\\]",v.charsetRangeEnd],["charsetRangeEnd>charsetContent","^\\]",v.charsetContent],["charsetRangeStart>charsetRangeEndEscape","\\"],["charsetRangeEndEscape>charsetRangeEnd",k,v.charsetRangeEndNormalEscape],["charsetRangeEndEscape>charsetRangeEndWithNullChar","0"],["charsetRangeEndEscape>charsetRangeEndUnicodeEscape1",w,v.charsetRangeEnd],["charsetRangeEndUnicodeEscape1>charsetRangeEndUnicodeEscape2",m,v.charsetContent],["charsetRangeEndUnicodeEscape2>charsetRangeEndUnicodeEscape3",m,v.charsetContent],["charsetRangeEndUnicodeEscape3>charsetRangeEndUnicodeEscape4",m,v.charsetContent],["charsetRangeEndUnicodeEscape4>charsetRangeEnd",m,v.charsetRangeEndUnicodeEscape],["charsetRangeEndEscape>charsetRangeEndHexEscape1",E,v.charsetRangeEnd],["charsetRangeEndHexEscape1>charsetRangeEndHexEscape2",m,v.charsetContent],["charsetRangeEndHexEscape2>charsetRangeEnd",m,v.charsetRangeEndHexEscape],["charsetRangeEndEscape>charsetRangeEndClass",_],[T+">charsetContent","^\\]"+m,v.charsetContent],[R+">charsetRangeStart","-",v.charsetContent],[O+","+I+",charsetNullChar,charsetRangeStart,charsetContent,charsetClass,charsetExclude,charsetRangeEnd>exact","]"]]};return i}),"function"!=typeof define)var define=require("amdefine")(module);if(define("RegExp",["./parse","./Kit","./NFA"],function(t,e,r){function n(e,r){if(!(this instanceof n))return new n(e,r);e+="";var o={};"string"==typeof r?(r=r.toLowerCase(),~r.indexOf("i")&&(o.ignoreCase=!0),~r.indexOf("m")&&(o.multiline=!0),~r.indexOf("g")&&(o.global=!0),~r.indexOf("d")&&(o.debug=!0)):o=r;var c=this.ast=t(e);this.source=e,this.multiline=!!o.multiline,this.global=!!o.global,this.ignoreCase=!!o.ignoreCase,this.debug=!!o.debug,this.flags="",this.multiline&&(this.flags+="m"),this.ignoreCase&&(this.flags+="i"),this.global&&(this.flags+="g"),p(this,["source","options","multiline","global","ignoreCase","flags","debug"]);var h=this.ignoreCase;c.traverse(function(t){s(t,h)},CHARSET_NODE),c.traverse(function(t){i(t,h)},EXACT_NODE),this.multiline&&c.traverse(a,ASSERT_NODE)}function i(t,e){var r;r=t.chars.split(""),r=e?r.map(function(t){return/[a-z]/.test(t)?[t,t.toUpperCase()]:/[A-Z]/.test(t)?[t,t.toLowerCase()]:[t]}):r.map(function(t){return[t]}),t.explained=r}function a(t){var e=t.assertionType;e!==AssertBegin&&e!==AssertEnd||(t.multiline=!0)}function s(t,r){var n=t.chars.split("");n=n.concat(e.flatten2(t.classes.map(function(t){return g[t]}))),n=n.concat(t.ranges),r&&(n=o(n)),n=e.classify(n).ranges,t.exclude&&(n=e.negate(n)),n=e.coalesce(n),t.explained=n}function o(t){return e.flatten2(t.map(function(t){var r=e.classify([t,"az","AZ"]).map[t];return e.flatten2(r.map(function(t){return/[a-z]/.test(t)?[t,t.toUpperCase()]:/[A-Z]/.test(t)?[t,t.toLowerCase()]:[t]}))}))}function c(t,e){var r,n=[];return e=e||["start"],r=t.reduce(function(t,e){var r=h(e,t);return n=n.concat(r.trans),r.accepts},e),{accepts:r,trans:n}}function h(t,e){return t.repeat?f(t,e):m[t.type](t,e)}function u(t,e,r){for(var n,i,a,s=0,o=t.length;s<o;s++)if(a=t[s],a.num===e)if(a.type===y)i=a.index;else if(a.type===v){n=a.index;break}if(void 0!==n&&void 0!==i)return r.slice(n,i)}function l(){return"q"+x++}function f(t,e){var r,n,i=m[t.type],a=[],s=t.repeat,o=s.min,c=s.max;for(n=o;n--;)r=i(t,e),a=a.concat(r.trans),e=r.accepts;var h=[],u=[].concat(e);if(isFinite(c))for(;c>o;c--)r=i(t,e),h=h.concat(r.trans),e=r.accepts,u=u.concat(r.accepts);else{var f=e.slice();r=i(t,e),h=h.concat(r.trans),u=u.concat(r.accepts),h.push({from:r.accepts,to:f,charset:!1})}var p=[l()];return s.nonGreedy?(a.push({from:u,to:p,charset:!1}),a=a.concat(h)):(a=a.concat(h),a.push({from:u,to:p,charset:!1})),{accepts:p,trans:a}}function p(t,e){e.forEach(function(e){Object.defineProperty(t,e,{writable:!1,enumerable:!0})})}t.exportConstants(),n.DEBUG=n.D=1,n.MULTILINE=n.M=2,n.GLOBAL=n.G=4,n.IGNORECASE=n.I=8,n.prototype={toString:function(){return"/"+this.source+"/"+this.flags},test:function(t){return null!==this.exec(t)},exec:function(t){for(var e,r=this.getNFA(),n=this.global?this.lastIndex||0:0,i=t.length;n<i&&(e=r.input(t,n),!e.acceptable);n++);if(!e||!e.acceptable)return this.lastIndex=0,null;var a=new Array(this.ast.groupCount+1);a[0]=t.slice(n,e.lastIndex+1);for(var s=e.stack,o=1,c=a.length;o<c;o++)a[o]=u(s,o,t);return this.lastIndex=e.lastIndex+1,a.index=n,a.input=t,a},getNFA:function(){if(this._nfa)return this._nfa;var t,e=this.ast;return x=1,t=c(e.tree),t=r(t,this.debug),this._nfa=t,t}};var d=e.parseCharset("^\n\r\u2028\u2029"),g={d:["09"],w:["AZ","az","09","_"],s:" \f\n\r\t\v ᠎           \u2028\u2029  　".split("")};["d","w","s"].forEach(function(t){g[t.toUpperCase()]=e.negate(g[t])});var x=0,v="GroupCaptureStart",y="GroupCaptureEnd",m=function(){function t(t,e){var r,n=[],i=t.explained;return i.forEach(function(t){n.push({from:e,to:r=[l()],charset:t}),e=r}),{accepts:r,trans:n}}function e(t,e){var r=[l()];return{accepts:r,trans:[{from:e,to:r,charset:t.explained}]}}function n(t,e){var r=[l()];return{accepts:r,trans:[{from:e,to:r,charset:d}]}}function i(t,e){var r=[l()];return{accepts:r,trans:[{from:e,to:r,charset:!1}]}}function a(t,e){var r=[l()],n=[{from:e,to:r,charset:!1,action:!t.nonCapture&&function(e,r,n){e.unshift({type:v,num:t.num,index:n})}}];e=r;var i=c(t.sub,e);n=n.concat(i.trans);var a=[l()];return n.push({from:i.accepts,to:a,charset:!1,action:!t.nonCapture&&function(e,r,n){e.unshift({type:y,num:t.num,index:n})}}),{accepts:a,trans:n}}function s(t,e){
var r=[l()],n=t.num;return{accepts:r,trans:[{from:e,to:r,charset:!1,assert:function(t,e,r,i,a){var s=u(t,n,a);return void 0===s&&(s=""),a.slice(r,r+s.length)===s&&s.length}}]}}function o(t,e){var r=[],n=[];return t.branches.forEach(function(t){var i=c(t,e);r=r.concat(i.trans),n=n.concat(i.accepts)}),{trans:r,accepts:n}}function h(t,e){function n(t,e,r){var n=[l()];return{accepts:n,trans:[{from:e,to:n,charset:!1,assert:r}]}}function i(t){var e=r(c(t.sub,["start"]));return function(t,r,n,i,a){var s=e.input(a,n,null,t);return s.acceptable}}function a(t){var e=i(t);return function(){return!e.apply(this,arguments)}}function s(t,e){return!!(o(t-1,e)^o(t,e))}function o(t,e){return t!==-1&&t!==e.length&&/\w/.test(e[t])}function h(t,e,r,n,i){return 0===r||"\n"===i[r-1]}function u(t,e,r,n,i){return 0===r}function f(t,e,r,n,i){return r===i.length||"\n"===e}function p(t,e,r,n,i){return r===i.length}var d;switch(t.assertionType){case AssertBegin:d=t.multiline?h:u;break;case AssertEnd:d=t.multiline?f:p;break;case AssertWordBoundary:d=function(t,e,r,n,i){return s(r,i)};break;case AssertNonWordBoundary:d=function(t,e,r,n,i){return!s(r,i)};break;case AssertLookahead:d=i(t);break;case AssertNegativeLookahead:d=a(t)}return n(t,e,d)}return{assert:h,choice:o,backref:s,group:a,empty:i,charset:e,dot:n,exact:t}}();return n}),"function"!=typeof define)var define=require("amdefine")(module);if(define("visualize",["./Kit","./parse"],function(t,e){function r(t,e){if(e=e||"normal",k[t]&&k[t][e])return k[t][e];y.attr({"font-size":t,"font-weight":e});var r=y.getBBox();return k[t]=k[t]||{},k[t][e]={width:r.width/((y.attr("text").length-1)/2),height:r.height/2}}function n(t){y=t.text(-1e3,-1e3,"XgfTlM|.q\nXgfTlM|.q").attr({"font-family":w,"font-size":m})}function i(t,e,i){i.clear(),i.setSize(0,0),n(i),E=!!~e.indexOf("m");var o=d(t.tree);o.unshift(x("/",A.delimiter)),o.unshift(x("RegExp: ")),o.push(x("/",A.delimiter)),e&&o.push(x(e,A.flags));var c=r(m,"bold"),h=C,u=c.height/2+C,l=0,f=0;l=o.reduce(function(t,e){e.x=t,e.y=u;var r=e.text.length*c.width;return t+r},h),l+=C,f=c.height+2*C,o=i.add(o),i.setSize(l,c.height+2*C);var p=a(t.tree,0,0);f=Math.max(p.height+3*C+c.height,f),l=Math.max(p.width+2*C,l),i.setSize(l,f),s(p.items,C,2*C+c.height-p.y),i.add(p.items)}function a(t,e,r){return t.unshift({type:"startPoint"}),t.push({type:"endPoint"}),o(t,e,r)}function s(t,e,r){t.forEach(function(t){t._translate?t._translate(e,r):(t.x+=e,t.y+=r)})}function o(t,e,r){var n=[],i=[],a=0,s=0,o=e,c=r,h=r;if(!t.length)return S.empty(null,e,r);t.forEach(function(t){var e;e=t.repeat?S.repeat(t,o,r):S[t.type](t,o,r),n.push(e),o+=e.width+_,a+=e.width,c=Math.min(c,e.y),h=Math.max(h,e.y+e.height),i=i.concat(e.items)}),s=h-c,n.reduce(function(t,e){a+=_;var n=u(t.lineOutX,r,e.lineInX);return i.push(n),e});var l=n[0].lineInX,f=n[n.length-1].lineOutX;return{items:i,width:a,height:s,x:e,y:c,lineInX:l,lineOutX:f}}function c(e,n,i,a,s){e=t.toPrint(e);var o=6,c=r(m),h=e.length*c.width,u=c.height+2*o,l=h+2*o,f={type:"rect",x:n,y:i-u/2,width:l,height:u,stroke:"none",fill:a||"transparent"},p={type:"text",x:n+l/2,y:i,text:e,"font-size":m,"font-family":w,fill:s||"black"};return{text:p,rect:f,items:[f,p],width:l,height:u,x:n,y:f.y,lineInX:n,lineOutX:n+l}}function h(t,e,n,i){var a,s=r(b),o=n.split("\n"),c=o.length*s.height;a=o.length>1?Math.max.apply(Math,o.map(function(t){return t.length})):n.length,a*=s.width;var h=4,u={type:"text",x:t,y:e-c/2-h,text:n,"font-size":b,"font-family":w,fill:i||"#444"};return{label:u,x:t-a/2,y:e-c-h,width:a,height:c+h}}function u(t,e,r){return{type:"path",x:t,y:e,path:["M",t,e,"H",r],"stroke-linecap":"butt","stroke-linejoin":"round",stroke:"#333","stroke-width":2,_translate:function(t,e){var r=this.path;r[1]+=t,r[2]+=e,r[4]+=t}}}function l(t,e,r,n){var i,a,s=10,o=t>r?-1:1,c=e>n?-1:1;return Math.abs(e-n)<1.5*s?(i=["M",t,e,"C",t+Math.min(Math.abs(r-t)/2,s)*o,e,r-(r-t)/2,n,r,n],a=function(t,e){var r=this.path;r[1]+=t,r[2]+=e,r[4]+=t,r[5]+=e,r[6]+=t,r[7]+=e,r[8]+=t,r[9]+=e}):(i=["M",t,e,"Q",t+s*o,e,t+s*o,e+s*c,"V",Math.abs(e-n)<2*s?e+s*c:n-s*c,"Q",t+s*o,n,t+s*o*2,n,"H",r],a=function(t,e){var r=this.path;r[1]+=t,r[2]+=e,r[4]+=t,r[5]+=e,r[6]+=t,r[7]+=e,r[9]+=e,r[11]+=t,r[12]+=e,r[13]+=t,r[14]+=e,r[16]+=t}),{type:"path",path:i,"stroke-linecap":"butt","stroke-linejoin":"round",stroke:"#333","stroke-width":2,_translate:a}}function f(t,e,r){var n=10;return{items:[{type:"circle",fill:r,cx:t+n,cy:e,r:n,stroke:"none",_translate:function(t,e){this.cx+=t,this.cy+=e}}],width:2*n,height:2*n,x:t,y:e,lineInX:t,lineOutX:t+2*n}}function p(t){if(Array.isArray(t)){for(var e=t,r=0;r<e.length;r++)if(!p(e[r]))return!1;return!0}var n=t;return n.type===EMPTY_NODE||(n.type===GROUP_NODE&&void 0===n.num?p(n.sub):n.type===CHOICE_NODE?p(n.branches):void 0)}function d(e){var r=[];return e.forEach(function(e){if(e.sub)r.push(x("(")),e.type===ASSERT_NODE?e.assertionType===AssertLookahead?r.push(x("?=")):r.push(x("?!")):e.nonCapture&&r.push(x("?:")),r=r.concat(d(e.sub)),r.push(x(")"));else if(e.branches)e.branches.map(d).forEach(function(t){r=r.concat(t),r.push(x("|"))}),r.pop();else{var n=A[e.type]||A.defaults;switch(e.type){case CHARSET_NODE:var i=v(e);(!i||e.exclude)&&r.push(x("[")),e.exclude&&r.push(x("^",A.charsetExclude)),e.ranges.forEach(function(t){r.push(x(g(t[0]+"-"+t[1]),A.charsetRange))}),e.classes.forEach(function(t){r.push(x("\\"+t,A.charsetClass))}),r.push(x(g(e.chars),A.charsetChars)),(!i||e.exclude)&&r.push(x("]"));break;default:var a=e.raw||"";e.repeat&&(a=a.slice(0,e.repeat.beginIndex)),a=t.toPrint(a,!0),r.push(x(a,n))}}if(e.repeat){var s=e.repeat.min,o=e.repeat.max;0===s&&o===1/0?r.push(x("*")):1===s&&o===1/0?r.push(x("+")):0===s&&1===o?r.push(x("?")):(r.push(x("{")),r.push(x(s)),s===o?r.push(x("}")):(r.push(x(",")),isFinite(o)&&r.push(x(o)),r.push(x("}")))),e.repeat.nonGreedy&&r.push(x("?",A.repeatNonGreedy))}}),r}function g(e){return e=t.toPrint(e),e.replace(/\[/g,"\\[").replace(/\]/g,"\\]")}function x(t,e){return e=e||A[t]||A.defaults,{type:"text","font-size":m,"font-family":w,text:t+"",fill:e,"text-anchor":"start","font-weight":"bold"}}function v(t){return!t.chars&&!t.ranges.length&&1===t.classes.length}e.exportConstants();var y,m=16,b=14,_=16,w="DejaVu Sans Mono,monospace",E=!1,C=10,k={},S={startPoint:function(t,e,r){return f(e,r,"r(0.5,0.5)#EFE-green")},endPoint:function(t,e,r){return f(e,r,"r(0.5,0.5)#FFF-#000")},empty:function(t,e,r){var n=10,i=u(e,r,e+n);return{items:[i],width:n,height:2,x:e,y:r,lineInX:e,lineOutX:e+n}},exact:function(t,e,r){var n="skyblue";return c(t.chars,e,r,n)},dot:function(t,e,r){var n="DarkGreen",i="white",a=c("AnyCharExceptNewLine",e,r,n,i);return a.rect.r=10,a.rect.tip="AnyChar except CR LF",a},backref:function(t,e,r){var n="navy",i="white",a=c("Backref #"+t.num,e,r,n,i);return a.rect.r=8,a},repeat:function(t,e,r){function n(t){return t+(t<2?" time":" times")}function i(t,e){var r=this.path;r[1]+=t,r[2]+=e,r[4]+=t,r[5]+=e,r[6]+=t,r[7]+=e,r[9]+=e,r[11]+=t,r[12]+=e,r[13]+=t,r[14]+=e,r[16]+=t,r[18]+=t,r[19]+=e,r[20]+=t,r[21]+=e,r[23]+=e,r[25]+=t,r[26]+=e,r[27]+=t,r[28]+=e}if(p(t))return S.empty(null,e,r);var a=10,o=4,c=t.repeat,u="",l=[],f="darkgreen";if(c.min===c.max&&0===c.min)return S.empty(null,e,r);var d=S[t.type](t,e,r),g=d.width,x=d.height;if(c.min===c.max&&1===c.min)return d;c.min===c.max?u+=n(c.min):(u+=c.min,u+=isFinite(c.max)?(c.max-c.min>1?" to ":" or ")+n(c.max):" or more times");var v=a,y=0,m=a,b=d.y+d.height-r,_=2*a+d.width;g=_;var w;1!==c.max?(b+=a,x+=a,w={type:"path",path:["M",d.x+a,r,"Q",e,r,e,r+m,"V",r+b-m,"Q",e,r+b,e+m,r+b,"H",e+_-m,"Q",e+_,r+b,e+_,r+b-m,"V",r+m,"Q",e+_,r,d.x+d.width+a,r],_translate:i,stroke:"maroon","stroke-width":2},c.nonGreedy&&(w.stroke="Brown",w["stroke-dasharray"]="-"),l.push(w)):u=!1;var E;if(0===c.min){var C=r-d.y+a,k=_+2*a;v+=a,y=-a-2,g=k,x+=a,E={type:"path",path:["M",e,r,"Q",e+m,r,e+m,r-m,"V",r-C+m,"Q",e+m,r-C,e+2*m,r-C,"H",e+k-2*m,"Q",e+k-m,r-C,e+k-m,r-C+m,"V",r-m,"Q",e+k-m,r,e+k,r],_translate:i,stroke:c.nonGreedy?f:"#333","stroke-width":2},w&&s([w],a,0),l.push(E)}if(u){var A=h(e+g/2,r,u);s([A.label],0,b+A.height+o),l.push(A.label),x+=o+A.height;var B=(Math.max(A.width,g)-g)/2;B&&s(l,B,0),g=Math.max(A.width,g),v+=B}return s(d.items,v,0),l=l.concat(d.items),{items:l,width:g,height:x,x:e,y:d.y+y,lineInX:d.lineInX+v,lineOutX:d.lineOutX+v}},choice:function(t,e,r){if(p(t))return S.empty(null,e,r);var n=20,i=6,a=4,c=0,h=0,f=t.branches.map(function(t){var n=o(t,e,r);return c+=n.height,h=Math.max(h,n.width),n});c+=(f.length-1)*i+2*a,h+=2*n;var d=e+h/2,g=r-c/2+a,x=e+h,v=[];return f.forEach(function(t){var a=d-t.width/2;s(t.items,a-t.x,g-t.y),v=v.concat(t.items);var o=r+g-t.y,c=l(e,r,e+n,o),f=l(x,r,e+h-n,o);v.push(c,f),e+n!==a-t.x+t.lineInX&&v.push(u(e+n,o,a-t.x+t.lineInX)),t.lineOutX+a-t.x!==e+h-n&&v.push(u(t.lineOutX+a-t.x,o,e+h-n)),t.x=a,t.y=g,g+=t.height+i}),{items:v,width:h,height:c,x:e,y:r-c/2,lineInX:e,lineOutX:x}},charset:function(t,e,r){var n=6,i=4,a={d:"Digit",D:"NonDigit",w:"Word",W:"NonWord",s:"WhiteSpace",S:"NonWhiteSpace"},o="LightSkyBlue",u="black",l="Green",f="white",p="teal",d="white",g=t.exclude?"Pink":"Khaki",x=t.exclude?"#C00":"",y=v(t);if(y){var m=c(a[t.classes[0]],e,r,l,f);if(m.rect.r=5,t.exclude){var b=h(m.x+m.width/2,m.y,"None of:",x),_=m.items;_.push(b.label);var w=m.width,E=Math.max(b.width,m.width),C=(E-w)/2;return s(_,C,0),{items:_,width:E,height:m.height+b.height,x:Math.min(b.x,m.x),y:b.y,lineInX:C+m.x,lineOutX:C+m.x+m.width}}return m}if(!t.chars&&!t.ranges.length&&!t.classes.length){var m=c("AnyChar",e,r,"green","white");return m.rect.r=5,m}var k,S,A=[],E=0,B=0;t.chars&&(k=c(t.chars,e,r,o,u),k.rect.r=5,A.push(k),E=k.width),t.ranges.forEach(function(t){t=t.split("").join("-");var n=c(t,e,r,p,d);n.rect.r=5,A.push(n),E=Math.max(n.width,E)}),t.classes.forEach(function(t){var n=c(a[t],e,r,l,f);n.rect.r=5,A.push(n),E=Math.max(n.width,E)}),S=A[0].height;var N=[],O=[];A.sort(function(t,e){return e.width-t.width}),A.forEach(function(t){2*t.width+i>E?N.push(t):O.push(t)}),A=N;for(var T,R;O.length;){if(T=O.pop(),R=O.pop(),!R){A.push(T);break}T.width-R.width>2?(A.push(T),O.push(R)):(s(R.items,T.width+i,0),A.push({items:T.items.concat(R.items),width:T.width+R.width+i,height:T.height,x:T.x,y:T.y}),B-=T.height)}E+=2*n,B=(A.length-1)*i+A.length*S+2*n;var I={type:"rect",x:e,y:r-B/2,r:4,width:E,height:B,stroke:"none",fill:g},M=I.y+n,_=[I];A.forEach(function(t){s(t.items,e-t.x+(E-t.width)/2,M-t.y),_=_.concat(t.items),M+=t.height+i});var b=h(I.x+I.width/2,I.y,(t.exclude?"None":"One")+" of:",x);_.push(b.label);var w=E;E=Math.max(b.width,E);var C=(E-w)/2;return s(_,C,0),{items:_,width:E,height:B+b.height,x:Math.min(b.x,e),y:b.y,lineInX:C+e,lineOutX:C+e+I.width}},group:function(t,e,r){if(p(t))return S.empty(null,e,r);var n=10,i="silver",a=2,c=o(t.sub,e,r);if(t.num){s(c.items,n,0);var u=c.width+2*n,l=c.height+2*n,f={type:"rect",x:e,y:c.y-n,r:6,width:u,height:l,"stroke-dasharray":".",stroke:i,"stroke-width":a},d=h(f.x+f.width/2,f.y-a,"Group #"+t.num),g=c.items.concat([f,d.label]),x=Math.max(d.width,u),v=(x-u)/2;return v&&s(g,v,0),{items:g,width:x,height:l+d.height+4,x:e,y:d.y,lineInX:v+c.lineInX+n,lineOutX:v+c.lineOutX+n}}return c},assert:function(t,e,r){var n,i={AssertNonWordBoundary:{bg:"maroon",fg:"white"},AssertWordBoundary:{bg:"purple",fg:"white"},AssertEnd:{bg:"Indigo",fg:"white"},AssertBegin:{bg:"Indigo",fg:"white"}},a=t.assertionType,o=a.replace("Assert","")+"!";if(n=i[a])return!E||"AssertBegin"!==a&&"AssertEnd"!==a||(o="Line"+o),c(o,e,r,n.bg,n.fg);var u,l,f=8;a===AssertLookahead?(u="CornflowerBlue",l="darkgreen",o="Followed by:"):a===AssertNegativeLookahead&&(u="#F63",l="Purple",o="Not followed by:");var p=S.group(t,e,r),d=p.height+2*f,g=p.width+2*f,x={type:"rect",x:e,y:p.y-f,r:6,width:g,height:d,"stroke-dasharray":"-",stroke:u,"stroke-width":2},v=h(x.x+g/2,x.y,o,l),y=Math.max(g,v.width),m=(y-g)/2;s(p.items,m+f,0),m&&s([x,v.label],m,0);var b=p.items.concat([x,v.label]);return{items:b,width:y,height:x.height+v.height,x:e,y:v.y,lineInX:m+p.lineInX+f,lineOutX:m+p.lineOutX+f}}},A={delimiter:"Indigo",flags:"darkgreen",exact:"#334",dot:"darkblue",backref:"teal",$:"purple","^":"purple","\\b":"#F30","\\B":"#F30","(":"blue",")":"blue","?=":"darkgreen","?!":"red","?:":"grey","[":"navy","]":"navy","|":"blue","{":"maroon",",":"maroon","}":"maroon","*":"maroon","+":"maroon","?":"maroon",repeatNonGreedy:"#F61",defaults:"black",charsetRange:"olive",charsetClass:"navy",charsetExclude:"red",charsetChars:"#534"};return i}),function(t){var e,r,n="0.4.2",i="hasOwnProperty",a=/[\.\/]/,s="*",o=function(){},c=function(t,e){return t-e},h={n:{}},u=function(t,n){t=String(t);var i,a=r,s=Array.prototype.slice.call(arguments,2),o=u.listeners(t),h=0,l=[],f={},p=[],d=e;e=t,r=0;for(var g=0,x=o.length;g<x;g++)"zIndex"in o[g]&&(l.push(o[g].zIndex),o[g].zIndex<0&&(f[o[g].zIndex]=o[g]));for(l.sort(c);l[h]<0;)if(i=f[l[h++]],p.push(i.apply(n,s)),r)return r=a,p;for(g=0;g<x;g++)if(i=o[g],"zIndex"in i)if(i.zIndex==l[h]){if(p.push(i.apply(n,s)),r)break;do if(h++,i=f[l[h]],i&&p.push(i.apply(n,s)),r)break;while(i)}else f[i.zIndex]=i;else if(p.push(i.apply(n,s)),r)break;return r=a,e=d,p.length?p:null};u._events=h,u.listeners=function(t){var e,r,n,i,o,c,u,l,f=t.split(a),p=h,d=[p],g=[];for(i=0,o=f.length;i<o;i++){for(l=[],c=0,u=d.length;c<u;c++)for(p=d[c].n,r=[p[f[i]],p[s]],n=2;n--;)e=r[n],e&&(l.push(e),g=g.concat(e.f||[]));d=l}return g},u.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var r=t.split(a),n=h,i=0,s=r.length;i<s;i++)n=n.n,n=n.hasOwnProperty(r[i])&&n[r[i]]||(n[r[i]]={n:{}});for(n.f=n.f||[],i=0,s=n.f.length;i<s;i++)if(n.f[i]==e)return o;return n.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},u.f=function(t){var e=[].slice.call(arguments,1);return function(){u.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},u.stop=function(){r=1},u.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},u.nts=function(){return e.split(a)},u.off=u.unbind=function(t,e){if(!t)return void(u._events=h={n:{}});var r,n,o,c,l,f,p,d=t.split(a),g=[h];for(c=0,l=d.length;c<l;c++)for(f=0;f<g.length;f+=o.length-2){if(o=[f,1],r=g[f].n,d[c]!=s)r[d[c]]&&o.push(r[d[c]]);else for(n in r)r[i](n)&&o.push(r[n]);g.splice.apply(g,o)}for(c=0,l=g.length;c<l;c++)for(r=g[c];r.n;){if(e){if(r.f){for(f=0,p=r.f.length;f<p;f++)if(r.f[f]==e){r.f.splice(f,1);break}!r.f.length&&delete r.f}for(n in r.n)if(r.n[i](n)&&r.n[n].f){var x=r.n[n].f;for(f=0,p=x.length;f<p;f++)if(x[f]==e){x.splice(f,1);break}!x.length&&delete r.n[n].f}}else{delete r.f;for(n in r.n)r.n[i](n)&&r.n[n].f&&delete r.n[n].f}r=r.n}},u.once=function(t,e){var r=function(){return u.unbind(t,r),e.apply(this,arguments)};return u.on(t,r)},u.version=n,u.toString=function(){return"You are running Eve "+n},"undefined"!=typeof module&&module.exports?module.exports=u:"undefined"!=typeof define?define("eve",[],function(){return u}):t.eve=u}(window||this),function(t,e){"function"==typeof define&&define.amd?define("libs/raphael",["eve"],function(r){return e(t,r)}):e(t,t.eve)}(this,function(t,e){function r(t){if(r.is(t,"function"))return b?t():e.on("raphael.DOMload",t);if(r.is(t,V))return r._engine.create[N](r,t.splice(0,3+r.is(t[0],H))).add(t);var n=Array.prototype.slice.call(arguments,0);if(r.is(n[n.length-1],"function")){var i=n.pop();return b?i.call(r._engine.create[N](r,n)):e.on("raphael.DOMload",function(){i.call(r._engine.create[N](r,n))})}return r._engine.create[N](r,arguments)}function n(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[k](r)&&(e[r]=n(t[r]));return e}function i(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}function a(t,e,r){function n(){var a=Array.prototype.slice.call(arguments,0),s=a.join("␀"),o=n.cache=n.cache||{},c=n.count=n.count||[];return o[k](s)?(i(c,s),r?r(o[s]):o[s]):(c.length>=1e3&&delete o[c.shift()],c.push(s),o[s]=t[N](e,a),r?r(o[s]):o[s])}return n}function s(){return this.hex}function o(t,e){for(var r=[],n=0,i=t.length;i-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?i-4==n?a[3]={x:+t[0],y:+t[1]}:i-2==n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4==n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}function c(t,e,r,n,i){var a=-3*e+9*r-9*n+3*i,s=t*a+6*e-12*r+6*n;return t*s-3*e+3*r}function h(t,e,r,n,i,a,s,o,h){null==h&&(h=1),h=h>1?1:h<0?0:h;for(var u=h/2,l=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<l;g++){var x=u*f[g]+u,v=c(x,t,r,i,s),y=c(x,e,n,a,o),m=v*v+y*y;d+=p[g]*z.sqrt(m)}return u*d}function u(t,e,r,n,i,a,s,o,c){if(!(c<0||h(t,e,r,n,i,a,s,o)<c)){var u,l=1,f=l/2,p=l-f,d=.01;for(u=h(t,e,r,n,i,a,s,o,p);G(u-c)>d;)f/=2,p+=(u<c?1:-1)*f,u=h(t,e,r,n,i,a,s,o,p);return p}}function l(t,e,r,n,i,a,s,o){if(!(j(t,r)<X(i,s)||X(t,r)>j(i,s)||j(e,n)<X(a,o)||X(e,n)>j(a,o))){var c=(t*n-e*r)*(i-s)-(t-r)*(i*o-a*s),h=(t*n-e*r)*(a-o)-(e-n)*(i*o-a*s),u=(t-r)*(a-o)-(e-n)*(i-s);if(u){var l=c/u,f=h/u,p=+l.toFixed(2),d=+f.toFixed(2);if(!(p<+X(t,r).toFixed(2)||p>+j(t,r).toFixed(2)||p<+X(i,s).toFixed(2)||p>+j(i,s).toFixed(2)||d<+X(e,n).toFixed(2)||d>+j(e,n).toFixed(2)||d<+X(a,o).toFixed(2)||d>+j(a,o).toFixed(2)))return{x:l,y:f}}}}function f(t,e,n){var i=r.bezierBBox(t),a=r.bezierBBox(e);if(!r.isBBoxIntersect(i,a))return n?0:[];for(var s=h.apply(0,t),o=h.apply(0,e),c=j(~~(s/5),1),u=j(~~(o/5),1),f=[],p=[],d={},g=n?0:[],x=0;x<c+1;x++){var v=r.findDotsAtSegment.apply(r,t.concat(x/c));f.push({x:v.x,y:v.y,t:x/c})}for(x=0;x<u+1;x++)v=r.findDotsAtSegment.apply(r,e.concat(x/u)),p.push({x:v.x,y:v.y,t:x/u});for(x=0;x<c;x++)for(var y=0;y<u;y++){var m=f[x],b=f[x+1],_=p[y],w=p[y+1],E=G(b.x-m.x)<.001?"y":"x",C=G(w.x-_.x)<.001?"y":"x",k=l(m.x,m.y,b.x,b.y,_.x,_.y,w.x,w.y);if(k){if(d[k.x.toFixed(4)]==k.y.toFixed(4))continue;d[k.x.toFixed(4)]=k.y.toFixed(4);var S=m.t+G((k[E]-m[E])/(b[E]-m[E]))*(b.t-m.t),A=_.t+G((k[C]-_[C])/(w[C]-_[C]))*(w.t-_.t);S>=0&&S<=1.001&&A>=0&&A<=1.001&&(n?g++:g.push({x:k.x,y:k.y,t1:X(S,1),t2:X(A,1)}))}}return g}function p(t,e,n){t=r._path2curve(t),e=r._path2curve(e);for(var i,a,s,o,c,h,u,l,p,d,g=n?0:[],x=0,v=t.length;x<v;x++){var y=t[x];if("M"==y[0])i=c=y[1],a=h=y[2];else{"C"==y[0]?(p=[i,a].concat(y.slice(1)),i=p[6],a=p[7]):(p=[i,a,i,a,c,h,c,h],i=c,a=h);for(var m=0,b=e.length;m<b;m++){var _=e[m];if("M"==_[0])s=u=_[1],o=l=_[2];else{"C"==_[0]?(d=[s,o].concat(_.slice(1)),s=d[6],o=d[7]):(d=[s,o,s,o,u,l,u,l],s=u,o=l);var w=f(p,d,n);if(n)g+=w;else{for(var E=0,C=w.length;E<C;E++)w[E].segment1=x,w[E].segment2=m,w[E].bez1=p,w[E].bez2=d;g=g.concat(w)}}}}}return g}function d(t,e,r,n,i,a){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+n,this.e=+i,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function g(){return this.x+I+this.y+I+this.width+" × "+this.height}function x(t,e,r,n,i,a){function s(t){return((l*t+u)*t+h)*t}function o(t,e){var r=c(t,e);return((d*r+p)*r+f)*r}function c(t,e){var r,n,i,a,o,c;for(i=t,c=0;c<8;c++){if(a=s(i)-t,G(a)<e)return i;if(o=(3*l*i+2*u)*i+h,G(o)<1e-6)break;i-=a/o}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=s(i),G(a-t)<e)return i;t>a?r=i:n=i,i=(n-r)/2+r}return i}var h=3*e,u=3*(n-e)-h,l=1-h-u,f=3*r,p=3*(i-r)-f,d=1-f-p;return o(t,1/(200*a))}function v(t,e){var r=[],n={};if(this.ms=e,this.times=1,t){for(var i in t)t[k](i)&&(n[J(i)]=t[i],r.push(J(i)));r.sort(lt)}this.anim=n,this.top=r[r.length-1],this.percents=r}function y(t,n,i,a,s,o){i=J(i);var c,h,u,l,f,p,g=t.ms,v={},y={},m={};if(a)for(_=0,E=ce.length;_<E;_++){var b=ce[_];if(b.el.id==n.id&&b.anim==t){b.percent!=i?(ce.splice(_,1),u=1):h=b,n.attr(b.totalOrigin);break}}else a=+y;for(var _=0,E=t.percents.length;_<E;_++){if(t.percents[_]==i||t.percents[_]>a*t.top){i=t.percents[_],f=t.percents[_-1]||0,g=g/t.top*(i-f),l=t.percents[_+1],c=t.anim[i];break}a&&n.attr(t.anim[t.percents[_]])}if(c){if(h)h.initstatus=a,h.start=new Date-h.ms*a;else{for(var C in c)if(c[k](C)&&(nt[k](C)||n.paper.customAttributes[k](C)))switch(v[C]=n.attr(C),null==v[C]&&(v[C]=rt[C]),y[C]=c[C],nt[C]){case H:m[C]=(y[C]-v[C])/g;break;case"colour":v[C]=r.getRGB(v[C]);var S=r.getRGB(y[C]);m[C]={r:(S.r-v[C].r)/g,g:(S.g-v[C].g)/g,b:(S.b-v[C].b)/g};break;case"path":var A=Dt(v[C],y[C]),B=A[1];for(v[C]=A[0],m[C]=[],_=0,E=v[C].length;_<E;_++){m[C][_]=[0];for(var N=1,T=v[C][_].length;N<T;N++)m[C][_][N]=(B[_][N]-v[C][_][N])/g}break;case"transform":var R=n._,I=Xt(R[C],y[C]);if(I)for(v[C]=I.from,y[C]=I.to,m[C]=[],m[C].real=!0,_=0,E=v[C].length;_<E;_++)for(m[C][_]=[v[C][_][0]],N=1,T=v[C][_].length;N<T;N++)m[C][_][N]=(y[C][_][N]-v[C][_][N])/g;else{var D=n.matrix||new d,P={_:{transform:R.transform},getBBox:function(){return n.getBBox(1)}};v[C]=[D.a,D.b,D.c,D.d,D.e,D.f],zt(P,y[C]),y[C]=P._.transform,m[C]=[(P.matrix.a-D.a)/g,(P.matrix.b-D.b)/g,(P.matrix.c-D.c)/g,(P.matrix.d-D.d)/g,(P.matrix.e-D.e)/g,(P.matrix.f-D.f)/g]}break;case"csv":var L=M(c[C])[F](w),z=M(v[C])[F](w);if("clip-rect"==C)for(v[C]=z,m[C]=[],_=z.length;_--;)m[C][_]=(L[_]-v[C][_])/g;y[C]=L;break;default:for(L=[][O](c[C]),z=[][O](v[C]),m[C]=[],_=n.paper.customAttributes[C].length;_--;)m[C][_]=((L[_]||0)-(z[_]||0))/g}var j=c.easing,X=r.easing_formulas[j];if(!X)if(X=M(j).match(K),X&&5==X.length){var G=X;X=function(t){return x(t,+G[1],+G[2],+G[3],+G[4],g)}}else X=pt;if(p=c.start||t.start||+new Date,b={anim:t,percent:i,timestamp:p,start:p+(t.del||0),status:0,initstatus:a||0,stop:!1,ms:g,easing:X,from:v,diff:m,to:y,el:n,callback:c.callback,prev:f,next:l,repeat:o||t.times,origin:n.attr(),totalOrigin:s},ce.push(b),a&&!h&&!u&&(b.stop=!0,b.start=new Date-g*a,1==ce.length))return ue();u&&(b.start=new Date-b.ms*a),1==ce.length&&he(ue)}e("raphael.anim.start."+n.id,n,t)}}function m(t){for(var e=0;e<ce.length;e++)ce[e].el.paper==t&&ce.splice(e--,1)}r.version="2.1.2",r.eve=e;var b,_,w=/[, ]+/,E={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},C=/\{(\d+)\}/g,k="hasOwnProperty",S={doc:document,win:t},A={was:Object.prototype[k].call(S.win,"Raphael"),is:S.win.Raphael},B=function(){this.ca=this.customAttributes={}},N="apply",O="concat",T="ontouchstart"in S.win||S.win.DocumentTouch&&S.doc instanceof DocumentTouch,R="",I=" ",M=String,F="split",D="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[F](I),P={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},L=M.prototype.toLowerCase,z=Math,j=z.max,X=z.min,G=z.abs,U=z.pow,q=z.PI,H="number",W="string",V="array",Q=Object.prototype.toString,Y=(r._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),$={NaN:1,Infinity:1,"-Infinity":1},K=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Z=z.round,J=parseFloat,tt=parseInt,et=M.prototype.toUpperCase,rt=r._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},nt=r._availableAnimAttrs={blur:H,"clip-rect":"csv",cx:H,cy:H,fill:"colour","fill-opacity":H,"font-size":H,height:H,opacity:H,path:"path",r:H,rx:H,ry:H,stroke:"colour","stroke-opacity":H,"stroke-width":H,transform:"transform",width:H,x:H,y:H},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]*/,at={hs:1,rg:1},st=/,?([achlmqrstvxz]),?/gi,ot=/([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,ct=/([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,ht=/(-?\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,ut=(r._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]*([^\)]+?)\))?/,{}),lt=function(t,e){return J(t)-J(e)},ft=function(){},pt=function(t){return t},dt=r._rectPath=function(t,e,r,n,i){return i?[["M",t+i,e],["l",r-2*i,0],["a",i,i,0,0,1,i,i],["l",0,n-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-r,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-n],["a",i,i,0,0,1,i,-i],["z"]]:[["M",t,e],["l",r,0],["l",0,n],["l",-r,0],["z"]]},gt=function(t,e,r,n){return null==n&&(n=r),[["M",t,e],["m",0,-n],["a",r,n,0,1,1,0,2*n],["a",r,n,0,1,1,0,-2*n],["z"]]},xt=r._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return gt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return gt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return dt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return dt(e.x,e.y,e.width,e.height)}},vt=r.mapPath=function(t,e){if(!e)return t;var r,n,i,a,s,o,c;for(t=Dt(t),i=0,s=t.length;i<s;i++)for(c=t[i],a=1,o=c.length;a<o;a+=2)r=e.x(c[a],c[a+1]),n=e.y(c[a],c[a+1]),c[a]=r,c[a+1]=n;return t};if(r._g=S,r.type=S.win.SVGAngle||S.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==r.type){var yt,mt=S.doc.createElement("div");if(mt.innerHTML='<v:shape adj="1"/>',yt=mt.firstChild,yt.style.behavior="url(#default#VML)",!yt||"object"!=typeof yt.adj)return r.type=R;mt=null}r.svg=!(r.vml="VML"==r.type),r._Paper=B,r.fn=_=B.prototype=r.prototype,r._id=0,r._oid=0,r.is=function(t,e){return e=L.call(e),"finite"==e?!$[k](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||Q.call(t).slice(8,-1).toLowerCase()==e},r.angle=function(t,e,n,i,a,s){if(null==a){var o=t-n,c=e-i;return o||c?(180+180*z.atan2(-c,-o)/q+360)%360:0}return r.angle(t,e,a,s)-r.angle(n,i,a,s)},r.rad=function(t){return t%360*q/180},r.deg=function(t){return 180*t/q%360},r.snapTo=function(t,e,n){if(n=r.is(n,"finite")?n:10,r.is(t,V)){for(var i=t.length;i--;)if(G(t[i]-e)<=n)return t[i]}else{t=+t;var a=e%t;if(a<n)return e-a;if(a>t-n)return e-a+t}return e};r.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*z.random()|0,r="x"==t?e:3&e|8;return r.toString(16)});r.setWindow=function(t){e("raphael.setWindow",r,S.win,t),S.win=t,S.doc=S.win.document,r._engine.initWin&&r._engine.initWin(S.win)};var bt=function(t){if(r.vml){var e,n=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write("<body>"),i.close(),e=i.body}catch(t){e=createPopup().document.body}var s=e.createTextRange();bt=a(function(t){try{e.style.color=M(t).replace(n,R);var r=s.queryCommandValue("ForeColor");return r=(255&r)<<16|65280&r|(16711680&r)>>>16,"#"+("000000"+r.toString(16)).slice(-6)}catch(t){return"none"}})}else{var o=S.doc.createElement("i");o.title="Raphaël Colour Picker",o.style.display="none",S.doc.body.appendChild(o),bt=a(function(t){return o.style.color=t,S.doc.defaultView.getComputedStyle(o,R).getPropertyValue("color")})}return bt(t)},_t=function(){return"hsb("+[this.h,this.s,this.b]+")"},wt=function(){return"hsl("+[this.h,this.s,this.l]+")"},Et=function(){return this.hex},Ct=function(t,e,n){if(null==e&&r.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,e=t.g,t=t.r),null==e&&r.is(t,W)){var i=r.getRGB(t);t=i.r,e=i.g,n=i.b}return(t>1||e>1||n>1)&&(t/=255,e/=255,n/=255),[t,e,n]},kt=function(t,e,n,i){t*=255,e*=255,n*=255;var a={r:t,g:e,b:n,hex:r.rgb(t,e,n),toString:Et};return r.is(i,"finite")&&(a.opacity=i),a};r.color=function(t){var e;return r.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=r.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):r.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=r.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(r.is(t,"string")&&(t=r.getRGB(t)),r.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=r.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=r.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Et,t},r.hsb2rgb=function(t,e,r,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,t=t.h,n=t.o),t*=360;var i,a,s,o,c;return t=t%360/60,c=r*e,o=c*(1-G(t%2-1)),i=a=s=r-c,t=~~t,i+=[c,o,0,0,o,c][t],a+=[o,c,c,o,0,0][t],s+=[0,0,o,c,c,o][t],kt(i,a,s,n)},r.hsl2rgb=function(t,e,r,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t*=360;var i,a,s,o,c;return t=t%360/60,c=2*e*(r<.5?r:1-r),o=c*(1-G(t%2-1)),i=a=s=r-c/2,t=~~t,i+=[c,o,0,0,o,c][t],a+=[o,c,c,o,0,0][t],s+=[0,0,o,c,c,o][t],kt(i,a,s,n)},r.rgb2hsb=function(t,e,r){r=Ct(t,e,r),t=r[0],e=r[1],r=r[2];var n,i,a,s;return a=j(t,e,r),s=a-X(t,e,r),n=0==s?null:a==t?(e-r)/s:a==e?(r-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,i=0==s?0:s/a,{h:n,s:i,b:a,toString:_t}},r.rgb2hsl=function(t,e,r){r=Ct(t,e,r),t=r[0],e=r[1],r=r[2];var n,i,a,s,o,c;return s=j(t,e,r),o=X(t,e,r),c=s-o,n=0==c?null:s==t?(e-r)/c:s==e?(r-t)/c+2:(t-e)/c+4,n=(n+360)%6*60/360,a=(s+o)/2,i=0==c?0:a<.5?c/(2*a):c/(2-2*a),{h:n,s:i,l:a,toString:wt}},r._path2string=function(){return this.join(",").replace(st,"$1")};r._preload=function(t,e){var r=S.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,S.doc.body.removeChild(this)},r.onerror=function(){S.doc.body.removeChild(this)},S.doc.body.appendChild(r),r.src=t};r.getRGB=a(function(t){if(!t||(t=M(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:s};!(at[k](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=bt(t));var e,n,i,a,o,c,h=t.match(Y);return h?(h[2]&&(i=tt(h[2].substring(5),16),n=tt(h[2].substring(3,5),16),e=tt(h[2].substring(1,3),16)),h[3]&&(i=tt((o=h[3].charAt(3))+o,16),n=tt((o=h[3].charAt(2))+o,16),e=tt((o=h[3].charAt(1))+o,16)),h[4]&&(c=h[4][F](it),e=J(c[0]),"%"==c[0].slice(-1)&&(e*=2.55),n=J(c[1]),"%"==c[1].slice(-1)&&(n*=2.55),i=J(c[2]),"%"==c[2].slice(-1)&&(i*=2.55),"rgba"==h[1].toLowerCase().slice(0,4)&&(a=J(c[3])),
c[3]&&"%"==c[3].slice(-1)&&(a/=100)),h[5]?(c=h[5][F](it),e=J(c[0]),"%"==c[0].slice(-1)&&(e*=2.55),n=J(c[1]),"%"==c[1].slice(-1)&&(n*=2.55),i=J(c[2]),"%"==c[2].slice(-1)&&(i*=2.55),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(e/=360),"hsba"==h[1].toLowerCase().slice(0,4)&&(a=J(c[3])),c[3]&&"%"==c[3].slice(-1)&&(a/=100),r.hsb2rgb(e,n,i,a)):h[6]?(c=h[6][F](it),e=J(c[0]),"%"==c[0].slice(-1)&&(e*=2.55),n=J(c[1]),"%"==c[1].slice(-1)&&(n*=2.55),i=J(c[2]),"%"==c[2].slice(-1)&&(i*=2.55),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(e/=360),"hsla"==h[1].toLowerCase().slice(0,4)&&(a=J(c[3])),c[3]&&"%"==c[3].slice(-1)&&(a/=100),r.hsl2rgb(e,n,i,a)):(h={r:e,g:n,b:i,toString:s},h.hex="#"+(16777216|i|n<<8|e<<16).toString(16).slice(1),r.is(a,"finite")&&(h.opacity=a),h)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s}},r),r.hsb=a(function(t,e,n){return r.hsb2rgb(t,e,n).hex}),r.hsl=a(function(t,e,n){return r.hsl2rgb(t,e,n).hex}),r.rgb=a(function(t,e,r){return"#"+(16777216|r|e<<8|t<<16).toString(16).slice(1)}),r.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},r.getColor.reset=function(){delete this.start},r.parsePathString=function(t){if(!t)return null;var e=St(t);if(e.arr)return Bt(e.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return r.is(t,V)&&r.is(t[0],V)&&(i=Bt(t)),i.length||M(t).replace(ot,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(ht,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(i.push([e][O](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)i.push([e][O](a));else for(;a.length>=n[s]&&(i.push([e][O](a.splice(0,n[s]))),n[s]););}),i.toString=r._path2string,e.arr=Bt(i),i},r.parseTransformString=a(function(t){if(!t)return null;var e=[];return r.is(t,V)&&r.is(t[0],V)&&(e=Bt(t)),e.length||M(t).replace(ct,function(t,r,n){var i=[];L.call(r);n.replace(ht,function(t,e){e&&i.push(+e)}),e.push([r][O](i))}),e.toString=r._path2string,e});var St=function(t){var e=St.ps=St.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[k](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])}),e[t]};r.findDotsAtSegment=function(t,e,r,n,i,a,s,o,c){var h=1-c,u=U(h,3),l=U(h,2),f=c*c,p=f*c,d=u*t+3*l*c*r+3*h*c*c*i+p*s,g=u*e+3*l*c*n+3*h*c*c*a+p*o,x=t+2*c*(r-t)+f*(i-2*r+t),v=e+2*c*(n-e)+f*(a-2*n+e),y=r+2*c*(i-r)+f*(s-2*i+r),m=n+2*c*(a-n)+f*(o-2*a+n),b=h*t+c*r,_=h*e+c*n,w=h*i+c*s,E=h*a+c*o,C=90-180*z.atan2(x-y,v-m)/q;return(x>y||v<m)&&(C+=180),{x:d,y:g,m:{x:x,y:v},n:{x:y,y:m},start:{x:b,y:_},end:{x:w,y:E},alpha:C}},r.bezierBBox=function(t,e,n,i,a,s,o,c){r.is(t,"array")||(t=[t,e,n,i,a,s,o,c]);var h=Ft.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},r.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},r.isBBoxIntersect=function(t,e){var n=r.isPointInsideBBox;return n(e,t.x,t.y)||n(e,t.x2,t.y)||n(e,t.x,t.y2)||n(e,t.x2,t.y2)||n(t,e.x,e.y)||n(t,e.x2,e.y)||n(t,e.x,e.y2)||n(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)},r.pathIntersection=function(t,e){return p(t,e)},r.pathIntersectionNumber=function(t,e){return p(t,e,1)},r.isPointInsidePath=function(t,e,n){var i=r.pathBBox(t);return r.isPointInsideBBox(i,e,n)&&p(t,[["M",e,n],["H",i.x2+10]],1)%2==1},r._removedFactory=function(t){return function(){e("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var At=r.pathBBox=function(t){var e=St(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Dt(t);for(var r,i=0,a=0,s=[],o=[],c=0,h=t.length;c<h;c++)if(r=t[c],"M"==r[0])i=r[1],a=r[2],s.push(i),o.push(a);else{var u=Ft(i,a,r[1],r[2],r[3],r[4],r[5],r[6]);s=s[O](u.min.x,u.max.x),o=o[O](u.min.y,u.max.y),i=r[5],a=r[6]}var l=X[N](0,s),f=X[N](0,o),p=j[N](0,s),d=j[N](0,o),g=p-l,x=d-f,v={x:l,y:f,x2:p,y2:d,width:g,height:x,cx:l+g/2,cy:f+x/2};return e.bbox=n(v),v},Bt=function(t){var e=n(t);return e.toString=r._path2string,e},Nt=r._pathToRelative=function(t){var e=St(t);if(e.rel)return Bt(e.rel);r.is(t,V)&&r.is(t&&t[0],V)||(t=r.parsePathString(t));var n=[],i=0,a=0,s=0,o=0,c=0;"M"==t[0][0]&&(i=t[0][1],a=t[0][2],s=i,o=a,c++,n.push(["M",i,a]));for(var h=c,u=t.length;h<u;h++){var l=n[h]=[],f=t[h];if(f[0]!=L.call(f[0]))switch(l[0]=L.call(f[0]),l[0]){case"a":l[1]=f[1],l[2]=f[2],l[3]=f[3],l[4]=f[4],l[5]=f[5],l[6]=+(f[6]-i).toFixed(3),l[7]=+(f[7]-a).toFixed(3);break;case"v":l[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;p<d;p++)l[p]=+(f[p]-(p%2?i:a)).toFixed(3)}else{l=n[h]=[],"m"==f[0]&&(s=f[1]+i,o=f[2]+a);for(var g=0,x=f.length;g<x;g++)n[h][g]=f[g]}var v=n[h].length;switch(n[h][0]){case"z":i=s,a=o;break;case"h":i+=+n[h][v-1];break;case"v":a+=+n[h][v-1];break;default:i+=+n[h][v-2],a+=+n[h][v-1]}}return n.toString=r._path2string,e.rel=Bt(n),n},Ot=r._pathToAbsolute=function(t){var e=St(t);if(e.abs)return Bt(e.abs);if(r.is(t,V)&&r.is(t&&t[0],V)||(t=r.parsePathString(t)),!t||!t.length)return[["M",0,0]];var n=[],i=0,a=0,s=0,c=0,h=0;"M"==t[0][0]&&(i=+t[0][1],a=+t[0][2],s=i,c=a,h++,n[0]=["M",i,a]);for(var u,l,f=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=h,d=t.length;p<d;p++){if(n.push(u=[]),l=t[p],l[0]!=et.call(l[0]))switch(u[0]=et.call(l[0]),u[0]){case"A":u[1]=l[1],u[2]=l[2],u[3]=l[3],u[4]=l[4],u[5]=l[5],u[6]=+(l[6]+i),u[7]=+(l[7]+a);break;case"V":u[1]=+l[1]+a;break;case"H":u[1]=+l[1]+i;break;case"R":for(var g=[i,a][O](l.slice(1)),x=2,v=g.length;x<v;x++)g[x]=+g[x]+i,g[++x]=+g[x]+a;n.pop(),n=n[O](o(g,f));break;case"M":s=+l[1]+i,c=+l[2]+a;default:for(x=1,v=l.length;x<v;x++)u[x]=+l[x]+(x%2?i:a)}else if("R"==l[0])g=[i,a][O](l.slice(1)),n.pop(),n=n[O](o(g,f)),u=["R"][O](l.slice(-2));else for(var y=0,m=l.length;y<m;y++)u[y]=l[y];switch(u[0]){case"Z":i=s,a=c;break;case"H":i=u[1];break;case"V":a=u[1];break;case"M":s=u[u.length-2],c=u[u.length-1];default:i=u[u.length-2],a=u[u.length-1]}}return n.toString=r._path2string,e.abs=Bt(n),n},Tt=function(t,e,r,n){return[t,e,r,n,r,n]},Rt=function(t,e,r,n,i,a){var s=1/3,o=2/3;return[s*t+o*r,s*e+o*n,s*i+o*r,s*a+o*n,i,a]},It=function(t,e,r,n,i,s,o,c,h,u){var l,f=120*q/180,p=q/180*(+i||0),d=[],g=a(function(t,e,r){var n=t*z.cos(r)-e*z.sin(r),i=t*z.sin(r)+e*z.cos(r);return{x:n,y:i}});if(u)C=u[0],k=u[1],w=u[2],E=u[3];else{l=g(t,e,-p),t=l.x,e=l.y,l=g(c,h,-p),c=l.x,h=l.y;var x=(z.cos(q/180*i),z.sin(q/180*i),(t-c)/2),v=(e-h)/2,y=x*x/(r*r)+v*v/(n*n);y>1&&(y=z.sqrt(y),r=y*r,n=y*n);var m=r*r,b=n*n,_=(s==o?-1:1)*z.sqrt(G((m*b-m*v*v-b*x*x)/(m*v*v+b*x*x))),w=_*r*v/n+(t+c)/2,E=_*-n*x/r+(e+h)/2,C=z.asin(((e-E)/n).toFixed(9)),k=z.asin(((h-E)/n).toFixed(9));C=t<w?q-C:C,k=c<w?q-k:k,C<0&&(C=2*q+C),k<0&&(k=2*q+k),o&&C>k&&(C-=2*q),!o&&k>C&&(k-=2*q)}var S=k-C;if(G(S)>f){var A=k,B=c,N=h;k=C+f*(o&&k>C?1:-1),c=w+r*z.cos(k),h=E+n*z.sin(k),d=It(c,h,r,n,i,0,o,B,N,[k,A,w,E])}S=k-C;var T=z.cos(C),R=z.sin(C),I=z.cos(k),M=z.sin(k),D=z.tan(S/4),P=4/3*r*D,L=4/3*n*D,j=[t,e],X=[t+P*R,e-L*T],U=[c+P*M,h-L*I],H=[c,h];if(X[0]=2*j[0]-X[0],X[1]=2*j[1]-X[1],u)return[X,U,H][O](d);d=[X,U,H][O](d).join()[F](",");for(var W=[],V=0,Q=d.length;V<Q;V++)W[V]=V%2?g(d[V-1],d[V],p).y:g(d[V],d[V+1],p).x;return W},Mt=function(t,e,r,n,i,a,s,o,c){var h=1-c;return{x:U(h,3)*t+3*U(h,2)*c*r+3*h*c*c*i+U(c,3)*s,y:U(h,3)*e+3*U(h,2)*c*n+3*h*c*c*a+U(c,3)*o}},Ft=a(function(t,e,r,n,i,a,s,o){var c,h=i-2*r+t-(s-2*i+r),u=2*(r-t)-2*(i-r),l=t-r,f=(-u+z.sqrt(u*u-4*h*l))/2/h,p=(-u-z.sqrt(u*u-4*h*l))/2/h,d=[e,o],g=[t,s];return G(f)>"1e12"&&(f=.5),G(p)>"1e12"&&(p=.5),f>0&&f<1&&(c=Mt(t,e,r,n,i,a,s,o,f),g.push(c.x),d.push(c.y)),p>0&&p<1&&(c=Mt(t,e,r,n,i,a,s,o,p),g.push(c.x),d.push(c.y)),h=a-2*n+e-(o-2*a+n),u=2*(n-e)-2*(a-n),l=e-n,f=(-u+z.sqrt(u*u-4*h*l))/2/h,p=(-u-z.sqrt(u*u-4*h*l))/2/h,G(f)>"1e12"&&(f=.5),G(p)>"1e12"&&(p=.5),f>0&&f<1&&(c=Mt(t,e,r,n,i,a,s,o,f),g.push(c.x),d.push(c.y)),p>0&&p<1&&(c=Mt(t,e,r,n,i,a,s,o,p),g.push(c.x),d.push(c.y)),{min:{x:X[N](0,g),y:X[N](0,d)},max:{x:j[N](0,g),y:j[N](0,d)}}}),Dt=r._path2curve=a(function(t,e){var r=!e&&St(t);if(!e&&r.curve)return Bt(r.curve);for(var n=Ot(t),i=e&&Ot(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,r){var n,i,a={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in a)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][O](It[N](0,[e.x,e.y][O](t.slice(1))));break;case"S":"C"==r||"S"==r?(n=2*e.x-e.bx,i=2*e.y-e.by):(n=e.x,i=e.y),t=["C",n,i][O](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][O](Rt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][O](Rt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][O](Tt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][O](Tt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][O](Tt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][O](Tt(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)t.splice(e++,0,["C"][O](r.splice(0,6)));t.splice(e,1),l=j(n.length,i&&i.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],l=j(n.length,i&&i.length||0))},u=0,l=j(n.length,i&&i.length||0);u<l;u++){n[u]=o(n[u],a),c(n,u),i&&(i[u]=o(i[u],s)),i&&c(i,u),h(n,i,a,s,u),h(i,n,s,a,u);var f=n[u],p=i&&i[u],d=f.length,g=i&&p.length;a.x=f[d-2],a.y=f[d-1],a.bx=J(f[d-4])||a.x,a.by=J(f[d-3])||a.y,s.bx=i&&(J(p[g-4])||s.x),s.by=i&&(J(p[g-3])||s.y),s.x=i&&p[g-2],s.y=i&&p[g-1]}return i||(r.curve=Bt(n)),i?[n,i]:n},null,Bt),Pt=(r._parseDots=a(function(t){for(var e=[],n=0,i=t.length;n<i;n++){var a={},s=t[n].match(/^([^:]*):?([\d\.]*)/);if(a.color=r.getRGB(s[1]),a.color.error)return null;a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),e.push(a)}for(n=1,i=e.length-1;n<i;n++)if(!e[n].offset){for(var o=J(e[n-1].offset||0),c=0,h=n+1;h<i;h++)if(e[h].offset){c=e[h].offset;break}c||(c=100,h=i),c=J(c);for(var u=(c-o)/(h-n+1);n<h;n++)o+=u,e[n].offset=o+"%"}return e}),r._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Lt=(r._tofront=function(t,e){e.top!==t&&(Pt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},r._toback=function(t,e){e.bottom!==t&&(Pt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},r._insertafter=function(t,e,r){Pt(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},r._insertbefore=function(t,e,r){Pt(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},r.toMatrix=function(t,e){var r=At(t),n={_:{transform:R},getBBox:function(){return r}};return zt(n,e),n.matrix}),zt=(r.transformPath=function(t,e){return vt(t,Lt(t,e))},r._extractTransform=function(t,e){if(null==e)return t._.transform;e=M(e).replace(/\.{3}|\u2026/g,t._.transform||R);var n=r.parseTransformString(e),i=0,a=0,s=0,o=1,c=1,h=t._,u=new d;if(h.transform=n||[],n)for(var l=0,f=n.length;l<f;l++){var p,g,x,v,y,m=n[l],b=m.length,_=M(m[0]).toLowerCase(),w=m[0]!=_,E=w?u.invert():0;"t"==_&&3==b?w?(p=E.x(0,0),g=E.y(0,0),x=E.x(m[1],m[2]),v=E.y(m[1],m[2]),u.translate(x-p,v-g)):u.translate(m[1],m[2]):"r"==_?2==b?(y=y||t.getBBox(1),u.rotate(m[1],y.x+y.width/2,y.y+y.height/2),i+=m[1]):4==b&&(w?(x=E.x(m[2],m[3]),v=E.y(m[2],m[3]),u.rotate(m[1],x,v)):u.rotate(m[1],m[2],m[3]),i+=m[1]):"s"==_?2==b||3==b?(y=y||t.getBBox(1),u.scale(m[1],m[b-1],y.x+y.width/2,y.y+y.height/2),o*=m[1],c*=m[b-1]):5==b&&(w?(x=E.x(m[3],m[4]),v=E.y(m[3],m[4]),u.scale(m[1],m[2],x,v)):u.scale(m[1],m[2],m[3],m[4]),o*=m[1],c*=m[2]):"m"==_&&7==b&&u.add(m[1],m[2],m[3],m[4],m[5],m[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=c,h.deg=i,h.dx=a=u.e,h.dy=s=u.f,1==o&&1==c&&!i&&h.bbox?(h.bbox.x+=+a,h.bbox.y+=+s):h.dirtyT=1}),jt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Xt=r._equaliseTransform=function(t,e){e=M(e).replace(/\.{3}|\u2026/g,t),t=r.parseTransformString(t)||[],e=r.parseTransformString(e)||[];for(var n,i,a,s,o=j(t.length,e.length),c=[],h=[],u=0;u<o;u++){if(a=t[u]||jt(e[u]),s=e[u]||jt(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(c[u]=[],h[u]=[],n=0,i=j(a.length,s.length);n<i;n++)n in a&&(c[u][n]=a[n]),n in s&&(h[u][n]=s[n])}return{from:c,to:h}};r._getContainer=function(t,e,n,i){var a;if(a=null!=i||r.is(t,"object")?t:S.doc.getElementById(t),null!=a)return a.tagName?null==e?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:e,height:n}:{container:1,x:t,y:e,width:n,height:i}},r.pathToRelative=Nt,r._engine={},r.path2curve=Dt,r.matrix=function(t,e,r,n,i,a){return new d(t,e,r,n,i,a)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function n(t){var r=z.sqrt(e(t));t[0]&&(t[0]/=r),t[1]&&(t[1]/=r)}t.add=function(t,e,r,n,i,a){var s,o,c,h,u=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,r,i],[e,n,a],[0,0,1]];for(t&&t instanceof d&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(o=0;o<3;o++){for(h=0,c=0;c<3;c++)h+=l[s][c]*f[c][o];u[s][o]=h}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new d(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new d(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,n){null==e&&(e=t),(r||n)&&this.add(1,0,0,1,r,n),this.add(t,0,0,e,0,0),(r||n)&&this.add(1,0,0,1,-r,-n)},t.rotate=function(t,e,n){t=r.rad(t),e=e||0,n=n||0;var i=+z.cos(t).toFixed(9),a=+z.sin(t).toFixed(9);this.add(i,a,-a,i,e,n),this.add(1,0,0,1,-e,-n)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[M.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return r.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];t.scalex=z.sqrt(e(i[0])),n(i[0]),t.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*t.shear,i[1][1]-i[0][1]*t.shear],t.scaley=z.sqrt(e(i[1])),n(i[1]),t.shear/=t.scaley;var a=-i[0][1],s=i[1][1];return s<0?(t.rotate=r.deg(z.acos(s)),a<0&&(t.rotate=360-t.rotate)):t.rotate=r.deg(z.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[F]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:R)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:R)+(e.rotate?"r"+[e.rotate,0,0]:R)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(d.prototype);var Gt=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(Gt&&Gt[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Gt&&Gt[1]<8?_.safari=function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:_.safari=ft;for(var Ut=function(){this.returnValue=!1},qt=function(){return this.originalEvent.preventDefault()},Ht=function(){this.cancelBubble=!0},Wt=function(){return this.originalEvent.stopPropagation()},Vt=function(t){var e=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,r=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},Qt=function(){return S.doc.addEventListener?function(t,e,r,n){var i=function(t){var e=Vt(t);return r.call(n,t,e.x,e.y)};if(t.addEventListener(e,i,!1),T&&P[e]){var a=function(e){for(var i=Vt(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;s<o;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=a,e.preventDefault=qt,e.stopPropagation=Wt;break}return r.call(n,e,i.x,i.y)};t.addEventListener(P[e],a,!1)}return function(){return t.removeEventListener(e,i,!1),T&&P[e]&&t.removeEventListener(P[e],i,!1),!0}}:S.doc.attachEvent?function(t,e,r,n){var i=function(t){t=t||S.win.event;var e=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,i=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft,a=t.clientX+i,s=t.clientY+e;return t.preventDefault=t.preventDefault||Ut,t.stopPropagation=t.stopPropagation||Ht,r.call(n,t,a,s)};t.attachEvent("on"+e,i);var a=function(){return t.detachEvent("on"+e,i),!0};return a}:void 0}(),Yt=[],$t=function(t){for(var r,n=t.clientX,i=t.clientY,a=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,s=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft,o=Yt.length;o--;){if(r=Yt[o],T&&t.touches){for(var c,h=t.touches.length;h--;)if(c=t.touches[h],c.identifier==r.el._drag.id){n=c.clientX,i=c.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u,l=r.el.node,f=l.nextSibling,p=l.parentNode,d=l.style.display;S.win.opera&&p.removeChild(l),l.style.display="none",u=r.el.paper.getElementByPoint(n,i),l.style.display=d,S.win.opera&&(f?p.insertBefore(l,f):p.appendChild(l)),u&&e("raphael.drag.over."+r.el.id,r.el,u),e("raphael.drag.move."+r.el.id,r.move_scope||r.el,n+s-r.el._drag.x,i+a-r.el._drag.y,n+s,i+a,t)}},Kt=function(t){r.unmousemove($t).unmouseup(Kt);for(var n,i=Yt.length;i--;)n=Yt[i],n.el._drag={},e("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,t);Yt=[]},Zt=r.el={},Jt=D.length;Jt--;)!function(t){r[t]=Zt[t]=function(e,n){return r.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Qt(this.shape||this.node||S.doc,t,e,n||this)})),this},r["un"+t]=Zt["un"+t]=function(e){for(var n=this.events||[],i=n.length;i--;)n[i].name!=t||!r.is(e,"undefined")&&n[i].f!=e||(n[i].unbind(),n.splice(i,1),!n.length&&delete this.events);return this}}(D[Jt]);Zt.data=function(t,n){var i=ut[this.id]=ut[this.id]||{};if(0==arguments.length)return i;if(1==arguments.length){if(r.is(t,"object")){for(var a in t)t[k](a)&&this.data(a,t[a]);return this}return e("raphael.data.get."+this.id,this,i[t],t),i[t]}return i[t]=n,e("raphael.data.set."+this.id,this,n,t),this},Zt.removeData=function(t){return null==t?ut[this.id]={}:ut[this.id]&&delete ut[this.id][t],this},Zt.getData=function(){return n(ut[this.id]||{})},Zt.hover=function(t,e,r,n){return this.mouseover(t,r).mouseout(e,n||r)},Zt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var te=[];Zt.drag=function(t,n,i,a,s,o){function c(c){(c.originalEvent||c).preventDefault();var h=c.clientX,u=c.clientY,l=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,f=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft;if(this._drag.id=c.identifier,T&&c.touches)for(var p,d=c.touches.length;d--;)if(p=c.touches[d],this._drag.id=p.identifier,p.identifier==this._drag.id){h=p.clientX,u=p.clientY;break}this._drag.x=h+f,this._drag.y=u+l,!Yt.length&&r.mousemove($t).mouseup(Kt),Yt.push({el:this,move_scope:a,start_scope:s,end_scope:o}),n&&e.on("raphael.drag.start."+this.id,n),t&&e.on("raphael.drag.move."+this.id,t),i&&e.on("raphael.drag.end."+this.id,i),e("raphael.drag.start."+this.id,s||a||this,c.clientX+f,c.clientY+l,c)}return this._drag={},te.push({el:this,start:c}),this.mousedown(c),this},Zt.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},Zt.undrag=function(){for(var t=te.length;t--;)te[t].el==this&&(this.unmousedown(te[t].start),te.splice(t,1),e.unbind("raphael.drag.*."+this.id));!te.length&&r.unmousemove($t).unmouseup(Kt),Yt=[]},_.circle=function(t,e,n){var i=r._engine.circle(this,t||0,e||0,n||0);return this.__set__&&this.__set__.push(i),i},_.rect=function(t,e,n,i,a){var s=r._engine.rect(this,t||0,e||0,n||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},_.ellipse=function(t,e,n,i){var a=r._engine.ellipse(this,t||0,e||0,n||0,i||0);return this.__set__&&this.__set__.push(a),a},_.path=function(t){t&&!r.is(t,W)&&!r.is(t[0],V)&&(t+=R);var e=r._engine.path(r.format[N](r,arguments),this);return this.__set__&&this.__set__.push(e),e},_.image=function(t,e,n,i,a){var s=r._engine.image(this,t||"about:blank",e||0,n||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},_.text=function(t,e,n){var i=r._engine.text(this,t||0,e||0,M(n));return this.__set__&&this.__set__.push(i),i},_.set=function(t){!r.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new fe(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},_.setStart=function(t){this.__set__=t||this.set()},_.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},_.setSize=function(t,e){return r._engine.setSize.call(this,t,e)},_.setViewBox=function(t,e,n,i,a){return r._engine.setViewBox.call(this,t,e,n,i,a)},_.top=_.bottom=null,_.raphael=r;var ee=function(t){var e=t.getBoundingClientRect(),r=t.ownerDocument,n=r.body,i=r.documentElement,a=i.clientTop||n.clientTop||0,s=i.clientLeft||n.clientLeft||0,o=e.top+(S.win.pageYOffset||i.scrollTop||n.scrollTop)-a,c=e.left+(S.win.pageXOffset||i.scrollLeft||n.scrollLeft)-s;return{y:o,x:c}};_.getElementByPoint=function(t,e){var r=this,n=r.canvas,i=S.doc.elementFromPoint(t,e);if(S.win.opera&&"svg"==i.tagName){var a=ee(n),s=n.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=n.getIntersectionList(s,null);o.length&&(i=o[o.length-1])}if(!i)return null;for(;i.parentNode&&i!=n.parentNode&&!i.raphael;)i=i.parentNode;return i==r.canvas.parentNode&&(i=n),i=i&&i.raphael?r.getById(i.raphaelid):null},_.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(n){r.isBBoxIntersect(n.getBBox(),t)&&e.push(n)}),e},_.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},_.forEach=function(t,e){for(var r=this.bottom;r;){if(t.call(e,r)===!1)return this;r=r.next}return this},_.getElementsByPoint=function(t,e){var r=this.set();return this.forEach(function(n){n.isPointInside(t,e)&&r.push(n)}),r},Zt.isPointInside=function(t,e){var n=this.realPath=xt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(n=r.transformPath(n,this.attr("transform"))),r.isPointInsidePath(n,t,e)},Zt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=xt[this.type](this),e.bboxwt=At(this.realPath),e.bboxwt.toString=g,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=xt[this.type](this)),e.bbox=At(vt(this.realPath,this.matrix)),e.bbox.toString=g,e.dirty=e.dirtyT=0),e.bbox)},Zt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Zt.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,n=this.paper,i=n.set(),a=this.realPath||xt[this.type](this);a=this.matrix?vt(a,this.matrix):a;for(var s=1;s<r+1;s++)i.push(n.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*s).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return i.insertBefore(this).translate(e.offsetx,e.offsety)};var re=function(t,e,n,i,a,s,o,c,l){return null==l?h(t,e,n,i,a,s,o,c):r.findDotsAtSegment(t,e,n,i,a,s,o,c,u(t,e,n,i,a,s,o,c,l))},ne=function(t,e){return function(n,i,a){n=Dt(n);for(var s,o,c,h,u,l="",f={},p=0,d=0,g=n.length;d<g;d++){if(c=n[d],"M"==c[0])s=+c[1],o=+c[2];else{if(h=re(s,o,c[1],c[2],c[3],c[4],c[5],c[6]),p+h>i){if(e&&!f.start){if(u=re(s,o,c[1],c[2],c[3],c[4],c[5],c[6],i-p),l+=["C"+u.start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return l;f.start=l,l=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,c[5],c[6]].join(),p+=h,s=+c[5],o=+c[6];continue}if(!t&&!e)return u=re(s,o,c[1],c[2],c[3],c[4],c[5],c[6],i-p),{x:u.x,y:u.y,alpha:u.alpha}}p+=h,s=+c[5],o=+c[6]}l+=c.shift()+c}return f.end=l,u=t?p:e?f:r.findDotsAtSegment(s,o,c[0],c[1],c[2],c[3],c[4],c[5],1),u.alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},ie=ne(1),ae=ne(),se=ne(0,1);r.getTotalLength=ie,r.getPointAtLength=ae,r.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return se(t,e).end;var n=se(t,r,1);return e?se(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ie(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ae(e,t)},Zt.getPath=function(){var t,e=r._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return e&&(t=e(this)),t},Zt.getSubpath=function(t,e){var n=this.getPath();if(n)return r.getSubpath(n,t,e)};var oe=r.easing_formulas={linear:function(t){return t},"<":function(t){return U(t,1.7)},">":function(t){return U(t,.48)},"<>":function(t){var e=.48-t/1.04,r=z.sqrt(.1734+e*e),n=r-e,i=U(G(n),1/3)*(n<0?-1:1),a=-r-e,s=U(G(a),1/3)*(a<0?-1:1),o=i+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:U(2,-10*t)*z.sin((t-.075)*(2*q)/.3)+1},bounce:function(t){var e,r=7.5625,n=2.75;return t<1/n?e=r*t*t:t<2/n?(t-=1.5/n,e=r*t*t+.75):t<2.5/n?(t-=2.25/n,e=r*t*t+.9375):(t-=2.625/n,e=r*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var ce=[],he=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},ue=function(){for(var t=+new Date,n=0;n<ce.length;n++){var i=ce[n];if(!i.el.removed&&!i.paused){var a,s,o=t-i.start,c=i.ms,h=i.easing,u=i.from,l=i.diff,f=i.to,p=(i.t,i.el),d={},g={};if(i.initstatus?(o=(i.initstatus*i.anim.top-i.prev)/(i.percent-i.prev)*c,i.status=i.initstatus,delete i.initstatus,i.stop&&ce.splice(n--,1)):i.status=(i.prev+(i.percent-i.prev)*(o/c))/i.anim.top,!(o<0))if(o<c){var x=h(o/c);for(var v in u)if(u[k](v)){switch(nt[v]){case H:a=+u[v]+x*c*l[v];break;case"colour":a="rgb("+[le(Z(u[v].r+x*c*l[v].r)),le(Z(u[v].g+x*c*l[v].g)),le(Z(u[v].b+x*c*l[v].b))].join(",")+")";break;case"path":a=[];for(var m=0,b=u[v].length;m<b;m++){a[m]=[u[v][m][0]];for(var _=1,w=u[v][m].length;_<w;_++)a[m][_]=+u[v][m][_]+x*c*l[v][m][_];a[m]=a[m].join(I)}a=a.join(I);break;case"transform":if(l[v].real)for(a=[],m=0,b=u[v].length;m<b;m++)for(a[m]=[u[v][m][0]],_=1,w=u[v][m].length;_<w;_++)a[m][_]=u[v][m][_]+x*c*l[v][m][_];else{var E=function(t){return+u[v][t]+x*c*l[v][t]};a=[["m",E(0),E(1),E(2),E(3),E(4),E(5)]]}break;case"csv":if("clip-rect"==v)for(a=[],m=4;m--;)a[m]=+u[v][m]+x*c*l[v][m];break;default:var C=[][O](u[v]);for(a=[],m=p.paper.customAttributes[v].length;m--;)a[m]=+C[m]+x*c*l[v][m]}d[v]=a}p.attr(d),function(t,r,n){setTimeout(function(){e("raphael.anim.frame."+t,r,n)})}(p.id,p,i.anim)}else{if(function(t,n,i){setTimeout(function(){e("raphael.anim.frame."+n.id,n,i),e("raphael.anim.finish."+n.id,n,i),r.is(t,"function")&&t.call(n)})}(i.callback,p,i.anim),p.attr(f),ce.splice(n--,1),i.repeat>1&&!i.next){for(s in f)f[k](s)&&(g[s]=i.totalOrigin[s]);i.el.attr(g),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)}}}r.svg&&p&&p.paper&&p.paper.safari(),ce.length&&he(ue)},le=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,e,n,i,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var c=n instanceof v?n:r.animation(n,i,a,s);y(c,o,c.percents[0],null,o.attr());for(var h=0,u=ce.length;h<u;h++)if(ce[h].anim==e&&ce[h].el==t){ce[u-1].start=ce[h].start;break}return o},Zt.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},v.prototype.delay=function(t){var e=new v(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},v.prototype.repeat=function(t){var e=new v(this.anim,this.ms);return e.del=this.del,e.times=z.floor(j(t,0))||1,e},r.animation=function(t,e,n,i){if(t instanceof v)return t;!r.is(n,"function")&&n||(i=i||n||null,n=null),t=Object(t),e=+e||0;var a,s,o={};for(s in t)t[k](s)&&J(s)!=s&&J(s)+"%"!=s&&(a=!0,o[s]=t[s]);return a?(n&&(o.easing=n),i&&(o.callback=i),new v({100:o},e)):new v(t,e)},Zt.animate=function(t,e,n,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=t instanceof v?t:r.animation(t,e,n,i);return y(s,a,s.percents[0],null,a.attr()),a},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,X(e,t.ms)/t.ms),this},Zt.status=function(t,e){var r,n,i=[],a=0;if(null!=e)return y(t,this,-1,X(e,1)),this;for(r=ce.length;a<r;a++)if(n=ce[a],n.el.id==this.id&&(!t||n.anim==t)){if(t)return n.status;i.push({anim:n.anim,status:n.status})}return t?0:i},Zt.pause=function(t){for(var r=0;r<ce.length;r++)ce[r].el.id!=this.id||t&&ce[r].anim!=t||e("raphael.anim.pause."+this.id,this,ce[r].anim)!==!1&&(ce[r].paused=!0);return this},Zt.resume=function(t){for(var r=0;r<ce.length;r++)if(ce[r].el.id==this.id&&(!t||ce[r].anim==t)){var n=ce[r];e("raphael.anim.resume."+this.id,this,n.anim)!==!1&&(delete n.paused,this.status(n.anim,n.status))}return this},Zt.stop=function(t){for(var r=0;r<ce.length;r++)ce[r].el.id!=this.id||t&&ce[r].anim!=t||e("raphael.anim.stop."+this.id,this,ce[r].anim)!==!1&&ce.splice(r--,1);return this},e.on("raphael.remove",m),e.on("raphael.clear",m),Zt.toString=function(){return"Raphaël’s object"};var fe=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;e<r;e++)!t[e]||t[e].constructor!=Zt.constructor&&t[e].constructor!=fe||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},pe=fe.prototype;pe.push=function(){for(var t,e,r=0,n=arguments.length;r<n;r++)t=arguments[r],!t||t.constructor!=Zt.constructor&&t.constructor!=fe||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},pe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},pe.forEach=function(t,e){for(var r=0,n=this.items.length;r<n;r++)if(t.call(e,this.items[r],r)===!1)return this;return this};for(var de in Zt)Zt[k](de)&&(pe[de]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t][N](r,e)})}}(de));return pe.attr=function(t,e){if(t&&r.is(t,V)&&r.is(t[0],"object"))for(var n=0,i=t.length;n<i;n++)this.items[n].attr(t[n]);else for(var a=0,s=this.items.length;a<s;a++)this.items[a].attr(t,e);return this},pe.clear=function(){for(;this.length;)this.pop()},pe.splice=function(t,e,r){t=t<0?j(this.length+t,0):t,e=j(0,X(this.length-t,e));var n,i=[],a=[],s=[];for(n=2;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<e;n++)a.push(this[t+n]);for(;n<this.length-t;n++)i.push(this[t+n]);var o=s.length;for(n=0;n<o+i.length;n++)this.items[t+n]=this[t+n]=n<o?s[n]:i[n-o];for(n=this.items.length=this.length-=e-o;this[n];)delete this[n++];return new fe(a)},pe.exclude=function(t){for(var e=0,r=this.length;e<r;e++)if(this[e]==t)return this.splice(e,1),!0},pe.animate=function(t,e,n,i){(r.is(n,"function")||!n)&&(i=n||null);var a,s,o=this.items.length,c=o,h=this;if(!o)return this;i&&(s=function(){!--o&&i.call(h)}),n=r.is(n,W)?n:s;
var u=r.animation(t,e,n,s);for(a=this.items[--c].animate(u);c--;)this.items[c]&&!this.items[c].removed&&this.items[c].animateWith(a,u,u),this.items[c]&&!this.items[c].removed||o--;return this},pe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},pe.getBBox=function(){for(var t=[],e=[],r=[],n=[],i=this.items.length;i--;)if(!this.items[i].removed){var a=this.items[i].getBBox();t.push(a.x),e.push(a.y),r.push(a.x+a.width),n.push(a.y+a.height)}return t=X[N](0,t),e=X[N](0,e),r=j[N](0,r),n=j[N](0,n),{x:t,y:e,x2:r,y2:n,width:r-t,height:n-e}},pe.clone=function(t){t=this.paper.set();for(var e=0,r=this.items.length;e<r;e++)t.push(this.items[e].clone());return t},pe.toString=function(){return"Raphaël‘s set"},pe.glow=function(t){var e=this.paper.set();return this.forEach(function(r,n){var i=r.glow(t);null!=i&&i.forEach(function(t,r){e.push(t)})}),e},pe.isPointInside=function(t,e){var r=!1;return this.forEach(function(n){if(n.isPointInside(t,e))return r=!0,!1}),r},r.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},r=t.face["font-family"];for(var n in t.face)t.face[k](n)&&(e.face[n]=t.face[n]);if(this.fonts[r]?this.fonts[r].push(e):this.fonts[r]=[e],!t.svg){e.face["units-per-em"]=tt(t.face["units-per-em"],10);for(var i in t.glyphs)if(t.glyphs[k](i)){var a=t.glyphs[i];if(e.glyphs[i]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[k](s)&&(e.glyphs[i].k[s]=a.k[s])}}return t},_.getFont=function(t,e,n,i){if(i=i||"normal",n=n||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,r.fonts){var a=r.fonts[t];if(!a){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,R)+"(\\s|$)","i");for(var o in r.fonts)if(r.fonts[k](o)&&s.test(o)){a=r.fonts[o];break}}var c;if(a)for(var h=0,u=a.length;h<u&&(c=a[h],c.face["font-weight"]!=e||c.face["font-style"]!=n&&c.face["font-style"]||c.face["font-stretch"]!=i);h++);return c}},_.print=function(t,e,n,i,a,s,o,c){s=s||"middle",o=j(X(o||0,1),-1),c=j(X(c||1,3),1);var h,u=M(n)[F](R),l=0,f=0,p=R;if(r.is(i,"string")&&(i=this.getFont(i)),i){h=(a||16)/i.face["units-per-em"];for(var d=i.face.bbox[F](w),g=+d[0],x=d[3]-d[1],v=0,y=+d[1]+("baseline"==s?x+ +i.face.descent:x/2),m=0,b=u.length;m<b;m++){if("\n"==u[m])l=0,E=0,f=0,v+=x*c;else{var _=f&&i.glyphs[u[m-1]]||{},E=i.glyphs[u[m]];l+=f?(_.w||i.w)+(_.k&&_.k[u[m]]||0)+i.w*o:0,f=1}E&&E.d&&(p+=r.transformPath(E.d,["t",l*h,v*h,"s",h,h,g,y,"t",(t-g)/h,(e-y)/h]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},_.add=function(t){if(r.is(t,"array"))for(var e,n=this.set(),i=0,a=t.length;i<a;i++)e=t[i]||{},E[k](e.type)&&n.push(this[e.type]().attr(e));return n},r.format=function(t,e){var n=r.is(e,V)?[0][O](e):arguments;return t&&r.is(t,W)&&n.length-1&&(t=t.replace(C,function(t,e){return null==n[++e]?R:n[e]})),t||R},r.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,r=function(t,r,n){var i=n;return r.replace(e,function(t,e,r,n,a){e=e||n,i&&(e in i&&(i=i[e]),"function"==typeof i&&a&&(i=i()))}),i=(null==i||i==n?t:i)+""};return function(e,n){return String(e).replace(t,function(t,e){return r(t,e,n)})}}(),r.ninja=function(){return A.was?S.win.Raphael=A.is:delete Raphael,r},r.st=pe,function(t,e,n){function i(){/in/.test(t.readyState)?setTimeout(i,9):r.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(e,n=function(){t.removeEventListener(e,n,!1),t.readyState="complete"},!1),t.readyState="loading"),i()}(document,"DOMContentLoaded"),e.on("raphael.DOMload",function(){b=!0}),function(){if(r.svg){var t="hasOwnProperty",e=String,n=parseFloat,i=parseInt,a=Math,s=a.max,o=a.abs,c=a.pow,h=/[, ]+/,u=r.eve,l="",f=" ",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"},g={};r.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var x=function(n,i){if(i){"string"==typeof n&&(n=x(n));for(var a in i)i[t](a)&&("xlink:"==a.substring(0,6)?n.setAttributeNS(p,a.substring(6),e(i[a])):n.setAttribute(a,e(i[a])))}else n=r._g.doc.createElementNS("http://www.w3.org/2000/svg",n),n.style&&(n.style.webkitTapHighlightColor="rgba(0,0,0,0)");return n},v=function(t,i){var h="linear",u=t.id+i,f=.5,p=.5,d=t.node,g=t.paper,v=d.style,y=r._g.doc.getElementById(u);if(!y){if(i=e(i).replace(r._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=n(e),p=n(r);var i=2*(p>.5)-1;c(f-.5,2)+c(p-.5,2)>.25&&(p=a.sqrt(.25-c(f-.5,2))*i+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*i)}return l}),i=i.split(/\s*\-\s*/),"linear"==h){var m=i.shift();if(m=-n(m),isNaN(m))return null;var b=[0,0,a.cos(r.rad(m)),a.sin(r.rad(m))],_=1/(s(o(b[2]),o(b[3]))||1);b[2]*=_,b[3]*=_,b[2]<0&&(b[0]=-b[2],b[2]=0),b[3]<0&&(b[1]=-b[3],b[3]=0)}var w=r._parseDots(i);if(!w)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&u!=t.gradient.id&&(g.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){y=x(h+"Gradient",{id:u}),t.gradient=y,x(y,"radial"==h?{fx:f,fy:p}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:t.matrix.invert()}),g.defs.appendChild(y);for(var E=0,C=w.length;E<C;E++)y.appendChild(x("stop",{offset:w[E].offset?w[E].offset:E?"100%":"0%","stop-color":w[E].color||"#fff"}))}}return x(d,{fill:"url(#"+u+")",opacity:1,"fill-opacity":1}),v.fill=l,v.opacity=1,v.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);x(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},m=function(n,i,a){if("path"==n.type){for(var s,o,c,h,u,f=e(i).toLowerCase().split("-"),p=n.paper,v=a?"end":"start",y=n.node,m=n.attrs,b=m["stroke-width"],_=f.length,w="classic",E=3,C=3,k=5;_--;)switch(f[_]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=f[_];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":E=5;break;case"short":E=2}if("open"==w?(E+=2,C+=2,k+=2,c=1,h=a?4:1,u={fill:"none",stroke:m.stroke}):(h=c=E/2,u={fill:m.stroke,stroke:"none"}),n._.arrows?a?(n._.arrows.endPath&&g[n._.arrows.endPath]--,n._.arrows.endMarker&&g[n._.arrows.endMarker]--):(n._.arrows.startPath&&g[n._.arrows.startPath]--,n._.arrows.startMarker&&g[n._.arrows.startMarker]--):n._.arrows={},"none"!=w){var S="raphael-marker-"+w,A="raphael-marker-"+v+w+E+C;r._g.doc.getElementById(S)?g[S]++:(p.defs.appendChild(x(x("path"),{"stroke-linecap":"round",d:d[w],id:S})),g[S]=1);var B,N=r._g.doc.getElementById(A);N?(g[A]++,B=N.getElementsByTagName("use")[0]):(N=x(x("marker"),{id:A,markerHeight:C,markerWidth:E,orient:"auto",refX:h,refY:C/2}),B=x(x("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+E/2+" "+C/2+") ":l)+"scale("+E/k+","+C/k+")","stroke-width":(1/((E/k+C/k)/2)).toFixed(4)}),N.appendChild(B),p.defs.appendChild(N),g[A]=1),x(B,u);var O=c*("diamond"!=w&&"oval"!=w);a?(s=n._.arrows.startdx*b||0,o=r.getTotalLength(m.path)-O*b):(s=O*b,o=r.getTotalLength(m.path)-(n._.arrows.enddx*b||0)),u={},u["marker-"+v]="url(#"+A+")",(o||s)&&(u.d=r.getSubpath(m.path,s,o)),x(y,u),n._.arrows[v+"Path"]=S,n._.arrows[v+"Marker"]=A,n._.arrows[v+"dx"]=O,n._.arrows[v+"Type"]=w,n._.arrows[v+"String"]=i}else a?(s=n._.arrows.startdx*b||0,o=r.getTotalLength(m.path)-s):(s=0,o=r.getTotalLength(m.path)-(n._.arrows.enddx*b||0)),n._.arrows[v+"Path"]&&x(y,{d:r.getSubpath(m.path,s,o)}),delete n._.arrows[v+"Path"],delete n._.arrows[v+"Marker"],delete n._.arrows[v+"dx"],delete n._.arrows[v+"Type"],delete n._.arrows[v+"String"];for(u in g)if(g[t](u)&&!g[u]){var T=r._g.doc.getElementById(u);T&&T.parentNode.removeChild(T)}}},b={"":[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]},_=function(t,r,n){if(r=b[e(r).toLowerCase()]){for(var i=t.attrs["stroke-width"]||"1",a={round:i,square:i,butt:0}[t.attrs["stroke-linecap"]||n["stroke-linecap"]]||0,s=[],o=r.length;o--;)s[o]=r[o]*i+(o%2?1:-1)*a;x(t.node,{"stroke-dasharray":s.join(",")})}},w=function(n,a){var c=n.node,u=n.attrs,f=c.style.visibility;c.style.visibility="hidden";for(var d in a)if(a[t](d)){if(!r._availableAttrs[t](d))continue;var g=a[d];switch(u[d]=g,d){case"blur":n.blur(g);break;case"title":var b=c.getElementsByTagName("title");if(b.length&&(b=b[0]))b.firstChild.nodeValue=g;else{b=x("title");var w=r._g.doc.createTextNode(g);b.appendChild(w),c.appendChild(b)}break;case"href":case"target":var E=c.parentNode;if("a"!=E.tagName.toLowerCase()){var k=x("a");E.insertBefore(k,c),k.appendChild(c),E=k}"target"==d?E.setAttributeNS(p,"show","blank"==g?"new":g):E.setAttributeNS(p,d,g);break;case"cursor":c.style.cursor=g;break;case"transform":n.transform(g);break;case"arrow-start":m(n,g);break;case"arrow-end":m(n,g,1);break;case"clip-rect":var S=e(g).split(h);if(4==S.length){n.clip&&n.clip.parentNode.parentNode.removeChild(n.clip.parentNode);var A=x("clipPath"),B=x("rect");A.id=r.createUUID(),x(B,{x:S[0],y:S[1],width:S[2],height:S[3]}),A.appendChild(B),n.paper.defs.appendChild(A),x(c,{"clip-path":"url(#"+A.id+")"}),n.clip=B}if(!g){var N=c.getAttribute("clip-path");if(N){var O=r._g.doc.getElementById(N.replace(/(^url\(#|\)$)/g,l));O&&O.parentNode.removeChild(O),x(c,{"clip-path":l}),delete n.clip}}break;case"path":"path"==n.type&&(x(c,{d:g?u.path=r._pathToAbsolute(g):"M0,0"}),n._.dirty=1,n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1)));break;case"width":if(c.setAttribute(d,g),n._.dirty=1,!u.fx)break;d="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==n.type)break;case"cx":c.setAttribute(d,g),n.pattern&&y(n),n._.dirty=1;break;case"height":if(c.setAttribute(d,g),n._.dirty=1,!u.fy)break;d="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==n.type)break;case"cy":c.setAttribute(d,g),n.pattern&&y(n),n._.dirty=1;break;case"r":"rect"==n.type?x(c,{rx:g,ry:g}):c.setAttribute(d,g),n._.dirty=1;break;case"src":"image"==n.type&&c.setAttributeNS(p,"href",g);break;case"stroke-width":1==n._.sx&&1==n._.sy||(g/=s(o(n._.sx),o(n._.sy))||1),n.paper._vbSize&&(g*=n.paper._vbSize),c.setAttribute(d,g),u["stroke-dasharray"]&&_(n,u["stroke-dasharray"],a),n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1));break;case"stroke-dasharray":_(n,g,a);break;case"fill":var T=e(g).match(r._ISURL);if(T){A=x("pattern");var R=x("image");A.id=r.createUUID(),x(A,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),x(R,{x:0,y:0,"xlink:href":T[1]}),A.appendChild(R),function(t){r._preload(T[1],function(){var e=this.offsetWidth,r=this.offsetHeight;x(t,{width:e,height:r}),x(R,{width:e,height:r}),n.paper.safari()})}(A),n.paper.defs.appendChild(A),x(c,{fill:"url(#"+A.id+")"}),n.pattern=A,n.pattern&&y(n);break}var I=r.getRGB(g);if(I.error){if(("circle"==n.type||"ellipse"==n.type||"r"!=e(g).charAt())&&v(n,g)){if("opacity"in u||"fill-opacity"in u){var M=r._g.doc.getElementById(c.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(M){var F=M.getElementsByTagName("stop");x(F[F.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=g,u.fill="none";break}}else delete a.gradient,delete u.gradient,!r.is(u.opacity,"undefined")&&r.is(a.opacity,"undefined")&&x(c,{opacity:u.opacity}),!r.is(u["fill-opacity"],"undefined")&&r.is(a["fill-opacity"],"undefined")&&x(c,{"fill-opacity":u["fill-opacity"]});I[t]("opacity")&&x(c,{"fill-opacity":I.opacity>1?I.opacity/100:I.opacity});case"stroke":I=r.getRGB(g),c.setAttribute(d,I.hex),"stroke"==d&&I[t]("opacity")&&x(c,{"stroke-opacity":I.opacity>1?I.opacity/100:I.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=e(g).charAt())&&v(n,g);break;case"opacity":u.gradient&&!u[t]("stroke-opacity")&&x(c,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){M=r._g.doc.getElementById(c.getAttribute("fill").replace(/^url\(#|\)$/g,l)),M&&(F=M.getElementsByTagName("stop"),x(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=i(g,10)+"px");var D=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});c.style[D]=g,n._.dirty=1,c.setAttribute(d,g)}}C(n,a),c.style.visibility=f},E=1.2,C=function(n,a){if("text"==n.type&&(a[t]("text")||a[t]("font")||a[t]("font-size")||a[t]("x")||a[t]("y"))){var s=n.attrs,o=n.node,c=o.firstChild?i(r._g.doc.defaultView.getComputedStyle(o.firstChild,l).getPropertyValue("font-size"),10):10;if(a[t]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h,u=e(a.text).split("\n"),f=[],p=0,d=u.length;p<d;p++)h=x("tspan"),p&&x(h,{dy:c*E,x:s.x}),h.appendChild(r._g.doc.createTextNode(u[p])),o.appendChild(h),f[p]=h}else for(f=o.getElementsByTagName("tspan"),p=0,d=f.length;p<d;p++)p?x(f[p],{dy:c*E,x:s.x}):x(f[0],{dy:0});x(o,{x:s.x,y:s.y}),n._.dirty=1;var g=n._getBBox(),v=s.y-(g.y+g.height/2);v&&r.is(v,"finite")&&x(f[0],{dy:v})}},k=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=r._oid++,t.raphaelid=this.id,this.matrix=r.matrix(),this.realPath=null,this.paper=e,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},S=r.el;k.prototype=S,S.constructor=k,r._engine.path=function(t,e){var r=x("path");e.canvas&&e.canvas.appendChild(r);var n=new k(r,e);return n.type="path",w(n,{fill:"none",stroke:"#000",path:t}),n},S.rotate=function(t,r,i){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(r=n(t[1]),i=n(t[2])),t=n(t[0]),null==i&&(r=i),null==r||null==i){var a=this.getBBox(1);r=a.x+a.width/2,i=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,r,i]])),this},S.scale=function(t,r,i,a){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(r=n(t[1]),i=n(t[2]),a=n(t[3])),t=n(t[0]),null==r&&(r=t),null==a&&(i=a),null==i||null==a)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,r,i,a]])),this},S.translate=function(t,r){return this.removed?this:(t=e(t).split(h),t.length-1&&(r=n(t[1])),t=n(t[0])||0,r=+r||0,this.transform(this._.transform.concat([["t",t,r]])),this)},S.transform=function(e){var n=this._;if(null==e)return n.transform;if(r._extractTransform(this,e),this.clip&&x(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&x(this.node,{transform:this.matrix}),1!=n.sx||1!=n.sy){var i=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},S.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},S.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},S.remove=function(){if(!this.removed&&this.node.parentNode){var t=this.paper;t.__set__&&t.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),r._tear(this,t),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var e in this)this[e]="function"==typeof this[e]?r._removedFactory(e):null;this.removed=!0}},S._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(t){}finally{e=e||{}}return t&&this.hide(),e},S.attr=function(e,n){if(this.removed)return this;if(null==e){var i={};for(var a in this.attrs)this.attrs[t](a)&&(i[a]=this.attrs[a]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==n&&r.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==e)return this._.transform;for(var s=e.split(h),o={},c=0,l=s.length;c<l;c++)e=s[c],e in this.attrs?o[e]=this.attrs[e]:r.is(this.paper.customAttributes[e],"function")?o[e]=this.paper.customAttributes[e].def:o[e]=r._availableAttrs[e];return l-1?o:o[s[0]]}if(null==n&&r.is(e,"array")){for(o={},c=0,l=e.length;c<l;c++)o[e[c]]=this.attr(e[c]);return o}if(null!=n){var f={};f[e]=n}else null!=e&&r.is(e,"object")&&(f=e);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&f[t](p)&&r.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[t](g)&&(f[g]=d[g])}return w(this,f),this},S.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&r._tofront(this,t),this},S.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;"a"==t.tagName.toLowerCase()?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),r._toback(this,this.paper);this.paper;return this},S.insertAfter=function(t){if(this.removed)return this;var e=t.node||t[t.length-1].node;return e.nextSibling?e.parentNode.insertBefore(this.node,e.nextSibling):e.parentNode.appendChild(this.node),r._insertafter(this,t,this.paper),this},S.insertBefore=function(t){if(this.removed)return this;var e=t.node||t[0].node;return e.parentNode.insertBefore(this.node,e),r._insertbefore(this,t,this.paper),this},S.blur=function(t){var e=this;if(0!==+t){var n=x("filter"),i=x("feGaussianBlur");e.attrs.blur=t,n.id=r.createUUID(),x(i,{stdDeviation:+t||1.5}),n.appendChild(i),e.paper.defs.appendChild(n),e._blur=n,x(e.node,{filter:"url(#"+n.id+")"})}else e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter");return e},r._engine.circle=function(t,e,r,n){var i=x("circle");t.canvas&&t.canvas.appendChild(i);var a=new k(i,t);return a.attrs={cx:e,cy:r,r:n,fill:"none",stroke:"#000"},a.type="circle",x(i,a.attrs),a},r._engine.rect=function(t,e,r,n,i,a){var s=x("rect");t.canvas&&t.canvas.appendChild(s);var o=new k(s,t);return o.attrs={x:e,y:r,width:n,height:i,r:a||0,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",x(s,o.attrs),o},r._engine.ellipse=function(t,e,r,n,i){var a=x("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new k(a,t);return s.attrs={cx:e,cy:r,rx:n,ry:i,fill:"none",stroke:"#000"},s.type="ellipse",x(a,s.attrs),s},r._engine.image=function(t,e,r,n,i,a){var s=x("image");x(s,{x:r,y:n,width:i,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new k(s,t);return o.attrs={x:r,y:n,width:i,height:a,src:e},o.type="image",o},r._engine.text=function(t,e,n,i){var a=x("text");t.canvas&&t.canvas.appendChild(a);var s=new k(a,t);return s.attrs={x:e,y:n,"text-anchor":"middle",text:i,font:r._availableAttrs.font,stroke:"none",fill:"#000"},s.type="text",w(s,s.attrs),s},r._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},r._engine.create=function(){var t=r._getContainer.apply(0,arguments),e=t&&t.container,n=t.x,i=t.y,a=t.width,s=t.height;if(!e)throw new Error("SVG container not found.");var o,c=x("svg"),h="overflow:hidden;";return n=n||0,i=i||0,a=a||512,s=s||342,x(c,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg"}),1==e?(c.style.cssText=h+"position:absolute;left:"+n+"px;top:"+i+"px",r._g.doc.body.appendChild(c),o=1):(c.style.cssText=h+"position:relative",e.firstChild?e.insertBefore(c,e.firstChild):e.appendChild(c)),e=new r._Paper,e.width=a,e.height=s,e.canvas=c,e.clear(),e._left=e._top=0,o&&(e.renderfix=function(){}),e.renderfix(),e},r._engine.setViewBox=function(t,e,r,n,i){u("raphael.setViewBox",this,this._viewBox,[t,e,r,n,i]);var a,o,c=s(r/this.width,n/this.height),h=this.top,l=i?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(c=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=c,a=t+f+e+f+r+f+n),x(this.canvas,{viewBox:a,preserveAspectRatio:l});c&&h;)o="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":o}),h._.dirty=1,h._.dirtyT=1,h=h.prev;return this._viewBox=[t,e,r,n,!!i],this},r.prototype.renderfix=function(){var t,e=this.canvas,r=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(r){t=e.createSVGMatrix()}var n=-t.e%1,i=-t.f%1;(n||i)&&(n&&(this._left=(this._left+n)%1,r.left=this._left+"px"),i&&(this._top=(this._top+i)%1,r.top=this._top+"px"))},r.prototype.clear=function(){r.eve("raphael.clear",this);for(var t=this.canvas;t.firstChild;)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=x("desc")).appendChild(r._g.doc.createTextNode("Created with Raphaël "+r.version)),t.appendChild(this.desc),t.appendChild(this.defs=x("defs"))},r.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null};var A=r.st;for(var B in S)S[t](B)&&!A[t](B)&&(A[B]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(B))}}(),function(){if(r.vml){var t="hasOwnProperty",e=String,n=parseFloat,i=Math,a=i.round,s=i.max,o=i.min,c=i.abs,h="fill",u=/[, ]+/,l=r.eve,f=" progid:DXImageTransform.Microsoft",p=" ",d="",g={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},x=/([clmz]),?([^clmz]*)/gi,v=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,m="position:absolute;left:0;top:0;width:1px;height:1px",b=21600,_={path:1,rect:1,image:1},w={circle:1,ellipse:1},E=function(t){var n=/[ahqstv]/gi,i=r._pathToAbsolute;if(e(t).match(n)&&(i=r._path2curve),n=/[clmz]/g,i==r._pathToAbsolute&&!e(t).match(n)){var s=e(t).replace(x,function(t,e,r){var n=[],i="m"==e.toLowerCase(),s=g[e];return r.replace(y,function(t){i&&2==n.length&&(s+=n+g["m"==e?"l":"L"],n=[]),n.push(a(t*b))}),s+n});return s}var o,c,h=i(t);s=[];for(var u=0,l=h.length;u<l;u++){o=h[u],c=h[u][0].toLowerCase(),"z"==c&&(c="x");for(var f=1,v=o.length;f<v;f++)c+=a(o[f]*b)+(f!=v-1?",":d);s.push(c)}return s.join(p)},C=function(t,e,n){var i=r.matrix();return i.rotate(-t,.5,.5),{dx:i.x(e,n),dy:i.y(e,n)}},k=function(t,e,r,n,i,a){var s=t._,o=t.matrix,u=s.fillpos,l=t.node,f=l.style,d=1,g="",x=b/e,v=b/r;if(f.visibility="hidden",e&&r){if(l.coordsize=c(x)+p+c(v),f.rotation=a*(e*r<0?-1:1),a){var y=C(a,n,i);n=y.dx,i=y.dy}if(e<0&&(g+="x"),r<0&&(g+=" y")&&(d=-1),f.flip=g,l.coordorigin=n*-x+p+i*-v,u||s.fillsize){var m=l.getElementsByTagName(h);m=m&&m[0],l.removeChild(m),u&&(y=C(a,o.x(u[0],u[1]),o.y(u[0],u[1])),m.position=y.dx*d+p+y.dy*d),s.fillsize&&(m.size=s.fillsize[0]*c(e)+p+s.fillsize[1]*c(r)),l.appendChild(m)}f.visibility="visible"}};r.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S=function(t,r,n){for(var i=e(r).toLowerCase().split("-"),a=n?"end":"start",s=i.length,o="classic",c="medium",h="medium";s--;)switch(i[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=i[s];break;case"wide":case"narrow":h=i[s];break;case"long":case"short":c=i[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=c,u[a+"arrowwidth"]=h},A=function(i,c){i.attrs=i.attrs||{};var l=i.node,f=i.attrs,g=l.style,x=_[i.type]&&(c.x!=f.x||c.y!=f.y||c.width!=f.width||c.height!=f.height||c.cx!=f.cx||c.cy!=f.cy||c.rx!=f.rx||c.ry!=f.ry||c.r!=f.r),v=w[i.type]&&(f.cx!=c.cx||f.cy!=c.cy||f.r!=c.r||f.rx!=c.rx||f.ry!=c.ry),y=i;for(var m in c)c[t](m)&&(f[m]=c[m]);if(x&&(f.path=r._getPath[i.type](i),i._.dirty=1),c.href&&(l.href=c.href),c.title&&(l.title=c.title),c.target&&(l.target=c.target),c.cursor&&(g.cursor=c.cursor),"blur"in c&&i.blur(c.blur),(c.path&&"path"==i.type||x)&&(l.path=E(~e(f.path).toLowerCase().indexOf("r")?r._pathToAbsolute(f.path):f.path),"image"==i.type&&(i._.fillpos=[f.x,f.y],i._.fillsize=[f.width,f.height],k(i,1,1,0,0,0))),"transform"in c&&i.transform(c.transform),v){var C=+f.cx,A=+f.cy,N=+f.rx||+f.r||0,O=+f.ry||+f.r||0;l.path=r.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((C-N)*b),a((A-O)*b),a((C+N)*b),a((A+O)*b),a(C*b)),i._.dirty=1}if("clip-rect"in c){var R=e(c["clip-rect"]).split(u);if(4==R.length){R[2]=+R[2]+ +R[0],R[3]=+R[3]+ +R[1];var I=l.clipRect||r._g.doc.createElement("div"),M=I.style;M.clip=r.format("rect({1}px {2}px {3}px {0}px)",R),l.clipRect||(M.position="absolute",M.top=0,M.left=0,M.width=i.paper.width+"px",M.height=i.paper.height+"px",l.parentNode.insertBefore(I,l),I.appendChild(l),l.clipRect=I)}c["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(i.textpath){var F=i.textpath.style;c.font&&(F.font=c.font),c["font-family"]&&(F.fontFamily='"'+c["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),c["font-size"]&&(F.fontSize=c["font-size"]),c["font-weight"]&&(F.fontWeight=c["font-weight"]),c["font-style"]&&(F.fontStyle=c["font-style"])}if("arrow-start"in c&&S(y,c["arrow-start"]),"arrow-end"in c&&S(y,c["arrow-end"],1),null!=c.opacity||null!=c["stroke-width"]||null!=c.fill||null!=c.src||null!=c.stroke||null!=c["stroke-width"]||null!=c["stroke-opacity"]||null!=c["fill-opacity"]||null!=c["stroke-dasharray"]||null!=c["stroke-miterlimit"]||null!=c["stroke-linejoin"]||null!=c["stroke-linecap"]){var D=l.getElementsByTagName(h),P=!1;if(D=D&&D[0],!D&&(P=D=T(h)),"image"==i.type&&c.src&&(D.src=c.src),c.fill&&(D.on=!0),null!=D.on&&"none"!=c.fill&&null!==c.fill||(D.on=!1),D.on&&c.fill){var L=e(c.fill).match(r._ISURL);if(L){D.parentNode==l&&l.removeChild(D),D.rotate=!0,D.src=L[1],D.type="tile";var z=i.getBBox(1);D.position=z.x+p+z.y,i._.fillpos=[z.x,z.y],r._preload(L[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else D.color=r.getRGB(c.fill).hex,D.src=d,D.type="solid",r.getRGB(c.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=e(c.fill).charAt())&&B(y,c.fill,D)&&(f.fill="none",f.gradient=c.fill,D.rotate=!1)}if("fill-opacity"in c||"opacity"in c){var j=((+f["fill-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+r.getRGB(c.fill).o+1||2)-1);j=o(s(j,0),1),D.opacity=j,D.src&&(D.color="none")}l.appendChild(D);var X=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],G=!1;!X&&(G=X=T("stroke")),(c.stroke&&"none"!=c.stroke||c["stroke-width"]||null!=c["stroke-opacity"]||c["stroke-dasharray"]||c["stroke-miterlimit"]||c["stroke-linejoin"]||c["stroke-linecap"])&&(X.on=!0),("none"==c.stroke||null===c.stroke||null==X.on||0==c.stroke||0==c["stroke-width"])&&(X.on=!1);var U=r.getRGB(c.stroke);X.on&&c.stroke&&(X.color=U.hex),j=((+f["stroke-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+U.o+1||2)-1);var q=.75*(n(c["stroke-width"])||1);if(j=o(s(j,0),1),null==c["stroke-width"]&&(q=f["stroke-width"]),c["stroke-width"]&&(X.weight=q),q&&q<1&&(j*=q)&&(X.weight=1),X.opacity=j,c["stroke-linejoin"]&&(X.joinstyle=c["stroke-linejoin"]||"miter"),X.miterlimit=c["stroke-miterlimit"]||8,c["stroke-linecap"]&&(X.endcap="butt"==c["stroke-linecap"]?"flat":"square"==c["stroke-linecap"]?"square":"round"),"stroke-dasharray"in c){var H={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};X.dashstyle=H[t](c["stroke-dasharray"])?H[c["stroke-dasharray"]]:d}G&&l.appendChild(X)}if("text"==y.type){y.paper.canvas.style.display=d;var W=y.paper.span,V=100,Q=f.font&&f.font.match(/\d+(?:\.\d*)?(?=px)/);g=W.style,f.font&&(g.font=f.font),f["font-family"]&&(g.fontFamily=f["font-family"]),f["font-weight"]&&(g.fontWeight=f["font-weight"]),f["font-style"]&&(g.fontStyle=f["font-style"]),Q=n(f["font-size"]||Q&&Q[0])||10,g.fontSize=Q*V+"px",y.textpath.string&&(W.innerHTML=e(y.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var Y=W.getBoundingClientRect();y.W=f.w=(Y.right-Y.left)/V,y.H=f.h=(Y.bottom-Y.top)/V,y.X=f.x,y.Y=f.y+y.H/2,("x"in c||"y"in c)&&(y.path.v=r.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var $=["x","y","text","font","font-family","font-weight","font-style","font-size"],K=0,Z=$.length;K<Z;K++)if($[K]in c){y._.dirty=1;break}switch(f["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}},B=function(t,a,s){t.attrs=t.attrs||{};var o=(t.attrs,Math.pow),c="linear",h=".5 .5";if(t.attrs.gradient=a,a=e(a).replace(r._radial_gradient,function(t,e,r){return c="radial",e&&r&&(e=n(e),r=n(r),o(e-.5,2)+o(r-.5,2)>.25&&(r=i.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+p+r),d}),a=a.split(/\s*\-\s*/),"linear"==c){var u=a.shift();if(u=-n(u),isNaN(u))return null}var l=r._parseDots(a);if(!l)return null;if(t=t.shape||t.node,l.length){t.removeChild(s),s.on=!0,s.method="none",s.color=l[0].color,s.color2=l[l.length-1].color;for(var f=[],g=0,x=l.length;g<x;g++)l[g].offset&&f.push(l[g].offset+p+l[g].color);s.colors=f.length?f.join():"0% "+s.color,"radial"==c?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=h,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),t.appendChild(s)}return 1},N=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=r._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=e,this.matrix=r.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},O=r.el;N.prototype=O,O.constructor=N,O.transform=function(t){if(null==t)return this._.transform;var n,i=this.paper._viewBoxShift,a=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d;i&&(n=t=e(t).replace(/\.{3}|\u2026/g,this._.transform||d)),r._extractTransform(this,a+t);var s,o=this.matrix.clone(),c=this.skew,h=this.node,u=~e(this.attrs.fill).indexOf("-"),l=!e(this.attrs.fill).indexOf("url(");if(o.translate(1,1),l||u||"image"==this.type)if(c.matrix="1 0 0 1",c.offset="0 0",s=o.split(),u&&s.noRotation||!s.isSimple){h.style.filter=o.toFilter();var f=this.getBBox(),g=this.getBBox(1),x=f.x-g.x,v=f.y-g.y;h.coordorigin=x*-b+p+v*-b,k(this,1,1,x,v,0)}else h.style.filter=d,k(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else h.style.filter=d,c.matrix=e(o),c.offset=o.offset();return n&&(this._.transform=n),this},O.rotate=function(t,r,i){if(this.removed)return this;if(null!=t){if(t=e(t).split(u),t.length-1&&(r=n(t[1]),i=n(t[2])),t=n(t[0]),null==i&&(r=i),null==r||null==i){var a=this.getBBox(1);r=a.x+a.width/2,i=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,r,i]])),this}},O.translate=function(t,r){return this.removed?this:(t=e(t).split(u),t.length-1&&(r=n(t[1])),t=n(t[0])||0,r=+r||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=r),this.transform(this._.transform.concat([["t",t,r]])),this)},O.scale=function(t,r,i,a){if(this.removed)return this;if(t=e(t).split(u),t.length-1&&(r=n(t[1]),i=n(t[2]),a=n(t[3]),isNaN(i)&&(i=null),isNaN(a)&&(a=null)),t=n(t[0]),null==r&&(r=t),null==a&&(i=a),null==i||null==a)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,r,i,a]])),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),r.eve.unbind("raphael.*.*."+this.id),
r._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null;this.removed=!0}},O.attr=function(e,n){if(this.removed)return this;if(null==e){var i={};for(var a in this.attrs)this.attrs[t](a)&&(i[a]=this.attrs[a]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==n&&r.is(e,"string")){if(e==h&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=e.split(u),o={},c=0,f=s.length;c<f;c++)e=s[c],e in this.attrs?o[e]=this.attrs[e]:r.is(this.paper.customAttributes[e],"function")?o[e]=this.paper.customAttributes[e].def:o[e]=r._availableAttrs[e];return f-1?o:o[s[0]]}if(this.attrs&&null==n&&r.is(e,"array")){for(o={},c=0,f=e.length;c<f;c++)o[e[c]]=this.attr(e[c]);return o}var p;null!=n&&(p={},p[e]=n),null==n&&r.is(e,"object")&&(p=e);for(var d in p)l("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[t](d)&&p[t](d)&&r.is(this.paper.customAttributes[d],"function")){var g=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var x in g)g[t](x)&&(p[x]=g[x])}p.text&&"text"==this.type&&(this.textpath.string=p.text),A(this,p)}return this},O.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&r._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),r._toback(this,this.paper)),this)},O.insertAfter=function(t){return this.removed?this:(t.constructor==r.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),r._insertafter(this,t,this.paper),this)},O.insertBefore=function(t){return this.removed?this:(t.constructor==r.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),r._insertbefore(this,t,this.paper),this)},O.blur=function(t){var e=this.node.runtimeStyle,n=e.filter;return n=n.replace(v,d),0!==+t?(this.attrs.blur=t,e.filter=n+p+f+".Blur(pixelradius="+(+t||1.5)+")",e.margin=r.format("-{0}px 0 0 -{0}px",a(+t||1.5))):(e.filter=n,e.margin=0,delete this.attrs.blur),this},r._engine.path=function(t,e){var r=T("shape");r.style.cssText=m,r.coordsize=b+p+b,r.coordorigin=e.coordorigin;var n=new N(r,e),i={fill:"none",stroke:"#000"};t&&(i.path=t),n.type="path",n.path=[],n.Path=d,A(n,i),e.canvas.appendChild(r);var a=T("skew");return a.on=!0,r.appendChild(a),n.skew=a,n.transform(d),n},r._engine.rect=function(t,e,n,i,a,s){var o=r._rectPath(e,n,i,a,s),c=t.path(o),h=c.attrs;return c.X=h.x=e,c.Y=h.y=n,c.W=h.width=i,c.H=h.height=a,h.r=s,h.path=o,c.type="rect",c},r._engine.ellipse=function(t,e,r,n,i){var a=t.path();a.attrs;return a.X=e-n,a.Y=r-i,a.W=2*n,a.H=2*i,a.type="ellipse",A(a,{cx:e,cy:r,rx:n,ry:i}),a},r._engine.circle=function(t,e,r,n){var i=t.path();i.attrs;return i.X=e-n,i.Y=r-n,i.W=i.H=2*n,i.type="circle",A(i,{cx:e,cy:r,r:n}),i},r._engine.image=function(t,e,n,i,a,s){var o=r._rectPath(n,i,a,s),c=t.path(o).attr({stroke:"none"}),u=c.attrs,l=c.node,f=l.getElementsByTagName(h)[0];return u.src=e,c.X=u.x=n,c.Y=u.y=i,c.W=u.width=a,c.H=u.height=s,u.path=o,c.type="image",f.parentNode==l&&l.removeChild(f),f.rotate=!0,f.src=e,f.type="tile",c._.fillpos=[n,i],c._.fillsize=[a,s],l.appendChild(f),k(c,1,1,0,0,0),c},r._engine.text=function(t,n,i,s){var o=T("shape"),c=T("path"),h=T("textpath");n=n||0,i=i||0,s=s||"",c.v=r.format("m{0},{1}l{2},{1}",a(n*b),a(i*b),a(n*b)+1),c.textpathok=!0,h.string=e(s),h.on=!0,o.style.cssText=m,o.coordsize=b+p+b,o.coordorigin="0 0";var u=new N(o,t),l={fill:"#000",stroke:"none",font:r._availableAttrs.font,text:s};u.shape=o,u.path=c,u.textpath=h,u.type="text",u.attrs.text=e(s),u.attrs.x=n,u.attrs.y=i,u.attrs.w=1,u.attrs.h=1,A(u,l),o.appendChild(h),o.appendChild(c),t.canvas.appendChild(o);var f=T("skew");return f.on=!0,o.appendChild(f),u.skew=f,u.transform(d),u},r._engine.setSize=function(t,e){var n=this.canvas.style;return this.width=t,this.height=e,t==+t&&(t+="px"),e==+e&&(e+="px"),n.width=t,n.height=e,n.clip="rect(0 "+t+" "+e+" 0)",this._viewBox&&r._engine.setViewBox.apply(this,this._viewBox),this},r._engine.setViewBox=function(t,e,n,i,a){r.eve("raphael.setViewBox",this,this._viewBox,[t,e,n,i,a]);var o,c,h=this.width,u=this.height,l=1/s(n/h,i/u);return a&&(o=u/i,c=h/n,n*o<h&&(t-=(h-n*o)/2/o),i*c<u&&(e-=(u-i*c)/2/c)),this._viewBox=[t,e,n,i,!!a],this._viewBoxShift={dx:-t,dy:-e,scale:l},this.forEach(function(t){t.transform("...")}),this};var T;r._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),T=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){T=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},r._engine.initWin(r._g.win),r._engine.create=function(){var t=r._getContainer.apply(0,arguments),e=t.container,n=t.height,i=t.width,a=t.x,s=t.y;if(!e)throw new Error("VML container not found.");var o=new r._Paper,c=o.canvas=r._g.doc.createElement("div"),h=c.style;return a=a||0,s=s||0,i=i||512,n=n||342,o.width=i,o.height=n,i==+i&&(i+="px"),n==+n&&(n+="px"),o.coordsize=1e3*b+p+1e3*b,o.coordorigin="0 0",o.span=r._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",c.appendChild(o.span),h.cssText=r.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,n),1==e?(r._g.doc.body.appendChild(c),h.left=a+"px",h.top=s+"px",h.position="absolute"):e.firstChild?e.insertBefore(c,e.firstChild):e.appendChild(c),o.renderfix=function(){},o},r.prototype.clear=function(){r.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=r._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},r.prototype.remove=function(){r.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null;return!0};var R=r.st;for(var I in O)O[t](I)&&!R[t](I)&&(R[I]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(I))}}(),A.was?S.win.Raphael=r:Raphael=r,r}),"function"!=typeof define)var define=require("amdefine")(module);define("regulex",["./Kit","./NFA","./RegExp","./parse","./visualize","./libs/raphael"],function(t,e,r,n,i,a){return{Kit:t,NFA:e,RegExp:r,parse:n,Raphael:a,visualize:i}});