From dbc0e408beb0f3e816f10bfc5485ece7caf355e0 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 15 Jun 2010 14:53:44 -0400 Subject: [PATCH] (dist) build 1.0.16 --- dist/{less-1.0.15.js => less-1.0.16.js} | 52 +++++++++++-------- ...{less-1.0.15.min.js => less-1.0.16.min.js} | 34 ++++++------ 2 files changed, 48 insertions(+), 38 deletions(-) rename dist/{less-1.0.15.js => less-1.0.16.js} (98%) rename dist/{less-1.0.15.min.js => less-1.0.16.min.js} (78%) diff --git a/dist/less-1.0.15.js b/dist/less-1.0.16.js similarity index 98% rename from dist/less-1.0.15.js rename to dist/less-1.0.16.js index 46f3b99..4ce1ef2 100644 --- a/dist/less-1.0.15.js +++ b/dist/less-1.0.16.js @@ -1,5 +1,5 @@ // -// LESS - Leaner CSS v1.0.15 +// LESS - Leaner CSS v1.0.16 // http://lesscss.org // // Copyright (c) 2010, Alexis Sellier @@ -1914,11 +1914,13 @@ tree.find = function (obj, fun) { }; (function () { +var isFileProtocol = location.protocol === 'file:'; + less.env = location.hostname == '127.0.0.1' || location.hostname == '0.0.0.0' || location.hostname == 'localhost' || - location.protocol == 'file:' || - location.port.length > 0 ? 'development' + location.port.length > 0 || + isFileProtocol ? 'development' : 'production'; // Load styles asynchronously (default: false) @@ -1930,7 +1932,7 @@ less.env = location.hostname == '127.0.0.1' || less.async = false; // Interval between watch polls -less.poll = location.protocol == 'file:' ? 1000 : 1500; +less.poll = isFileProtocol ? 1000 : 1500; // // Watch mode @@ -1957,6 +1959,7 @@ if (less.env === 'development') { less.optimization = 3; } +var cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; // // Select all links with the 'rel' attribute set to "less" @@ -1991,8 +1994,8 @@ function loadStyleSheets(callback, async) { } function loadStyleSheet(sheet, callback, async) { - var css = typeof(localStorage) !== "undefined" && localStorage.getItem(sheet.href); - var timestamp = typeof(localStorage) !== "undefined" && localStorage.getItem(sheet.href + ':timestamp'); + var css = cache && cache.getItem(sheet.href); + var timestamp = cache && cache.getItem(sheet.href + ':timestamp'); var styles = { css: css, timestamp: timestamp }; xhr(sheet.href, async, function (data, lastModified) { @@ -2054,36 +2057,43 @@ function createCSS(styles, sheet, lastModified) { } // Don't update the local store if the file wasn't modified - if (lastModified && typeof(localStorage) !== "undefined") { - localStorage.setItem(sheet.href, styles); - localStorage.setItem(sheet.href + ':timestamp', lastModified); + if (lastModified && cache) { + cache.setItem(sheet.href, styles); + cache.setItem(sheet.href + ':timestamp', lastModified); } } function xhr(url, async, callback, errback) { var xhr = getXMLHttpRequest(); - if (window.location.protocol === "file:") { - xhr.open('GET', url, false); - xhr.send(null); + async = isFileProtocol ? false : (async || less.async); + + xhr.open('GET', url, async); + xhr.send(null); + + if (isFileProtocol) { if (xhr.status === 0) { callback(xhr.responseText); } else { errback(xhr.status); } - } else { - xhr.open('GET', url, async || less.async); + } else if (async) { xhr.onreadystatechange = function () { if (xhr.readyState == 4) { - if (xhr.status >= 200 && xhr.status < 300) { - callback(xhr.responseText, - xhr.getResponseHeader("Last-Modified")); - } else if (typeof(errback) === 'function') { - errback(xhr.status); - } + handleResponse(xhr, callback, errback); } }; - xhr.send(null); + } else { + handleResponse(xhr, callback, errback); + } + + function handleResponse(xhr, callback, errback) { + if (xhr.status >= 200 && xhr.status < 300) { + callback(xhr.responseText, + xhr.getResponseHeader("Last-Modified")); + } else if (typeof(errback) === 'function') { + errback(xhr.status); + } } } diff --git a/dist/less-1.0.15.min.js b/dist/less-1.0.16.min.js similarity index 78% rename from dist/less-1.0.15.min.js rename to dist/less-1.0.16.min.js index 7afffaf..ac6c65f 100644 --- a/dist/less-1.0.15.min.js +++ b/dist/less-1.0.16.min.js @@ -1,5 +1,5 @@ // -// LESS - Leaner CSS v1.0.15 +// LESS - Leaner CSS v1.0.16 // http://lesscss.org // // Copyright (c) 2010, Alexis Sellier @@ -9,19 +9,19 @@ if(!Array.isArray)Array.isArray=function(b){return Object.prototype.toString.cal if(!Array.prototype.filter)Array.prototype.filter=function(b,a){for(var e=[],f=0;f>>0,e=0;if(a===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var f=arguments[1];else{do{if(e in this){f=this[e++];break}if(++e>=a)throw new TypeError;}while(1)}for(;e=e)return-1;if(a<0)a+=e;for(;a=q+m[n].length&&n0){f=f.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(v){return j.optimization>1?"":v.replace(/\n(\s*\n)+/g,"\n")});m=f.split(/^(?=\n)/mg)}else m=[f];i=new tree.Ruleset([],a(this.parsers.primary));i.root=true;i.toCSS=function(v){var w,y;return function(s){s=s||{};try{var x=v.call(this,[],{frames:[],compress:s.compress||false});return s.compress?x.replace(/(\s)+/g,"$1"):x}catch(z){y=f.split("\n");w=(f.slice(0,z.index).match(/\n/g)||"").length+1;s=z.index; -for(x=-1;s>=0&&f.charAt(s)!=="\n";s--)x++;throw{name:"NameError",message:z.message,line:w,stack:z.stack,column:x,extract:[y[w-2],y[w-1],y[w]]};}}}(i.toCSS);if(h=0&&f.charAt(u)!=="\n";u--)A++;r={name:"ParseError",message:"Syntax Error on line "+d,filename:b.filename,line:d,column:A,extract:[k[d-2],k[d-1],k[d]]}}if(this.imports.queue.length>0)o=function(){g(r,i)};else g(r,i)},parsers:{primary:function(){for(var d, +less.Parser=function(b){function a(d){var g,i,k;if(d instanceof Function)return d.call(s.parsers);else if(typeof d==="string"){g=f.charAt(h)===d?d:null;i=1}else{if(h>=q+m[n].length&&n0){f=f.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(t){return r.optimization>1?"":t.replace(/\n(\s*\n)+/g,"\n")});m=f.split(/^(?=\n)/mg)}else m=[f];i=new tree.Ruleset([],a(this.parsers.primary));i.root=true;i.toCSS=function(t){var v,x;return function(u){u=u||{};try{var z=t.call(this,[],{frames:[],compress:u.compress||false});return u.compress?z.replace(/(\s)+/g,"$1"):z}catch(A){x=f.split("\n");v=(f.slice(0,A.index).match(/\n/g)||"").length+1;u=A.index; +for(z=-1;u>=0&&f.charAt(u)!=="\n";u--)z++;throw{name:"NameError",message:A.message,line:v,stack:A.stack,column:z,extract:[x[v-2],x[v-1],x[v]]};}}}(i.toCSS);if(h=0&&f.charAt(p)!=="\n";p--)w++;o={name:"ParseError",message:"Syntax Error on line "+d,filename:b.filename,line:d,column:w,extract:[k[d-2],k[d-1],k[d]]}}if(this.imports.queue.length>0)y=function(){g(o,i)};else g(o,i)},parsers:{primary:function(){for(var d, g=[];d=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||a(/[\n\s]+/g)||a(this.directive);)g.push(d);return g},comment:function(){var d;if(f.charAt(h)==="/")return(d=a(/\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/g))?new tree.Comment(d):a(/\/\/.*/g)},entities:{quoted:function(){var d;if(!(f.charAt(h)!=='"'&&f.charAt(h)!=="'"))if(d=a(/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/g))return new tree.Quoted(d[0],d[1]||d[2])},keyword:function(){var d;if(d=a(/[A-Za-z-]+/g))return new tree.Keyword(d)}, call:function(){var d,g;if(d=a(/([a-zA-Z0-9_-]+|%)\(/g)){if(d[1].toLowerCase()==="alpha")return a(this.alpha);g=a(this.entities.arguments);if(a(")"))if(d)return new tree.Call(d[1],g)}},arguments:function(){for(var d=[],g;g=a(this.expression);){d.push(g);if(!a(","))break}return d},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var d;if(!(f.charAt(h)!=="u"||!a(/url\(/g))){d=a(this.entities.quoted)||a(/[-a-zA-Z0-9_%@$\/.&=:;#+?]+/g); if(!a(")"))throw new Error("missing closing ) for url()");return new tree.URL(d.value?d:new tree.Anonymous(d))}},variable:function(){var d,g=h;if(f.charAt(h)==="@"&&(d=a(/@[a-zA-Z0-9_-]+/g)))return new tree.Variable(d,g)},color:function(){var d;if(f.charAt(h)==="#"&&(d=a(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)))return new tree.Color(d[1])},dimension:function(){var d;d=f.charCodeAt(h);if(!(d>57||d<45||d===47))if(d=a(/(-?[0-9]*\.?[0-9]+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/g))return new tree.Dimension(d[1], -d[2])}},variable:function(){var d;if(f.charAt(h)==="@"&&(d=a(/(@[a-zA-Z0-9_-]+)\s*:/g)))return d[1]},shorthand:function(){var d,g;if(e(/[@\w.-]+\/[@\w.-]+/g))if((d=a(this.entity))&&a("/")&&(g=a(this.entity)))return new tree.Shorthand(d,g)},mixin:{call:function(){for(var d=[],g,i,k,r=h;g=a(/[#.][a-zA-Z0-9_-]+/g);){d.push(new tree.Element(i,g));i=a(">")}a("(")&&(k=a(this.entities.arguments))&&a(")");if(d.length>0&&(a(";")||e("}")))return new tree.mixin.Call(d,k,r)},definition:function(){var d,g=[], +d[2])}},variable:function(){var d;if(f.charAt(h)==="@"&&(d=a(/(@[a-zA-Z0-9_-]+)\s*:/g)))return d[1]},shorthand:function(){var d,g;if(e(/[@\w.-]+\/[@\w.-]+/g))if((d=a(this.entity))&&a("/")&&(g=a(this.entity)))return new tree.Shorthand(d,g)},mixin:{call:function(){for(var d=[],g,i,k,o=h;g=a(/[#.][a-zA-Z0-9_-]+/g);){d.push(new tree.Element(i,g));i=a(">")}a("(")&&(k=a(this.entities.arguments))&&a(")");if(d.length>0&&(a(";")||e("}")))return new tree.mixin.Call(d,k,o)},definition:function(){var d,g=[], i,k;if(!(f.charAt(h)!=="."||e(/[^{]*(;|})/g)))if(d=a(/([#.][a-zA-Z0-9_-]+)\s*\(/g)){for(d=d[1];i=a(/@[\w-]+/g)||a(this.entities.literal)||a(this.entities.keyword);){if(i[0]==="@")if(a(":"))if(k=a(this.expression))g.push({name:i,value:k});else throw new Error("Expected value");else g.push({name:i});else g.push({value:i});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(i=a(this.block))return new tree.mixin.Definition(d,g,i)}}},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 d;if(a(/opacity=/gi))if(d=a(/[0-9]+/g)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new tree.Alpha(d)}},element:function(){var d;c=a(this.combinator);if(d=a(/[.#:]?[a-zA-Z0-9_-]+/g)||a("*")||a(this.attribute)||a(/\([^)@]+\)/g))return new tree.Element(c,d)},combinator:function(){var d;return(d=a(/[+>~]/g)||a("&")||a(/::/g))? new tree.Combinator(d):new tree.Combinator(f.charAt(h-1)===" "?" ":null)},selector:function(){for(var d,g=[];d=a(this.element);)g.push(d);if(g.length>0)return new tree.Selector(g)},tag:function(){return a(/[a-zA-Z][a-zA-Z-]*[0-9]?/g)||a("*")},attribute:function(){var d="",g,i,k;if(a("[")){if(g=a(/[a-z-]+/g)||a(this.entities.quoted))d=(k=a(/[|~*$^]?=/g))&&(i=a(this.entities.quoted)||a(/[\w-]+/g))?[g,k,i.toCSS?i.toCSS():i].join(""):g;if(a("]"))if(d)return"["+d+"]"}},block:function(){var d;if(a("{")&& (d=a(this.primary))&&a("}"))return d},ruleset:function(){var d=[],g,i,k=h;if(g=e(/([a-z.#: _-]+)[\s\n]*\{/g)){h+=g[0].length-1;d=[new tree.Selector([new tree.Element(null,g[1])])]}else{for(;g=a(this.selector);){d.push(g);if(!a(","))break}g&&a(this.comment)}if(d.length>0&&(i=a(this.block)))return new tree.Ruleset(d,i);else{l=h;h=k}},rule:function(){var d,g=h;if(name=a(this.property)||a(this.variable)){if(name.charAt(0)!="@"&&(match=e(/([^@+\/*(;{}-]*);/g))){h+=match[0].length-1;d=new tree.Anonymous(match[1])}else d= -name==="font"?a(this.font):a(this.value);if(a(this.end))return new tree.Rule(name,d,g);else{l=h;h=g}}},"import":function(){var d;if(a(/@import\s+/g)&&(d=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new tree.Import(d,p)},directive:function(){var d,g,i;if(f.charAt(h)==="@")if(g=a(this["import"]))return g;else if(d=a(/@media|@page/g)){i=a(/[^{]+/g).trim();if(g=a(this.block))return new tree.Directive(d+" "+i,g)}else if(d=a(/@[-a-z]+/g))if(d==="@font-face"){if(g=a(this.block))return new tree.Directive(d, +name==="font"?a(this.font):a(this.value);if(a(this.end))return new tree.Rule(name,d,g);else{l=h;h=g}}},"import":function(){var d;if(a(/@import\s+/g)&&(d=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new tree.Import(d,j)},directive:function(){var d,g,i;if(f.charAt(h)==="@")if(g=a(this["import"]))return g;else if(d=a(/@media|@page/g)){i=a(/[^{]+/g).trim();if(g=a(this.block))return new tree.Directive(d+" "+i,g)}else if(d=a(/@[-a-z]+/g))if(d==="@font-face"){if(g=a(this.block))return new tree.Directive(d, g)}else if((g=a(this.entity))&&a(";"))return new tree.Directive(d,g)},font:function(){for(var d=[],g=[],i;i=a(this.shorthand)||a(this.entity);)g.push(i);d.push(new tree.Expression(g));if(a(","))for(;i=a(this.expression);){d.push(i);if(!a(","))break}return new tree.Value(d,a(this.important))},value:function(){for(var d,g=[];d=a(this.expression);){g.push(d);if(!a(","))break}d=a(this.important);if(g.length>0)return new tree.Value(g,d)},important:function(){return a(/!\s*important/g)},sub:function(){var d; if(a("(")&&(d=a(this.expression))&&a(")"))return d},multiplication:function(){var d,g,i,k;if(d=a(this.operand)){for(;(i=a(/[\/*]/g))&&(g=a(this.operand));)k=new tree.Operation(i,[k||d,g]);return k||d}},addition:function(){var d,g,i,k;if(d=a(this.multiplication)){for(;(i=a(/[-+]\s+/g)||f.charAt(h-1)!=" "&&a(/[-+]/g))&&(g=a(this.multiplication));)k=new tree.Operation(i,[k||d,g]);return k||d}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)}, expression:function(){for(var d,g=[];d=a(this.addition)||a(this.entity);)g.push(d);if(g.length>0)return new tree.Expression(g)},property:function(){var d;if(d=a(/(\*?-?[-a-z_0-9]+)\s*:/g))return d[1]}}}};less.Parser.importer=null;if(typeof require!=="undefined")tree=require("less/tree"); @@ -52,16 +52,16 @@ tree.Shorthand.prototype={toCSS:function(b){return this.a.toCSS(b)+"/"+this.b.to tree.Ruleset.prototype={eval:function(){return this},evalRules:function(b){var a=[];this.rules.forEach(function(e){if(e.evalRules)a.push(e.evalRules(b));else e instanceof tree.mixin.Call?Array.prototype.push.apply(a,e.eval(b)):a.push(e.eval(b))});this.rules=a;return this},match:function(b){return!b||b.length===0},variable:function(b){return this._variables?this._variables[b]:(this._variables=this.rules.reduce(function(a,e){if(e instanceof tree.Rule&&e.variable===true)a[e.name]=e;return a},{}))[b]}, rulesets:function(){return this._rulesets?this._rulesets:(this._rulesets=this.rules.filter(function(b){if(b instanceof tree.Ruleset||b instanceof tree.mixin.Definition)return b}))},find:function(b,a){a=a||this;var e=[],f=b.toCSS();if(f in this._lookups)return this._lookups[f];this.rulesets().forEach(function(h){if(h!==a)for(var n=0;n1?Array.prototype.push.apply(e,h.find(new tree.Selector(b.elements.slice(1)),a)):e.push(h);break}}); return this._lookups[f]=e},toCSS:function(b,a){var e=[],f=[],h=[],n=[];if(this.root)for(var l=0;l0){n=n.map(function(q){return q.map(function(t){return t.toCSS(a)}).join("").trim()}).join(a.compress? +Array.prototype.splice.apply(this.rules,[l,1].concat(this.rules[l].eval(a)));for(l=0;l0){n=n.map(function(q){return q.map(function(s){return s.toCSS(a)}).join("").trim()}).join(a.compress? ",":n.length>3?",\n":", ");e.push(n,(a.compress?"{":" {\n ")+f.join(a.compress?"":"\n ")+(a.compress?"}":"\n}\n"))}e.push(h);a.frames.shift();return e.join("")+(a.compress?"\n":"")}};if(typeof require!=="undefined")tree=require("less/tree");tree.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};tree.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false}; tree.Selector.prototype.toCSS=function(b){if(this._css)return this._css;return this._css=this.elements.map(function(a){return typeof a==="string"?" "+a.trim():a.toCSS(b)}).join("")};if(typeof require!=="undefined")tree=require("less/tree");tree.URL=function(b){this.value=b};tree.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(){return this}};if(typeof require!=="undefined")tree=require("less/tree");tree.Variable=function(b,a){this.name=b;this.index=a}; tree.Variable.prototype={eval:function(b){var a,e,f=this.name;if(a=tree.find(b.frames,function(h){if(e=h.variable(f))return e.value.eval(b)}))return a;else throw{message:"variable "+this.name+" is undefined",index:this.index};}};if(typeof require!=="undefined")tree=exports;tree.find=function(b,a){for(var e=0,f;e0)d.firstChild.nodeValue!==k.nodeValue&&d.replaceChild(k,d.firstChild);else d.appendChild(k)})(document.createTextNode(j));if(p&&typeof localStorage!=="undefined"){localStorage.setItem(o.href,j);localStorage.setItem(o.href+":timestamp",p)}}function h(j, -o,p,d){var g=n();if(window.location.protocol==="file:"){g.open("GET",j,false);g.send(null);g.status===0?p(g.responseText):d(g.status)}else{g.open("GET",j,o||less.async);g.onreadystatechange=function(){if(g.readyState==4)if(g.status>=200&&g.status<300)p(g.responseText,g.getResponseHeader("Last-Modified"));else typeof d==="function"&&d(g.status)};g.send(null)}}function n(){if(window.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(j){m("less: browser doesn't support AJAX."); -return null}}function l(j){return j&&j.parentNode.removeChild(j)}function m(j){less.env=="development"&&typeof console!=="undefined"&&console.log(j)}function q(j,o){var p="less-error-message:"+o.replace(/[^a-z]+/ig,"-");if(!j.extract)throw j;var d=document.createElement("div"),g;d.id=p;d.className="less-error-message";d.innerHTML="

