diff --git a/skeleton.css b/skeleton.css deleted file mode 100644 index 3a8bd66..0000000 --- a/skeleton.css +++ /dev/null @@ -1,419 +0,0 @@ -/* -* Skeleton V2.0.2 -* Copyright 2014, Dave Gamache -* www.getskeleton.com -* Free to use under the MIT license. -* http://www.opensource.org/licenses/mit-license.php -* 12/15/2014 -*/ - - -/* Table of contents -–––––––––––––––––––––––––––––––––––––––––––––––––– -- Grid -- Base Styles -- Typography -- Links -- Buttons -- Forms -- Lists -- Code -- Tables -- Spacing -- Utilities -- Clearing -- Media Queries -*/ - - -/* Grid -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -.container { - position: relative; - width: 100%; - max-width: 960px; - margin: 0 auto; - padding: 0 20px; - box-sizing: border-box; } -.column, -.columns { - width: 100%; - float: left; - box-sizing: border-box; } - -/* For devices larger than 400px */ -@media (min-width: 400px) { - .container { - width: 85%; - padding: 0; } -} - -/* For devices larger than 550px */ -@media (min-width: 550px) { - .container { - width: 80%; } - .column, - .columns { - margin-left: 4%; } - .column:first-child, - .columns:first-child { - margin-left: 0; } - - .one.column, - .one.columns { width: 4.66666666667%; } - .two.columns { width: 13.3333333333%; } - .three.columns { width: 22%; } - .four.columns { width: 30.6666666667%; } - .five.columns { width: 39.3333333333%; } - .six.columns { width: 48%; } - .seven.columns { width: 56.6666666667%; } - .eight.columns { width: 65.3333333333%; } - .nine.columns { width: 74.0%; } - .ten.columns { width: 82.6666666667%; } - .eleven.columns { width: 91.3333333333%; } - .twelve.columns { width: 100%; margin-left: 0; } - - .one-third.column { width: 30.6666666667%; } - .two-thirds.column { width: 65.3333333333%; } - - .one-half.column { width: 48%; } - - /* Offsets */ - .offset-by-one.column, - .offset-by-one.columns { margin-left: 8.66666666667%; } - .offset-by-two.column, - .offset-by-two.columns { margin-left: 17.3333333333%; } - .offset-by-three.column, - .offset-by-three.columns { margin-left: 26%; } - .offset-by-four.column, - .offset-by-four.columns { margin-left: 34.6666666667%; } - .offset-by-five.column, - .offset-by-five.columns { margin-left: 43.3333333333%; } - .offset-by-six.column, - .offset-by-six.columns { margin-left: 52%; } - .offset-by-seven.column, - .offset-by-seven.columns { margin-left: 60.6666666667%; } - .offset-by-eight.column, - .offset-by-eight.columns { margin-left: 69.3333333333%; } - .offset-by-nine.column, - .offset-by-nine.columns { margin-left: 78.0%; } - .offset-by-ten.column, - .offset-by-ten.columns { margin-left: 86.6666666667%; } - .offset-by-eleven.column, - .offset-by-eleven.columns { margin-left: 95.3333333333%; } - - .offset-by-one-third.column, - .offset-by-one-third.columns { margin-left: 34.6666666667%; } - .offset-by-two-thirds.column, - .offset-by-two-thirds.columns { margin-left: 69.3333333333%; } - - .offset-by-one-half.column, - .offset-by-one-half.columns { margin-left: 52%; } - -} - - -/* Base Styles -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -/* NOTE -html is set to 62.5% so that all the REM measurements throughout Skeleton -are based on 10px sizing. So basically 1.5rem = 15px :) */ -html { - font-size: 62.5%; } -body { - font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */ - line-height: 1.6; - font-weight: 400; - font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #222; } - - -/* Typography -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -h1, h2, h3, h4, h5, h6 { - margin-top: 0; - margin-bottom: 2rem; - font-weight: 300; } -h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;} -h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; } -h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; } -h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; } -h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; } -h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; } - -/* Larger than phablet */ -@media (min-width: 550px) { - h1 { font-size: 5.0rem; } - h2 { font-size: 4.2rem; } - h3 { font-size: 3.6rem; } - h4 { font-size: 3.0rem; } - h5 { font-size: 2.4rem; } - h6 { font-size: 1.5rem; } -} - -p { - margin-top: 0; } - - -/* Links -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -a { - color: #1EAEDB; } -a:hover { - color: #0FA0CE; } - - -/* Buttons -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -.button, -button, -input[type="submit"], -input[type="reset"], -input[type="button"] { - display: inline-block; - height: 38px; - padding: 0 30px; - color: #555; - text-align: center; - font-size: 11px; - font-weight: 600; - line-height: 38px; - letter-spacing: .1rem; - text-transform: uppercase; - text-decoration: none; - white-space: nowrap; - background-color: transparent; - border-radius: 4px; - border: 1px solid #bbb; - cursor: pointer; - box-sizing: border-box; } -.button:hover, -button:hover, -input[type="submit"]:hover, -input[type="reset"]:hover, -input[type="button"]:hover, -.button:focus, -button:focus, -input[type="submit"]:focus, -input[type="reset"]:focus, -input[type="button"]:focus { - color: #333; - border-color: #888; - outline: 0; } -.button.button-primary, -button.button-primary, -input[type="submit"].button-primary, -input[type="reset"].button-primary, -input[type="button"].button-primary { - color: #FFF; - background-color: #33C3F0; - border-color: #33C3F0; } -.button.button-primary:hover, -button.button-primary:hover, -input[type="submit"].button-primary:hover, -input[type="reset"].button-primary:hover, -input[type="button"].button-primary:hover, -.button.button-primary:focus, -button.button-primary:focus, -input[type="submit"].button-primary:focus, -input[type="reset"].button-primary:focus, -input[type="button"].button-primary:focus { - color: #FFF; - background-color: #1EAEDB; - border-color: #1EAEDB; } - - -/* Forms -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -input[type="email"], -input[type="search"], -input[type="text"], -input[type="tel"], -input[type="url"], -input[type="password"], -textarea, -select { - height: 38px; - padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */ - background-color: #fff; - border: 1px solid #D1D1D1; - border-radius: 4px; - box-shadow: none; - box-sizing: border-box; } -/* Removes awkard default styles on some inputs for iOS */ -input[type="email"], -input[type="search"], -input[type="text"], -input[type="tel"], -input[type="url"], -input[type="password"], -textarea { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} -textarea { - min-height: 65px; - padding-top: 6px; - padding-bottom: 6px; } -input[type="email"]:focus, -input[type="search"]:focus, -input[type="text"]:focus, -input[type="tel"]:focus, -input[type="url"]:focus, -input[type="password"]:focus, -textarea:focus, -select:focus { - border: 1px solid #33C3F0; - outline: 0; } -label, -legend { - display: block; - margin-bottom: .5rem; - font-weight: 600; } -fieldset { - padding: 0; - border-width: 0; } -input[type="checkbox"], -input[type="radio"] { - display: inline; } -label > .label-body { - display: inline-block; - margin-left: .5rem; - font-weight: normal; } - - -/* Lists -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -ul { - list-style: circle inside; } -ol { - list-style: decimal inside; } -ol, ul { - padding-left: 0; - margin-top: 0; } -ul ul, -ul ol, -ol ol, -ol ul { - margin: 1.5rem 0 1.5rem 3rem; - font-size: 90%; } -li { - margin-bottom: 1rem; } - - -/* Code -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -code { - padding: .2rem .5rem; - margin: 0 .2rem; - font-size: 90%; - white-space: nowrap; - background: #F1F1F1; - border: 1px solid #E1E1E1; - border-radius: 4px; } -pre > code { - display: block; - padding: 1rem 1.5rem; - white-space: pre; } - - -/* Tables -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -th, -td { - padding: 12px 15px; - text-align: left; - border-bottom: 1px solid #E1E1E1; } -th:first-child, -td:first-child { - padding-left: 0; } -th:last-child, -td:last-child { - padding-right: 0; } - - -/* Spacing -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -button, -.button { - margin-bottom: 1rem; } -input, -textarea, -select, -fieldset { - margin-bottom: 1.5rem; } -pre, -blockquote, -form, -dl, -figure, -table, -p, -ul, -ol, -form { - margin-bottom: 2.5rem; } -p { - margin-top: 0; } - - -/* Utilities -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -.u-full-width { - width: 100%; - box-sizing: border-box; } -.u-max-full-width { - max-width: 100%; - box-sizing: border-box; } -.u-pull-right { - float: right; } -.u-pull-left { - float: left; } - - -/* Misc -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -hr { - margin-top: 3rem; - margin-bottom: 3.5rem; - border-width: 0; - border-top: 1px solid #E1E1E1; -} - -/* Clearing -–––––––––––––––––––––––––––––––––––––––––––––––––– */ - -/* Self Clearing Goodness */ -.container:after, -.row:after, -.u-cf { - content: ""; - display: table; - clear: both; } - - -/* Media Queries -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -/* -Note: The best way to structure the use of media queries is to create the queries -near the relevant code. For example, if you wanted to change the styles for buttons -on small devices, paste the mobile query code up in the buttons section and style it -there. -*/ - - -/* Larger than mobile */ -@media (min-width: 400px) {} - -/* Larger than phablet (also point when grid becomes active) */ -@media (min-width: 550px) {} - -/* Larger than tablet */ -@media (min-width: 750px) {} - -/* Larger than desktop */ -@media (min-width: 1000px) {} - -/* Larger than Desktop HD */ -@media (min-width: 1200px) {} diff --git a/two.min.js.1 b/two.min.js.1 deleted file mode 100644 index 7d9b45b..0000000 --- a/two.min.js.1 +++ /dev/null @@ -1,139 +0,0 @@ -(function(){var d=this,q=d._,n={},k=Array.prototype,g=Object.prototype,b=k.push,c=k.slice,h=k.concat,p=g.toString,a=g.hasOwnProperty,m=k.forEach,z=k.map,t=k.reduce,v=k.reduceRight,D=k.filter,f=k.every,r=k.some,u=k.indexOf,B=k.lastIndexOf,g=Array.isArray,x=Object.keys,A=Function.prototype.bind,e=function(j){if(j instanceof e)return j;if(!(this instanceof e))return new e(j);this._wrapped=j};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=e),exports._= -e):d._=e;e.VERSION="1.5.1";var y=e.each=e.forEach=function(j,a,c){if(null!=j)if(m&&j.forEach===m)j.forEach(a,c);else if(j.length===+j.length)for(var b=0,l=j.length;bj.length)return Math.max.apply(Math,j);if(!a&&e.isEmpty(j))return-Infinity;var c={computed:-Infinity,value:-Infinity};y(j,function(j,l,e){l=a?a.call(b,j,l,e):j;l>c.computed&&(c={value:j,computed:l})});return c.value};e.min= -function(j,a,b){if(!a&&e.isArray(j)&&j[0]===+j[0]&&65535>j.length)return Math.min.apply(Math,j);if(!a&&e.isEmpty(j))return Infinity;var c={computed:Infinity,value:Infinity};y(j,function(j,l,e){l=a?a.call(b,j,l,e):j;lc||void 0===b)return 1;if(b>>1;b.call(c,j[f])c?Math.max(0,s+c):c;else return l=e.sortedIndex(a,b),a[l]===b?l:-1;if(u&&a.indexOf===u)return a.indexOf(b,c);for(;l=arguments.length&&(b=a||0,a=0);c=arguments[2]||1;for(var l=Math.max(Math.ceil((b-a)/c),0),e=0,s=Array(l);e=p?(clearTimeout(f),f=null,w=h,s=a.apply(l,e)):!f&&!1!==c.trailing&&(f=setTimeout(m,p));return s}};e.debounce=function(a,b,c){var l,e=null;return function(){var s=this,f=arguments,w=c&&!e;clearTimeout(e);e=setTimeout(function(){e=null;c||(l=a.apply(s,f))},b);w&&(l=a.apply(s,f));return l}};e.once=function(a){var b=!1,c;return function(){if(b)return c;b=!0;c=a.apply(this,arguments);a=null;return c}};e.wrap=function(a,c){return function(){var l= -[a];b.apply(l,arguments);return c.apply(this,l)}};e.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;0<=c;c--)b=[a[c].apply(this,b)];return b[0]}};e.after=function(a,b){return function(){if(1>--a)return b.apply(this,arguments)}};e.keys=x||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)e.has(a,c)&&b.push(c);return b};e.values=function(a){var b=[],c;for(c in a)e.has(a,c)&&b.push(a[c]);return b};e.pairs=function(a){var b= -[],c;for(c in a)e.has(a,c)&&b.push([c,a[c]]);return b};e.invert=function(a){var b={},c;for(c in a)e.has(a,c)&&(b[a[c]]=c);return b};e.functions=e.methods=function(a){var b=[],c;for(c in a)e.isFunction(a[c])&&b.push(c);return b.sort()};e.extend=function(a){y(c.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]});return a};e.pick=function(a){var b={},l=h.apply(k,c.call(arguments,1));y(l,function(c){c in a&&(b[c]=a[c])});return b};e.omit=function(a){var b={},l=h.apply(k,c.call(arguments,1)), -s;for(s in a)e.contains(l,s)||(b[s]=a[s]);return b};e.defaults=function(a){y(c.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])});return a};e.clone=function(a){return!e.isObject(a)?a:e.isArray(a)?a.slice():e.extend({},a)};e.tap=function(a,b){b(a);return a};var G=function(a,b,c,l){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof e&&(a=a._wrapped);b instanceof e&&(b=b._wrapped);var s=p.call(a);if(s!=p.call(b))return!1;switch(s){case "[object String]":return a== -String(b);case "[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case "[object Date]":case "[object Boolean]":return+a==+b;case "[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return l[f]==b;var f=a.constructor,w=b.constructor;if(f!==w&&(!e.isFunction(f)||!(f instanceof f&&e.isFunction(w)&&w instanceof w)))return!1;c.push(a);l.push(b);f= -0;w=!0;if("[object Array]"==s){if(f=a.length,w=f==b.length)for(;f--&&(w=G(a[f],b[f],c,l)););}else{for(var m in a)if(e.has(a,m)&&(f++,!(w=e.has(b,m)&&G(a[m],b[m],c,l))))break;if(w){for(m in b)if(e.has(b,m)&&!f--)break;w=!f}}c.pop();l.pop();return w};e.isEqual=function(a,b){return G(a,b,[],[])};e.isEmpty=function(a){if(null==a)return!0;if(e.isArray(a)||e.isString(a))return 0===a.length;for(var b in a)if(e.has(a,b))return!1;return!0};e.isElement=function(a){return!!(a&&1===a.nodeType)};e.isArray=g|| -function(a){return"[object Array]"==p.call(a)};e.isObject=function(a){return a===Object(a)};y("Arguments Function String Number Date RegExp".split(" "),function(a){e["is"+a]=function(b){return p.call(b)=="[object "+a+"]"}});e.isArguments(arguments)||(e.isArguments=function(a){return!(!a||!e.has(a,"callee"))});"function"!==typeof/./&&(e.isFunction=function(a){return"function"===typeof a});e.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))};e.isNaN=function(a){return e.isNumber(a)&&a!= -+a};e.isBoolean=function(a){return!0===a||!1===a||"[object Boolean]"==p.call(a)};e.isNull=function(a){return null===a};e.isUndefined=function(a){return void 0===a};e.has=function(b,c){return a.call(b,c)};e.noConflict=function(){d._=q;return this};e.identity=function(a){return a};e.times=function(a,b,c){for(var l=Array(Math.max(0,a)),e=0;e":">", -'"':""","'":"'","/":"/"}};F.unescape=e.invert(F.escape);var H={escape:RegExp("["+e.keys(F.escape).join("")+"]","g"),unescape:RegExp("("+e.keys(F.unescape).join("|")+")","g")};e.each(["escape","unescape"],function(a){e[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return F[a][b]})}});e.result=function(a,b){if(null!=a){var c=a[b];return e.isFunction(c)?c.call(a):c}};e.mixin=function(a){y(e.functions(a),function(c){var l=e[c]=a[c];e.prototype[c]=function(){var a=[this._wrapped]; -b.apply(a,arguments);a=l.apply(e,a);return this._chain?e(a).chain():a}})};var I=0;e.uniqueId=function(a){var b=++I+"";return a?a+b:b};e.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},M=/\\|'|\r|\n|\t|\u2028|\u2029/g;e.template=function(a,b,c){var l;c=e.defaults({},c,e.templateSettings);var s=RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate|| -J).source].join("|")+"|$","g"),f=0,w="__p+='";a.replace(s,function(b,c,l,e,s){w+=a.slice(f,s).replace(M,function(a){return"\\"+L[a]});c&&(w+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'");l&&(w+="'+\n((__t=("+l+"))==null?'':__t)+\n'");e&&(w+="';\n"+e+"\n__p+='");f=s+b.length;return b});w+="';\n";c.variable||(w="with(obj||{}){\n"+w+"}\n");w="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+w+"return __p;\n";try{l=new Function(c.variable||"obj","_",w)}catch(m){throw m.source= -w,m;}if(b)return l(b,e);b=function(a){return l.call(this,a,e)};b.source="function("+(c.variable||"obj")+"){\n"+w+"}";return b};e.chain=function(a){return e(a).chain()};e.mixin(e);y("pop push reverse shift sort splice unshift".split(" "),function(a){var b=k[a];e.prototype[a]=function(){var c=this._wrapped;b.apply(c,arguments);("shift"==a||"splice"==a)&&0===c.length&&delete c[0];return this._chain?e(c).chain():c}});y(["concat","join","slice"],function(a){var b=k[a];e.prototype[a]=function(){var a=b.apply(this._wrapped, -arguments);return this._chain?e(a).chain():a}});e.extend(e.prototype,{chain:function(){this._chain=!0;return this},value:function(){return this._wrapped}})}).call(this);var Backbone=Backbone||{}; -(function(){var d=[].slice,q=function(d,g,b){var c;d=-1;var h=g.length;switch(b.length){case 0:for(;++d=b&&(g=[]);switch(e){case "h":case "v":1=z?h=!0:(s=c.x,l=c.y,l=new f.Anchor(s,l,void 0,void 0,void 0,void 0,f.Commands.close));break;case "m":case "l":s=parseFloat(d[0]);l=parseFloat(d[1]);l=new f.Anchor(s,l,void 0,void 0,void 0,void 0,"m"===t?f.Commands.move:f.Commands.line);p&&l.addSelf(c);c=l;break;case "h":case "v":s="h"===t?"x":"y";g="x"===s?"y":"x";l=new f.Anchor(void 0,void 0,void 0,void 0,void 0,void 0,f.Commands.line);l[s]=parseFloat(d[0]);l[g]=c[g];p&&(l[s]+=c[s]);c=l;break;case "c":case "s":l=c.x;g= -c.y;e||(e=new f.Vector);"c"===t?(v=parseFloat(d[0]),s=parseFloat(d[1]),t=parseFloat(d[2]),n=parseFloat(d[3]),r=parseFloat(d[4]),D=parseFloat(d[5])):(n=C(c,e,p),v=n.x,s=n.y,t=parseFloat(d[0]),n=parseFloat(d[1]),r=parseFloat(d[2]),D=parseFloat(d[3]));p&&(v+=l,s+=g,t+=l,n+=g,r+=l,D+=g);_.isObject(c.controls)||f.Anchor.AppendCurveProperties(c);c.controls.right.set(v-c.x,s-c.y);c=l=new f.Anchor(r,D,t-r,n-D,void 0,void 0,f.Commands.curve);e=l.controls.left;break;case "t":case "q":l=c.x;g=c.y;e||(e=new f.Vector); -e.isZero()?(v=l,s=g):(v=e.x,g=e.y);"q"===t?(t=parseFloat(d[0]),n=parseFloat(d[1]),r=parseFloat(d[1]),D=parseFloat(d[2])):(n=C(c,e,p),t=n.x,n=n.y,r=parseFloat(d[0]),D=parseFloat(d[1]));p&&(v+=l,s+=g,t+=l,n+=g,r+=l,D+=g);_.isObject(c.controls)||f.Anchor.AppendCurveProperties(c);c.controls.right.set(v-c.x,s-c.y);c=l=new f.Anchor(r,D,t-r,n-D,void 0,void 0,f.Commands.curve);e=l.controls.left;break;case "a":throw new f.Utils.Error("not yet able to interpret Elliptical Arcs.");}return l}));if(!(1>=b.length))return b= -_.compact(b),b=(new f.Polygon(b,h,void 0,!0)).noStroke(),b.fill="black",f.Utils.applySvgAttributes(a,b)},circle:function(a){var b=parseFloat(a.getAttribute("cx")),c=parseFloat(a.getAttribute("cy")),e=parseFloat(a.getAttribute("r")),d=f.Resolution,m=_.map(_.range(d),function(a){var b=a/d*p;a=e*g(b);b=e*k(b);return new f.Anchor(a,b)},this),m=(new f.Polygon(m,!0,!0)).noStroke();m.translation.set(b,c);m.fill="black";return f.Utils.applySvgAttributes(a,m)},ellipse:function(a){var b=parseFloat(a.getAttribute("cx")), -c=parseFloat(a.getAttribute("cy")),e=parseFloat(a.getAttribute("rx")),d=parseFloat(a.getAttribute("ry")),m=f.Resolution,h=_.map(_.range(m),function(a){var b=a/m*p;a=e*g(b);b=d*k(b);return new f.Anchor(a,b)},this),h=(new f.Polygon(h,!0,!0)).noStroke();h.translation.set(b,c);h.fill="black";return f.Utils.applySvgAttributes(a,h)},rect:function(a){var b=parseFloat(a.getAttribute("x")),c=parseFloat(a.getAttribute("y")),e=parseFloat(a.getAttribute("width")),d=parseFloat(a.getAttribute("height")),e=e/2, -d=d/2,m=[new f.Anchor(e,d),new f.Anchor(-e,d),new f.Anchor(-e,-d),new f.Anchor(e,-d)],m=(new f.Polygon(m,!0)).noStroke();m.translation.set(b+e,c+d);m.fill="black";return f.Utils.applySvgAttributes(a,m)},line:function(a){var b=parseFloat(a.getAttribute("x1")),c=parseFloat(a.getAttribute("y1")),e=parseFloat(a.getAttribute("x2")),d=parseFloat(a.getAttribute("y2")),e=(e-b)/2,d=(d-c)/2,m=[new f.Anchor(-e,-d),new f.Anchor(e,d)],m=(new f.Polygon(m)).noFill();m.translation.set(b+e,c+d);return f.Utils.applySvgAttributes(a, -m)}},subdivide:function(a,b,c,e,d,m,h,p,g){g=g||f.Utils.Curve.RecursionLimit;var t=g+1;return a===h&&b===p?[new f.Anchor(h,p)]:_.map(_.range(0,t),function(j){var g=j/t;j=y(g,a,c,d,h);g=y(g,b,e,m,p);return new f.Anchor(j,g)})},getPointOnCubicBezier:function(a,b,c,e,d){var f=1-a;return f*f*f*b+3*f*f*a*c+3*f*a*a*e+a*a*a*d},getCurveLength:function(a,b,e,d,m,h,p,g,t){if(a===e&&b===d&&m===p&&h===g)return a=p-a,b=g-b,c(a*a+b*b);var z=9*(e-m)+3*(p-a),j=6*(a+m)-12*e,v=3*(e-a),n=9*(d-h)+3*(g-b),r=6*(b+h)-12* -d,D=3*(d-b);return E(function(a){var b=(z*a+j)*a+v;a=(n*a+r)*a+D;return c(b*b+a*a)},0,1,t||f.Utils.Curve.RecursionLimit)},integrate:function(a,b,c,e){var d=f.Utils.Curve.abscissas[e-2],m=f.Utils.Curve.weights[e-2];c=0.5*(c-b);b=c+b;var h=0,p=e+1>>1;for(e=e&1?m[h++]*a(b):0;hb||1E-4>e)return c._relative||(c.controls.left.copy(c),c.controls.right.copy(c)),c;b*=0.33;e*=0.33;p=ma;)a+=b;return a%b},Collection:function(){Array.call(this);1this.distanceTo(b)},lerp:function(b,c){return this.set((b.x-this.x)*c+this.x,(b.y-this.y)*c+this.y)},isZero:function(){return 1E-4>this.length()},toString:function(){return this.x+","+this.y},toObject:function(){return{x:this.x,y:this.y}}});var n={set:function(b, -c){this._x=b;this._y=c;return this.trigger(d.Events.change)},copy:function(b){this._x=b.x;this._y=b.y;return this.trigger(d.Events.change)},clear:function(){this._y=this._x=0;return this.trigger(d.Events.change)},clone:function(){return new q(this._x,this._y)},add:function(b,c){this._x=b.x+c.x;this._y=b.y+c.y;return this.trigger(d.Events.change)},addSelf:function(b){this._x+=b.x;this._y+=b.y;return this.trigger(d.Events.change)},sub:function(b,c){this._x=b.x-c.x;this._y=b.y-c.y;return this.trigger(d.Events.change)}, -subSelf:function(b){this._x-=b.x;this._y-=b.y;return this.trigger(d.Events.change)},multiplySelf:function(b){this._x*=b.x;this._y*=b.y;return this.trigger(d.Events.change)},multiplyScalar:function(b){this._x*=b;this._y*=b;return this.trigger(d.Events.change)},divideScalar:function(b){return b?(this._x/=b,this._y/=b,this.trigger(d.Events.change)):this.clear()},negate:function(){return this.multiplyScalar(-1)},dot:function(b){return this._x*b.x+this._y*b.y},lengthSquared:function(){return this._x*this._x+ -this._y*this._y},length:function(){return Math.sqrt(this.lengthSquared())},normalize:function(){return this.divideScalar(this.length())},distanceTo:function(b){return Math.sqrt(this.distanceToSquared(b))},distanceToSquared:function(b){var c=this._x-b.x;b=this._y-b.y;return c*c+b*b},setLength:function(b){return this.normalize().multiplyScalar(b)},equals:function(b){return 1E-4>this.distanceTo(b)},lerp:function(b,c){return this.set((b.x-this._x)*c+this._x,(b.y-this._y)*c+this._y)},isZero:function(){return 1E-4> -this.length()},toString:function(){return this._x+","+this._y},toObject:function(){return{x:this._x,y:this._y}}},k={get:function(){return this._x},set:function(b){this._x=b;this.trigger(d.Events.change,"x")}},g={get:function(){return this._y},set:function(b){this._y=b;this.trigger(d.Events.change,"y")}};d.Vector.prototype.bind=d.Vector.prototype.on=function(){this._bound||(this._x=this.x,this._y=this.y,Object.defineProperty(this,"x",k),Object.defineProperty(this,"y",g),_.extend(this,n),this._bound= -!0);Backbone.Events.bind.apply(this,arguments);return this}})(Two);(function(d){var q=d.Commands,n=d.Anchor=function(g,b,c,h,p,a,m){d.Vector.call(this,g,b);this._broadcast=_.bind(function(){this.trigger(d.Events.change)},this);this._command=m||q.move;this._relative=!0;if(!m)return this;n.AppendCurveProperties(this);_.isNumber(c)&&(this.controls.left.x=c);_.isNumber(h)&&(this.controls.left.y=h);_.isNumber(p)&&(this.controls.right.x=p);_.isNumber(a)&&(this.controls.right.y=a)};_.extend(n,{AppendCurveProperties:function(g){g.controls={left:new d.Vector(0,0),right:new d.Vector(0, -0)}}});var k={listen:function(){_.isObject(this.controls)||n.AppendCurveProperties(this);this.controls.left.bind(d.Events.change,this._broadcast);this.controls.right.bind(d.Events.change,this._broadcast);return this},ignore:function(){this.controls.left.unbind(d.Events.change,this._broadcast);this.controls.right.unbind(d.Events.change,this._broadcast);return this},clone:function(){var g=this.controls,g=new d.Anchor(this.x,this.y,g&&g.left.x,g&&g.left.y,g&&g.right.x,g&&g.right.y,this.command);g.relative= -this._relative;return g},toObject:function(){var d={x:this.x,y:this.y};this._command&&(d.command=this._command);this._relative&&(d.relative=this._relative);this.controls&&(d.controls={left:this.controls.left.toObject(),right:this.controls.right.toObject()});return d}};Object.defineProperty(n.prototype,"command",{get:function(){return this._command},set:function(g){this._command=g;this._command===q.curve&&!_.isObject(this.controls)&&n.AppendCurveProperties(this);return this.trigger(d.Events.change)}}); -Object.defineProperty(n.prototype,"relative",{get:function(){return this._relative},set:function(g){if(this._relative==g)return this;this._relative=!!g;return this.trigger(d.Events.change)}});_.extend(n.prototype,d.Vector.prototype,k);d.Anchor.prototype.bind=d.Anchor.prototype.on=function(){d.Vector.prototype.bind.apply(this,arguments);_.extend(this,k)};d.Anchor.prototype.unbind=d.Anchor.prototype.off=function(){d.Vector.prototype.unbind.apply(this,arguments);_.extend(this,k)}})(Two);(function(d){var q=Math.cos,n=Math.sin,k=Math.tan,g=d.Matrix=function(b,c,h,p,a,m){this.elements=new d.Array(9);var g=b;_.isArray(g)||(g=_.toArray(arguments));this.identity().set(g)};_.extend(g,{Identity:[1,0,0,0,1,0,0,0,1],Multiply:function(b,c,h){if(3>=c.length){h=c[0]||0;var p=c[1]||0;c=c[2]||0;return{x:b[0]*h+b[1]*p+b[2]*c,y:b[3]*h+b[4]*p+b[5]*c,z:b[6]*h+b[7]*p+b[8]*c}}var p=b[0],a=b[1],m=b[2],g=b[3],t=b[4],v=b[5],n=b[6],f=b[7];b=b[8];var r=c[0],u=c[1],k=c[2],q=c[3],A=c[4],e=c[5],y=c[6],E=c[7]; -c=c[8];h=h||new d.Array(9);h[0]=p*r+a*q+m*y;h[1]=p*u+a*A+m*E;h[2]=p*k+a*e+m*c;h[3]=g*r+t*q+v*y;h[4]=g*u+t*A+v*E;h[5]=g*k+t*e+v*c;h[6]=n*r+f*q+b*y;h[7]=n*u+f*A+b*E;h[8]=n*k+f*e+b*c;return h}});_.extend(g.prototype,Backbone.Events,{set:function(b){var c=b;_.isArray(c)||(c=_.toArray(arguments));_.extend(this.elements,c);return this.trigger(d.Events.change)},identity:function(){this.set(g.Identity);return this},multiply:function(b,c,h,p,a,m,g,t,v){var n=arguments,f=n.length;if(1>=f)return _.each(this.elements, -function(a,c){this.elements[c]=a*b},this),this.trigger(d.Events.change);if(3>=f)return b=b||0,c=c||0,h=h||0,a=this.elements,{x:a[0]*b+a[1]*c+a[2]*h,y:a[3]*b+a[4]*c+a[5]*h,z:a[6]*b+a[7]*c+a[8]*h};var r=this.elements,u=n,n=r[0],f=r[1],k=r[2],q=r[3],A=r[4],e=r[5],y=r[6],E=r[7],r=r[8],C=u[0],l=u[1],s=u[2],w=u[3],G=u[4],F=u[5],H=u[6],I=u[7],u=u[8];this.elements[0]=n*C+f*w+k*H;this.elements[1]=n*l+f*G+k*I;this.elements[2]=n*s+f*F+k*u;this.elements[3]=q*C+A*w+e*H;this.elements[4]=q*l+A*G+e*I;this.elements[5]= -q*s+A*F+e*u;this.elements[6]=y*C+E*w+r*H;this.elements[7]=y*l+E*G+r*I;this.elements[8]=y*s+E*F+r*u;return this.trigger(d.Events.change)},inverse:function(b){var c=this.elements;b=b||new d.Matrix;var h=c[0],p=c[1],a=c[2],m=c[3],g=c[4],t=c[5],v=c[6],n=c[7],c=c[8],f=c*g-t*n,r=-c*m+t*v,k=n*m-g*v,q=h*f+p*r+a*k;if(!q)return null;q=1/q;b.elements[0]=f*q;b.elements[1]=(-c*p+a*n)*q;b.elements[2]=(t*p-a*g)*q;b.elements[3]=r*q;b.elements[4]=(c*h-a*v)*q;b.elements[5]=(-t*h+a*m)*q;b.elements[6]=k*q;b.elements[7]= -(-n*h+p*v)*q;b.elements[8]=(g*h-p*m)*q;return b},scale:function(b,c){1>=arguments.length&&(c=b);return this.multiply(b,0,0,0,c,0,0,0,1)},rotate:function(b){var c=q(b);b=n(b);return this.multiply(c,-b,0,b,c,0,0,0,1)},translate:function(b,c){return this.multiply(1,0,b,0,1,c,0,0,1)},skewX:function(b){b=k(b);return this.multiply(1,b,0,0,1,0,0,0,1)},skewY:function(b){b=k(b);return this.multiply(1,0,0,b,1,0,0,0,1)},toString:function(b){var c=[];this.toArray(b,c);return c.join(" ")},toArray:function(b,c){var d= -this.elements,g=!!c,a=parseFloat(d[0].toFixed(3)),m=parseFloat(d[1].toFixed(3)),n=parseFloat(d[2].toFixed(3)),t=parseFloat(d[3].toFixed(3)),v=parseFloat(d[4].toFixed(3)),k=parseFloat(d[5].toFixed(3));if(b){var f=parseFloat(d[6].toFixed(3)),r=parseFloat(d[7].toFixed(3)),d=parseFloat(d[8].toFixed(3));if(g){c[0]=a;c[1]=t;c[2]=f;c[3]=m;c[4]=v;c[5]=r;c[6]=n;c[7]=k;c[8]=d;return}return[a,t,f,m,v,r,n,k,d]}if(g)c[0]=a,c[1]=t,c[2]=m,c[3]=v,c[4]=n,c[5]=k;else return[a,t,m,v,n,k]},clone:function(){return new d.Matrix(this.elements[0], -this.elements[1],this.elements[2],this.elements[3],this.elements[4],this.elements[5],this.elements[6],this.elements[7],this.elements[8])}})})(Two);(function(d){var q=d.Utils.mod,n=d.Utils.toFixed,k={version:1.1,ns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",createElement:function(b,c){var d=document.createElementNS(this.ns,b);"svg"===b&&(c=_.defaults(c||{},{version:this.version}));_.isObject(c)&&k.setAttributes(d,c);return d},setAttributes:function(b,c){for(var d in c)b.setAttribute(d,c[d]);return this},removeAttributes:function(b,c){for(var d in c)b.removeAttribute(d);return this},toString:function(b,c){for(var g=b.length, -p=g-1,a,m="",z=0;z=p&&c&&(t._command===d.Commands.curve&&(r=a,u=t.controls&&t.controls.right||t,k=r.controls&&r.controls.left||r,t._relative?(f=n(u.x+t.x),u=n(u.y+t.y)):(f=n(u.x),u=n(u.y)),r._relative?(B=n(k.x+r.x),x=n(k.y+r.y)):(B=n(k.x),x=n(k.y)),k=n(r.x),r=n(r.y),v+=" C "+f+" "+u+" "+B+" "+x+" "+k+" "+r),v+=" Z");m+=v+" "}return m},getClip:function(b){clip=b._renderer.clip;if(!clip){for(root=b;root.parent;)root=root.parent; -clip=b._renderer.clip=k.createElement("clipPath");root.defs.appendChild(clip)}return clip},group:{appendChild:function(b){if(b=this.domElement.querySelector("#"+b)){var c=b.nodeName;c&&(c=c.replace(/svg\:/ig,"").toLowerCase(),/clippath/.test(c)||this.elem.appendChild(b))}},removeChild:function(b){if(b=this.domElement.querySelector("#"+b)){var c=b.nodeName;c&&(c=c.replace(/svg\:/ig,"").toLowerCase(),/clippath/.test(c)||this.elem.removeChild(b))}},renderChild:function(b){k[b._renderer.type].render.call(b, -this)},render:function(b){this._update();if(0===this._opacity&&!this._flagOpacity)return this;this._renderer.elem||(this._renderer.elem=k.createElement("g",{id:this.id}),b.appendChild(this._renderer.elem));var c={domElement:b,elem:this._renderer.elem};(this._matrix.manual||this._flagMatrix)&&this._renderer.elem.setAttribute("transform","matrix("+this._matrix.toString()+")");for(var d in this.children){var g=this.children[d];k[g._renderer.type].render.call(g,b)}this._flagOpacity&&this._renderer.elem.setAttribute("opacity", -this._opacity);this._flagAdditions&&_.each(this.additions,k.group.appendChild,c);this._flagSubtractions&&_.each(this.subtractions,k.group.removeChild,c);this._flagMask&&(this._mask?this._renderer.elem.setAttribute("clip-path","url(#"+this._mask.id+")"):this._renderer.elem.removeAttribute("clip-path"));return this.flagReset()}},polygon:{render:function(b){this._update();if(0===this._opacity&&!this._flagOpacity)return this;var c={};if(this._matrix.manual||this._flagMatrix)c.transform="matrix("+this._matrix.toString()+ -")";if(this._flagVertices){var d=k.toString(this._vertices,this._closed);c.d=d}this._flagFill&&(c.fill=this._fill);this._flagStroke&&(c.stroke=this._stroke);this._flagLinewidth&&(c["stroke-width"]=this._linewidth);this._flagOpacity&&(c["stroke-opacity"]=this._opacity,c["fill-opacity"]=this._opacity);this._flagVisible&&(c.visibility=this._visible?"visible":"hidden");this._flagCap&&(c["stroke-linecap"]=this._cap);this._flagJoin&&(c["stroke-linejoin"]=this._join);this._flagMiter&&(c["stroke-miterlimit"]= -this.miter);this._renderer.elem?k.setAttributes(this._renderer.elem,c):(c.id=this.id,this._renderer.elem=k.createElement("path",c),b.appendChild(this._renderer.elem));this._flagClip&&(clip=k.getClip(this),elem=this._renderer.elem,this._clip?(elem.removeAttribute("id"),clip.setAttribute("id",this.id),clip.appendChild(elem)):(clip.removeAttribute("id"),elem.setAttribute("id",this.id),this.parent._renderer.elem.appendChild(elem)));return this.flagReset()}}},g=d[d.Types.svg]=function(b){this.domElement= -b.domElement||k.createElement("svg");this.scene=new d.Group;this.scene.parent=this;this.defs=k.createElement("defs");this.domElement.appendChild(this.defs)};_.extend(g,{Utils:k});_.extend(g.prototype,Backbone.Events,{setSize:function(b,c){this.width=b;this.height=c;k.setAttributes(this.domElement,{width:b,height:c});return this},render:function(){k.group.render.call(this.scene,this.domElement);return this}})})(Two);(function(d){var q=d.Utils.mod,n=d.Utils.toFixed,k=d.Utils.getRatio,g={group:{renderChild:function(b){g[b._renderer.type].render.call(b,this.ctx,!0,this.clip)},render:function(b){this._update();var d=this._matrix.elements,p=this.parent;this._renderer.opacity=this._opacity*(p&&p._renderer?p._renderer.opacity:1);p=this._mask;this._renderer.context||(this._renderer.context={});this._renderer.context.ctx=b;b.save();b.transform(d[0],d[3],d[1],d[4],d[2],d[5]);p&&g[p._renderer.type].render.call(p,b,!0); -_.each(this.children,g.group.renderChild,this._renderer.context);b.restore();return this.flagReset()}},polygon:{render:function(b,g,p){var a,m,z,t,v,k,f,r,u,B,x,A,e,y,E,C,l,s,w,G,F,H,I,J,L,M,j,K,N;this._update();a=this._matrix.elements;m=this._stroke;z=this._linewidth;t=this._fill;v=this._opacity*this.parent._renderer.opacity;k=this._visible;f=this._cap;r=this._join;u=this._miter;B=this._closed;x=this._vertices;A=x.length;e=A-1;N=this._clip;if(!g&&(!k||N))return this;b.save();a&&b.transform(a[0], -a[3],a[1],a[4],a[2],a[5]);t&&(b.fillStyle=t);m&&(b.strokeStyle=m);z&&(b.lineWidth=z);u&&(b.miterLimit=u);r&&(b.lineJoin=r);f&&(b.lineCap=f);_.isNumber(v)&&(b.globalAlpha=v);b.beginPath();x.forEach(function(a,m){j=n(a.x);K=n(a.y);switch(a._command){case d.Commands.close:b.closePath();break;case d.Commands.curve:E=B?q(m-1,A):Math.max(m-1,0);y=B?q(m+1,A):Math.min(m+1,e);C=x[E];l=x[y];I=C.controls&&C.controls.right||C;J=a.controls&&a.controls.left||a;C._relative?(F=I.x+n(C.x),H=I.y+n(C.y)):(F=n(I.x), -H=n(I.y));a._relative?(w=J.x+n(a.x),G=J.y+n(a.y)):(w=n(J.x),G=n(J.y));b.bezierCurveTo(F,H,w,G,j,K);m>=e&&B&&(l=s,L=a.controls&&a.controls.right||a,M=l.controls&&l.controls.left||l,a._relative?(F=L.x+n(a.x),H=L.y+n(a.y)):(F=n(L.x),H=n(L.y)),l._relative?(w=M.x+n(l.x),G=M.y+n(l.y)):(w=n(M.x),G=n(M.y)),j=n(l.x),K=n(l.y),b.bezierCurveTo(F,H,w,G,j,K));break;case d.Commands.line:b.lineTo(j,K);break;case d.Commands.move:s=a,b.moveTo(j,K)}});B&&b.closePath();!N&&!p&&(b.fill(),b.stroke());b.restore();N&&!p&& -b.clip();return this.flagReset()}}},b=d[d.Types.canvas]=function(b){this.domElement=b.domElement||document.createElement("canvas");this.ctx=this.domElement.getContext("2d");this.overdraw=b.overdraw||!1;this.scene=new d.Group;this.scene.parent=this};_.extend(b,{Utils:g});_.extend(b.prototype,Backbone.Events,{setSize:function(b,d,g){this.width=b;this.height=d;this.ratio=_.isUndefined(g)?k(this.ctx):g;this.domElement.width=b*this.ratio;this.domElement.height=d*this.ratio;_.extend(this.domElement.style, -{width:b+"px",height:d+"px"});return this},render:function(){var b=1===this.ratio;b||(this.ctx.save(),this.ctx.scale(this.ratio,this.ratio));this.overdraw||this.ctx.clearRect(0,0,this.width,this.height);g.group.render.call(this.scene,this.ctx);b||this.ctx.restore();return this}})})(Two);(function(d){var q=d.Matrix.Multiply,n=d.Utils.mod,k=[1,0,0,0,1,0,0,0,1],g=new d.Array(9),b=d.Utils.getRatio,c=d.Utils.toFixed,h={canvas:document.createElement("canvas"),uv:new d.Array([0,0,1,0,0,1,0,1,1,0,1,1]),group:{renderChild:function(a){h[a._renderer.type].render.call(a,this.gl,this.program)},render:function(a,b){this._update();var c=this.parent,p=c._matrix&&c._matrix.manual||c._flagMatrix,v=this._matrix.manual||this._flagMatrix;if(p||v)this._renderer.matrix||(this._renderer.matrix=new d.Array(9)), -this._matrix.toArray(!0,g),q(g,c._renderer.matrix,this._renderer.matrix),this._renderer.scale=this._scale*c._renderer.scale,p&&(this._flagMatrix=!0);this._mask&&(a.enable(a.STENCIL_TEST),a.stencilFunc(a.ALWAYS,1,1),a.colorMask(!1,!1,!1,!0),a.stencilOp(a.KEEP,a.KEEP,a.INCR),h[this._mask._renderer.type].render.call(this._mask,a,b,this),a.colorMask(!0,!0,!0,!0),a.stencilFunc(a.NOTEQUAL,0,1),a.stencilOp(a.KEEP,a.KEEP,a.KEEP));this._flagOpacity=c._flagOpacity||this._flagOpacity;this._renderer.opacity= -this._opacity*(c&&c._renderer?c._renderer.opacity:1);_.each(this.children,h.group.renderChild,{gl:a,program:b});this._mask&&(a.colorMask(!1,!1,!1,!1),a.stencilOp(a.KEEP,a.KEEP,a.DECR),h[this._mask._renderer.type].render.call(this._mask,a,b,this),a.colorMask(!0,!0,!0,!0),a.stencilFunc(a.NOTEQUAL,0,1),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),a.disable(a.STENCIL_TEST));return this.flagReset()}},polygon:{render:function(a,b,c){if(!this._visible||!this._opacity)return this;var p=this.parent,v=p._matrix.manual|| -p._flagMatrix,n=this._matrix.manual||this._flagMatrix,f=this._flagVertices||this._flagFill||this._flagStroke||this._flagLinewidth||this._flagOpacity||p._flagOpacity||this._flagVisible||this._flagCap||this._flagJoin||this._flagMiter||this._flagScale;this._update();if(v||n)this._renderer.matrix||(this._renderer.matrix=new d.Array(9)),this._matrix.toArray(!0,g),q(g,p._renderer.matrix,this._renderer.matrix),this._renderer.scale=this._scale*p._renderer.scale;f&&(this._renderer.rect||(this._renderer.rect= -{}),this._renderer.triangles||(this._renderer.triangles=new d.Array(12)),this._renderer.opacity=this._opacity*p._renderer.opacity,h.getBoundingClientRect(this._vertices,this._linewidth,this._renderer.rect),h.getTriangles(this._renderer.rect,this._renderer.triangles),h.updateBuffer(a,this,b),h.updateTexture(a,this));if(!this._clip||c)return a.bindBuffer(a.ARRAY_BUFFER,this._renderer.textureCoordsBuffer),a.vertexAttribPointer(b.textureCoords,2,a.FLOAT,!1,0,0),a.bindTexture(a.TEXTURE_2D,this._renderer.texture), -a.uniformMatrix3fv(b.matrix,!1,this._renderer.matrix),a.bindBuffer(a.ARRAY_BUFFER,this._renderer.buffer),a.vertexAttribPointer(b.position,2,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLES,0,6),this.flagReset()}},getBoundingClientRect:function(a,b,c){var d=Infinity,g=-Infinity,p=Infinity,f=-Infinity;a.forEach(function(a){var b=a.x,c=a.y,m=a.controls,h,e;p=Math.min(c,p);d=Math.min(b,d);g=Math.max(b,g);f=Math.max(c,f);a.controls&&(h=m.left,e=m.right,h&&e&&(m=a._relative?h.x+b:h.x,h=a._relative?h.y+c:h.y,b= -a._relative?e.x+b:e.x,a=a._relative?e.y+c:e.y,m&&(h&&b&&a)&&(p=Math.min(h,a,p),d=Math.min(m,b,d),g=Math.max(m,b,g),f=Math.max(h,a,f))))});_.isNumber(b)&&(p-=b,d-=b,g+=b,f+=b);c.top=p;c.left=d;c.right=g;c.bottom=f;c.width=g-d;c.height=f-p;c.centroid||(c.centroid={});c.centroid.x=-d;c.centroid.y=-p},getTriangles:function(a,b){var c=a.top,d=a.left,g=a.right,p=a.bottom;b[0]=d;b[1]=c;b[2]=g;b[3]=c;b[4]=d;b[5]=p;b[6]=d;b[7]=p;b[8]=g;b[9]=c;b[10]=g;b[11]=p},updateCanvas:function(a){var b=a._vertices,g=this.canvas, -p=this.ctx,h=a._renderer.scale,k=a._stroke,f=a._linewidth*h,r=a._fill,q=a._renderer.opacity||a._opacity,B=a._cap,x=a._join,A=a._miter,e=a._closed,y=b.length,E=y-1;g.width=Math.max(Math.ceil(a._renderer.rect.width*h),1);g.height=Math.max(Math.ceil(a._renderer.rect.height*h),1);a=a._renderer.rect.centroid;var C=a.x*h,l=a.y*h;p.clearRect(0,0,g.width,g.height);r&&(p.fillStyle=r);k&&(p.strokeStyle=k);f&&(p.lineWidth=f);A&&(p.miterLimit=A);x&&(p.lineJoin=x);B&&(p.lineCap=B);_.isNumber(q)&&(p.globalAlpha= -q);var s;p.beginPath();b.forEach(function(a,f){var g,k,r,z,q,u;u=c(a.x*h+C);r=c(a.y*h+l);switch(a._command){case d.Commands.close:p.closePath();break;case d.Commands.curve:g=e?n(f-1,y):Math.max(f-1,0);e?n(f+1,y):Math.min(f+1,E);k=b[g];q=k.controls&&k.controls.right||k;z=a.controls&&a.controls.left||a;k._relative?(g=c((q.x+k.x)*h+C),q=c((q.y+k.y)*h+l)):(g=c(q.x*h+C),q=c(q.y*h+l));a._relative?(k=c((z.x+a.x)*h+C),z=c((z.y+a.y)*h+l)):(k=c(z.x*h+C),z=c(z.y*h+l));p.bezierCurveTo(g,q,k,z,u,r);f>=E&&e&&(r= -s,k=a.controls&&a.controls.right||a,u=r.controls&&r.controls.left||r,a._relative?(g=c((k.x+a.x)*h+C),q=c((k.y+a.y)*h+l)):(g=c(k.x*h+C),q=c(k.y*h+l)),r._relative?(k=c((u.x+r.x)*h+C),z=c((u.y+r.y)*h+l)):(k=c(u.x*h+C),z=c(u.y*h+l)),u=c(r.x*h+C),r=c(r.y*h+l),p.bezierCurveTo(g,q,k,z,u,r));break;case d.Commands.line:p.lineTo(u,r);break;case d.Commands.move:s=a,p.moveTo(u,r)}});e&&p.closePath();p.fill();p.stroke()},updateTexture:function(a,b){this.updateCanvas(b);b._renderer.texture&&a.deleteTexture(b._renderer.texture); -a.bindBuffer(a.ARRAY_BUFFER,b._renderer.textureCoordsBuffer);b._renderer.texture=a.createTexture();a.bindTexture(a.TEXTURE_2D,b._renderer.texture);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);0>=this.canvas.width||0>=this.canvas.height||a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.canvas)},updateBuffer:function(a,b,c){_.isObject(b._renderer.buffer)&& -a.deleteBuffer(b._renderer.buffer);b._renderer.buffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b._renderer.buffer);a.enableVertexAttribArray(c.position);a.bufferData(a.ARRAY_BUFFER,b._renderer.triangles,a.STATIC_DRAW);_.isObject(b._renderer.textureCoordsBuffer)&&a.deleteBuffer(b._renderer.textureCoordsBuffer);b._renderer.textureCoordsBuffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b._renderer.textureCoordsBuffer);a.enableVertexAttribArray(c.textureCoords);a.bufferData(a.ARRAY_BUFFER,this.uv, -a.STATIC_DRAW)},program:{create:function(a,b){var c,g;c=a.createProgram();_.each(b,function(b){a.attachShader(c,b)});a.linkProgram(c);if(!a.getProgramParameter(c,a.LINK_STATUS))throw g=a.getProgramInfoLog(c),a.deleteProgram(c),new d.Utils.Error("unable to link program: "+g);return c}},shaders:{create:function(a,b,c){c=a.createShader(a[c]);a.shaderSource(c,b);a.compileShader(c);if(!a.getShaderParameter(c,a.COMPILE_STATUS))throw b=a.getShaderInfoLog(c),a.deleteShader(c),new d.Utils.Error("unable to compile shader "+ -c+": "+b);return c},types:{vertex:"VERTEX_SHADER",fragment:"FRAGMENT_SHADER"},vertex:"attribute vec2 a_position;\nattribute vec2 a_textureCoords;\n\nuniform mat3 u_matrix;\nuniform vec2 u_resolution;\n\nvarying vec2 v_textureCoords;\n\nvoid main() {\n vec2 projected = (u_matrix * vec3(a_position, 1.0)).xy;\n vec2 normal = projected / u_resolution;\n vec2 clipspace = (normal * 2.0) - 1.0;\n\n gl_Position = vec4(clipspace * vec2(1.0, -1.0), 0.0, 1.0);\n v_textureCoords = a_textureCoords;\n}", -fragment:"precision mediump float;\n\nuniform sampler2D u_image;\nvarying vec2 v_textureCoords;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_textureCoords);\n}"}};h.ctx=h.canvas.getContext("2d");var p=d[d.Types.webgl]=function(a){var b,c;this.domElement=a.domElement||document.createElement("canvas");this.scene=new d.Group;this.scene.parent=this;this._renderer={matrix:new d.Array(k),scale:1,opacity:1};this._flagMatrix=!0;a=_.defaults(a||{},{antialias:!1,alpha:!0,premultipliedAlpha:!0,stencil:!0, -preserveDrawingBuffer:!0,overdraw:!1});this.overdraw=a.overdraw;a=this.ctx=this.domElement.getContext("webgl",a)||this.domElement.getContext("experimental-webgl",a);if(!this.ctx)throw new d.Utils.Error("unable to create a webgl context. Try using another renderer.");b=h.shaders.create(a,h.shaders.vertex,h.shaders.types.vertex);c=h.shaders.create(a,h.shaders.fragment,h.shaders.types.fragment);this.program=h.program.create(a,[b,c]);a.useProgram(this.program);this.program.position=a.getAttribLocation(this.program, -"a_position");this.program.matrix=a.getUniformLocation(this.program,"u_matrix");this.program.textureCoords=a.getAttribLocation(this.program,"a_textureCoords");a.disable(a.DEPTH_TEST);a.enable(a.BLEND);a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD);a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)};_.extend(p.prototype,Backbone.Events,{setSize:function(a,c,d){this.width=a;this.height=c;this.ratio=_.isUndefined(d)?b(this.ctx):d;this.domElement.width=a*this.ratio;this.domElement.height= -c*this.ratio;_.extend(this.domElement.style,{width:a+"px",height:c+"px"});a*=this.ratio;c*=this.ratio;this._renderer.matrix[0]=this._renderer.matrix[4]=this._renderer.scale=this.ratio;this._flagMatrix=!0;this.ctx.viewport(0,0,a,c);d=this.ctx.getUniformLocation(this.program,"u_resolution");this.ctx.uniform2f(d,a,c);return this},render:function(){var a=this.ctx;this.overdraw||a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);h.group.render.call(this.scene,a,this.program);this._flagMatrix=!1;return this}})})(Two);(function(d){var q=d.Shape=function(){this._renderer={};this.id=d.Identifier+d.uniqueId();this.classList=[];this._matrix=new d.Matrix;this.translation=new d.Vector;this.translation.bind(d.Events.change,_.bind(q.FlagMatrix,this));this.rotation=0;this.scale=1};_.extend(q,Backbone.Events,{FlagMatrix:function(){this._flagMatrix=!0},MakeObservable:function(d){Object.defineProperty(d,"rotation",{get:function(){return this._rotation},set:function(d){this._rotation=d;this._flagMatrix=!0}});Object.defineProperty(d, -"scale",{get:function(){return this._scale},set:function(d){this._scale=d;this._flagScale=this._flagMatrix=!0}})}});_.extend(q.prototype,{_flagMatrix:!0,_rotation:0,_scale:1,addTo:function(d){d.add(this);return this},clone:function(){var d=new q;d.translation.copy(this.translation);d.rotation=this.rotation;d.scale=this.scale;_.each(q.Properties,function(k){d[k]=this[k]},this);return d._update()},replaceParent:function(d){var k=this.id,g;this.parent&&(delete this.parent.children[k],g=_.indexOf(parent.additions, -k),0<=g&&this.parent.additions.splice(g,1),this.parent.subtractions.push(k),this._flagSubtractions=!0);d?(d.children[k]=this,this.parent=d,d.additions.push(k),d._flagAdditions=!0):delete this.parent;return this},_update:function(d){!this._matrix.manual&&this._flagMatrix&&this._matrix.identity().translate(this.translation.x,this.translation.y).scale(this.scale).rotate(this.rotation);d&&this.parent&&this.parent._update&&this.parent._update();return this},flagReset:function(){this._flagMatrix=this._flagScale= -!1;return this}});q.MakeObservable(q.prototype)})(Two);(function(d){function q(b,a,c){var g,h,k,n,f,r,q,B,x=a.controls&&a.controls.right,A=b.controls&&b.controls.left;g=a.x;f=a.y;h=(x||a).x;r=(x||a).y;k=(A||b).x;q=(A||b).y;n=b.x;B=b.y;x&&a._relative&&(h+=a.x,r+=a.y);A&&b._relative&&(k+=b.x,q+=b.y);return d.Utils.getCurveLength(g,f,h,r,k,q,n,B,c)}function n(b,a,c){var g,h,k,n,f,r,q,B,x=a.controls&&a.controls.right,A=b.controls&&b.controls.left;g=a.x;f=a.y;h=(x||a).x;r=(x||a).y;k=(A||b).x;q=(A||b).y;n=b.x;B=b.y;x&&a._relative&&(h+=a.x,r+=a.y);A&&b._relative&& -(k+=b.x,q+=b.y);return d.Utils.subdivide(g,f,h,r,k,q,n,B,c)}var k=Math.min,g=Math.max,b=Math.round,c=d.Utils.getComputedMatrix;_.each(d.Commands,function(){});var h=d.Polygon=function(b,a,c,g){d.Shape.call(this);this._renderer.type="polygon";this._closed=!!a;this._curved=!!c;this.beginning=0;this.ending=1;this.fill="#fff";this.stroke="#000";this.opacity=this.linewidth=1;this.visible=!0;this.cap="butt";this.join="miter";this.miter=4;this._vertices=[];this.vertices=b;this.automatic=!g};_.extend(h,{Properties:"fill stroke linewidth opacity visible cap join miter closed curved automatic beginning ending".split(" "), -FlagVertices:function(){this._flagLength=this._flagVertices=!0},MakeObservable:function(b){d.Shape.MakeObservable(b);_.each(h.Properties.slice(0,8),function(a){var c="_"+a,d="_flag"+a.charAt(0).toUpperCase()+a.slice(1);Object.defineProperty(b,a,{get:function(){return this[c]},set:function(a){this[c]=a;this[d]=!0}})});Object.defineProperty(b,"length",{get:function(){this._flagLength&&this._updateLength();return this._length}});Object.defineProperty(b,"closed",{get:function(){return this._closed},set:function(a){this._closed= -!!a;this._flagVertices=!0}});Object.defineProperty(b,"curved",{get:function(){return this._curved},set:function(a){this._curved=!!a;this._flagVertices=!0}});Object.defineProperty(b,"automatic",{get:function(){return this._automatic},set:function(a){if(a!==this._automatic){var b=(this._automatic=!!a)?"ignore":"listen";_.each(this.vertices,function(a){a[b]()})}}});Object.defineProperty(b,"beginning",{get:function(){return this._beginning},set:function(a){this._beginning=k(g(a,0),this._ending);this._flagVertices= -!0}});Object.defineProperty(b,"ending",{get:function(){return this._ending},set:function(a){this._ending=k(g(a,this._beginning),1);this._flagVertices=!0}});Object.defineProperty(b,"vertices",{get:function(){return this._collection},set:function(a){var b=_.bind(h.FlagVertices,this),c=_.bind(function(a){for(var c=a.length;c--;)a[c].bind(d.Events.change,b);b()},this),g=_.bind(function(a){_.each(a,function(a){a.unbind(d.Events.change,b)},this);b()},this);this._collection&&this._collection.unbind();this._collection= -new d.Utils.Collection(a.slice(0));this._collection.bind(d.Events.insert,c);this._collection.bind(d.Events.remove,g);c(this._collection)}});Object.defineProperty(b,"clip",{get:function(){return this._clip},set:function(a){this._clip=a;this._flagClip=!0}})}});_.extend(h.prototype,d.Shape.prototype,{_flagVertices:!0,_flagLength:!0,_flagFill:!0,_flagStroke:!0,_flagLinewidth:!0,_flagOpacity:!0,_flagVisible:!0,_flagCap:!0,_flagJoin:!0,_flagMiter:!0,_flagClip:!1,_length:0,_fill:"#fff",_stroke:"#000",_linewidth:1, -_opacity:1,_visible:!0,_cap:"round",_join:"round",_miter:4,_closed:!0,_curved:!1,_automatic:!0,_beginning:0,_ending:1,_clip:!1,clone:function(b){b=b||this.parent;var a=_.map(this.vertices,function(a){return a.clone()}),c=new h(a,this.closed,this.curved,!this.automatic);_.each(d.Shape.Properties,function(a){c[a]=this[a]},this);c.translation.copy(this.translation);c.rotation=this.rotation;c.scale=this.scale;b.add(c);return c},toObject:function(){var b={vertices:_.map(this.vertices,function(a){return a.toObject()})}; -_.each(d.Shape.Properties,function(a){b[a]=this[a]},this);b.translation=this.translation.toObject;b.rotation=this.rotation;b.scale=this.scale;return b},noFill:function(){this.fill="transparent";return this},noStroke:function(){this.stroke="transparent";return this},corner:function(){var b=this.getBoundingClientRect(!0);b.centroid={x:b.left+b.width/2,y:b.top+b.height/2};_.each(this.vertices,function(a){a.addSelf(b.centroid)});return this},center:function(){var b=this.getBoundingClientRect(!0);b.centroid= -{x:b.left+b.width/2,y:b.top+b.height/2};_.each(this.vertices,function(a){a.subSelf(b.centroid)});return this},remove:function(){if(!this.parent)return this;this.parent.remove(this);return this},getBoundingClientRect:function(b){this._update(!0);var a=b?this._matrix:c(this),d=this.linewidth/2,h,n,q=Infinity,D=-Infinity,f=Infinity,r=-Infinity;_.each(this._vertices,function(b){h=b.x;n=b.y;b=a.multiply(h,n,1);f=k(b.y-d,f);q=k(b.x-d,q);D=g(b.x+d,D);r=g(b.y+d,r)});return{top:f,left:q,right:D,bottom:r,width:D- -q,height:r-f}},getPointAt:function(b,a){var c,g,h,k,n,f,q,u,B,x,A,e;q=this.length*Math.min(Math.max(b,0),1);u=this.vertices.length;B=u-1;f=c=null;x=0;g=this._lengths.length;for(h=0;xq){c=this.vertices[this.closed?d.Utils.mod(x,u):x];f=this.vertices[Math.min(Math.max(x-1,0),B)];q-=h;b=q/this._lengths[x];break}h+=this._lengths[x]}if(_.isNull(c)||_.isNull(f))return null;e=f.controls&&f.controls.right;A=c.controls&&c.controls.left;g=f.x;q=f.y;h=(e||f).x;u=(e||f).y;k=(A|| -c).x;B=(A||c).y;n=c.x;x=c.y;e&&f._relative&&(h+=f.x,u+=f.y);A&&c._relative&&(k+=c.x,B+=c.y);c=d.Utils.getPointOnCubicBezier(b,g,h,k,n);f=d.Utils.getPointOnCubicBezier(b,q,u,B,x);return _.isObject(a)?(a.x=c,a.y=f,a):new d.Vector(c,f)},plot:function(){if(this.curved)return d.Utils.getCurveFromPoints(this._vertices,this.closed),this;for(var b=0;b=q)||g)if(k.command===d.Commands.move)h.push(new d.Anchor(c.x,c.y)),0=b&&c.command===d.Commands.move?d.Commands.move:d.Commands.line});q>=a&&(this._closed&&this._automatic?(c=k,f=n(k,c,b),h=h.concat(f),_.each(f,function(a,b){a.command=0>=b&&c.command===d.Commands.move? -d.Commands.move:d.Commands.line})):g&&h.push(new d.Anchor(k.x,k.y)),h[h.length-1].command=g?d.Commands.close:d.Commands.line)}c=k},this);this._curved=this._automatic=!1;this.vertices=h;return this},_updateLength:function(b){this._update();var a=this.vertices.length-1,c=this.vertices[a],g=this._closed||this.vertices[a]._command===d.Commands.close,h=0;_.isUndefined(this._lengths)&&(this._lengths=[]);_.each(this.vertices,function(k,n){0>=n&&!g||k.command===d.Commands.move?(c=k,this._lengths[n]=0):(this._lengths[n]= -q(k,c,b),h+=this._lengths[n],n>=a&&g&&(c=k,this._lengths[n+1]=q(k,c,b),h+=this._lengths[n+1]),c=k)},this);this._length=h;return this},_update:function(){if(this._flagVertices){var c=this.vertices.length-1,a;a=b(this._beginning*c);c=b(this._ending*c);this._vertices.length=0;for(var g=a;g=arguments.length&&c)return c.remove(this),this;_.isArray(d)||(d=_.toArray(arguments));_.each(d,function(c){k=c.id;a=c.parent;k in b&&(delete b[k],delete c.parent,m=_.indexOf(a.additions,k),0<=m&&a.additions.splice(m,1),h.push(k),this._flagSubtractions=!0)},this);return this},getBoundingClientRect:function(){var d; -this._update(!0);var b=Infinity,c=-Infinity,h=Infinity,k=-Infinity;_.each(this.children,function(a){d=a.getBoundingClientRect();_.isNumber(d.top)&&(_.isNumber(d.left)&&_.isNumber(d.right)&&_.isNumber(d.bottom))&&(h=q(d.top,h),b=q(d.left,b),c=n(d.right,c),k=n(d.bottom,k))},this);return{top:h,left:b,right:c,bottom:k,width:c-b,height:k-h}},noFill:function(){_.each(this.children,function(d){d.noFill()});return this},noStroke:function(){_.each(this.children,function(d){d.noStroke()});return this},subdivide:function(){var d= -arguments;_.each(this.children,function(b){b.subdivide.apply(b,d)});return this},flagReset:function(){this._flagAdditions&&(this.additions.length=0,this._flagAdditions=!1);this._flagSubtractions&&(this.subtractions.length=0,this._flagSubtractions=!1);this._flagMask=this._flagOpacity=!1;d.Shape.prototype.flagReset.call(this);return this}});k.MakeObservable(k.prototype)})(Two);