var bifs="vendors = moz webkit o ms official\n\n// stringify the given arg\n\n-string(arg)\n type(arg) + ' ' + arg\n\n// require a color\n\nrequire-color(color)\n unless color is a 'color' \n error('RGB or HSL value expected, got a ' + -string(color))\n\n// require a unit\n\nrequire-unit(n)\n unless n is a 'unit'\n error('unit expected, got a ' + -string(n))\n\n// require a string\n\nrequire-string(str)\n unless str is a 'string' or str is a 'ident'\n error('string expected, got a ' + -string(str))\n\n// apply js Math function\n\nmath(n, fn) \n require-unit(n)\n require-string(fn)\n -math(n, fn)\n\n// adjust the given color's property by amount\n\nadjust(color, prop, amount)\n require-color(color)\n require-string(prop)\n require-unit(amount)\n -adjust(color, prop, amount)\n\n// Math functions\n\nabs(n) { math(n, 'abs') }\nceil(n) { math(n, 'ceil') }\nfloor(n) { math(n, 'floor') }\nround(n) { math(n, 'round') }\nsin(n) { math(n, 'sin') }\ncos(n) { math(n, 'cos') }\nmin(a, b) { a < b ? a : b }\nmax(a, b) { a > b ? a : b }\nPI = -math-prop('PI')\n\n// return the sum of the given numbers\n\nsum(nums)\n sum = 0\n sum += n for n in nums\n\n// return the average of the given numbers\n\navg(nums)\n sum(nums) / length(nums)\n\n// color components\n\nalpha(color) { component(hsl(color), 'alpha') }\nhue(color) { component(hsl(color), 'hue') }\nsaturation(color) { component(hsl(color), 'saturation') }\nlightness(color) { component(hsl(color), 'lightness') }\n\n// check if n is an odd number\n\nodd(n)\n 1 == n % 2\n\n// check if n is an even number\n\neven(n)\n 0 == n % 2\n\n// check if color is light\n\nlight(color)\n lightness(color) >= 50%\n\n// check if color is dark\n\ndark(color)\n lightness(color) < 50%\n\n// desaturate color by amount\n\ndesaturate(color, amount)\n adjust(color, 'saturation', - amount)\n\n// saturate color by amount\n\nsaturate(color, amount)\n adjust(color, 'saturation', amount)\n\n// darken by the given amount\n\ndarken(color, amount)\n adjust(color, 'lightness', - amount)\n\n// lighten by the given amount\n\nlighten(color, amount)\n adjust(color, 'lightness', amount)\n\n// decerase opacity by amount\n\nfade-out(color, amount)\n color - rgba(black, amount)\n\n// increase opacity by amount\n\nfade-in(color, amount)\n color + rgba(black, amount)\n\n// return the last value in the given expr\n\nlast(expr)\n expr[length(expr) - 1]\n\n// join values with the given delimiter\n\njoin(delim, vals...)\n buf = ''\n vals = vals[0] if length(vals) == 1\n for val, i in vals\n buf += i ? delim + val : val\n",stylus=function(){function a(b){var c=a.resolve(b),d=a.modules[c];if(!d)throw new Error('failed to require "'+b+'"');return d.exports||(d.exports={},d.call(d.exports,d,d.exports,a.relative(c))),d.exports}return a.modules={},a.resolve=function(b){var c=b,d=b+".js",e=b+"/index.js";return a.modules[d]&&d||a.modules[e]&&e||c},a.register=function(b,c){a.modules[b]=c},a.relative=function(b){return function(c){if("."!=c[0])return a(c);var d=b.split("/"),e=c.split("/");d.pop();for(var f=0;f=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var d=!1,f=/^([\s\S]+\/(?!$)|\/)?((?:[\s\S]+?)?(\.[^.]*)?)$/;b.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=e(a.split("/").filter(function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},b.join=function(){var a=Array.prototype.slice.call(arguments,0);return b.normalize(a.filter(function(a,b){return a&&typeof a=="string"}).join("/"))},b.relative=function(a,c){function d(a){var b=0;for(;b=0;c--)if(a[c]!=="")break;return b>c?[]:a.slice(b,c-b+1)}a=b.resolve(a).substr(1),c=b.resolve(c).substr(1);var e=d(a.split("/")),f=d(c.split("/")),g=Math.min(e.length,f.length),h=g;for(var i=0;i0?(100-e[c])*f/100:e[c]*(f/100)),e[c]+=f,e.rgba},(b.clone=function(b){return f.assertPresent(b,"expr"),b.clone()}).raw=!0,(b["add-property"]=function(b,c){f.assertType(b,"expression","name"),b=f.unwrap(b).first,f.assertString(b,"name"),f.assertType(c,"expression","expr");var d=new e.Property([b],c),g=this.closestBlock,h=g.nodes.length,i=g.nodes.slice(0,g.index),j=g.nodes.slice(g.index++,h);return i.push(d),g.nodes=i.concat(j),d}).raw=!0}),a.register("functions/image.js",function(a,b,c){var d=c("../utils"),e=c("../nodes"),f=a.exports=function(b,c){this.ctx=b,this.path=d.lookup(c,b.paths);if(!this.path)throw new Error("failed to locate file "+c)};f.prototype.open=function(){this.fd=fs.openSync(this.path,"r")},f.prototype.close=function(){this.fd&&fs.closeSync(this.fd)},f.prototype.type=function(){var a,b=new Buffer(4);return fs.readSync(this.fd,b,0,4,0),71==b[0]&&73==b[1]&&70==b[2]?a="gif":80==b[1]&&78==b[2]&&71==b[3]?a="png":255==b[0]&&216==b[1]&&(a="jpeg"),a},f.prototype.size=function(){function d(a){return a[1]<<8|a[0]}function e(a){return a[0]<<24|a[1]<<16|a[2]<<8|a[3]}var a,b,c=this.type();switch(c){case"jpeg":throw new Error("image-size() jpeg support not yet implemented");case"png":var f=new Buffer(8);fs.readSync(this.fd,f,0,8,16),a=e(f),b=e(f.slice(4,8));break;case"gif":var f=new Buffer(4);fs.readSync(this.fd,f,0,4,6),a=d(f),b=d(f.slice(2,4))}if("number"!=typeof a)throw new Error('failed to find width of "'+this.path+'"');if("number"!=typeof b)throw new Error('failed to find height of "'+this.path+'"');return[a,b]}}),a.register("functions/url.js",function(a,b,c){var d=c("../visitor/compiler"),e=c("../nodes"),f=c("../path").extname,g=c("../utils"),h={".gif":"image/gif",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".svg":"image/svg+xml"};a.exports=function(a){function i(a){var i=new d(a);i.isURL=!0;var a=a.nodes.map(function(a){return i.visit(a)}).join(""),a=parse(a),j=f(a.pathname),k=h[j],l=new e.Literal('url("'+a.href+'")'),m=c.concat(this.paths),n,o;return k?a.protocol?l:(found=g.lookup(a.pathname,m),found?(o=fs.readFileSync(found),o.length>b?l:new e.Literal('url("data:'+k+";base64,"+o.toString("base64")+'")')):l):l}a=a||{};var b=a.limit||3e4,c=a.paths||[];return i.raw=!0,i}}),a.register("lexer.js",function(a,b,c){var d=c("./token"),e=c("./nodes"),f=c("./errors"),g={and:"&&",or:"||",is:"==",isnt:"!=","is not":"!=",":=":"?="},h=["em","ex","px","mm","cm","in","pt","pc","deg","rad","grad","ms","s","Hz","kHz","rem","%"].join("|"),i=new RegExp("^(-)?(\\d+\\.\\d+|\\d+|\\.\\d+)("+h+")? *"),j=a.exports=function(b,c){c=c||{},this.str=b.replace(/\r\n?/g,"\n"),this.stash=[],this.indentStack=[],this.indentRe=null,this.lineno=1};j.prototype={inspect:function(){var a,b=this.str,c=[];while("eos"!=(a=this.next()).type)c.push(a.inspect());return this.str=b,this.prevIndents=0,c.concat(a.inspect()).join("\n")},lookahead:function(a){var b=a-this.stash.length;while(b-->0)this.stash.push(this.advance());return this.stash[--a]},skip:function(a){this.str=this.str.substr(Array.isArray(a)?a[0].length:a)},next:function(){var a=this.stashed()||this.advance();switch(a.type){case"newline":case"indent":++this.lineno;break;case"outdent":"outdent"!=this.prev.type&&++this.lineno}return this.prev=a,a.lineno=this.lineno,a},advance:function(){return this.eos()||this.nil()||this.sep()||this.keyword()||this.urlchars()||this.atrule()||this.scope()||this.media()||this.comment()||this.newline()||this.escaped()||this.important()||this.literal()||this.fun()||this.brace()||this.paren()||this.color()||this.string()||this.unit()||this.namedop()||this.boolean()||this.ident()||this.op()||this.space()||this.selector()},peek:function(){return this.lookahead(1)},stashed:function(){return this.stash.shift()},eos:function(){if(this.str.length)return;return this.indentStack.length?(this.indentStack.shift(),new d("outdent")):new d("eos")},urlchars:function(){var a;if(!this.isURL)return;if(a=/^[\/:@.;?&=*!,<>#%0-9]+/.exec(this.str))return this.skip(a),new d("literal",new e.Literal(a[0]))},sep:function(){var a;if(a=/^; */.exec(this.str))return this.skip(a),new d(";")},space:function(){var a;if(a=/^( +)/.exec(this.str))return this.skip(a),new d("space")},escaped:function(){var a;if(a=/^\\(.) */.exec(this.str)){var b=a[1];return this.skip(a),new d("ident",new e.Literal(b))}},literal:function(){var a;if(a=/^@css *\{/.exec(this.str)){this.skip(a);var b,c=1,f="";while(b=this.str[0]){this.str=this.str.substr(1);switch(b){case"{":++c;break;case"}":--c}f+=b;if(!c)break}return f=f.replace(/\s*}$/,""),new d("literal",new e.Literal(f))}},important:function(){var a;if(a=/^!important */.exec(this.str))return this.skip(a),new d("ident",new e.Literal("!important"))},brace:function(){var a;if(a=/^([{}])/.exec(this.str)){this.skip(1);var b=a[1];return new d(b,b)}},paren:function(){var a;if(a=/^([()]) */.exec(this.str)){var b=a[1];return this.skip(a),")"==b&&(this.isURL=!1),new d(b,b)}},nil:function(){var a;if(a=/^(null)\b */.exec(this.str))return this.skip(a),new d("null",e.nil)},keyword:function(){var a;if(a=/^(return|if|else|unless|for|in)\b */.exec(this.str)){var b=a[1];return this.skip(a),new d(b,b)}},namedop:function(){var a;if(a=/^(not|and|or|is a|is defined|isnt|is not|is)\b( *)/.exec(this.str)){var b=a[1];this.skip(a),b=g[b]||b;var c=new d(b,b);return c.space=a[2],c}},op:function(){var a;if(a=/^([.]{2,3}|&&|\|\||[!<>=?:]=|\*\*|[-+*\/%]=?|[,=?:!~<>&\[\]])( *)/.exec(this.str)){var b=a[1];this.skip(a),b=g[b]||b;var c=new d(b,b);return c.space=a[2],c}},media:function(){var a;if(a=/^@media *([^\/{\n]+)/.exec(this.str))return this.skip(a),new d("media",a[1].trim())},scope:function(){var a;if(a=/^@scope *([^\/{\n]+)/.exec(this.str))return this.skip(a),new d("scope",a[1].trim())},atrule:function(){var a;if(a=/^@(import|(?:-(\w+)-)?keyframes|charset|font-face|page) */.exec(this.str)){this.skip(a);var b=a[2],c=a[1];return b&&(c="keyframes"),new d(c,b)}},comment:function(){if("/"==this.str[0]&&"/"==this.str[1]){var a=this.str.indexOf("\n");return-1==a&&(a=this.str.length),this.skip(a),this.advance()}if("/"==this.str[0]&&"*"==this.str[1]){var a=this.str.indexOf("*/");-1==a&&(a=this.str.length);var b=this.str.substr(0,a+2),c=b.split("\n").length-1,f=!0;return this.lineno+=c,this.skip(a+2),"!"==b[2]&&(b=b.replace("*!","*"),f=!1),new d("comment",new e.Comment(b,f))}},"boolean":function(){var a;if(a=/^(true|false)\b( *)/.exec(this.str)){var b=e.Boolean("true"==a[1]);this.skip(a);var c=new d("boolean",b);return c.space=a[2],c}},fun:function(){var a;if(a=/^(-?[a-zA-Z$][-\w\d$]*)\(( *)/.exec(this.str)){var b=a[1];this.skip(a),this.isURL="url"==b;var c=new d("function",new e.Ident(b));return c.space=a[2],c}},ident:function(){var a;if(a=/^(@)?(-?[_a-zA-Z$][-\w\d$]*)/.exec(this.str)){var b=a[1],c=a[2],f=new e.Ident(c);return this.skip(a),f.property=!!b,new d("ident",f)}},newline:function(){var a,b;this.indentRe?a=this.indentRe.exec(this.str):(b=/^\n([\t]*) */,a=b.exec(this.str),a&&!a[1].length&&(b=/^\n( *)/,a=b.exec(this.str)),a&&a[1].length&&(this.indentRe=b));if(a){var c,e=a[1].length;this.skip(a);if(this.str[0]===" "||this.str[0]==="\t")throw new f.SyntaxError("Invalid indentation. You can use tabs or spaces to indent, but not both.");this.isVariable=!1;if("\n"==this.str[0])return++this.lineno,this.advance();if(this.indentStack.length&&ee)this.stash.push(new d("outdent")),this.indentStack.shift();c=this.stash.pop()}else e&&e!=this.indentStack[0]?(this.indentStack.unshift(e),c=new d("indent")):c=new d("newline");return c}},unit:function(){var a;if(a=i.exec(this.str)){this.skip(a);var b=parseFloat(a[2]);"-"==a[1]&&(b=-b);var c=new e.Unit(b,a[3]);return new d("unit",c)}},string:function(){var a;if(a=/^("[^"]*"|'[^']*') */.exec(this.str)){var b=a[1];return this.skip(a),b=b.slice(1,-1).replace(/\\n/g,"\n"),new d("string",new e.String(b))}},color:function(){return this.rrggbbaa()||this.rrggbb()||this.rgba()||this.rgb()},rgb:function(){var a;if(a=/^#([a-fA-F0-9]{3}) */.exec(this.str)){this.skip(a);var b=a[1],c=parseInt(b[0]+b[0],16),f=parseInt(b[1]+b[1],16),g=parseInt(b[2]+b[2],16),h=new e.RGBA(c,f,g,1);return h.raw=a[0],new d("color",h)}},rgba:function(){var a;if(a=/^#([a-fA-F0-9]{4}) */.exec(this.str)){this.skip(a);var b=a[1],c=parseInt(b[0]+b[0],16),f=parseInt(b[1]+b[1],16),g=parseInt(b[2]+b[2],16),h=parseInt(b[3]+b[3],16),i=new e.RGBA(c,f,g,h/255);return i.raw=a[0],new d("color",i)}},rrggbb:function(){var a;if(a=/^#([a-fA-F0-9]{6}) */.exec(this.str)){this.skip(a);var b=a[1],c=parseInt(b.substr(0,2),16),f=parseInt(b.substr(2,2),16),g=parseInt(b.substr(4,2),16),h=new e.RGBA(c,f,g,1);return h.raw=a[0],new d("color",h)}},rrggbbaa:function(){var a;if(a=/^#([a-fA-F0-9]{8}) */.exec(this.str)){this.skip(a);var b=a[1],c=parseInt(b.substr(0,2),16),f=parseInt(b.substr(2,2),16),g=parseInt(b.substr(4,2),16),h=parseInt(b.substr(6,2),16),i=new e.RGBA(c,f,g,h/255);return i.raw=a[0],new d("color",i)}},selector:function(){var a;if(a=/^[^{\n,]+/.exec(this.str)){var b=a[0];return this.skip(a),new d("selector",b)}}}}),a.register("nodes/arguments.js",function(a,b,c){var d=c("./node"),e=c("../nodes"),f=c("../utils"),g=a.exports=function(){e.Expression.call(this),this.map={}};g.prototype.__proto__=e.Expression.prototype,g.fromExpression=function(a){var b=new g,c=a.nodes.length;b.lineno=a.lineno,b.isList=a.isList;for(var d=0;di)g.nodes[b]=e.nil;g.nodes[a.val]=c}}),c;case"[]":var j=new e.Expression,k=f.unwrap(this).nodes,h=f.unwrap(b).nodes;return h.forEach(function(a){if("unit"==a.nodeName){var b=k[a.val];b&&j.push(b)}}),j.isEmpty?e.nil:f.unwrap(j);case"||":if(this.nodes.length>1)return this;var l=this.first.operate(a,b,c);return l==this.nodes[0]?this:b;case"in":return d.prototype.operate.call(this,a,b);case"!=":return this.operate("==",b,c).negate();case"==":var i=this.nodes.length,b=b.toExpression(),m,n;if(i!=b.nodes.length)return e.no;for(var o=0;o=0?a:360+a}function h(a){return Math.max(0,Math.min(a,100))}function i(a){return Math.max(0,Math.min(a,1))}var d=c("./node"),e=c("./index"),f=b=a.exports=function(b,c,e,f){d.call(this),this.h=g(b),this.s=h(c),this.l=h(e),this.a=i(f),this.hsla=this};f.prototype.__proto__=d.prototype,f.prototype.toString=function(){return"hsla("+this.h+","+this.s.toFixed(0)+","+this.l.toFixed(0)+","+this.a+")"},f.prototype.clone=function(){var a=new f(this.h,this.s,this.l,this.a);return a.lineno=this.lineno,a.filename=this.filename,a},f.prototype.__defineGetter__("rgba",function(){return e.RGBA.fromHSLA(this)}),f.prototype.__defineGetter__("hash",function(){return this.rgba.toString()}),f.prototype.add=function(a,b,c){return new f(this.h+a,this.s+b,this.l+c,this.a)},f.prototype.sub=function(a,b,c){return this.add(-a,-b,-c)},f.prototype.operate=function(a,b){switch(a){case"==":case"!=":case"<=":case">=":case"<":case">":case"is a":case"||":case"&&":return this.rgba.operate(a,b);default:return this.rgba.operate(a,b).hsla}},b.fromRGBA=function(a){var b=a.r/255,c=a.g/255,d=a.b/255,e=a.a,g=Math.min(b,c,d),h=Math.max(b,c,d),i=(h+g)/2,j=h-g,k,l;switch(h){case g:k=0;break;case b:k=60*(c-d)/j;break;case c:k=60*(d-b)/j+120;break;case d:k=60*(b-c)/j+240}return h==g?l=0:i<.5?l=j/(2*i):l=j/(2-2*i),k%=360,l*=100,i*=100,new f(k,l,i,e)},f.prototype.adjustLightness=function(a){return this.l=h(this.l+this.l*(a/100)),this},f.prototype.adjustHue=function(a){return this.h=g(this.h+a),this}}),a.register("nodes/ident.js",function(a,b,c){var d=c("./node"),e=c("./index"),f=a.exports=function(b,c){d.call(this),this.name=b,this.string=b,this.val=c||e.nil};f.prototype.__defineGetter__("isEmpty",function(){return undefined==this.val}),f.prototype.__defineGetter__("hash",function(){return this.name}),f.prototype.__proto__=d.prototype,f.prototype.clone=function(){var a=new f(this.name,this.val.clone());return a.lineno=this.lineno,a.filename=this.filename,a.property=this.property,a},f.prototype.toString=function(){return this.name},f.prototype.coerce=function(a){switch(a.nodeName){case"ident":case"string":case"literal":return new f(a.string);default:return d.prototype.coerce.call(this,a)}},f.prototype.operate=function(a,b){var c=b.first;switch(a){case"-":if("unit"==c.nodeName){var f=new e.Expression;return c.val=-c.val,f.push(this),f.push(c),f};case"+":return new e.Ident(this.string+this.coerce(c).string)}return d.prototype.operate.call(this,a,b)}}),a.register("nodes/if.js",function(a,b,c){var d=c("./node"),e=a.exports=function(b,c){d.call(this),this.cond=b,this.elses=[],c&&c.nodeName?this.block=c:this.negate=c};e.prototype.__proto__=d.prototype,e.prototype.clone=function(){var a=this.cond.clone(),b=this.block.clone(),c=new e(a,b);return c.elses=this.elses.map(function(a){return a.clone()}),c.negate=this.negate,c.lineno=this.lineno,c.filename=this.filename,c}}),a.register("nodes/import.js",function(a,b,c){var d=c("./node"),e=a.exports=function(b){d.call(this),this.path=b};e.prototype.__proto__=d.prototype}),a.register("nodes/index.js",function(a,b,c){b.Node=c("./node"),b.Root=c("./root"),b.Null=c("./null"),b.Each=c("./each"),b.If=c("./if"),b.Call=c("./call"),b.Page=c("./page"),b.FontFace=c("./fontface"),b.UnaryOp=c("./unaryop"),b.BinOp=c("./binop"),b.Ternary=c("./ternary"),b.Block=c("./block"),b.Unit=c("./unit"),b.String=c("./string"),b.HSLA=c("./hsla"),b.RGBA=c("./rgba"),b.Ident=c("./ident"),b.Group=c("./group"),b.Literal=c("./literal"),b.JSLiteral=c("./jsliteral"),b.Boolean=c("./boolean"),b.Return=c("./return"),b.Media=c("./media"),b.Params=c("./params"),b.Comment=c("./comment"),b.Keyframes=c("./keyframes"),b.Charset=c("./charset"),b.Import=c("./import"),b.Function=c("./function"),b.Property=c("./property"),b.Selector=c("./selector"),b.Expression=c("./expression"),b.Arguments=c("./arguments"),b.yes=new b.Boolean(!0),b.no=new b.Boolean(!1),b.nil=new b.Null}),a.register("nodes/jsliteral.js",function(a,b,c){var d=c("./node"),e=c("./index"),f=a.exports=function(b){d.call(this),this.val=b,this.string=b};f.prototype .__proto__=d.prototype}),a.register("nodes/keyframes.js",function(a,b,c){var d=c("./node"),e=a.exports=function(b,c){d.call(this),this.name=b,this.frames=[],this.prefix=c||"official"};e.prototype.__proto__=d.prototype,e.prototype.push=function(a,b){this.frames.push({pos:a,block:b})},e.prototype.clone=function(){var a=new e(this.name);return a.lineno=this.lineno,a.prefix=this.prefix,a.frames=this.frames.map(function(a){return a.block=a.block.clone(),a}),a},e.prototype.toString=function(){return"@keyframes "+this.name}}),a.register("nodes/literal.js",function(a,b,c){var d=c("./node"),e=c("./index"),f=a.exports=function(b){d.call(this),this.val=b,this.string=b};f.prototype.__proto__=d.prototype,f.prototype.__defineGetter__("hash",function(){return this.val}),f.prototype.toString=function(){return this.val},f.prototype.coerce=function(a){switch(a.nodeName){case"ident":case"string":case"literal":return new f(a.string);default:return d.prototype.coerce.call(this,a)}},f.prototype.operate=function(a,b){var c=b.first;switch(a){case"+":return new e.Literal(this.string+this.coerce(c).string);default:return d.prototype.operate.call(this,a,b)}}}),a.register("nodes/media.js",function(a,b,c){var d=c("./node"),e=c("./index"),f=a.exports=function(b){d.call(this),this.val=b};f.prototype.__proto__=d.prototype,f.prototype.toString=function(){return"@media "+this.val}}),a.register("nodes/node.js",function(a,b,c){function h(a){this.name="CoercionError",this.message=a,Error.captureStackTrace(this,h)}var d=c("../visitor/evaluator"),e=c("../utils"),f=c("./index"),g=a.exports=function(){this.lineno=f.lineno,Object.defineProperty(this,"filename",{writable:!0,value:f.filename})};g.prototype.__defineGetter__("first",function(){return this}),g.prototype.__defineGetter__("hash",function(){return this.val}),g.prototype.__defineGetter__("nodeName",function(){return this.constructor.name.toLowerCase()}),g.prototype.clone=function(){return this},g.prototype.eval=function(){return(new d(this)).evaluate()},g.prototype.toBoolean=function(){return f.yes},g.prototype.toExpression=function(){if("expression"==this.nodeName)return this;var a=new f.Expression;return a.push(this),a},g.prototype.shouldCoerce=function(a){switch(a){case"is a":case"in":case"||":case"&&":return!1;default:return!0}},g.prototype.operate=function(a,b){switch(a){case"is a":if("string"==b.nodeName)return f.Boolean(this.nodeName==b.val);throw new Error('"is a" expects a string, got '+b.toString());case"==":return f.Boolean(this.hash==b.hash);case"!=":return f.Boolean(this.hash!=b.hash);case">=":return f.Boolean(this.hash>=b.hash);case"<=":return f.Boolean(this.hash<=b.hash);case">":return f.Boolean(this.hash>b.hash);case"<":return f.Boolean(this.hash1&&--a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}var b=a.h/360,c=a.s/100,d=a.l/100,e=a.a,f=d<=.5?d*(c+1):d+c-d*c,g=d*2-f,h=l(b+1/3)*255,j=l(b)*255,k=l(b-1/3)*255;return new i(h,j,k,e)}}),a.register("nodes/root.js",function(a,b,c){var d=c("./node"),e=a.exports=function(){this.nodes=[]};e.prototype.__proto__=d.prototype,e.prototype.push=function(a){this.nodes.push(a)},e.prototype.toString=function(){return"[Root]"}}),a.register("nodes/selector.js",function(a,b,c){var d=c("./block"),e=c("./node"),f=a.exports=function(b){e.call(this),this.segments=b};f.prototype.__proto__=e.prototype,f.prototype.toString=function(){return this.segments.join("")},f.prototype.clone=function(){var a=new f;return a.lineno=this.lineno,a.filename=this.filename,a.segments=this.segments.map(function(a){return a.clone()}),a}}),a.register("nodes/string.js",function(a,b,c){var d=c("./node"),e=c("../functions").s,f=c("../utils"),g=c("./index"),h=a.exports=function(b){d.call(this),this.val=b,this.string=b};h.prototype.__proto__=d.prototype,h.prototype.toString=function(){return'"'+this.val+'"'},h.prototype.clone=function(){var a=new h(this.val);return a.lineno=this.lineno,a.filename=this.filename,a},h.prototype.toBoolean=function(){return g.Boolean(this.val.length)},h.prototype.coerce=function(a){switch(a.nodeName){case"string":return a;case"expression":return new h(a.nodes.map(function(a){return this.coerce(a).val},this).join(" "));default:return new h(a.toString())}},h.prototype.operate=function(a,b){switch(a){case"%":var c=new g.Expression;c.push(this);var i="expression"==b.nodeName?f.unwrap(b).nodes:[b];return e.apply(null,[c].concat(i));case"+":return new h(this.val+this.coerce(b).val);default:return d.prototype.operate.call(this,a,b)}}}),a.register("nodes/ternary.js",function(a,b,c){var d=c("./node"),e=a.exports=function(b,c,e){d.call(this),this.cond=b,this.trueExpr=c,this.falseExpr=e};e.prototype.__proto__=d.prototype,e.prototype.clone=function(){var a=new e(this.cond.clone(),this.trueExpr.clone(),this.falseExpr.clone());return a.lineno=this.lineno,a.filename=this.filename,a}}),a.register("nodes/unaryop.js",function(a,b,c){var d=c("./node"),e=a.exports=function(b,c){d.call(this),this.op=b,this.expr=c};e.prototype.__proto__=d.prototype,e.prototype.clone=function(){var a=new e(this.op,this.expr.clone());return a.lineno=this.lineno,a.filename=this.filename,a}}),a.register("nodes/unit.js",function(a,b,c){var d=c("./node"),e=c("./index"),f=a.exports=function(b,c){d.call(this),this.val=b,this.type=c};f.prototype.__proto__=d.prototype,f.prototype.toBoolean=function(){return e.Boolean(this.type?!0:this.val)},f.prototype.toString=function(){var a=this.val;return"px"==this.type&&(a=a.toFixed(0)),a+(this.type||"")},f.prototype.clone=function(){var a=new f(this.val,this.type);return a.lineno=this.lineno,a.filename=this.filename,a},f.prototype.operate=function(a,b){var c=this.type||b.type;if("rgba"==b.nodeName||"hsla"==b.nodeName)return b.operate(a,this);if(this.shouldCoerce(a)){"-"!=a&&"+"!=a||"%"!=b.type?b=this.coerce(b.first):b.val=this.val*(b.val/100);switch(a){case"-":return new f(this.val-b.val,c);case"+":return new f(this.val+b.val,c);case"/":return new f(this.val/b.val,c);case"*":return new f(this.val*b.val,c);case"%":return new f(this.val%b.val,c);case"**":return new f(Math.pow(this.val,b.val),c);case"..":case"...":var g=this.val,h=b.val,i=new e.Expression,j=".."==a;do i.push(new e.Unit(g));while(j?++g<=h:++g","=",":","&","~","{","}"],i=["root","nth-child","nth-last-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","link","visited","active","hover","focus","target","lang","enabled","disabled","checked","not"],j=a.exports=function(b,c){var f=this;c=c||{},this.lexer=new d(b,c),this.root=c.root||new e.Root,this.state=["root"],this.stash=[],this.parens=0,this.state.pop=function(){f.prevState=[].pop.call(this)}};j.prototype={constructor:j,currentState:function(){return this.state[this.state.length-1]},parse:function(){var a=this.parent=this.root;while("eos"!=this.peek().type){if(this.accept("newline"))continue;var b=this.statement();this.accept(";"),b||this.error("unexpected token {peek}, not allowed at the root level"),a.push(b)}return a},error:function(a){var b=this.peek().type,c=undefined==this.peek().val?"":" "+this.peek().toString();throw c.trim()==b.trim()&&(c=""),new g.ParseError(a.replace("{peek}",'"'+b+c+'"'))},accept:function(a){if(a==this.peek().type)return this.next()},expect:function(a){return a!=this.peek().type&&this.error('expected "'+a+'", got {peek}'),this.next()},next:function(){var a=this.stash.length?this.stash.pop():this.lexer.next();return e.lineno=a.lineno,a},peek:function(){return this.lexer.peek()},lookahead:function(a){return this.lexer.lookahead(a)},isSelectorToken:function(a){var b=this.lookahead(a).type;switch(b){case"for":return this.bracketed;case"[":return this.bracketed=!0,!0;case"]":return this.bracketed=!1,!0;default:return~h.indexOf(b)}},isPseudoSelector:function(a){return~i.indexOf(this.lookahead(a).val.name)},lineContains:function(a){var b=1,c;while(c=this.lookahead(b++)){if(~["indent","outdent","newline"].indexOf(c.type))return;if(a==c.type)return!0}},selectorToken:function(){if(this.isSelectorToken(1)){if("{"==this.peek().type){if(!this.lineContains("}"))return;var a=0,b;while(b=this.lookahead(++a)){if("}"==b.type)break;if(":"==b.type)return}}return this.next()}},skipWhitespace:function(){while(~["space","indent","outdent","newline"].indexOf(this.peek().type))this.next()},skipSpaces:function(){while("space"==this.peek().type)this.next()},looksLikeFunctionDefinition:function(a){return"indent"==this.lookahead(a).type||"{"==this.lookahead(a).type},looksLikeSelector:function(){var a=1,b;while("ident"==this.lookahead(a).type&&"newline"==this.lookahead(a+1).type)a+=2;while(this.isSelectorToken(a)||","==this.lookahead(a).type){if("selector"==this.lookahead(a).type)return!0;"{"==this.lookahead(a).type?b=!0:"}"==this.lookahead(a).type&&(b=!1);if(b&&":"==this.lookahead(a).type)return!0;if("space"==this.lookahead(a).type&&"{"==this.lookahead(a+1).type)return!0;if(":"==this.lookahead(a++).type&&this.isPseudoSelector(a))return!0;if(","==this.lookahead(a).type&&"newline"==this.lookahead(a+1).type)return!0}if(","==this.lookahead(a).type&&"newline"==this.lookahead(a+1).type)return!0;if("{"==this.lookahead(a).type&&"newline"==this.lookahead(a+1).type)return!0;if(this.css)if(";"==this.lookahead(a)||"}"==this.lookahead(a))return!1;while(!~["indent","outdent","newline","for","if",";","}"].indexOf(this.lookahead(a).type))++a;if("indent"==this.lookahead(a).type)return!0},stateAllowsSelector:function(){switch(this.currentState()){case"root":case"selector":case"conditional":case"keyframe":case"function":case"font-face":case"media":case"for":return!0}},statement:function(){var a=this.stmt(),b=this.prevState,c,d;this.allowPostfix&&(delete this.allowPostfix,b="expression");switch(b){case"assignment":case"expression":case"function arguments":while(d=this.accept("if")||this.accept("unless")||this.accept("for"))switch(d.type){case"if":case"unless":a=new e.If(this.expression(),a),a.postfix=!0,a.negate="unless"==d.type,this.accept(";");break;case"for":var f,g=this.id().name;this.accept(",")&&(f=this.id().name),this.expect("in");var h=new e.Each(g,f,this.expression());c=new e.Block,c.push(a),h.block=c,a=h}}return a},stmt:function(){var a=this.peek().type;switch(a){case"-webkit-keyframes":case"keyframes":return this.keyframes();case"font-face":return this.fontface();case"comment":case"selector":case"literal":case"charset":case"media":case"page":case"ident":case"scope":case"unless":return this[a]();case"function":return this.fun();case"import":return this.atimport();case"if":return this.ifstmt();case"for":return this.forin();case"return":return this.ret();case"{":return this.property();default:if(this.stateAllowsSelector())switch(a){case"color":case"~":case"+":case">":case"<":case":":case"&":case"[":return this.selector();case"*":return this.property();case"-":if("{"==this.lookahead(2).type)return this.property()}var b=this.expression();return b.isEmpty&&this.error("unexpected {peek}"),b}},block:function(a,b){var c,d,f=this.css,g=this.parent=new e.Block(this.parent,a);!1===b&&(g.scope=!1),(this.css=this.accept("{"))?(c="}",this.skipWhitespace()):(c="outdent",this.expect("indent"));while(c!=this.peek().type){if(this.css){if(this.accept("newline"))continue;d=this.statement(),this.accept(";"),this.skipWhitespace()}else{if(this.accept("newline"))continue;d=this.statement(),this.accept(";")}d||this.error("unexpected token {peek} in block"),g.push(d)}return this.css?(this.skipWhitespace(),this.expect("}"),this.skipSpaces(),this.css=f):this.expect("outdent"),this.parent=g.parent,g},comment:function(){var a=this.next().val;return this.skipSpaces(),a},forin:function(){this.expect("for");var a,b=this.id().name;this.accept(",")&&(a=this.id().name),this.expect("in");var c=new e.Each(b,a,this.expression());return this.state.push("for"),c.block=this.block(c,!1),this.state.pop(),c},ret:function(){this.expect("return");var a=this.expression();return a.isEmpty?new e.Return:new e.Return(a)},unless:function(){this.expect("unless");var a=new e.If(this.expression(),!0);return this.state.push("conditional"),a.block=this.block(a,!1),this.state.pop(),a},ifstmt:function(){this.expect("if");var a=new e.If(this.expression());this.state.push("conditional"),a.block=this.block(a,!1);while(this.accept("else")){if(!this.accept("if")){a.elses.push(this.block(a,!1));break}var b=this.expression(),c=this.block(a,!1);a.elses.push(new e.If(b,c))}return this.state.pop(),a},scope:function(){var a=this.expect("scope").val;return this.selectorScope=a,e.nil},media:function(){var a=this.expect("media").val,b=new e.Media(a);return this.state.push("media"),b.block=this.block(b),this.state.pop(),b},fontface:function(){this.expect("font-face");var a=new e.FontFace;return this.state.push("font-face"),a.block=this.block(a),this.state.pop(),a},atimport:function(){return this.expect("import"),this.allowPostfix=!0,new e.Import(this.expression())},charset:function(){this.expect("charset");var a=this.expect("string").val;return this.allowPostfix=!0,new e.Charset(a)},page:function(){var a;this.expect("page");if(this.accept(":")){var b=this.expect("ident").val.name;a=new e.Literal(":"+b)}var c=new e.Page(a);return this.state.push("page"),c.block=this.block(c),this.state.pop(),c},keyframes:function(){var a,b=this.css,c=this.expect("keyframes"),d=new e.Keyframes(this.id(),c.val);(this.css=this.accept("{"))?this.skipWhitespace():this.expect("indent");while(a=this.accept("unit")||this.accept("ident")){if("ident"==a.type){this.accept("space");switch(a.val.name){case"from":a=new e.Unit(0,"%");break;case"to":a=new e.Unit(100,"%");break;default:this.error('"'+a.val.name+'" is invalid, use "from" or "to"')}}else a=a.val;this.state.push("keyframe");var f=this.block(d);d.push(a,f),this.state.pop(),this.css&&this.skipWhitespace()}return this.css?(this.skipWhitespace(),this.expect("}"),this.css=b):this.expect("outdent"),d},literal:function(){return this.expect("literal").val},id:function(){var a=this.expect("ident");return this.accept("space"),a.val},ident:function(){var a=2,b=this.lookahead(a).type;while("space"==b)b=this.lookahead(++a).type;switch(b){case"=":case"?=":case"-=":case"+=":case"*=":case"/=":case"%=":return this.assignment();case"[":if(this._ident==this.peek())return this.id();while("]"!=this.lookahead(a++).type&&"selector"!=this.lookahead(a).type);if("="==this.lookahead(a).type)return this._ident=this.peek(),this.expression();if(this.looksLikeSelector()&&this.stateAllowsSelector())return this.selector();case"-":case"+":case"/":case"*":case"%":case"**":case"and":case"or":case"&&":case"||":case">":case"<":case">=":case"<=":case"!=":case"==":case"?":case"in":case"is a":case"is defined":if(this._ident==this.peek())return this.id();this._ident=this.peek();switch(this.currentState()){case"for":case"selector":return this.property();case"root":case"media":case"font-face":return this.selector();default:return this.operand?this.id():this.expression()};default:switch(this.currentState()){case"root":return this.selector();case"for":case"page":case"media":case"font-face":case"selector":case"function":case"keyframe":case"conditional":return this.property();default:return this.id()}}},interpolate:function(){var a,b=[],c;c=this.accept("*"),c&&b.push(new e.Literal("*"));for(;;)if(this.accept("{"))this.state.push("interpolation"),b.push(this.expression()),this.expect("}"),this.state.pop();else if(a=this.accept("-"))b.push(new e.Literal("-"));else{if(!(a=this.accept("ident")))break;b.push(a.val)}return b.length||this.expect("ident"),b},property:function(){if(this.looksLikeSelector())return this.selector();var a=this.interpolate(),b=prop=new e.Property(a);return this.accept("space"),this.accept(":")&&this.accept("space"),this.state.push("property"),this.inProperty=!0,prop.expr=this.list(),prop.expr.isEmpty&&(b=a[0]),this.inProperty=!1,this.allowPostfix=!0,this.state.pop(),this.accept(";"),b},selector:function(){var a,b,c=new e.Group,d=this.selectorScope,f="root"==this.currentState();do{b=[],this.accept("newline");while(a=this.selectorToken())switch(a.type){case"{":this.skipSpaces();var g=this.expression();this.skipSpaces(),this.expect("}"),b.push(g);break;case"comment":b.push(new e.Literal(a.val.str));break;case"color":b.push(new e.Literal(a.val.raw));break;case"space":b.push(new e.Literal(" "));break;case"function":b.push(new e.Literal(a.val.name+"("));break;case"ident":b.push(new e.Literal(a.val.name));break;default:b.push(new e.Literal(a.val)),a.space&&b.push(new e.Literal(" "))}f&&d&&b.unshift(new e.Literal(d+" ")),c.push(new e.Selector(b))}while(this.accept(",")||this.accept("newline"));return this.lexer.allowComments=!1,this.state.push("selector"),c.block=this.block(c),this.state.pop(),c},assignment:function(){var a,b,c=this.id().name;if(a=this.accept("=")||this.accept("?=")||this.accept("+=")||this.accept("-=")||this.accept("*=")||this.accept("/=")||this.accept("%=")){this.state.push("assignment");var d=this.list();d.isEmpty&&this.error("invalid right-hand side operand in assignment, got {peek}"),b=new e.Ident(c,d),this.state.pop();switch(a.type){case"?=":var f=new e.BinOp("is defined",b),g=new e.Ident(c);b=new e.Ternary(f,g,b);break;case"+=":case"-=":case"*=":case"/=":case"%=":b.val=new e.BinOp(a.type[0],new e.Ident(c),d)}}return b},fun:function(){var a=1,b=2,c;a:while(c=this.lookahead(b++))switch(c.type){case"function":case"(":++a;break;case")":if(!--a)break a;break;case"eos":this.error('failed to find closing paren ")"')}switch(this.currentState()){case"expression":return this.functionCall();default:return this.looksLikeFunctionDefinition(b)?this.functionDefinition():this.expression()}},url:function(){this.expect("function"),this.state.push("function arguments");var a=this.args();return this.expect(")"),this.state.pop(),new e.Call("url",a)},functionCall:function(){if("url"==this.peek().val.name)return this.url();var a=this.expect("function").val.name;this.state.push("function arguments");var b=this.args();return this.expect(")"),this.state.pop(),new e.Call(a,b)},functionDefinition:function(){var a=this.expect("function").val.name;this.state.push("function params"),this.skipWhitespace();var b=this.params();this.skipWhitespace(),this.expect(")"),this.state.pop(),this.state.push("function");var c=new e.Function(a,b);return c.block=this.block(c),this.state.pop(),new e.Ident(a,c)},params:function(){var a,b,c=new e.Params;while(a=this.accept("ident"))this.accept("space"),c.push(b=a.val),this.accept("...")?b.rest=!0:this.accept("=")&&(b.val=this.expression()),this.skipWhitespace(),this.accept(","),this.skipWhitespace();return c},args:function(){var a=new e.Arguments,b;do"ident"==this.peek().type&&":"==this.lookahead(2).type?(b=this.next().val.string,this.expect(":"),a.map[b]=this.expression()):a.push(this.expression());while(this.accept(","));return a},list:function(){var a=this.expression();while(this.accept(","))if(a.isList)b.push(this.expression());else{var b=new e.Expression(!0);b.push(a),b.push(this.expression()),a=b}return a},expression:function(){var a,b=new e.Expression;this.state.push("expression");while(a=this.negation())a||this.error("unexpected token {peek} in expression"),b.push(a);return this.state.pop(),b},negation:function(){return this.accept("not")?new e.UnaryOp("!",this.negation()):this.ternary()},ternary:function(){var a=this.logical();if(this.accept("?")){var b=this.expression();this.expect(":");var c=this.expression();a=new e.Ternary(a,b,c)}return a},logical:function(){var a,b=this.typecheck();while(a=this.accept("&&")||this.accept("||"))b=new e.BinOp(a.type,b,this.typecheck());return b},typecheck:function(){var a,b=this.equality();while(a=this.accept("is a"))this.operand=!0,b||this.error('illegal unary "'+a+'", missing left-hand operand'),b=new e.BinOp(a.type,b,this.equality()),this.operand=!1;return b},equality:function(){var a,b=this.inop();while(a=this.accept("==")||this.accept("!="))this.operand=!0,b||this.error('illegal unary "'+a+'", missing left-hand operand'),b=new e.BinOp(a.type,b,this.inop()),this.operand=!1;return b},inop:function(){var a=this.relational();while(this.accept("in"))this.operand=!0,a||this.error('illegal unary "in", missing left-hand operand'),a=new e.BinOp("in",a,this.relational()),this.operand=!1;return a},relational:function(){var a,b=this.range();while(a=this.accept(">=")||this.accept("<=")||this.accept("<")||this.accept(">"))this.operand=!0,b||this.error('illegal unary "'+a+'", missing left-hand operand'),b=new e.BinOp(a.type,b,this.range()),this.operand=!1;return b},range:function(){var a,b=this.additive();if(a=this.accept("...")||this.accept(".."))this.operand=!0,b||this.error('illegal unary "'+a+'", missing left-hand operand'),b=new e.BinOp(a.val,b,this.additive()),this.operand=!1;return b},additive:function(){var a,b=this.multiplicative();while(a=this.accept("+")||this.accept("-"))this.operand=!0,b=new e.BinOp(a.type,b,this.multiplicative()),this.operand=!1;return b},multiplicative:function(){var a,b=this.defined();while(a=this.accept("**")||this.accept("*")||this.accept("/")||this.accept("%")){this.operand=!0;if("/"==a&&this.inProperty&&!this.parens)return this.stash.push(new f("literal",new e.Literal("/"))),this.operand=!1,b;b||this.error('illegal unary "'+a+'", missing left-hand operand'),b=new e.BinOp(a.type,b,this.defined()),this.operand=!1}return b},defined:function(){var a=this.unary();return this.accept("is defined")&&(a||this.error('illegal unary "is defined", missing left-hand operand'),a=new e.BinOp("is defined",a)),a},unary:function(){var a,b;return(a=this.accept("!")||this.accept("~")||this.accept("+")||this.accept("-"))?(this.operand=!0,b=new e.UnaryOp(a.type,this.unary()),this.operand=!1,b):this.subscript()},subscript:function(){var a=this.primary();while(this.accept("["))a=new e.BinOp("[]",a,this.expression()),this.expect("]"),this.accept("=")&&(a.op+="=",a.val=this.expression());return a},primary:function(){var a,b;if(this.accept("(")){++this.parens;var c=this.expression();return this.expect(")"),--this.parens,c}switch(this.peek().type){case"null":case"unit":case"color":case"string":case"literal":case"boolean":return this.next().val;case"ident":return this.ident();case"function":return this.functionCall()}}}}),a.register("renderer.js",function(a,b,c){var d=c("./parser"),e=c("./visitor/compiler"),f=c("./visitor/evaluator"),g=c("./utils"),h=c("./nodes"),i=c("./path"),j=i.join,k=a.exports=function(b,c){c=c||{},c.globals={},c.functions={},c.imports=[],c.paths=c.paths||[],c.filename=c.filename||"stylus",this.options=c,this.str=b};k.prototype.render=function(a){var b=this.parser=new d(this.str,this.options);try{h.filename=this.options.filename;var c=b.parse();this.evaluator=new f(c,this.options),c=this.evaluator.evaluate();var g=new e(c,this.options),i=g.compile(),j=g.js;a(null,i,j)}catch(k){a(k)}},k.prototype.set=function(a,b){return this.options[a]=b,this},k.prototype.get=function(a){return this.options[a]},k.prototype.include=function(a){return this.options.paths.push(a),this},k.prototype.use=function(a){return a.call(this,this),this},k.prototype.define=function(a,b,c){return b.nodeName?(this.options.globals[a]=b,this):(this.options.functions[a]=b,undefined!=c&&(b.raw=c),this)}}),a.register("stack/index.js",function(a,b,c){var d=c("./frame"),e=a.exports=function(){Array.apply(this,arguments)};e.prototype.__proto__=Array.prototype,e.prototype.push=function(a){return a.stack=this,a.parent=this.currentFrame,[].push.apply(this,arguments)},e.prototype.__defineGetter__("currentFrame",function(){return this[this.length-1]}),e.prototype.getBlockFrame=function(a){for(var b=0;b ":" ")+Array(j-d.toString().length+1).join(" ")+d+"| "+a}).join("\n");return a.message=d+":"+c+"\n"+f+"\n\n"+a.message+"\n"+(a.stylusStack?a.stylusStack+"\n":""),a},b.assertType=function(a,c,d){b.assertPresent(a,d);if(a.nodeName==c)return;var e=a.nodeName,f='expected "'+d+'" to be a '+c+", but got "+e+":"+a;throw new Error("TypeError: "+f)},b.assertString=function(a,c){b.assertPresent(a,c);switch(a.nodeName){case"string":case"ident":case"literal":return;default:var d=a.nodeName ,e="expected string, ident or literal, but got "+d+":"+a;throw new Error("TypeError: "+e)}},b.assertColor=function(a,c){b.assertPresent(a,c);switch(a.nodeName){case"rgba":case"hsla":return;default:var d=a.nodeName,e="expected rgba or hsla, but got "+d+":"+a;throw new Error("TypeError: "+e)}},b.assertPresent=function(a,b){if(a)return;throw b?new Error('"'+b+'" argument required'):new Error("argument missing")},b.unwrap=function(a){return a.preserve?a:"arguments"!=a.nodeName&&"expression"!=a.nodeName?a:1!=a.nodes.length?a:"arguments"!=a.nodes[0].nodeName&&"expression"!=a.nodes[0].nodeName?a:b.unwrap(a.nodes[0])},b.params=function(a){return a.toString().match(/\(([^)]*)\)/)[1].split(/ *, */)},b.merge=function(a,b){for(var c in b)a[c]=b[c];return a}}),a.register("visitor/index.js",function(a,b,c){var d=a.exports=function(b){this.root=b};d.prototype.visit=function(a,b){var c="visit"+a.constructor.name;return this[c]?this[c](a):a}}),a.register("visitor/compiler.js",function(a,b,c){var d=c("./index"),e=c("../nodes"),f=a.exports=function(b,c){c=c||{},this.compress=c.compress,this.firebug=c.firebug,this.linenos=c.linenos,this.indents=1,d.call(this,b),this.tree=[],this.js=""};f.prototype.__proto__=d.prototype,f.prototype.compile=function(){return this.visit(this.root)},f.prototype.__defineGetter__("indent",function(){return this.compress?"":(new Array(this.indents)).join(" ")}),f.prototype.visitRoot=function(a){this.buf="";for(var b=0,c=a.nodes.length;b-1)return c.toString().replace("0.",".")+b}return c.toString()+b},f.prototype.visitGroup=function(a){function h(a,c){c?a[c].forEach(function(b){g.unshift(b),h(a,c-1),g.shift()}):a[0].forEach(function(a){var c=a.trim();if(g.length)for(var d=0,e=g.length;d200)throw new RangeError("Maximum call stack size exceeded");"expression"==b.nodeName&&(b=b.first);var d=this.ret;this.ret=!0;var e=this.visit(a.args);for(var f in a.args.map)a.args.map[f]=this.visit(a.args.map[f]);return this.ret=d,b.fn?c=this.invokeBuiltin(b.fn,e):"function"==b.nodeName&&(c=this.invokeFunction(b,e)),this.calling.pop(),this.ignoreColors=!1,c},n.prototype.visitIdent=function(a){var b;if(a.property)return(b=this.lookupProperty(a.name))?this.visit(b.expr.clone()):e.nil;if(a.val.isNull){var c=this.lookup(a.name);return c?this.visit(c):a}var d=this.ret;return this.ret=!0,a.val=this.visit(a.val),this.ret=d,this.currentScope.add(a),a.val},n.prototype.visitBinOp=function(a){if("is defined"==a.op)return this.isDefined(a.left);var b=this.ret;this.ret=!0;var c=a.op,d=this.visit(a.left),f=this.visit(a.right);this.ret=b;var g=a.val?this.visit(a.val):null;try{return this.visit(d.operate(c,f,g))}catch(h){if("CoercionError"==h.name)switch(c){case"==":return e.no;case"!=":return e.yes}throw h}},n.prototype.visitUnaryOp=function(a){var b=a.op,c=this.visit(a.expr);"!"!=b&&(c=c.first.clone(),i.assertType(c,"unit"));switch(b){case"-":c.val=-c.val;break;case"+":c.val=+c.val;break;case"~":c.val=~c.val;break;case"!":return c.toBoolean().negate()}return c},n.prototype.visitTernary=function(a){var b=this.visit(a.cond).toBoolean();return b.isTrue?this.visit(a.trueExpr):this.visit(a.falseExpr)},n.prototype.visitExpression=function(a){for(var b=0,c=a.nodes.length;b