"+(j.message||"There is an error in your .less file")+'

'+o+" on line "+j.line+", column "+(j.column+1)+":

"+'
\n
[-1]{0}
\n
[0]{current}
\n
[1]{2}
\n
'.replace(/\[(-?\d)\]/g, -function(i,k){return parseInt(j.line)+parseInt(k)||""}).replace(/\{(\d)\}/g,function(i,k){return j.extract[parseInt(k)]||""}).replace(/\{current\}/,j.extract[1].slice(0,j.column)+''+j.extract[1].slice(j.column)+"");f(".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"});d.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(less.env=="development")g=setInterval(function(){if(document.body){document.getElementById(p)?document.body.replaceChild(d,document.getElementById(p)):document.body.insertBefore(d,document.body.firstChild);clearInterval(g)}},10)}less.env=location.hostname=="127.0.0.1"|| -location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.protocol=="file:"||location.port.length>0?"development":"production";less.async=false;less.poll=location.protocol=="file:"?1E3:1500;less.watch=function(){return this.watchMode=true};less.unwatch=function(){return this.watchMode=false};if(less.env==="development"){less.optimization=0;/!watch/.test(location.hash)&&less.watch();less.watchTimer=setInterval(function(){less.watchMode&&a(function(j,o,p){j&&f(j.toCSS(),o,p.lastModified)})}, -less.poll)}else less.optimization=3;var t=b('link[rel="stylesheet/less"]');less.refresh=function(){a(function(j,o,p){if(p.local)m("less: loading "+o.href+" from local storage.");else{f(j.toCSS(),o,p.lastModified);m("less: parsed "+o.href+" successfully.")}})};less.refresh();less.Parser.importer=function(j,o,p){e({href:j,title:j},function(d){p(d)})}})(); +(function(){function b(j){if(!document.querySelectorAll&&typeof jQuery==="undefined")m("No selector method found");else return(document.querySelectorAll||jQuery).call(document,j)}function a(j,d){for(var g=0;g0)i.firstChild.nodeValue!==p.nodeValue&&i.replaceChild(p,i.firstChild);else i.appendChild(p)})(document.createTextNode(j));if(g&&r){r.setItem(d.href,j);r.setItem(d.href+":timestamp",g)}}function h(j,d,g,i){function k(p,w,t){if(p.status>=200&&p.status<300)w(p.responseText,p.getResponseHeader("Last-Modified"));else typeof t==="function"&&t(p.status)}var o=n();d=s?false:d||less.async;o.open("GET", +j,d);o.send(null);if(s)o.status===0?g(o.responseText):i(o.status);else if(d)o.onreadystatechange=function(){o.readyState==4&&k(o,g,i)};else k(o,g,i)}function n(){if(window.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(j){m("less: browser doesn't support AJAX.");return null}}function l(j){return j&&j.parentNode.removeChild(j)}function m(j){less.env=="development"&&typeof console!=="undefined"&&console.log(j)}function q(j,d){var g="less-error-message:"+ +d.replace(/[^a-z]+/ig,"-");if(!j.extract)throw j;var i=document.createElement("div"),k;i.id=g;i.className="less-error-message";i.innerHTML="

