if(Function.prototype.name===undefined&&Object.defineProperty!==undefined){Object.defineProperty(Function.prototype,"name",{get:function(){varregex=/function\s([^(]{1,})\(/,match=regex.exec(this.toString());returnmatch&&match.length>1?match[1].trim():""}})}if(String.prototype.trimRight===undefined){String.prototype.trimRight=function(){returnString(this).replace(/\s+$/,"")}}varstylus=function(){functionrequire(p){varpath=require.resolve(p),mod=require.modules[path];if(!mod)thrownewError('failed to require "'+p+'"');if(!mod.exports){mod.exports={};mod.call(mod.exports,mod,mod.exports,require.relative(path))}returnmod.exports}varbifs="called-from=()\n\nvendors=mozwebkitomsofficial\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// Math functions\n\nabs(n) { math(n, 'abs') }\nmin(a, b) { a < b ? a : b }\nmax(a, b) { a > b ? a : b }\n\n// Trigonometrics\nPI = -math-prop('PI')\n\nradians-to-degrees(angle)\n angle * (180 / PI)\n\ndegrees-to-radians(angle)\n unit(angle * (PI / 180),'')\n\nsin(n)\n n = degrees-to-radians(n) if unit(n) == 'deg'\n round(math(n, 'sin'), 9)\n\ncos(n)\n n = degrees-to-radians(n) if unit(n) == 'deg'\n round(math(n, 'cos'), 9)\n\n// Rounding Math functions\n\nceil(n, precision = 0)\n multiplier = 10 ** precision\n math(n * multiplier, 'ceil') / multiplier\n\nfloor(n, precision = 0)\n multiplier = 10 ** precision\n math(n * multiplier, 'floor') / multiplier\n\nround(n, precision = 0)\n multiplier = 10 ** precision\n math(n * multiplier, 'round') / multiplier\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// return a unitless number, or pass through\n\nremove-unit(n)\n if typeof(n) is 'unit'\n unit(n, '')\n else\n n\n\n// convert a percent to a decimal, or pass through\n\npercent-to-decimal(n)\n if unit(n) is '%'\n remove-unit(n) / 100\n else\n n\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 = 100%)\n if color is a 'color'\n adjust(color, 'saturation', amount)\n else\n unquote( 'saturate(' + color + ')' )\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// decrease opacity by amount\n\nfade-out(color, amount)\n color - rgba(black, percent-to-decimal(amount))\n\n// increase opacity by amount\n\nfade-in(color, amount)\n color + rgba(black, percent-to-decimal(amount))\n\n// spin hue by a given amount\n\nspin(color, amount)\n color + unit(amount, deg)\n\n// mix two colors by a given amount\n\nmix(color1, color2, weight = 50%)\n unless weight in 0..100\n error('Weight must be between 0% and 100%')\n\n if length(color1) == 2\n weight = color1[0]\n color1 = color1[1]\n\n else if length(color2) == 2\n weight = 100 - color2[0]\n color2 = color2[1]\n\n require-color(color1)\n require-color(color2)\n\n p = unit(weight / 100, '')\n w = p * 2 - 1\n\n a = alpha(color1) - alpha(color2)\n\n w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2\n w2 = 1 - w1\n\n channels = (red(color1) red(color2)) (green(color1) green(color2)) (blue(color1) blue(color2))\n rgb =
utils.assertString(prefix,"prefix");utils.assertType(block,"block","block");var_prefix=this.prefix;this.options.prefix=this.prefix=prefix.string;block=this.visit(block);this.options.prefix=this.prefix=_prefix;returnblock}});require.register("functions/push.js",function(module,exports,require){varutils=require("../utils");(module.exports=function(expr){expr=utils.unwrap(expr);for(vari=1,len=arguments.length;i<len;++i){expr.nodes.push(utils.unwrap(arguments[i]).clone())}returnexpr.nodes.length}).raw=true});require.register("functions/range.js",function(module,exports,require){varutils=require("../utils"),nodes=require("../nodes");module.exports=functionrange(start,stop,step){utils.assertType(start,"unit","start");utils.assertType(stop,"unit","stop");if(step){utils.assertType(step,"unit","step");if(0==step.val){thrownewError('ArgumentError: "step" argument must not be zero')}}else{step=newnodes.Unit(1)}varlist=newnodes.Expression;for(vari=start.val;i<=stop.val;i+=step.val){list.push(newnodes.Unit(i,start.type))}returnlist}});require.register("functions/red.js",function(module,exports,require){varnodes=require("../nodes"),rgba=require("./rgba");module.exports=functionred(color,value){color=color.rgba;if(value){returnrgba(value,newnodes.Unit(color.g),newnodes.Unit(color.b),newnodes.Unit(color.a))}returnnewnodes.Unit(color.r,"")}});require.register("functions/remove.js",function(module,exports,require){varutils=require("../utils");module.exports=functionremove(object,key){utils.assertType(object,"object","object");utils.assertString(key,"key");deleteobject.vals[key.string];returnobject}});require.register("functions/replace.js",function(module,exports,require){varutils=require("../utils"),nodes=require("../nodes");module.exports=functionreplace(pattern,replacement,val){utils.assertString(pattern,"pattern");utils.assertString(replacement,"replacement");utils.assertString(val,"val");pattern=newRegExp(pattern.string,"g");varres=val.string.replace(pattern,replacement.string);returnvalinstanceofnodes.Ident?newnodes.Ident(res):newnodes.String(res)}});require.register("functions/rgb.js",function(module,exports,require){varutils=require("../utils"),nodes=require("../nodes"),rgba=require("./rgba");module.exports=functionrgb(red,green,blue){switch(arguments.length){case1:utils.assertColor(red);varcolor=red.rgba;returnnewnodes.RGBA(color.r,color.g,color.b,1);default:returnrgba(red,green,blue,newnodes.Unit(1))}}});require.register("functions/rgba.js",function(module,exports,require){varutils=require("../utils"),nodes=require("../nodes");module.exports=functionrgba(red,green,blue,alpha){switch(arguments.length){case1:utils.assertColor(red);returnred.rgba;case2:utils.assertColor(red);varcolor=red.rgba;utils.assertType(green,"unit","alpha");alpha=green.clone();if("%"==alpha.type)alpha.val/=100;returnnewnodes.RGBA(color.r,color.g,color.b,alpha.val);default:utils.assertType(red,"unit","red");utils.assertType(green,"unit","green");utils.assertType(blue,"unit","blue");utils.assertType(alpha,"unit","alpha");varr="%"==red.type?Math.round(red.val*2.55):red.val,g="%"==green.type?Math.round(green.val*2.55):green.val,b="%"==blue.type?Math.round(blue.val*2.55):blue.val;alpha=alpha.clone();if(alpha&&"%"==alpha.type)alpha.val/=100;returnnewnodes.RGBA(r,g,b,alpha.val)}}});require.register("functions/s.js",function(module,exports,require){varutils=require("../utils"),nodes=require("../nodes"),Compiler=require("../visitor/compiler");(module.exports=functions(fmt){fmt=utils.unwrap(fmt).nodes[0];utils.assertString(fmt);varself=this,str=fmt.string,args=arguments,i=1;str=str.replace(/%(s|d)/g,function(_,specifier){vararg=args[i++]||nodes.nil;switch(specifier){case"s":returnnewCompiler(arg,self.options).compile();case"d":arg=utils.unwrap(arg).first;if("unit"!=arg.nodeName)thrownewError("%d requires a unit");returnarg.val}});returnnewnodes.Literal(str)}).raw=true});require.register("functions/saturation.js",function(module,exports,require){varnodes=require("../nodes"),hsla=require("./hsla"),compo