(dist) build 1.0.20

This commit is contained in:
cloudhead 2010-06-20 01:34:36 -04:00
parent 49d6830d49
commit 58eafa57d7
3 changed files with 90 additions and 82 deletions

View File

@ -1,60 +0,0 @@
//
// LESS - Leaner CSS v1.0.19
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
// Licensed under the Apache 2.0 License.
//
(function(u){function q(d){return u.less[d.split("/")[1]]}function O(d){if(!document.querySelectorAll&&typeof jQuery==="undefined")x("no selector method found.");else return(document.querySelectorAll||jQuery).call(document,d)}function H(d,a){for(var e=0;e<I.length;e++)J(I[e],d,a)}function J(d,a,e){var b=v&&v.getItem(d.href),g=v&&v.getItem(d.href+":timestamp"),i={css:b,timestamp:g};P(d.href,function(j,l){if(!e&&i&&(new Date(l)).valueOf()===(new Date(i.timestamp)).valueOf()){C(i.css,d);a(null,d,{local:true})}else(new p.Parser({optimization:p.optimization})).parse(j,
function(o,s){if(o)return K(o,d.href);try{a(s,d,{local:false,lastModified:l});Q(document.getElementById("less-error-message:"+d.href.replace(/[^a-z]+/gi,"-")))}catch(r){K(r,d.href)}})},function(j){throw new Error("Couldn't load "+d.href+" ("+j+")");})}function C(d,a,e){var b,g="less:"+(a.title||a.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);if((b=document.getElementById(g))===null){b=document.createElement("style");b.type="text/css";b.media="screen";b.id=g;document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet)try{b.styleSheet.cssText=
d}catch(i){throw new Error("Couldn't reassign styleSheet.cssText.");}else(function(j){if(b.childNodes.length>0)b.firstChild.nodeValue!==j.nodeValue&&b.replaceChild(j,b.firstChild);else b.appendChild(j)})(document.createTextNode(d));if(e&&v){x("saving "+a.href+" to cache.");v.setItem(a.href,d);v.setItem(a.href+":timestamp",e)}}function P(d,a,e){function b(j,l,o){if(j.status>=200&&j.status<300)l(j.responseText,j.getResponseHeader("Last-Modified"));else typeof o==="function"&&o(j.status)}var g=R(),i=
D?false:p.async;g.open("GET",d,i);g.send(null);if(D)g.status===0?a(g.responseText):e(g.status);else if(i)g.onreadystatechange=function(){g.readyState==4&&b(g,a,e)};else b(g,a,e)}function R(){if(u.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(d){x("browser doesn't support AJAX.");return null}}function Q(d){return d&&d.parentNode.removeChild(d)}function x(d){p.env=="development"&&typeof console!=="undefined"&&console.log("less: "+d)}function K(d,
a){var e="less-error-message:"+a.replace(/[^a-z]+/ig,"-");if(!d.extract)throw d;var b=document.createElement("div"),g;b.id=e;b.className="less-error-message";b.innerHTML="<h3>"+(d.message||"There is an error in your .less file")+'</h3><p><a href="'+a+'">'+a+"</a> on line "+d.line+", column "+(d.column+1)+":</p>"+'<div>\n<pre class="ctx"><span>[-1]</span>{0}</pre>\n<pre><span>[0]</span>{current}</pre>\n<pre class="ctx"><span>[1]</span>{2}</pre>\n</div>'.replace(/\[(-?\d)\]/g,function(i,j){return parseInt(d.line)+
parseInt(j)||""}).replace(/\{(\d)\}/g,function(i,j){return d.extract[parseInt(j)]||""}).replace(/\{current\}/,d.extract[1].slice(0,d.column)+'<span class="error">'+d.extract[1].slice(d.column)+"</span>");C(".less-error-message span {\nmargin-right: 15px;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message pre.ctx {\ncolor: #dd7777;\n}\n.less-error-message h3 {\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}",
{title:"error-message"});b.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(p.env=="development")g=setInterval(function(){if(document.body){document.getElementById(e)?document.body.replaceChild(b,document.getElementById(e)):document.body.insertBefore(b,document.body.firstChild);clearInterval(g)}},10)}if(!Array.isArray)Array.isArray=function(d){return Object.prototype.toString.call(d)===
"[object Array]"||d instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(d,a){for(var e=this.length>>>0,b=0;b<e;b++)b in this&&d.call(a,this[b],b,this)};if(!Array.prototype.map)Array.prototype.map=function(d,a){for(var e=this.length>>>0,b=new Array(e),g=0;g<e;g++)if(g in this)b[g]=d.call(a,this[g],g,this);return b};if(!Array.prototype.filter)Array.prototype.filter=function(d,a){for(var e=[],b=0;b<this.length;b++)d.call(a,this[b])&&e.push(this[b]);return e};if(!Array.prototype.reduce)Array.prototype.reduce=
function(d){var a=this.length>>>0,e=0;if(a===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var b=arguments[1];else{do{if(e in this){b=this[e++];break}if(++e>=a)throw new TypeError;}while(1)}for(;e<a;e++)if(e in this)b=d.call(null,b,this[e],e,this);return b};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(d,a){var e=this.length;a=a||0;if(!e)return-1;if(a>=e)return-1;if(a<0)a+=e;for(;a<e;a++)if(Object.prototype.hasOwnProperty.call(this,a))if(d===this[a])return a;return-1};
if(!Object.keys)Object.keys=function(d){var a=[];for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&a.push(e);return a};if(!String.prototype.trim)String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var p,m;if(typeof u==="undefined"){p=exports;m=q("less/tree")}else{p=u.less={};m=u.less.tree={}}p.Parser=function(d){function a(f){var h,k,n;if(f instanceof Function)return f.call(s.parsers);else if(typeof f==="string"){h=b.charAt(g)===f?f:null;k=1}else{if(g>=
o+l[i].length&&i<l.length-1)o+=l[i++].length;f.lastIndex=n=g-o;if(h=f.exec(l[i])){k=h[0].length;if(f.lastIndex-k!==n)return}}if(h){g+=k;for(k=o+l[i].length;g<=k;){f=b.charCodeAt(g);if(!(f===32||f===10||f===9))break;g++}return typeof h==="string"?h:h.length===1?h[0]:h}}function e(f){var h;if(typeof f==="string")return b.charAt(g)===f;else{f.lastIndex=g;if((h=f.exec(b))&&f.lastIndex-h[0].length===g)return h}}var b,g,i,j,l,o,s,r=this,L=function(){},M=this.imports={paths:d&&d.paths||[],queue:[],files:{},
push:function(f,h){var k=this;this.queue.push(f);p.Parser.importer(f,this.paths,function(n){k.queue.splice(k.queue.indexOf(f),1);k.files[f]=n;h(n);k.queue.length===0&&L()})}};this.env=d||{};this.optimization="optimization"in this.env?this.env.optimization:1;return s={imports:M,parse:function(f,h){var k,n,y=null;g=i=o=j=0;l=[];b=f.replace(/\r\n/g,"\n");if(r.optimization>0){b=b.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(E){return r.optimization>1?"":E.replace(/\n(\s*\n)+/g,"\n")});l=b.split(/^(?=\n)/mg)}else l=
[b];k=new m.Ruleset([],a(this.parsers.primary));k.root=true;k.toCSS=function(E){var z,A;return function(t){function F(S){return(b.slice(0,S).match(/\n/g)||"").length}t=t||{};try{var B=E.call(this,[],{frames:[],compress:t.compress||false});return t.compress?B.replace(/(\s)+/g,"$1"):B}catch(w){A=b.split("\n");z=F(w.index);t=w.index;for(B=-1;t>=0&&b.charAt(t)!=="\n";t--)B++;throw{name:"NameError",message:w.message,filename:d.filename,index:w.index,line:z+1,callLine:F(w.call)+1,callExtract:A[F(w.call)],
stack:w.stack,column:B,extract:[A[z-1],A[z],A[z+1]]};}}}(k.toCSS);if(g<b.length-1){g=j;n=b.split("\n");f=(b.slice(0,g).match(/\n/g)||"").length+1;for(var G=g,N=-1;G>=0&&b.charAt(G)!=="\n";G--)N++;y={name:"ParseError",message:"Syntax Error on line "+f,filename:d.filename,line:f,column:N,extract:[n[f-2],n[f-1],n[f]]}}if(this.imports.queue.length>0)L=function(){h(y,k)};else h(y,k)},parsers:{primary:function(){for(var f,h=[];f=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||
a(this.comment)||a(/[\n\s]+/g)||a(this.directive);)h.push(f);return h},comment:function(){var f;if(b.charAt(g)==="/")if(b.charAt(g+1)==="/")return new m.Comment(a(/\/\/.*/g),true);else if(f=a(/\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/g))return new m.Comment(f)},entities:{quoted:function(){var f;if(!(b.charAt(g)!=='"'&&b.charAt(g)!=="'"))if(f=a(/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/g))return new m.Quoted(f[0],f[1]||f[2])},keyword:function(){var f;if(f=a(/[A-Za-z-]+/g))return new m.Keyword(f)},call:function(){var f,
h;if(f=a(/([\w-]+|%)\(/g)){if(f[1].toLowerCase()==="alpha")return a(this.alpha);h=a(this.entities.arguments);if(a(")"))if(f)return new m.Call(f[1],h)}},arguments:function(){for(var f=[],h;h=a(this.expression);){f.push(h);if(!a(","))break}return f},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var f;if(!(b.charAt(g)!=="u"||!a(/url\(/g))){f=a(this.entities.quoted)||a(/[-\w%@$\/.&=:;#+?]+/g);if(!a(")"))throw new Error("missing closing ) for url()");
return new m.URL(f.value?f:new m.Anonymous(f))}},variable:function(){var f,h=g;if(b.charAt(g)==="@"&&(f=a(/@[\w-]+/g)))return new m.Variable(f,h)},color:function(){var f;if(b.charAt(g)==="#"&&(f=a(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)))return new m.Color(f[1])},dimension:function(){var f;f=b.charCodeAt(g);if(!(f>57||f<45||f===47))if(f=a(/(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/g))return new m.Dimension(f[1],f[2])}},variable:function(){var f;if(b.charAt(g)==="@"&&(f=a(/(@[\w-]+)\s*:/g)))return f[1]},
shorthand:function(){var f,h;if(e(/[@\w.-]+\/[@\w.-]+/g))if((f=a(this.entity))&&a("/")&&(h=a(this.entity)))return new m.Shorthand(f,h)},mixin:{call:function(){for(var f=[],h,k,n,y=g;h=a(/[#.][\w-]+/g);){f.push(new m.Element(k,h));k=a(">")}a("(")&&(n=a(this.entities.arguments))&&a(")");if(f.length>0&&(a(";")||e("}")))return new m.mixin.Call(f,n,y)},definition:function(){var f,h=[],k,n;if(!(b.charAt(g)!=="."||e(/[^{]*(;|})/g)))if(f=a(/([#.][\w-]+)\s*\(/g)){for(f=f[1];k=a(/@[\w-]+/g)||a(this.entities.literal)||
a(this.entities.keyword);){if(k[0]==="@")if(a(":"))if(n=a(this.expression))h.push({name:k,value:n});else throw new Error("Expected value");else h.push({name:k});else h.push({value:k});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(k=a(this.block))return new m.mixin.Definition(f,h,k)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)},end:function(){return a(";")||e("}")},alpha:function(){var f;
if(a(/opacity=/gi))if(f=a(/\d+/g)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new m.Alpha(f)}},element:function(){var f;c=a(this.combinator);if(f=a(/[.#:]?[\w-]+/g)||a("*")||a(this.attribute)||a(/\([^)@]+\)/g))return new m.Element(c,f)},combinator:function(){var f;return(f=a(/[+>~]/g)||a("&")||a(/::/g))?new m.Combinator(f):new m.Combinator(b.charAt(g-1)===" "?" ":null)},selector:function(){for(var f,h=[];f=a(this.element);)h.push(f);if(h.length>0)return new m.Selector(h)},
tag:function(){return a(/[a-zA-Z][a-zA-Z-]*[0-9]?/g)||a("*")},attribute:function(){var f="",h,k,n;if(a("[")){if(h=a(/[a-z-]+/g)||a(this.entities.quoted))f=(n=a(/[|~*$^]?=/g))&&(k=a(this.entities.quoted)||a(/[\w-]+/g))?[h,n,k.toCSS?k.toCSS():k].join(""):h;if(a("]"))if(f)return"["+f+"]"}},block:function(){var f;if(a("{")&&(f=a(this.primary))&&a("}"))return f},ruleset:function(){var f=[],h,k,n=g;if(h=e(/([.#: \w-]+)[\s\n]*\{/g)){g+=h[0].length-1;f=[new m.Selector([new m.Element(null,h[1])])]}else{for(;h=
a(this.selector);){f.push(h);if(!a(","))break}h&&a(this.comment)}if(f.length>0&&(k=a(this.block)))return new m.Ruleset(f,k);else{j=g;g=n}},rule:function(){var f,h=g;if(name=a(this.property)||a(this.variable)){if(name.charAt(0)!="@"&&(match=e(/([^@+\/*(;{}-]*);/g))){g+=match[0].length-1;f=new m.Anonymous(match[1])}else f=name==="font"?a(this.font):a(this.value);if(a(this.end))return new m.Rule(name,f,h);else{j=g;g=h}}},"import":function(){var f;if(a(/@import\s+/g)&&(f=a(this.entities.quoted)||a(this.entities.url))&&
a(";"))return new m.Import(f,M)},directive:function(){var f,h,k;if(b.charAt(g)==="@")if(h=a(this["import"]))return h;else if(f=a(/@media|@page/g)){k=a(/[^{]+/g).trim();if(h=a(this.block))return new m.Directive(f+" "+k,h)}else if(f=a(/@[-a-z]+/g))if(f==="@font-face"){if(h=a(this.block))return new m.Directive(f,h)}else if((h=a(this.entity))&&a(";"))return new m.Directive(f,h)},font:function(){for(var f=[],h=[],k;k=a(this.shorthand)||a(this.entity);)h.push(k);f.push(new m.Expression(h));if(a(","))for(;k=
a(this.expression);){f.push(k);if(!a(","))break}return new m.Value(f,a(this.important))},value:function(){for(var f,h=[];f=a(this.expression);){h.push(f);if(!a(","))break}f=a(this.important);if(h.length>0)return new m.Value(h,f)},important:function(){return a(/!\s*important/g)},sub:function(){var f;if(a("(")&&(f=a(this.expression))&&a(")"))return f},multiplication:function(){var f,h,k,n;if(f=a(this.operand)){for(;(k=a(/[\/*]/g))&&(h=a(this.operand));)n=new m.Operation(k,[n||f,h]);return n||f}},addition:function(){var f,
h,k,n;if(f=a(this.multiplication)){for(;(k=a(/[-+]\s+/g)||b.charAt(g-1)!=" "&&a(/[-+]/g))&&(h=a(this.multiplication));)n=new m.Operation(k,[n||f,h]);return n||f}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)},expression:function(){for(var f,h=[];f=a(this.addition)||a(this.entity);)h.push(f);if(h.length>0)return new m.Expression(h)},property:function(){var f;if(f=a(/(\*?-?[-a-z_0-9]+)\s*:/g))return f[1]}}}};p.Parser.importer=null;
(function(d){function a(b){if(b instanceof d.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);else if(typeof b==="number")return b;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function e(b){return Math.min(1,Math.max(0,b))}d.functions={rgb:function(b,g,i){return this.rgba(b,g,i,1)},rgba:function(b,g,i,j){b=[b,g,i].map(function(l){return a(l)});j=a(j);return new d.Color(b,j)},hsl:function(b,g,i){return this.hsla(b,g,i,1)},hsla:function(b,g,i,j){function l(r){r=
r<0?r+1:r>1?r-1:r;return r*6<1?s+(o-s)*r*6:r*2<1?o:r*3<2?s+(o-s)*(2/3-r)*6:s}b=a(b)%360/360;g=a(g);i=a(i);j=a(j);var o=i<=0.5?i*(g+1):i+g-i*g,s=i*2-o;return this.rgba(l(b+1/3)*255,l(b)*255,l(b-1/3)*255,j)},hue:function(b){return new d.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new d.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new d.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new d.Dimension(b.toHSL().a)},saturate:function(b,
g){b=b.toHSL();b.s+=g.value/100;b.s=e(b.s);return this.hsl(b.h,b.s,b.l)},desaturate:function(b,g){b=b.toHSL();b.s-=g.value/100;b.s=e(b.s);return this.hsl(b.h,b.s,b.l)},lighten:function(b,g){b=b.toHSL();b.l+=g.value/100;b.l=e(b.l);return this.hsl(b.h,b.s,b.l)},darken:function(b,g){b=b.toHSL();b.l-=g.value/100;b.l=e(b.l);return this.hsl(b.h,b.s,b.l)},spin:function(b,g){b=b.toHSL();g=(b.h+g.value)%360;b.h=g<0?360+g:g;return this.hsl(b.h,b.s,b.l)},greyscale:function(b){return this.desaturate(b,new d.Dimension(100))},
e:function(b){return new d.Anonymous(b)},"%":function(b){for(var g=Array.prototype.slice.call(arguments,1),i=b.content,j=0;j<g.length;j++)i=i.replace(/%s/,g[j].content).replace(/%[da]/,g[j].toCSS());i=i.replace(/%%/g,"%");return new d.Quoted('"'+i+'"',i)}}})(q("less/tree"));(function(d){d.Alpha=function(a){this.value=a};d.Alpha.prototype={toCSS:function(){return"alpha(opacity="+this.value.toCSS()+")"},eval:function(){return this}}})(q("less/tree"));(function(d){d.Anonymous=function(a){this.value=
a.content||a};d.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Call=function(a,e){this.name=a;this.args=e};d.Call.prototype={eval:function(a){var e=this.args.map(function(b){return b.eval(a)});return this.name in d.functions?d.functions[this.name].apply(d.functions,e):new d.Anonymous(this.name+"("+e.map(function(b){return b.toCSS()}).join(", ")+")")},toCSS:function(a){return this.eval(a).toCSS()}}})(q("less/tree"));(function(d){d.Color=
function(a,e){if(Array.isArray(a)){this.rgb=a;this.alpha=e}else this.rgb=a.length==6?a.match(/.{2}/g).map(function(b){return parseInt(b,16)}):a.split("").map(function(b){return parseInt(b+b,16)})};d.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha&&this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){a=Math.round(a);a=(a>255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},
operate:function(a,e){var b=[];e instanceof d.Color||(e=e.toColor());for(var g=0;g<3;g++)b[g]=d.operate(a,this.rgb[g],e.rgb[g]);return new d.Color(b)},toHSL:function(){var a=this.rgb[0]/255,e=this.rgb[1]/255,b=this.rgb[2]/255,g=Math.max(a,e,b),i=Math.min(a,e,b),j,l=(g+i)/2,o=g-i;if(g===i)j=i=0;else{i=l>0.5?o/(2-g-i):o/(g+i);switch(g){case a:j=(e-b)/o+(e<b?6:0);break;case e:j=(b-a)/o+2;break;case b:j=(a-e)/o+4;break}j/=6}return{h:j*360,s:i,l:l}}}})(q("less/tree"));(function(d){d.Comment=function(a,
e){this.value=a;this.silent=!!e};d.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Dimension=function(a,e){this.value=parseFloat(a);this.unit=e||null};d.Dimension.prototype={eval:function(){return this},toColor:function(){return new d.Color([this.value,this.value,this.value])},toCSS:function(){return this.value+this.unit},operate:function(a,e){return new d.Dimension(d.operate(a,this.value,e.value),this.unit||e.unit)}}})(q("less/tree"));
(function(d){d.Directive=function(a,e){this.name=a;if(Array.isArray(e))this.ruleset=new d.Ruleset([],e);else this.value=e};d.Directive.prototype={toCSS:function(a,e){if(this.ruleset){this.ruleset.root=true;return this.name+(e.compress?"{":" {\n ")+this.ruleset.toCSS(a,e).trim().replace(/\n/g,"\n ")+(e.compress?"}":"\n}\n")}else return this.name+" "+this.value.toCSS()+";\n"},eval:function(a){a.frames.unshift(this);this.ruleset&&this.ruleset.evalRules(a);a.frames.shift();return this},variable:function(a){return d.Ruleset.prototype.variable.call(this.ruleset,
a)},find:function(){return d.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return d.Ruleset.prototype.rulesets.apply(this.ruleset)}}})(q("less/tree"));(function(d){d.Element=function(a,e){this.combinator=a instanceof d.Combinator?a:new d.Combinator(a);this.value=e.trim()};d.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+this.value};d.Combinator=function(a){this.value=a===" "?" ":a?a.trim():""};d.Combinator.prototype.toCSS=function(a){return{"":"",
" ":" ","&":"",":":" :","::":"::","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}})(q("less/tree"));(function(d){d.Expression=function(a){this.value=a};d.Expression.prototype={eval:function(a){return this.value.length>1?new d.Expression(this.value.map(function(e){return e.eval(a)})):this.value[0].eval(a)},toCSS:function(){return this.value.map(function(a){return a.toCSS()}).join(" ")}}})(q("less/tree"));(function(d){d.Import=function(a,e){var b=this;this._path=
a;this.path=a instanceof d.Quoted?/\.(le?|c)ss$/.test(a.content)?a.content:a.content+".less":a.value.content||a.value;(this.css=/css$/.test(this.path))||e.push(this.path,function(g){b.root=g})};d.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(){if(this.css)return this;else{for(var a=0;a<this.root.rules.length;a++)this.root.rules[a]instanceof d.Import&&Array.prototype.splice.apply(this.root.rules,[a,1].concat(this.root.rules[a].eval()));return this.root.rules}}}})(q("less/tree"));
(function(d){d.Keyword=function(a){this.value=a};d.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value}}})(q("less/tree"));(function(d){d.mixin={};d.mixin.Call=function(a,e,b){this.selector=new d.Selector(a);this.arguments=e;this.index=b};d.mixin.Call.prototype={eval:function(a){for(var e,b=[],g=false,i=0;i<a.frames.length;i++)if((e=a.frames[i].find(this.selector)).length>0){for(i=0;i<e.length;i++)if(e[i].match(this.arguments,a))try{Array.prototype.push.apply(b,e[i].eval(this.arguments,
a).rules);g=true}catch(j){throw{message:j.message,index:j.index,call:this.index};}if(g)return b;else throw{message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(l){return l.toCSS()}).join(", ")+")`",index:this.index};}throw{message:this.selector.toCSS().trim()+" is undefined",index:this.index};}};d.mixin.Definition=function(a,e,b){this.name=a;this.selectors=[new d.Selector([new d.Element(null,a)])];this.params=e;this.arity=e.length;this.rules=
b;this._lookups={};this.required=e.reduce(function(g,i){return i.name&&!i.value?g+1:g},0);this.parent=d.Ruleset.prototype};d.mixin.Definition.prototype={toCSS:function(){return""},variable:function(a){return this.parent.variable.call(this,a)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},eval:function(a,e){for(var b=new d.Ruleset(null,[]),g=0,i;g<this.params.length;g++)if(this.params[g].name)if(i=a&&a[g]||this.params[g].value)b.rules.unshift(new d.Rule(this.params[g].name,
i.eval(e)));else throw{message:"wrong number of arguments for "+this.name+" ("+a.length+" for "+this.arity+")"};return(new d.Ruleset(null,this.rules)).evalRules({frames:[this,b].concat(e.frames)})},match:function(a,e){var b=a&&a.length||0;if(b<this.required)return false;for(var g=0;g<Math.min(b,this.arity);g++)if(!this.params[g].name)if(!a[g].wildcard)if(a[g].eval(e).toCSS()!=this.params[g].value.eval(e).toCSS())return false;return true}}})(q("less/tree"));(function(d){d.Operation=function(a,e){this.op=
a.trim();this.operands=e};d.Operation.prototype.eval=function(a){var e=this.operands[0].eval(a);a=this.operands[1].eval(a);var b;if(e instanceof d.Dimension&&a instanceof d.Color)if(this.op==="*"||this.op==="+"){b=a;a=e;e=b}else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return e.operate(this.op,a)};d.operate=function(a,e,b){switch(a){case "+":return e+b;case "-":return e-b;case "*":return e*b;case "/":return e/b}}})(q("less/tree"));(function(d){d.Quoted=
function(a,e){this.value=a;this.content=e};d.Quoted.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Rule=function(a,e,b){this.name=a;this.value=e instanceof d.Value?e:new d.Value([e]);this.index=b;this.variable=a.charAt(0)==="@"?true:false};d.Rule.prototype.toCSS=function(a){return this.variable?"":this.name+(a.compress?":":": ")+this.value.toCSS(a)+";"};d.Rule.prototype.eval=function(a){return new d.Rule(this.name,this.value.eval(a))};
d.Shorthand=function(a,e){this.a=a;this.b=e};d.Shorthand.prototype={toCSS:function(a){return this.a.toCSS(a)+"/"+this.b.toCSS(a)},eval:function(){return this}}})(q("less/tree"));(function(d){d.Ruleset=function(a,e){this.selectors=a;this.rules=e;this._lookups={}};d.Ruleset.prototype={eval:function(){return this},evalRules:function(a){var e=[];this.rules.forEach(function(b){if(b.evalRules)e.push(b.evalRules(a));else b instanceof d.mixin.Call?Array.prototype.push.apply(e,b.eval(a)):e.push(b.eval?b.eval(a):
"")});this.rules=e;return this},match:function(a){return!a||a.length===0},variable:function(a){return this._variables?this._variables[a]:(this._variables=this.rules.reduce(function(e,b){if(b instanceof d.Rule&&b.variable===true)e[b.name]=b;return e},{}))[a]},rulesets:function(){return this._rulesets?this._rulesets:(this._rulesets=this.rules.filter(function(a){if(a instanceof d.Ruleset||a instanceof d.mixin.Definition)return a}))},find:function(a,e){e=e||this;var b=[],g=a.toCSS();if(g in this._lookups)return this._lookups[g];
this.rulesets().forEach(function(i){if(i!==e)for(var j=0;j<i.selectors.length;j++)if(a.match(i.selectors[j])){a.elements.length>1?Array.prototype.push.apply(b,i.find(new d.Selector(a.elements.slice(1)),e)):b.push(i);break}});return this._lookups[g]=b},toCSS:function(a,e){var b=[],g=[],i=[],j=[];if(this.root)for(var l=0;l<this.rules.length;l++)this.rules[l]instanceof d.Import&&Array.prototype.splice.apply(this.rules,[l,1].concat(this.rules[l].eval(e)));else if(a.length===0)j=this.selectors.map(function(s){return[s]});
else for(l=0;l<this.selectors.length;l++)for(var o=0;o<a.length;o++)j.push(a[o].concat([this.selectors[l]]));e.frames.unshift(this);for(l=0;l<this.rules.length;l++)this.rules[l]instanceof d.mixin.Call&&Array.prototype.splice.apply(this.rules,[l,1].concat(this.rules[l].eval(e)));for(l=0;l<this.rules.length;l++){a=this.rules[l];if(a instanceof d.Directive)i.push(a.eval(e).toCSS(j,e));else if(a.rules)i.push(a.toCSS(j,e));else if(a instanceof d.Comment)a.silent||(this.root?i.push(a.toCSS(e)):g.push(a.toCSS(e)));
else if(a.toCSS&&!a.variable)g.push(a.eval(e).toCSS(e));else a.value&&!a.variable&&g.push(a.value.toString())}i=i.join("");if(this.root)b.push(g.join(e.compress?"":"\n"));else if(g.length>0){j=j.map(function(s){return s.map(function(r){return r.toCSS(e)}).join("").trim()}).join(e.compress?",":j.length>3?",\n":", ");b.push(j,(e.compress?"{":" {\n ")+g.join(e.compress?"":"\n ")+(e.compress?"}":"\n}\n"))}b.push(i);e.frames.shift();return b.join("")+(e.compress?"\n":"")}}})(q("less/tree"));(function(d){d.Selector=
function(a){this.elements=a;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};d.Selector.prototype.match=function(a){return this.elements[0].value===a.elements[0].value?true:false};d.Selector.prototype.toCSS=function(a){if(this._css)return this._css;return this._css=this.elements.map(function(e){return typeof e==="string"?" "+e.trim():e.toCSS(a)}).join("")}})(q("less/tree"));(function(d){d.URL=function(a){this.value=a};d.URL.prototype={toCSS:function(){return"url("+
this.value.toCSS()+")"},eval:function(){return this}}})(q("less/tree"));(function(d){d.Value=function(a){this.value=a;this.is="value"};d.Value.prototype={eval:function(a){return this.value.length===1?this.value[0].eval(a):new d.Value(this.value.map(function(e){return e.eval(a)}))},toCSS:function(a){return this.value.map(function(e){return e.toCSS(a)}).join(a.compress?",":", ")}}})(q("less/tree"));(function(d){d.Variable=function(a,e){this.name=a;this.index=e};d.Variable.prototype={eval:function(a){var e,
b,g=this.name;if(e=d.find(a.frames,function(i){if(b=i.variable(g))return b.value.eval(a)}))return e;else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find=function(d,a){for(var e=0,b;e<d.length;e++)if(b=a.call(d,d[e]))return b;return null};var D=location.protocol==="file:";p.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||D?"development":"production";p.async=false;
p.poll=D?1E3:1500;p.watch=function(){return this.watchMode=true};p.unwatch=function(){return this.watchMode=false};if(p.env==="development"){p.optimization=0;/!watch/.test(location.hash)&&p.watch();p.watchTimer=setInterval(function(){p.watchMode&&H(function(d,a,e){d&&C(d.toCSS(),a,e.lastModified)})},p.poll)}else p.optimization=3;var v=typeof u.localStorage==="undefined"?null:u.localStorage,I=O('link[rel="stylesheet/less"]');p.refresh=function(d){H(function(a,e,b){if(b.local)x("loading "+e.href+" from cache.");
else{x("parsed "+e.href+" successfully.");C(a.toCSS(),e,b.lastModified)}},d)};p.refresh();p.Parser.importer=function(d,a,e){J({href:d,title:d},function(b){e(b)})}})(window);

View File

@ -1,5 +1,5 @@
//
// LESS - Leaner CSS v1.0.19
// LESS - Leaner CSS v1.0.20
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
@ -377,8 +377,8 @@ less.Parser = function Parser(env) {
filename: env.filename,
index: e.index,
line: line + 1,
callLine: getLine(e.call) + 1,
callExtract: lines[getLine(e.call)],
callLine: e.call && (getLine(e.call) + 1),
callExtract: lines[getLine(e.call) - 1],
stack: e.stack,
column: column,
extract: [
@ -1062,7 +1062,16 @@ less.Parser = function Parser(env) {
};
};
less.Parser.importer = null;
if (typeof(window) !== 'undefined') {
//
// Used by `@import` directives
//
less.Parser.importer = function (path, paths, callback) {
loadStyleSheet({ href: path, title: path }, function (root) {
callback(root);
});
};
}
(function (tree) {
@ -1115,28 +1124,28 @@ tree.functions = {
hsl.s += amount.value / 100;
hsl.s = clamp(hsl.s);
return this.hsl(hsl.h, hsl.s, hsl.l);
return hsla(hsl);
},
desaturate: function (color, amount) {
var hsl = color.toHSL();
hsl.s -= amount.value / 100;
hsl.s = clamp(hsl.s);
return this.hsl(hsl.h, hsl.s, hsl.l);
return hsla(hsl);
},
lighten: function (color, amount) {
var hsl = color.toHSL();
hsl.l += amount.value / 100;
hsl.l = clamp(hsl.l);
return this.hsl(hsl.h, hsl.s, hsl.l);
return hsla(hsl);
},
darken: function (color, amount) {
var hsl = color.toHSL();
hsl.l -= amount.value / 100;
hsl.l = clamp(hsl.l);
return this.hsl(hsl.h, hsl.s, hsl.l);
return hsla(hsl);
},
spin: function (color, amount) {
var hsl = color.toHSL();
@ -1144,7 +1153,7 @@ tree.functions = {
hsl.h = hue < 0 ? 360 + hue : hue;
return this.hsl(hsl.h, hsl.s, hsl.l);
return hsla(hsl);
},
greyscale: function (color) {
return this.desaturate(color, new(tree.Dimension)(100));
@ -1165,6 +1174,10 @@ tree.functions = {
}
};
function hsla(hsla) {
return tree.functions.hsla(hsla.h, hsla.s, hsla.l, hsla.a);
}
function number(n) {
if (n instanceof tree.Dimension) {
return parseFloat(n.unit == '%' ? n.value / 100 : n.value);
@ -1261,7 +1274,6 @@ tree.Color = function (rgb, a) {
//
if (Array.isArray(rgb)) {
this.rgb = rgb;
this.alpha = a;
} else if (rgb.length == 6) {
this.rgb = rgb.match(/.{2}/g).map(function (c) {
return parseInt(c, 16);
@ -1271,6 +1283,7 @@ tree.Color = function (rgb, a) {
return parseInt(c + c, 16);
});
}
this.alpha = typeof(a) === 'number' ? a : 1;
};
tree.Color.prototype = {
eval: function () { return this },
@ -1282,7 +1295,7 @@ tree.Color.prototype = {
// Values are capped between `0` and `255`, rounded and zero-padded.
//
toCSS: function () {
if (this.alpha && this.alpha < 1.0) {
if (this.alpha < 1.0) {
return "rgba(" + this.rgb.map(function (c) {
return Math.round(c);
}).concat(this.alpha).join(', ') + ")";
@ -1317,7 +1330,8 @@ tree.Color.prototype = {
toHSL: function () {
var r = this.rgb[0] / 255,
g = this.rgb[1] / 255,
b = this.rgb[2] / 255;
b = this.rgb[2] / 255,
a = this.alpha;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, l = (max + min) / 2, d = max - min;
@ -1334,7 +1348,7 @@ tree.Color.prototype = {
}
h /= 6;
}
return { h: h * 360, s: s, l: l };
return { h: h * 360, s: s, l: l, a: a };
}
};
@ -1504,6 +1518,9 @@ tree.Import = function (path, imports) {
// Only pre-compile .less files
if (! this.css) {
imports.push(this.path, function (root) {
if (! root) {
throw new(Error)("Error parsing " + that.path);
}
that.root = root;
});
}
@ -2280,13 +2297,4 @@ function error(e, href) {
}
}
//
// Used by `@import` directives
//
less.Parser.importer = function (path, paths, callback) {
loadStyleSheet({ href: path, title: path }, function (root) {
callback(root);
});
};
})(window);

60
dist/less-1.0.20.min.js vendored Normal file
View File

@ -0,0 +1,60 @@
//
// LESS - Leaner CSS v1.0.20
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
// Licensed under the Apache 2.0 License.
//
(function(u){function q(b){return u.less[b.split("/")[1]]}function O(b){if(!document.querySelectorAll&&typeof jQuery==="undefined")y("no selector method found.");else return(document.querySelectorAll||jQuery).call(document,b)}function I(b,a){for(var d=0;d<J.length;d++)K(J[d],b,a)}function K(b,a,d){var f=x&&x.getItem(b.href),e=x&&x.getItem(b.href+":timestamp"),i={css:f,timestamp:e};P(b.href,function(j,k){if(!d&&i&&(new Date(k)).valueOf()===(new Date(i.timestamp)).valueOf()){D(i.css,b);a(null,b,{local:true})}else(new o.Parser({optimization:o.optimization})).parse(j,
function(p,r){if(p)return L(p,b.href);try{a(r,b,{local:false,lastModified:k});Q(document.getElementById("less-error-message:"+b.href.replace(/[^a-z]+/gi,"-")))}catch(t){L(t,b.href)}})},function(j){throw new Error("Couldn't load "+b.href+" ("+j+")");})}function D(b,a,d){var f,e="less:"+(a.title||a.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);if((f=document.getElementById(e))===null){f=document.createElement("style");f.type="text/css";f.media="screen";f.id=e;document.getElementsByTagName("head")[0].appendChild(f)}if(f.styleSheet)try{f.styleSheet.cssText=
b}catch(i){throw new Error("Couldn't reassign styleSheet.cssText.");}else(function(j){if(f.childNodes.length>0)f.firstChild.nodeValue!==j.nodeValue&&f.replaceChild(j,f.firstChild);else f.appendChild(j)})(document.createTextNode(b));if(d&&x){y("saving "+a.href+" to cache.");x.setItem(a.href,b);x.setItem(a.href+":timestamp",d)}}function P(b,a,d){function f(j,k,p){if(j.status>=200&&j.status<300)k(j.responseText,j.getResponseHeader("Last-Modified"));else typeof p==="function"&&p(j.status)}var e=R(),i=
E?false:o.async;e.open("GET",b,i);e.send(null);if(E)e.status===0?a(e.responseText):d(e.status);else if(i)e.onreadystatechange=function(){e.readyState==4&&f(e,a,d)};else f(e,a,d)}function R(){if(u.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){y("browser doesn't support AJAX.");return null}}function Q(b){return b&&b.parentNode.removeChild(b)}function y(b){o.env=="development"&&typeof console!=="undefined"&&console.log("less: "+b)}function L(b,
a){var d="less-error-message:"+a.replace(/[^a-z]+/ig,"-");if(!b.extract)throw b;var f=document.createElement("div"),e;f.id=d;f.className="less-error-message";f.innerHTML="<h3>"+(b.message||"There is an error in your .less file")+'</h3><p><a href="'+a+'">'+a+"</a> on line "+b.line+", column "+(b.column+1)+":</p>"+'<div>\n<pre class="ctx"><span>[-1]</span>{0}</pre>\n<pre><span>[0]</span>{current}</pre>\n<pre class="ctx"><span>[1]</span>{2}</pre>\n</div>'.replace(/\[(-?\d)\]/g,function(i,j){return parseInt(b.line)+
parseInt(j)||""}).replace(/\{(\d)\}/g,function(i,j){return b.extract[parseInt(j)]||""}).replace(/\{current\}/,b.extract[1].slice(0,b.column)+'<span class="error">'+b.extract[1].slice(b.column)+"</span>");D(".less-error-message span {\nmargin-right: 15px;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message pre.ctx {\ncolor: #dd7777;\n}\n.less-error-message h3 {\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}",
{title:"error-message"});f.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(o.env=="development")e=setInterval(function(){if(document.body){document.getElementById(d)?document.body.replaceChild(f,document.getElementById(d)):document.body.insertBefore(f,document.body.firstChild);clearInterval(e)}},10)}if(!Array.isArray)Array.isArray=function(b){return Object.prototype.toString.call(b)===
"[object Array]"||b instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(b,a){for(var d=this.length>>>0,f=0;f<d;f++)f in this&&b.call(a,this[f],f,this)};if(!Array.prototype.map)Array.prototype.map=function(b,a){for(var d=this.length>>>0,f=new Array(d),e=0;e<d;e++)if(e in this)f[e]=b.call(a,this[e],e,this);return f};if(!Array.prototype.filter)Array.prototype.filter=function(b,a){for(var d=[],f=0;f<this.length;f++)b.call(a,this[f])&&d.push(this[f]);return d};if(!Array.prototype.reduce)Array.prototype.reduce=
function(b){var a=this.length>>>0,d=0;if(a===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var f=arguments[1];else{do{if(d in this){f=this[d++];break}if(++d>=a)throw new TypeError;}while(1)}for(;d<a;d++)if(d in this)f=b.call(null,f,this[d],d,this);return f};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(b,a){var d=this.length;a=a||0;if(!d)return-1;if(a>=d)return-1;if(a<0)a+=d;for(;a<d;a++)if(Object.prototype.hasOwnProperty.call(this,a))if(b===this[a])return a;return-1};
if(!Object.keys)Object.keys=function(b){var a=[];for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&a.push(d);return a};if(!String.prototype.trim)String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var o,m;if(typeof u==="undefined"){o=exports;m=q("less/tree")}else{o=u.less={};m=u.less.tree={}}o.Parser=function(b){function a(g){var h,l,n;if(g instanceof Function)return g.call(r.parsers);else if(typeof g==="string"){h=f.charAt(e)===g?g:null;l=1}else{if(e>=
p+k[i].length&&i<k.length-1)p+=k[i++].length;g.lastIndex=n=e-p;if(h=g.exec(k[i])){l=h[0].length;if(g.lastIndex-l!==n)return}}if(h){e+=l;for(l=p+k[i].length;e<=l;){g=f.charCodeAt(e);if(!(g===32||g===10||g===9))break;e++}return typeof h==="string"?h:h.length===1?h[0]:h}}function d(g){var h;if(typeof g==="string")return f.charAt(e)===g;else{g.lastIndex=e;if((h=g.exec(f))&&g.lastIndex-h[0].length===e)return h}}var f,e,i,j,k,p,r,t=this,s=function(){},M=this.imports={paths:b&&b.paths||[],queue:[],files:{},
push:function(g,h){var l=this;this.queue.push(g);o.Parser.importer(g,this.paths,function(n){l.queue.splice(l.queue.indexOf(g),1);l.files[g]=n;h(n);l.queue.length===0&&s()})}};this.env=b||{};this.optimization="optimization"in this.env?this.env.optimization:1;return r={imports:M,parse:function(g,h){var l,n,z=null;e=i=p=j=0;k=[];f=g.replace(/\r\n/g,"\n");if(t.optimization>0){f=f.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(F){return t.optimization>1?"":F.replace(/\n(\s*\n)+/g,"\n")});k=f.split(/^(?=\n)/mg)}else k=
[f];l=new m.Ruleset([],a(this.parsers.primary));l.root=true;l.toCSS=function(F){var A,B;return function(v){function G(S){return(f.slice(0,S).match(/\n/g)||"").length}v=v||{};try{var C=F.call(this,[],{frames:[],compress:v.compress||false});return v.compress?C.replace(/(\s)+/g,"$1"):C}catch(w){B=f.split("\n");A=G(w.index);v=w.index;for(C=-1;v>=0&&f.charAt(v)!=="\n";v--)C++;throw{name:"NameError",message:w.message,filename:b.filename,index:w.index,line:A+1,callLine:w.call&&G(w.call)+1,callExtract:B[G(w.call)-
1],stack:w.stack,column:C,extract:[B[A-1],B[A],B[A+1]]};}}}(l.toCSS);if(e<f.length-1){e=j;n=f.split("\n");g=(f.slice(0,e).match(/\n/g)||"").length+1;for(var H=e,N=-1;H>=0&&f.charAt(H)!=="\n";H--)N++;z={name:"ParseError",message:"Syntax Error on line "+g,filename:b.filename,line:g,column:N,extract:[n[g-2],n[g-1],n[g]]}}if(this.imports.queue.length>0)s=function(){h(z,l)};else h(z,l)},parsers:{primary:function(){for(var g,h=[];g=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||
a(this.comment)||a(/[\n\s]+/g)||a(this.directive);)h.push(g);return h},comment:function(){var g;if(f.charAt(e)==="/")if(f.charAt(e+1)==="/")return new m.Comment(a(/\/\/.*/g),true);else if(g=a(/\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/g))return new m.Comment(g)},entities:{quoted:function(){var g;if(!(f.charAt(e)!=='"'&&f.charAt(e)!=="'"))if(g=a(/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/g))return new m.Quoted(g[0],g[1]||g[2])},keyword:function(){var g;if(g=a(/[A-Za-z-]+/g))return new m.Keyword(g)},call:function(){var g,
h;if(g=a(/([\w-]+|%)\(/g)){if(g[1].toLowerCase()==="alpha")return a(this.alpha);h=a(this.entities.arguments);if(a(")"))if(g)return new m.Call(g[1],h)}},arguments:function(){for(var g=[],h;h=a(this.expression);){g.push(h);if(!a(","))break}return g},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var g;if(!(f.charAt(e)!=="u"||!a(/url\(/g))){g=a(this.entities.quoted)||a(/[-\w%@$\/.&=:;#+?]+/g);if(!a(")"))throw new Error("missing closing ) for url()");
return new m.URL(g.value?g:new m.Anonymous(g))}},variable:function(){var g,h=e;if(f.charAt(e)==="@"&&(g=a(/@[\w-]+/g)))return new m.Variable(g,h)},color:function(){var g;if(f.charAt(e)==="#"&&(g=a(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)))return new m.Color(g[1])},dimension:function(){var g;g=f.charCodeAt(e);if(!(g>57||g<45||g===47))if(g=a(/(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/g))return new m.Dimension(g[1],g[2])}},variable:function(){var g;if(f.charAt(e)==="@"&&(g=a(/(@[\w-]+)\s*:/g)))return g[1]},
shorthand:function(){var g,h;if(d(/[@\w.-]+\/[@\w.-]+/g))if((g=a(this.entity))&&a("/")&&(h=a(this.entity)))return new m.Shorthand(g,h)},mixin:{call:function(){for(var g=[],h,l,n,z=e;h=a(/[#.][\w-]+/g);){g.push(new m.Element(l,h));l=a(">")}a("(")&&(n=a(this.entities.arguments))&&a(")");if(g.length>0&&(a(";")||d("}")))return new m.mixin.Call(g,n,z)},definition:function(){var g,h=[],l,n;if(!(f.charAt(e)!=="."||d(/[^{]*(;|})/g)))if(g=a(/([#.][\w-]+)\s*\(/g)){for(g=g[1];l=a(/@[\w-]+/g)||a(this.entities.literal)||
a(this.entities.keyword);){if(l[0]==="@")if(a(":"))if(n=a(this.expression))h.push({name:l,value:n});else throw new Error("Expected value");else h.push({name:l});else h.push({value:l});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(l=a(this.block))return new m.mixin.Definition(g,h,l)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)},end:function(){return a(";")||d("}")},alpha:function(){var g;
if(a(/opacity=/gi))if(g=a(/\d+/g)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new m.Alpha(g)}},element:function(){var g;c=a(this.combinator);if(g=a(/[.#:]?[\w-]+/g)||a("*")||a(this.attribute)||a(/\([^)@]+\)/g))return new m.Element(c,g)},combinator:function(){var g;return(g=a(/[+>~]/g)||a("&")||a(/::/g))?new m.Combinator(g):new m.Combinator(f.charAt(e-1)===" "?" ":null)},selector:function(){for(var g,h=[];g=a(this.element);)h.push(g);if(h.length>0)return new m.Selector(h)},
tag:function(){return a(/[a-zA-Z][a-zA-Z-]*[0-9]?/g)||a("*")},attribute:function(){var g="",h,l,n;if(a("[")){if(h=a(/[a-z-]+/g)||a(this.entities.quoted))g=(n=a(/[|~*$^]?=/g))&&(l=a(this.entities.quoted)||a(/[\w-]+/g))?[h,n,l.toCSS?l.toCSS():l].join(""):h;if(a("]"))if(g)return"["+g+"]"}},block:function(){var g;if(a("{")&&(g=a(this.primary))&&a("}"))return g},ruleset:function(){var g=[],h,l,n=e;if(h=d(/([.#: \w-]+)[\s\n]*\{/g)){e+=h[0].length-1;g=[new m.Selector([new m.Element(null,h[1])])]}else{for(;h=
a(this.selector);){g.push(h);if(!a(","))break}h&&a(this.comment)}if(g.length>0&&(l=a(this.block)))return new m.Ruleset(g,l);else{j=e;e=n}},rule:function(){var g,h=e;if(name=a(this.property)||a(this.variable)){if(name.charAt(0)!="@"&&(match=d(/([^@+\/*(;{}-]*);/g))){e+=match[0].length-1;g=new m.Anonymous(match[1])}else g=name==="font"?a(this.font):a(this.value);if(a(this.end))return new m.Rule(name,g,h);else{j=e;e=h}}},"import":function(){var g;if(a(/@import\s+/g)&&(g=a(this.entities.quoted)||a(this.entities.url))&&
a(";"))return new m.Import(g,M)},directive:function(){var g,h,l;if(f.charAt(e)==="@")if(h=a(this["import"]))return h;else if(g=a(/@media|@page/g)){l=a(/[^{]+/g).trim();if(h=a(this.block))return new m.Directive(g+" "+l,h)}else if(g=a(/@[-a-z]+/g))if(g==="@font-face"){if(h=a(this.block))return new m.Directive(g,h)}else if((h=a(this.entity))&&a(";"))return new m.Directive(g,h)},font:function(){for(var g=[],h=[],l;l=a(this.shorthand)||a(this.entity);)h.push(l);g.push(new m.Expression(h));if(a(","))for(;l=
a(this.expression);){g.push(l);if(!a(","))break}return new m.Value(g,a(this.important))},value:function(){for(var g,h=[];g=a(this.expression);){h.push(g);if(!a(","))break}g=a(this.important);if(h.length>0)return new m.Value(h,g)},important:function(){return a(/!\s*important/g)},sub:function(){var g;if(a("(")&&(g=a(this.expression))&&a(")"))return g},multiplication:function(){var g,h,l,n;if(g=a(this.operand)){for(;(l=a(/[\/*]/g))&&(h=a(this.operand));)n=new m.Operation(l,[n||g,h]);return n||g}},addition:function(){var g,
h,l,n;if(g=a(this.multiplication)){for(;(l=a(/[-+]\s+/g)||f.charAt(e-1)!=" "&&a(/[-+]/g))&&(h=a(this.multiplication));)n=new m.Operation(l,[n||g,h]);return n||g}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)},expression:function(){for(var g,h=[];g=a(this.addition)||a(this.entity);)h.push(g);if(h.length>0)return new m.Expression(h)},property:function(){var g;if(g=a(/(\*?-?[-a-z_0-9]+)\s*:/g))return g[1]}}}};if(typeof u!=="undefined")o.Parser.importer=
function(b,a,d){K({href:b,title:b},function(f){d(f)})};(function(b){function a(e){return b.functions.hsla(e.h,e.s,e.l,e.a)}function d(e){if(e instanceof b.Dimension)return parseFloat(e.unit=="%"?e.value/100:e.value);else if(typeof e==="number")return e;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function f(e){return Math.min(1,Math.max(0,e))}b.functions={rgb:function(e,i,j){return this.rgba(e,i,j,1)},rgba:function(e,i,j,k){e=[e,i,j].map(function(p){return d(p)});
k=d(k);return new b.Color(e,k)},hsl:function(e,i,j){return this.hsla(e,i,j,1)},hsla:function(e,i,j,k){function p(s){s=s<0?s+1:s>1?s-1:s;return s*6<1?t+(r-t)*s*6:s*2<1?r:s*3<2?t+(r-t)*(2/3-s)*6:t}e=d(e)%360/360;i=d(i);j=d(j);k=d(k);var r=j<=0.5?j*(i+1):j+i-j*i,t=j*2-r;return this.rgba(p(e+1/3)*255,p(e)*255,p(e-1/3)*255,k)},hue:function(e){return new b.Dimension(Math.round(e.toHSL().h))},saturation:function(e){return new b.Dimension(Math.round(e.toHSL().s*100),"%")},lightness:function(e){return new b.Dimension(Math.round(e.toHSL().l*
100),"%")},alpha:function(e){return new b.Dimension(e.toHSL().a)},saturate:function(e,i){e=e.toHSL();e.s+=i.value/100;e.s=f(e.s);return a(e)},desaturate:function(e,i){e=e.toHSL();e.s-=i.value/100;e.s=f(e.s);return a(e)},lighten:function(e,i){e=e.toHSL();e.l+=i.value/100;e.l=f(e.l);return a(e)},darken:function(e,i){e=e.toHSL();e.l-=i.value/100;e.l=f(e.l);return a(e)},spin:function(e,i){e=e.toHSL();i=(e.h+i.value)%360;e.h=i<0?360+i:i;return a(e)},greyscale:function(e){return this.desaturate(e,new b.Dimension(100))},
e:function(e){return new b.Anonymous(e)},"%":function(e){for(var i=Array.prototype.slice.call(arguments,1),j=e.content,k=0;k<i.length;k++)j=j.replace(/%s/,i[k].content).replace(/%[da]/,i[k].toCSS());j=j.replace(/%%/g,"%");return new b.Quoted('"'+j+'"',j)}}})(q("less/tree"));(function(b){b.Alpha=function(a){this.value=a};b.Alpha.prototype={toCSS:function(){return"alpha(opacity="+this.value.toCSS()+")"},eval:function(){return this}}})(q("less/tree"));(function(b){b.Anonymous=function(a){this.value=
a.content||a};b.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(b){b.Call=function(a,d){this.name=a;this.args=d};b.Call.prototype={eval:function(a){var d=this.args.map(function(f){return f.eval(a)});return this.name in b.functions?b.functions[this.name].apply(b.functions,d):new b.Anonymous(this.name+"("+d.map(function(f){return f.toCSS()}).join(", ")+")")},toCSS:function(a){return this.eval(a).toCSS()}}})(q("less/tree"));(function(b){b.Color=
function(a,d){this.rgb=Array.isArray(a)?a:a.length==6?a.match(/.{2}/g).map(function(f){return parseInt(f,16)}):a.split("").map(function(f){return parseInt(f+f,16)});this.alpha=typeof d==="number"?d:1};b.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){a=Math.round(a);a=(a>255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},operate:function(a,
d){var f=[];d instanceof b.Color||(d=d.toColor());for(var e=0;e<3;e++)f[e]=b.operate(a,this.rgb[e],d.rgb[e]);return new b.Color(f)},toHSL:function(){var a=this.rgb[0]/255,d=this.rgb[1]/255,f=this.rgb[2]/255,e=this.alpha,i=Math.max(a,d,f),j=Math.min(a,d,f),k,p=(i+j)/2,r=i-j;if(i===j)k=j=0;else{j=p>0.5?r/(2-i-j):r/(i+j);switch(i){case a:k=(d-f)/r+(d<f?6:0);break;case d:k=(f-a)/r+2;break;case f:k=(a-d)/r+4;break}k/=6}return{h:k*360,s:j,l:p,a:e}}}})(q("less/tree"));(function(b){b.Comment=function(a,d){this.value=
a;this.silent=!!d};b.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}})(q("less/tree"));(function(b){b.Dimension=function(a,d){this.value=parseFloat(a);this.unit=d||null};b.Dimension.prototype={eval:function(){return this},toColor:function(){return new b.Color([this.value,this.value,this.value])},toCSS:function(){return this.value+this.unit},operate:function(a,d){return new b.Dimension(b.operate(a,this.value,d.value),this.unit||d.unit)}}})(q("less/tree"));
(function(b){b.Directive=function(a,d){this.name=a;if(Array.isArray(d))this.ruleset=new b.Ruleset([],d);else this.value=d};b.Directive.prototype={toCSS:function(a,d){if(this.ruleset){this.ruleset.root=true;return this.name+(d.compress?"{":" {\n ")+this.ruleset.toCSS(a,d).trim().replace(/\n/g,"\n ")+(d.compress?"}":"\n}\n")}else return this.name+" "+this.value.toCSS()+";\n"},eval:function(a){a.frames.unshift(this);this.ruleset&&this.ruleset.evalRules(a);a.frames.shift();return this},variable:function(a){return b.Ruleset.prototype.variable.call(this.ruleset,
a)},find:function(){return b.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return b.Ruleset.prototype.rulesets.apply(this.ruleset)}}})(q("less/tree"));(function(b){b.Element=function(a,d){this.combinator=a instanceof b.Combinator?a:new b.Combinator(a);this.value=d.trim()};b.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+this.value};b.Combinator=function(a){this.value=a===" "?" ":a?a.trim():""};b.Combinator.prototype.toCSS=function(a){return{"":"",
" ":" ","&":"",":":" :","::":"::","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}})(q("less/tree"));(function(b){b.Expression=function(a){this.value=a};b.Expression.prototype={eval:function(a){return this.value.length>1?new b.Expression(this.value.map(function(d){return d.eval(a)})):this.value[0].eval(a)},toCSS:function(){return this.value.map(function(a){return a.toCSS()}).join(" ")}}})(q("less/tree"));(function(b){b.Import=function(a,d){var f=this;this._path=
a;this.path=a instanceof b.Quoted?/\.(le?|c)ss$/.test(a.content)?a.content:a.content+".less":a.value.content||a.value;(this.css=/css$/.test(this.path))||d.push(this.path,function(e){if(!e)throw new Error("Error parsing "+f.path);f.root=e})};b.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(){if(this.css)return this;else{for(var a=0;a<this.root.rules.length;a++)this.root.rules[a]instanceof b.Import&&Array.prototype.splice.apply(this.root.rules,
[a,1].concat(this.root.rules[a].eval()));return this.root.rules}}}})(q("less/tree"));(function(b){b.Keyword=function(a){this.value=a};b.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value}}})(q("less/tree"));(function(b){b.mixin={};b.mixin.Call=function(a,d,f){this.selector=new b.Selector(a);this.arguments=d;this.index=f};b.mixin.Call.prototype={eval:function(a){for(var d,f=[],e=false,i=0;i<a.frames.length;i++)if((d=a.frames[i].find(this.selector)).length>0){for(i=0;i<
d.length;i++)if(d[i].match(this.arguments,a))try{Array.prototype.push.apply(f,d[i].eval(this.arguments,a).rules);e=true}catch(j){throw{message:j.message,index:j.index,call:this.index};}if(e)return f;else throw{message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(k){return k.toCSS()}).join(", ")+")`",index:this.index};}throw{message:this.selector.toCSS().trim()+" is undefined",index:this.index};}};b.mixin.Definition=function(a,d,f){this.name=
a;this.selectors=[new b.Selector([new b.Element(null,a)])];this.params=d;this.arity=d.length;this.rules=f;this._lookups={};this.required=d.reduce(function(e,i){return i.name&&!i.value?e+1:e},0);this.parent=b.Ruleset.prototype};b.mixin.Definition.prototype={toCSS:function(){return""},variable:function(a){return this.parent.variable.call(this,a)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},eval:function(a,d){for(var f=new b.Ruleset(null,
[]),e=0,i;e<this.params.length;e++)if(this.params[e].name)if(i=a&&a[e]||this.params[e].value)f.rules.unshift(new b.Rule(this.params[e].name,i.eval(d)));else throw{message:"wrong number of arguments for "+this.name+" ("+a.length+" for "+this.arity+")"};return(new b.Ruleset(null,this.rules)).evalRules({frames:[this,f].concat(d.frames)})},match:function(a,d){var f=a&&a.length||0;if(f<this.required)return false;for(var e=0;e<Math.min(f,this.arity);e++)if(!this.params[e].name)if(!a[e].wildcard)if(a[e].eval(d).toCSS()!=
this.params[e].value.eval(d).toCSS())return false;return true}}})(q("less/tree"));(function(b){b.Operation=function(a,d){this.op=a.trim();this.operands=d};b.Operation.prototype.eval=function(a){var d=this.operands[0].eval(a);a=this.operands[1].eval(a);var f;if(d instanceof b.Dimension&&a instanceof b.Color)if(this.op==="*"||this.op==="+"){f=a;a=d;d=f}else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return d.operate(this.op,a)};b.operate=function(a,d,f){switch(a){case "+":return d+
f;case "-":return d-f;case "*":return d*f;case "/":return d/f}}})(q("less/tree"));(function(b){b.Quoted=function(a,d){this.value=a;this.content=d};b.Quoted.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(b){b.Rule=function(a,d,f){this.name=a;this.value=d instanceof b.Value?d:new b.Value([d]);this.index=f;this.variable=a.charAt(0)==="@"?true:false};b.Rule.prototype.toCSS=function(a){return this.variable?"":this.name+(a.compress?":":": ")+this.value.toCSS(a)+
";"};b.Rule.prototype.eval=function(a){return new b.Rule(this.name,this.value.eval(a))};b.Shorthand=function(a,d){this.a=a;this.b=d};b.Shorthand.prototype={toCSS:function(a){return this.a.toCSS(a)+"/"+this.b.toCSS(a)},eval:function(){return this}}})(q("less/tree"));(function(b){b.Ruleset=function(a,d){this.selectors=a;this.rules=d;this._lookups={}};b.Ruleset.prototype={eval:function(){return this},evalRules:function(a){var d=[];this.rules.forEach(function(f){if(f.evalRules)d.push(f.evalRules(a));
else f instanceof b.mixin.Call?Array.prototype.push.apply(d,f.eval(a)):d.push(f.eval?f.eval(a):"")});this.rules=d;return this},match:function(a){return!a||a.length===0},variable:function(a){return this._variables?this._variables[a]:(this._variables=this.rules.reduce(function(d,f){if(f instanceof b.Rule&&f.variable===true)d[f.name]=f;return d},{}))[a]},rulesets:function(){return this._rulesets?this._rulesets:(this._rulesets=this.rules.filter(function(a){if(a instanceof b.Ruleset||a instanceof b.mixin.Definition)return a}))},
find:function(a,d){d=d||this;var f=[],e=a.toCSS();if(e in this._lookups)return this._lookups[e];this.rulesets().forEach(function(i){if(i!==d)for(var j=0;j<i.selectors.length;j++)if(a.match(i.selectors[j])){a.elements.length>1?Array.prototype.push.apply(f,i.find(new b.Selector(a.elements.slice(1)),d)):f.push(i);break}});return this._lookups[e]=f},toCSS:function(a,d){var f=[],e=[],i=[],j=[];if(this.root)for(var k=0;k<this.rules.length;k++)this.rules[k]instanceof b.Import&&Array.prototype.splice.apply(this.rules,
[k,1].concat(this.rules[k].eval(d)));else if(a.length===0)j=this.selectors.map(function(r){return[r]});else for(k=0;k<this.selectors.length;k++)for(var p=0;p<a.length;p++)j.push(a[p].concat([this.selectors[k]]));d.frames.unshift(this);for(k=0;k<this.rules.length;k++)this.rules[k]instanceof b.mixin.Call&&Array.prototype.splice.apply(this.rules,[k,1].concat(this.rules[k].eval(d)));for(k=0;k<this.rules.length;k++){a=this.rules[k];if(a instanceof b.Directive)i.push(a.eval(d).toCSS(j,d));else if(a.rules)i.push(a.toCSS(j,
d));else if(a instanceof b.Comment)a.silent||(this.root?i.push(a.toCSS(d)):e.push(a.toCSS(d)));else if(a.toCSS&&!a.variable)e.push(a.eval(d).toCSS(d));else a.value&&!a.variable&&e.push(a.value.toString())}i=i.join("");if(this.root)f.push(e.join(d.compress?"":"\n"));else if(e.length>0){j=j.map(function(r){return r.map(function(t){return t.toCSS(d)}).join("").trim()}).join(d.compress?",":j.length>3?",\n":", ");f.push(j,(d.compress?"{":" {\n ")+e.join(d.compress?"":"\n ")+(d.compress?"}":"\n}\n"))}f.push(i);
d.frames.shift();return f.join("")+(d.compress?"\n":"")}}})(q("less/tree"));(function(b){b.Selector=function(a){this.elements=a;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};b.Selector.prototype.match=function(a){return this.elements[0].value===a.elements[0].value?true:false};b.Selector.prototype.toCSS=function(a){if(this._css)return this._css;return this._css=this.elements.map(function(d){return typeof d==="string"?" "+d.trim():d.toCSS(a)}).join("")}})(q("less/tree"));
(function(b){b.URL=function(a){this.value=a};b.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(){return this}}})(q("less/tree"));(function(b){b.Value=function(a){this.value=a;this.is="value"};b.Value.prototype={eval:function(a){return this.value.length===1?this.value[0].eval(a):new b.Value(this.value.map(function(d){return d.eval(a)}))},toCSS:function(a){return this.value.map(function(d){return d.toCSS(a)}).join(a.compress?",":", ")}}})(q("less/tree"));(function(b){b.Variable=
function(a,d){this.name=a;this.index=d};b.Variable.prototype={eval:function(a){var d,f,e=this.name;if(d=b.find(a.frames,function(i){if(f=i.variable(e))return f.value.eval(a)}))return d;else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find=function(b,a){for(var d=0,f;d<b.length;d++)if(f=a.call(b,b[d]))return f;return null};var E=location.protocol==="file:";o.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname==
"localhost"||location.port.length>0||E?"development":"production";o.async=false;o.poll=E?1E3:1500;o.watch=function(){return this.watchMode=true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization=0;/!watch/.test(location.hash)&&o.watch();o.watchTimer=setInterval(function(){o.watchMode&&I(function(b,a,d){b&&D(b.toCSS(),a,d.lastModified)})},o.poll)}else o.optimization=3;var x=typeof u.localStorage==="undefined"?null:u.localStorage,J=O('link[rel="stylesheet/less"]');
o.refresh=function(b){I(function(a,d,f){if(f.local)y("loading "+d.href+" from cache.");else{y("parsed "+d.href+" successfully.");D(a.toCSS(),d,f.lastModified)}},b)};o.refresh()})(window);