"+(j.message||"There is an error in your .less file")+'

'+d+" on line "+j.line+", column "+(j.column+1)+":

"+'
\n
[-1]{0}
\n
[0]{current}
\n
[1]{2}
\n
'.replace(/\[(-?\d)\]/g,function(o,p){return parseInt(j.line)+parseInt(p)||""}).replace(/\{(\d)\}/g, +function(o,p){return j.extract[parseInt(p)]||""}).replace(/\{current\}/,j.extract[1].slice(0,j.column)+''+j.extract[1].slice(j.column)+"");f(".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"});i.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(less.env=="development")k=setInterval(function(){if(document.body){document.getElementById(g)?document.body.replaceChild(i,document.getElementById(g)):document.body.insertBefore(i,document.body.firstChild);clearInterval(k)}},10)}var s=location.protocol==="file:"; +less.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||s?"development":"production";less.async=false;less.poll=s?1E3:1500;less.watch=function(){return this.watchMode=true};less.unwatch=function(){return this.watchMode=false};if(less.env==="development"){less.optimization=0;/!watch/.test(location.hash)&&less.watch();less.watchTimer=setInterval(function(){less.watchMode&&a(function(j,d,g){j&&f(j.toCSS(),d,g.lastModified)})},less.poll)}else less.optimization= +3;var r=typeof window.localStorage==="undefined"?null:window.localStorage,y=b('link[rel="stylesheet/less"]');less.refresh=function(){a(function(j,d,g){if(g.local)m("less: loading "+d.href+" from local storage.");else{f(j.toCSS(),d,g.lastModified);m("less: parsed "+d.href+" successfully.")}})};less.refresh();less.Parser.importer=function(j,d,g){e({href:j,title:j},function(i){g(i)})}})();