// // less - leaner css v1.3.3 // http://lesscss.org // // copyright (c) 2009-2013, alexis sellier // licensed under the apache 2.0 license. // (function(e,t){function n(t){return e.less[t.split("/")[1]]}function f(){r.env==="development"?(r.optimization=0,r.watchtimer=setinterval(function(){r.watchmode&&g(function(e,t,n,r,i){t&&s(t.tocss(),r,i.lastmodified)})},r.poll)):r.optimization=3}function m(){var e=document.getelementsbytagname("style");for(var t=0;t0&&(s.splice(o-1,2),o-=2)}return i.hostpart=r[1],i.directories=s,i.path=r[1]+s.join("/"),i.fileurl=i.path+(r[4]||""),i.url=i.fileurl+(r[5]||""),i}function w(t,n,i,s){var o=t.contents||{},u=t.files||{},a=b(t.href,e.location.href),f=a.url,c=l&&l.getitem(f),h=l&&l.getitem(f+":timestamp"),p={css:c,timestamp:h},d;r.relativeurls?r.rootpath?t.entrypath?d=b(r.rootpath+y(a.path,t.entrypath)).path:d=r.rootpath:d=a.path:r.rootpath?d=r.rootpath:t.entrypath?d=t.entrypath:d=a.path,x(f,t.type,function(e,l){v+=e.replace(/@import .+?;/ig,"");if(!i&&p&&l&&(new date(l)).valueof()===(new date(p.timestamp)).valueof())s(p.css,t),n(null,null,e,t,{local:!0,remaining:s},f);else try{o[f]=e,(new r.parser({optimization:r.optimization,paths:[a.path],entrypath:t.entrypath||a.path,mime:t.type,filename:f,rootpath:d,relativeurls:t.relativeurls,contents:o,files:u,dumplinenumbers:r.dumplinenumbers})).parse(e,function(r,i){if(r)return k(r,f);try{n(r,i,e,t,{local:!1,lastmodified:l,remaining:s},f),n(document.getelementbyid("less-error-message:"+e(f)))}catch(r){k(r,f)}})}catch(c){k(c,f)}},function(e,t){throw new error("couldn't load "+t+" ("+e+")")})}function e(e){return e.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\.[a-za-z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function s(e,t,n){var r,i=t.href||"",s="less:"+(t.title||e(i));if((r=document.getelementbyid(s))===null){r=document.createelement("style"),r.type="text/css",t.media&&(r.media=t.media),r.id=s;var o=t&&t.nextsibling||null;(o||document.getelementsbytagname("head")[0]).parentnode.insertbefore(r,o)}if(r.stylesheet)try{r.stylesheet.csstext=e}catch(u){throw new error("couldn't reassign stylesheet.csstext.")}else(function(e){r.childnodes.length>0?r.firstchild.nodevalue!==e.nodevalue&&r.replacechild(e,r.firstchild):r.appendchild(e)})(document.createtextnode(e));if(n&&l){c("saving "+i+" to cache.");try{l.setitem(i,e),l.setitem(i+":timestamp",n)}catch(u){c("failed to save")}}}function x(e,t,n,i){function a(t,n,r){t.status>=200&&t.status<300?n(t.responsetext,t.getresponseheader("last-modified")):typeof r=="function"&&r(t.status,e)}var s=t(),u=o?r.fileasync:r.async;typeof s.overridemimetype=="function"&&s.overridemimetype("text/css"),s.open("get",e,u),s.setrequestheader("accept",t||"text/x-less, text/css; q=0.9, */*; q=0.5"),s.send(null),o&&!r.fileasync?s.status===0||s.status>=200&&s.status<300?n(s.responsetext):i(s.status,e):u?s.onreadystatechange=function(){s.readystate==4&&a(s,n,i)}:a(s,n,i)}function t(){if(e.xmlhttprequest)return new xmlhttprequest;try{return new activexobject("msxml2.xmlhttp.3.0")}catch(t){return c("browser doesn't support ajax."),null}}function n(e){return e&&e.parentnode.removechild(e)}function c(e){r.env=="development"&&typeof console!="undefined"&&console.log("less: "+e)}function k(e,t){var n="less-error-message:"+e(t),i='
  • {content}
  • ',s=document.createelement("div"),o,u,a=[],f=e.filename||t,l=f.match(/([^\/]+(\?.*)?)$/)[1];s.id=n,s.classname="less-error-message",u="

    "+(e.message||"there is an error in your .less file")+"

    "+'

    in '+l+" ";var c=function(e,t,n){e.extract[t]&&a.push(i.replace(/\{line\}/,parseint(e.line)+(t-1)).replace(/\{class\}/,n).replace(/\{content\}/,e.extract[t]))};e.stack?u+="
    "+e.stack.split("\n").slice(1).join("
    "):e.extract&&(c(e,0,""),c(e,1,"line"),c(e,2,""),u+="on line "+e.line+", column "+(e.column+1)+":

    "+""),s.innerhtml=u,s([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),s.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"].join(";"),r.env=="development"&&(o=setinterval(function(){document.body&&(document.getelementbyid(n)?document.body.replacechild(s,document.getelementbyid(n)):document.body.insertbefore(s,document.body.firstchild),clearinterval(o))},10))}array.isarray||(array.isarray=function(e){return object.prototype.tostring.call(e)==="[object array]"||e instanceof array}),array.prototype.foreach||(array.prototype.foreach=function(e,t){var n=this.length>>>0;for(var r=0;r>>0,n=new array(t),r=arguments[1];for(var i=0;i>>0,n=0;if(t===0&&arguments.length===1)throw new typeerror;if(arguments.length>=2)var r=arguments[1];else do{if(n in this){r=this[n++];break}if(++n>=t)throw new typeerror}while(!0);for(;n=t)return-1;n<0&&(n+=t);for(;nh&&(c[u]=c[u].slice(o-h),h=o)}function w(e){var t=e.charcodeat(0);return t===32||t===10||t===9}function e(e){var t,n,r,i,a;if(e instanceof function)return e.call(p.parsers);if(typeof e=="string")t=s.charat(o)===e?e:null,r=1,b();else{b();if(!(t=e.exec(c[u])))return null;r=t[0].length}if(t)return s(r),typeof t=="string"?t:t.length===1?t[0]:t}function s(e){var t=o,n=u,r=o+c[u].length,i=o+=e;while(o=0&&t.charat(n)!=="\n";n--)r++;return{line:typeof e=="number"?(t.slice(0,e).match(/\n/g)||"").length:null,column:r}}function l(e){return r.mode==="browser"||r.mode==="rhino"?e.filename:n("path").resolve(e.filename)}function a(e,t,n){return{linenumber:k(e,t).line+1,filename:l(n)}}function o(e,t){var n=c(e,t),r=k(e.index,n),i=r.line,s=r.column,o=n.split("\n");this.type=e.type||"syntax",this.message=e.message,this.filename=e.filename||t.filename,this.index=e.index,this.line=typeof i=="number"?i+1:null,this.callline=e.call&&k(e.call,n).line+1,this.callextract=o[k(e.call,n).line],this.stack=e.stack,this.column=s,this.extract=[o[i-1],o[i],o[i+1]]}var s,o,u,a,f,l,c,h,p,d=this,t=t||{};t.contents||(t.contents={}),t.rootpath=t.rootpath||"",t.files||(t.files={});var v=function(){},m=this.imports={paths:t.paths||[],queue:[],files:t.files,contents:t.contents,mime:t.mime,error:null,push:function(e,n){var i=this;this.queue.push(e),r.parser.importer(e,this.paths,function(t,r,s){i.queue.splice(i.queue.indexof(e),1);var o=s in i.files;i.files[s]=r,t&&!i.error&&(i.error=t),n(t,r,o),i.queue.length===0&&v(i.error)},t)}};return this.env=t=t||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,p={imports:m,parse:function(e,a){var f,d,m,g,y,b,w=[],s,x=null;o=u=h=l=0,s=e.replace(/\r\n/g,"\n"),s=s.replace(/^\ufeff/,""),c=function(e){var n=0,r=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,i=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,o=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,u=0,a,f=e[0],l;for(var c=0,h,p;c0?"missing closing `}`":"missing opening `{`",filename:t.filename},t)),e.map(function(e){return e.join("")})}([[]]);if(x)return a(x,t);try{f=new i.ruleset([],e(this.parsers.primary)),f.root=!0}catch(t){return a(new o(t,t))}f.tocss=function(e){var s,o,u;return function(s,o){var u=[],a;s=s||{},typeof o=="object"&&!array.isarray(o)&&(o=object.keys(o).map(function(e){var t=o[e];return t instanceof i.value||(t instanceof i.expression||(t=new i.expression([t])),t=new i.value([t])),new i.rule("@"+e,t,!1,0)}),u=[new i.ruleset(null,o)]);try{var f=e.call(this,{frames:u}).tocss([],{compress:s.compress||!1,dumplinenumbers:t.dumplinenumbers})}catch(l){throw new o(l,t)}if(a=p.imports.error)throw a instanceof o?a:new o(a,t);return s.yuicompress&&r.mode==="node"?n("ycssmin").cssmin(f):s.compress?f.replace(/(\s)+/g,"$1"):f}}(f.eval);if(o=0&&s.charat(n)!=="\n";n--)c++;x={type:"parse",message:"syntax error on line "+y,index:o,filename:t.filename,line:y,column:c,extract:[b[y-2],b[y-1],b[y]]}}this.imports.queue.length>0?v=function(e){e=x||e,e?a(e):a(null,f)}:a(x,f)},parsers:{primary:function(){var e,t=[];while((e=e(this.mixin.definition)||e(this.rule)||e(this.ruleset)||e(this.mixin.call)||e(this.comment)||e(this.directive))||e(/^[\s\n]+/)||e(/^;+/))e&&t.push(e);return t},comment:function(){var e;if(s.charat(o)!=="/")return;if(s.charat(o+1)==="/")return new i.comment(e(/^\/\/.*/),!0);if(e=e(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new i.comment(e)},entities:{quoted:function(){var e,t=o,n;s.charat(t)==="~"&&(t++,n=!0);if(s.charat(t)!=='"'&&s.charat(t)!=="'")return;n&&e("~");if(e=e(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new i.quoted(e[0],e[1]||e[2],n)},keyword:function(){var e;if(e=e(/^[_a-za-z-][_a-za-z0-9-]*/))return i.colors.hasownproperty(e)?new i.color(i.colors[e].slice(1)):new i.keyword(e)},call:function(){var e,n,r,s,a=o;if(!(e=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(c[u])))return;e=e[1],n=e.tolowercase();if(n==="url")return null;o+=e.length;if(n==="alpha"){s=e(this.alpha);if(typeof s!="undefined")return s}e("("),r=e(this.entities.arguments);if(!e(")"))return;if(e)return new i.call(e,r,a,t.filename)},arguments:function(){var e=[],t;while(t=e(this.entities.assignment)||e(this.expression)){e.push(t);if(!e(","))break}return e},literal:function(){return e(this.entities.ratio)||e(this.entities.dimension)||e(this.entities.color)||e(this.entities.quoted)||e(this.entities.unicodedescriptor)},assignment:function(){var e,t;if((e=e(/^\w+(?=\s?=)/i))&&e("=")&&(t=e(this.entity)))return new i.assignment(e,t)},url:function(){var e;if(s.charat(o)!=="u"||!e(/^url\(/))return;return e=e(this.entities.quoted)||e(this.entities.variable)||e(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/)||"",x(")"),new i.url(e.value!=null||e instanceof i.variable?e:new i.anonymous(e),t.rootpath)},variable:function(){var e,n=o;if(s.charat(o)==="@"&&(e=e(/^@@?[\w-]+/)))return new i.variable(e,n,t.filename)},variablecurly:function(){var e,n,r=o;if(s.charat(o)==="@"&&(n=e(/^@\{([\w-]+)\}/)))return new i.variable("@"+n[1],r,t.filename)},color:function(){var e;if(s.charat(o)==="#"&&(e=e(/^#([a-fa-f0-9]{6}|[a-fa-f0-9]{3})/)))return new i.color(e[1])},dimension:function(){var e,t=s.charcodeat(o);if(t>57||t<43||t===47||t==44)return;if(e=e(/^([+-]?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/))return new i.dimension(e[1],e[2])},ratio:function(){var e,t=s.charcodeat(o);if(t>57||t<48)return;if(e=e(/^(\d+\/\d+)/))return new i.ratio(e[1])},unicodedescriptor:function(){var e;if(e=e(/^u\+[0-9a-fa-f?]+(\-[0-9a-fa-f?]+)?/))return new i.unicodedescriptor(e[0])},javascript:function(){var e,t=o,n;s.charat(t)==="~"&&(t++,n=!0);if(s.charat(t)!=="`")return;n&&e("~");if(e=e(/^`([^`]*)`/))return new i.javascript(e[1],o,n)}},variable:function(){var e;if(s.charat(o)==="@"&&(e=e(/^(@[\w-]+)\s*:/)))return e[1]},shorthand:function(){var e,t;if(!n(/^[@\w.%-]+\/[@\w.-]+/))return;g();if((e=e(this.entity))&&e("/")&&(t=e(this.entity)))return new i.shorthand(e,t);y()},mixin:{call:function(){var e=[],n,r,u=[],a=[],f,l,c,h,p,d,v,m=o,b=s.charat(o),w,s,c=!1;if(b!=="."&&b!=="#")return;g();while(n=e(/^[#.](?:[\w-]|\\(?:[a-fa-f0-9]{1,6} ?|[^a-fa-f0-9]))+/))e.push(new i.element(r,n,o)),r=e(">");if(e("(")){p=[];while(c=e(this.expression)){h=null,s=c;if(c.value.length==1){var k=c.value[0];k instanceof i.variable&&e(":")&&(p.length>0&&(d&&t("cannot mix ; and , as delimiter types"),v=!0),s=x(this.expression),h=w=k.name)}p.push(s),a.push({name:h,value:s});if(e(","))continue;if(e(";")||d)v&&t("cannot mix ; and , as delimiter types"),d=!0,p.length>1&&(s=new i.value(p)),u.push({name:w,value:s}),w=null,p=[],v=!1}x(")")}f=d?u:a,e(this.important)&&(c=!0);if(e.length>0&&(e(";")||n("}")))return new i.mixin.call(e,f,m,t.filename,c);y()},definition:function(){var e,t=[],n,r,u,a,f,c=!1;if(s.charat(o)!=="."&&s.charat(o)!=="#"||n(/^[^{]*\}/))return;g();if(n=e(/^([#.](?:[\w-]|\\(?:[a-fa-f0-9]{1,6} ?|[^a-fa-f0-9]))+)\s*\(/)){e=n[1];do{e(this.comment);if(s.charat(o)==="."&&e(/^\.{3}/)){c=!0,t.push({variadic:!0});break}if(!(u=e(this.entities.variable)||e(this.entities.literal)||e(this.entities.keyword)))break;if(u instanceof i.variable)if(e(":"))a=x(this.expression,"expected expression"),t.push({name:u.name,value:a});else{if(e(/^\.{3}/)){t.push({name:u.name,variadic:!0}),c=!0;break}t.push({name:u.name})}else t.push({value:u})}while(e(",")||e(";"));e(")")||(l=o,y()),e(this.comment),e(/^when/)&&(f=x(this.conditions,"expected condition")),r=e(this.block);if(r)return new i.mixin.definition(e,t,r,f,c);y()}}},entity:function(){return e(this.entities.literal)||e(this.entities.variable)||e(this.entities.url)||e(this.entities.call)||e(this.entities.keyword)||e(this.entities.javascript)||e(this.comment)},end:function(){return e(";")||n("}")},alpha:function(){var e;if(!e(/^\(opacity=/i))return;if(e=e(/^\d+/)||e(this.entities.variable))return x(")"),new i.alpha(e)},element:function(){var e,t,n,r;n=e(this.combinator),e=e(/^(?:\d+\.\d+|\d+)%/)||e(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[a-fa-f0-9]{1,6} ?|[^a-fa-f0-9]))+/)||e("*")||e("&")||e(this.attribute)||e(/^\([^()@]+\)/)||e(/^[\.#](?=@)/)||e(this.entities.variablecurly),e||e("(")&&(r=e(this.entities.variablecurly)||e(this.entities.variable)||e(this.selector))&&e(")")&&(e=new i.paren(r));if(e)return new i.element(n,e,o)},combinator:function(){var e,t=s.charat(o);if(t===">"||t==="+"||t==="~"||t==="|"){o++;while(s.charat(o).match(/\s/))o++;return new i.combinator(t)}return s.charat(o-1).match(/\s/)?new i.combinator(" "):new i.combinator(null)},selector:function(){var e,t,n=[],r,u;if(e("("))return e=e(this.entity),e(")")?new i.selector([new i.element("",e,o)]):null;while(t=e(this.element)){r=s.charat(o),n.push(t);if(r==="{"||r==="}"||r===";"||r===","||r===")")break}if(n.length>0)return new i.selector(n)},attribute:function(){var e="",t,n,r;if(!e("["))return;if(t=e(/^(?:[_a-za-z0-9-]|\\.)+/)||e(this.entities.quoted))(r=e(/^[|~*$^]?=/))&&(n=e(this.entities.quoted)||e(/^[\w-]+/))?e=[t,r,n.tocss?n.tocss():n].join(""):e=t;if(!e("]"))return;if(e)return"["+e+"]"},block:function(){var e;if(e("{")&&(e=e(this.primary))&&e("}"))return e},ruleset:function(){var e=[],n,r,u,a;g(),t.dumplinenumbers&&(a=a(o,s,t));while(n=e(this.selector)){e.push(n),e(this.comment);if(!e(","))break;e(this.comment)}if(e.length>0&&(r=e(this.block))){var f=new i.ruleset(e,r,t.strictimports);return t.dumplinenumbers&&(f.debuginfo=a),f}l=o,y()},rule:function(){var e,t,n=s.charat(o),r,a;g();if(n==="."||n==="#"||n==="&")return;if(e=e(this.variable)||e(this.property)){e.charat(0)!="@"&&(a=/^([^@+\/'"*`(;{}-]*);/.exec(c[u]))?(o+=a[0].length-1,t=new i.anonymous(a[1])):e==="font"?t=e(this.font):t=e(this.value),r=e(this.important);if(t&&e(this.end))return new i.rule(e,t,r,f);l=o,y()}},"import":function(){var e,n,r=o;g();var s=e(/^@import(?:-(once))?\s+/);if(s&&(e=e(this.entities.quoted)||e(this.entities.url))){n=e(this.mediafeatures);if(e(";"))return new i.import(e,m,n,s[1]==="once",r,t.rootpath)}y()},mediafeature:function(){var e,t,n=[];do if(e=e(this.entities.keyword))n.push(e);else if(e("(")){t=e(this.property),e=e(this.entity);if(!e(")"))return null;if(t&&e)n.push(new i.paren(new i.rule(t,e,null,o,!0)));else{if(!e)return null;n.push(new i.paren(e))}}while(e);if(n.length>0)return new i.expression(n)},mediafeatures:function(){var e,t=[];do if(e=e(this.mediafeature)){t.push(e);if(!e(","))break}else if(e=e(this.entities.variable)){t.push(e);if(!e(","))break}while(e);return t.length>0?t:null},media:function(){var e,n,r,u;t.dumplinenumbers&&(u=a(o,s,t));if(e(/^@media/)){e=e(this.mediafeatures);if(n=e(this.block))return r=new i.media(n,e),t.dumplinenumbers&&(r.debuginfo=u),r}},directive:function(){var e,n,r,u,a,f,l,c,h,p;if(s.charat(o)!=="@")return;if(n=e(this["import"])||e(this.media))return n;g(),e=e(/^@[a-z-]+/);if(!e)return;l=e,e.charat(1)=="-"&&e.indexof("-",2)>0&&(l="@"+e.slice(e.indexof("-",2)+1));switch(l){case"@font-face":c=!0;break;case"@viewport":case"@top-left":case"@top-left-corner":case"@top-center":case"@top-right":case"@top-right-corner":case"@bottom-left":case"@bottom-left-corner":case"@bottom-center":case"@bottom-right":case"@bottom-right-corner":case"@left-top":case"@left-middle":case"@left-bottom":case"@right-top":case"@right-middle":case"@right-bottom":c=!0;break;case"@page":case"@document":case"@supports":case"@keyframes":c=!0,h=!0;break;case"@namespace":p=!0}h&&(e+=" "+(e(/^[^{]+/)||"").trim());if(c){if(r=e(this.block))return new i.directive(e,r)}else if((n=p?e(this.expression):e(this.entity))&&e(";")){var d=new i.directive(e,n);return t.dumplinenumbers&&(d.debuginfo=a(o,s,t)),d}y()},font:function(){var e=[],t=[],n,r,s,o;while(o=e(this.shorthand)||e(this.entity))t.push(o);e.push(new i.expression(t));if(e(","))while(o=e(this.expression)){e.push(o);if(!e(","))break}return new i.value(e)},value:function(){var e,t=[],n;while(e=e(this.expression)){t.push(e);if(!e(","))break}if(t.length>0)return new i.value(t)},important:function(){if(s.charat(o)==="!")return e(/^! *important/)},sub:function(){var e;if(e("(")&&(e=e(this.expression))&&e(")"))return e},multiplication:function(){var e,t,n,r;if(e=e(this.operand)){while(!n(/^\/[*\/]/)&&(n=e("/")||e("*"))&&(t=e(this.operand)))r=new i.operation(n,[r||e,t]);return r||e}},addition:function(){var e,t,n,r;if(e=e(this.multiplication)){while((n=e(/^[-+]\s+/)||!w(s.charat(o-1))&&(e("+")||e("-")))&&(t=e(this.multiplication)))r=new i.operation(n,[r||e,t]);return r||e}},conditions:function(){var e,t,n=o,r;if(e=e(this.condition)){while(e(",")&&(t=e(this.condition)))r=new i.condition("or",r||e,t,n);return r||e}},condition:function(){var e,t,n,r,s=o,u=!1;e(/^not/)&&(u=!0),x("(");if(e=e(this.addition)||e(this.entities.keyword)||e(this.entities.quoted))return(r=e(/^(?:>=|=<|[<=>])/))?(t=e(this.addition)||e(this.entities.keyword)||e(this.entities.quoted))?n=new i.condition(r,e,t,s,u):t("expected expression"):n=new i.condition("=",e,new i.keyword("true"),s,u),x(")"),e(/^and/)?new i.condition("and",n,e(this.condition)):n},operand:function(){var e,t=s.charat(o+1);s.charat(o)==="-"&&(t==="@"||t==="(")&&(e=e("-"));var n=e(this.sub)||e(this.entities.dimension)||e(this.entities.color)||e(this.entities.variable)||e(this.entities.call);return e?new i.operation("*",[new i.dimension(-1),n]):n},expression:function(){var e,t,n=[],r;while(e=e(this.addition)||e(this.entity))n.push(e);if(n.length>0)return new i.expression(n)},property:function(){var e;if(e=e(/^(\*?-?[_a-z0-9-]+)\s*:/))return e[1]}}}};if(r.mode==="browser"||r.mode==="rhino")r.parser.importer=function(e,t,n,r){!/^([a-z-]+:)?\//.test(e)&&t.length>0&&(e=t[0]+e),w({href:e,title:e,type:r.mime,contents:r.contents,files:r.files,rootpath:r.rootpath,entrypath:r.entrypath,relativeurls:r.relativeurls},function(e,i,s,o,u,a){e&&typeof r.errback=="function"?r.errback.call(null,a,t,n,r):n.call(null,e,i,a)},!0)};(function(e){function t(t){return e.functions.hsla(t.h,t.s,t.l,t.a)}function n(t,n){return t instanceof e.dimension&&t.unit=="%"?parsefloat(t.value*n/100):r(t)}function r(t){if(t instanceof e.dimension)return parsefloat(t.unit=="%"?t.value/100:t.value);if(typeof t=="number")return t;throw{error:"runtimeerror",message:"color functions take numbers as parameters"}}function i(e){return math.min(1,math.max(0,e))}e.functions={rgb:function(e,t,n){return this.rgba(e,t,n,1)},rgba:function(t,i,s,o){var u=[t,i,s].map(function(e){return n(e,256)});return o=r(o),new e.color(u,o)},hsl:function(e,t,n){return this.hsla(e,t,n,1)},hsla:function(e,t,n,i){function u(e){return e=e<0?e+1:e>1?e-1:e,e*6<1?o+(s-o)*e*6:e*2<1?s:e*3<2?o+(s-o)*(2/3-e)*6:o}e=r(e)%360/360,t=r(t),n=r(n),i=r(i);var s=n<=.5?n*(t+1):n+t-n*t,o=n*2-s;return this.rgba(u(e+1/3)*255,u(e)*255,u(e-1/3)*255,i)},hsv:function(e,t,n){return this.hsva(e,t,n,1)},hsva:function(e,t,n,i){e=r(e)%360/360*360,t=r(t),n=r(n),i=r(i);var s,o;s=math.floor(e/60%6),o=e/60-s;var u=[n,n*(1-t),n*(1-o*t),n*(1-(1-o)*t)],a=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return this.rgba(u[a[s][0]]*255,u[a[s][1]]*255,u[a[s][2]]*255,i)},hue:function(t){return new e.dimension(math.round(t.tohsl().h))},saturation:function(t){return new e.dimension(math.round(t.tohsl().s*100),"%")},lightness:function(t){return new e.dimension(math.round(t.tohsl().l*100),"%")},red:function(t){return new e.dimension(t.rgb[0])},green:function(t){return new e.dimension(t.rgb[1])},blue:function(t){return new e.dimension(t.rgb[2])},alpha:function(t){return new e.dimension(t.tohsl().a)},luma:function(t){return new e.dimension(math.round((.2126*(t.rgb[0]/255)+.7152*(t.rgb[1]/255)+.0722*(t.rgb[2]/255))*t.alpha*100),"%")},saturate:function(e,n){var r=e.tohsl();return r.s+=n.value/100,r.s=i(r.s),t(r)},desaturate:function(e,n){var r=e.tohsl();return r.s-=n.value/100,r.s=i(r.s),t(r)},lighten:function(e,n){var r=e.tohsl();return r.l+=n.value/100,r.l=i(r.l),t(r)},darken:function(e,n){var r=e.tohsl();return r.l-=n.value/100,r.l=i(r.l),t(r)},fadein:function(e,n){var r=e.tohsl();return r.a+=n.value/100,r.a=i(r.a),t(r)},fadeout:function(e,n){var r=e.tohsl();return r.a-=n.value/100,r.a=i(r.a),t(r)},fade:function(e,n){var r=e.tohsl();return r.a=n.value/100,r.a=i(r.a),t(r)},spin:function(e,n){var r=e.tohsl(),i=(r.h+n.value)%360;return r.h=i<0?360+i:i,t(r)},mix:function(t,n,r){r||(r=new e.dimension(50));var i=r.value/100,s=i*2-1,o=t.tohsl().a-n.tohsl().a,u=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,a=1-u,f=[t.rgb[0]*u+n.rgb[0]*a,t.rgb[1]*u+n.rgb[1]*a,t.rgb[2]*u+n.rgb[2]*a],l=t.alpha*i+n.alpha*(1-i);return new e.color(f,l)},greyscale:function(t){return this.desaturate(t,new e.dimension(100))},contrast:function(e,t,n,r){return e.rgb?(typeof n=="undefined"&&(n=this.rgba(255,255,255,1)),typeof t=="undefined"&&(t=this.rgba(0,0,0,1)),typeof r=="undefined"?r=.43:r=r.value,(.2126*(e.rgb[0]/255)+.7152*(e.rgb[1]/255)+.0722*(e.rgb[2]/255))*e.alpha255?255:e<0?0:e).tostring(16),e.length===1?"0"+e:e}).join("")},operate:function(t,n){var r=[];n instanceof e.color||(n=n.tocolor());for(var i=0;i<3;i++)r[i]=e.operate(t,this.rgb[i],n.rgb[i]);return new e.color(r,this.alpha+n.alpha)},tohsl:function(){var e=this.rgb[0]/255,t=this.rgb[1]/255,n=this.rgb[2]/255,r=this.alpha,i=math.max(e,t,n),s=math.min(e,t,n),o,u,a=(i+s)/2,f=i-s;if(i===s)o=u=0;else{u=a>.5?f/(2-i-s):f/(i+s);switch(i){case e:o=(t-n)/f+(t255?255:e<0?0:e).tostring(16),e.length===1?"0"+e:e}).join("")},compare:function(e){return e.rgb?e.rgb[0]===this.rgb[0]&&e.rgb[1]===this.rgb[1]&&e.rgb[2]===this.rgb[2]&&e.alpha===this.alpha?0:-1:-1}}}(n("../tree")),function(e){e.comment=function(e,t){this.value=e,this.silent=!!t},e.comment.prototype={tocss:function(e){return e.compress?"":this.value},eval:function(){return this}}}(n("../tree")),function(e){e.condition=function(e,t,n,r,i){this.op=e.trim(),this.lvalue=t,this.rvalue=n,this.index=r,this.negate=i},e.condition.prototype.eval=function(e){var t=this.lvalue.eval(e),n=this.rvalue.eval(e),r=this.index,i,i=function(e){switch(e){case"and":return t&&n;case"or":return t||n;default:if(t.compare)i=t.compare(n);else{if(!n.compare)throw{type:"type",message:"unable to perform comparison",index:r};i=n.compare(t)}switch(i){case-1:return e==="<"||e==="=<";case 0:return e==="="||e===">="||e==="=<";case 1:return e===">"||e===">="}}}(this.op);return this.negate?!i:i}}(n("../tree")),function(e){e.dimension=function(e,t){this.value=parsefloat(e),this.unit=t||null},e.dimension.prototype={eval:function(){return this},tocolor:function(){return new e.color([this.value,this.value,this.value])},tocss:function(){var e=this.value+this.unit;return e},operate:function(t,n){return new e.dimension(e.operate(t,this.value,n.value),this.unit||n.unit)},compare:function(t){return t instanceof e.dimension?t.value>this.value?-1:t.value":e.compress?">":" > ","|":e.compress?"|":" | "}[this.value]}}(n("../tree")),function(e){e.expression=function(e){this.value=e},e.expression.prototype={eval:function(t){return this.value.length>1?new e.expression(this.value.map(function(e){return e.eval(t)})):this.value.length===1?this.value[0].eval(t):this},tocss:function(e){return this.value.map(function(t){return t.tocss?t.tocss(e):""}).join(" ")}}}(n("../tree")),function(e){e.import=function(t,n,r,i,s,o){var u=this;this.once=i,this.index=s,this._path=t,this.features=r&&new e.value(r),this.rootpath=o,t instanceof e.quoted?this.path=/(\.[a-z]*$)|([\?;].*)$/.test(t.value)?t.value:t.value+".less":this.path=t.value.value||t.value,this.css=/css([\?;].*)?$/.test(this.path),this.css||n.push(this.path,function(t,n,r){t&&(t.index=s),r&&u.once&&(u.skip=r),u.root=n||new e.ruleset([],[])})},e.import.prototype={tocss:function(e){var t=this.features?" "+this.features.tocss(e):"";return this.css?(typeof this._path.value=="string"&&!/^(?:[a-z-]+:|\/)/.test(this._path.value)&&(this._path.value=this.rootpath+this._path.value),"@import "+this._path.tocss()+t+";\n"):""},eval:function(t){var n,r=this.features&&this.features.eval(t);return this.skip?[]:this.css?this:(n=new e.ruleset([],this.root.rules.slice(0)),n.evalimports(t),this.features?new e.media(n.rules,this.features.value):n.rules)}}}(n("../tree")),function(e){e.javascript=function(e,t,n){this.escaped=n,this.expression=e,this.index=t},e.javascript.prototype={eval:function(t){var n,r=this,i={},s=this.expression.replace(/@\{([\w-]+)\}/g,function(n,i){return e.jsify((new e.variable("@"+i,r.index)).eval(t))});try{s=new function("return ("+s+")")}catch(o){throw{message:"javascript evaluation error: `"+s+"`",index:this.index}}for(var u in t.frames[0].variables())i[u.slice(1)]={value:t.frames[0].variables()[u].value,tojs:function(){return this.value.eval(t).tocss()}};try{n=s.call(i)}catch(o){throw{message:"javascript evaluation error: '"+o.name+": "+o.message+"'",index:this.index}}return typeof n=="string"?new e.quoted('"'+n+'"',n,this.escaped,this.index):array.isarray(n)?new e.anonymous(n.join(", ")):new e.anonymous(n)}}}(n("../tree")),function(e){e.keyword=function(e){this.value=e},e.keyword.prototype={eval:function(){return this},tocss:function(){return this.value},compare:function(t){return t instanceof e.keyword?t.value===this.value?0:1:-1}},e.true=new e.keyword("true"),e.false=new e.keyword("false")}(n("../tree")),function(e){e.media=function(t,n){var r=this.emptyselectors();this.features=new e.value(n),this.ruleset=new e.ruleset(r,t),this.ruleset.allowimports=!0},e.media.prototype={tocss:function(e,t){var n=this.features.tocss(t);return this.ruleset.root=e.length===0||e[0].multimedia,"@media "+n+(t.compress?"{":" {\n ")+this.ruleset.tocss(e,t).trim().replace(/\n/g,"\n ")+(t.compress?"}":"\n}\n")},eval:function(t){t.mediablocks||(t.mediablocks=[],t.mediapath=[]);var n=new e.media([],[]);return this.debuginfo&&(this.ruleset.debuginfo=this.debuginfo,n.debuginfo=this.debuginfo),n.features=this.features.eval(t),t.mediapath.push(n),t.mediablocks.push(n),t.frames.unshift(this.ruleset),n.ruleset=this.ruleset.eval(t),t.frames.shift(),t.mediapath.pop(),t.mediapath.length===0?n.evaltop(t):n.evalnested(t)},variable:function(t){return e.ruleset.prototype.variable.call(this.ruleset,t)},find:function(){return e.ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return e.ruleset.prototype.rulesets.apply(this.ruleset)},emptyselectors:function(){var t=new e.element("","&",0);return[new e.selector([t])]},evaltop:function(t){var n=this;if(t.mediablocks.length>1){var r=this.emptyselectors();n=new e.ruleset(r,t.mediablocks),n.multimedia=!0}return delete t.mediablocks,delete t.mediapath,n},evalnested:function(t){var n,r,i=t.mediapath.concat([this]);for(n=0;n0;n--)t.splice(n,0,new e.anonymous("and"));return new e.expression(t)})),new e.ruleset([],[])},permute:function(e){if(e.length===0)return[];if(e.length===1)return e[0];var t=[],n=this.permute(e.slice(1));for(var r=0;r0){c=!0;for(a=0;athis.params.length)return!1;if(this.required>0&&n>this.params.length)return!1}r=math.min(n,this.arity);for(var s=0;si.selectors[o].elements.length?array.prototype.push.apply(r,i.find(new e.selector(t.elements.slice(1)),n)):r.push(i);break}}),this._lookups[o]=r)},tocss:function(t,n){var r=[],i=[],s=[],o=[],u=[],a,f,l;this.root||this.joinselectors(u,t,this.selectors);for(var c=0;c0){f=e.debuginfo(n,this),a=u.map(function(e){return e.map(function(e){return e.tocss(n)}).join("").trim()}).join(n.compress?",":",\n");for(var c=i.length-1;c>=0;c--)s.indexof(i[c])===-1&&s.unshift(i[c]);i=s,r.push(f+a+(n.compress?"{":" {\n ")+i.join(n.compress?"":"\n ")+(n.compress?"}":"\n}\n"))}return r.push(o),r.join("")+(n.compress?"\n":"")},joinselectors:function(e,t,n){for(var r=0;r0)for(i=0;i0&&this.mergeelementsontoselectors(g,a);for(s=0;s0&&(l[0].elements=l[0].elements.slice(0),l[0].elements.push(new e.element(f.combinator,"",0))),y.push(l);else for(o=0;o0?(h=l.slice(0),m=h.pop(),d=new e.selector(m.elements.slice(0)),v=!1):d=new e.selector([]),c.length>1&&(p=p.concat(c.slice(1))),c.length>0&&(v=!1,d.elements.push(new e.element(f.combinator,c[0].elements[0].value,0)),d.elements=d.elements.concat(c[0].elements.slice(1))),v||h.push(d),h=h.concat(p),y.push(h)}a=y,g=[]}}g.length>0&&this.mergeelementsontoselectors(g,a);for(i=0;i0?i[i.length-1]=new e.selector(i[i.length-1].elements.concat(t)):i.push(new e.selector(t))}}}(n("../tree")),function(e){e.selector=function(e){this.elements=e},e.selector.prototype.match=function(e){var t=this.elements,n=t.length,r,i,s,o;r=e.elements.slice(e.elements.length&&e.elements[0].value==="&"?1:0),i=r.length,s=math.min(n,i);if(i===0||n1?"["+e.value.map(function(e){return e.tocss(!1)}).join(", ")+"]":e.tocss(!1)}}(n("./tree"));var o=/^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);r.env=r.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||o?"development":"production"),r.async=r.async||!1,r.fileasync=r.fileasync||!1,r.poll=r.poll||(o?1e3:1500);if(r.functions)for(var u in r.functions)r.tree.functions[u]=r.functions[u];var a=/!dumplinenumbers:(comments|mediaquery|all)/.exec(location.hash);a&&(r.dumplinenumbers=a[1]),r.watch=function(){return r.watchmode||(r.env="development",f()),this.watchmode=!0},r.unwatch=function(){return clearinterval(r.watchtimer),this.watchmode=!1},/!watch/.test(location.hash)&&r.watch();var l=null;if(r.env!="development")try{l=typeof e.localstorage=="undefined"?null:e.localstorage}catch(c){}var h=document.getelementsbytagname("link"),p=/^text\/(x-)?less$/;r.sheets=[];for(var d=0;d