define("csslint",["require","exports"],function(require,exports){
/*! 
CSSLint
Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/
;var CSSLint=function(){
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/
;var parserlib={};(function(){function EventTarget(){this._listeners={}}EventTarget.prototype={constructor:EventTarget,addListener:function(type,listener){if(!this._listeners[type]){this._listeners[type]=[]}this._listeners[type].push(listener)},fire:function(event){if(typeof event=="string"){event={type:event}}if(typeof event.target!="undefined"){event.target=this}if(typeof event.type=="undefined"){throw new Error("Event object missing 'type' property.")}if(this._listeners[event.type]){var listeners=this._listeners[event.type].concat();for(var i=0,len=listeners.length;i<len;i++){listeners[i].call(this,event)}}},removeListener:function(type,listener){if(this._listeners[type]){var listeners=this._listeners[type];for(var i=0,len=listeners.length;i<len;i++){if(listeners[i]===listener){listeners.splice(i,1);break}}}}};function StringReader(text){this._input=text.replace(/\n\r?/g,"\n");this._line=1;this._col=1;this._cursor=0}StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(count){var c=null;count=typeof count=="undefined"?1:count;if(this._cursor<this._input.length){c=this._input.charAt(this._cursor+count-1)}return c},read:function(){var c=null;if(this._cursor<this._input.length){if(this._input.charAt(this._cursor)=="\n"){this._line++;this._col=1}else{this._col++}c=this._input.charAt(this._cursor++)}return c},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){if(this._bookmark){this._cursor=this._bookmark.cursor;this._line=this._bookmark.line;this._col=this._bookmark.col;delete this._bookmark}},readTo:function(pattern){var buffer="",c;while(buffer.length<pattern.length||buffer.lastIndexOf(pattern)!=buffer.length-pattern.length){c=this.read();if(c){buffer+=c}else{throw new Error('Expected "'+pattern+'" at line '+this._line+", col "+this._col+".")}}return buffer},readWhile:function(filter){var buffer="",c=this.read();while(c!==null&&filter(c)){buffer+=c;c=this.read()}return buffer},readMatch:function(matcher){var source=this._input.substring(this._cursor),value=null;if(typeof matcher=="string"){if(source.indexOf(matcher)===0){value=this.readCount(matcher.length)}}else if(matcher instanceof RegExp){if(matcher.test(source)){value=this.readCount(RegExp.lastMatch.length)}}return value},readCount:function(count){var buffer="";while(count--){buffer+=this.read()}return buffer}};function SyntaxError(message,line,col){this.col=col;this.line=line;this.message=message}SyntaxError.prototype=new Error;function SyntaxUnit(text,line,col,type){this.col=col;this.line=line;this.text=text;this.type=type}SyntaxUnit.fromToken=function(token){return new SyntaxUnit(token.value,token.startLine,token.startCol)};SyntaxUnit.prototype={constructor:SyntaxUnit,valueOf:function(){return this.toString()},toString:function(){return this.text}};function TokenStreamBase(input,tokenData){this._reader=input?new StringReader(input.toString()):null;this._token=null;this._tokenData=tokenData;this._lt=[];this._ltIndex=0;this._ltIndexCache=[]}TokenStreamBase.createTokenData=function(tokens){var nameMap=[],typeMap={},tokenData=tokens.concat([]),i=0,len=tokenData.length+1;tokenData.UNKNOWN=-1;tokenData.unshift({name:"EOF"});for(;i<len;i++){nameMap.push(tokenData[i].name);tokenData[tokenData[i].name]=i;if(tokenData[i].text){typeMap[tokenData[i].text]=i}}tokenData.name=function(tt){return nameMap[tt]};tokenData.type=function(c){return typeMap[c]};return tokenData};TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(tokenTypes,channel){if(!(tokenTypes instanceof Array)){tokenTypes=[tokenTypes]}var tt=this.get(channel),i=0,len=tokenTypes.length;while(i<len){if(tt==tokenTypes[i++]){return true}}this.unget();return false},mustMatch:function(tokenTypes,channel){var token;if(!(tokenTypes instanceof Array)){tokenTypes=[tokenTypes]}if(!this.match.apply(this,arguments)){token=this.LT(1);throw new SyntaxError("Expected "+this._tokenData[tokenTypes[0]].name+" at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol)}},advance:function(tokenTypes,channel){while(this.LA(0)!==0&&!this.match(tokenTypes,channel)){this.get()}return this.LA(0)},get:function(channel){var tokenInfo=this._tokenData,reader=this._reader,value,i=0,len=tokenInfo.length,found=false,token,info;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){i++;this._token=this._lt[this._ltIndex++];info=tokenInfo[this._token.type];while(info.channel!==undefined&&channel!==info.channel&&this._ltIndex<this._lt.length){this._token=this._lt[this._ltIndex++];info=tokenInfo[this._token.type];i++}if((info.channel===undefined||channel===info.channel)&&this._ltIndex<=this._lt.length){this._ltIndexCache.push(i);return this._token.type}}token=this._getToken();if(token.type>-1&&!tokenInfo[token.type].hide){token.channel=tokenInfo[token.type].channel;this._token=token;this._lt.push(token);this._ltIndexCache.push(this._lt.length-this._ltIndex+i);if(this._lt.length>5){this._lt.shift()}if(this._ltIndexCache.length>5){this._ltIndexCache.shift()}this._ltIndex=this._lt.length}info=tokenInfo[token.type];if(info&&(info.hide||info.channel!==undefined&&channel!==info.channel)){return this.get(channel)}else{return token.type}},LA:function(index){var total=index,tt;if(index>0){if(index>5){throw new Error("Too much lookahead.")}while(total){tt=this.get();total--}while(total<index){this.unget();total++}}else if(index<0){if(this._lt[this._ltIndex+index]){tt=this._lt[this._ltIndex+index].type}else{throw new Error("Too much lookbehind.")}}else{tt=this._token.type}return tt},LT:function(index){this.LA(index);return this._lt[this._ltIndex+index-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(tokenType){if(tokenType<0||tokenType>this._tokenData.length){return"UNKNOWN_TOKEN"}else{return this._tokenData[tokenType].name}},tokenType:function(tokenName){return this._tokenData[tokenName]||-1},unget:function(){if(this._ltIndexCache.length){this._ltIndex-=this._ltIndexCache.pop();this._token=this._lt[this._ltIndex-1]}else{throw new Error("Too much lookahead.")}}};parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase}})();(function(){var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit;var Colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Combinator(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.COMBINATOR_TYPE);this.type="unknown";if(/^\s+$/.test(text)){this.type="descendant"}else if(text==">"){this.type="child"}else if(text=="+"){this.type="adjacent-sibling"}else if(text=="~"){this.type="sibling"}}Combinator.prototype=new SyntaxUnit;Combinator.prototype.constructor=Combinator;function MediaFeature(name,value){SyntaxUnit.call(this,"("+name+(value!==null?":"+value:"")+")",name.startLine,name.startCol,Parser.MEDIA_FEATURE_TYPE);this.name=name;this.value=value}MediaFeature.prototype=new SyntaxUnit;MediaFeature.prototype.constructor=MediaFeature;function MediaQuery(modifier,mediaType,features,line,col){SyntaxUnit.call(this,(modifier?modifier+" ":"")+(mediaType?mediaType+" ":"")+features.join(" and "),line,col,Parser.MEDIA_QUERY_TYPE);this.modifier=modifier;this.mediaType=mediaType;this.features=features}MediaQuery.prototype=new SyntaxUnit;MediaQuery.prototype.constructor=MediaQuery;function Parser(options){EventTarget.call(this);this.options=options||{};this._tokenStream=null}Parser.DEFAULT_TYPE=0;Parser.COMBINATOR_TYPE=1;Parser.MEDIA_FEATURE_TYPE=2;Parser.MEDIA_QUERY_TYPE=3;Parser.PROPERTY_NAME_TYPE=4;Parser.PROPERTY_VALUE_TYPE=5;Parser.PROPERTY_VALUE_PART_TYPE=6;Parser.SELECTOR_TYPE=7;Parser.SELECTOR_PART_TYPE=8;Parser.SELECTOR_SUB_PART_TYPE=9;Parser.prototype=function(){var proto=new EventTarget,prop,additions={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var tokenStream=this._tokenStream,charset=null,count,token,tt;this.fire("startstylesheet");this._charset();this._skipCruft();while(tokenStream.peek()==Tokens.IMPORT_SYM){this._import();this._skipCruft()}while(tokenStream.peek()==Tokens.NAMESPACE_SYM){this._namespace();this._skipCruft()}tt=tokenStream.peek();while(tt>Tokens.EOF){try{switch(tt){case Tokens.MEDIA_SYM:this._media();this._skipCruft();break;case Tokens.PAGE_SYM:this._page();this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face();this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes();this._skipCruft();break;case Tokens.UNKNOWN_SYM:tokenStream.get();if(!this.options.strict){this.fire({type:"error",error:null,message:"Unknown @ rule: "+tokenStream.LT(0).value+".",line:tokenStream.LT(0).startLine,col:tokenStream.LT(0).startCol});count=0;while(tokenStream.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE){count++}while(count){tokenStream.advance([Tokens.RBRACE]);count--}}else{throw new SyntaxError("Unknown @ rule.",tokenStream.LT(0).startLine,tokenStream.LT(0).startCol)}break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset()){switch(tt){case Tokens.CHARSET_SYM:token=tokenStream.LT(1);this._charset(false);throw new SyntaxError("@charset not allowed here.",token.startLine,token.startCol);case Tokens.IMPORT_SYM:token=tokenStream.LT(1);this._import(false);throw new SyntaxError("@import not allowed here.",token.startLine,token.startCol);case Tokens.NAMESPACE_SYM:token=tokenStream.LT(1);this._namespace(false);throw new SyntaxError("@namespace not allowed here.",token.startLine,token.startCol);default:tokenStream.get();this._unexpectedToken(tokenStream.token())}}}}catch(ex){if(ex instanceof SyntaxError&&!this.options.strict){this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col})}else{throw ex}}tt=tokenStream.peek()}if(tt!=Tokens.EOF){this._unexpectedToken(tokenStream.token())}this.fire("endstylesheet")},_charset:function(emit){var tokenStream=this._tokenStream,charset,token,line,col;if(tokenStream.match(Tokens.CHARSET_SYM)){line=tokenStream.token().startLine;col=tokenStream.token().startCol;this._readWhitespace();tokenStream.mustMatch(Tokens.STRING);token=tokenStream.token();charset=token.value;this._readWhitespace();tokenStream.mustMatch(Tokens.SEMICOLON);if(emit!==false){this.fire({type:"charset",charset:charset,line:line,col:col})}}},_import:function(emit){var tokenStream=this._tokenStream,tt,uri,importToken,mediaList=[];tokenStream.mustMatch(Tokens.IMPORT_SYM);importToken=tokenStream.token();this._readWhitespace();tokenStream.mustMatch([Tokens.STRING,Tokens.URI]);uri=tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();mediaList=this._media_query_list();tokenStream.mustMatch(Tokens.SEMICOLON);this._readWhitespace();if(emit!==false){this.fire({type:"import",uri:uri,media:mediaList,line:importToken.startLine,col:importToken.startCol})}},_namespace:function(emit){var tokenStream=this._tokenStream,line,col,prefix,uri;tokenStream.mustMatch(Tokens.NAMESPACE_SYM);line=tokenStream.token().startLine;col=tokenStream.token().startCol;this._readWhitespace();if(tokenStream.match(Tokens.IDENT)){prefix=tokenStream.token().value;this._readWhitespace()}tokenStream.mustMatch([Tokens.STRING,Tokens.URI]);uri=tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();tokenStream.mustMatch(Tokens.SEMICOLON);this._readWhitespace();if(emit!==false){this.fire({type:"namespace",prefix:prefix,uri:uri,line:line,col:col})}},_media:function(){var tokenStream=this._tokenStream,line,col,mediaList;tokenStream.mustMatch(Tokens.MEDIA_SYM);line=tokenStream.token().startLine;col=tokenStream.token().startCol;this._readWhitespace();mediaList=this._media_query_list();tokenStream.mustMatch(Tokens.LBRACE);this._readWhitespace();this.fire({type:"startmedia",media:mediaList,line:line,col:col});while(true){if(tokenStream.peek()==Tokens.PAGE_SYM){this._page()}else if(!this._ruleset()){break}}tokenStream.mustMatch(Tokens.RBRACE);this._readWhitespace();this.fire({type:"endmedia",media:mediaList,line:line,col:col})},_media_query_list:function(){var tokenStream=this._tokenStream,mediaList=[];this._readWhitespace();if(tokenStream.peek()==Tokens.IDENT||tokenStream.peek()==Tokens.LPAREN){mediaList.push(this._media_query())}while(tokenStream.match(Tokens.COMMA)){this._readWhitespace();mediaList.push(this._media_query())}return mediaList},_media_query:function(){var tokenStream=this._tokenStream,type=null,ident=null,token=null,expressions=[];if(tokenStream.match(Tokens.IDENT)){ident=tokenStream.token().value.toLowerCase();if(ident!="only"&&ident!="not"){tokenStream.unget();ident=null}else{token=tokenStream.token()}}this._readWhitespace();if(tokenStream.peek()==Tokens.IDENT){type=this._media_type();if(token===null){token=tokenStream.token()}}else if(tokenStream.peek()==Tokens.LPAREN){if(token===null){token=tokenStream.LT(1)}expressions.push(this._media_expression())}if(type===null&&expressions.length===0){return null}else{this._readWhitespace();while(tokenStream.match(Tokens.IDENT)){if(tokenStream.token().value.toLowerCase()!="and"){this._unexpectedToken(tokenStream.token())}this._readWhitespace();expressions.push(this._media_expression())}}return new MediaQuery(ident,type,expressions,token.startLine,token.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var tokenStream=this._tokenStream,feature=null,token,expression=null;tokenStream.mustMatch(Tokens.LPAREN);feature=this._media_feature();this._readWhitespace();if(tokenStream.match(Tokens.COLON)){this._readWhitespace();token=tokenStream.LT(1);expression=this._expression()}tokenStream.mustMatch(Tokens.RPAREN);this._readWhitespace();return new MediaFeature(feature,expression?new SyntaxUnit(expression,token.startLine,token.startCol):null)},_media_feature:function(){var tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.IDENT);return SyntaxUnit.fromToken(tokenStream.token())},_page:function(){var tokenStream=this._tokenStream,line,col,identifier=null,pseudoPage=null;tokenStream.mustMatch(Tokens.PAGE_SYM);line=tokenStream.token().startLine;col=tokenStream.token().startCol;this._readWhitespace();if(tokenStream.match(Tokens.IDENT)){identifier=tokenStream.token().value;if(identifier.toLowerCase()==="auto"){this._unexpectedToken(tokenStream.token())}}if(tokenStream.peek()==Tokens.COLON){pseudoPage=this._pseudo_page()}this._readWhitespace();this.fire({type:"startpage",id:identifier,pseudo:pseudoPage,line:line,col:col});this._readDeclarations(true,true);this.fire({type:"endpage",id:identifier,pseudo:pseudoPage,line:line,col:col})},_margin:function(){var tokenStream=this._tokenStream,line,col,marginSym=this._margin_sym();if(marginSym){line=tokenStream.token().startLine;col=tokenStream.token().startCol;this.fire({type:"startpagemargin",margin:marginSym,line:line,col:col});this._readDeclarations(true);this.fire({type:"endpagemargin",margin:marginSym,line:line,col:col});return true}else{return false}},_margin_sym:function(){var tokenStream=this._tokenStream;if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])){return SyntaxUnit.fromToken(tokenStream.token())}else{return null}},_pseudo_page:function(){var tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.COLON);tokenStream.mustMatch(Tokens.IDENT);return tokenStream.token().value},_font_face:function(){var tokenStream=this._tokenStream,line,col;tokenStream.mustMatch(Tokens.FONT_FACE_SYM);line=tokenStream.token().startLine;col=tokenStream.token().startCol;this._readWhitespace();this.fire({type:"startfontface",line:line,col:col});this._readDeclarations(true);this.fire({type:"endfontface",line:line,col:col})},_operator:function(){var tokenStream=this._tokenStream,token=null;if(tokenStream.match([Tokens.SLASH,Tokens.COMMA])){token=tokenStream.token();this._readWhitespace()}return token?PropertyValuePart.fromToken(token):null},_combinator:function(){var tokenStream=this._tokenStream,value=null,token;if(tokenStream.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])){token=tokenStream.token();value=new Combinator(token.value,token.startLine,token.startCol);this._readWhitespace()}return value},_unary_operator:function(){var tokenStream=this._tokenStream;if(tokenStream.match([Tokens.MINUS,Tokens.PLUS])){return tokenStream.token().value}else{return null}},_property:function(){var tokenStream=this._tokenStream,value=null,hack=null,tokenValue,token,line,col;if(tokenStream.peek()==Tokens.STAR&&this.options.starHack){tokenStream.get();token=tokenStream.token();hack=token.value;line=token.startLine;col=token.startCol}if(tokenStream.match(Tokens.IDENT)){token=tokenStream.token();tokenValue=token.value;if(tokenValue.charAt(0)=="_"&&this.options.underscoreHack){hack="_";tokenValue=tokenValue.substring(1)}value=new PropertyName(tokenValue,hack,line||token.startLine,col||token.startCol);this._readWhitespace()}return value},_ruleset:function(){var tokenStream=this._tokenStream,tt,selectors;try{selectors=this._selectors_group()}catch(ex){if(ex instanceof SyntaxError&&!this.options.strict){this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col});tt=tokenStream.advance([Tokens.RBRACE]);if(tt==Tokens.RBRACE){}else{throw ex}}else{throw ex}return true}if(selectors){this.fire({type:"startrule",selectors:selectors,line:selectors[0].line,col:selectors[0].col});this._readDeclarations(true);this.fire({type:"endrule",selectors:selectors,line:selectors[0].line,col:selectors[0].col})}return selectors},_selectors_group:function(){var tokenStream=this._tokenStream,selectors=[],selector;selector=this._selector();if(selector!==null){selectors.push(selector);while(tokenStream.match(Tokens.COMMA)){this._readWhitespace();selector=this._selector();if(selector!==null){selectors.push(selector)}else{this._unexpectedToken(tokenStream.LT(1))}}}return selectors.length?selectors:null},_selector:function(){var tokenStream=this._tokenStream,selector=[],nextSelector=null,combinator=null,ws=null;nextSelector=this._simple_selector_sequence();if(nextSelector===null){return null}selector.push(nextSelector);do{combinator=this._combinator();if(combinator!==null){selector.push(combinator);nextSelector=this._simple_selector_sequence();if(nextSelector===null){this._unexpectedToken(this.LT(1))}else{selector.push(nextSelector)}}else{if(this._readWhitespace()){ws=new Combinator(tokenStream.token().value,tokenStream.token().startLine,tokenStream.token().startCol);combinator=this._combinator();nextSelector=this._simple_selector_sequence();if(nextSelector===null){if(combinator!==null){this._unexpectedToken(tokenStream.LT(1))}}else{if(combinator!==null){selector.push(combinator)}else{selector.push(ws)}selector.push(nextSelector)}}else{break}}}while(true);return new Selector(selector,selector[0].line,selector[0].col)},_simple_selector_sequence:function(){var tokenStream=this._tokenStream,elementName=null,modifiers=[],selectorText="",components=[function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,"id",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],i=0,len=components.length,component=null,found=false,line,col;line=tokenStream.LT(1).startLine;col=tokenStream.LT(1).startCol;elementName=this._type_selector();if(!elementName){elementName=this._universal()}if(elementName!==null){selectorText+=elementName}while(true){if(tokenStream.peek()===Tokens.S){break}while(i<len&&component===null){component=components[i++].call(this)}if(component===null){if(selectorText===""){return null}else{break}}else{i=0;modifiers.push(component);selectorText+=component.toString();component=null}}return selectorText!==""?new SelectorPart(elementName,modifiers,selectorText,line,col):null},_type_selector:function(){var tokenStream=this._tokenStream,ns=this._namespace_prefix(),elementName=this._element_name();if(!elementName){if(ns){tokenStream.unget();if(ns.length>1){tokenStream.unget()}}return null}else{if(ns){elementName.text=ns+elementName.text;elementName.col-=ns.length}return elementName}},_class:function(){var tokenStream=this._tokenStream,token;if(tokenStream.match(Tokens.DOT)){tokenStream.mustMatch(Tokens.IDENT);token=tokenStream.token();return new SelectorSubPart("."+token.value,"class",token.startLine,token.startCol-1)}else{return null}},_element_name:function(){var tokenStream=this._tokenStream,token;if(tokenStream.match(Tokens.IDENT)){token=tokenStream.token();return new SelectorSubPart(token.value,"elementName",token.startLine,token.startCol)}else{return null}},_namespace_prefix:function(){var tokenStream=this._tokenStream,value="";if(tokenStream.LA(1)===Tokens.PIPE||tokenStream.LA(2)===Tokens.PIPE){if(tokenStream.match([Tokens.IDENT,Tokens.STAR])){value+=tokenStream.token().value}tokenStream.mustMatch(Tokens.PIPE);value+="|"}return value.length?value:null},_universal:function(){var tokenStream=this._tokenStream,value="",ns;ns=this._namespace_prefix();if(ns){value+=ns}if(tokenStream.match(Tokens.STAR)){value+="*"}return value.length?value:null},_attrib:function(){var tokenStream=this._tokenStream,value=null,ns,token;if(tokenStream.match(Tokens.LBRACKET)){token=tokenStream.token();value=token.value;value+=this._readWhitespace();ns=this._namespace_prefix();if(ns){value+=ns}tokenStream.mustMatch(Tokens.IDENT);value+=tokenStream.token().value;value+=this._readWhitespace();if(tokenStream.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])){value+=tokenStream.token().value;value+=this._readWhitespace();tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]);value+=tokenStream.token().value;value+=this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACKET);return new SelectorSubPart(value+"]","attribute",token.startLine,token.startCol)}else{return null}},_pseudo:function(){var tokenStream=this._tokenStream,pseudo=null,colons=":",line,col;if(tokenStream.match(Tokens.COLON)){if(tokenStream.match(Tokens.COLON)){colons+=":"}if(tokenStream.match(Tokens.IDENT)){pseudo=tokenStream.token().value;line=tokenStream.token().startLine;col=tokenStream.token().startCol-colons.length}else if(tokenStream.peek()==Tokens.FUNCTION){line=tokenStream.LT(1).startLine;col=tokenStream.LT(1).startCol-colons.length;pseudo=this._functional_pseudo()}if(pseudo){pseudo=new SelectorSubPart(colons+pseudo,"pseudo",line,col)}}return pseudo},_functional_pseudo:function(){var tokenStream=this._tokenStream,value=null;if(tokenStream.match(Tokens.FUNCTION)){value=tokenStream.token().value;value+=this._readWhitespace();value+=this._expression();tokenStream.mustMatch(Tokens.RPAREN);value+=")"}return value},_expression:function(){var tokenStream=this._tokenStream,value="";while(tokenStream.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION])){value+=tokenStream.token().value;value+=this._readWhitespace()}return value.length?value:null},_negation:function(){var tokenStream=this._tokenStream,line,col,value="",arg,subpart=null;if(tokenStream.match(Tokens.NOT)){value=tokenStream.token().value;line=tokenStream.token().startLine;col=tokenStream.token().startCol;value+=this._readWhitespace();arg=this._negation_arg();value+=arg;value+=this._readWhitespace();tokenStream.match(Tokens.RPAREN);value+=tokenStream.token().value;subpart=new SelectorSubPart(value,"not",line,col);subpart.args.push(arg)}return subpart},_negation_arg:function(){var tokenStream=this._tokenStream,args=[this._type_selector,this._universal,function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,"id",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo],arg=null,i=0,len=args.length,elementName,line,col,part;line=tokenStream.LT(1).startLine;col=tokenStream.LT(1).startCol;while(i<len&&arg===null){arg=args[i].call(this);i++}if(arg===null){this._unexpectedToken(tokenStream.LT(1))}if(arg.type=="elementName"){part=new SelectorPart(arg,[],arg.toString(),line,col)}else{part=new SelectorPart(null,[arg],arg.toString(),line,col)}return part},_declaration:function(){var tokenStream=this._tokenStream,property=null,expr=null,prio=null,error=null,invalid=null,propertyName="";property=this._property();if(property!==null){tokenStream.mustMatch(Tokens.COLON);this._readWhitespace();expr=this._expr();if(!expr||expr.length===0){this._unexpectedToken(tokenStream.LT(1))}prio=this._prio();propertyName=property.toString();if(this.options.starHack&&property.hack=="*"||this.options.underscoreHack&&property.hack=="_"){propertyName=property.text}try{this._validateProperty(propertyName,expr)}catch(ex){invalid=ex}this.fire({type:"property",property:property,value:expr,important:prio,line:property.line,col:property.col,invalid:invalid});return true}else{return false}},_prio:function(){var tokenStream=this._tokenStream,result=tokenStream.match(Tokens.IMPORTANT_SYM);this._readWhitespace();return result},_expr:function(){var tokenStream=this._tokenStream,values=[],value=null,operator=null;value=this._term();if(value!==null){values.push(value);do{operator=this._operator();if(operator){values.push(operator)}value=this._term();if(value===null){break}else{values.push(value)}}while(true)}return values.length>0?new PropertyValue(values,values[0].line,values[0].col):null},_term:function(){var tokenStream=this._tokenStream,unary=null,value=null,token,line,col;unary=this._unary_operator();if(unary!==null){line=tokenStream.token().startLine;col=tokenStream.token().startCol}if(tokenStream.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters){value=this._ie_function();if(unary===null){line=tokenStream.token().startLine;col=tokenStream.token().startCol}}else if(tokenStream.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])){value=tokenStream.token().value;if(unary===null){line=tokenStream.token().startLine;col=tokenStream.token().startCol}this._readWhitespace()}else{token=this._hexcolor();if(token===null){if(unary===null){line=tokenStream.LT(1).startLine;col=tokenStream.LT(1).startCol}if(value===null){if(tokenStream.LA(3)==Tokens.EQUALS&&this.options.ieFilters){value=this._ie_function()}else{value=this._function()}}}else{value=token.value;if(unary===null){line=token.startLine;col=token.startCol}}}return value!==null?new PropertyValuePart(unary!==null?unary+value:value,line,col):null},_function:function(){var tokenStream=this._tokenStream,functionText=null,expr=null,lt;if(tokenStream.match(Tokens.FUNCTION)){functionText=tokenStream.token().value;this._readWhitespace();expr=this._expr();functionText+=expr;if(this.options.ieFilters&&tokenStream.peek()==Tokens.EQUALS){do{if(this._readWhitespace()){functionText+=tokenStream.token().value}if(tokenStream.LA(0)==Tokens.COMMA){functionText+=tokenStream.token().value}tokenStream.match(Tokens.IDENT);functionText+=tokenStream.token().value;tokenStream.match(Tokens.EQUALS);functionText+=tokenStream.token().value;lt=tokenStream.peek();while(lt!=Tokens.COMMA&&lt!=Tokens.S&&lt!=Tokens.RPAREN){tokenStream.get();functionText+=tokenStream.token().value;lt=tokenStream.peek()}}while(tokenStream.match([Tokens.COMMA,Tokens.S]))}tokenStream.match(Tokens.RPAREN);functionText+=")";this._readWhitespace()}return functionText},_ie_function:function(){var tokenStream=this._tokenStream,functionText=null,expr=null,lt;if(tokenStream.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){functionText=tokenStream.token().value;do{if(this._readWhitespace()){functionText+=tokenStream.token().value}if(tokenStream.LA(0)==Tokens.COMMA){functionText+=tokenStream.token().value}tokenStream.match(Tokens.IDENT);functionText+=tokenStream.token().value;tokenStream.match(Tokens.EQUALS);functionText+=tokenStream.token().value;lt=tokenStream.peek();while(lt!=Tokens.COMMA&&lt!=Tokens.S&&lt!=Tokens.RPAREN){tokenStream.get();functionText+=tokenStream.token().value;lt=tokenStream.peek()}}while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN);functionText+=")";this._readWhitespace()}return functionText},_hexcolor:function(){var tokenStream=this._tokenStream,token=null,color;if(tokenStream.match(Tokens.HASH)){token=tokenStream.token();color=token.value;if(!/#[a-f0-9]{3,6}/i.test(color)){throw new SyntaxError("Expected a hex color but found '"+color+"' at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol)}this._readWhitespace()}return token},_keyframes:function(){var tokenStream=this._tokenStream,token,tt,name;tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);this._readWhitespace();name=this._keyframe_name();this._readWhitespace();tokenStream.mustMatch(Tokens.LBRACE);this.fire({type:"startkeyframes",name:name,line:name.line,col:name.col});this._readWhitespace();tt=tokenStream.peek();while(tt==Tokens.IDENT||tt==Tokens.PERCENTAGE){this._keyframe_rule();this._readWhitespace();tt=tokenStream.peek()}this.fire({type:"endkeyframes",name:name,line:name.line,col:name.col});this._readWhitespace();tokenStream.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var tokenStream=this._tokenStream,token;tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]);return SyntaxUnit.fromToken(tokenStream.token())},_keyframe_rule:function(){var tokenStream=this._tokenStream,token,keyList=this._key_list();this.fire({type:"startkeyframerule",keys:keyList,line:keyList[0].line,col:keyList[0].col});this._readDeclarations(true);this.fire({type:"endkeyframerule",keys:keyList,line:keyList[0].line,col:keyList[0].col})},_key_list:function(){var tokenStream=this._tokenStream,token,key,keyList=[];keyList.push(this._key());this._readWhitespace();while(tokenStream.match(Tokens.COMMA)){this._readWhitespace();keyList.push(this._key());this._readWhitespace()}return keyList},_key:function(){var tokenStream=this._tokenStream,token;if(tokenStream.match(Tokens.PERCENTAGE)){return SyntaxUnit.fromToken(tokenStream.token())}else if(tokenStream.match(Tokens.IDENT)){token=tokenStream.token();if(/from|to/i.test(token.value)){return SyntaxUnit.fromToken(token)}tokenStream.unget()}this._unexpectedToken(tokenStream.LT(1))},_skipCruft:function(){while(this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC])){}},_readDeclarations:function(checkStart,readMargins){var tokenStream=this._tokenStream,tt;this._readWhitespace();if(checkStart){tokenStream.mustMatch(Tokens.LBRACE)}this._readWhitespace();try{while(true){if(tokenStream.match(Tokens.SEMICOLON)||readMargins&&this._margin()){}else if(this._declaration()){if(!tokenStream.match(Tokens.SEMICOLON)){break}}else{break}this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACE);this._readWhitespace()}catch(ex){if(ex instanceof SyntaxError&&!this.options.strict){this.fire({type:"error",error:ex,message:ex.message,line:ex.line,col:ex.col});tt=tokenStream.advance([Tokens.SEMICOLON,Tokens.RBRACE]);if(tt==Tokens.SEMICOLON){this._readDeclarations(false,readMargins)}else if(tt!=Tokens.RBRACE){throw ex}}else{throw ex}}},_readWhitespace:function(){var tokenStream=this._tokenStream,ws="";while(tokenStream.match(Tokens.S)){ws+=tokenStream.token().value}return ws},_unexpectedToken:function(token){throw new SyntaxError("Unexpected token '"+token.value+"' at line "+token.startLine+", col "+token.startCol+".",token.startLine,token.startCol)},_verifyEnd:function(){if(this._tokenStream.LA(1)!=Tokens.EOF){this._unexpectedToken(this._tokenStream.LT(1))}},_validateProperty:function(property,value){Validation.validate(property,value)},parse:function(input){this._tokenStream=new TokenStream(input,Tokens);this._stylesheet()},parseStyleSheet:function(input){return this.parse(input)},parseMediaQuery:function(input){this._tokenStream=new TokenStream(input,Tokens);var result=this._media_query();this._verifyEnd();return result},parsePropertyValue:function(input){this._tokenStream=new TokenStream(input,Tokens);this._readWhitespace();var result=this._expr();this._readWhitespace();this._verifyEnd();return result},parseRule:function(input){this._tokenStream=new TokenStream(input,Tokens);this._readWhitespace();var result=this._ruleset();this._readWhitespace();this._verifyEnd();return result},parseSelector:function(input){this._tokenStream=new TokenStream(input,Tokens);this._readWhitespace();var result=this._selector();this._readWhitespace();this._verifyEnd();return result},parseStyleAttribute:function(input){input+="}";this._tokenStream=new TokenStream(input,Tokens);this._readDeclarations()}};for(prop in additions){if(additions.hasOwnProperty(prop)){proto[prop]=additions[prop]}}return proto}();var Properties={"alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":{multi:"<time>",comma:true},"animation-direction":{multi:"normal | alternate",comma:true},"animation-duration":{multi:"<time>",comma:true},"animation-iteration-count":{multi:"<number> | infinite",comma:true},"animation-name":{multi:"none | <ident>",comma:true},"animation-play-state":{multi:"running | paused",comma:true},"animation-timing-function":1,"-moz-animation-delay":{multi:"<time>",comma:true},"-moz-animation-direction":{multi:"normal | alternate",comma:true},"-moz-animation-duration":{multi:"<time>",comma:true},"-moz-animation-iteration-count":{multi:"<number> | infinite",comma:true},"-moz-animation-name":{multi:"none | <ident>",comma:true},"-moz-animation-play-state":{multi:"running | paused",comma:true},"-ms-animation-delay":{multi:"<time>",comma:true},"-ms-animation-direction":{multi:"normal | alternate",comma:true},"-ms-animation-duration":{multi:"<time>",comma:true},"-ms-animation-iteration-count":{multi:"<number> | infinite",comma:true},"-ms-animation-name":{multi:"none | <ident>",comma:true},"-ms-animation-play-state":{multi:"running | paused",comma:true},"-webkit-animation-delay":{multi:"<time>",comma:true},"-webkit-animation-direction":{multi:"normal | alternate",comma:true},"-webkit-animation-duration":{multi:"<time>",comma:true},"-webkit-animation-iteration-count":{multi:"<number> | infinite",comma:true},"-webkit-animation-name":{multi:"none | <ident>",comma:true},"-webkit-animation-play-state":{multi:"running | paused",comma:true},"-o-animation-delay":{multi:"<time>",comma:true},"-o-animation-direction":{multi:"normal | alternate",comma:true},"-o-animation-duration":{multi:"<time>",comma:true},"-o-animation-iteration-count":{multi:"<number> | infinite",comma:true},"-o-animation-name":{multi:"none | <ident>",comma:true},"-o-animation-play-state":{multi:"running | paused",comma:true},appearance:"icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | inherit",azimuth:function(expression){var simple="<angle> | leftwards | rightwards | inherit",direction="left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",behind=false,valid=false,part;if(!ValidationTypes.isAny(expression,simple)){if(ValidationTypes.isAny(expression,"behind")){behind=true;valid=true}if(ValidationTypes.isAny(expression,direction)){valid=true;if(!behind){ValidationTypes.isAny(expression,"behind")}}}if(expression.hasNext()){part=expression.next();if(valid){throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected (<'azimuth'>) but found '"+part+"'.",part.line,part.col)}}},"backface-visibility":"visible | hidden",background:1,"background-attachment":{multi:"<attachment>",comma:true},"background-clip":{multi:"<box>",comma:true},"background-color":"<color> | inherit","background-image":{multi:"<bg-image>",comma:true},"background-origin":{multi:"<box>",comma:true},"background-position":{multi:"<bg-position>",comma:true},"background-repeat":{multi:"<repeat-style>"},"background-size":{multi:"<bg-size>",comma:true},"baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color>","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate | inherit","border-color":{multi:"<color> | inherit",max:4},"border-image":1,"border-image-outset":{multi:"<length> | <number>",max:4},"border-image-repeat":{multi:"stretch | repeat | round",max:2},"border-image-slice":function(expression){var valid=false,numeric="<number> | <percentage>",fill=false,count=0,max=4,part;if(ValidationTypes.isAny(expression,"fill")){fill=true;valid=true}while(expression.hasNext()&&count<max){valid=ValidationTypes.isAny(expression,numeric);if(!valid){break}count++}if(!fill){ValidationTypes.isAny(expression,"fill")}else{valid=true}if(expression.hasNext()){part=expression.next();if(valid){throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found '"+part+"'.",part.line,part.col)}}},"border-image-source":"<image> | none","border-image-width":{multi:"<length> | <percentage> | <number> | auto",max:4},"border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color> | inherit","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":function(expression){var valid=false,numeric="<length> | <percentage>",slash=false,fill=false,count=0,max=8,part;while(expression.hasNext()&&count<max){valid=ValidationTypes.isAny(expression,numeric);if(!valid){if(expression.peek()=="/"&&count>1&&!slash){slash=true;max=count+5;expression.next()}else{break}}count++}if(expression.hasNext()){part=expression.next();if(valid){throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected (<'border-radius'>) but found '"+part+"'.",part.line,part.col)}}},"border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color> | inherit","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":{multi:"<length> | inherit",max:2},"border-style":{multi:"<border-style>",max:4},"border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color> | inherit","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":{multi:"<border-width>",max:4},bottom:"<margin-width> | inherit","box-align":"start | end | center | baseline | stretch","box-decoration-break":"slice |clone","box-direction":"normal | reverse | inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single | multiple","box-ordinal-group":"<integer>","box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","box-pack":"start | end | center | justify","box-shadow":function(expression){var result=false,part;if(!ValidationTypes.isAny(expression,"none")){Validation.multiProperty("<shadow>",expression,true,Infinity)}else{if(expression.hasNext()){part=expression.next();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}}},"box-sizing":"content-box | border-box | inherit","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom | inherit",clear:"none | right | left | both | inherit",clip:1,color:"<color> | inherit","color-profile":1,"column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before | inherit","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl | inherit",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit","dominant-baseline":1,"drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"initial | <integer>",elevation:"<angle> | below | level | above | higher | lower | inherit","empty-cells":"show | hide | inherit",filter:1,fit:"fill | hidden | meet | slice","fit-position":1,"float":"left | right | none | inherit","float-offset":1,font:1,"font-family":1,"font-size":"<absolute-size> | <relative-size> | <length> | <percentage> | inherit","font-size-adjust":"<number> | none | inherit","font-stretch":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit","font-style":"normal | italic | oblique | inherit","font-variant":"normal | small-caps | inherit","font-weight":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit","grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-span":"<integer>","grid-row-sizing":1,"hanging-punctuation":1,height:"<margin-width> | inherit","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":1,"image-resolution":1,"inline-box-align":"initial | last | <integer>",left:"<margin-width> | inherit","letter-spacing":"<length> | normal | inherit","line-height":"<number> | <length> | <percentage> | normal | inherit","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none | inherit","list-style-position":"inside | outside | inherit","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",margin:{multi:"<margin-width> | inherit",max:4},"margin-bottom":"<margin-width> | inherit","margin-left":"<margin-width> | inherit","margin-right":"<margin-width> | inherit","margin-top":"<margin-width> | inherit",mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":"<length> | <percentage> | none | inherit","max-width":"<length> | <percentage> | none | inherit","min-height":"<length> | <percentage> | inherit","min-width":"<length> | <percentage> | inherit","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:"<number> | inherit",orphans:"<integer> | inherit",outline:1,"outline-color":"<color> | invert | inherit","outline-offset":1,"outline-style":"<border-style> | inherit","outline-width":"<border-width> | inherit",overflow:"visible | hidden | scroll | auto | inherit","overflow-style":1,"overflow-x":1,"overflow-y":1,padding:{multi:"<padding-width> | inherit",max:4},"padding-bottom":"<padding-width> | inherit","padding-left":"<padding-width> | inherit","padding-right":"<padding-width> | inherit","padding-top":"<padding-width> | inherit",page:1,"page-break-after":"auto | always | avoid | left | right | inherit","page-break-before":"auto | always | avoid | left | right | inherit","page-break-inside":"auto | avoid | inherit","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,position:"static | relative | absolute | fixed | inherit","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width> | inherit",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:"normal | none | spell-out | inherit","speak-header":"once | always | inherit","speak-numeral":"digits | continuous | inherit","speak-punctuation":"code | none | inherit","speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":"auto | fixed | inherit","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | inherit","text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage> | inherit","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none | inherit","text-wrap":"normal | none | avoid",top:"<margin-width> | inherit",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | bidi-override | inherit","user-modify":"read-only | read-write | write-only | inherit","user-select":"none | text | toggle | element | elements | all | inherit","vertical-align":"<percentage> | <length> | baseline | sub | super | top | text-top | middle | bottom | text-bottom | inherit",visibility:"visible | hidden | collapse | inherit","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | inherit","white-space-collapse":1,widows:"<integer> | inherit",width:"<length> | <percentage> | auto | inherit","word-break":"normal | keep-all | break-all","word-spacing":"<length> | normal | inherit","word-wrap":1,"z-index":"<integer> | auto | inherit",zoom:"<number> | <percentage> | normal"};function PropertyName(text,hack,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_NAME_TYPE);this.hack=hack}PropertyName.prototype=new SyntaxUnit;PropertyName.prototype.constructor=PropertyName;PropertyName.prototype.toString=function(){return(this.hack?this.hack:"")+this.text};function PropertyValue(parts,line,col){SyntaxUnit.call(this,parts.join(" "),line,col,Parser.PROPERTY_VALUE_TYPE);this.parts=parts}PropertyValue.prototype=new SyntaxUnit;PropertyValue.prototype.constructor=PropertyValue;function PropertyValueIterator(value){this._i=0;this._parts=value.parts;this._marks=[];this.value=value}PropertyValueIterator.prototype.count=function(){return this._parts.length};PropertyValueIterator.prototype.isFirst=function(){return this._i===0};PropertyValueIterator.prototype.hasNext=function(){return this._i<this._parts.length};PropertyValueIterator.prototype.mark=function(){this._marks.push(this._i)};PropertyValueIterator.prototype.peek=function(count){return this.hasNext()?this._parts[this._i+(count||0)]:null};PropertyValueIterator.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null};PropertyValueIterator.prototype.previous=function(){return this._i>0?this._parts[--this._i]:null};PropertyValueIterator.prototype.restore=function(){if(this._marks.length){this._i=this._marks.pop()}};function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE);this.type="unknown";var temp;if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){this.type="dimension";this.value=+RegExp.$1;this.units=RegExp.$2;switch(this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":this.type="length";break;case"deg":case"rad":case"grad":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution";break}}else if(/^([+\-]?[\d\.]+)%$/i.test(text)){this.type="percentage";this.value=+RegExp.$1}else if(/^([+\-]?[\d\.]+)%$/i.test(text)){this.type="percentage";this.value=+RegExp.$1}else if(/^([+\-]?\d+)$/i.test(text)){this.type="integer";this.value=+RegExp.$1}else if(/^([+\-]?[\d\.]+)$/i.test(text)){this.type="number";this.value=+RegExp.$1}else if(/^#([a-f0-9]{3,6})/i.test(text)){this.type="color";temp=RegExp.$1;if(temp.length==3){this.red=parseInt(temp.charAt(0)+temp.charAt(0),16);this.green=parseInt(temp.charAt(1)+temp.charAt(1),16);this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)}else{this.red=parseInt(temp.substring(0,2),16);this.green=parseInt(temp.substring(2,4),16);this.blue=parseInt(temp.substring(4,6),16)}}else if(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)){this.type="color";this.red=+RegExp.$1;this.green=+RegExp.$2;this.blue=+RegExp.$3}else if(/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){this.type="color";this.red=+RegExp.$1*255/100;this.green=+RegExp.$2*255/100;this.blue=+RegExp.$3*255/100}else if(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)){this.type="color";this.red=+RegExp.$1;this.green=+RegExp.$2;this.blue=+RegExp.$3;this.alpha=+RegExp.$4}else if(/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){this.type="color";this.red=+RegExp.$1*255/100;this.green=+RegExp.$2*255/100;this.blue=+RegExp.$3*255/100;this.alpha=+RegExp.$4}else if(/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){this.type="color";this.hue=+RegExp.$1;this.saturation=+RegExp.$2/100;this.lightness=+RegExp.$3/100}else if(/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){this.type="color";this.hue=+RegExp.$1;this.saturation=+RegExp.$2/100;this.lightness=+RegExp.$3/100;this.alpha=+RegExp.$4}else if(/^url\(["']?([^\)"']+)["']?\)/i.test(text)){this.type="uri";this.uri=RegExp.$1}else if(/^([^\(]+)\(/i.test(text)){this.type="function";this.name=RegExp.$1;this.value=text}else if(/^["'][^"']*["']/.test(text)){this.type="string";this.value=eval(text)}else if(Colors[text.toLowerCase()]){this.type="color";temp=Colors[text.toLowerCase()].substring(1);this.red=parseInt(temp.substring(0,2),16);this.green=parseInt(temp.substring(2,4),16);this.blue=parseInt(temp.substring(4,6),16)}else if(/^[\,\/]$/.test(text)){this.type="operator";this.value=text}else if(/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)){this.type="identifier";this.value=text}}PropertyValuePart.prototype=new SyntaxUnit;PropertyValuePart.prototype.constructor=PropertyValuePart;PropertyValuePart.fromToken=function(token){return new PropertyValuePart(token.value,token.startLine,token.startCol)};var Pseudos={":first-letter":1,":first-line":1,":before":1,":after":1};Pseudos.ELEMENT=1;Pseudos.CLASS=2;Pseudos.isElement=function(pseudo){return pseudo.indexOf("::")===0||Pseudos[pseudo.toLowerCase()]==Pseudos.ELEMENT};function Selector(parts,line,col){SyntaxUnit.call(this,parts.join(" "),line,col,Parser.SELECTOR_TYPE);this.parts=parts;this.specificity=Specificity.calculate(this)}Selector.prototype=new SyntaxUnit;Selector.prototype.constructor=Selector;function SelectorPart(elementName,modifiers,text,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_PART_TYPE);this.elementName=elementName;this.modifiers=modifiers}SelectorPart.prototype=new SyntaxUnit;SelectorPart.prototype.constructor=SelectorPart;function SelectorSubPart(text,type,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_SUB_PART_TYPE);this.type=type;this.args=[]}SelectorSubPart.prototype=new SyntaxUnit;SelectorSubPart.prototype.constructor=SelectorSubPart;function Specificity(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d}Specificity.prototype={constructor:Specificity,compare:function(other){var comps=["a","b","c","d"],i,len;for(i=0,len=comps.length;i<len;i++){if(this[comps[i]]<other[comps[i]]){return-1}else if(this[comps[i]]>other[comps[i]]){return 1}}return 0},valueOf:function(){return this.a*1e3+this.b*100+this.c*10+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}};Specificity.calculate=function(selector){var i,len,part,b=0,c=0,d=0;function updateValues(part){var i,j,len,num,elementName=part.elementName?part.elementName.text:"",modifier;if(elementName&&elementName.charAt(elementName.length-1)!="*"){d++}for(i=0,len=part.modifiers.length;i<len;i++){modifier=part.modifiers[i];switch(modifier.type){case"class":case"attribute":c++;break;case"id":b++;break;case"pseudo":if(Pseudos.isElement(modifier.text)){d++}else{c++}break;case"not":for(j=0,num=modifier.args.length;j<num;j++){updateValues(modifier.args[j])}}}}for(i=0,len=selector.parts.length;i<len;i++){part=selector.parts[i];if(part instanceof SelectorPart){updateValues(part)}}return new Specificity(0,b,c,d)};var h=/^[0-9a-fA-F]$/,nonascii=/^[\u0080-\uFFFF]$/,nl=/\n|\r\n|\r|\f/;function isHexDigit(c){return c!==null&&h.test(c)}function isDigit(c){return c!==null&&/\d/.test(c)}function isWhitespace(c){return c!==null&&/\s/.test(c)}function isNewLine(c){return c!==null&&nl.test(c)}function isNameStart(c){return c!==null&&/[a-z_\u0080-\uFFFF\\]/i.test(c)}function isNameChar(c){return c!==null&&(isNameStart(c)||/[0-9\-\\]/.test(c))}function isIdentStart(c){return c!==null&&(isNameStart(c)||/\-\\/.test(c))}function mix(receiver,supplier){for(var prop in supplier){if(supplier.hasOwnProperty(prop)){receiver[prop]=supplier[prop]}}return receiver}function TokenStream(input){TokenStreamBase.call(this,input,Tokens)}TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(channel){var c,reader=this._reader,token=null,startLine=reader.getLine(),startCol=reader.getCol();c=reader.read();while(c){switch(c){case"/":if(reader.peek()=="*"){token=this.commentToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}break;case"|":case"~":case"^":case"$":case"*":if(reader.peek()=="="){token=this.comparisonToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}break;case'"':case"'":token=this.stringToken(c,startLine,startCol);break;case"#":if(isNameChar(reader.peek())){token=this.hashToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}break;case".":if(isDigit(reader.peek())){token=this.numberToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}break;case"-":if(reader.peek()=="-"){token=this.htmlCommentEndToken(c,startLine,startCol)}else if(isNameStart(reader.peek())){token=this.identOrFunctionToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}break;case"!":token=this.importantToken(c,startLine,startCol);break;case"@":token=this.atRuleToken(c,startLine,startCol);break;case":":token=this.notToken(c,startLine,startCol);break;case"<":token=this.htmlCommentStartToken(c,startLine,startCol);break;case"U":case"u":if(reader.peek()=="+"){token=this.unicodeRangeToken(c,startLine,startCol);break};default:if(isDigit(c)){token=this.numberToken(c,startLine,startCol)}else if(isWhitespace(c)){token=this.whitespaceToken(c,startLine,startCol)}else if(isIdentStart(c)){token=this.identOrFunctionToken(c,startLine,startCol)}else{token=this.charToken(c,startLine,startCol)}}break}if(!token&&c===null){token=this.createToken(Tokens.EOF,null,startLine,startCol)}return token},createToken:function(tt,value,startLine,startCol,options){var reader=this._reader;options=options||{};return{value:value,type:tt,channel:options.channel,hide:options.hide||false,startLine:startLine,startCol:startCol,endLine:reader.getLine(),endCol:reader.getCol()}},atRuleToken:function(first,startLine,startCol){var rule=first,reader=this._reader,tt=Tokens.CHAR,valid=false,ident,c;reader.mark();ident=this.readName();rule=first+ident;tt=Tokens.type(rule.toLowerCase());if(tt==Tokens.CHAR||tt==Tokens.UNKNOWN){if(rule.length>1){tt=Tokens.UNKNOWN_SYM}else{tt=Tokens.CHAR;rule=first;reader.reset()}}return this.createToken(tt,rule,startLine,startCol)},charToken:function(c,startLine,startCol){var tt=Tokens.type(c);if(tt==-1){tt=Tokens.CHAR}return this.createToken(tt,c,startLine,startCol)},commentToken:function(first,startLine,startCol){var reader=this._reader,comment=this.readComment(first);return this.createToken(Tokens.COMMENT,comment,startLine,startCol)},comparisonToken:function(c,startLine,startCol){var reader=this._reader,comparison=c+reader.read(),tt=Tokens.type(comparison)||Tokens.CHAR;return this.createToken(tt,comparison,startLine,startCol)},hashToken:function(first,startLine,startCol){var reader=this._reader,name=this.readName(first);return this.createToken(Tokens.HASH,name,startLine,startCol)},htmlCommentStartToken:function(first,startLine,startCol){var reader=this._reader,text=first;reader.mark();text+=reader.readCount(3);if(text=="<!--"){return this.createToken(Tokens.CDO,text,startLine,startCol)}else{reader.reset();return this.charToken(first,startLine,startCol)}},htmlCommentEndToken:function(first,startLine,startCol){var reader=this._reader,text=first;reader.mark();text+=reader.readCount(2);if(text=="-->"){return this.createToken(Tokens.CDC,text,startLine,startCol)}else{reader.reset();return this.charToken(first,startLine,startCol)}},identOrFunctionToken:function(first,startLine,startCol){var reader=this._reader,ident=this.readName(first),tt=Tokens.IDENT;if(reader.peek()=="("){ident+=reader.read();if(ident.toLowerCase()=="url("){tt=Tokens.URI;ident=this.readURI(ident);if(ident.toLowerCase()=="url("){tt=Tokens.FUNCTION}}else{tt=Tokens.FUNCTION}}else if(reader.peek()==":"){if(ident.toLowerCase()=="progid"){ident+=reader.readTo("(");tt=Tokens.IE_FUNCTION}}return this.createToken(tt,ident,startLine,startCol)},importantToken:function(first,startLine,startCol){var reader=this._reader,important=first,tt=Tokens.CHAR,temp,c;reader.mark();c=reader.read();while(c){if(c=="/"){if(reader.peek()!="*"){break}else{temp=this.readComment(c);if(temp===""){break}}}else if(isWhitespace(c)){important+=c+this.readWhitespace()}else if(/i/i.test(c)){temp=reader.readCount(8);if(/mportant/i.test(temp)){important+=c+temp;tt=Tokens.IMPORTANT_SYM}break}else{break}c=reader.read()}if(tt==Tokens.CHAR){reader.reset();return this.charToken(first,startLine,startCol)}else{return this.createToken(tt,important,startLine,startCol)}},notToken:function(first,startLine,startCol){var reader=this._reader,text=first;reader.mark();text+=reader.readCount(4);if(text.toLowerCase()==":not("){return this.createToken(Tokens.NOT,text,startLine,startCol)}else{reader.reset();return this.charToken(first,startLine,startCol)}},numberToken:function(first,startLine,startCol){var reader=this._reader,value=this.readNumber(first),ident,tt=Tokens.NUMBER,c=reader.peek();if(isIdentStart(c)){ident=this.readName(reader.read());value+=ident;if(/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){tt=Tokens.LENGTH}else if(/^deg|^rad$|^grad$/i.test(ident)){tt=Tokens.ANGLE}else if(/^ms$|^s$/i.test(ident)){tt=Tokens.TIME}else if(/^hz$|^khz$/i.test(ident)){tt=Tokens.FREQ}else if(/^dpi$|^dpcm$/i.test(ident)){tt=Tokens.RESOLUTION}else{tt=Tokens.DIMENSION}}else if(c=="%"){value+=reader.read();tt=Tokens.PERCENTAGE}return this.createToken(tt,value,startLine,startCol)},stringToken:function(first,startLine,startCol){var delim=first,string=first,reader=this._reader,prev=first,tt=Tokens.STRING,c=reader.read();while(c){string+=c;if(c==delim&&prev!="\\"){break}if(isNewLine(reader.peek())&&c!="\\"){tt=Tokens.INVALID;break}prev=c;c=reader.read()}if(c===null){tt=Tokens.INVALID}return this.createToken(tt,string,startLine,startCol)},unicodeRangeToken:function(first,startLine,startCol){var reader=this._reader,value=first,temp,tt=Tokens.CHAR;if(reader.peek()=="+"){reader.mark();value+=reader.read();value+=this.readUnicodeRangePart(true);if(value.length==2){reader.reset()}else{tt=Tokens.UNICODE_RANGE;if(value.indexOf("?")==-1){if(reader.peek()=="-"){reader.mark();temp=reader.read();temp+=this.readUnicodeRangePart(false);if(temp.length==1){reader.reset()}else{value+=temp}}}}}return this.createToken(tt,value,startLine,startCol)},whitespaceToken:function(first,startLine,startCol){var reader=this._reader,value=first+this.readWhitespace();return this.createToken(Tokens.S,value,startLine,startCol)},readUnicodeRangePart:function(allowQuestionMark){var reader=this._reader,part="",c=reader.peek();while(isHexDigit(c)&&part.length<6){reader.read();part+=c;c=reader.peek()}if(allowQuestionMark){while(c=="?"&&part.length<6){reader.read();part+=c;c=reader.peek()}}return part},readWhitespace:function(){var reader=this._reader,whitespace="",c=reader.peek();while(isWhitespace(c)){reader.read();whitespace+=c;c=reader.peek()}return whitespace},readNumber:function(first){var reader=this._reader,number=first,hasDot=first==".",c=reader.peek();while(c){if(isDigit(c)){number+=reader.read()}else if(c=="."){if(hasDot){break}else{hasDot=true;number+=reader.read()}}else{break}c=reader.peek()}return number},readString:function(){var reader=this._reader,delim=reader.read(),string=delim,prev=delim,c=reader.peek();while(c){c=reader.read();string+=c;if(c==delim&&prev!="\\"){break}if(isNewLine(reader.peek())&&c!="\\"){string="";break}prev=c;c=reader.peek()}if(c===null){string=""}return string},readURI:function(first){var reader=this._reader,uri=first,inner="",c=reader.peek();reader.mark();while(c&&isWhitespace(c)){reader.read();c=reader.peek()}if(c=="'"||c=='"'){inner=this.readString()}else{inner=this.readURL()}c=reader.peek();while(c&&isWhitespace(c)){reader.read();c=reader.peek()}if(inner===""||c!=")"){uri=first;reader.reset()}else{uri+=inner+reader.read()}return uri},readURL:function(){var reader=this._reader,url="",c=reader.peek();while(/^[!#$%&\\*-~]$/.test(c)){url+=reader.read();c=reader.peek()}return url},readName:function(first){var reader=this._reader,ident=first||"",c=reader.peek();while(true){if(c=="\\"){ident+=this.readEscape(reader.read());c=reader.peek()}else if(c&&isNameChar(c)){ident+=reader.read();c=reader.peek()}else{break}}return ident},readEscape:function(first){var reader=this._reader,cssEscape=first||"",i=0,c=reader.peek();if(isHexDigit(c)){do{cssEscape+=reader.read();c=reader.peek()}while(c&&isHexDigit(c)&&++i<6)}if(cssEscape.length==3&&/\s/.test(c)||cssEscape.length==7||cssEscape.length==1){reader.read()}else{c=""}return cssEscape+c},readComment:function(first){var reader=this._reader,comment=first||"",c=reader.read();if(c=="*"){while(c){comment+=c;if(comment.length>2&&c=="*"&&reader.peek()=="/"){comment+=reader.read();break}c=reader.read()}return comment}else{return""}}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:true},{name:"COMMENT",comment:true,hide:true,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-ms-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var nameMap=[],typeMap={};Tokens.UNKNOWN=-1;Tokens.unshift({name:"EOF"});for(var i=0,len=Tokens.length;i<len;i++){nameMap.push(Tokens[i].name);Tokens[Tokens[i].name]=i;if(Tokens[i].text){if(Tokens[i].text instanceof Array){for(var j=0;j<Tokens[i].text.length;j++){typeMap[Tokens[i].text[j]]=i}}else{typeMap[Tokens[i].text]=i}}}Tokens.name=function(tt){return nameMap[tt]};Tokens.type=function(c){return typeMap[c]||-1}})();var Validation={validate:function(property,value){var name=property.toString().toLowerCase(),parts=value.parts,expression=new PropertyValueIterator(value),spec=Properties[name],part,valid,j,count,msg,types,last,literals,max,multi,group;if(!spec){if(name.indexOf("-")!==0){throw new ValidationError("Unknown property '"+property+"'.",property.line,property.col)}}else if(typeof spec!="number"){if(typeof spec=="string"){if(spec.indexOf("||")>-1){this.groupProperty(spec,expression)}else{this.singleProperty(spec,expression,1)}}else if(spec.multi){this.multiProperty(spec.multi,expression,spec.comma,spec.max||Infinity)}else if(typeof spec=="function"){spec(expression)}}},singleProperty:function(types,expression,max,partial){var result=false,value=expression.value,count=0,part;while(expression.hasNext()&&count<max){result=ValidationTypes.isAny(expression,types);if(!result){break}count++}if(!result){if(expression.hasNext()&&!expression.isFirst()){part=expression.peek();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected ("+types+") but found '"+value+"'.",value.line,value.col)}}else if(expression.hasNext()){part=expression.next();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}},multiProperty:function(types,expression,comma,max){var result=false,value=expression.value,count=0,sep=false,part;while(expression.hasNext()&&!result&&count<max){if(ValidationTypes.isAny(expression,types)){count++;if(!expression.hasNext()){result=true}else if(comma){if(expression.peek()==","){part=expression.next()}else{break}}}else{break}}if(!result){if(expression.hasNext()&&!expression.isFirst()){part=expression.peek();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{part=expression.previous();if(comma&&part==","){throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected ("+types+") but found '"+value+"'.",value.line,value.col)}}}else if(expression.hasNext()){part=expression.next();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}},groupProperty:function(types,expression,comma){var result=false,value=expression.value,typeCount=types.split("||").length,groups={count:0},partial=false,name,part;while(expression.hasNext()&&!result){name=ValidationTypes.isAnyOfGroup(expression,types);if(name){if(groups[name]){break}else{groups[name]=1;groups.count++;partial=true;if(groups.count==typeCount||!expression.hasNext()){result=true}}}else{break}}if(!result){if(partial&&expression.hasNext()){part=expression.peek();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}else{throw new ValidationError("Expected ("+types+") but found '"+value+"'.",value.line,value.col)}}else if(expression.hasNext()){part=expression.next();throw new ValidationError("Expected end of value but found '"+part+"'.",part.line,part.col)}}};function ValidationError(message,line,col){this.col=col;this.line=line;this.message=message}ValidationError.prototype=new Error;var ValidationTypes={isLiteral:function(part,literals){var text=part.text.toString().toLowerCase(),args=literals.split(" | "),i,len,found=false;for(i=0,len=args.length;i<len&&!found;i++){if(text==args[i].toLowerCase()){found=true}}return found},isSimple:function(type){return!!this.simple[type]},isComplex:function(type){return!!this.complex[type]},isAny:function(expression,types){var args=types.split(" | "),i,len,found=false;for(i=0,len=args.length;i<len&&!found&&expression.hasNext();i++){found=this.isType(expression,args[i])}return found},isAnyOfGroup:function(expression,types){var args=types.split(" || "),i,len,found=false;for(i=0,len=args.length;i<len&&!found;i++){found=this.isType(expression,args[i])}return found?args[i-1]:false},isType:function(expression,type){var part=expression.peek(),result=false;if(type.charAt(0)!="<"){result=this.isLiteral(part,type);if(result){expression.next()}}else if(this.simple[type]){result=this.simple[type](part);if(result){expression.next()}}else{result=this.complex[type](expression)}return result},simple:{"<absolute-size>":function(part){return ValidationTypes.isLiteral(part,"xx-small | x-small | small | medium | large | x-large | xx-large")},"<attachment>":function(part){return ValidationTypes.isLiteral(part,"scroll | fixed | local")},"<attr>":function(part){return part.type=="function"&&part.name=="attr"},"<bg-image>":function(part){return this["<image>"](part)||this["<gradient>"](part)||part=="none"},"<gradient>":function(part){return part.type=="function"&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part)},"<box>":function(part){return ValidationTypes.isLiteral(part,"padding-box | border-box | content-box")},"<content>":function(part){return part.type=="function"&&part.name=="content"},"<relative-size>":function(part){return ValidationTypes.isLiteral(part,"smaller | larger")},"<ident>":function(part){return part.type=="identifier"},"<length>":function(part){return part.type=="length"||part.type=="number"||part.type=="integer"||part=="0"},"<color>":function(part){return part.type=="color"||part=="transparent"},"<number>":function(part){return part.type=="number"||this["<integer>"](part)},"<integer>":function(part){return part.type=="integer"},"<line>":function(part){return part.type=="integer"},"<angle>":function(part){return part.type=="angle"},"<uri>":function(part){return part.type=="uri"},"<image>":function(part){return this["<uri>"](part)},"<percentage>":function(part){return part.type=="percentage"||part=="0"},"<border-width>":function(part){return this["<length>"](part)||ValidationTypes.isLiteral(part,"thin | medium | thick")},"<border-style>":function(part){return ValidationTypes.isLiteral(part,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"<margin-width>":function(part){return this["<length>"](part)||this["<percentage>"](part)||ValidationTypes.isLiteral(part,"auto")},"<padding-width>":function(part){return this["<length>"](part)||this["<percentage>"](part)},"<shape>":function(part){return part.type=="function"&&(part.name=="rect"||part.name=="inset-rect")},"<time>":function(part){return part.type=="time"}},complex:{"<bg-position>":function(expression){var types=this,result=false,numeric="<percentage> | <length>",xDir="left | center | right",yDir="top | center | bottom",part,i,len;if(ValidationTypes.isAny(expression,"top | bottom")){result=true}else{if(ValidationTypes.isAny(expression,numeric)){if(expression.hasNext()){result=ValidationTypes.isAny(expression,numeric+" | "+yDir)}}else if(ValidationTypes.isAny(expression,xDir)){if(expression.hasNext()){if(ValidationTypes.isAny(expression,yDir)){result=true;ValidationTypes.isAny(expression,numeric)}else if(ValidationTypes.isAny(expression,numeric)){if(ValidationTypes.isAny(expression,yDir)){ValidationTypes.isAny(expression,numeric)}result=true}}}}return result},"<bg-size>":function(expression){var types=this,result=false,numeric="<percentage> | <length> | auto",part,i,len;if(ValidationTypes.isAny(expression,"cover | contain")){result=true}else if(ValidationTypes.isAny(expression,numeric)){result=true;ValidationTypes.isAny(expression,numeric)}return result},"<repeat-style>":function(expression){var result=false,values="repeat | space | round | no-repeat",part;if(expression.hasNext()){part=expression.next();if(ValidationTypes.isLiteral(part,"repeat-x | repeat-y")){result=true}else if(ValidationTypes.isLiteral(part,values)){result=true;if(expression.hasNext()&&ValidationTypes.isLiteral(expression.peek(),values)){expression.next()}}}return result},"<shadow>":function(expression){var result=false,count=0,inset=false,color=false,part;if(expression.hasNext()){if(ValidationTypes.isAny(expression,"inset")){inset=true}if(ValidationTypes.isAny(expression,"<color>")){color=true}while(ValidationTypes.isAny(expression,"<length>")&&count<4){count++}if(expression.hasNext()){if(!color){ValidationTypes.isAny(expression,"<color>")}if(!inset){ValidationTypes.isAny(expression,"inset")}}result=count>=2&&count<=4}return result},"<x-one-radius>":function(expression){var result=false,count=0,numeric="<length> | <percentage>",part;if(ValidationTypes.isAny(expression,numeric)){result=true;ValidationTypes.isAny(expression,numeric)}return result}}};parserlib.css={Colors:Colors,Combinator:Combinator,Parser:Parser,PropertyName:PropertyName,PropertyValue:PropertyValue,PropertyValuePart:PropertyValuePart,MediaFeature:MediaFeature,MediaQuery:MediaQuery,Selector:Selector,SelectorPart:SelectorPart,SelectorSubPart:SelectorSubPart,Specificity:Specificity,TokenStream:TokenStream,Tokens:Tokens,ValidationError:ValidationError}})();var CSSLint=function(){var rules=[],formatters=[],api=new parserlib.util.EventTarget;api.version="0.9.8";api.addRule=function(rule){rules.push(rule);rules[rule.id]=rule};api.clearRules=function(){rules=[]};api.getRules=function(){return[].concat(rules).sort(function(a,b){return a.id>b.id?1:0})};api.addFormatter=function(formatter){formatters[formatter.id]=formatter};api.getFormatter=function(formatId){return formatters[formatId]};api.format=function(results,filename,formatId,options){var formatter=this.getFormatter(formatId),result=null;if(formatter){result=formatter.startFormat();result+=formatter.formatResults(results,filename,options||{});result+=formatter.endFormat()}return result};api.hasFormat=function(formatId){return formatters.hasOwnProperty(formatId)};api.verify=function(text,ruleset){var i=0,len=rules.length,reporter,lines,report,parser=new parserlib.css.Parser({starHack:true,ieFilters:true,underscoreHack:true,strict:false});lines=text.replace(/\n\r?/g,"$split$").split("$split$");if(!ruleset){ruleset={};while(i<len){ruleset[rules[i++].id]=1}}reporter=new Reporter(lines,ruleset);ruleset.errors=2;for(i in ruleset){if(ruleset.hasOwnProperty(i)){if(rules[i]){rules[i].init(parser,reporter)}}}try{parser.parse(text)}catch(ex){reporter.error("Fatal error, cannot continue: "+ex.message,ex.line,ex.col,{})}report={messages:reporter.messages,stats:reporter.stats};report.messages.sort(function(a,b){if(a.rollup&&!b.rollup){return 1}else if(!a.rollup&&b.rollup){return-1}else{return a.line-b.line}});return report};return api}();function Reporter(lines,ruleset){this.messages=[];this.stats=[];this.lines=lines;this.ruleset=ruleset}Reporter.prototype={constructor:Reporter,error:function(message,line,col,rule){this.messages.push({type:"error",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule||{}})},warn:function(message,line,col,rule){this.report(message,line,col,rule)},report:function(message,line,col,rule){this.messages.push({type:this.ruleset[rule.id]==2?"error":"warning",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule})},info:function(message,line,col,rule){this.messages.push({type:"info",line:line,col:col,message:message,evidence:this.lines[line-1],rule:rule})},rollupError:function(message,rule){this.messages.push({type:"error",rollup:true,message:message,rule:rule})},rollupWarn:function(message,rule){this.messages.push({type:"warning",rollup:true,message:message,rule:rule})},stat:function(name,value){this.stats[name]=value}};CSSLint._Reporter=Reporter;CSSLint.Util={mix:function(receiver,supplier){var prop;for(prop in supplier){if(supplier.hasOwnProperty(prop)){receiver[prop]=supplier[prop]}}return prop},indexOf:function(values,value){if(values.indexOf){return values.indexOf(value)}else{for(var i=0,len=values.length;i<len;i++){if(values[i]===value){return i}}return-1}},forEach:function(values,func){if(values.forEach){return values.forEach(func)}else{for(var i=0,len=values.length;i<len;i++){func(values[i],i,values)}}}};CSSLint.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,classCount,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];for(j=0;j<selector.parts.length;j++){part=selector.parts[j];if(part.type==parser.SELECTOR_PART_TYPE){classCount=0;for(k=0;k<part.modifiers.length;k++){modifier=part.modifiers[k];if(modifier.type=="class"){classCount++}if(classCount>1){reporter.report("Don't use adjoining classes.",part.line,part.col,rule)}}}}}})}});CSSLint.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",browsers:"All",init:function(parser,reporter){var rule=this,widthProperties={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},heightProperties={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},properties;function startRule(){properties={}}function endRule(){var prop;if(properties.height){for(prop in heightProperties){if(heightProperties.hasOwnProperty(prop)&&properties[prop]){if(!(prop=="padding"&&properties[prop].value.parts.length===2&&properties[prop].value.parts[0].value===0)){reporter.report("Using height with "+prop+" can sometimes make elements larger than you expect.",properties[prop].line,properties[prop].col,rule)}}}}if(properties.width){for(prop in widthProperties){if(widthProperties.hasOwnProperty(prop)&&properties[prop]){if(!(prop=="padding"&&properties[prop].value.parts.length===2&&properties[prop].value.parts[1].value===0)){reporter.report("Using width with "+prop+" can sometimes make elements larger than you expect.",properties[prop].line,properties[prop].col,rule)}}}}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startpage",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("property",function(event){var name=event.property.text.toLowerCase();if(heightProperties[name]||widthProperties[name]){if(!/^0\S*$/.test(event.value)&&!(name=="border"&&event.value=="none")){properties[name]={line:event.property.line,col:event.property.col,value:event.value}}}else{if(name=="width"||name=="height"){properties[name]=1}}});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule);parser.addListener("endpage",endRule);parser.addListener("endpagemargin",endRule);parser.addListener("endkeyframerule",endRule)}});CSSLint.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var name=event.property.text.toLowerCase();if(name=="box-sizing"){reporter.report("The box-sizing property isn't supported in IE6 and IE7.",event.line,event.col,rule)}})}});CSSLint.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(parser,reporter){var rule=this,compatiblePrefixes,properties,prop,variations,prefixed,i,len,arrayPush=Array.prototype.push,applyTo=[];compatiblePrefixes={animation:"webkit moz ms","animation-delay":"webkit moz ms","animation-direction":"webkit moz ms","animation-duration":"webkit moz ms","animation-fill-mode":"webkit moz ms","animation-iteration-count":"webkit moz ms","animation-name":"webkit moz ms","animation-play-state":"webkit moz ms","animation-timing-function":"webkit moz ms",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit moz","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o ms","transition-delay":"webkit moz o ms","transition-duration":"webkit moz o ms","transition-property":"webkit moz o ms","transition-timing-function":"webkit moz o ms","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"};for(prop in compatiblePrefixes){if(compatiblePrefixes.hasOwnProperty(prop)){variations=[];prefixed=compatiblePrefixes[prop].split(" ");for(i=0,len=prefixed.length;i<len;i++){variations.push("-"+prefixed[i]+"-"+prop)}compatiblePrefixes[prop]=variations;arrayPush.apply(applyTo,variations)}}parser.addListener("startrule",function(){properties=[]});parser.addListener("property",function(event){var name=event.property;if(CSSLint.Util.indexOf(applyTo,name.text)>-1){properties.push(name)}});parser.addListener("endrule",function(event){if(!properties.length){return}var propertyGroups={},i,len,name,prop,variations,value,full,actual,item,propertiesSpecified;for(i=0,len=properties.length;i<len;i++){name=properties[i];for(prop in compatiblePrefixes){if(compatiblePrefixes.hasOwnProperty(prop)){variations=compatiblePrefixes[prop];if(CSSLint.Util.indexOf(variations,name.text)>-1){if(!propertyGroups[prop]){propertyGroups[prop]={full:variations.slice(0),actual:[],actualNodes:[]}}if(CSSLint.Util.indexOf(propertyGroups[prop].actual,name.text)===-1){propertyGroups[prop].actual.push(name.text);propertyGroups[prop].actualNodes.push(name)}}}}}for(prop in propertyGroups){if(propertyGroups.hasOwnProperty(prop)){value=propertyGroups[prop];full=value.full;actual=value.actual;if(full.length>actual.length){for(i=0,len=full.length;i<len;i++){item=full[i];if(CSSLint.Util.indexOf(actual,item)===-1){propertiesSpecified=actual.length===1?actual[0]:actual.length==2?actual.join(" and "):actual.join(", ");reporter.report("The property "+item+" is compatible with "+propertiesSpecified+" and should be included as well.",value.actualNodes[0].line,value.actualNodes[0].col,rule)}}}}}})}});CSSLint.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",browsers:"All",init:function(parser,reporter){var rule=this;var propertiesToCheck={display:1,"float":"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1},properties;function reportProperty(name,display,msg){if(properties[name]){if(typeof propertiesToCheck[name]!="string"||properties[name].value.toLowerCase()!=propertiesToCheck[name]){reporter.report(msg||name+" can't be used with display: "+display+".",properties[name].line,properties[name].col,rule)}}}function startRule(){properties={}}function endRule(){var display=properties.display?properties.display.value:null;if(display){switch(display){case"inline":reportProperty("height",display);reportProperty("width",display);reportProperty("margin",display);reportProperty("margin-top",display);reportProperty("margin-bottom",display);reportProperty("float",display,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":reportProperty("vertical-align",display);break;case"inline-block":reportProperty("float",display);break;default:if(display.indexOf("table-")===0){reportProperty("margin",display);reportProperty("margin-left",display);reportProperty("margin-right",display);reportProperty("margin-top",display);reportProperty("margin-bottom",display);reportProperty("float",display)}}}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startpage",startRule);parser.addListener("property",function(event){var name=event.property.text.toLowerCase();if(propertiesToCheck[name]){properties[name]={value:event.value.text,line:event.property.line,col:event.property.col}}});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule);parser.addListener("endkeyframerule",endRule);parser.addListener("endpagemargin",endRule);parser.addListener("endpage",endRule)}});CSSLint.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",browsers:"All",init:function(parser,reporter){var rule=this,stack={};parser.addListener("property",function(event){var name=event.property.text,value=event.value,i,len;if(name.match(/background/i)){for(i=0,len=value.parts.length;i<len;i++){if(value.parts[i].type=="uri"){if(typeof stack[value.parts[i].uri]==="undefined"){stack[value.parts[i].uri]=event}else{reporter.report("Background image '"+value.parts[i].uri+"' was used multiple times, first declared at line "+stack[value.parts[i].uri].line+", col "+stack[value.parts[i].uri].col+".",event.line,event.col,rule)}}}}})}});CSSLint.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(parser,reporter){var rule=this,properties,lastProperty;function startRule(event){properties={}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startpage",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("property",function(event){var property=event.property,name=property.text.toLowerCase();if(properties[name]&&(lastProperty!=name||properties[name]==event.value.text)){reporter.report("Duplicate property '"+event.property+"' found.",event.line,event.col,rule)}properties[name]=event.value.text;lastProperty=name})}});CSSLint.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startrule",function(){count=0});parser.addListener("property",function(){count++});parser.addListener("endrule",function(event){var selectors=event.selectors;if(count===0){reporter.report("Rule is empty.",selectors[0].line,selectors[0].col,rule)}})}});CSSLint.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("error",function(event){reporter.error(event.message,event.line,event.col,rule)})}});CSSLint.addRule({id:"fallback-colors",name:"Require fallback colors",desc:"For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",browsers:"IE6,IE7,IE8",init:function(parser,reporter){var rule=this,lastProperty,propertiesToCheck={color:1,background:1,"background-color":1},properties;function startRule(event){properties={};lastProperty=null}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startpage",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("property",function(event){var property=event.property,name=property.text.toLowerCase(),parts=event.value.parts,i=0,colorType="",len=parts.length;if(propertiesToCheck[name]){while(i<len){if(parts[i].type=="color"){if("alpha"in parts[i]||"hue"in parts[i]){if(/([^\)]+)\(/.test(parts[i])){colorType=RegExp.$1.toUpperCase()}if(!lastProperty||lastProperty.property.text.toLowerCase()!=name||lastProperty.colorType!="compat"){reporter.report("Fallback "+name+" (hex or RGB) should precede "+colorType+" "+name+".",event.line,event.col,rule)}}else{event.colorType="compat"}}i++}}lastProperty=event})}});CSSLint.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(parser,reporter){var rule=this;var count=0;parser.addListener("property",function(event){if(event.property.text.toLowerCase()=="float"&&event.value.text.toLowerCase()!="none"){count++}});parser.addListener("endstylesheet",function(){reporter.stat("floats",count);if(count>=10){reporter.rollupWarn("Too many floats ("+count+"), you're probably using them for layout. Consider using a grid system instead.",rule)}})}});CSSLint.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startfontface",function(){count++});parser.addListener("endstylesheet",function(){if(count>5){reporter.rollupWarn("Too many @font-face declarations ("+count+").",rule)}})}});CSSLint.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("property",function(event){if(event.property=="font-size"){count++}});parser.addListener("endstylesheet",function(){reporter.stat("font-sizes",count);if(count>=10){reporter.rollupWarn("Too many font-size declarations ("+count+"), abstraction needed.",rule)}})}});CSSLint.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(parser,reporter){var rule=this,gradients;parser.addListener("startrule",function(){gradients={moz:0,webkit:0,oldWebkit:0,ms:0,o:0}});parser.addListener("property",function(event){if(/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)){gradients[RegExp.$1]=1}else if(/\-webkit\-gradient/i.test(event.value)){gradients.oldWebkit=1}});parser.addListener("endrule",function(event){var missing=[];if(!gradients.moz){missing.push("Firefox 3.6+")}if(!gradients.webkit){missing.push("Webkit (Safari 5+, Chrome)")}if(!gradients.oldWebkit){missing.push("Old Webkit (Safari 4+, Chrome)")}if(!gradients.ms){missing.push("Internet Explorer 10+")}if(!gradients.o){missing.push("Opera 11.1+")}if(missing.length&&missing.length<5){reporter.report("Missing vendor-prefixed CSS gradients for "+missing.join(", ")+".",event.selectors[0].line,event.selectors[0].col,rule)}})}});CSSLint.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,idCount,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];idCount=0;for(j=0;j<selector.parts.length;j++){part=selector.parts[j];if(part.type==parser.SELECTOR_PART_TYPE){for(k=0;k<part.modifiers.length;k++){modifier=part.modifiers[k];if(modifier.type=="id"){idCount++}}}}if(idCount==1){reporter.report("Don't use IDs in selectors.",selector.line,selector.col,rule)}else if(idCount>1){reporter.report(idCount+" IDs in the selector, really?",selector.line,selector.col,rule)}}})}});CSSLint.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("import",function(event){reporter.report("@import prevents parallel downloads, use <link> instead.",event.line,event.col,rule)})}});CSSLint.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("property",function(event){if(event.important===true){count++;reporter.report("Use of !important",event.line,event.col,rule)}});parser.addListener("endstylesheet",function(){reporter.stat("important",count);if(count>=10){reporter.rollupWarn("Too many !important declarations ("+count+"), try to use less than 10 to avoid specificity issues.",rule)}})}});CSSLint.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",browsers:"All",init:function(parser,reporter){var rule=this,properties={"alignment-adjust":1,"alignment-baseline":1,animation:1,"animation-delay":1,"animation-direction":1,"animation-duration":1,"animation-fill-mode":1,"animation-iteration-count":1,"animation-name":1,"animation-play-state":1,"animation-timing-function":1,appearance:1,azimuth:1,"backface-visibility":1,background:1,"background-attachment":1,"background-break":1,"background-clip":1,"background-color":1,"background-image":1,"background-origin":1,"background-position":1,"background-repeat":1,"background-size":1,"baseline-shift":1,binding:1,bleed:1,"bookmark-label":1,"bookmark-level":1,"bookmark-state":1,"bookmark-target":1,border:1,"border-bottom":1,"border-bottom-color":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"border-bottom-style":1,"border-bottom-width":1,"border-collapse":1,"border-color":1,"border-image":1,"border-image-outset":1,"border-image-repeat":1,"border-image-slice":1,"border-image-source":1,"border-image-width":1,"border-left":1,"border-left-color":1,"border-left-style":1,"border-left-width":1,"border-radius":1,"border-right":1,"border-right-color":1,"border-right-style":1,"border-right-width":1,"border-spacing":1,"border-style":1,"border-top":1,"border-top-color":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-top-style":1,"border-top-width":1,"border-width":1,bottom:1,"box-align":1,"box-decoration-break":1,"box-direction":1,"box-flex":1,"box-flex-group":1,"box-lines":1,"box-ordinal-group":1,"box-orient":1,"box-pack":1,"box-shadow":1,"box-sizing":1,"break-after":1,"break-before":1,"break-inside":1,"caption-side":1,clear:1,clip:1,color:1,"color-profile":1,"column-count":1,"column-fill":1,"column-gap":1,"column-rule":1,"column-rule-color":1,"column-rule-style":1,"column-rule-width":1,"column-span":1,"column-width":1,columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:1,cue:1,"cue-after":1,"cue-before":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"drop-initial-after-adjust":1,"drop-initial-after-align":1,"drop-initial-before-adjust":1,"drop-initial-before-align":1,"drop-initial-size":1,"drop-initial-value":1,elevation:1,"empty-cells":1,fit:1,"fit-position":1,"float":1,"float-offset":1,font:1,"font-family":1,"font-size":1,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"grid-columns":1,"grid-rows":1,"hanging-punctuation":1,height:1,"hyphenate-after":1,"hyphenate-before":1,"hyphenate-character":1,"hyphenate-lines":1,"hyphenate-resource":1,hyphens:1,icon:1,"image-orientation":1,"image-rendering":1,"image-resolution":1,"inline-box-align":1,left:1,"letter-spacing":1,"line-height":1,"line-stacking":1,"line-stacking-ruby":1,"line-stacking-shift":1,"line-stacking-strategy":1,"list-style":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,margin:1,"margin-bottom":1,"margin-left":1,"margin-right":1,"margin-top":1,mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":1,"max-width":1,"min-height":1,"min-width":1,"move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:1,orphans:1,outline:1,"outline-color":1,"outline-offset":1,"outline-style":1,"outline-width":1,overflow:1,"overflow-style":1,"overflow-x":1,"overflow-y":1,padding:1,"padding-bottom":1,"padding-left":1,"padding-right":1,"padding-top":1,page:1,"page-break-after":1,"page-break-before":1,"page-break-inside":1,"page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,position:1,"presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:1,rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:1,"speak-header":1,"speak-numeral":1,"speak-punctuation":1,"speech-rate":1,stress:1,"string-set":1,"table-layout":1,target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":1,"text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":1,"text-justify":1,"text-outline":1,"text-shadow":1,"text-transform":1,"text-wrap":1,top:1,transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":1,"user-modify":1,"user-select":1,"vertical-align":1,visibility:1,"voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":1,"white-space-collapse":1,widows:1,width:1,"word-break":1,"word-spacing":1,"word-wrap":1,"z-index":1,filter:1,zoom:1,src:1};parser.addListener("property",function(event){var name=event.property.text.toLowerCase();if(event.invalid){reporter.report(event.invalid.message,event.line,event.col,rule)}})}});CSSLint.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(parser,reporter){var rule=this,lastRule;function startRule(event){if(event.selectors){lastRule={line:event.line,col:event.col,selectors:event.selectors,propCount:0,outline:false}}else{lastRule=null}}function endRule(event){if(lastRule){if(lastRule.outline){if(lastRule.selectors.toString().toLowerCase().indexOf(":focus")==-1){reporter.report("Outlines should only be modified using :focus.",lastRule.line,lastRule.col,rule)}else if(lastRule.propCount==1){reporter.report("Outlines shouldn't be hidden unless other visual changes are made.",lastRule.line,lastRule.col,rule)}}}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startpage",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("property",function(event){var name=event.property.text.toLowerCase(),value=event.value;if(lastRule){lastRule.propCount++;if(name=="outline"&&(value=="none"||value=="0")){lastRule.outline=true}}});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule);parser.addListener("endpage",endRule);parser.addListener("endpagemargin",endRule);parser.addListener("endkeyframerule",endRule)}});CSSLint.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(parser,reporter){var rule=this,classes={};parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];for(j=0;j<selector.parts.length;j++){part=selector.parts[j];if(part.type==parser.SELECTOR_PART_TYPE){for(k=0;k<part.modifiers.length;k++){modifier=part.modifiers[k];if(part.elementName&&modifier.type=="id"){reporter.report("Element ("+part+") is overqualified, just use "+modifier+" without element name.",part.line,part.col,rule)}else if(modifier.type=="class"){if(!classes[modifier]){classes[modifier]=[]}classes[modifier].push({modifier:modifier,part:part})}}}}}});parser.addListener("endstylesheet",function(){var prop;for(prop in classes){if(classes.hasOwnProperty(prop)){if(classes[prop].length==1&&classes[prop][0].part.elementName){reporter.report("Element ("+classes[prop][0].part+") is overqualified, just use "+classes[prop][0].modifier+" without element name.",classes[prop][0].part.line,classes[prop][0].part.col,rule)}}}})}});CSSLint.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,i,j;for(i=0;i<selectors.length;i++){selector=selectors[i];for(j=0;j<selector.parts.length;j++){part=selector.parts[j];if(part.type==parser.SELECTOR_PART_TYPE){if(part.elementName&&/h[1-6]/.test(part.elementName.toString())&&j>0){reporter.report("Heading ("+part.elementName+") should not be qualified.",part.line,part.col,rule)}}}}})}});CSSLint.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];for(j=0;j<selector.parts.length;j++){part=selector.parts[j];if(part.type==parser.SELECTOR_PART_TYPE){for(k=0;k<part.modifiers.length;k++){modifier=part.modifiers[k];if(modifier.type=="attribute"){if(/([\~\|\^\$\*]=)/.test(modifier)){reporter.report("Attribute selectors with "+RegExp.$1+" are slow!",modifier.line,modifier.col,rule)}}}}}}})}});CSSLint.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(parser,reporter){var rule=this,count=0;parser.addListener("startrule",function(){count++});parser.addListener("endstylesheet",function(){reporter.stat("rule-count",count)})}});CSSLint.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(parser,reporter){var rule=this,prop,i,len,propertiesToCheck={},properties,mapping={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(prop in mapping){if(mapping.hasOwnProperty(prop)){for(i=0,len=mapping[prop].length;i<len;i++){propertiesToCheck[mapping[prop][i]]=prop}}}function startRule(event){properties={}}function endRule(event){var prop,i,len,total;for(prop in mapping){if(mapping.hasOwnProperty(prop)){total=0;for(i=0,len=mapping[prop].length;i<len;i++){total+=properties[mapping[prop][i]]?1:0}if(total==mapping[prop].length){reporter.report("The properties "+mapping[prop].join(", ")+" can be replaced by "+prop+".",event.line,event.col,rule)}}}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("property",function(event){var name=event.property.toString().toLowerCase(),value=event.value.parts[0].value;if(propertiesToCheck[name]){properties[name]=1}});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule)}});CSSLint.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var property=event.property;if(property.hack=="*"){reporter.report("Property with star prefix found.",event.property.line,event.property.col,rule)}})}});CSSLint.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(parser,reporter){var rule=this,textIndent,direction;function startRule(event){textIndent=false;direction="inherit"}function endRule(event){if(textIndent&&direction!="ltr"){reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",textIndent.line,textIndent.col,rule)}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("property",function(event){var name=event.property.toString().toLowerCase(),value=event.value;if(name=="text-indent"&&value.parts[0].value<-99){textIndent=event.property}else if(name=="direction"&&value=="ltr"){direction="ltr"}});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule)}});CSSLint.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var property=event.property;if(property.hack=="_"){reporter.report("Property with underscore prefix found.",event.property.line,event.property.col,rule)}})}});CSSLint.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(parser,reporter){var rule=this;var headings={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,pseudo,i,j;for(i=0;i<selectors.length;i++){selector=selectors[i];part=selector.parts[selector.parts.length-1];if(part.elementName&&/(h[1-6])/i.test(part.elementName.toString())){for(j=0;j<part.modifiers.length;j++){if(part.modifiers[j].type=="pseudo"){pseudo=true;break}}if(!pseudo){headings[RegExp.$1]++;if(headings[RegExp.$1]>1){reporter.report("Heading ("+part.elementName+") has already been defined.",part.line,part.col,rule)}}}}});parser.addListener("endstylesheet",function(event){var prop,messages=[];for(prop in headings){if(headings.hasOwnProperty(prop)){if(headings[prop]>1){messages.push(headings[prop]+" "+prop+"s")}}}if(messages.length){reporter.rollupWarn("You have "+messages.join(", ")+" defined in this stylesheet.",rule)}})}});CSSLint.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];part=selector.parts[selector.parts.length-1];if(part.elementName=="*"){reporter.report(rule.desc,part.line,part.col,rule)}}})}});CSSLint.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("startrule",function(event){var selectors=event.selectors,selector,part,modifier,i,j,k;for(i=0;i<selectors.length;i++){selector=selectors[i];part=selector.parts[selector.parts.length-1];if(part.type==parser.SELECTOR_PART_TYPE){for(k=0;k<part.modifiers.length;k++){modifier=part.modifiers[k];if(modifier.type=="attribute"&&(!part.elementName||part.elementName=="*")){reporter.report(rule.desc,part.line,part.col,rule)}}}}})}});CSSLint.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",browsers:"All",init:function(parser,reporter){var rule=this,properties,num,propertiesToCheck={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing","-moz-user-select":"user-select","-khtml-user-select":"user-select","-webkit-user-select":"user-select"};function startRule(){properties={};num=1}function endRule(event){var prop,i,len,standard,needed,actual,needsStandard=[];for(prop in properties){if(propertiesToCheck[prop]){needsStandard.push({actual:prop,needed:propertiesToCheck[prop]})}}for(i=0,len=needsStandard.length;i<len;i++){needed=needsStandard[i].needed;actual=needsStandard[i].actual;if(!properties[needed]){reporter.report("Missing standard property '"+needed+"' to go along with '"+actual+"'.",properties[actual][0].name.line,properties[actual][0].name.col,rule)}else{if(properties[needed][0].pos<properties[actual][0].pos){reporter.report("Standard property '"+needed+"' should come after vendor-prefixed property '"+actual+"'.",properties[actual][0].name.line,properties[actual][0].name.col,rule)}}}}parser.addListener("startrule",startRule);parser.addListener("startfontface",startRule);parser.addListener("startpage",startRule);parser.addListener("startpagemargin",startRule);parser.addListener("startkeyframerule",startRule);parser.addListener("property",function(event){var name=event.property.text.toLowerCase();if(!properties[name]){properties[name]=[]}properties[name].push({name:event.property,value:event.value,pos:num++})});parser.addListener("endrule",endRule);parser.addListener("endfontface",endRule);parser.addListener("endpage",endRule);parser.addListener("endpagemargin",endRule);parser.addListener("endkeyframerule",endRule)}});CSSLint.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",browsers:"All",init:function(parser,reporter){var rule=this;parser.addListener("property",function(event){var parts=event.value.parts,i=0,len=parts.length;while(i<len){if((parts[i].units||parts[i].type=="percentage")&&parts[i].value===0&&parts[i].type!="time"){reporter.report("Values of 0 shouldn't have units specified.",parts[i].line,parts[i].col,rule)}i++}})}});(function(){var xmlEscape=function(str){if(!str||str.constructor!==String){return""}return str.replace(/[\"&><]/g,function(match){switch(match){case'"':return"&quot;";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;"}})};CSSLint.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},readError:function(filename,message){return'<file name="'+xmlEscape(filename)+'"><error line="0" column="0" severty="error" message="'+xmlEscape(message)+'"></error></file>'},formatResults:function(results,filename,options){var messages=results.messages,output=[];var generateSource=function(rule){if(!rule||!("name"in rule)){return""}return"net.csslint."+rule.name.replace(/\s/g,"")};if(messages.length>0){output.push('<file name="'+filename+'">');CSSLint.Util.forEach(messages,function(message,i){if(!message.rollup){output.push('<error line="'+message.line+'" column="'+message.col+'" severity="'+message.type+'"'+' message="'+xmlEscape(message.message)+'" source="'+generateSource(message.rule)+'"/>')}});output.push("</file>")}return output.join("")}})})();CSSLint.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(results,filename,options){var messages=results.messages,output="";options=options||{};var capitalize=function(str){return str.charAt(0).toUpperCase()+str.slice(1)};if(messages.length===0){return options.quiet?"":filename+": Lint Free!"}CSSLint.Util.forEach(messages,function(message,i){if(message.rollup){output+=filename+": "+capitalize(message.type)+" - "+message.message+"\n"}else{output+=filename+": "+"line "+message.line+", col "+message.col+", "+capitalize(message.type)+" - "+message.message+"\n"}});return output}});CSSLint.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){return"</csslint>"},formatResults:function(results,filename,options){var messages=results.messages,output=[];var escapeSpecialCharacters=function(str){if(!str||str.constructor!==String){return""}return str.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};if(messages.length>0){output.push('<file name="'+filename+'">');CSSLint.Util.forEach(messages,function(message,i){if(message.rollup){output.push('<issue severity="'+message.type+'" reason="'+escapeSpecialCharacters(message.message)+'" evidence="'+escapeSpecialCharacters(message.evidence)+'"/>')}else{output.push('<issue line="'+message.line+'" char="'+message.col+'" severity="'+message.type+'"'+' reason="'+escapeSpecialCharacters(message.message)+'" evidence="'+escapeSpecialCharacters(message.evidence)+'"/>')}});output.push("</file>")}return output.join("")}});CSSLint.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><lint>'},endFormat:function(){return"</lint>"},formatResults:function(results,filename,options){var messages=results.messages,output=[];var escapeSpecialCharacters=function(str){if(!str||str.constructor!==String){return""}return str.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};if(messages.length>0){output.push('<file name="'+filename+'">');CSSLint.Util.forEach(messages,function(message,i){if(message.rollup){output.push('<issue severity="'+message.type+'" reason="'+escapeSpecialCharacters(message.message)+'" evidence="'+escapeSpecialCharacters(message.evidence)+'"/>')}else{output.push('<issue line="'+message.line+'" char="'+message.col+'" severity="'+message.type+'"'+' reason="'+escapeSpecialCharacters(message.message)+'" evidence="'+escapeSpecialCharacters(message.evidence)+'"/>')}});output.push("</file>")}return output.join("")}});CSSLint.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(results,filename,options){var messages=results.messages,output="";options=options||{};if(messages.length===0){return options.quiet?"":"\n\ncsslint: No errors in "+filename+"."}output="\n\ncsslint: There are "+messages.length+" problems in "+filename+".";var pos=filename.lastIndexOf("/"),shortFilename=filename;if(pos===-1){pos=filename.lastIndexOf("\\")}if(pos>-1){shortFilename=filename.substring(pos+1)}CSSLint.Util.forEach(messages,function(message,i){output=output+"\n\n"+shortFilename;if(message.rollup){output+="\n"+(i+1)+": "+message.type;output+="\n"+message.message}else{output+="\n"+(i+1)+": "+message.type+" at line "+message.line+", col "+message.col;output+="\n"+message.message;output+="\n"+message.evidence}});return output}});return CSSLint}();exports.CSSLint=CSSLint});define("handlebars",["require","exports"],function(require,exports){var Handlebars={};Handlebars.VERSION="1.0.beta.6";Handlebars.helpers={};Handlebars.partials={};Handlebars.registerHelper=function(name,fn,inverse){if(inverse){fn.not=inverse}this.helpers[name]=fn};Handlebars.registerPartial=function(name,str){this.partials[name]=str};Handlebars.registerHelper("helperMissing",function(arg){if(arguments.length===2){return undefined}else{throw new Error("Could not find property '"+arg+"'")}});var toString=Object.prototype.toString,functionType="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(context,options){var inverse=options.inverse||function(){},fn=options.fn;var ret="";var type=toString.call(context);if(type===functionType){context=context.call(this)}if(context===true){return fn(this)}else if(context===false||context==null){return inverse(this)}else if(type==="[object Array]"){if(context.length>0){for(var i=0,j=context.length;i<j;i++){ret=ret+fn(context[i])}}else{ret=inverse(this)}return ret}else{return fn(context)}});Handlebars.registerHelper("each",function(context,options){var fn=options.fn,inverse=options.inverse;var ret="";if(context&&context.length>0){for(var i=0,j=context.length;i<j;i++){ret=ret+fn(context[i])}}else{ret=inverse(this)}return ret});Handlebars.registerHelper("if",function(context,options){var type=toString.call(context);if(type===functionType){context=context.call(this)}if(!context||Handlebars.Utils.isEmpty(context)){return options.inverse(this)}else{return options.fn(this)}});Handlebars.registerHelper("unless",function(context,options){var fn=options.fn,inverse=options.inverse;options.fn=inverse;options.inverse=fn;return Handlebars.helpers["if"].call(this,context,options)});Handlebars.registerHelper("with",function(context,options){return options.fn(context)});Handlebars.registerHelper("log",function(context){Handlebars.log(context)});var handlebars=function(){var parser={trace:function trace(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];break;case 2:this.$=new yy.ProgramNode($$[$0-2],$$[$0]);break;case 3:this.$=new yy.ProgramNode($$[$0]);break;case 4:this.$=new yy.ProgramNode([]);break;case 5:this.$=[$$[$0]];break;case 6:$$[$0-1].push($$[$0]);this.$=$$[$0-1];break;case 7:this.$=new yy.InverseNode($$[$0-2],$$[$0-1],$$[$0]);break;case 8:this.$=new yy.BlockNode($$[$0-2],$$[$0-1],$$[$0]);break;case 9:this.$=$$[$0];break;case 10:this.$=$$[$0];break;case 11:this.$=new yy.ContentNode($$[$0]);break;case 12:this.$=new yy.CommentNode($$[$0]);break;case 13:this.$=new yy.MustacheNode($$[$0-1][0],$$[$0-1][1]);break;case 14:this.$=new yy.MustacheNode($$[$0-1][0],$$[$0-1][1]);break;case 15:this.$=$$[$0-1];break;case 16:this.$=new yy.MustacheNode($$[$0-1][0],$$[$0-1][1]);break;case 17:this.$=new yy.MustacheNode($$[$0-1][0],$$[$0-1][1],true);break;case 18:this.$=new yy.PartialNode($$[$0-1]);break;case 19:this.$=new yy.PartialNode($$[$0-2],$$[$0-1]);break;case 20:break;case 21:this.$=[[$$[$0-2]].concat($$[$0-1]),$$[$0]];break;case 22:this.$=[[$$[$0-1]].concat($$[$0]),null];break;case 23:this.$=[[$$[$0-1]],$$[$0]];break;case 24:this.$=[[$$[$0]],null];break;case 25:$$[$0-1].push($$[$0]);this.$=$$[$0-1];break;case 26:this.$=[$$[$0]];break;case 27:this.$=$$[$0];break;case 28:this.$=new yy.StringNode($$[$0]);break;case 29:this.$=new yy.IntegerNode($$[$0]);break;case 30:this.$=new yy.BooleanNode($$[$0]);break;case 31:this.$=new yy.HashNode($$[$0]);break;case 32:$$[$0-1].push($$[$0]);this.$=$$[$0-1];break;case 33:this.$=[$$[$0]];break;case 34:this.$=[$$[$0-2],$$[$0]];break;case 35:this.$=[$$[$0-2],new yy.StringNode($$[$0])];break;case 36:this.$=[$$[$0-2],new yy.IntegerNode($$[$0])];break;case 37:this.$=[$$[$0-2],new yy.BooleanNode($$[$0])];break;case 38:this.$=new yy.IdNode($$[$0]);break;case 39:$$[$0-2].push($$[$0]);this.$=$$[$0-2];break;case 40:this.$=[$$[$0]];break}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function parseError(str,hash){throw new Error(str)},parse:function parse(input){var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1;this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var yyloc=this.lexer.yylloc;lstack.push(yyloc);if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length-n}function lex(){var token;token=self.lexer.lex()||1;if(typeof token!=="number"){token=self.symbols_[token]||token}return token}var symbol,preErrorSymbol,state,action,a,r,yyval={},p,len,newState,expected;while(true){state=stack[stack.length-1];if(this.defaultActions[state]){action=this.defaultActions[state]}else{if(symbol==null)symbol=lex();action=table[state]&&table[state][symbol]}if(typeof action==="undefined"||!action.length||!action[0]){if(!recovering){expected=[];for(p in table[state])if(this.terminals_[p]&&p>2){expected.push("'"+this.terminals_[p]+"'")}var errStr="";if(this.lexer.showPosition){errStr="Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+this.terminals_[symbol]+"'"}else{errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==1?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'")}this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}}if(action[0]instanceof Array&&action.length>1){throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol)}switch(action[0]){case 1:stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;if(recovering>0)recovering--}else{symbol=preErrorSymbol;preErrorSymbol=null}break;case 2:len=this.productions_[action[1]][1];yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack);if(typeof r!=="undefined"){return r}if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return true}}return true}};var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parseError){this.yy.parseError(str,hash)}else{throw new Error(str)}},setInput:function(input){this._input=input;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this},input:function(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.match+=ch;this.matched+=ch;var lines=ch.match(/\n/);if(lines)this.yylineno++;this._input=this._input.slice(1);return ch},unput:function(ch){this._input=ch+this._input;return this},more:function(){this._more=true;return this},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;if(next.length<20){next+=this._input.substr(0,20-next.length)}return(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput();var c=(new Array(pre.length+1)).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var token,match,col,lines;if(!this._more){this.yytext="";this.match=""}var rules=this._currentRules();for(var i=0;i<rules.length;i++){match=this._input.match(this.rules[rules[i]]);if(match){lines=match[0].match(/\n.*/g);if(lines)this.yylineno+=lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-1:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;this._more=false;this._input=this._input.slice(match[0].length);this.matched+=match[0];token=this.performAction.call(this,this.yy,this,rules[i],this.conditionStack[this.conditionStack.length-1]);if(token)return token;else return}}if(this._input===""){return this.EOF}else{this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function lex(){var r=this.next();if(typeof r!=="undefined"){return r}else{return this.lex()}},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){return this.conditionStack.pop()},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function begin(condition){this.begin(condition)}};lexer.performAction=function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:if(yy_.yytext.slice(-1)!=="\\")this.begin("mu");if(yy_.yytext.slice(-1)==="\\")yy_.yytext=yy_.yytext.substr(0,yy_.yyleng-1),this.begin("emu");if(yy_.yytext)return 14;break;case 1:return 14;break;case 2:this.popState();return 14;break;case 3:return 24;break;case 4:return 16;break;case 5:return 20;break;case 6:return 19;break;case 7:return 19;break;case 8:return 23;break;case 9:return 23;break;case 10:yy_.yytext=yy_.yytext.substr(3,yy_.yyleng-5);this.popState();return 15;break;case 11:return 22;break;case 12:return 34;break;case 13:return 33;break;case 14:return 33;break;case 15:return 36;break;case 16:break;case 17:this.popState();return 18;break;case 18:this.popState();return 18;break;case 19:yy_.yytext=yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"');return 28;break;case 20:return 30;break;case 21:return 30;break;case 22:return 29;break;case 23:return 33;break;case 24:yy_.yytext=yy_.yytext.substr(1,yy_.yyleng-2);return 33;break;case 25:return"INVALID";break;case 26:return 5;break}};lexer.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];lexer.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:false},emu:{rules:[2],inclusive:false},INITIAL:{rules:[0,1,26],inclusive:true}};return lexer}();parser.lexer=lexer;return parser}();if(typeof module!=="undefined"&&typeof require!=="undefined"&&typeof exports!=="undefined"){exports.parser=handlebars;exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)};exports.main=function commonjsMain(args){if(!args[1])throw new Error("Usage: "+args[0]+" FILE");if(typeof process!=="undefined"){var source=require("fs").readFileSync(require("path").join(process.cwd(),args[1]),"utf8")}else{var cwd=require("file").path(require("file").cwd());var source=cwd.join(args[1]).read({charset:"utf-8"})}return exports.parser.parse(source)};if(typeof module!=="undefined"&&require.main===module){exports.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args)}}Handlebars.Parser=handlebars;Handlebars.parse=function(string){Handlebars.Parser.yy=Handlebars.AST;return Handlebars.Parser.parse(string)};Handlebars.print=function(ast){return(new Handlebars.PrintVisitor).accept(ast)};Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(level,str){}};Handlebars.log=function(level,str){Handlebars.logger.log(level,str)};(function(){Handlebars.AST={};Handlebars.AST.ProgramNode=function(statements,inverse){this.type="program";this.statements=statements;if(inverse){this.inverse=new Handlebars.AST.ProgramNode(inverse)}};Handlebars.AST.MustacheNode=function(params,hash,unescaped){this.type="mustache";this.id=params[0];this.params=params.slice(1);this.hash=hash;this.escaped=!unescaped};Handlebars.AST.PartialNode=function(id,context){this.type="partial";this.id=id;this.context=context};var verifyMatch=function(open,close){if(open.original!==close.original){throw new Handlebars.Exception(open.original+" doesn't match "+close.original)}};Handlebars.AST.BlockNode=function(mustache,program,close){verifyMatch(mustache.id,close);this.type="block";this.mustache=mustache;this.program=program};Handlebars.AST.InverseNode=function(mustache,program,close){verifyMatch(mustache.id,close);this.type="inverse";this.mustache=mustache;this.program=program};Handlebars.AST.ContentNode=function(string){this.type="content";this.string=string};Handlebars.AST.HashNode=function(pairs){this.type="hash";this.pairs=pairs};Handlebars.AST.IdNode=function(parts){this.type="ID";this.original=parts.join(".");var dig=[],depth=0;for(var i=0,l=parts.length;i<l;i++){var part=parts[i];if(part===".."){depth++}else if(part==="."||part==="this"){this.isScoped=true}else{dig.push(part)}}this.parts=dig;this.string=dig.join(".");this.depth=depth;this.isSimple=dig.length===1&&depth===0};Handlebars.AST.StringNode=function(string){this.type="STRING";this.string=string};Handlebars.AST.IntegerNode=function(integer){this.type="INTEGER";this.integer=integer};Handlebars.AST.BooleanNode=function(bool){this.type="BOOLEAN";this.bool=bool};Handlebars.AST.CommentNode=function(comment){this.type="comment";this.comment=comment}})();Handlebars.Exception=function(message){var tmp=Error.prototype.constructor.apply(this,arguments);for(var p in tmp){if(tmp.hasOwnProperty(p)){this[p]=tmp[p]}}this.message=tmp.message};Handlebars.Exception.prototype=new Error;Handlebars.SafeString=function(string){this.string=string};Handlebars.SafeString.prototype.toString=function(){return this.string.toString()};(function(){var escape={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};var badChars=/&(?!\w+;)|[<>"'`]/g;var possible=/[&<>"'`]/;var escapeChar=function(chr){return escape[chr]||"&amp;"};Handlebars.Utils={escapeExpression:function(string){if(string instanceof Handlebars.SafeString){return string.toString()}else if(string==null||string===false){return""}if(!possible.test(string)){return string}return string.replace(badChars,escapeChar)},isEmpty:function(value){if(typeof value==="undefined"){return true}else if(value===null){return true}else if(value===false){return true}else if(Object.prototype.toString.call(value)==="[object Array]"&&value.length===0){return true}else{return false}}}})();Handlebars.Compiler=function(){};Handlebars.JavaScriptCompiler=function(){};(function(Compiler,JavaScriptCompiler){Compiler.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16};Compiler.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1};Compiler.DISASSEMBLE_MAP={};for(var prop in Compiler.OPCODE_MAP){var value=Compiler.OPCODE_MAP[prop];Compiler.DISASSEMBLE_MAP[value]=prop}Compiler.multiParamSize=function(code){return Compiler.MULTI_PARAM_OPCODES[Compiler.DISASSEMBLE_MAP[code]]};Compiler.prototype={compiler:Compiler,disassemble:function(){var opcodes=this.opcodes,opcode,nextCode;var out=[],str,name,value;for(var i=0,l=opcodes.length;i<l;i++){opcode=opcodes[i];if(opcode==="DECLARE"){name=opcodes[++i];value=opcodes[++i];out.push("DECLARE "+name+" = "+value)}else{str=Compiler.DISASSEMBLE_MAP[opcode];var extraParams=Compiler.multiParamSize(opcode);var codes=[];for(var j=0;j<extraParams;j++){nextCode=opcodes[++i];if(typeof nextCode==="string"){nextCode='"'+nextCode.replace("\n","\\n")+'"'}codes.push(nextCode)}str=str+" "+codes.join(" ");out.push(str)}}return out.join("\n")},guid:0,compile:function(program,options){this.children=[];this.depths={list:[]};this.options=options;var knownHelpers=this.options.knownHelpers;this.options.knownHelpers={helperMissing:true,blockHelperMissing:true,each:true,"if":true,unless:true,"with":true,log:true};if(knownHelpers){for(var name in knownHelpers){this.options.knownHelpers[name]=knownHelpers[name]}}return this.program(program)},accept:function(node){return this[node.type](node)},program:function(program){var statements=program.statements,statement;this.opcodes=[];for(var i=0,l=statements.length;i<l;i++){statement=statements[i];this[statement.type](statement)}this.isSimple=l===1;this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(program){var result=(new this.compiler).compile(program,this.options);var guid=this.guid++;this.usePartial=this.usePartial||result.usePartial;this.children[guid]=result;for(var i=0,l=result.depths.list.length;i<l;i++){depth=result.depths.list[i];if(depth<2){continue}else{this.addDepth(depth-1)}}return guid},block:function(block){var mustache=block.mustache;var depth,child,inverse,inverseGuid;var params=this.setupStackForMustache(mustache);var programGuid=this.compileProgram(block.program);if(block.program.inverse){inverseGuid=this.compileProgram(block.program.inverse);this.declare("inverse",inverseGuid)}this.opcode("invokeProgram",programGuid,params.length,!!mustache.hash);this.declare("inverse",null);this.opcode("append")},inverse:function(block){var params=this.setupStackForMustache(block.mustache);var programGuid=this.compileProgram(block.program);this.declare("inverse",programGuid);this.opcode("invokeProgram",null,params.length,!!block.mustache.hash);this.declare("inverse",null);this.opcode("append")},hash:function(hash){var pairs=hash.pairs,pair,val;this.opcode("push","{}");for(var i=0,l=pairs.length;i<l;i++){pair=pairs[i];val=pair[1];this.accept(val);this.opcode("assignToHash",pair[0])}},partial:function(partial){var id=partial.id;this.usePartial=true;if(partial.context){this.ID(partial.context)}else{this.opcode("push","depth0")}this.opcode("invokePartial",id.original);this.opcode("append")},content:function(content){this.opcode("appendContent",content.string)},mustache:function(mustache){var params=this.setupStackForMustache(mustache);this.opcode("invokeMustache",params.length,mustache.id.original,!!mustache.hash);if(mustache.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},ID:function(id){this.addDepth(id.depth);this.opcode("getContext",id.depth);this.opcode("lookupWithHelpers",id.parts[0]||null,id.isScoped||false);for(var i=1,l=id.parts.length;i<l;i++){this.opcode("lookup",id.parts[i])}},STRING:function(string){this.opcode("pushString",string.string)},INTEGER:function(integer){this.opcode("push",integer.integer)},BOOLEAN:function(bool){this.opcode("push",bool.bool)},comment:function(){},pushParams:function(params){var i=params.length,param;while(i--){param=params[i];if(this.options.stringParams){if(param.depth){this.addDepth(param.depth)}this.opcode("getContext",param.depth||0);this.opcode("pushStringParam",param.string)}else{this[param.type](param)}}},opcode:function(name,val1,val2,val3){this.opcodes.push(Compiler.OPCODE_MAP[name]);if(val1!==undefined){this.opcodes.push(val1)}if(val2!==undefined){this.opcodes.push(val2)}if(val3!==undefined){this.opcodes.push(val3)}},declare:function(name,value){this.opcodes.push("DECLARE");this.opcodes.push(name);this.opcodes.push(value)},addDepth:function(depth){if(depth===0){return}if(!this.depths[depth]){this.depths[depth]=true;this.depths.list.push(depth)}},setupStackForMustache:function(mustache){var params=mustache.params;this.pushParams(params);if(mustache.hash){this.hash(mustache.hash)}this.ID(mustache.id);return params}};JavaScriptCompiler.prototype={nameLookup:function(parent,name,type){if(/^[0-9]+$/.test(name)){return parent+"["+name+"]"}else if(JavaScriptCompiler.isValidJavaScriptVariableName(name)){return parent+"."+name}else{return parent+"['"+name+"']"}},appendToBuffer:function(string){if(this.environment.isSimple){return"return "+string+";"}else{return"buffer += "+string+";"}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(environment,options,context,asObject){this.environment=environment;this.options=options||{};this.name=this.environment.name;this.isChild=!!context;this.context=context||{programs:[],aliases:{self:"this"},registers:{list:[]}};this.preamble();this.stackSlot=0;this.stackVars=[];this.compileChildren(environment,options);var opcodes=environment.opcodes,opcode;this.i=0;for(l=opcodes.length;this.i<l;this.i++){opcode=this.nextOpcode(0);if(opcode[0]==="DECLARE"){this.i=this.i+2;this[opcode[1]]=opcode[2]}else{this.i=this.i+opcode[1].length;this[opcode[0]].apply(this,opcode[1])}}return this.createFunctionContext(asObject)},nextOpcode:function(n){var opcodes=this.environment.opcodes,opcode=opcodes[this.i+n],name,val;var extraParams,codes;if(opcode==="DECLARE"){name=opcodes[this.i+1];val=opcodes[this.i+2];return["DECLARE",name,val]}else{name=Compiler.DISASSEMBLE_MAP[opcode];extraParams=Compiler.multiParamSize(opcode);codes=[];for(var j=0;j<extraParams;j++){codes.push(opcodes[this.i+j+1+n])}return[name,codes]}},eat:function(opcode){this.i=this.i+opcode.length},preamble:function(){var out=[];this.useRegister("foundHelper");if(!this.isChild){var namespace=this.namespace;var copies="helpers = helpers || "+namespace+".helpers;";if(this.environment.usePartial){copies=copies+" partials = partials || "+namespace+".partials;"}out.push(copies)}else{out.push("")}if(!this.environment.isSimple){out.push(", buffer = "+this.initializeBuffer())}else{out.push("")}this.lastContext=0;this.source=out},createFunctionContext:function(asObject){var locals=this.stackVars;if(!this.isChild){locals=locals.concat(this.context.registers.list)}if(locals.length>0){this.source[1]=this.source[1]+", "+locals.join(", ")}if(!this.isChild){var aliases=[];for(var alias in this.context.aliases){this.source[1]=this.source[1]+", "+alias+"="+this.context.aliases[alias]}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";"}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n"}if(!this.environment.isSimple){this.source.push("return buffer;")}var params=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var i=0,l=this.environment.depths.list.length;i<l;i++){params.push("depth"+this.environment.depths.list[i])}if(asObject){params.push(this.source.join("\n  "));return Function.apply(this,params)}else{var functionSource="function "+(this.name||"")+"("+params.join(",")+") {\n  "+this.source.join("\n  ")+"}";Handlebars.log(Handlebars.logger.DEBUG,functionSource+"\n\n");return functionSource}},appendContent:function(content){this.source.push(this.appendToBuffer(this.quotedString(content)))},append:function(){var local=this.popStack();this.source.push("if("+local+" || "+local+" === 0) { "+this.appendToBuffer(local)+" }");if(this.environment.isSimple){this.source.push("else { "+this.appendToBuffer("''")+" }")}},appendEscaped:function(){var opcode=this.nextOpcode(1),extra="";this.context.aliases.escapeExpression="this.escapeExpression";if(opcode[0]==="appendContent"){extra=" + "+this.quotedString(opcode[1][0]);this.eat(opcode)}this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+extra))},getContext:function(depth){if(this.lastContext!==depth){this.lastContext=depth}},lookupWithHelpers:function(name,isScoped){if(name){var topStack=this.nextStack();this.usingKnownHelper=false;var toPush;if(!isScoped&&this.options.knownHelpers[name]){toPush=topStack+" = "+this.nameLookup("helpers",name,"helper");this.usingKnownHelper=true}else if(isScoped||this.options.knownHelpersOnly){toPush=topStack+" = "+this.nameLookup("depth"+this.lastContext,name,"context")}else{this.register("foundHelper",this.nameLookup("helpers",name,"helper"));toPush=topStack+" = foundHelper || "+this.nameLookup("depth"+this.lastContext,name,"context")}toPush+=";";this.source.push(toPush)}else{this.pushStack("depth"+this.lastContext)}},lookup:function(name){var topStack=this.topStack();this.source.push(topStack+" = ("+topStack+" === null || "+topStack+" === undefined || "+topStack+" === false ? "+topStack+" : "+this.nameLookup(topStack,name,"context")+");")},pushStringParam:function(string){this.pushStack("depth"+this.lastContext);this.pushString(string)},pushString:function(string){this.pushStack(this.quotedString(string))},push:function(name){this.pushStack(name)},invokeMustache:function(paramSize,original,hasHash){this.populateParams(paramSize,this.quotedString(original),"{}",null,hasHash,function(nextStack,helperMissingString,id){if(!this.usingKnownHelper){this.context.aliases.helperMissing="helpers.helperMissing";this.context.aliases.undef="void 0";this.source.push("else if("+id+"=== undef) { "+nextStack+" = helperMissing.call("+helperMissingString+"); }");if(nextStack!==id){this.source.push("else { "+nextStack+" = "+id+"; }")}}})},invokeProgram:function(guid,paramSize,hasHash){var inverse=this.programExpression(this.inverse);var mainProgram=this.programExpression(guid);this.populateParams(paramSize,null,mainProgram,inverse,hasHash,function(nextStack,helperMissingString,id){if(!this.usingKnownHelper){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";this.source.push("else { "+nextStack+" = blockHelperMissing.call("+helperMissingString+"); }")}})},populateParams:function(paramSize,helperId,program,inverse,hasHash,fn){var needsRegister=hasHash||this.options.stringParams||inverse||this.options.data;var id=this.popStack(),nextStack;var params=[],param,stringParam,stringOptions;if(needsRegister){this.register("tmp1",program);stringOptions="tmp1"}else{stringOptions="{ hash: {} }"}if(needsRegister){var hash=hasHash?this.popStack():"{}";this.source.push("tmp1.hash = "+hash+";")}if(this.options.stringParams){this.source.push("tmp1.contexts = [];")}for(var i=0;i<paramSize;i++){param=this.popStack();params.push(param);if(this.options.stringParams){this.source.push("tmp1.contexts.push("+this.popStack()+");")}}if(inverse){this.source.push("tmp1.fn = tmp1;");this.source.push("tmp1.inverse = "+inverse+";")}if(this.options.data){this.source.push("tmp1.data = data;")}params.push(stringOptions);this.populateCall(params,id,helperId||id,fn,program!=="{}")},populateCall:function(params,id,helperId,fn,program){var paramString=["depth0"].concat(params).join(", ");var helperMissingString=["depth0"].concat(helperId).concat(params).join(", ");var nextStack=this.nextStack();if(this.usingKnownHelper){this.source.push(nextStack+" = "+id+".call("+paramString+");")}else{this.context.aliases.functionType='"function"';var condition=program?"foundHelper && ":"";this.source.push("if("+condition+"typeof "+id+" === functionType) { "+nextStack+" = "+id+".call("+paramString+"); }")}fn.call(this,nextStack,helperMissingString,id);this.usingKnownHelper=false},invokePartial:function(context){params=[this.nameLookup("partials",context,"partial"),"'"+context+"'",this.popStack(),"helpers","partials"];if(this.options.data){params.push("data")}this.pushStack("self.invokePartial("+params.join(", ")+");")},assignToHash:function(key){var value=this.popStack();var hash=this.topStack();this.source.push(hash+"['"+key+"'] = "+value+";")},compiler:JavaScriptCompiler,compileChildren:function(environment,options){var children=environment.children,child,compiler;for(var i=0,l=children.length;i<l;i++){child=children[i];compiler=new this.compiler;this.context.programs.push("");var index=this.context.programs.length;child.index=index;child.name="program"+index;this.context.programs[index]=compiler.compile(child,options,this.context)}},programExpression:function(guid){if(guid==null){return"self.noop"}var child=this.environment.children[guid],depths=child.depths.list;var programParams=[child.index,child.name,"data"];for(var i=0,l=depths.length;i<l;i++){depth=depths[i];if(depth===1){programParams.push("depth0")}else{programParams.push("depth"+(depth-1))}}if(depths.length===0){return"self.program("+programParams.join(", ")+")"}else{programParams.shift();return"self.programWithDepth("+programParams.join(", ")+")"}},register:function(name,val){this.useRegister(name);this.source.push(name+" = "+val+";")},useRegister:function(name){if(!this.context.registers[name]){this.context.registers[name]=true;this.context.registers.list.push(name)}},pushStack:function(item){this.source.push(this.nextStack()+" = "+item+";");return"stack"+this.stackSlot},nextStack:function(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(str){return'"'+str.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var reservedWords=("break else new var"+" case finally return void"+" catch for switch while"+" continue function this with"+" default if throw"+" delete in try"+" do instanceof typeof"+" abstract enum int short"+" boolean export interface static"+" byte extends long super"+" char final native synchronized"+" class float package throws"+" const goto private transient"+" debugger implements protected volatile"+" double import public let yield").split(" ");var compilerWords=JavaScriptCompiler.RESERVED_WORDS={};for(var i=0,l=reservedWords.length;i<l;i++){compilerWords[reservedWords[i]]=true}JavaScriptCompiler.isValidJavaScriptVariableName=function(name){if(!JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)){return true}return false}})(Handlebars.Compiler,Handlebars.JavaScriptCompiler);Handlebars.precompile=function(string,options){options=options||{};var ast=Handlebars.parse(string);var environment=(new Handlebars.Compiler).compile(ast,options);return(new Handlebars.JavaScriptCompiler).compile(environment,options)};Handlebars.compile=function(string,options){options=options||{};var compiled;function compile(){var ast=Handlebars.parse(string);var environment=(new Handlebars.Compiler).compile(ast,options);var templateSpec=(new Handlebars.JavaScriptCompiler).compile(environment,options,undefined,true);return Handlebars.template(templateSpec)}return function(context,options){if(!compiled){compiled=compile()}return compiled.call(this,context,options)}};Handlebars.VM={template:function(templateSpec){var container={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(i,fn,data){var programWrapper=this.programs[i];if(data){return Handlebars.VM.program(fn,data)}else if(programWrapper){return programWrapper}else{programWrapper=this.programs[i]=Handlebars.VM.program(fn);return programWrapper}},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(context,options){options=options||{};return templateSpec.call(container,Handlebars,context,options.helpers,options.partials,options.data)}},programWithDepth:function(fn,data,$depth){var args=Array.prototype.slice.call(arguments,2);return function(context,options){options=options||{};return fn.apply(this,[context,options.data||data].concat(args))}},program:function(fn,data){return function(context,options){options=options||{};return fn(context,options.data||data)}},noop:function(){return""},invokePartial:function(partial,name,context,helpers,partials,data){options={helpers:helpers,partials:partials,data:data};if(partial===undefined){throw new Handlebars.Exception("The partial "+name+" could not be found")}else if(partial instanceof Function){return partial(context,options)}else if(!Handlebars.compile){throw new Handlebars.Exception("The partial "+name+" could not be compiled when running in runtime-only mode")}else{partials[name]=Handlebars.compile(partial);return partials[name](context,options)}}};Handlebars.template=Handlebars.VM.template;for(var attr in Handlebars){exports[attr]=Handlebars[attr]}});define("jslint/lib/linter",["require","exports"],function(require,exports){var JSLINT=function(){"use strict";function array_to_object(array,value){var i,length=array.length,object={};for(i=0;i<length;i+=1){object[array[i]]=value}return object}var adsafe_id,adsafe_may,adsafe_top,adsafe_went,allowed_option={anon:true,bitwise:true,browser:true,cap:true,"continue":true,css:true,debug:true,devel:true,eqeq:true,es5:true,evil:true,forin:true,fragment:true,indent:10,maxerr:1e3,maxlen:256,newcap:true,node:true,nomen:true,on:true,passfail:true,plusplus:true,properties:true,regexp:true,rhino:true,undef:true,unparam:true,sloppy:true,stupid:true,sub:true,vars:true,white:true,windows:true},anonname,approved,bang={"<":true,"<=":true,"==":true,"===":true,"!==":true,"!=":true,">":true,">=":true,"+":true,"-":true,"*":true,"/":true,"%":true},banned=array_to_object(["arguments","callee","caller","constructor","eval","prototype","stack","unwatch","valueOf","watch"],true),begin,browser=array_to_object(["clearInterval","clearTimeout","document","event","FormData","frames","history","Image","localStorage","location","name","navigator","Option","parent","screen","sessionStorage","setInterval","setTimeout","Storage","window","XMLHttpRequest"],false),bundle={a_label:"'{a}' is a statement label.",a_not_allowed:"'{a}' is not allowed.",a_not_defined:"'{a}' is not defined.",a_scope:"'{a}' used out of scope.",adsafe_a:"ADsafe violation: '{a}'.",adsafe_autocomplete:"ADsafe autocomplete violation.",adsafe_bad_id:"ADSAFE violation: bad id.",adsafe_div:"ADsafe violation: Wrap the widget in a div.",adsafe_fragment:"ADSAFE: Use the fragment option.",adsafe_go:"ADsafe violation: Misformed ADSAFE.go.",adsafe_html:"Currently, ADsafe does not operate on whole HTML "+"documents. It operates on <div> fragments and .js files.",adsafe_id:"ADsafe violation: id does not match.",adsafe_id_go:"ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",adsafe_lib:"ADsafe lib violation.",adsafe_lib_second:"ADsafe: The second argument to lib must be a function.",adsafe_missing_id:"ADSAFE violation: missing ID_.",adsafe_name_a:"ADsafe name violation: '{a}'.",adsafe_placement:"ADsafe script placement violation.",adsafe_prefix_a:"ADsafe violation: An id must have a '{a}' prefix",adsafe_script:"ADsafe script violation.",adsafe_source:"ADsafe unapproved script source.",adsafe_subscript_a:"ADsafe subscript '{a}'.",adsafe_tag:"ADsafe violation: Disallowed tag '{a}'.",already_defined:"'{a}' is already defined.",and:"The '&&' subexpression should be wrapped in parens.",assign_exception:"Do not assign to the exception parameter.",assignment_function_expression:"Expected an assignment or "+"function call and instead saw an expression.",attribute_case_a:"Attribute '{a}' not all lower case.",avoid_a:"Avoid '{a}'.",bad_assignment:"Bad assignment.",bad_color_a:"Bad hex color '{a}'.",bad_constructor:"Bad constructor.",bad_entity:"Bad entity.",bad_html:"Bad HTML string",bad_id_a:"Bad id: '{a}'.",bad_in_a:"Bad for in variable '{a}'.",bad_invocation:"Bad invocation.",bad_name_a:"Bad name: '{a}'.",bad_new:"Do not use 'new' for side effects.",bad_number:"Bad number '{a}'.",bad_operand:"Bad operand.",bad_style:"Bad style.",bad_type:"Bad type.",bad_url_a:"Bad url '{a}'.",bad_wrap:"Do not wrap function literals in parens unless they "+"are to be immediately invoked.",combine_var:"Combine this with the previous 'var' statement.",conditional_assignment:"Expected a conditional expression and "+"instead saw an assignment.",confusing_a:"Confusing use of '{a}'.",confusing_regexp:"Confusing regular expression.",constructor_name_a:"A constructor name '{a}' should start with "+"an uppercase letter.",control_a:"Unexpected control character '{a}'.",css:"A css file should begin with @charset 'UTF-8';",dangling_a:"Unexpected dangling '_' in '{a}'.",dangerous_comment:"Dangerous comment.",deleted:"Only properties should be deleted.",duplicate_a:"Duplicate '{a}'.",empty_block:"Empty block.",empty_case:"Empty case.",empty_class:"Empty class.",es5:"This is an ES5 feature.",evil:"eval is evil.",expected_a:"Expected '{a}'.",expected_a_b:"Expected '{a}' and instead saw '{b}'.",expected_a_b_from_c_d:"Expected '{a}' to match '{b}' from line "+"{c} and instead saw '{d}'.",expected_at_a:"Expected an at-rule, and instead saw @{a}.",expected_a_at_b_c:"Expected '{a}' at column {b}, not column {c}.",expected_attribute_a:"Expected an attribute, and instead saw [{a}].",expected_attribute_value_a:"Expected an attribute value and "+"instead saw '{a}'.",expected_class_a:"Expected a class, and instead saw .{a}.",expected_fraction_a:"Expected a number between 0 and 1 and "+"instead saw '{a}'",expected_id_a:"Expected an id, and instead saw #{a}.",expected_identifier_a:"Expected an identifier and instead saw '{a}'.",expected_identifier_a_reserved:"Expected an identifier and "+"instead saw '{a}' (a reserved word).",expected_linear_a:"Expected a linear unit and instead saw '{a}'.",expected_lang_a:"Expected a lang code, and instead saw :{a}.",expected_media_a:"Expected a CSS media type, and instead saw '{a}'.",expected_name_a:"Expected a name and instead saw '{a}'.",expected_nonstandard_style_attribute:"Expected a non-standard "+"style attribute and instead saw '{a}'.",expected_number_a:"Expected a number and instead saw '{a}'.",expected_operator_a:"Expected an operator and instead saw '{a}'.",expected_percent_a:"Expected a percentage and instead saw '{a}'",expected_positive_a:"Expected a positive number and instead saw '{a}'",expected_pseudo_a:"Expected a pseudo, and instead saw :{a}.",expected_selector_a:"Expected a CSS selector, and instead saw {a}.",expected_small_a:"Expected a small positive integer and instead saw '{a}'",expected_space_a_b:"Expected exactly one space between '{a}' and '{b}'.",expected_string_a:"Expected a string and instead saw {a}.",expected_style_attribute:"Excepted a style attribute, and instead saw '{a}'.",expected_style_pattern:"Expected a style pattern, and instead saw '{a}'.",expected_tagname_a:"Expected a tagName, and instead saw {a}.",expected_type_a:"Expected a type, and instead saw {a}.",for_if:"The body of a for in should be wrapped in an if "+"statement to filter unwanted properties from the prototype.",function_block:"Function statements should not be placed in blocks. "+"Use a function expression or move the statement to the top of "+"the outer function.",function_eval:"The Function constructor is eval.",function_loop:"Don't make functions within a loop.",function_statement:"Function statements are not invocable. "+"Wrap the whole function invocation in parens.",function_strict:"Use the function form of 'use strict'.",html_confusion_a:"HTML confusion in regular expression '<{a}'.",html_handlers:"Avoid HTML event handlers.",identifier_function:"Expected an identifier in an assignment "+"and instead saw a function invocation.",implied_evil:"Implied eval is evil. Pass a function instead of a string.",infix_in:"Unexpected 'in'. Compare with undefined, or use the "+"hasOwnProperty method instead.",insecure_a:"Insecure '{a}'.",isNaN:"Use the isNaN function to compare with NaN.",lang:"lang is deprecated.",leading_decimal_a:"A leading decimal point can be confused with a dot: '.{a}'.",missing_a:"Missing '{a}'.",missing_a_after_b:"Missing '{a}' after '{b}'.",missing_option:"Missing option value.",missing_property:"Missing property name.",missing_space_a_b:"Missing space between '{a}' and '{b}'.",missing_url:"Missing url.",missing_use_strict:"Missing 'use strict' statement.",mixed:"Mixed spaces and tabs.",move_invocation:"Move the invocation into the parens that "+"contain the function.",move_var:"Move 'var' declarations to the top of the function.",name_function:"Missing name in function statement.",nested_comment:"Nested comment.",not:"Nested not.",not_a_constructor:"Do not use {a} as a constructor.",not_a_defined:"'{a}' has not been fully defined yet.",not_a_function:"'{a}' is not a function.",not_a_label:"'{a}' is not a label.",not_a_scope:"'{a}' is out of scope.",not_greater:"'{a}' should not be greater than '{b}'.",octal_a:"Don't use octal: '{a}'. Use '\\u....' instead.",parameter_arguments_a:"Do not mutate parameter '{a}' when using 'arguments'.",parameter_a_get_b:"Unexpected parameter '{a}' in get {b} function.",parameter_set_a:"Expected parameter (value) in set {a} function.",radix:"Missing radix parameter.",read_only:"Read only.",redefinition_a:"Redefinition of '{a}'.",reserved_a:"Reserved name '{a}'.",scanned_a_b:"{a} ({b}% scanned).",slash_equal:"A regular expression literal can be confused with '/='.",statement_block:"Expected to see a statement and instead saw a block.",stopping:"Stopping. ",strange_loop:"Strange loop.",strict:"Strict violation.",subscript:"['{a}'] is better written in dot notation.",sync_a:"Unexpected sync method: '{a}'.",tag_a_in_b:"A '<{a}>' must be within '<{b}>'.",too_long:"Line too long.",too_many:"Too many errors.",trailing_decimal_a:"A trailing decimal point can be confused "+"with a dot: '.{a}'.",type:"type is unnecessary.",unclosed:"Unclosed string.",unclosed_comment:"Unclosed comment.",unclosed_regexp:"Unclosed regular expression.",unescaped_a:"Unescaped '{a}'.",unexpected_a:"Unexpected '{a}'.",unexpected_char_a_b:"Unexpected character '{a}' in {b}.",unexpected_comment:"Unexpected comment.",unexpected_else:"Unexpected 'else' after 'return'.",unexpected_label_a:"Unexpected label '{a}'.",unexpected_property_a:"Unexpected /*property*/ '{a}'.",unexpected_space_a_b:"Unexpected space between '{a}' and '{b}'.",unnecessary_initialize:"It is not necessary to initialize '{a}' "+"to 'undefined'.",unnecessary_use:"Unnecessary 'use strict'.",unreachable_a_b:"Unreachable '{a}' after '{b}'.",unrecognized_style_attribute_a:"Unrecognized style attribute '{a}'.",unrecognized_tag_a:"Unrecognized tag '<{a}>'.",unsafe:"Unsafe character.",url:"JavaScript URL.",use_array:"Use the array literal notation [].",use_braces:"Spaces are hard to count. Use {{a}}.",use_charAt:"Use the charAt method.",use_object:"Use the object literal notation {}.",use_or:"Use the || operator.",use_param:"Use a named parameter.",used_before_a:"'{a}' was used before it was defined.",var_a_not:"Variable {a} was not declared correctly.",weird_assignment:"Weird assignment.",weird_condition:"Weird condition.",weird_new:"Weird construction. Delete 'new'.",weird_program:"Weird program.",weird_relation:"Weird relation.",weird_ternary:"Weird ternary.",wrap_immediate:"Wrap an immediate function invocation in parentheses "+"to assist the reader in understanding that the expression "+"is the result of a function, and not the function itself.",wrap_regexp:"Wrap the /regexp/ literal in parens to "+"disambiguate the slash operator.",write_is_wrong:"document.write can be a form of eval."},comments_off,css_attribute_data,css_any,css_colorData=array_to_object(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext"],true),css_border_style,css_break,css_lengthData={"%":true,cm:true,em:true,ex:true,"in":true,mm:true,pc:true,pt:true,px:true},css_media,css_overflow,descapes={b:"\b",t:"	",n:"\n",f:"\f",r:"\r",'"':'"',"/":"/","\\":"\\","!":"!"},devel=array_to_object(["alert","confirm","console","Debug","opera","prompt","WSH"],false),directive,escapes={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'",'"':'\\"',"/":"\\/","\\":"\\\\"},funct,functionicity=["closure","exception","global","label","outer","undef","unused","var"],functions,global_funct,global_scope,html_tag={a:{},abbr:{},acronym:{},address:{},applet:{},area:{empty:true,parent:" map "},article:{},aside:{},audio:{},b:{},base:{empty:true,parent:" head "},bdo:{},big:{},blockquote:{},body:{parent:" html noframes "},br:{empty:true},button:{},canvas:{parent:" body p div th td "},caption:{parent:" table "},center:{},cite:{},code:{},col:{empty:true,parent:" table colgroup "},colgroup:{parent:" table "},command:{parent:" menu "},datalist:{},dd:{parent:" dl "},del:{},details:{},dialog:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:" dl "},em:{},embed:{},fieldset:{},figure:{},font:{},footer:{},form:{},frame:{empty:true,parent:" frameset "},frameset:{parent:" html frameset "},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:" html "},header:{},hgroup:{},hr:{empty:true},"hta:application":{empty:true,parent:" head "},html:{parent:"*"},i:{},iframe:{},img:{empty:true},input:{empty:true},ins:{},kbd:{},keygen:{},label:{},legend:{parent:" details fieldset figure "},li:{parent:" dir menu ol ul "},link:{empty:true,parent:" head "},map:{},mark:{},menu:{},meta:{empty:true,parent:" head noframes noscript "},meter:{},nav:{},noframes:{parent:" html body "},noscript:{parent:" body head noframes "},object:{},ol:{},optgroup:{parent:" select "},option:{parent:" optgroup select "},output:{},p:{},param:{empty:true,parent:" applet object "},pre:{},progress:{},q:{},rp:{},rt:{},ruby:{},samp:{},script:{empty:true,parent:" body div frame head iframe p pre span "},section:{},select:{},small:{},span:{},source:{},strong:{},style:{parent:" head ",empty:true},sub:{},sup:{},table:{},tbody:{parent:" table "},td:{parent:" tr "},textarea:{},tfoot:{parent:" table "},th:{parent:" tr "},thead:{parent:" table "},time:{},title:{parent:" head "},tr:{parent:" table tbody thead tfoot "},tt:{},u:{},ul:{},"var":{},video:{}},ids,in_block,indent,itself,json_mode,lex,lines,lookahead,node=array_to_object(["Buffer","clearInterval","clearTimeout","console","exports","global","module","process","querystring","require","setInterval","setTimeout","__dirname","__filename"],false),node_js,numbery=array_to_object(["indexOf","lastIndexOf","search"],true),next_token,option,predefined,prereg,prev_token,property,regexp_flag=array_to_object(["g","i","m"],true),return_this=function return_this(){return this},rhino=array_to_object(["defineClass","deserialize","gc","help","load","loadClass","print","quit","readFile","readUrl","runCommand","seal","serialize","spawn","sync","toint32","version"],false),scope,semicolon_coda=array_to_object([";",'"',"'",")"],true),src,stack,standard=array_to_object(["Array","Boolean","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Function","isFinite","isNaN","JSON","Math","Number","Object","parseInt","parseFloat","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError"],false),strict_mode,syntax={},tab,token,urls,var_mode,warnings,windows=array_to_object(["ActiveXObject","CScript","Debug","Enumerator","System","VBArray","WScript","WSH"],false),xmode,xquote,ax=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,crlfx=/\r\n?|\n/,cx=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,dx=/[\[\]\/\\"'*<>.&:(){}+=#]/,hx=/^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-:]*|[0-9]+|--)/,ix=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,jx=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,lx=/\*\/|\/\*/,nx=/[\u0000-\u001f'\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,ox=/[>&]|<[\/!]?|--/,qx=/[^a-zA-Z0-9+\-_\/. ]/,sx=/^\s*([{}:#%.=,>+\[\]@()"';]|[*$\^~]=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,ssx=/^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/,tx=/^\s*([(){}\[\]\?.,:;'"~#@`]|={1,3}|\/(\*(jslint|properties|property|members?|globals?)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|[\^%]=?|&[&=]?|\|[|=]?|>{1,3}=?|<(?:[\/=!]|\!(\[|--)?|<=?)?|\!={0,2}|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+(?:[xX][0-9a-fA-F]+|\.[0-9]*)?(?:[eE][+\-]?[0-9]+)?)/,ux=/&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto|script/i,rx={outer:hx,html:hx,style:sx,styleproperty:ssx};function F(){}if(typeof Array.prototype.filter!=="function"){Array.prototype.filter=function(f){var i,length=this.length,result=[],value;for(i=0;i<length;i+=1){try{value=this[i];if(f(value)){result.push(value)}}catch(ignore){}}return result}}if(typeof Array.prototype.forEach!=="function"){Array.prototype.forEach=function(f){var i,length=this.length;for(i=0;i<length;i+=1){try{f(this[i])}catch(ignore){}}}}if(typeof Array.isArray!=="function"){Array.isArray=function(o){return Object.prototype.toString.apply(o)==="[object Array]"}}if(!Object.prototype.hasOwnProperty.call(Object,"create")){Object.create=function(o){F.prototype=o;return new F}}if(typeof Object.keys!=="function"){Object.keys=function(o){var array=[],key;for(key in o){if(Object.prototype.hasOwnProperty.call(o,key)){array.push(key)}}return array}}if(typeof String.prototype.entityify!=="function"){String.prototype.entityify=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}if(typeof String.prototype.isAlpha!=="function"){String.prototype.isAlpha=function(){return this>="a"&&this<="z"||this>="A"&&this<="Z"}}if(typeof String.prototype.isDigit!=="function"){String.prototype.isDigit=function(){return this>="0"&&this<="9"}}if(typeof String.prototype.supplant!=="function"){String.prototype.supplant=function(o){return this.replace(/\{([^{}]*)\}/g,function(a,b){var replacement=o[b];return typeof replacement==="string"||typeof replacement==="number"?replacement:a})}}function sanitize(a){return escapes[a]||"\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)}function add_to_predefined(group){Object.keys(group).forEach(function(name){predefined[name]=group[name]})}function assume(){if(!option.safe){if(option.rhino){add_to_predefined(rhino);option.rhino=false}if(option.devel){add_to_predefined(devel);option.devel=false}if(option.browser){add_to_predefined(browser);option.browser=false}if(option.windows){add_to_predefined(windows);option.windows=false}if(option.node){add_to_predefined(node);option.node=false;node_js=true}}}function artifact(tok){if(!tok){tok=next_token}return tok.number||tok.string}function quit(message,line,character){throw{name:"JSLintError",line:line,character:character,message:bundle.scanned_a_b.supplant({a:message,b:Math.floor(line/lines.length*100)})}}function warn(message,offender,a,b,c,d){var character,line,warning;offender=offender||next_token;line=offender.line||0;character=offender.from||0;warning={id:"(error)",raw:bundle[message]||message,evidence:lines[line-1]||"",line:line,character:character,a:a||(offender.id==="(number)"?String(offender.number):offender.string),b:b,c:c,d:d};warning.reason=warning.raw.supplant(warning);JSLINT.errors.push(warning);if(option.passfail){quit(bundle.stopping,line,character)}warnings+=1;if(warnings>=option.maxerr){quit(bundle.too_many,line,character)}return warning}function warn_at(message,line,character,a,b,c,d){return warn(message,{line:line,from:character},a,b,c,d)}function stop(message,offender,a,b,c,d){var warning=warn(message,offender,a,b,c,d);quit(bundle.stopping,warning.line,warning.character)}function stop_at(message,line,character,a,b,c,d){return stop(message,{line:line,from:character},a,b,c,d)}function expected_at(at){if(!option.white&&next_token.from!==at){warn("expected_a_at_b_c",next_token,"",at,next_token.from)}}function aint(it,name,expected){if(it[name]!==expected){warn("expected_a_b",it,expected,it[name]);return true}return false}lex=function lex(){var character,c,from,length,line,pos,source_row;function next_line(){var at;if(line>=lines.length){return false}character=1;source_row=lines[line];line+=1;at=source_row.search(/ \t/);if(at>=0){warn_at("mixed",line,at+1)}source_row=source_row.replace(/\t/g,tab);at=source_row.search(cx);if(at>=0){warn_at("unsafe",line,at)}if(option.maxlen&&option.maxlen<source_row.length){warn_at("too_long",line,source_row.length)}return true}function it(type,value){var id,the_token;if(type==="(string)"||type==="(range)"){if(jx.test(value)){warn_at("url",line,from)}}the_token=Object.create(syntax[type==="(punctuator)"||type==="(identifier)"&&Object.prototype.hasOwnProperty.call(syntax,value)?value:type]||syntax["(error)"]);if(type==="(identifier)"){the_token.identifier=true;if(value==="__iterator__"||value==="__proto__"){stop_at("reserved_a",line,from,value)}else if(!option.nomen&&(value.charAt(0)==="_"||value.charAt(value.length-1)==="_")){warn_at("dangling_a",line,from,value)}}if(type==="(number)"){the_token.number=+value}else if(value!==undefined){the_token.string=String(value)}the_token.line=line;the_token.from=from;the_token.thru=character;id=the_token.id;prereg=id&&("(,=:[!&|?{};".indexOf(id.charAt(id.length-1))>=0||id==="return"||id==="case");return the_token}function match(x){var exec=x.exec(source_row),first;if(exec){length=exec[0].length;first=exec[1];c=first.charAt(0);source_row=source_row.slice(length);from=character+length-first.length;character+=length;return first}}function string(x){var c,pos=0,r="",result;function hex(n){var i=parseInt(source_row.substr(pos+1,n),16);pos+=n;if(i>=32&&i<=126&&i!==34&&i!==92&&i!==39){warn_at("unexpected_a",line,character,"\\")}character+=n;c=String.fromCharCode(i)}if(json_mode&&x!=='"'){warn_at("expected_a",line,character,'"')}if(xquote===x||xmode==="scriptstring"&&!xquote){return it("(punctuator)",x)}for(;;){while(pos>=source_row.length){pos=0;if(xmode!=="html"||!next_line()){stop_at("unclosed",line,from)}}c=source_row.charAt(pos);if(c===x){character+=1;source_row=source_row.slice(pos+1);result=it("(string)",r);result.quote=x;return result}if(c<" "){if(c==="\n"||c==="\r"){break}warn_at("control_a",line,character+pos,source_row.slice(0,pos))}else if(c===xquote){warn_at("bad_html",line,character+pos)}else if(c==="<"){if(option.safe&&xmode==="html"){warn_at("adsafe_a",line,character+pos,c)}else if(source_row.charAt(pos+1)==="/"&&(xmode||option.safe)){warn_at("expected_a_b",line,character,"<\\/","</")}else if(source_row.charAt(pos+1)==="!"&&(xmode||option.safe)){warn_at("unexpected_a",line,character,"<!")}}else if(c==="\\"){if(xmode==="html"){if(option.safe){warn_at("adsafe_a",line,character+pos,c)}}else if(xmode==="styleproperty"){pos+=1;character+=1;c=source_row.charAt(pos);if(c!==x){warn_at("unexpected_a",line,character,"\\")}}else{pos+=1;character+=1;c=source_row.charAt(pos);switch(c){case"":if(!option.es5){warn_at("es5",line,character)}next_line();pos=-1;break;case xquote:warn_at("bad_html",line,character+pos);break;case"'":if(json_mode){warn_at("unexpected_a",line,character,"\\'")}break;case"u":hex(4);break;case"v":if(json_mode){warn_at("unexpected_a",line,character,"\\v")}c="";break;case"x":if(json_mode){warn_at("unexpected_a",line,character,"\\x")}hex(2);break;default:if(typeof descapes[c]!=="string"){warn_at(c>="0"&&c<="7"?"octal_a":"unexpected_a",line,character,"\\"+c)}else{c=descapes[c]}}}}r+=c;character+=1;pos+=1}}function number(snippet){var digit;if(xmode!=="style"&&xmode!=="styleproperty"&&source_row.charAt(0).isAlpha()){warn_at("expected_space_a_b",line,character,c,source_row.charAt(0))}if(c==="0"){digit=snippet.charAt(1);if(digit.isDigit()){if(token.id!=="."&&xmode!=="styleproperty"){warn_at("unexpected_a",line,character,snippet)}}else if(json_mode&&(digit==="x"||digit==="X")){warn_at("unexpected_a",line,character,"0x")}}if(snippet.slice(snippet.length-1)==="."){warn_at("trailing_decimal_a",line,character,snippet)}if(xmode!=="style"){digit=+snippet;if(!isFinite(digit)){warn_at("bad_number",line,character,snippet)}snippet=digit}return it("(number)",snippet)}function comment(snippet){if(comments_off||src||xmode&&xmode!=="script"&&xmode!=="style"&&xmode!=="styleproperty"){warn_at("unexpected_comment",line,character)}else if(xmode==="script"&&/<\//i.test(source_row)){warn_at("unexpected_a",line,character,"</")}else if(option.safe&&ax.test(snippet)){warn_at("dangerous_comment",line,character)}}function regexp(){var b,bit,captures=0,depth=0,flag="",high,letter,length=0,low,potential,quote,result;for(;;){b=true;c=source_row.charAt(length);length+=1;switch(c){case"":stop_at("unclosed_regexp",line,from);return;case"/":if(depth>0){warn_at("unescaped_a",line,from+length,"/")}c=source_row.slice(0,length-1);potential=Object.create(regexp_flag);for(;;){letter=source_row.charAt(length);if(potential[letter]!==true){break}potential[letter]=false;length+=1;flag+=letter}if(source_row.charAt(length).isAlpha()){stop_at("unexpected_a",line,from,source_row.charAt(length))}character+=length;source_row=source_row.slice(length);quote=source_row.charAt(0);if(quote==="/"||quote==="*"){stop_at("confusing_regexp",line,from)}result=it("(regexp)",c);result.flag=flag;return result;case"\\":c=source_row.charAt(length);if(c<" "){warn_at("control_a",line,from+length,String(c))}else if(c==="<"){warn_at(bundle.unexpected_a,line,from+length,"\\")}length+=1;break;case"(":depth+=1;b=false;if(source_row.charAt(length)==="?"){length+=1;switch(source_row.charAt(length)){case":":case"=":case"!":length+=1;break;default:warn_at(bundle.expected_a_b,line,from+length,":",source_row.charAt(length))}}else{captures+=1}break;case"|":b=false;break;case")":if(depth===0){warn_at("unescaped_a",line,from+length,")")}else{depth-=1}break;case" ":pos=1;while(source_row.charAt(length)===" "){length+=1;pos+=1}if(pos>1){warn_at("use_braces",line,from+length,pos)}break;case"[":c=source_row.charAt(length);if(c==="^"){length+=1;if(!option.regexp){warn_at("insecure_a",line,from+length,c)}else if(source_row.charAt(length)==="]"){stop_at("unescaped_a",line,from+length,"^")}}bit=false;if(c==="]"){warn_at("empty_class",line,from+length-1);bit=true}klass:do{c=source_row.charAt(length);length+=1;switch(c){case"[":case"^":warn_at("unescaped_a",line,from+length,c);bit=true;break;case"-":if(bit){bit=false}else{warn_at("unescaped_a",line,from+length,"-");bit=true}break;case"]":if(!bit){warn_at("unescaped_a",line,from+length-1,"-")}break klass;case"\\":c=source_row.charAt(length);if(c<" "){warn_at(bundle.control_a,line,from+length,String(c))}else if(c==="<"){warn_at(bundle.unexpected_a,line,from+length,"\\")}length+=1;bit=true;break;case"/":warn_at("unescaped_a",line,from+length-1,"/");bit=true;break;case"<":if(xmode==="script"){c=source_row.charAt(length);if(c==="!"||c==="/"){warn_at(bundle.html_confusion_a,line,from+length,c)}}bit=true;break;default:bit=true}}while(c);break;case".":if(!option.regexp){warn_at("insecure_a",line,from+length,c)}break;case"]":case"?":case"{":case"}":case"+":case"*":warn_at("unescaped_a",line,from+length,c);break;case"<":if(xmode==="script"){c=source_row.charAt(length);if(c==="!"||c==="/"){warn_at(bundle.html_confusion_a,line,from+length,c)}}break}if(b){switch(source_row.charAt(length)){case"?":case"+":case"*":length+=1;if(source_row.charAt(length)==="?"){length+=1}break;case"{":length+=1;c=source_row.charAt(length);if(c<"0"||c>"9"){warn_at(bundle.expected_number_a,line,from+length,c)}length+=1;low=+c;for(;;){c=source_row.charAt(length);if(c<"0"||c>"9"){break}length+=1;low=+c+low*10}high=low;if(c===","){length+=1;high=Infinity;c=source_row.charAt(length);if(c>="0"&&c<="9"){length+=1;high=+c;for(;;){c=source_row.charAt(length);if(c<"0"||c>"9"){break}length+=1;high=+c+high*10}}}if(source_row.charAt(length)!=="}"){warn_at(bundle.expected_a_b,line,from+length,"}",c)}else{length+=1}if(source_row.charAt(length)==="?"){length+=1}if(low>high){warn_at(bundle.not_greater,line,from+length,low,high)}break}}}c=source_row.slice(0,length-1);character+=length;source_row=source_row.slice(length);return it("(regexp)",c)}return{init:function(source){if(typeof source==="string"){lines=source.split(crlfx)}else{lines=source}line=0;next_line();from=1},range:function(begin,end){var c,value="";from=character;if(source_row.charAt(0)!==begin){stop_at("expected_a_b",line,character,begin,source_row.charAt(0))}for(;;){source_row=source_row.slice(1);character+=1;c=source_row.charAt(0);switch(c){case"":stop_at("missing_a",line,character,c);break;case end:source_row=source_row.slice(1);character+=1;return it("(range)",value);case xquote:case"\\":warn_at("unexpected_a",line,character,c);break}value+=c}},token:function(){var c,i,snippet;for(;;){while(!source_row){if(!next_line()){return it("(end)")}}while(xmode==="outer"){i=source_row.search(ox);if(i===0){break}else if(i>0){character+=1;source_row=source_row.slice(i);break}else{if(!next_line()){return it("(end)","")}}}snippet=match(rx[xmode]||tx);if(!snippet){if(source_row){if(source_row.charAt(0)===" "){if(!option.white){warn_at("unexpected_a",line,character,"(space)")}character+=1;source_row=""}else{stop_at("unexpected_a",line,character,source_row.charAt(0))}}}else{c=snippet.charAt(0);if(c.isAlpha()||c==="_"||c==="$"){return it("(identifier)",snippet)}if(c.isDigit()){return number(snippet)}switch(snippet){case'"':case"'":return string(snippet);case"//":comment(source_row);source_row="";break;case"/*":for(;;){i=source_row.search(lx);if(i>=0){break}comment(source_row);if(!next_line()){stop_at("unclosed_comment",line,character)}}comment(source_row.slice(0,i));character+=i+2;if(source_row.charAt(i)==="/"){stop_at("nested_comment",line,character)}source_row=source_row.slice(i+2);break;case"":break;case"/":if(token.id==="/="){stop_at(bundle.slash_equal,line,from)}return prereg?regexp():it("(punctuator)",snippet);case"<!--":length=line;for(;;){i=source_row.indexOf("--");if(i>=0){break}i=source_row.indexOf("<!");if(i>=0){stop_at("nested_comment",line,character+i)}if(!next_line()){stop_at("unclosed_comment",length,c)}}length=source_row.indexOf("<!");if(length>=0&&length<i){stop_at("nested_comment",line,character+length)}character+=i;if(source_row.charAt(i+2)!==">"){stop_at("expected_a",line,character,"-->")}character+=3;source_row=source_row.slice(i+3);break;case"#":if(xmode==="html"||xmode==="styleproperty"){for(;;){c=source_row.charAt(0);if((c<"0"||c>"9")&&(c<"a"||c>"f")&&(c<"A"||c>"F")){break}character+=1;source_row=source_row.slice(1);snippet+=c}if(snippet.length!==4&&snippet.length!==7){warn_at("bad_color_a",line,from+length,snippet)}return it("(color)",snippet)}return it("(punctuator)",snippet);default:if(xmode==="outer"&&c==="&"){character+=1;source_row=source_row.slice(1);for(;;){c=source_row.charAt(0);character+=1;source_row=source_row.slice(1);if(c===";"){break}if(!(c>="0"&&c<="9"||c>="a"&&c<="z"||c==="#")){stop_at("bad_entity",line,from+length,character)}}break}return it("(punctuator)",snippet)}}}}}}();function add_label(token,kind,name){name=name||token.string;if(funct===global_funct){if(option.safe){warn("adsafe_a",token,name)}if(typeof global_funct[name]!=="string"){token.writeable=typeof predefined[name]==="boolean"?predefined[name]:true;token.funct=funct;global_scope[name]=token}if(kind==="becoming"){kind="var"}}else{if(typeof funct[name]==="string"){if(funct[name]==="undef"){if(!option.undef){warn("used_before_a",token,name)}kind="var"}else{warn("already_defined",token,name)}}else{token.funct=funct;token.writeable=true;scope[name]=token}}funct[name]=kind}function peek(distance){var found,slot=0;distance=distance||0;while(slot<=distance){found=lookahead[slot];if(!found){found=lookahead[slot]=lex.token()}slot+=1}return found}function advance(id,match){if(indent){if(var_mode&&next_token.line!==token.line){if((var_mode!==indent||!next_token.edge)&&next_token.from===indent.at-(next_token.edge?option.indent:0)){var dent=indent;for(;;){dent.at-=option.indent;if(dent===var_mode){break}dent=dent.was}dent.open=false}var_mode=null}if(next_token.id==="?"&&indent.mode===":"&&token.line!==next_token.line){indent.at-=option.indent}if(indent.open){if(next_token.edge){if(next_token.edge==="label"){expected_at(1)}else if(next_token.edge==="case"||indent.mode==="statement"){expected_at(indent.at-option.indent)}else if(indent.mode!=="array"||next_token.line!==token.line){expected_at(indent.at)}}else if(next_token.line!==token.line){if(next_token.from<indent.at+(indent.mode==="expression"?0:option.indent)){expected_at(indent.at+option.indent)}indent.wrap=true}}else if(next_token.line!==token.line){if(next_token.edge){expected_at(indent.at)}else{indent.wrap=true;if(indent.mode==="statement"||indent.mode==="var"){expected_at(indent.at+option.indent)}else if(next_token.from<indent.at+(indent.mode==="expression"?0:option.indent)){expected_at(indent.at+option.indent)}}}}switch(token.id){case"(number)":if(next_token.id==="."){warn("trailing_decimal_a")}break;case"-":if(next_token.id==="-"||next_token.id==="--"){warn("confusing_a")}break;case"+":if(next_token.id==="+"||next_token.id==="++"){warn("confusing_a")}break}if(token.id==="(string)"||token.identifier){anonname=token.string}if(id&&next_token.id!==id){if(match){warn("expected_a_b_from_c_d",next_token,id,match.id,match.line,artifact())}else if(!next_token.identifier||next_token.string!==id){warn("expected_a_b",next_token,id,artifact())}}prev_token=token;token=next_token;next_token=lookahead.shift()||lex.token()}function advance_identifier(string){if(next_token.identifier&&next_token.string===string){advance()}else{warn("expected_a_b",next_token,string,artifact())}}function do_safe(){if(option.adsafe){option.safe=true}if(option.safe){option.browser=option["continue"]=option.css=option.debug=option.devel=option.evil=option.forin=option.newcap=option.nomen=option.on=option.rhino=option.sloppy=option.sub=option.undef=option.windows=false;delete predefined.Array;delete predefined.Date;delete predefined.Function;delete predefined.Object;delete predefined["eval"];add_to_predefined({ADSAFE:false,lib:false})}}function do_globals(){var name,writeable;for(;;){if(next_token.id!=="(string)"&&!next_token.identifier){return}name=next_token.string;advance();writeable=false;if(next_token.id===":"){advance(":");switch(next_token.id){case"true":writeable=predefined[name]!==false;advance("true");break;case"false":advance("false");break;default:stop("unexpected_a")}}predefined[name]=writeable;if(next_token.id!==","){return}advance(",")}}function do_jslint(){var name,value;while(next_token.id==="(string)"||next_token.identifier){name=next_token.string;if(!allowed_option[name]){stop("unexpected_a")}advance();if(next_token.id!==":"){stop("expected_a_b",next_token,":",artifact())}advance(":");if(typeof allowed_option[name]==="number"){value=next_token.number;if(value>allowed_option[name]||value<=0||Math.floor(value)!==value){stop("expected_small_a")}option[name]=value}else{if(next_token.id==="true"){option[name]=true}else if(next_token.id==="false"){option[name]=false}else{stop("unexpected_a")}}advance();if(next_token.id===","){advance(",")}}assume()}function do_properties(){var name;option.properties=true;for(;;){if(next_token.id!=="(string)"&&!next_token.identifier){return}name=next_token.string;advance();if(next_token.id===":"){for(;;){advance();if(next_token.id!=="(string)"&&!next_token.identifier){break}}}property[name]=0;if(next_token.id!==","){return}advance(",")}}directive=function directive(){var command=this.id,old_comments_off=comments_off,old_indent=indent;comments_off=true;indent=null;if(next_token.line===token.line&&next_token.from===token.thru){warn("missing_space_a_b",next_token,artifact(token),artifact())}if(lookahead.length>0){warn("unexpected_a",this)}switch(command){case"/*properties":case"/*property":case"/*members":case"/*member":do_properties();break;case"/*jslint":if(option.safe){warn("adsafe_a",this)}do_jslint();break;case"/*globals":case"/*global":if(option.safe){warn("adsafe_a",this)}do_globals();break;default:stop("unexpected_a",this)}comments_off=old_comments_off;advance("*/");indent=old_indent};function edge(mode){next_token.edge=indent?indent.open&&(mode||"edge"):""}function step_in(mode){var open;if(typeof mode==="number"){indent={at:+mode,open:true,was:indent}}else if(!indent){indent={at:1,mode:"statement",open:true}}else if(mode==="statement"){indent={at:indent.at,open:true,was:indent}}else{open=mode==="var"||next_token.line!==token.line;indent={at:(open||mode==="control"?indent.at+option.indent:indent.at)+(indent.wrap?option.indent:0),mode:mode,open:open,was:indent};if(mode==="var"&&open){var_mode=indent}}}function step_out(id,symbol){if(id){if(indent&&indent.open){indent.at-=option.indent;edge()}advance(id,symbol)}if(indent){indent=indent.was}}function one_space(left,right){left=left||token;right=right||next_token;if(right.id!=="(end)"&&!option.white&&(token.line!==right.line||token.thru+1!==right.from)){warn("expected_space_a_b",right,artifact(token),artifact(right))}}function one_space_only(left,right){left=left||token;right=right||next_token;if(right.id!=="(end)"&&(left.line!==right.line||!option.white&&left.thru+1!==right.from)){warn("expected_space_a_b",right,artifact(left),artifact(right))}}function no_space(left,right){left=left||token;right=right||next_token;if((!option.white||xmode==="styleproperty"||xmode==="style")&&left.thru!==right.from&&left.line===right.line){warn("unexpected_space_a_b",right,artifact(left),artifact(right))}}function no_space_only(left,right){left=left||token;right=right||next_token;if(right.id!=="(end)"&&(left.line!==right.line||!option.white&&left.thru!==right.from)){warn("unexpected_space_a_b",right,artifact(left),artifact(right))}}function spaces(left,right){if(!option.white){left=left||token;right=right||next_token;if(left.thru===right.from&&left.line===right.line){warn("missing_space_a_b",right,artifact(left),artifact(right))}}}function comma(){if(next_token.id!==","){warn_at("expected_a_b",token.line,token.thru,",",artifact())}else{if(!option.white){no_space_only()}advance(",");spaces()}}function semicolon(){if(next_token.id!==";"){warn_at("expected_a_b",token.line,token.thru,";",artifact())}else{if(!option.white){no_space_only()}advance(";");if(semicolon_coda[next_token.id]!==true){spaces()}}}function use_strict(){if(next_token.string==="use strict"){if(strict_mode){warn("unnecessary_use")}edge();advance();semicolon();strict_mode=true;option.undef=false;return true}return false}function are_similar(a,b){if(a===b){return true}if(Array.isArray(a)){if(Array.isArray(b)&&a.length===b.length){var i;for(i=0;i<a.length;i+=1){if(!are_similar(a[i],b[i])){return false}}return true}return false}if(Array.isArray(b)){return false}if(a.id==="(number)"&&b.id==="(number)"){return a.number===b.number}if(a.arity===b.arity&&a.string===b.string){switch(a.arity){case"prefix":case"suffix":case undefined:return a.id===b.id&&are_similar(a.first,b.first);case"infix":return are_similar(a.first,b.first)&&are_similar(a.second,b.second);case"ternary":return are_similar(a.first,b.first)&&are_similar(a.second,b.second)&&are_similar(a.third,b.third);case"function":case"regexp":return false;default:return true}}else{if(a.id==="."&&b.id==="["&&b.arity==="infix"){return a.second.string===b.second.string&&b.second.id==="(string)"}if(a.id==="["&&a.arity==="infix"&&b.id==="."){return a.second.string===b.second.string&&a.second.id==="(string)"}}return false}function expression(rbp,initial){var left;if(next_token.id==="(end)"){stop("unexpected_a",token,next_token.id)}advance();if(option.safe&&scope[token.string]&&scope[token.string]===global_scope[token.string]&&next_token.id!=="("&&next_token.id!=="."){warn("adsafe_a",token)}if(initial){anonname="anonymous";funct["(verb)"]=token.string}if(initial===true&&token.fud){left=token.fud()}else{if(token.nud){left=token.nud()}else{if(next_token.id==="(number)"&&token.id==="."){warn("leading_decimal_a",token,artifact());advance();return token}stop("expected_identifier_a",token,token.id)}while(rbp<next_token.lbp){advance();if(token.led){left=token.led(left)}else{stop("expected_operator_a",token,token.id)}}}return left}function symbol(s,p){var x=syntax[s];if(!x||typeof x!=="object"){syntax[s]=x={id:s,lbp:p||0,string:s}}return x}function postscript(x){x.postscript=true;return x}function ultimate(s){var x=symbol(s,0);x.from=1;x.thru=1;x.line=0;x.edge="edge";s.string=s;return postscript(x)}function stmt(s,f){var x=symbol(s);x.identifier=x.reserved=true;x.fud=f;return x}function labeled_stmt(s,f){var x=stmt(s,f);x.labeled=true}function disrupt_stmt(s,f){var x=stmt(s,f);x.disrupt=true}function reserve_name(x){var c=x.id.charAt(0);if(c>="a"&&c<="z"||c>="A"&&c<="Z"){x.identifier=x.reserved=true}return x}function prefix(s,f){var x=symbol(s,150);reserve_name(x);x.nud=typeof f==="function"?f:function(){if(s==="typeof"){one_space()}else{no_space_only()}this.first=expression(150);this.arity="prefix";if(this.id==="++"||this.id==="--"){if(!option.plusplus){warn("unexpected_a",this)}else if((!this.first.identifier||this.first.reserved)&&this.first.id!=="."&&this.first.id!=="["){warn("bad_operand",this)}}return this};return x}function type(s,t,nud){var x=symbol(s);x.arity=t;if(nud){x.nud=nud}return x}function reserve(s,f){var x=symbol(s);x.identifier=x.reserved=true;if(typeof f==="function"){x.nud=f}return x}function constant(name){var x=reserve(name);x.string=name;x.nud=return_this;return x}function reservevar(s,v){return reserve(s,function(){if(typeof v==="function"){v(this)}return this})}function infix(s,p,f,w){var x=symbol(s,p);reserve_name(x);x.led=function(left){this.arity="infix";if(!w){spaces(prev_token,token);spaces()}if(!option.bitwise&&this.bitwise){warn("unexpected_a",this)}if(typeof f==="function"){return f(left,this)}this.first=left;this.second=expression(p);return this};return x}function expected_relation(node,message){if(node.assign){warn(message||bundle.conditional_assignment,node)}return node}function expected_condition(node,message){switch(node.id){case"[":case"-":if(node.arity!=="infix"){warn(message||bundle.weird_condition,node)}break;case"false":case"function":case"Infinity":case"NaN":case"null":case"true":case"undefined":case"void":case"(number)":case"(regexp)":case"(string)":case"{":warn(message||bundle.weird_condition,node);break;case"(":if(node.first.id==="."&&numbery[node.first.second.string]===true){warn(message||bundle.weird_condition,node)}break}return node}function check_relation(node){switch(node.arity){case"prefix":switch(node.id){case"{":case"[":warn("unexpected_a",node);break;case"!":warn("confusing_a",node);break}break;case"function":case"regexp":warn("unexpected_a",node);break;default:if(node.id==="NaN"){warn("isNaN",node)}}return node}function relation(s,eqeq){return infix(s,100,function(left,that){check_relation(left);if(eqeq&&!option.eqeq){warn("expected_a_b",that,eqeq,that.id)}var right=expression(100);if(are_similar(left,right)||(left.id==="(string)"||left.id==="(number)")&&(right.id==="(string)"||right.id==="(number)")){warn("weird_relation",that)}that.first=left;that.second=check_relation(right);return that})}function assignop(s,op){var x=infix(s,20,function(left,that){var l;that.first=left;if(left.identifier){if(scope[left.string]){if(scope[left.string].writeable===false){warn("read_only",left)}}else{stop("read_only")}if(funct["(params)"]){funct["(params)"].forEach(function(value){if(value.string===left.string){value.assign=true}})}}else if(option.safe){l=left;do{if(typeof predefined[l.string]==="boolean"){warn("adsafe_a",l)}l=l.first}while(l)}if(left===syntax["function"]){warn("identifier_function",token)}if(left.id==="."||left.id==="["){if(!left.first||left.first.string==="arguments"){warn("bad_assignment",that)}}else if(left.identifier){if(!left.reserved&&funct[left.string]==="exception"){warn("assign_exception",left)}}else{warn("bad_assignment",that)}that.second=expression(19);if(that.id==="="&&are_similar(that.first,that.second)){warn("weird_assignment",that)}return that});x.assign=true;if(op){if(syntax[op].bitwise){x.bitwise=true}}return x}function bitwise(s,p){var x=infix(s,p,"number");x.bitwise=true;return x}function suffix(s){var x=symbol(s,150);x.led=function(left){no_space_only(prev_token,token);if(!option.plusplus){warn("unexpected_a",this)}else if((!left.identifier||left.reserved)&&left.id!=="."&&left.id!=="["){warn("bad_operand",this)}this.first=left;this.arity="suffix";return this};return x}function optional_identifier(){if(next_token.identifier){advance();if(option.safe&&banned[token.string]){warn("adsafe_a",token)}else if(token.reserved&&!option.es5){warn("expected_identifier_a_reserved",token)}return token.string}}function identifier(){var i=optional_identifier();if(!i){stop(token.id==="function"&&next_token.id==="("?"name_function":"expected_identifier_a")}return i}function statement(){var label,old_scope=scope,the_statement;if(next_token.id===";"){warn("unexpected_a");semicolon();return}if(next_token.identifier&&!next_token.reserved&&peek().id===":"){edge("label");label=next_token;advance();advance(":");scope=Object.create(old_scope);add_label(label,"label");if(next_token.labeled!==true||funct===global_funct){stop("unexpected_label_a",label)}else if(jx.test(label.string+":")){warn("url",label)}next_token.label=label}if(token.id!=="else"){edge()}step_in("statement");the_statement=expression(0,true);if(the_statement){if(the_statement.arity==="statement"){if(the_statement.id==="switch"||the_statement.block&&the_statement.id!=="do"){spaces()}else{semicolon()}}else{if(the_statement.id==="("){if(the_statement.first.id==="new"){warn("bad_new")}}else if(!the_statement.assign&&the_statement.id!=="delete"&&the_statement.id!=="++"&&the_statement.id!=="--"){warn("assignment_function_expression",token)}semicolon()}}step_out();scope=old_scope;return the_statement}function statements(){var array=[],disruptor,the_statement;while(next_token.postscript!==true){if(next_token.id===";"){warn("unexpected_a",next_token);semicolon()}else{if(next_token.string==="use strict"){if(!node_js&&xmode!=="script"||funct!==global_funct||array.length>0){warn("function_strict")}use_strict()}if(disruptor){warn("unreachable_a_b",next_token,next_token.string,disruptor.string);disruptor=null}the_statement=statement();if(the_statement){array.push(the_statement);if(the_statement.disrupt){disruptor=the_statement;array.disrupt=true}}}}return array}function block(ordinary){var array,curly=next_token,old_in_block=in_block,old_scope=scope,old_strict_mode=strict_mode;in_block=ordinary;scope=Object.create(scope);spaces();if(next_token.id==="{"){advance("{");step_in();if(!ordinary&&!use_strict()&&!old_strict_mode&&!option.sloppy&&funct["(context)"]===global_funct){warn("missing_use_strict")}array=statements();strict_mode=old_strict_mode;step_out("}",curly)}else if(!ordinary){stop("expected_a_b",next_token,"{",artifact())}else{warn("expected_a_b",next_token,"{",artifact());array=[statement()];array.disrupt=array[0].disrupt}funct["(verb)"]=null;scope=old_scope;in_block=old_in_block;if(ordinary&&array.length===0){warn("empty_block")}return array}function tally_property(name){if(option.properties&&typeof property[name]!=="number"){warn("unexpected_property_a",token,name)}if(typeof property[name]==="number"){property[name]+=1}else{property[name]=1}}syntax["(identifier)"]={id:"(identifier)",lbp:0,identifier:true,nud:function(){var name=this.string,variable=scope[name],site,writeable;if(typeof variable!=="object"){writeable=predefined[name];if(typeof writeable==="boolean"){global_scope[name]=variable={string:name,writeable:writeable,funct:global_funct};global_funct[name]="var"}else{if(!option.undef){warn("used_before_a",token)}scope[name]=variable={string:name,writeable:true,funct:funct};funct[name]="undef"}}site=variable.funct;if(funct===site){switch(funct[name]){case"becoming":warn("unexpected_a",token);funct[name]="var";break;case"unused":funct[name]="var";break;case"unparam":funct[name]="parameter";break;case"unction":funct[name]="function";break;case"label":warn("a_label",token,name);break}}else{switch(funct[name]){case"closure":case"function":case"var":case"unused":warn("a_scope",token,name);break;case"label":warn("a_label",token,name);break;case"outer":case"global":break;default:switch(site[name]){case"becoming":case"closure":case"function":case"parameter":case"unction":case"unused":case"var":site[name]="closure";funct[name]=site===global_funct?"global":"outer";break;case"unparam":site[name]="parameter";funct[name]="outer";break;case"undef":funct[name]="undef";break;case"label":warn("a_label",token,name);break}}}return this},led:function(){stop("expected_operator_a")}};type("(array)","array");type("(color)","color");type("(function)","function");type("(number)","number",return_this);type("(object)","object");type("(string)","string",return_this);type("(boolean)","boolean",return_this);type("(range)","range");type("(regexp)","regexp",return_this);ultimate("(begin)");ultimate("(end)");ultimate("(error)");postscript(symbol("</"));symbol("<!");symbol("<!--");symbol("-->");postscript(symbol("}"));symbol(")");symbol("]");postscript(symbol('"'));postscript(symbol("'"));symbol(";");symbol(":");symbol(",");symbol("#");symbol("@");symbol("*/");postscript(reserve("case"));reserve("catch");postscript(reserve("default"));reserve("else");reserve("finally");reservevar("arguments",function(x){if(strict_mode&&funct===global_funct){warn("strict",x)}else if(option.safe){warn("adsafe_a",x)}funct["(arguments)"]=true});reservevar("eval",function(x){if(option.safe){warn("adsafe_a",x)}});constant("false","boolean");constant("Infinity","number");constant("NaN","number");constant("null","");reservevar("this",function(x){if(option.safe){warn("adsafe_a",x)}else if(strict_mode&&funct["(token)"]&&funct["(token)"].arity==="statement"&&funct["(name)"].charAt(0)>"Z"){warn("strict",x)}});constant("true","boolean");constant("undefined","");infix("?",30,function(left,that){step_in("?");that.first=expected_condition(expected_relation(left));that.second=expression(0);spaces();step_out();var colon=next_token;advance(":");step_in(":");spaces();that.third=expression(10);that.arity="ternary";if(are_similar(that.second,that.third)){warn("weird_ternary",colon)}else if(are_similar(that.first,that.second)){warn("use_or",that)}step_out();return that});infix("||",40,function(left,that){function paren_check(that){if(that.id==="&&"&&!that.paren){warn("and",that)}return that}that.first=paren_check(expected_condition(expected_relation(left)));that.second=paren_check(expected_relation(expression(40)));if(are_similar(that.first,that.second)){warn("weird_condition",that)}return that});infix("&&",50,function(left,that){that.first=expected_condition(expected_relation(left));that.second=expected_relation(expression(50));if(are_similar(that.first,that.second)){warn("weird_condition",that)}return that});prefix("void",function(){this.first=expression(0);this.arity="prefix";if(option.es5){warn("expected_a_b",this,"undefined","void")}else if(this.first.number!==0){warn("expected_a_b",this.first,"0",artifact(this.first))}return this});bitwise("|",70);bitwise("^",80);bitwise("&",90);relation("==","===");relation("===");relation("!=","!==");relation("!==");relation("<");relation(">");relation("<=");relation(">=");bitwise("<<",120);bitwise(">>",120);bitwise(">>>",120);infix("in",120,function(left,that){warn("infix_in",that);that.left=left;that.right=expression(130);return that});infix("instanceof",120);infix("+",130,function(left,that){if(left.id==="(number)"){if(left.number===0){warn("unexpected_a",left,"0")}}else if(left.id==="(string)"){if(left.string===""){warn("expected_a_b",left,"String","''")}}var right=expression(130);if(right.id==="(number)"){if(right.number===0){warn("unexpected_a",right,"0")}}else if(right.id==="(string)"){if(right.string===""){warn("expected_a_b",right,"String","''")}}if(left.id===right.id){if(left.id==="(string)"||left.id==="(number)"){if(left.id==="(string)"){left.string+=right.string;if(jx.test(left.string)){warn("url",left)}}else{left.number+=right.number}left.thru=right.thru;return left}}that.first=left;that.second=right;return that});prefix("+","num");prefix("+++",function(){warn("confusing_a",token);this.first=expression(150);this.arity="prefix";return this});infix("+++",130,function(left){warn("confusing_a",token);this.first=left;this.second=expression(130);return this});infix("-",130,function(left,that){if(left.id==="(number)"&&left.number===0||left.id==="(string)"){warn("unexpected_a",left)}var right=expression(130);if(right.id==="(number)"&&right.number===0||right.id==="(string)"){warn("unexpected_a",right)}if(left.id===right.id&&left.id==="(number)"){left.number-=right.number;left.thru=right.thru;return left}that.first=left;that.second=right;return that});prefix("-");prefix("---",function(){warn("confusing_a",token);this.first=expression(150);this.arity="prefix";return this});infix("---",130,function(left){warn("confusing_a",token);this.first=left;this.second=expression(130);return this});infix("*",140,function(left,that){if(left.id==="(number)"&&(left.number===0||left.number===1)||left.id==="(string)"){warn("unexpected_a",left)}var right=expression(140);if(right.id==="(number)"&&(right.number===0||right.number===1)||right.id==="(string)"){warn("unexpected_a",right)}if(left.id===right.id&&left.id==="(number)"){left.number*=right.number;left.thru=right.thru;return left}that.first=left;that.second=right;return that});infix("/",140,function(left,that){if(left.id==="(number)"&&left.number===0||left.id==="(string)"){warn("unexpected_a",left)}var right=expression(140);if(right.id==="(number)"&&(right.number===0||right.number===1)||right.id==="(string)"){warn("unexpected_a",right)}if(left.id===right.id&&left.id==="(number)"){left.number/=right.number;left.thru=right.thru;return left}that.first=left;that.second=right;return that});infix("%",140,function(left,that){if(left.id==="(number)"&&(left.number===0||left.number===1)||left.id==="(string)"){warn("unexpected_a",left)}var right=expression(140);if(right.id==="(number)"&&right.number===0||right.id==="(string)"){warn("unexpected_a",right)}if(left.id===right.id&&left.id==="(number)"){left.number%=right.number;left.thru=right.thru;return left}that.first=left;that.second=right;return that});suffix("++");prefix("++");suffix("--");prefix("--");prefix("delete",function(){one_space();var p=expression(0);if(!p||p.id!=="."&&p.id!=="["){warn("deleted")}this.first=p;return this});prefix("~",function(){no_space_only();if(!option.bitwise){warn("unexpected_a",this)}expression(150);return this});prefix("!",function(){no_space_only();this.first=expected_condition(expression(150));this.arity="prefix";if(bang[this.first.id]===true||this.first.assign){warn("confusing_a",this)}return this});prefix("typeof",null);prefix("new",function(){one_space();var c=expression(160),n,p,v;this.first=c;if(c.id!=="function"){if(c.identifier){switch(c.string){case"Object":warn("use_object",token);break;case"Array":if(next_token.id==="("){p=next_token;p.first=this;advance("(");if(next_token.id!==")"){n=expression(0);p.second=[n];if(n.id!=="(number)"||next_token.id===","){warn("use_array",p)}while(next_token.id===","){advance(",");p.second.push(expression(0))}}else{warn("use_array",token)}advance(")",p);return p}warn("use_array",token);break;case"Number":case"String":case"Boolean":case"Math":case"JSON":warn("not_a_constructor",c);break;case"Function":if(!option.evil){warn("function_eval")}break;case"Date":case"RegExp":case"this":break;default:if(c.id!=="function"){v=c.string.charAt(0);if(!option.newcap&&(v<"A"||v>"Z")){warn("constructor_name_a",token)}}}}else{if(c.id!=="."&&c.id!=="["&&c.id!=="("){warn("bad_constructor",token)}}}else{warn("weird_new",this)}if(next_token.id!=="("){warn("missing_a",next_token,"()")}return this});infix("(",160,function(left,that){var p;if(indent&&indent.mode==="expression"){no_space(prev_token,token)}else{no_space_only(prev_token,token)}if(!left.immed&&left.id==="function"){warn("wrap_immediate")}p=[];if(left.identifier){if(left.string.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)){if(left.string!=="Number"&&left.string!=="String"&&left.string!=="Boolean"&&left.string!=="Date"){if(left.string==="Math"||left.string==="JSON"){warn("not_a_function",left)}else if(left.string==="Object"){warn("use_object",token)}else if(left.string==="Array"||!option.newcap){warn("missing_a",left,"new")}}}}else if(left.id==="."){if(option.safe&&left.first.string==="Math"&&left.second==="random"){warn("adsafe_a",left)}else if(left.second.string==="split"&&left.first.id==="(string)"){warn("use_array",left.second)}}step_in();if(next_token.id!==")"){no_space();for(;;){edge();p.push(expression(10));if(next_token.id!==","){break}comma()}}no_space();step_out(")",that);if(typeof left==="object"){if(left.string==="parseInt"&&p.length===1){warn("radix",left)}if(!option.evil){if(left.string==="eval"||left.string==="Function"||left.string==="execScript"){warn("evil",left)}else if(p[0]&&p[0].id==="(string)"&&(left.string==="setTimeout"||left.string==="setInterval")){warn("implied_evil",left)}}if(!left.identifier&&left.id!=="."&&left.id!=="["&&left.id!=="("&&left.id!=="&&"&&left.id!=="||"&&left.id!=="?"){warn("bad_invocation",left)}}that.first=left;that.second=p;return that},true);prefix("(",function(){step_in("expression");no_space();edge();if(next_token.id==="function"){next_token.immed=true}var value=expression(0);value.paren=true;no_space();step_out(")",this);if(value.id==="function"){switch(next_token.id){case"(":warn("move_invocation");break;case".":case"[":warn("unexpected_a");break;default:warn("bad_wrap",this)}}return value});infix(".",170,function(left,that){no_space(prev_token,token);no_space();var name=identifier();if(typeof name==="string"){tally_property(name)}that.first=left;that.second=token;if(left&&left.string==="arguments"&&(name==="callee"||name==="caller")){warn("avoid_a",left,"arguments."+name)}else if(!option.evil&&left&&left.string==="document"&&(name==="write"||name==="writeln")){warn("write_is_wrong",left)}else if(!option.stupid&&name.indexOf("Sync")>0){warn("sync_a",token)}else if(option.adsafe){if(!adsafe_top&&left.string==="ADSAFE"){if(name==="id"||name==="lib"){warn("adsafe_a",that)}else if(name==="go"){if(xmode!=="script"){warn("adsafe_a",that)}else if(adsafe_went||next_token.id!=="("||peek(0).id!=="(string)"||peek(0).string!==adsafe_id||peek(1).id!==","){stop("adsafe_a",that,"go")}adsafe_went=true;adsafe_may=false}}adsafe_top=false}if(!option.evil&&(name==="eval"||name==="execScript")){warn("evil")}else if(option.safe){for(;;){if(banned[name]===true){warn("adsafe_a",token,name)}if(typeof predefined[left.string]!=="boolean"||next_token.id==="("){break}if(next_token.id!=="."){warn("adsafe_a",that);break}advance(".");token.first=that;token.second=name;that=token;name=identifier();if(typeof name==="string"){tally_property(name)}}}return that},true);infix("[",170,function(left,that){var e,s;no_space_only(prev_token,token);no_space();step_in();edge();e=expression(0);switch(e.id){case"(number)":if(e.id==="(number)"&&left.id==="arguments"){warn("use_param",left)}break;case"(string)":if(option.safe&&(banned[e.string]||e.string.charAt(0)==="_"||e.string.slice(-1)==="_")){warn("adsafe_subscript_a",e)}else if(!option.evil&&(e.string==="eval"||e.string==="execScript")){warn("evil",e)}else if(!option.sub&&ix.test(e.string)){s=syntax[e.string];if(!s||!s.reserved){warn("subscript",e)}}tally_property(e.string);break;default:if(option.safe){if((e.id!=="+"||e.arity!=="prefix")&&e.id!=="-"&&e.id!=="*"){warn("adsafe_subscript_a",e)}}}step_out("]",that);no_space(prev_token,token);that.first=left;that.second=e;return that},true);prefix("[",function(){this.arity="prefix";this.first=[];step_in("array");while(next_token.id!=="(end)"){while(next_token.id===","){warn("unexpected_a",next_token);advance(",")}if(next_token.id==="]"){break}indent.wrap=false;edge();this.first.push(expression(10));if(next_token.id===","){comma();if(next_token.id==="]"&&!option.es5){warn("unexpected_a",token);break}}else{break}}step_out("]",this);return this},170);function property_name(){var id=optional_identifier(true);if(!id){if(next_token.id==="(string)"){id=next_token.string;if(option.safe){if(banned[id]){warn("adsafe_a")}else if(id.charAt(0)==="_"||id.charAt(id.length-1)==="_"){warn("dangling_a")}}advance()}else if(next_token.id==="(number)"){id=next_token.number.toString();advance()}}return id}function function_params(){var id,paren=next_token,params=[];advance("(");step_in();no_space();if(next_token.id===")"){no_space();step_out(")",paren);return params}for(;;){edge();id=identifier();params.push(token);add_label(token,option.unparam?"parameter":"unparam");if(next_token.id===","){comma()}else{no_space();step_out(")",paren);return params}}}function do_function(func,name){var old_funct=funct,old_option=option,old_scope=scope;funct={"(name)":name||"'"+(anonname||"").replace(nx,sanitize)+"'","(line)":next_token.line,"(context)":old_funct,"(breakage)":0,"(loopage)":0,"(scope)":scope,"(token)":func};option=Object.create(old_option);scope=Object.create(old_scope);functions.push(funct);func.name=name;if(name){add_label(func,"function",name)}func.writeable=false;func.first=funct["(params)"]=function_params();one_space();func.block=block(false);if(funct["(arguments)"]){func.first.forEach(function(value){if(value.assign){warn("parameter_arguments_a",value,value.string)}})}funct=old_funct;option=old_option;scope=old_scope}assignop("=");assignop("+=","+");assignop("-=","-");assignop("*=","*");assignop("/=","/").nud=function(){stop("slash_equal")};assignop("%=","%");assignop("&=","&");assignop("|=","|");assignop("^=","^");assignop("<<=","<<");assignop(">>=",">>");assignop(">>>=",">>>");prefix("{",function(){var get,i,j,name,p,set,seen={};this.arity="prefix";this.first=[];step_in();while(next_token.id!=="}"){indent.wrap=false;edge();if(next_token.string==="get"&&peek().id!==":"){if(!option.es5){warn("es5")}get=next_token;advance("get");one_space_only();name=next_token;i=property_name();if(!i){stop("missing_property")}get.string="";do_function(get);if(funct["(loopage)"]){warn("function_loop",get)}p=get.first;if(p&&p.length){warn("parameter_a_get_b",p[0],p[0].string,i)}comma();set=next_token;spaces();edge();advance("set");set.string="";one_space_only();j=property_name();if(i!==j){stop("expected_a_b",token,i,j||next_token.string)}do_function(set);if(set.block.length===0){warn("missing_a",token,"throw")}p=set.first;if(!p||p.length!==1){stop("parameter_set_a",set,"value")}else if(p[0].string!=="value"){stop("expected_a_b",p[0],"value",p[0].string)}name.first=[get,set]}else{name=next_token;i=property_name();if(typeof i!=="string"){stop("missing_property")}advance(":");spaces();name.first=expression(10)}this.first.push(name);if(seen[i]===true){warn("duplicate_a",next_token,i)}seen[i]=true;tally_property(i);if(next_token.id!==","){break}for(;;){comma();if(next_token.id!==","){break}warn("unexpected_a",next_token)}if(next_token.id==="}"&&!option.es5){warn("unexpected_a",token)}}step_out("}",this);return this});stmt("{",function(){warn("statement_block");this.arity="statement";this.block=statements();this.disrupt=this.block.disrupt;advance("}",this);return this});stmt("/*global",directive);stmt("/*globals",directive);stmt("/*jslint",directive);stmt("/*member",directive);stmt("/*members",directive);stmt("/*property",directive);stmt("/*properties",directive);stmt("var",function(){var assign,id,name;if(funct["(vars)"]&&!option.vars){warn("combine_var")}else if(funct!==global_funct){funct["(vars)"]=true}this.arity="statement";this.first=[];step_in("var");for(;;){name=next_token;id=identifier();add_label(name,"becoming");if(next_token.id==="="){assign=next_token;assign.first=name;spaces();advance("=");spaces();if(next_token.id==="undefined"){warn("unnecessary_initialize",token,id)}if(peek(0).id==="="&&next_token.identifier){stop("var_a_not")}assign.second=expression(0);assign.arity="infix";this.first.push(assign)}else{this.first.push(name)}if(funct[id]==="becoming"){funct[id]="unused"}if(next_token.id!==","){break}comma();indent.wrap=false;if(var_mode&&next_token.line===token.line&&this.first.length===1){var_mode=null;indent.open=false;indent.at-=option.indent}spaces();edge()}var_mode=null;step_out();return this});stmt("function",function(){one_space();if(in_block){warn("function_block",token)}var name=next_token,id=identifier();add_label(name,"unction");no_space();this.arity="statement";do_function(this,id);if(next_token.id==="("&&next_token.line===token.line){stop("function_statement")}return this});prefix("function",function(){if(!option.anon){one_space()}var id=optional_identifier();if(id){no_space()}else{id=""}do_function(this,id);if(funct["(loopage)"]){warn("function_loop")}switch(next_token.id){case";":case"(":case")":case",":case"]":case"}":case":":break;case".":if(peek().string!=="bind"||peek(1).id!=="("){warn("unexpected_a")}break;default:stop("unexpected_a")}this.arity="function";return this});stmt("if",function(){var paren=next_token;one_space();advance("(");step_in("control");no_space();edge();this.arity="statement";this.first=expected_condition(expected_relation(expression(0)));no_space();step_out(")",paren);one_space();this.block=block(true);if(next_token.id==="else"){one_space();advance("else");one_space();this["else"]=next_token.id==="if"||next_token.id==="switch"?statement(true):block(true);if(this["else"].disrupt&&this.block.disrupt){this.disrupt=true}}return this});stmt("try",function(){var exception_variable,old_scope,paren;if(option.adsafe){warn("adsafe_a",this)}one_space();this.arity="statement";this.block=block(false);if(next_token.id==="catch"){one_space();advance("catch");one_space();paren=next_token;advance("(");step_in("control");no_space();edge();old_scope=scope;scope=Object.create(old_scope);exception_variable=next_token.string;this.first=exception_variable;if(!next_token.identifier){warn("expected_identifier_a",next_token)}else{add_label(next_token,"exception")}advance();no_space();step_out(")",paren);one_space();this.second=block(false);scope=old_scope}if(next_token.id==="finally"){one_space();advance("finally");one_space();this.third=block(false)}else if(!this.second){stop("expected_a_b",next_token,"catch",artifact())}return this});labeled_stmt("while",function(){one_space();var paren=next_token;funct["(breakage)"]+=1;funct["(loopage)"]+=1;advance("(");step_in("control");no_space();edge();this.arity="statement";this.first=expected_relation(expression(0));if(this.first.id!=="true"){expected_condition(this.first,bundle.unexpected_a)}no_space();step_out(")",paren);one_space();this.block=block(true);if(this.block.disrupt){warn("strange_loop",prev_token)}funct["(breakage)"]-=1;funct["(loopage)"]-=1;return this});reserve("with");labeled_stmt("switch",function(){var cases=[],old_in_block=in_block,particular,the_case=next_token,unbroken=true;function find_duplicate_case(value){if(are_similar(particular,value)){warn("duplicate_a",value)}}funct["(breakage)"]+=1;one_space();advance("(");no_space();step_in();this.arity="statement";this.first=expected_condition(expected_relation(expression(0)));no_space();step_out(")",the_case);one_space();advance("{");step_in();in_block=true;this.second=[];while(next_token.id==="case"){the_case=next_token;cases.forEach(find_duplicate_case);the_case.first=[];the_case.arity="case";spaces();edge("case");advance("case");for(;;){one_space();particular=expression(0);cases.forEach(find_duplicate_case);cases.push(particular);the_case.first.push(particular);if(particular.id==="NaN"){warn("unexpected_a",particular)}no_space_only();advance(":");if(next_token.id!=="case"){break}spaces();edge("case");advance("case")}spaces();the_case.second=statements();if(the_case.second&&the_case.second.length>0){particular=the_case.second[the_case.second.length-1];if(particular.disrupt){if(particular.id==="break"){unbroken=false}}else{warn("missing_a_after_b",next_token,"break","case")}}else{warn("empty_case")}this.second.push(the_case)}if(this.second.length===0){warn("missing_a",next_token,"case")}if(next_token.id==="default"){spaces();the_case=next_token;the_case.arity="case";edge("case");advance("default");no_space_only();advance(":");spaces();the_case.second=statements();if(the_case.second&&the_case.second.length>0){particular=the_case.second[the_case.second.length-1];if(unbroken&&particular.disrupt&&particular.id!=="break"){this.disrupt=true}}this.second.push(the_case)}funct["(breakage)"]-=1;spaces();step_out("}",this);in_block=old_in_block;return this});stmt("debugger",function(){if(!option.debug){warn("unexpected_a",this)}this.arity="statement";return this});labeled_stmt("do",function(){funct["(breakage)"]+=1;funct["(loopage)"]+=1;one_space();this.arity="statement";this.block=block(true);if(this.block.disrupt){warn("strange_loop",prev_token)}one_space();advance("while");var paren=next_token;one_space();advance("(");step_in();no_space();edge();this.first=expected_condition(expected_relation(expression(0)),bundle.unexpected_a);no_space();step_out(")",paren);funct["(breakage)"]-=1;funct["(loopage)"]-=1;return this});labeled_stmt("for",function(){var blok,filter,ok=false,paren=next_token,value;this.arity="statement";funct["(breakage)"]+=1;funct["(loopage)"]+=1;advance("(");if(next_token.id===";"){no_space();advance(";");no_space();advance(";");no_space();advance(")");blok=block(true)}else{step_in("control");spaces(this,paren);no_space();if(next_token.id==="var"){stop("move_var")}edge();if(peek(0).id==="in"){this.forin=true;value=next_token;switch(funct[value.string]){case"unused":funct[value.string]="var";break;case"closure":case"var":break;default:warn("bad_in_a",value)}advance();advance("in");this.first=value;this.second=expression(20);step_out(")",paren);blok=block(true);if(!option.forin){if(blok.length===1&&typeof blok[0]==="object"&&blok[0].string==="if"&&!blok[0]["else"]){filter=blok[0].first;while(filter.id==="&&"){filter=filter.first}switch(filter.id){case"===":case"!==":ok=filter.first.id==="["?filter.first.first.string===this.second.string&&filter.first.second.string===this.first.string:filter.first.id==="typeof"&&filter.first.first.id==="["&&filter.first.first.first.string===this.second.string&&filter.first.first.second.string===this.first.string;break;case"(":ok=filter.first.id==="."&&(filter.first.first.string===this.second.string&&filter.first.second.string==="hasOwnProperty"&&filter.second[0].string===this.first.string||filter.first.first.string==="ADSAFE"&&filter.first.second.string==="has"&&filter.second[0].string===this.second.string&&filter.second[1].string===this.first.string||filter.first.first.id==="."&&filter.first.first.first.id==="."&&filter.first.first.first.first.string==="Object"&&filter.first.first.first.second.string==="prototype"&&filter.first.first.second.string==="hasOwnProperty"&&filter.first.second.string==="call"&&filter.second[0].string===this.second.string&&filter.second[1].string===this.first.string);break}}if(!ok){warn("for_if",this)}}}else{edge();this.first=[];for(;;){this.first.push(expression(0,"for"));if(next_token.id!==","){break}comma()}semicolon();edge();this.second=expected_relation(expression(0));if(this.second.id!=="true"){expected_condition(this.second,bundle.unexpected_a)}semicolon(token);if(next_token.id===";"){stop("expected_a_b",next_token,")",";")}this.third=[];edge();for(;;){this.third.push(expression(0,"for"));if(next_token.id!==","){break}comma()}no_space();step_out(")",paren);one_space();blok=block(true)}}if(blok.disrupt){warn("strange_loop",prev_token)}this.block=blok;funct["(breakage)"]-=1;funct["(loopage)"]-=1;return this});disrupt_stmt("break",function(){var label=next_token.string;this.arity="statement";if(funct["(breakage)"]===0){warn("unexpected_a",this)}if(next_token.identifier&&token.line===next_token.line){one_space_only();if(funct[label]!=="label"){warn("not_a_label",next_token)}else if(scope[label].funct!==funct){warn("not_a_scope",next_token)}this.first=next_token;advance()}return this});disrupt_stmt("continue",function(){if(!option["continue"]){warn("unexpected_a",this)}var label=next_token.string;this.arity="statement";if(funct["(breakage)"]===0){warn("unexpected_a",this)}if(next_token.identifier&&token.line===next_token.line){one_space_only();if(funct[label]!=="label"){warn("not_a_label",next_token)}else if(scope[label].funct!==funct){warn("not_a_scope",next_token)}this.first=next_token;advance()}return this});disrupt_stmt("return",function(){if(funct===global_funct&&xmode!=="scriptstring"){warn("unexpected_a",this)}this.arity="statement";if(next_token.id!==";"&&next_token.line===token.line){one_space_only();if(next_token.id==="/"||next_token.id==="(regexp)"){warn("wrap_regexp")}this.first=expression(20)}if(peek(0).id==="}"&&peek(1).id==="else"){warn("unexpected_else",this)}return this});disrupt_stmt("throw",function(){this.arity="statement";one_space_only();this.first=expression(20);return this});reserve("class");reserve("const");reserve("enum");reserve("export");reserve("extends");reserve("import");reserve("super");reserve("implements");reserve("interface");reserve("let");reserve("package");reserve("private");reserve("protected");reserve("public");reserve("static");reserve("yield");function json_value(){function json_object(){var brace=next_token,object={};advance("{");if(next_token.id!=="}"){while(next_token.id!=="(end)"){while(next_token.id===","){warn("unexpected_a",next_token);advance(",")}if(next_token.id!=="(string)"){warn("expected_string_a")}if(object[next_token.string]===true){warn("duplicate_a")}else if(next_token.string==="__proto__"){warn("dangling_a")}else{object[next_token.string]=true}advance();advance(":");json_value();if(next_token.id!==","){break}advance(",");if(next_token.id==="}"){warn("unexpected_a",token);break}}}advance("}",brace)}function json_array(){var bracket=next_token;advance("[");if(next_token.id!=="]"){while(next_token.id!=="(end)"){while(next_token.id===","){warn("unexpected_a",next_token);advance(",")}json_value();if(next_token.id!==","){break}advance(",");if(next_token.id==="]"){warn("unexpected_a",token);break}}}advance("]",bracket)}switch(next_token.id){case"{":json_object();break;case"[":json_array();break;case"true":case"false":case"null":case"(number)":case"(string)":advance();break;case"-":advance("-");no_space_only();advance("(number)");break;default:stop("unexpected_a")}}function css_name(){if(next_token.identifier){advance();return true}}function css_number(){if(next_token.id==="-"){advance("-");no_space_only()}if(next_token.id==="(number)"){advance("(number)");return true}}function css_string(){if(next_token.id==="(string)"){advance();return true}}function css_color(){var i,number,paren,value;if(next_token.identifier){value=next_token.string;if(value==="rgb"||value==="rgba"){advance();paren=next_token;advance("(");for(i=0;i<3;i+=1){if(i){comma()}number=next_token.number;if(next_token.id!=="(number)"||number<0){warn("expected_positive_a",next_token);advance()}else{advance();if(next_token.id==="%"){advance("%");if(number>100){warn("expected_percent_a",token,number)}}else{if(number>255){warn("expected_small_a",token,number)}}}}if(value==="rgba"){comma();number=next_token.number;if(next_token.id!=="(number)"||number<0||number>1){warn("expected_fraction_a",next_token)}advance();if(next_token.id==="%"){warn("unexpected_a");advance("%")}}advance(")",paren);return true}if(css_colorData[next_token.string]===true){advance();return true}}else if(next_token.id==="(color)"){advance();return true}return false}function css_length(){if(next_token.id==="-"){advance("-");no_space_only()}if(next_token.id==="(number)"){advance();if(next_token.id!=="(string)"&&css_lengthData[next_token.string]===true){no_space_only();advance()}else if(+token.number!==0){warn("expected_linear_a")}return true}return false}function css_line_height(){if(next_token.id==="-"){advance("-");no_space_only()}if(next_token.id==="(number)"){advance();if(next_token.id!=="(string)"&&css_lengthData[next_token.string]===true){no_space_only();advance()}return true}return false}function css_width(){if(next_token.identifier){switch(next_token.string){case"thin":case"medium":case"thick":advance();return true}}else{return css_length()}}function css_margin(){if(next_token.identifier){if(next_token.string==="auto"){advance();return true}}else{return css_length()}}function css_attr(){if(next_token.identifier&&next_token.string==="attr"){advance();advance("(");if(!next_token.identifier){warn("expected_name_a")}advance();advance(")");return true}return false}function css_comma_list(){while(next_token.id!==";"){if(!css_name()&&!css_string()){warn("expected_name_a")}if(next_token.id!==","){return true}comma()}}function css_counter(){if(next_token.identifier&&next_token.string==="counter"){advance();advance("(");advance();if(next_token.id===","){comma();if(next_token.id!=="(string)"){warn("expected_string_a")}advance()}advance(")");return true}if(next_token.identifier&&next_token.string==="counters"){advance();advance("(");if(!next_token.identifier){warn("expected_name_a")}advance();if(next_token.id===","){comma();if(next_token.id!=="(string)"){warn("expected_string_a")}advance()}if(next_token.id===","){comma();if(next_token.id!=="(string)"){warn("expected_string_a")}advance()}advance(")");return true}return false}function css_radius(){return css_length()&&(next_token.id!=="(number)"||css_length())}function css_shadow(){for(;;){if(next_token.string==="inset"){advance()}for(;;){if(!css_length()){break}}css_color();if(next_token.id!==","){break}advance(",")}return true}function css_shape(){var i;if(next_token.identifier&&next_token.string==="rect"){advance();advance("(");for(i=0;i<4;i+=1){if(!css_length()){warn("expected_number_a");break}}advance(")");return true}return false}function css_url(){var c,url;if(next_token.identifier&&next_token.string==="url"){next_token=lex.range("(",")");url=next_token.string;c=url.charAt(0);if(c==='"'||c==="'"){if(url.slice(-1)!==c){warn("bad_url_a")}else{url=url.slice(1,-1);if(url.indexOf(c)>=0){warn("bad_url_a")}}}if(!url){warn("missing_url")}if(ux.test(url)){stop("bad_url_a")}urls.push(url);advance();return true}return false}css_any=[css_url,function(){for(;;){if(next_token.identifier){switch(next_token.string.toLowerCase()){case"url":css_url();break;case"expression":warn("unexpected_a");advance();break;default:advance()}}else{if(next_token.id===";"||next_token.id==="!"||next_token.id==="(end)"||next_token.id==="}"){return true}advance()}}}];function font_face(){advance_identifier("font-family");advance(":");if(!css_name()&&!css_string()){stop("expected_name_a")}semicolon();advance_identifier("src");advance(":");while(true){if(next_token.string==="local"){advance_identifier("local");advance("(");if(ux.test(next_token.string)){stop("bad_url_a")}if(!css_name()&&!css_string()){stop("expected_name_a")}advance(")")}else if(!css_url()){stop("expected_a_b",next_token,"url",artifact())}if(next_token.id!==","){break}comma()}semicolon()}css_border_style=["none","dashed","dotted","double","groove","hidden","inset","outset","ridge","solid"];css_break=["auto","always","avoid","left","right"];css_media={all:true,braille:true,embossed:true,handheld:true,print:true,projection:true,screen:true,speech:true,tty:true,tv:true};css_overflow=["auto","hidden","scroll","visible"];css_attribute_data={background:[true,"background-attachment","background-color","background-image","background-position","background-repeat"],"background-attachment":["scroll","fixed"],"background-color":["transparent",css_color],"background-image":["none",css_url],"background-position":[2,[css_length,"top","bottom","left","right","center"]],"background-repeat":["repeat","repeat-x","repeat-y","no-repeat"],border:[true,"border-color","border-style","border-width"],"border-bottom":[true,"border-bottom-color","border-bottom-style","border-bottom-width"],"border-bottom-color":css_color,"border-bottom-left-radius":css_radius,"border-bottom-right-radius":css_radius,"border-bottom-style":css_border_style,"border-bottom-width":css_width,"border-collapse":["collapse","separate"],"border-color":["transparent",4,css_color],"border-left":[true,"border-left-color","border-left-style","border-left-width"],"border-left-color":css_color,"border-left-style":css_border_style,"border-left-width":css_width,"border-radius":function(){function count(separator){var n=1;if(separator){advance(separator)}if(!css_length()){return false}while(next_token.id==="(number)"){if(!css_length()){return false}n+=1}if(n>4){warn("bad_style")}return true}return count()&&(next_token.id!=="/"||count("/"))},"border-right":[true,"border-right-color","border-right-style","border-right-width"],"border-right-color":css_color,"border-right-style":css_border_style,"border-right-width":css_width,"border-spacing":[2,css_length],"border-style":[4,css_border_style],"border-top":[true,"border-top-color","border-top-style","border-top-width"],"border-top-color":css_color,"border-top-left-radius":css_radius,"border-top-right-radius":css_radius,"border-top-style":css_border_style,"border-top-width":css_width,"border-width":[4,css_width],bottom:[css_length,"auto"],"box-shadow":["none",css_shadow],"caption-side":["bottom","left","right","top"],clear:["both","left","none","right"],clip:[css_shape,"auto"],color:css_color,content:["open-quote","close-quote","no-open-quote","no-close-quote",css_string,css_url,css_counter,css_attr],"counter-increment":[css_name,"none"],"counter-reset":[css_name,"none"],cursor:[css_url,"auto","crosshair","default","e-resize","help","move","n-resize","ne-resize","nw-resize","pointer","s-resize","se-resize","sw-resize","w-resize","text","wait"],direction:["ltr","rtl"],display:["block","compact","inline","inline-block","inline-table","list-item","marker","none","run-in","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"],"empty-cells":["show","hide"],"float":["left","none","right"],font:["caption","icon","menu","message-box","small-caption","status-bar",true,"font-size","font-style","font-weight","font-family"],"font-family":css_comma_list,"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",css_length],"font-size-adjust":["none",css_number],"font-stretch":["normal","wider","narrower","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded"],"font-style":["normal","italic","oblique"],"font-variant":["normal","small-caps"],"font-weight":["normal","bold","bolder","lighter",css_number],height:[css_length,"auto"],left:[css_length,"auto"],"letter-spacing":["normal",css_length],"line-height":["normal",css_line_height],"list-style":[true,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",css_url],"list-style-position":["inside","outside"],"list-style-type":["circle","disc","square","decimal","decimal-leading-zero","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","hebrew","katakana","hiragana-iroha","katakana-oroha","none"],margin:[4,css_margin],"margin-bottom":css_margin,"margin-left":css_margin,"margin-right":css_margin,"margin-top":css_margin,"marker-offset":[css_length,"auto"],"max-height":[css_length,"none"],"max-width":[css_length,"none"],"min-height":css_length,"min-width":css_length,opacity:css_number,outline:[true,"outline-color","outline-style","outline-width"],"outline-color":["invert",css_color],"outline-style":["dashed","dotted","double","groove","inset","none","outset","ridge","solid"],"outline-width":css_width,overflow:css_overflow,"overflow-x":css_overflow,"overflow-y":css_overflow,padding:[4,css_length],"padding-bottom":css_length,"padding-left":css_length,"padding-right":css_length,"padding-top":css_length,"page-break-after":css_break,"page-break-before":css_break,position:["absolute","fixed","relative","static"],quotes:[8,css_string],right:[css_length,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through","blink"],"text-indent":css_length,"text-shadow":["none",4,[css_color,css_length]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[css_length,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom","sub","super","top","text-top","middle","text-bottom",css_length],visibility:["visible","hidden","collapse"],"white-space":["normal","nowrap","pre","pre-line","pre-wrap","inherit"],width:[css_length,"auto"],"word-spacing":["normal",css_length],"word-wrap":["break-word","normal"],"z-index":["auto",css_number]};function style_attribute(){var v;while(next_token.id==="*"||next_token.id==="#"||next_token.string==="_"){if(!option.css){warn("unexpected_a")}advance()}if(next_token.id==="-"){if(!option.css){warn("unexpected_a")}advance("-");if(!next_token.identifier){warn("expected_nonstandard_style_attribute")}advance();return css_any}if(!next_token.identifier){warn("expected_style_attribute")}else{if(Object.prototype.hasOwnProperty.call(css_attribute_data,next_token.string)){v=css_attribute_data[next_token.string]}else{v=css_any;if(!option.css){warn("unrecognized_style_attribute_a")}}}advance();return v}function style_value(v){var i=0,n,once,match,round,start=0,vi;switch(typeof v){case"function":return v();case"string":if(next_token.identifier&&next_token.string===v){advance();return true}return false}for(;;){if(i>=v.length){return false}vi=v[i];i+=1;if(typeof vi==="boolean"){break}else if(typeof vi==="number"){n=vi;vi=v[i];i+=1}else{n=1}match=false;while(n>0){if(style_value(vi)){match=true;n-=1}else{break}}if(match){return true}}start=i;once=[];for(;;){round=false;for(i=start;i<v.length;i+=1){if(!once[i]){if(style_value(css_attribute_data[v[i]])){match=true;round=true;once[i]=true;break}}}if(!round){return match}}}function style_child(){if(next_token.id==="(number)"){advance();if(next_token.string==="n"&&next_token.identifier){no_space_only();advance();if(next_token.id==="+"){no_space_only();advance("+");no_space_only();advance("(number)")}}return}if(next_token.identifier&&(next_token.string==="odd"||next_token.string==="even")){advance();return}warn("unexpected_a")}function substyle(){var v;for(;;){if(next_token.id==="}"||next_token.id==="(end)"||xquote&&next_token.id===xquote){return}v=style_attribute();advance(":");if(next_token.identifier&&next_token.string==="inherit"){advance()}else{if(!style_value(v)){warn("unexpected_a");advance()}}if(next_token.id==="!"){advance("!");no_space_only();if(next_token.identifier&&next_token.string==="important"){advance()}else{warn("expected_a_b",next_token,"important",artifact())}}if(next_token.id==="}"||next_token.id===xquote){warn("expected_a_b",next_token,";",artifact())}else{semicolon()}}}function style_selector(){if(next_token.identifier){if(!Object.prototype.hasOwnProperty.call(html_tag,option.cap?next_token.string.toLowerCase():next_token.string)){warn("expected_tagname_a")}advance()}else{switch(next_token.id){case">":case"+":advance();style_selector();break;case":":advance(":");switch(next_token.string){case"active":case"after":case"before":case"checked":case"disabled":case"empty":case"enabled":case"first-child":case"first-letter":case"first-line":case"first-of-type":case"focus":case"hover":case"last-child":case"last-of-type":case"link":case"only-of-type":case"root":case"target":case"visited":advance_identifier(next_token.string);break;case"lang":advance_identifier("lang");advance("(");if(!next_token.identifier){warn("expected_lang_a")}advance(")");break;case"nth-child":case"nth-last-child":case"nth-last-of-type":case"nth-of-type":advance_identifier(next_token.string);advance("(");style_child();advance(")");break;case"not":advance_identifier("not");advance("(");if(next_token.id===":"&&peek(0).string==="not"){warn("not")}style_selector();advance(")");break;default:warn("expected_pseudo_a")}break;case"#":advance("#");if(!next_token.identifier){warn("expected_id_a")}advance();break;case"*":advance("*");break;case".":advance(".");if(!next_token.identifier){warn("expected_class_a")}advance();break;case"[":advance("[");if(!next_token.identifier){warn("expected_attribute_a")}advance();if(next_token.id==="="||next_token.string==="~="||next_token.string==="$="||next_token.string==="|="||next_token.id==="*="||next_token.id==="^="){advance();if(next_token.id!=="(string)"){warn("expected_string_a")}advance()}advance("]");break;default:stop("expected_selector_a")}}}function style_pattern(){if(next_token.id==="{"){warn("expected_style_pattern")}for(;;){style_selector();if(next_token.id==="</"||next_token.id==="{"||next_token.id==="}"||next_token.id==="(end)"){return""}if(next_token.id===","){comma()}}}function style_list(){while(next_token.id!=="}"&&next_token.id!=="</"&&next_token.id!=="(end)"){style_pattern();xmode="styleproperty";if(next_token.id===";"){semicolon()}else{advance("{");substyle();xmode="style";advance("}")}}}function styles(){var i;while(next_token.id==="@"){i=peek();advance("@");switch(next_token.string){case"import":advance_identifier("import");if(!css_url()){warn("expected_a_b",next_token,"url",artifact());advance()}semicolon();break;case"media":advance_identifier("media");for(;;){if(!next_token.identifier||css_media[next_token.string]!==true){stop("expected_media_a")}advance();if(next_token.id!==","){break}comma()}advance("{");style_list();advance("}");break;case"font-face":advance_identifier("font-face");advance("{");font_face();advance("}");break;default:stop("expected_at_a")}}style_list()}function do_begin(n){if(n!=="html"&&!option.fragment){if(n==="div"&&option.adsafe){stop("adsafe_fragment")}else{stop("expected_a_b",token,"html",n)}}if(option.adsafe){if(n==="html"){stop("adsafe_html",token)}if(option.fragment){if(n!=="div"){stop("adsafe_div",token)}}else{stop("adsafe_fragment",token)}}option.browser=true}function do_attribute(a,v){var u,x;if(a==="id"){u=typeof v==="string"?v.toUpperCase():"";if(ids[u]===true){warn("duplicate_a",next_token,v)}if(!/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(v)){warn("bad_id_a",next_token,v)}else if(option.adsafe){if(adsafe_id){if(v.slice(0,adsafe_id.length)!==adsafe_id){warn("adsafe_prefix_a",next_token,adsafe_id)}else if(!/^[A-Z]+_[A-Z]+$/.test(v)){warn("adsafe_bad_id")}}else{adsafe_id=v;if(!/^[A-Z]+_$/.test(v)){warn("adsafe_bad_id")}}}x=v.search(dx);if(x>=0){warn("unexpected_char_a_b",token,v.charAt(x),a)}ids[u]=true}else if(a==="class"||a==="type"||a==="name"){x=v.search(qx);if(x>=0){warn("unexpected_char_a_b",token,v.charAt(x),a)}ids[u]=true}else if(a==="href"||a==="background"||a==="content"||a==="data"||a.indexOf("src")>=0||a.indexOf("url")>=0){if(option.safe&&ux.test(v)){stop("bad_url_a",next_token,v)}urls.push(v)}else if(a==="for"){if(option.adsafe){if(adsafe_id){if(v.slice(0,adsafe_id.length)!==adsafe_id){warn("adsafe_prefix_a",next_token,adsafe_id)}else if(!/^[A-Z]+_[A-Z]+$/.test(v)){warn("adsafe_bad_id")}}else{warn("adsafe_bad_id")}}}else if(a==="name"){if(option.adsafe&&v.indexOf("_")>=0){warn("adsafe_name_a",next_token,v)}}}function do_tag(name,attribute){var i,tag=html_tag[name],script,x;src=false;if(!tag){stop(bundle.unrecognized_tag_a,next_token,name===name.toLowerCase()?name:name+" (capitalization error)")}if(stack.length>0){if(name==="html"){stop("unexpected_a",token,name)}x=tag.parent;if(x){if(x.indexOf(" "+stack[stack.length-1].name+" ")<0){stop("tag_a_in_b",token,name,x)}}else if(!option.adsafe&&!option.fragment){i=stack.length;do{if(i<=0){stop("tag_a_in_b",token,name,"body")}i-=1}while(stack[i].name!=="body")}}switch(name){case"div":if(option.adsafe&&stack.length===1&&!adsafe_id){warn("adsafe_missing_id")}break;case"script":xmode="script";advance(">");if(attribute.lang){warn("lang",token)}if(option.adsafe&&stack.length!==1){warn("adsafe_placement",token)}if(attribute.src){if(option.adsafe&&(!adsafe_may||!approved[attribute.src])){warn("adsafe_source",token)}}else{step_in(next_token.from);edge();use_strict();adsafe_top=true;script=statements();if(option.adsafe){if(adsafe_went){stop("adsafe_script",token)}if(script.length!==1||aint(script[0],"id","(")||aint(script[0].first,"id",".")||aint(script[0].first.first,"string","ADSAFE")||aint(script[0].second[0],"string",adsafe_id)){stop("adsafe_id_go")}switch(script[0].first.second.string){case"id":if(adsafe_may||adsafe_went||script[0].second.length!==1){stop("adsafe_id",next_token)}adsafe_may=true;break;case"go":if(adsafe_went){stop("adsafe_go")}if(script[0].second.length!==2||aint(script[0].second[1],"id","function")||!script[0].second[1].first||aint(script[0].second[1].first[0],"string","dom")||script[0].second[1].first.length>2||script[0].second[1].first.length===2&&aint(script[0].second[1].first[1],"string","lib")){stop("adsafe_go",next_token)}adsafe_went=true;break;default:stop("adsafe_id_go")}}indent=null}xmode="html";advance("</");advance_identifier("script");xmode="outer";break;case"style":xmode="style";advance(">");styles();xmode="html";advance("</");advance_identifier("style");break;case"input":switch(attribute.type){case"button":case"checkbox":case"radio":case"reset":case"submit":break;case"file":case"hidden":case"image":case"password":case"text":if(option.adsafe&&attribute.autocomplete!=="off"){warn("adsafe_autocomplete")}break;default:warn("bad_type")}break;case"applet":case"body":case"embed":case"frame":case"frameset":case"head":case"iframe":case"noembed":case"noframes":case"object":case"param":if(option.adsafe){warn("adsafe_tag",next_token,name)}break}}function closetag(name){return"</"+name+">"}function html(){var attribute,attributes,is_empty,name,old_white=option.white,quote,tag_name,tag,wmode;xmode="html";xquote="";stack=null;for(;;){switch(next_token.string){case"<":xmode="html";advance("<");attributes={};tag_name=next_token;name=tag_name.string;advance_identifier(name);if(option.cap){name=name.toLowerCase()}tag_name.name=name;if(!stack){stack=[];do_begin(name)}tag=html_tag[name];if(typeof tag!=="object"){stop("unrecognized_tag_a",tag_name,name)}is_empty=tag.empty;tag_name.type=name;for(;;){if(next_token.id==="/"){advance("/");if(next_token.id!==">"){warn("expected_a_b",next_token,">",artifact())}break}if(next_token.id&&next_token.id.charAt(0)===">"){break}if(!next_token.identifier){if(next_token.id==="(end)"||next_token.id==="(error)"){warn("expected_a_b",next_token,">",artifact())}warn("bad_name_a")}option.white=false;spaces();attribute=next_token.string;option.white=old_white;advance();if(!option.cap&&attribute!==attribute.toLowerCase()){warn("attribute_case_a",token)}attribute=attribute.toLowerCase();xquote="";if(Object.prototype.hasOwnProperty.call(attributes,attribute)){warn("duplicate_a",token,attribute)}if(attribute.slice(0,2)==="on"){if(!option.on){warn("html_handlers")}xmode="scriptstring";advance("=");quote=next_token.id;if(quote!=='"'&&quote!=="'"){stop("expected_a_b",next_token,'"',artifact())}xquote=quote;wmode=option.white;option.white=true;advance(quote);use_strict();statements();option.white=wmode;if(next_token.id!==quote){stop("expected_a_b",next_token,quote,artifact())}xmode="html";xquote="";advance(quote);tag=false}else if(attribute==="style"){xmode="scriptstring";advance("=");quote=next_token.id;if(quote!=='"'&&quote!=="'"){stop("expected_a_b",next_token,'"',artifact())}xmode="styleproperty";xquote=quote;advance(quote);substyle();xmode="html";xquote="";advance(quote);tag=false}else{if(next_token.id==="="){advance("=");tag=next_token.string;if(!next_token.identifier&&next_token.id!=='"'&&next_token.id!=="'"&&next_token.id!=="(string)"&&next_token.id!=="(number)"&&next_token.id!=="(color)"){warn("expected_attribute_value_a",token,attribute)}advance()}else{tag=true}}attributes[attribute]=tag;do_attribute(attribute,tag)}do_tag(name,attributes);if(!is_empty){stack.push(tag_name)}xmode="outer";advance(">");break;case"</":xmode="html";advance("</");if(!next_token.identifier){warn("bad_name_a")}name=next_token.string;if(option.cap){name=name.toLowerCase()}advance();if(!stack){stop("unexpected_a",next_token,closetag(name))}tag_name=stack.pop();if(!tag_name){stop("unexpected_a",next_token,closetag(name))}if(tag_name.name!==name){stop("expected_a_b",next_token,closetag(tag_name.name),closetag(name))}if(next_token.id!==">"){stop("expected_a_b",next_token,">",artifact())}xmode="outer";advance(">");break;case"<!":if(option.safe){warn("adsafe_a")}xmode="html";for(;;){advance();if(next_token.id===">"||next_token.id==="(end)"){break}if(next_token.string.indexOf("--")>=0){stop("unexpected_a",next_token,"--")}if(next_token.string.indexOf("<")>=0){stop("unexpected_a",next_token,"<")}if(next_token.string.indexOf(">")>=0){stop("unexpected_a",next_token,">")}}xmode="outer";advance(">");break;case"(end)":if(stack.length!==0){warn("missing_a",next_token,"</"+stack.pop().string+">")}return;default:if(next_token.id==="(end)"){stop("missing_a",next_token,"</"+stack[stack.length-1].string+">")}else{advance()}}if(stack&&stack.length===0&&(option.adsafe||!option.fragment||next_token.id==="(end)")){break}}if(next_token.id!=="(end)"){stop("unexpected_a")}}itself=function JSLint(the_source,the_option){var i,predef,tree;JSLINT.errors=[];JSLINT.tree="";JSLINT.properties="";begin=prev_token=token=next_token=Object.create(syntax["(begin)"]);predefined={};add_to_predefined(standard);property={};if(the_option){option=Object.create(the_option);predef=option.predef;if(predef){if(Array.isArray(predef)){for(i=0;i<predef.length;i+=1){predefined[predef[i]]=true}}else if(typeof predef==="object"){add_to_predefined(predef)}}do_safe()}else{option={}}option.indent=+option.indent||4;option.maxerr=+option.maxerr||50;adsafe_id="";adsafe_may=adsafe_top=adsafe_went=false;approved={};if(option.approved){for(i=0;i<option.approved.length;i+=1){approved[option.approved[i]]=option.approved[i]}}else{approved.test="test"}tab="";for(i=0;i<option.indent;i+=1){tab+=" "}global_scope=scope={};global_funct=funct={"(scope)":scope,"(breakage)":0,"(loopage)":0};functions=[funct];comments_off=false;ids={};in_block=false;indent=null;json_mode=false;lookahead=[];node_js=false;prereg=true;src=false;stack=null;strict_mode=false;urls=[];var_mode=null;warnings=0;xmode="";lex.init(the_source);assume();try{advance();if(next_token.id==="(number)"){stop("unexpected_a")}else if(next_token.string.charAt(0)==="<"){html();if(option.adsafe&&!adsafe_went){warn("adsafe_go",this)}}else{switch(next_token.id){case"{":case"[":json_mode=true;json_value();break;case"@":case"*":case"#":case".":case":":xmode="style";advance();if(token.id!=="@"||!next_token.identifier||next_token.string!=="charset"||token.line!==1||token.from!==1){stop("css")}advance();if(next_token.id!=="(string)"&&next_token.string!=="UTF-8"){stop("css")}advance();semicolon();styles();break;default:if(option.adsafe&&option.fragment){stop("expected_a_b",next_token,"<div>",artifact())}step_in(1);if(next_token.id===";"&&!node_js){semicolon()}adsafe_top=true;tree=statements();begin.first=tree;itself.tree=begin;if(option.adsafe&&(tree.length!==1||aint(tree[0],"id","(")||aint(tree[0].first,"id",".")||aint(tree[0].first.first,"string","ADSAFE")||aint(tree[0].first.second,"string","lib")||tree[0].second.length!==2||tree[0].second[0].id!=="(string)"||aint(tree[0].second[1],"id","function"))){stop("adsafe_lib")}if(tree.disrupt){warn("weird_program",prev_token)}}}indent=null;advance("(end)");itself.property=property}catch(e){if(e){JSLINT.errors.push({reason:e.message,line:e.line||next_token.line,character:e.character||next_token.from},null)}}return JSLINT.errors.length===0};itself.data=function(){var data={functions:[]},function_data,globals,i,j,kind,name,the_function,undef=[],unused=[];if(itself.errors.length){data.errors=itself.errors}if(json_mode){data.json=true}if(urls.length>0){data.urls=urls}globals=Object.keys(global_scope).filter(function(value){return value.charAt(0)!=="("&&typeof standard[value]!=="boolean"});if(globals.length>0){data.globals=globals}for(i=1;i<functions.length;i+=1){the_function=functions[i];function_data={};for(j=0;j<functionicity.length;j+=1){function_data[functionicity[j]]=[]}for(name in the_function){if(Object.prototype.hasOwnProperty.call(the_function,name)){if(name.charAt(0)!=="("){kind=the_function[name];if(kind==="unction"||kind==="unparam"){kind="unused"}if(Array.isArray(function_data[kind])){function_data[kind].push(name);if(kind==="unused"){unused.push({name:name,line:the_function["(line)"],"function":the_function["(name)"]})}else if(kind==="undef"){undef.push({name:name,line:the_function["(line)"],"function":the_function["(name)"]})}}}}}for(j=0;j<functionicity.length;j+=1){if(function_data[functionicity[j]].length===0){delete function_data[functionicity[j]]}}function_data.name=the_function["(name)"];function_data.params=the_function["(params)"];function_data.line=the_function["(line)"];data.functions.push(function_data)}if(unused.length>0){data.unused=unused}if(undef.length>0){data["undefined"]=undef}return data};itself.error_report=function(data){var evidence,i,output=[],snippets,warning;if(data.errors){for(i=0;i<data.errors.length;i+=1){warning=data.errors[i];if(warning){evidence=warning.evidence||"";output.push("<cite>");if(isFinite(warning.line)){output.push("<address>line "+String(warning.line)+" character "+String(warning.character)+"</address>")}output.push(warning.reason.entityify()+"</cite>");if(evidence){output.push("<pre>"+evidence.entityify()+"</pre>")}}}}if(data.unused||data["undefined"]){output.push("<dl>");if(data["undefined"]){output.push("<dt>undefined</dt><dd>");snippets=[];for(i=0;i<data["undefined"].length;i+=1){snippets[i]="<code>"+data["undefined"][i].name+"</code>&nbsp;<address>"+data["undefined"][i]["function"]+" "+String(data["undefined"][i].line)+"</address>"}output.push(snippets.join(", "));output.push("</dd>")}if(data.unused){output.push("<dt>unused</dt><dd>");snippets=[];for(i=0;i<data.unused.length;i+=1){snippets[i]="<code>"+data.unused[i].name+"</code>&nbsp;<address>"+data.unused[i]["function"]+" "+String(data.unused[i].line)+"</address>"}output.push(snippets.join(", "));output.push("</dd>")}output.push("</dl>")}if(data.json){output.push("<p>JSON: bad.</p>")}return output.join("")};itself.report=function(data){var dl,err,i,j,names,output=[],the_function;function detail(h,value){var comma_needed,singularity;if(Array.isArray(value)){output.push("<dt>"+h+"</dt><dd>");value.sort().forEach(function(item){if(item!==singularity){singularity=item;output.push((comma_needed?", ":"")+singularity);comma_needed=true}});output.push("</dd>")}else if(value){output.push("<dt>"+h+"</dt><dd>",value,"</dd>")}}output.push("<dl>");if(data.urls){detail("url",data.urls);dl=true}if(data.globals){detail("global",data.globals);dl=true}else if(xmode==="style"){output.push("<p>CSS.</p>")}else if(data.json&&!err){output.push("<p>JSON: good.</p>")}else{output.push("<div><i>No new global variables introduced.</i></div>")}if(dl){output.push("</dl>")}else{output[0]=""}for(i=0;i<data.functions.length;i+=1){the_function=data.functions[i];names=[];if(the_function.params){for(j=0;j<the_function.params.length;j+=1){names[j]=the_function.params[j].string}}output.push("<dl><address>line "+String(the_function.line)+"</address>"+the_function.name.entityify()+"("+names.join(", ")+")");detail("undefined",the_function["undefined"]);detail("unused",the_function.unused);detail("closure",the_function.closure);detail("variable",the_function["var"]);detail("exception",the_function.exception);detail("outer",the_function.outer);detail("global",the_function.global);detail("label",the_function.label);output.push("</dl>")}return output.join("")};itself.properties_report=function(property){if(!property){return""}var i,key,keys=Object.keys(property).sort(),length,output=["/*properties"],mem="    ",name,not_first=false;for(i=0;i<keys.length;i+=1){key=keys[i];if(property[key]>0){if(not_first){mem+=", "}name=ix.test(key)?key:"'"+key.replace(nx,sanitize)+"'";length+=name.length+2;if(mem.length+name.length>80){output.push(mem);mem="    "}mem+=name;not_first=true}}output.push(mem,"*/\n");return output.join("\n")};itself.jslint=itself;itself.edition="2012-05-09";return itself}();exports.lint=function(){JSLINT.apply(this,arguments);return{errors:JSLINT.errors}}});(function(window,undefined){function require(arg){return window.less[arg.split("/")[1]]}if(typeof define==="function"&&define.amd){define("less",[],function(){return less})}if(!Array.isArray){Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"||obj instanceof Array}}if(!Array.prototype.forEach){Array.prototype.forEach=function(block,thisObject){var len=this.length>>>0;for(var i=0;i<len;i++){if(i in this){block.call(thisObject,this[i],i,this)}}}}if(!Array.prototype.map){Array.prototype.map=function(fun){var len=this.length>>>0;var res=new Array(len);var thisp=arguments[1];for(var i=0;i<len;i++){if(i in this){res[i]=fun.call(thisp,this[i],i,this)}}return res}}if(!Array.prototype.filter){Array.prototype.filter=function(block){var values=[];var thisp=arguments[1];for(var i=0;i<this.length;i++){if(block.call(thisp,this[i])){values.push(this[i])}}return values}}if(!Array.prototype.reduce){Array.prototype.reduce=function(fun){var len=this.length>>>0;var i=0;if(len===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2){var rv=arguments[1]}else{do{if(i in this){rv=this[i++];break}if(++i>=len)throw new TypeError}while(true)}for(;i<len;i++){if(i in this){rv=fun.call(null,rv,this[i],i,this)}}return rv}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(value){var length=this.length;var i=arguments[1]||0;if(!length)return-1;if(i>=length)return-1;if(i<0)i+=length;for(;i<length;i++){if(!Object.prototype.hasOwnProperty.call(this,i)){continue}if(value===this[i])return i}return-1}}if(!Object.keys){Object.keys=function(object){var keys=[];for(var name in object){if(Object.prototype.hasOwnProperty.call(object,name)){keys.push(name)}}return keys}}if(!String.prototype.trim){String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")}}var less,tree;if(typeof environment==="object"&&{}.toString.call(environment)==="[object Environment]"){if(typeof window==="undefined"){less={}}else{less=window.less={}}tree=less.tree={};less.mode="rhino"}else if(typeof window==="undefined"){less=exports,tree=require("./tree");less.mode="node"}else{if(typeof window.less==="undefined"){window.less={}}less=window.less,tree=window.less.tree={};less.mode="browser"}less.Parser=function Parser(env){var input,i,j,temp,memo,furthest,chunks,current,parser;var that=this;var finish=function(){};var imports=this.imports={paths:env&&env.paths||[],queue:[],files:{},contents:{},mime:env&&env.mime,error:null,push:function(path,callback){var that=this;this.queue.push(path);less.Parser.importer(path,this.paths,function(e,root,contents){that.queue.splice(that.queue.indexOf(path),1);that.files[path]=root;that.contents[path]=contents;if(e&&!that.error){that.error=e}callback(e,root);if(that.queue.length===0){finish()}},env)}};function save(){temp=chunks[j],memo=i,current=i}function restore(){chunks[j]=temp,i=memo,current=i}function sync(){if(i>current){chunks[j]=chunks[j].slice(i-current);current=i}}function $(tok){var match,args,length,c,index,endIndex,k,mem;if(tok instanceof Function){return tok.call(parser.parsers)}else if(typeof tok==="string"){match=input.charAt(i)===tok?tok:null;length=1;sync()}else{sync();if(match=tok.exec(chunks[j])){length=match[0].length}else{return null}}if(match){mem=i+=length;endIndex=i+chunks[j].length-length;while(i<endIndex){c=input.charCodeAt(i);if(!(c===32||c===10||c===9)){break}i++}chunks[j]=chunks[j].slice(length+(i-mem));current=i;if(chunks[j].length===0&&j<chunks.length-1){j++}if(typeof match==="string"){return match}else{return match.length===1?match[0]:match}}}function expect(arg,msg){var result=$(arg);if(!result){error(msg||(typeof arg==="string"?"expected '"+arg+"' got '"+input.charAt(i)+"'":"unexpected token"))}else{return result}}function error(msg,type){throw{index:i,type:type||"Syntax",message:msg}}function peek(tok){if(typeof tok==="string"){return input.charAt(i)===tok}else{if(tok.test(chunks[j])){return true}else{return false}}}function basename(pathname){if(less.mode==="node"){return require("path").basename(pathname)}else{return pathname.match(/[^\/]+$/)[0]}}function getInput(e,env){if(e.filename&&env.filename&&e.filename!==env.filename){return parser.imports.contents[basename(e.filename)]}else{return input}}function getLocation(index,input){for(var n=index,column=-1;n>=0&&input.charAt(n)!=="\n";n--){column++}return{line:typeof index==="number"?(input.slice(0,index).match(/\n/g)||"").length:null,column:column}}function LessError(e,env){var input=getInput(e,env),loc=getLocation(e.index,input),line=loc.line,col=loc.column,lines=input.split("\n");this.type=e.type||"Syntax";this.message=e.message;this.filename=e.filename||env.filename;this.index=e.index;this.line=typeof line==="number"?line+1:null;this.callLine=e.call&&getLocation(e.call,input).line+1;this.callExtract=lines[getLocation(e.call,input).line];this.stack=e.stack;this.column=col;this.extract=[lines[line-1],lines[line],lines[line+1]]}this.env=env=env||{};this.optimization="optimization"in this.env?this.env.optimization:1;this.env.filename=this.env.filename||null;return parser={imports:imports,parse:function(str,callback){var root,start,end,zone,line,lines,buff=[],c,error=null;i=j=current=furthest=0;input=str.replace(/\r\n/g,"\n");chunks=function(chunks){var j=0,skip=/[^"'`\{\}\/\(\)\\]+/g,comment=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,string=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`\\\r\n]|\\.)*)`/g,level=0,match,chunk=chunks[0],inParam;for(var i=0,c,cc;i<input.length;i++){skip.lastIndex=i;if(match=skip.exec(input)){if(match.index===i){i+=match[0].length;chunk.push(match[0])}}c=input.charAt(i);comment.lastIndex=string.lastIndex=i;if(match=string.exec(input)){if(match.index===i){i+=match[0].length;chunk.push(match[0]);c=input.charAt(i)}}if(!inParam&&c==="/"){cc=input.charAt(i+1);if(cc==="/"||cc==="*"){if(match=comment.exec(input)){if(match.index===i){i+=match[0].length;chunk.push(match[0]);c=input.charAt(i)}}}}switch(c){case"{":if(!inParam){level++;chunk.push(c);break};case"}":if(!inParam){level--;chunk.push(c);chunks[++j]=chunk=[];break};case"(":if(!inParam){inParam=true;chunk.push(c);break};case")":if(inParam){inParam=false;chunk.push(c);break};default:chunk.push(c)}}if(level>0){error=new LessError({index:i,type:"Parse",message:"missing closing `}`",filename:env.filename},env)}return chunks.map(function(c){return c.join("")});}([[]]);if(error){return callback(error)}try{root=new tree.Ruleset([],$(this.parsers.primary));root.root=true}catch(e){return callback(new LessError(e,env))}root.toCSS=function(evaluate){var line,lines,column;return function(options,variables){var frames=[],importError;options=options||{};if(typeof variables==="object"&&!Array.isArray(variables)){variables=Object.keys(variables).map(function(k){var value=variables[k];if(!(value instanceof tree.Value)){if(!(value instanceof tree.Expression)){value=new tree.Expression([value])}value=new tree.Value([value])}return new tree.Rule("@"+k,value,false,0)});frames=[new tree.Ruleset(null,variables)]}try{var css=evaluate.call(this,{frames:frames}).toCSS([],{compress:options.compress||false})}catch(e){throw new LessError(e,env)}if(importError=parser.imports.error){if(importError instanceof LessError)throw importError;else throw new LessError(importError,env)}if(options.yuicompress&&less.mode==="node"){return require("./cssmin").compressor.cssmin(css)}else if(options.compress){return css.replace(/(\s)+/g,"$1")}else{return css}}}(root.eval);if(i<input.length-1){i=furthest;lines=input.split("\n");line=(input.slice(0,i).match(/\n/g)||"").length+1;for(var n=i,column=-1;n>=0&&input.charAt(n)!=="\n";n--){column++}error={type:"Parse",message:"Syntax Error on line "+line,index:i,filename:env.filename,line:line,column:column,extract:[lines[line-2],lines[line-1],lines[line]]}}if(this.imports.queue.length>0){finish=function(){callback(error,root)}}else{callback(error,root)}},parsers:{primary:function(){var node,root=[];while((node=$(this.mixin.definition)||$(this.rule)||$(this.ruleset)||$(this.mixin.call)||$(this.comment)||$(this.directive))||$(/^[\s\n]+/)){node&&root.push(node)}return root},comment:function(){var comment;if(input.charAt(i)!=="/")return;if(input.charAt(i+1)==="/"){return new tree.Comment($(/^\/\/.*/),true)}else if(comment=$(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/)){return new tree.Comment(comment)}},entities:{quoted:function(){var str,j=i,e;if(input.charAt(j)==="~"){j++,e=true}if(input.charAt(j)!=='"'&&input.charAt(j)!=="'")return;e&&$("~");if(str=$(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/)){return new tree.Quoted(str[0],str[1]||str[2],e)}},keyword:function(){var k;if(k=$(/^[_A-Za-z-][_A-Za-z0-9-]*/)){if(tree.colors.hasOwnProperty(k)){return new tree.Color(tree.colors[k].slice(1))}else{return new tree.Keyword(k)}}},call:function(){var name,args,index=i;if(!(name=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(chunks[j])))return;name=name[1].toLowerCase();if(name==="url"){return null}else{i+=name.length}if(name==="alpha"){return $(this.alpha)}$("(");args=$(this.entities.arguments);if(!$(")"))return;if(name){return new tree.Call(name,args,index,env.filename)}},arguments:function(){var args=[],arg;while(arg=$(this.entities.assignment)||$(this.expression)){args.push(arg);if(!$(",")){break}}return args},literal:function(){return $(this.entities.dimension)||$(this.entities.color)||$(this.entities.quoted)},assignment:function(){var key,value;if((key=$(/^\w+(?=\s?=)/i))&&$("=")&&(value=$(this.entity))){return new tree.Assignment(key,value)}},url:function(){var value;if(input.charAt(i)!=="u"||!$(/^url\(/))return;value=$(this.entities.quoted)||$(this.entities.variable)||$(this.entities.dataURI)||$(/^[-\w%@$\/.&=:;#+?~]+/)||"";expect(")");return new tree.URL(value.value||value.data||value instanceof tree.Variable?value:new tree.Anonymous(value),imports.paths)},dataURI:function(){var obj;if($(/^data:/)){obj={};obj.mime=$(/^[^\/]+\/[^,;)]+/)||"";obj.charset=$(/^;\s*charset=[^,;)]+/)||"";obj.base64=$(/^;\s*base64/)||"";obj.data=$(/^,\s*[^)]+/);if(obj.data){return obj}}},variable:function(){var name,index=i;if(input.charAt(i)==="@"&&(name=$(/^@@?[\w-]+/))){return new tree.Variable(name,index,env.filename)}},color:function(){var rgb;if(input.charAt(i)==="#"&&(rgb=$(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/))){return new tree.Color(rgb[1])}},dimension:function(){var value,c=input.charCodeAt(i);if(c>57||c<45||c===47)return;if(value=$(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/)){return new tree.Dimension(value[1],value[2])}},javascript:function(){var str,j=i,e;if(input.charAt(j)==="~"){j++,e=true}if(input.charAt(j)!=="`"){return}e&&$("~");if(str=$(/^`([^`]*)`/)){return new tree.JavaScript(str[1],i,e)}}},variable:function(){var name;if(input.charAt(i)==="@"&&(name=$(/^(@[\w-]+)\s*:/))){return name[1]}},shorthand:function(){var a,b;if(!peek(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=$(this.entity))&&$("/")&&(b=$(this.entity))){return new tree.Shorthand(a,b)}},mixin:{call:function(){var elements=[],e,c,args,index=i,s=input.charAt(i),important=false;if(s!=="."&&s!=="#"){return}while(e=$(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)){elements.push(new tree.Element(c,e,i));c=$(">")}$("(")&&(args=$(this.entities.arguments))&&$(")");if($(this.important)){important=true}if(elements.length>0&&($(";")||peek("}"))){return new tree.mixin.Call(elements,args||[],index,env.filename,important)}},definition:function(){var name,params=[],match,ruleset,param,value,cond,variadic=false;if(input.charAt(i)!=="."&&input.charAt(i)!=="#"||peek(/^[^{]*(;|})/))return;save();if(match=$(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){name=match[1];do{if(input.charAt(i)==="."&&$(/^\.{3}/)){variadic=true;break}else if(param=$(this.entities.variable)||$(this.entities.literal)||$(this.entities.keyword)){if(param instanceof tree.Variable){if($(":")){value=expect(this.expression,"expected expression");params.push({name:param.name,value:value})}else if($(/^\.{3}/)){params.push({name:param.name,variadic:true});variadic=true;break}else{params.push({name:param.name})}}else{params.push({value:param})}}else{break}}while($(","));expect(")");if($(/^when/)){cond=expect(this.conditions,"expected condition")}ruleset=$(this.block);if(ruleset){return new tree.mixin.Definition(name,params,ruleset,cond,variadic)}else{restore()}}}},entity:function(){return $(this.entities.literal)||$(this.entities.variable)||$(this.entities.url)||$(this.entities.call)||$(this.entities.keyword)||$(this.entities.javascript)||$(this.comment)},end:function(){return $(";")||peek("}")},alpha:function(){var value;if(!$(/^\(opacity=/i))return;if(value=$(/^\d+/)||$(this.entities.variable)){expect(")");return new tree.Alpha(value)}},element:function(){var e,t,c,v;c=$(this.combinator);e=$(/^(?:\d+\.\d+|\d+)%/)||$(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||$("*")||$(this.attribute)||$(/^\([^)@]+\)/);if(!e){$("(")&&(v=$(this.entities.variable))&&$(")")&&(e=new tree.Paren(v))}if(e){return new tree.Element(c,e,i)}if(c.value&&c.value.charAt(0)==="&"){return new tree.Element(c,null,i)}},combinator:function(){var match,c=input.charAt(i);if(c===">"||c==="+"||c==="~"){i++;while(input.charAt(i)===" "){i++}return new tree.Combinator(c)}else if(c==="&"){match="&";i++;if(input.charAt(i)===" "){match="& "}while(input.charAt(i)===" "){i++}return new tree.Combinator(match)}else if(input.charAt(i-1)===" "){return new tree.Combinator(" ")}else{return new tree.Combinator(null)}},selector:function(){var sel,e,elements=[],c,match;if($("(")){sel=$(this.entity);expect(")");return new tree.Selector([new tree.Element("",sel,i)])}while(e=$(this.element)){c=input.charAt(i);elements.push(e);if(c==="{"||c==="}"||c===";"||c===","){break}}if(elements.length>0){return new tree.Selector(elements)}},tag:function(){return $(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||$("*")},attribute:function(){var attr="",key,val,op;if(!$("["))return;if(key=$(/^[a-zA-Z-]+/)||$(this.entities.quoted)){if((op=$(/^[|~*$^]?=/))&&(val=$(this.entities.quoted)||$(/^[\w-]+/))){attr=[key,op,val.toCSS?val.toCSS():val].join("")}else{attr=key}}if(!$("]"))return;if(attr){return"["+attr+"]"}},block:function(){var content;if($("{")&&(content=$(this.primary))&&$("}")){return content}},ruleset:function(){var selectors=[],s,rules,match;save();while(s=$(this.selector)){selectors.push(s);$(this.comment);if(!$(",")){break}$(this.comment)}if(selectors.length>0&&(rules=$(this.block))){return new tree.Ruleset(selectors,rules,env.strictImports)}else{furthest=i;restore()}},rule:function(){var name,value,c=input.charAt(i),important,match;save();if(c==="."||c==="#"||c==="&"){return}if(name=$(this.variable)||$(this.property)){if(name.charAt(0)!="@"&&(match=/^([^@+\/'"*`(;{}-]*);/.exec(chunks[j]))){i+=match[0].length-1;value=new tree.Anonymous(match[1])}else if(name==="font"){value=$(this.font)}else{value=$(this.value)}important=$(this.important);if(value&&$(this.end)){return new tree.Rule(name,value,important,memo)}else{furthest=i;restore()}}},"import":function(){var path,features,index=i;if($(/^@import\s+/)&&(path=$(this.entities.quoted)||$(this.entities.url))){features=$(this.mediaFeatures);if($(";")){return new tree.Import(path,imports,features,index)}}},mediaFeature:function(){var e,p,nodes=[];do{if(e=$(this.entities.keyword)){nodes.push(e)}else if($("(")){p=$(this.property);e=$(this.entity);if($(")")){if(p&&e){nodes.push(new tree.Paren(new tree.Rule(p,e,null,i,true)))}else if(e){nodes.push(new tree.Paren(e))}else{return null}}else{return null}}}while(e);if(nodes.length>0){return new tree.Expression(nodes)}},mediaFeatures:function(){var e,features=[];do{if(e=$(this.mediaFeature)){features.push(e);if(!$(",")){break}}else if(e=$(this.entities.variable)){features.push(e);if(!$(",")){break}}}while(e);return features.length>0?features:null},media:function(){var features,rules;if($(/^@media/)){features=$(this.mediaFeatures);if(rules=$(this.block)){return new tree.Media(rules,features)}}},directive:function(){var name,value,rules,types,e,nodes;if(input.charAt(i)!=="@")return;if(value=$(this["import"])||$(this.media)){return value}else if(name=$(/^@page|@keyframes/)||$(/^@(?:-webkit-|-moz-|-o-|-ms-)[a-z0-9-]+/)){types=($(/^[^{]+/)||"").trim();if(rules=$(this.block)){return new tree.Directive(name+" "+types,rules)}}else if(name=$(/^@[-a-z]+/)){if(name==="@font-face"){if(rules=$(this.block)){return new tree.Directive(name,rules)}}else if((value=$(this.entity))&&$(";")){return new tree.Directive(name,value)}}},font:function(){var value=[],expression=[],weight,shorthand,font,e;while(e=$(this.shorthand)||$(this.entity)){expression.push(e)}value.push(new tree.Expression(expression));if($(",")){while(e=$(this.expression)){value.push(e);if(!$(",")){break}}}return new tree.Value(value)},value:function(){var e,expressions=[],important;while(e=$(this.expression)){expressions.push(e);if(!$(",")){break}}if(expressions.length>0){return new tree.Value(expressions)}},important:function(){if(input.charAt(i)==="!"){return $(/^! *important/)}},sub:function(){var e;if($("(")&&(e=$(this.expression))&&$(")")){return e}},multiplication:function(){var m,a,op,operation;if(m=$(this.operand)){while(!peek(/^\/\*/)&&(op=$("/")||$("*"))&&(a=$(this.operand))){operation=new tree.Operation(op,[operation||m,a])}return operation||m}},addition:function(){var m,a,op,operation;if(m=$(this.multiplication)){while((op=$(/^[-+]\s+/)||input.charAt(i-1)!=" "&&($("+")||$("-")))&&(a=$(this.multiplication))){operation=new tree.Operation(op,[operation||m,a])}return operation||m}},conditions:function(){var a,b,index=i,condition;if(a=$(this.condition)){while($(",")&&(b=$(this.condition))){condition=new tree.Condition("or",condition||a,b,index)}return condition||a}},condition:function(){var a,b,c,op,index=i,negate=false;if($(/^not/)){negate=true}expect("(");if(a=$(this.addition)||$(this.entities.keyword)||$(this.entities.quoted)){if(op=$(/^(?:>=|=<|[<=>])/)){if(b=$(this.addition)||$(this.entities.keyword)||$(this.entities.quoted)){c=new tree.Condition(op,a,b,index,negate)}else{error("expected expression")}}else{c=new tree.Condition("=",a,new tree.Keyword("true"),index,negate)}expect(")");return $(/^and/)?new tree.Condition("and",c,$(this.condition)):c}},operand:function(){var negate,p=input.charAt(i+1);if(input.charAt(i)==="-"&&(p==="@"||p==="(")){negate=$("-")}var o=$(this.sub)||$(this.entities.dimension)||$(this.entities.color)||$(this.entities.variable)||$(this.entities.call);return negate?new tree.Operation("*",[new tree.Dimension(-1),o]):o},expression:function(){var e,delim,entities=[],d;while(e=$(this.addition)||$(this.entity)){entities.push(e)}if(entities.length>0){return new tree.Expression(entities)}},property:function(){var name;if(name=$(/^(\*?-?[-a-z_0-9]+)\s*:/)){return name[1]}}}}};if(less.mode==="browser"||less.mode==="rhino"){less.Parser.importer=function(path,paths,callback,env){if(!/^([a-z]+:)?\//.test(path)&&paths.length>0){path=paths[0]+path}loadStyleSheet({href:path,title:path,type:env.mime},function(e){if(e&&typeof env.errback==="function"){env.errback.call(null,path,paths,callback,env)}else{callback.apply(null,arguments)}},true)}}(function(tree){tree.functions={rgb:function(r,g,b){return this.rgba(r,g,b,1)},rgba:function(r,g,b,a){var rgb=[r,g,b].map(function(c){return number(c)}),a=number(a);return new tree.Color(rgb,a)},hsl:function(h,s,l){return this.hsla(h,s,l,1)},hsla:function(h,s,l,a){h=number(h)%360/360;s=number(s);l=number(l);a=number(a);var m2=l<=.5?l*(s+1):l+s-l*s;var m1=l*2-m2;return this.rgba(hue(h+1/3)*255,hue(h)*255,hue(h-1/3)*255,a);function hue(h){h=h<0?h+1:h>1?h-1:h;if(h*6<1)return m1+(m2-m1)*h*6;else if(h*2<1)return m2;else if(h*3<2)return m1+(m2-m1)*(2/3-h)*6;else return m1}},hue:function(color){return new tree.Dimension(Math.round(color.toHSL().h))},saturation:function(color){return new tree.Dimension(Math.round(color.toHSL().s*100),"%")},lightness:function(color){return new tree.Dimension(Math.round(color.toHSL().l*100),"%")},alpha:function(color){return new tree.Dimension(color.toHSL().a)},saturate:function(color,amount){var hsl=color.toHSL();hsl.s+=amount.value/100;hsl.s=clamp(hsl.s);return hsla(hsl)},desaturate:function(color,amount){var hsl=color.toHSL();hsl.s-=amount.value/100;hsl.s=clamp(hsl.s);return hsla(hsl)},lighten:function(color,amount){var hsl=color.toHSL();hsl.l+=amount.value/100;hsl.l=clamp(hsl.l);return hsla(hsl)},darken:function(color,amount){var hsl=color.toHSL();hsl.l-=amount.value/100;hsl.l=clamp(hsl.l);return hsla(hsl)},fadein:function(color,amount){var hsl=color.toHSL();hsl.a+=amount.value/100;hsl.a=clamp(hsl.a);return hsla(hsl)},fadeout:function(color,amount){var hsl=color.toHSL();hsl.a-=amount.value/100;hsl.a=clamp(hsl.a);return hsla(hsl)},fade:function(color,amount){var hsl=color.toHSL();hsl.a=amount.value/100;hsl.a=clamp(hsl.a);return hsla(hsl)},spin:function(color,amount){var hsl=color.toHSL();var hue=(hsl.h+amount.value)%360;hsl.h=hue<0?360+hue:hue;return hsla(hsl)},mix:function(color1,color2,weight){var p=weight.value/100;var w=p*2-1;var a=color1.toHSL().a-color2.toHSL().a;var w1=((w*a==-1?w:(w+a)/(1+w*a))+1)/2;var w2=1-w1;var rgb=[color1.rgb[0]*w1+color2.rgb[0]*w2,color1.rgb[1]*w1+color2.rgb[1]*w2,color1.rgb[2]*w1+color2.rgb[2]*w2];var alpha=color1.alpha*p+color2.alpha*(1-p);return new tree.Color(rgb,alpha)},greyscale:function(color){return this.desaturate(color,new tree.Dimension(100))},e:function(str){return new tree.Anonymous(str instanceof tree.JavaScript?str.evaluated:str)},escape:function(str){return new tree.Anonymous(encodeURI(str.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(quoted){var args=Array.prototype.slice.call(arguments,1),str=quoted.value;for(var i=0;i<args.length;i++){str=str.replace(/%[sda]/i,function(token){var value=token.match(/s/i)?args[i].value:args[i].toCSS();return token.match(/[A-Z]$/)?encodeURIComponent(value):value})}str=str.replace(/%%/g,"%");return new tree.Quoted('"'+str+'"',str)},round:function(n){return this._math("round",n)},ceil:function(n){return this._math("ceil",n)},floor:function(n){return this._math("floor",n)},_math:function(fn,n){if(n instanceof tree.Dimension){return new tree.Dimension(Math[fn](number(n)),n.unit)}else if(typeof n==="number"){return Math[fn](n)}else{throw{type:"Argument",message:"argument must be a number"}}},argb:function(color){return new tree.Anonymous(color.toARGB())},percentage:function(n){return new tree.Dimension(n.value*100,"%")},color:function(n){if(n instanceof tree.Quoted){return new tree.Color(n.value.slice(1))}else{throw{type:"Argument",message:"argument must be a string"}}},iscolor:function(n){return this._isa(n,tree.Color)},isnumber:function(n){return this._isa(n,tree.Dimension)},isstring:function(n){return this._isa(n,tree.Quoted)},iskeyword:function(n){return this._isa(n,tree.Keyword)},isurl:function(n){return this._isa(n,tree.URL)},ispixel:function(n){return n instanceof tree.Dimension&&n.unit==="px"?tree.True:tree.False},ispercentage:function(n){return n instanceof tree.Dimension&&n.unit==="%"?tree.True:tree.False},isem:function(n){return n instanceof tree.Dimension&&n.unit==="em"?tree.True:tree.False},_isa:function(n,Type){return n instanceof Type?tree.True:tree.False}};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)}else if(typeof n==="number"){return n}else{throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}}function clamp(val){return Math.min(1,Math.max(0,val))}})(require("./tree"));(function(tree){tree.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}})(require("./tree"));(function(tree){tree.Alpha=function(val){this.value=val};tree.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(env){if(this.value.eval){this.value=this.value.eval(env)}return this}}})(require("../tree"));(function(tree){tree.Anonymous=function(string){this.value=string.value||string};tree.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(require("../tree"));(function(tree){tree.Assignment=function(key,val){this.key=key;this.value=val};tree.Assignment.prototype={toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(env){if(this.value.eval){this.value=this.value.eval(env)}return this}}})(require("../tree"));(function(tree){tree.Call=function(name,args,index,filename){this.name=name;this.args=args;this.index=index;this.filename=filename};tree.Call.prototype={eval:function(env){var args=this.args.map(function(a){return a.eval(env)});if(this.name in tree.functions){try{return tree.functions[this.name].apply(tree.functions,args)}catch(e){throw{type:e.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(e.message?": "+e.message:""),index:this.index,filename:this.filename}}}else{return new tree.Anonymous(this.name+"("+args.map(function(a){return a.toCSS()}).join(", ")+")")}},toCSS:function(env){return this.eval(env).toCSS()}}})(require("../tree"));(function(tree){tree.Color=function(rgb,a){if(Array.isArray(rgb)){this.rgb=rgb}else if(rgb.length==6){this.rgb=rgb.match(/.{2}/g).map(function(c){return parseInt(c,16)})}else{this.rgb=rgb.split("").map(function(c){return parseInt(c+c,16)})}this.alpha=typeof a==="number"?a:1};tree.Color.prototype={eval:function(){return this},toCSS:function(){if(this.alpha<1){return"rgba("+this.rgb.map(function(c){return Math.round(c)}).concat(this.alpha).join(", ")+")"}else{return"#"+this.rgb.map(function(i){i=Math.round(i);i=(i>255?255:i<0?0:i).toString(16);return i.length===1?"0"+i:i}).join("")}},operate:function(op,other){var result=[];if(!(other instanceof tree.Color)){other=other.toColor()}for(var c=0;c<3;c++){result[c]=tree.operate(op,this.rgb[c],other.rgb[c])}return new tree.Color(result,this.alpha+other.alpha)},toHSL:function(){var r=this.rgb[0]/255,g=this.rgb[1]/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;if(max===min){h=s=0}else{s=l>.5?d/(2-max-min):d/(max+min);switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return{h:h*360,s:s,l:l,a:a}},toARGB:function(){var argb=[Math.round(this.alpha*255)].concat(this.rgb);return"#"+argb.map(function(i){i=Math.round(i);i=(i>255?255:i<0?0:i).toString(16);return i.length===1?"0"+i:i}).join("")}}})(require("../tree"));(function(tree){tree.Comment=function(value,silent){this.value=value;this.silent=!!silent};tree.Comment.prototype={toCSS:function(env){return env.compress?"":this.value},eval:function(){return this}}})(require("../tree"));(function(tree){tree.Condition=function(op,l,r,i,negate){this.op=op.trim();this.lvalue=l;this.rvalue=r;this.index=i;this.negate=negate};tree.Condition.prototype.eval=function(env){var a=this.lvalue.eval(env),b=this.rvalue.eval(env);var i=this.index,result;var result=function(op){switch(op){case"and":return a&&b;case"or":return a||b;default:if(a.compare){result=a.compare(b)}else if(b.compare){result=b.compare(a)}else{throw{type:"Type",message:"Unable to perform comparison",index:i}}switch(result){case-1:return op==="<"||op==="=<";case 0:return op==="="||op===">="||op==="=<";case 1:return op===">"||op===">="}}}(this.op);return this.negate?!result:result}})(require("../tree"));(function(tree){tree.Dimension=function(value,unit){this.value=parseFloat(value);this.unit=unit||null};tree.Dimension.prototype={eval:function(){return this},toColor:function(){return new tree.Color([this.value,this.value,this.value])},toCSS:function(){var css=this.value+this.unit;return css},operate:function(op,other){return new tree.Dimension(tree.operate(op,this.value,other.value),this.unit||other.unit)},compare:function(other){if(other instanceof tree.Dimension){if(other.value>this.value){return-1}else if(other.value<this.value){return 1}else{return 0}}else{return-1}}}})(require("../tree"));(function(tree){tree.Directive=function(name,value,features){this.name=name;if(Array.isArray(value)){this.ruleset=new tree.Ruleset([],value);this.ruleset.allowImports=true}else{this.value=value}};tree.Directive.prototype={toCSS:function(ctx,env){if(this.ruleset){this.ruleset.root=true;return this.name+(env.compress?"{":" {\n  ")+this.ruleset.toCSS(ctx,env).trim().replace(/\n/g,"\n  ")+(env.compress?"}":"\n}\n")}else{return this.name+" "+this.value.toCSS()+";\n"}},eval:function(env){env.frames.unshift(this);this.ruleset=this.ruleset&&this.ruleset.eval(env);env.frames.shift();return this},variable:function(name){return tree.Ruleset.prototype.variable.call(this.ruleset,name)},find:function(){return tree.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return tree.Ruleset.prototype.rulesets.apply(this.ruleset)}}})(require("../tree"));(function(tree){tree.Element=function(combinator,value,index){this.combinator=combinator instanceof tree.Combinator?combinator:new tree.Combinator(combinator);if(typeof value==="string"){this.value=value.trim()}else if(value){this.value=value}else{this.value=""}this.index=index};tree.Element.prototype.eval=function(env){return new tree.Element(this.combinator,this.value.eval?this.value.eval(env):this.value,this.index)};tree.Element.prototype.toCSS=function(env){return this.combinator.toCSS(env||{})+(this.value.toCSS?this.value.toCSS(env):this.value)};tree.Combinator=function(value){if(value===" "){this.value=" "}else if(value==="& "){this.value="& "}else{this.value=value?value.trim():""}};tree.Combinator.prototype.toCSS=function(env){return{"":""," ":" ","&":"","& ":" ",":":" :","+":env.compress?"+":" + ","~":env.compress?"~":" ~ ",">":env.compress?">":" > "}[this.value]}})(require("../tree"));(function(tree){tree.Expression=function(value){this.value=value};tree.Expression.prototype={eval:function(env){if(this.value.length>1){return new tree.Expression(this.value.map(function(e){return e.eval(env)}))}else if(this.value.length===1){return this.value[0].eval(env)}else{return this}},toCSS:function(env){return this.value.map(function(e){return e.toCSS?e.toCSS(env):""}).join(" ")}}})(require("../tree"));(function(tree){tree.Import=function(path,imports,features,index){var that=this;this.index=index;this._path=path;this.features=features&&new tree.Value(features);if(path instanceof tree.Quoted){this.path=/\.(le?|c)ss(\?.*)?$/.test(path.value)?path.value:path.value+".less"}else{this.path=path.value.value||path.value}this.css=/css(\?.*)?$/.test(this.path);if(!this.css){imports.push(this.path,function(e,root){if(e){e.index=index}that.root=root||new tree.Ruleset([],[])})}};tree.Import.prototype={toCSS:function(env){var features=this.features?" "+this.features.toCSS(env):"";if(this.css){return"@import "+this._path.toCSS()+features+";\n"}else{return""}},eval:function(env){var ruleset,features=this.features&&this.features.eval(env);if(this.css){return this}else{ruleset=new tree.Ruleset([],this.root.rules.slice(0));for(var i=0;i<ruleset.rules.length;i++){if(ruleset.rules[i]instanceof tree.Import){Array.prototype.splice.apply(ruleset.rules,[i,1].concat(ruleset.rules[i].eval(env)))}}return this.features?new tree.Media(ruleset.rules,this.features.value):ruleset.rules}}}})(require("../tree"));(function(tree){tree.JavaScript=function(string,index,escaped){this.escaped=escaped;this.expression=string;this.index=index};tree.JavaScript.prototype={eval:function(env){var result,that=this,context={};var expression=this.expression.replace(/@\{([\w-]+)\}/g,function(_,name){return tree.jsify((new tree.Variable("@"+name,that.index)).eval(env))});try{expression=new Function("return ("+expression+")")}catch(e){throw{message:"JavaScript evaluation error: `"+expression+"`",index:this.index}}for(var k in env.frames[0].variables()){context[k.slice(1)]={value:env.frames[0].variables()[k].value,toJS:function(){return this.value.eval(env).toCSS()}}}try{result=expression.call(context)}catch(e){throw{message:"JavaScript evaluation error: '"+e.name+": "+e.message+"'",index:this.index}}if(typeof result==="string"){return new tree.Quoted('"'+result+'"',result,this.escaped,this.index)}else if(Array.isArray(result)){return new tree.Anonymous(result.join(", "))}else{return new tree.Anonymous(result)}}}})(require("../tree"));(function(tree){tree.Keyword=function(value){this.value=value};tree.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value},compare:function(other){if(other instanceof tree.Keyword){return other.value===this.value?0:1}else{return-1}}};tree.True=new tree.Keyword("true");tree.False=new tree.Keyword("false")})(require("../tree"));(function(tree){tree.Media=function(value,features){var el=new tree.Element("&",null,0),selectors=[new tree.Selector([el])];this.features=new tree.Value(features);this.ruleset=new tree.Ruleset(selectors,value);this.ruleset.allowImports=true};tree.Media.prototype={toCSS:function(ctx,env){var features=this.features.toCSS(env);this.ruleset.root=ctx.length===0||ctx[0].multiMedia;return"@media "+features+(env.compress?"{":" {\n  ")+this.ruleset.toCSS(ctx,env).trim().replace(/\n/g,"\n  ")+(env.compress?"}":"\n}\n")},eval:function(env){if(!env.mediaBlocks){env.mediaBlocks=[];env.mediaPath=[]}var blockIndex=env.mediaBlocks.length;env.mediaPath.push(this);env.mediaBlocks.push(this);var media=new tree.Media([],[]);media.features=this.features.eval(env);env.frames.unshift(this.ruleset);media.ruleset=this.ruleset.eval(env);env.frames.shift();env.mediaBlocks[blockIndex]=media;env.mediaPath.pop();return env.mediaPath.length===0?media.evalTop(env):media.evalNested(env)},variable:function(name){return tree.Ruleset.prototype.variable.call(this.ruleset,name)},find:function(){return tree.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return tree.Ruleset.prototype.rulesets.apply(this.ruleset)},evalTop:function(env){var result=this;if(env.mediaBlocks.length>1){var el=new tree.Element("&",null,0);var selectors=[new tree.Selector([el])];result=new tree.Ruleset(selectors,env.mediaBlocks);result.multiMedia=true}delete env.mediaBlocks;delete env.mediaPath;return result},evalNested:function(env){var i,value,path=env.mediaPath.concat([this]);for(i=0;i<path.length;i++){value=path[i].features instanceof tree.Value?path[i].features.value:path[i].features;path[i]=Array.isArray(value)?value:[value]}this.features=new tree.Value(this.permute(path).map(function(path){path=path.map(function(fragment){return fragment.toCSS?fragment:new tree.Anonymous(fragment)});for(i=path.length-1;i>0;i--){path.splice(i,0,new tree.Anonymous("and"))}return new tree.Expression(path)}));return new tree.Ruleset([],[])},permute:function(arr){if(arr.length===0){return[]}else if(arr.length===1){return arr[0]}else{var result=[];var rest=this.permute(arr.slice(1));for(var i=0;i<rest.length;i++){for(var j=0;j<arr[0].length;j++){result.push([arr[0][j]].concat(rest[i]))}}return result}}}})(require("../tree"));(function(tree){tree.mixin={};tree.mixin.Call=function(elements,args,index,filename,important){this.selector=new tree.Selector(elements);this.arguments=args;this.index=index;this.filename=filename;this.important=important};tree.mixin.Call.prototype={eval:function(env){var mixins,args,rules=[],match=false;for(var i=0;i<env.frames.length;i++){if((mixins=env.frames[i].find(this.selector)).length>0){args=this.arguments&&this.arguments.map(function(a){return a.eval(env)});for(var m=0;m<mixins.length;m++){if(mixins[m].match(args,env)){try{Array.prototype.push.apply(rules,mixins[m].eval(env,this.arguments,this.important).rules);match=true}catch(e){throw{message:e.message,index:this.index,filename:this.filename,stack:e.stack}}}}if(match){return rules}else{throw{type:"Runtime",message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(a){return a.toCSS()}).join(", ")+")`",index:this.index,filename:this.filename}}}}throw{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.filename}}};tree.mixin.Definition=function(name,params,rules,condition,variadic){this.name=name;this.selectors=[new tree.Selector([new tree.Element(null,name)])];this.params=params;this.condition=condition;this.variadic=variadic;this.arity=params.length;this.rules=rules;this._lookups={};this.required=params.reduce(function(count,p){if(!p.name||p.name&&!p.value){return count+1}else{return count}},0);this.parent=tree.Ruleset.prototype;this.frames=[]};tree.mixin.Definition.prototype={toCSS:function(){return""},variable:function(name){return this.parent.variable.call(this,name)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},evalParams:function(env,args){var frame=new tree.Ruleset(null,[]),varargs;for(var i=0,val,name;i<this.params.length;i++){if(name=this.params[i].name){if(this.params[i].variadic&&args){varargs=[];for(var j=i;j<args.length;j++){varargs.push(args[j].eval(env))}frame.rules.unshift(new tree.Rule(name,(new tree.Expression(varargs)).eval(env)))}else if(val=args&&args[i]||this.params[i].value){frame.rules.unshift(new tree.Rule(name,val.eval(env)))}else{throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+args.length+" for "+this.arity+")"}}}}return frame},eval:function(env,args,important){var frame=this.evalParams(env,args),context,_arguments=[],rules,start;for(var i=0;i<Math.max(this.params.length,args&&args.length);i++){_arguments.push(args[i]||this.params[i].value)}frame.rules.unshift(new tree.Rule("@arguments",(new tree.Expression(_arguments)).eval(env)));rules=important?this.rules.map(function(r){return new tree.Rule(r.name,r.value,"!important",r.index)}):this.rules.slice(0);return(new tree.Ruleset(null,rules)).eval({frames:[this,frame].concat(this.frames,env.frames)})},match:function(args,env){var argsLength=args&&args.length||0,len,frame;if(!this.variadic){if(argsLength<this.required){return false}if(argsLength>this.params.length){return false}if(this.required>0&&argsLength>this.params.length){return false}}if(this.condition&&!this.condition.eval({frames:[this.evalParams(env,args)].concat(env.frames)})){return false}len=Math.min(argsLength,this.arity);for(var i=0;i<len;i++){if(!this.params[i].name){if(args[i].eval(env).toCSS()!=this.params[i].value.eval(env).toCSS()){return false}}}return true}}})(require("../tree"));(function(tree){tree.Operation=function(op,operands){this.op=op.trim();this.operands=operands};tree.Operation.prototype.eval=function(env){var a=this.operands[0].eval(env),b=this.operands[1].eval(env),temp;if(a instanceof tree.Dimension&&b instanceof tree.Color){if(this.op==="*"||this.op==="+"){temp=b,b=a,a=temp}else{throw{name:"OperationError",message:"Can't substract or divide a color from a number"}}}return a.operate(this.op,b)};tree.operate=function(op,a,b){switch(op){case"+":return a+b;case"-":return a-b;case"*":return a*b;case"/":return a/b}}})(require("../tree"));(function(tree){tree.Paren=function(node){this.value=node};tree.Paren.prototype={toCSS:function(env){return"("+this.value.toCSS(env)+")"},eval:function(env){return new tree.Paren(this.value.eval(env))}}})(require("../tree"));(function(tree){tree.Quoted=function(str,content,escaped,i){this.escaped=escaped;this.value=content||"";this.quote=str.charAt(0);this.index=i};tree.Quoted.prototype={toCSS:function(){if(this.escaped){return this.value}else{return this.quote+this.value+this.quote}},eval:function(env){var that=this;var value=this.value.replace(/`([^`]+)`/g,function(_,exp){return(new tree.JavaScript(exp,that.index,true)).eval(env).value}).replace(/@\{([\w-]+)\}/g,function(_,name){var v=(new tree.Variable("@"+name,that.index)).eval(env);return"value"in v?v.value:v.toCSS()});return new tree.Quoted(this.quote+value+this.quote,value,this.escaped,this.index)}}})(require("../tree"));(function(tree){tree.Rule=function(name,value,important,index,inline){this.name=name;this.value=value instanceof tree.Value?value:new tree.Value([value]);this.important=important?" "+important.trim():"";this.index=index;this.inline=inline||false;if(name.charAt(0)==="@"){this.variable=true}else{this.variable=false}};tree.Rule.prototype.toCSS=function(env){if(this.variable){return""}else{return this.name+(env.compress?":":": ")+this.value.toCSS(env)+this.important+(this.inline?"":";")}};tree.Rule.prototype.eval=function(context){return new tree.Rule(this.name,this.value.eval(context),this.important,this.index,this.inline)};tree.Shorthand=function(a,b){this.a=a;this.b=b};tree.Shorthand.prototype={toCSS:function(env){return this.a.toCSS(env)+"/"+this.b.toCSS(env)},eval:function(){return this}}})(require("../tree"));(function(tree){tree.Ruleset=function(selectors,rules,strictImports){this.selectors=selectors;this.rules=rules;this._lookups={};this.strictImports=strictImports};tree.Ruleset.prototype={eval:function(env){var selectors=this.selectors&&this.selectors.map(function(s){return s.eval(env)});var ruleset=new tree.Ruleset(selectors,this.rules.slice(0),this.strictImports);ruleset.root=this.root;ruleset.allowImports=this.allowImports;env.frames.unshift(ruleset);if(ruleset.root||ruleset.allowImports||!ruleset.strictImports){for(var i=0;i<ruleset.rules.length;i++){if(ruleset.rules[i]instanceof tree.Import){Array.prototype.splice.apply(ruleset.rules,[i,1].concat(ruleset.rules[i].eval(env)))}}}for(var i=0;i<ruleset.rules.length;i++){if(ruleset.rules[i]instanceof tree.mixin.Definition){ruleset.rules[i].frames=env.frames.slice(0)}}for(var i=0;i<ruleset.rules.length;i++){if(ruleset.rules[i]instanceof tree.mixin.Call){Array.prototype.splice.apply(ruleset.rules,[i,1].concat(ruleset.rules[i].eval(env)))}}for(var i=0,rule;i<ruleset.rules.length;i++){rule=ruleset.rules[i];if(!(rule instanceof tree.mixin.Definition)){ruleset.rules[i]=rule.eval?rule.eval(env):rule}}env.frames.shift();return ruleset},match:function(args){return!args||args.length===0},variables:function(){if(this._variables){return this._variables}else{return this._variables=this.rules.reduce(function(hash,r){if(r instanceof tree.Rule&&r.variable===true){hash[r.name]=r}return hash},{})}},variable:function(name){return this.variables()[name]},rulesets:function(){if(this._rulesets){return this._rulesets}else{return this._rulesets=this.rules.filter(function(r){return r instanceof tree.Ruleset||r instanceof tree.mixin.Definition})}},find:function(selector,self){self=self||this;var rules=[],rule,match,key=selector.toCSS();if(key in this._lookups){return this._lookups[key]}this.rulesets().forEach(function(rule){if(rule!==self){for(var j=0;j<rule.selectors.length;j++){if(match=selector.match(rule.selectors[j])){if(selector.elements.length>rule.selectors[j].elements.length){Array.prototype.push.apply(rules,rule.find(new tree.Selector(selector.elements.slice(1)),self))}else{rules.push(rule)}break}}}});return this._lookups[key]=rules},toCSS:function(context,env){var css=[],rules=[],rulesets=[],paths=[],selector,rule;if(!this.root){if(context.length===0){paths=this.selectors.map(function(s){return[s]})}else{this.joinSelectors(paths,context,this.selectors)}}for(var i=0;i<this.rules.length;i++){rule=this.rules[i];if(rule.rules||rule instanceof tree.Directive||rule instanceof tree.Media){rulesets.push(rule.toCSS(paths,env))}else if(rule instanceof tree.Comment){if(!rule.silent){if(this.root){rulesets.push(rule.toCSS(env))}else{rules.push(rule.toCSS(env))}}}else{if(rule.toCSS&&!rule.variable){rules.push(rule.toCSS(env))}else if(rule.value&&!rule.variable){rules.push(rule.value.toString())}}}rulesets=rulesets.join("");if(this.root){css.push(rules.join(env.compress?"":"\n"))}else{if(rules.length>0){selector=paths.map(function(p){return p.map(function(s){return s.toCSS(env)}).join("").trim()}).join(env.compress?",":",\n");css.push(selector,(env.compress?"{":" {\n  ")+rules.join(env.compress?"":"\n  ")+(env.compress?"}":"\n}\n"))}}css.push(rulesets);return css.join("")+(env.compress?"\n":"")},joinSelectors:function(paths,context,selectors){for(var s=0;s<selectors.length;s++){this.joinSelector(paths,context,selectors[s])}},joinSelector:function(paths,context,selector){var before=[],after=[],beforeElements=[],afterElements=[],hasParentSelector=false,el;for(var i=0;i<selector.elements.length;i++){el=selector.elements[i];if(el.combinator.value.charAt(0)==="&"){hasParentSelector=true}if(hasParentSelector)afterElements.push(el);else beforeElements.push(el)}if(!hasParentSelector){afterElements=beforeElements;beforeElements=[]}if(beforeElements.length>0){before.push(new tree.Selector(beforeElements))}if(afterElements.length>0){after.push(new tree.Selector(afterElements))}for(var c=0;c<context.length;c++){paths.push(before.concat(context[c]).concat(after))}}}})(require("../tree"));(function(tree){tree.Selector=function(elements){this.elements=elements;if(this.elements[0].combinator.value===""){this.elements[0].combinator.value=" "}};tree.Selector.prototype.match=function(other){var len=this.elements.length,olen=other.elements.length,max=Math.min(len,olen);if(len<olen){return false}else{for(var i=0;i<max;i++){if(this.elements[i].value!==other.elements[i].value){return false}}}return true};tree.Selector.prototype.eval=function(env){return new tree.Selector(this.elements.map(function(e){return e.eval(env)}))};tree.Selector.prototype.toCSS=function(env){if(this._css){return this._css}return this._css=this.elements.map(function(e){if(typeof e==="string"){return" "+e.trim()}else{return e.toCSS(env)}}).join("")}})(require("../tree"));(function(tree){tree.URL=function(val,paths){if(val.data){this.attrs=val}else{if(typeof window!=="undefined"&&!/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(val.value)&&paths.length>0){val.value=paths[0]+(val.value.charAt(0)==="/"?val.value.slice(1):val.value)}this.value=val;this.paths=paths}};tree.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(ctx){return this.attrs?this:new tree.URL(this.value.eval(ctx),this.paths)}}})(require("../tree"));(function(tree){tree.Value=function(value){this.value=value;this.is="value"};tree.Value.prototype={eval:function(env){if(this.value.length===1){return this.value[0].eval(env)}else{return new tree.Value(this.value.map(function(v){return v.eval(env)}))}},toCSS:function(env){return this.value.map(function(e){return e.toCSS(env)}).join(env.compress?",":", ")}}})(require("../tree"));(function(tree){tree.Variable=function(name,index,file){this.name=name,this.index=index,this.file=file};tree.Variable.prototype={eval:function(env){var variable,v,name=this.name;if(name.indexOf("@@")==0){name="@"+(new tree.Variable(name.slice(1))).eval(env).value}if(variable=tree.find(env.frames,function(frame){if(v=frame.variable(name)){return v.value.eval(env)}})){return variable}else{throw{type:"Name",message:"variable "+name+" is undefined",filename:this.file,index:this.index}}}}})(require("../tree"));(function(tree){tree.find=function(obj,fun){for(var i=0,r;i<obj.length;i++){if(r=fun.call(obj,obj[i])){return r}}return null};tree.jsify=function(obj){if(Array.isArray(obj.value)&&obj.value.length>1){return"["+obj.value.map(function(v){return v.toCSS(false)}).join(", ")+"]"}else{return obj.toCSS(false)}}})(require("./tree"));var isFileProtocol=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";less.env=less.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||isFileProtocol?"development":"production");less.async=false;less.poll=less.poll||(isFileProtocol?1e3:1500);less.watch=function(){return this.watchMode=true};less.unwatch=function(){return this.watchMode=false};if(less.env==="development"){less.optimization=0;if(/!watch/.test(location.hash)){less.watch()}less.watchTimer=setInterval(function(){if(less.watchMode){loadStyleSheets(function(e,root,_,sheet,env){if(root){createCSS(root.toCSS(),sheet,env.lastModified)}})}},less.poll)}else{less.optimization=3}var cache;try{cache=typeof window.localStorage==="undefined"?null:window.localStorage}catch(_){cache=null}var links=document.getElementsByTagName("link");var typePattern=/^text\/(x-)?less$/;less.sheets=[];for(var i=0;i<links.length;i++){if(links[i].rel==="stylesheet/less"||links[i].rel.match(/stylesheet/)&&links[i].type.match(typePattern)){less.sheets.push(links[i])}}less.refresh=function(reload){var startTime,endTime;startTime=endTime=new Date;loadStyleSheets(function(e,root,_,sheet,env){if(env.local){log("loading "+sheet.href+" from cache.")}else{log("parsed "+sheet.href+" successfully.");createCSS(root.toCSS(),sheet,env.lastModified)}log("css for "+sheet.href+" generated in "+(new Date-endTime)+"ms");env.remaining===0&&log("css generated in "+(new Date-startTime)+"ms");endTime=new Date},reload);loadStyles()};less.refreshStyles=loadStyles;less.refresh(less.env==="development");function loadStyles(){var styles=document.getElementsByTagName("style");for(var i=0;i<styles.length;i++){if(styles[i].type.match(typePattern)){(new less.Parser).parse(styles[i].innerHTML||"",function(e,tree){var css=tree.toCSS();var style=styles[i];style.type="text/css";if(style.styleSheet){style.styleSheet.cssText=css}else{style.innerHTML=css}})}}}function loadStyleSheets(callback,reload){for(var i=0;i<less.sheets.length;i++){loadStyleSheet(less.sheets[i],callback,reload,less.sheets.length-(i+1))}}function loadStyleSheet(sheet,callback,reload,remaining){var url=window.location.href.replace(/[#?].*$/,"");var href=sheet.href.replace(/\?.*$/,"");var css=cache&&cache.getItem(href);var timestamp=cache&&cache.getItem(href+":timestamp");var styles={css:css,timestamp:timestamp};if(!/^(https?|file):/.test(href)){if(href.charAt(0)=="/"){href=window.location.protocol+"//"+window.location.host+href}else{href=url.slice(0,url.lastIndexOf("/")+1)+href}}var filename=href.match(/([^\/]+)$/)[1];xhr(sheet.href,sheet.type,function(data,lastModified){if(!reload&&styles&&lastModified&&(new Date(lastModified)).valueOf()===(new Date(styles.timestamp)).valueOf()){createCSS(styles.css,sheet);callback(null,null,data,sheet,{local:true,remaining:remaining})}else{try{(new less.Parser({optimization:less.optimization,paths:[href.replace(/[\w\.-]+$/,"")],mime:sheet.type,filename:filename})).parse(data,function(e,root){if(e){return error(e,href)}try{callback(e,root,data,sheet,{local:false,lastModified:lastModified,remaining:remaining});removeNode(document.getElementById("less-error-message:"+extractId(href)))}catch(e){error(e,href)}})}catch(e){error(e,href)}}},function(status,url){throw new Error("Couldn't load "+url+" ("+status+")")})}function extractId(href){return href.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function createCSS(styles,sheet,lastModified){var css;var href=sheet.href?sheet.href.replace(/\?.*$/,""):"";var id="less:"+(sheet.title||extractId(href));if((css=document.getElementById(id))===null){css=document.createElement("style");css.type="text/css";css.media=sheet.media||"screen";css.id=id;document.getElementsByTagName("head")[0].appendChild(css)}if(css.styleSheet){try{css.styleSheet.cssText=styles}catch(e){throw new Error("Couldn't reassign styleSheet.cssText.")}}else{(function(node){if(css.childNodes.length>0){if(css.firstChild.nodeValue!==node.nodeValue){css.replaceChild(node,css.firstChild)}}else{css.appendChild(node)}})(document.createTextNode(styles))}if(lastModified&&cache){log("saving "+href+" to cache.");cache.setItem(href,styles);cache.setItem(href+":timestamp",lastModified)}}function xhr(url,type,callback,errback){var xhr=getXMLHttpRequest();var async=isFileProtocol?false:less.async;if(typeof xhr.overrideMimeType==="function"){xhr.overrideMimeType("text/css")}xhr.open("GET",url,async);xhr.setRequestHeader("Accept",type||"text/x-less, text/css; q=0.9, */*; q=0.5");xhr.send(null);if(isFileProtocol){if(xhr.status===0||xhr.status>=200&&xhr.status<300){callback(xhr.responseText)}else{errback(xhr.status,url)}}else if(async){xhr.onreadystatechange=function(){if(xhr.readyState==4){handleResponse(xhr,callback,errback)}}}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,url)}}}function getXMLHttpRequest(){if(window.XMLHttpRequest){return new XMLHttpRequest}else{try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(e){log("browser doesn't support AJAX.");return null}}}function removeNode(node){return node&&node.parentNode.removeChild(node)}function log(str){if(less.env=="development"&&typeof console!=="undefined"){console.log("less: "+str)}}function error(e,href){var id="less-error-message:"+extractId(href);var template='<li><label>{line}</label><pre class="{class}">{content}</pre></li>';var elem=document.createElement("div"),timer,content,error=[];var filename=e.filename||href;elem.id=id;elem.className="less-error-message";content="<h3>"+(e.message||"There is an error in your .less file")+"</h3>"+'<p>in <a href="'+filename+'">'+filename+"</a> ";var errorline=function(e,i,classname){if(e.extract[i]){error.push(template.replace(/\{line\}/,parseInt(e.line)+(i-1)).replace(/\{class\}/,classname).replace(/\{content\}/,e.extract[i]))}};if(e.stack){content+="<br/>"+e.stack.split("\n").slice(1).join("<br/>")}else if(e.extract){errorline(e,0,"");errorline(e,1,"line");errorline(e,2,"");content+="on line "+e.line+", column "+(e.column+1)+":</p>"+"<ul>"+error.join("")+"</ul>"}elem.innerHTML=content;createCSS([".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"});elem.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(";");if(less.env=="development"){timer=setInterval(function(){if(document.body){if(document.getElementById(id)){document.body.replaceChild(elem,document.getElementById(id))}else{document.body.insertBefore(elem,document.body.firstChild)}clearInterval(timer)}},10)}}})(window);define("uglify-js/parser",["require","exports"],function(require,exports){var KEYWORDS=array_to_hash(["break","case","catch","const","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","throw","try","typeof","var","void","while","with"]);var RESERVED_WORDS=array_to_hash(["abstract","boolean","byte","char","class","double","enum","export","extends","final","float","goto","implements","import","int","interface","long","native","package","private","protected","public","short","static","super","synchronized","throws","transient","volatile"]);var KEYWORDS_BEFORE_EXPRESSION=array_to_hash(["return","new","delete","throw","else","case"]);var KEYWORDS_ATOM=array_to_hash(["false","null","true","undefined"]);var OPERATOR_CHARS=array_to_hash(characters("+-*&%=<>!?|~^"));var RE_HEX_NUMBER=/^0x[0-9a-f]+$/i;var RE_OCT_NUMBER=/^0[0-7]+$/;var RE_DEC_NUMBER=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;var OPERATORS=array_to_hash(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]);var WHITESPACE_CHARS=array_to_hash(characters("  \n\r	\f​᠎             　"));var PUNC_BEFORE_EXPRESSION=array_to_hash(characters("[{(,.;:"));var PUNC_CHARS=array_to_hash(characters("[]{}(),;:"));var REGEXP_MODIFIERS=array_to_hash(characters("gmsiy"));var UNICODE={letter:new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),combining_mark:new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u08FE\\u0900-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C01-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C82\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D02\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1DC0-\\u1DE6\\u1DFC-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"),connector_punctuation:new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]"),digit:new RegExp("[\\u0030-\\u0039\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]")};function is_letter(ch){return UNICODE.letter.test(ch)}function is_digit(ch){ch=ch.charCodeAt(0);return ch>=48&&ch<=57}function is_unicode_digit(ch){return UNICODE.digit.test(ch)}function is_alphanumeric_char(ch){return is_digit(ch)||is_letter(ch)}function is_unicode_combining_mark(ch){return UNICODE.combining_mark.test(ch)}function is_unicode_connector_punctuation(ch){return UNICODE.connector_punctuation.test(ch)}function is_identifier_start(ch){return ch=="$"||ch=="_"||is_letter(ch)}function is_identifier_char(ch){return is_identifier_start(ch)||is_unicode_combining_mark(ch)||is_unicode_digit(ch)||is_unicode_connector_punctuation(ch)||ch=="‌"||ch=="‍"}function parse_js_number(num){if(RE_HEX_NUMBER.test(num)){return parseInt(num.substr(2),16)}else if(RE_OCT_NUMBER.test(num)){return parseInt(num.substr(1),8)}else if(RE_DEC_NUMBER.test(num)){return parseFloat(num)}}function JS_Parse_Error(message,line,col,pos){this.message=message;this.line=line+1;this.col=col+1;this.pos=pos+1;this.stack=(new Error).stack}JS_Parse_Error.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")"+"\n\n"+this.stack};function js_error(message,line,col,pos){throw new JS_Parse_Error(message,line,col,pos)}function is_token(token,type,val){return token.type==type&&(val==null||token.value==val)}var EX_EOF={};function tokenizer($TEXT){var S={text:$TEXT.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,""),pos:0,tokpos:0,line:0,tokline:0,col:0,tokcol:0,newline_before:false,regex_allowed:false,comments_before:[]};function peek(){return S.text.charAt(S.pos)}function next(signal_eof,in_string){var ch=S.text.charAt(S.pos++);if(signal_eof&&!ch)throw EX_EOF;if(ch=="\n"){S.newline_before=S.newline_before||!in_string;++S.line;S.col=0}else{++S.col}return ch}function eof(){return!S.peek()}function find(what,signal_eof){var pos=S.text.indexOf(what,S.pos);if(signal_eof&&pos==-1)throw EX_EOF;return pos}function start_token(){S.tokline=S.line;S.tokcol=S.col;S.tokpos=S.pos}function token(type,value,is_comment){S.regex_allowed=type=="operator"&&!HOP(UNARY_POSTFIX,value)||type=="keyword"&&HOP(KEYWORDS_BEFORE_EXPRESSION,value)||type=="punc"&&HOP(PUNC_BEFORE_EXPRESSION,value);var ret={type:type,value:value,line:S.tokline,col:S.tokcol,pos:S.tokpos,endpos:S.pos,nlb:S.newline_before};if(!is_comment){ret.comments_before=S.comments_before;S.comments_before=[];for(var i=0,len=ret.comments_before.length;i<len;i++){ret.nlb=ret.nlb||ret.comments_before[i].nlb}}S.newline_before=false;return ret}function skip_whitespace(){while(HOP(WHITESPACE_CHARS,peek()))next()}function read_while(pred){var ret="",ch=peek(),i=0;while(ch&&pred(ch,i++)){ret+=next();ch=peek()}return ret}function parse_error(err){js_error(err,S.tokline,S.tokcol,S.tokpos)}function read_num(prefix){var has_e=false,after_e=false,has_x=false,has_dot=prefix==".";var num=read_while(function(ch,i){if(ch=="x"||ch=="X"){if(has_x)return false;return has_x=true}if(!has_x&&(ch=="E"||ch=="e")){if(has_e)return false;return has_e=after_e=true}if(ch=="-"){if(after_e||i==0&&!prefix)return true;return false}if(ch=="+")return after_e;after_e=false;if(ch=="."){if(!has_dot&&!has_x&&!has_e)return has_dot=true;return false}return is_alphanumeric_char(ch)});if(prefix)num=prefix+num;var valid=parse_js_number(num);if(!isNaN(valid)){return token("num",valid)}else{parse_error("Invalid syntax: "+num)}}function read_escaped_char(in_string){var ch=next(true,in_string);switch(ch){case"n":return"\n";case"r":return"\r";case"t":return"	";case"b":return"\b";case"v":return"";case"f":return"\f";case"0":return"\0";case"x":return String.fromCharCode(hex_bytes(2));case"u":return String.fromCharCode(hex_bytes(4));case"\n":return"";default:return ch}}function hex_bytes(n){var num=0;for(;n>0;--n){var digit=parseInt(next(true),16);if(isNaN(digit))parse_error("Invalid hex-character pattern in string");num=num<<4|digit}return num}function read_string(){return with_eof_error("Unterminated string constant",function(){var quote=next(),ret="";for(;;){var ch=next(true);if(ch=="\\"){var octal_len=0,first=null;ch=read_while(function(ch){if(ch>="0"&&ch<="7"){if(!first){first=ch;return++octal_len}else if(first<="3"&&octal_len<=2)return++octal_len;else if(first>="4"&&octal_len<=1)return++octal_len}return false});if(octal_len>0)ch=String.fromCharCode(parseInt(ch,8));else ch=read_escaped_char(true)}else if(ch==quote)break;ret+=ch}return token("string",ret)})}function read_line_comment(){next();var i=find("\n"),ret;if(i==-1){ret=S.text.substr(S.pos);S.pos=S.text.length}else{ret=S.text.substring(S.pos,i);S.pos=i}return token("comment1",ret,true)}function read_multiline_comment(){next();return with_eof_error("Unterminated multiline comment",function(){var i=find("*/",true),text=S.text.substring(S.pos,i);S.pos=i+2;S.line+=text.split("\n").length-1;S.newline_before=S.newline_before||text.indexOf("\n")>=0;if(/^@cc_on/i.test(text)){warn("WARNING: at line "+S.line);warn('*** Found "conditional comment": '+text);warn("*** UglifyJS DISCARDS ALL COMMENTS.  This means your code might no longer work properly in Internet Explorer.")}return token("comment2",text,true)})}function read_name(){var backslash=false,name="",ch,escaped=false,hex;while((ch=peek())!=null){if(!backslash){if(ch=="\\")escaped=backslash=true,next();else if(is_identifier_char(ch))name+=next();else break}else{if(ch!="u")parse_error("Expecting UnicodeEscapeSequence -- uXXXX");ch=read_escaped_char();if(!is_identifier_char(ch))parse_error("Unicode char: "+ch.charCodeAt(0)+" is not valid in identifier");name+=ch;backslash=false}}if(HOP(KEYWORDS,name)&&escaped){hex=name.charCodeAt(0).toString(16).toUpperCase();name="\\u"+"0000".substr(hex.length)+hex+name.slice(1)}return name}function read_regexp(regexp){return with_eof_error("Unterminated regular expression",function(){var prev_backslash=false,ch,in_class=false;while(ch=next(true))if(prev_backslash){regexp+="\\"+ch;prev_backslash=false}else if(ch=="["){in_class=true;regexp+=ch}else if(ch=="]"&&in_class){in_class=false;regexp+=ch}else if(ch=="/"&&!in_class){break}else if(ch=="\\"){prev_backslash=true}else{regexp+=ch}var mods=read_name();return token("regexp",[regexp,mods])})}function read_operator(prefix){function grow(op){if(!peek())return op;var bigger=op+peek();if(HOP(OPERATORS,bigger)){next();return grow(bigger)}else{return op}}return token("operator",grow(prefix||next()))}function handle_slash(){next();var regex_allowed=S.regex_allowed;switch(peek()){case"/":S.comments_before.push(read_line_comment());S.regex_allowed=regex_allowed;return next_token();case"*":S.comments_before.push(read_multiline_comment());S.regex_allowed=regex_allowed;return next_token()}return S.regex_allowed?read_regexp(""):read_operator("/")}function handle_dot(){next();return is_digit(peek())?read_num("."):token("punc",".")}function read_word(){var word=read_name();return!HOP(KEYWORDS,word)?token("name",word):HOP(OPERATORS,word)?token("operator",word):HOP(KEYWORDS_ATOM,word)?token("atom",word):token("keyword",word)}function with_eof_error(eof_error,cont){try{return cont()}catch(ex){if(ex===EX_EOF)parse_error(eof_error);else throw ex}}function next_token(force_regexp){if(force_regexp!=null)return read_regexp(force_regexp);skip_whitespace();start_token();var ch=peek();if(!ch)return token("eof");if(is_digit(ch))return read_num();if(ch=='"'||ch=="'")return read_string();if(HOP(PUNC_CHARS,ch))return token("punc",next());if(ch==".")return handle_dot();if(ch=="/")return handle_slash();if(HOP(OPERATOR_CHARS,ch))return read_operator();if(ch=="\\"||is_identifier_start(ch))return read_word();parse_error("Unexpected character '"+ch+"'")}next_token.context=function(nc){if(nc)S=nc;return S};return next_token}var UNARY_PREFIX=array_to_hash(["typeof","void","delete","--","++","!","~","-","+"]);var UNARY_POSTFIX=array_to_hash(["--","++"]);var ASSIGNMENT=function(a,ret,i){while(i<a.length){ret[a[i]]=a[i].substr(0,a[i].length-1);i++}return ret}(["+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&="],{"=":true},0);var PRECEDENCE=function(a,ret){for(var i=0,n=1;i<a.length;++i,++n){var b=a[i];for(var j=0;j<b.length;++j){ret[b[j]]=n}}return ret}([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{});var STATEMENTS_WITH_LABELS=array_to_hash(["for","do","while","switch"]);var ATOMIC_START_TOKEN=array_to_hash(["atom","num","string","regexp","name"]);function NodeWithToken(str,start,end){this.name=str;this.start=start;this.end=end}NodeWithToken.prototype.toString=function(){return this.name};function parse($TEXT,exigent_mode,embed_tokens){var S={input:typeof $TEXT=="string"?tokenizer($TEXT,true):$TEXT,token:null,prev:null,peeked:null,in_function:0,in_directives:true,in_loop:0,labels:[]};S.token=next();function is(type,value){return is_token(S.token,type,value)}function peek(){return S.peeked||(S.peeked=S.input())}function next(){S.prev=S.token;if(S.peeked){S.token=S.peeked;S.peeked=null}else{S.token=S.input()}S.in_directives=S.in_directives&&(S.token.type=="string"||is("punc",";"));return S.token}function prev(){return S.prev}function croak(msg,line,col,pos){var ctx=S.input.context();js_error(msg,line!=null?line:ctx.tokline,col!=null?col:ctx.tokcol,pos!=null?pos:ctx.tokpos)}function token_error(token,msg){croak(msg,token.line,token.col)}function unexpected(token){if(token==null)token=S.token;token_error(token,"Unexpected token: "+token.type+" ("+token.value+")")}function expect_token(type,val){if(is(type,val)){return next()}token_error(S.token,"Unexpected token "+S.token.type+", expected "+type)}function expect(punc){return expect_token("punc",punc)}function can_insert_semicolon(){return!exigent_mode&&(S.token.nlb||is("eof")||is("punc","}"))}function semicolon(){if(is("punc",";"))next();else if(!can_insert_semicolon())unexpected()}function as(){return slice(arguments)}function parenthesised(){expect("(");var ex=expression();expect(")");return ex}function add_tokens(str,start,end){return str instanceof NodeWithToken?str:new NodeWithToken(str,start,end)}function maybe_embed_tokens(parser){if(embed_tokens)return function(){var start=S.token;var ast=parser.apply(this,arguments);ast[0]=add_tokens(ast[0],start,prev());return ast};else return parser}var statement=maybe_embed_tokens(function(){if(is("operator","/")||is("operator","/=")){S.peeked=null;S.token=S.input(S.token.value.substr(1))}switch(S.token.type){case"string":var dir=S.in_directives,stat=simple_statement();if(dir&&stat[1][0]=="string"&&!is("punc",","))return as("directive",stat[1][1]);return stat;case"num":case"regexp":case"operator":case"atom":return simple_statement();case"name":return is_token(peek(),"punc",":")?labeled_statement(prog1(S.token.value,next,next)):simple_statement();case"punc":switch(S.token.value){case"{":return as("block",block_());case"[":case"(":return simple_statement();case";":next();return as("block");default:unexpected()};case"keyword":switch(prog1(S.token.value,next)){case"break":return break_cont("break");case"continue":return break_cont("continue");case"debugger":semicolon();return as("debugger");case"do":return function(body){expect_token("keyword","while");return as("do",prog1(parenthesised,semicolon),body)}(in_loop(statement));case"for":return for_();case"function":return function_(true);case"if":return if_();case"return":if(S.in_function==0)croak("'return' outside of function");return as("return",is("punc",";")?(next(),null):can_insert_semicolon()?null:prog1(expression,semicolon));case"switch":return as("switch",parenthesised(),switch_block_());case"throw":if(S.token.nlb)croak("Illegal newline after 'throw'");return as("throw",prog1(expression,semicolon));case"try":return try_();case"var":return prog1(var_,semicolon);case"const":return prog1(const_,semicolon);case"while":return as("while",parenthesised(),in_loop(statement));case"with":return as("with",parenthesised(),statement());default:unexpected()}}});function labeled_statement(label){S.labels.push(label);var start=S.token,stat=statement();if(exigent_mode&&!HOP(STATEMENTS_WITH_LABELS,stat[0]))unexpected(start);S.labels.pop();return as("label",label,stat)}function simple_statement(){return as("stat",prog1(expression,semicolon))}function break_cont(type){var name;if(!can_insert_semicolon()){name=is("name")?S.token.value:null}if(name!=null){next();if(!member(name,S.labels))croak("Label "+name+" without matching loop or statement")}else if(S.in_loop==0)croak(type+" not inside a loop or switch");semicolon();return as(type,name)}function for_(){expect("(");var init=null;if(!is("punc",";")){init=is("keyword","var")?(next(),var_(true)):expression(true,true);if(is("operator","in")){if(init[0]=="var"&&init[1].length>1)croak("Only one variable declaration allowed in for..in loop");return for_in(init)}}return regular_for(init)}function regular_for(init){expect(";");var test=is("punc",";")?null:expression();expect(";");var step=is("punc",")")?null:expression();expect(")");return as("for",init,test,step,in_loop(statement))}function for_in(init){var lhs=init[0]=="var"?as("name",init[1][0]):init;next();var obj=expression();expect(")");return as("for-in",init,lhs,obj,in_loop(statement))}var function_=function(in_statement){var name=is("name")?prog1(S.token.value,next):null;if(in_statement&&!name)unexpected();expect("(");return as(in_statement?"defun":"function",name,function(first,a){while(!is("punc",")")){if(first)first=false;else expect(",");if(!is("name"))unexpected();a.push(S.token.value);next()}next();return a}(true,[]),function(){++S.in_function;var loop=S.in_loop;S.in_directives=true;S.in_loop=0;var a=block_();--S.in_function;S.in_loop=loop;return a}())};function if_(){var cond=parenthesised(),body=statement(),belse;if(is("keyword","else")){next();belse=statement()}return as("if",cond,body,belse)}function block_(){expect("{");var a=[];while(!is("punc","}")){if(is("eof"))unexpected();a.push(statement())}next();return a}var switch_block_=curry(in_loop,function(){expect("{");var a=[],cur=null;while(!is("punc","}")){if(is("eof"))unexpected();if(is("keyword","case")){next();cur=[];a.push([expression(),cur]);expect(":")}else if(is("keyword","default")){next();expect(":");cur=[];a.push([null,cur])}else{if(!cur)unexpected();cur.push(statement())}}next();return a});function try_(){var body=block_(),bcatch,bfinally;if(is("keyword","catch")){next();expect("(");if(!is("name"))croak("Name expected");var name=S.token.value;next();expect(")");bcatch=[name,block_()]}if(is("keyword","finally")){next();bfinally=block_()}if(!bcatch&&!bfinally)croak("Missing catch/finally blocks");return as("try",body,bcatch,bfinally)}function vardefs(no_in){var a=[];for(;;){if(!is("name"))unexpected();var name=S.token.value;next();if(is("operator","=")){next();a.push([name,expression(false,no_in)])}else{a.push([name])}if(!is("punc",","))break;next()}return a}function var_(no_in){return as("var",vardefs(no_in))}function const_(){return as("const",vardefs())}function new_(){var newexp=expr_atom(false),args;if(is("punc","(")){next();args=expr_list(")")}else{args=[]}return subscripts(as("new",newexp,args),true)}var expr_atom=maybe_embed_tokens(function(allow_calls){if(is("operator","new")){next();return new_()}if(is("punc")){switch(S.token.value){case"(":next();return subscripts(prog1(expression,curry(expect,")")),allow_calls);case"[":next();return subscripts(array_(),allow_calls);case"{":next();return subscripts(object_(),allow_calls)}unexpected()}if(is("keyword","function")){next();return subscripts(function_(false),allow_calls)}if(HOP(ATOMIC_START_TOKEN,S.token.type)){var atom=S.token.type=="regexp"?as("regexp",S.token.value[0],S.token.value[1]):as(S.token.type,S.token.value);return subscripts(prog1(atom,next),allow_calls)}unexpected()});function expr_list(closing,allow_trailing_comma,allow_empty){var first=true,a=[];while(!is("punc",closing)){if(first)first=false;else expect(",");if(allow_trailing_comma&&is("punc",closing))break;if(is("punc",",")&&allow_empty){a.push(["atom","undefined"])}else{a.push(expression(false))}}next();return a}function array_(){return as("array",expr_list("]",!exigent_mode,true))}function object_(){var first=true,a=[];while(!is("punc","}")){if(first)first=false;else expect(",");if(!exigent_mode&&is("punc","}"))break;var type=S.token.type;var name=as_property_name();if(type=="name"&&(name=="get"||name=="set")&&!is("punc",":")){a.push([as_name(),function_(false),name])}else{expect(":");a.push([name,expression(false)])}}next();return as("object",a)}function as_property_name(){switch(S.token.type){case"num":case"string":return prog1(S.token.value,next)}return as_name()}function as_name(){switch(S.token.type){case"name":case"operator":case"keyword":case"atom":return prog1(S.token.value,next);default:unexpected()}}function subscripts(expr,allow_calls){if(is("punc",".")){next();return subscripts(as("dot",expr,as_name()),allow_calls)}if(is("punc","[")){next();return subscripts(as("sub",expr,prog1(expression,curry(expect,"]"))),allow_calls)}if(allow_calls&&is("punc","(")){next();return subscripts(as("call",expr,expr_list(")")),true)}return expr}function maybe_unary(allow_calls){if(is("operator")&&HOP(UNARY_PREFIX,S.token.value)){return make_unary("unary-prefix",prog1(S.token.value,next),maybe_unary(allow_calls))}var val=expr_atom(allow_calls);while(is("operator")&&HOP(UNARY_POSTFIX,S.token.value)&&!S.token.nlb){val=make_unary("unary-postfix",S.token.value,val);next()}return val}function make_unary(tag,op,expr){if((op=="++"||op=="--")&&!is_assignable(expr))croak("Invalid use of "+op+" operator");return as(tag,op,expr)}function expr_op(left,min_prec,no_in){var op=is("operator")?S.token.value:null;if(op&&op=="in"&&no_in)op=null;var prec=op!=null?PRECEDENCE[op]:null;if(prec!=null&&prec>min_prec){next();var right=expr_op(maybe_unary(true),prec,no_in);return expr_op(as("binary",op,left,right),min_prec,no_in)}return left}function expr_ops(no_in){return expr_op(maybe_unary(true),0,no_in)}function maybe_conditional(no_in){var expr=expr_ops(no_in);if(is("operator","?")){next();var yes=expression(false);expect(":");return as("conditional",expr,yes,expression(false,no_in))}return expr}function is_assignable(expr){if(!exigent_mode)return true;switch(expr[0]+""){case"dot":case"sub":case"new":case"call":return true;case"name":return expr[1]!="this"}}function maybe_assign(no_in){var left=maybe_conditional(no_in),val=S.token.value;if(is("operator")&&HOP(ASSIGNMENT,val)){if(is_assignable(left)){next();return as("assign",ASSIGNMENT[val],left,maybe_assign(no_in))}croak("Invalid assignment")}return left}var expression=maybe_embed_tokens(function(commas,no_in){if(arguments.length==0)commas=true;var expr=maybe_assign(no_in);if(commas&&is("punc",",")){next();return as("seq",expr,expression(true,no_in))}return expr});function in_loop(cont){try{++S.in_loop;return cont()}finally{--S.in_loop}}return as("toplevel",function(a){while(!is("eof"))a.push(statement());return a}([]))}function curry(f){var args=slice(arguments,1);return function(){return f.apply(this,args.concat(slice(arguments)))}}function prog1(ret){if(ret instanceof Function)ret=ret();for(var i=1,n=arguments.length;--n>0;++i)arguments[i]();return ret}function array_to_hash(a){var ret={};for(var i=0;i<a.length;++i)ret[a[i]]=true;return ret}function slice(a,start){return Array.prototype.slice.call(a,start||0)}function characters(str){return str.split("")}function member(name,array){for(var i=array.length;--i>=0;)if(array[i]==name)return true;return false}function HOP(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var warn=function(){};exports.tokenizer=tokenizer;exports.parse=parse;exports.slice=slice;exports.curry=curry;exports.member=member;exports.array_to_hash=array_to_hash;exports.PRECEDENCE=PRECEDENCE;exports.KEYWORDS_ATOM=KEYWORDS_ATOM;exports.RESERVED_WORDS=RESERVED_WORDS;exports.KEYWORDS=KEYWORDS;exports.ATOMIC_START_TOKEN=ATOMIC_START_TOKEN;exports.OPERATORS=OPERATORS;exports.is_alphanumeric_char=is_alphanumeric_char;exports.set_logger=function(logger){warn=logger}});define("uglify-js/uglify",["require","exports"],function(require,exports){var jsp=require("uglify-js/parser"),slice=jsp.slice,member=jsp.member,PRECEDENCE=jsp.PRECEDENCE,OPERATORS=jsp.OPERATORS;function ast_walker(){function _vardefs(defs){return[this[0],MAP(defs,function(def){var a=[def[0]];if(def.length>1)a[1]=walk(def[1]);return a})]}function _block(statements){var out=[this[0]];if(statements!=null)out.push(MAP(statements,walk));return out}var walkers={string:function(str){return[this[0],str]},num:function(num){return[this[0],num]},name:function(name){return[this[0],name]},toplevel:function(statements){return[this[0],MAP(statements,walk)]},block:_block,splice:_block,"var":_vardefs,"const":_vardefs,"try":function(t,c,f){return[this[0],MAP(t,walk),c!=null?[c[0],MAP(c[1],walk)]:null,f!=null?MAP(f,walk):null]},"throw":function(expr){return[this[0],walk(expr)]},"new":function(ctor,args){return[this[0],walk(ctor),MAP(args,walk)]},"switch":function(expr,body){return[this[0],walk(expr),MAP(body,function(branch){return[branch[0]?walk(branch[0]):null,MAP(branch[1],walk)]})]},"break":function(label){return[this[0],label]},"continue":function(label){return[this[0],label]},conditional:function(cond,t,e){return[this[0],walk(cond),walk(t),walk(e)]},assign:function(op,lvalue,rvalue){return[this[0],op,walk(lvalue),walk(rvalue)]},dot:function(expr){return[this[0],walk(expr)].concat(slice(arguments,1))},call:function(expr,args){return[this[0],walk(expr),MAP(args,walk)]},"function":function(name,args,body){return[this[0],name,args.slice(),MAP(body,walk)]},"debugger":function(){return[this[0]]},defun:function(name,args,body){return[this[0],name,args.slice(),MAP(body,walk)]},"if":function(conditional,t,e){return[this[0],walk(conditional),walk(t),walk(e)]},"for":function(init,cond,step,block){return[this[0],walk(init),walk(cond),walk(step),walk(block)]},"for-in":function(vvar,key,hash,block){return[this[0],walk(vvar),walk(key),walk(hash),walk(block)]},"while":function(cond,block){return[this[0],walk(cond),walk(block)]},"do":function(cond,block){return[this[0],walk(cond),walk(block)]},"return":function(expr){return[this[0],walk(expr)]},binary:function(op,left,right){return[this[0],op,walk(left),walk(right)]},"unary-prefix":function(op,expr){return[this[0],op,walk(expr)]},"unary-postfix":function(op,expr){return[this[0],op,walk(expr)]},sub:function(expr,subscript){return[this[0],walk(expr),walk(subscript)]},object:function(props){return[this[0],MAP(props,function(p){return p.length==2?[p[0],walk(p[1])]:[p[0],walk(p[1]),p[2]]})]},regexp:function(rx,mods){return[this[0],rx,mods]},array:function(elements){return[this[0],MAP(elements,walk)]},stat:function(stat){return[this[0],walk(stat)]},seq:function(){return[this[0]].concat(MAP(slice(arguments),walk))},label:function(name,block){return[this[0],name,walk(block)]},"with":function(expr,block){return[this[0],walk(expr),walk(block)]},atom:function(name){return[this[0],name]},directive:function(dir){return[this[0],dir]}};var user={};var stack=[];function walk(ast){if(ast==null)return null;try{stack.push(ast);var type=ast[0];var gen=user[type];if(gen){var ret=gen.apply(ast,ast.slice(1));if(ret!=null)return ret}gen=walkers[type];return gen.apply(ast,ast.slice(1))}finally{stack.pop()}}function dive(ast){if(ast==null)return null;try{stack.push(ast);return walkers[ast[0]].apply(ast,ast.slice(1))}finally{stack.pop()}}function with_walkers(walkers,cont){var save={},i;for(i in walkers)if(HOP(walkers,i)){save[i]=user[i];user[i]=walkers[i]}var ret=cont();for(i in save)if(HOP(save,i)){if(!save[i])delete user[i];else user[i]=save[i]}return ret}return{walk:walk,dive:dive,with_walkers:with_walkers,parent:function(){return stack[stack.length-2]},stack:function(){return stack}}}function Scope(parent){this.names={};this.mangled={};this.rev_mangled={};this.cname=-1;this.refs={};this.uses_with=false;this.uses_eval=false;this.directives=[];this.parent=parent;this.children=[];if(parent){this.level=parent.level+1;parent.children.push(this)}else{this.level=0}}function base54_digits(){if(typeof DIGITS_OVERRIDE_FOR_TESTING!="undefined")return DIGITS_OVERRIDE_FOR_TESTING;else return"etnrisouaflchpdvmgybwESxTNCkLAOM_DPHBjFIqRUzWXV$JKQGYZ0516372984"}var base54=function(){var DIGITS=base54_digits();return function(num){var ret="",base=54;do{ret+=DIGITS.charAt(num%base);num=Math.floor(num/base);base=64}while(num>0);return ret}}();Scope.prototype={has:function(name){for(var s=this;s;s=s.parent)if(HOP(s.names,name))return s},has_mangled:function(mname){for(var s=this;s;s=s.parent)if(HOP(s.rev_mangled,mname))return s},toJSON:function(){return{names:this.names,uses_eval:this.uses_eval,uses_with:this.uses_with}},next_mangled:function(){for(;;){var m=base54(++this.cname),prior;prior=this.has_mangled(m);if(prior&&this.refs[prior.rev_mangled[m]]===prior)continue;prior=this.has(m);if(prior&&prior!==this&&this.refs[m]===prior&&!prior.has_mangled(m))continue;if(HOP(this.refs,m)&&this.refs[m]==null)continue;if(!is_identifier(m))continue;return m}},set_mangle:function(name,m){this.rev_mangled[m]=name;return this.mangled[name]=m},get_mangled:function(name,newMangle){if(this.uses_eval||this.uses_with)return name;var s=this.has(name);if(!s)return name;if(HOP(s.mangled,name))return s.mangled[name];if(!newMangle)return name;return s.set_mangle(name,s.next_mangled())},references:function(name){return name&&!this.parent||this.uses_with||this.uses_eval||this.refs[name]},define:function(name,type){if(name!=null){if(type=="var"||!HOP(this.names,name))this.names[name]=type||"var";return name}},active:function(dir){return member(dir,this.directives)||this.parent&&this.parent.active(dir)}};function ast_add_scope(ast){var current_scope=null;var w=ast_walker(),walk=w.walk;var having_eval=[];function with_new_scope(cont){current_scope=new Scope(current_scope);current_scope.labels=new Scope;var ret=current_scope.body=cont();ret.scope=current_scope;current_scope=current_scope.parent;return ret}function define(name,type){return current_scope.define(name,type)}function reference(name){current_scope.refs[name]=true}function _lambda(name,args,body){var is_defun=this[0]=="defun";return[this[0],is_defun?define(name,"defun"):name,args,with_new_scope(function(){if(!is_defun)define(name,"lambda");MAP(args,function(name){define(name,"arg")});return MAP(body,walk)})]}function _vardefs(type){return function(defs){MAP(defs,function(d){define(d[0],type);if(d[1])reference(d[0])})}}function _breacont(label){if(label)current_scope.labels.refs[label]=true}return with_new_scope(function(){var ret=w.with_walkers({"function":_lambda,defun:_lambda,label:function(name,stat){current_scope.labels.define(name)},"break":_breacont,"continue":_breacont,"with":function(expr,block){for(var s=current_scope;s;s=s.parent)s.uses_with=true},"var":_vardefs("var"),"const":_vardefs("const"),"try":function(t,c,f){if(c!=null)return[this[0],MAP(t,walk),[define(c[0],"catch"),MAP(c[1],walk)],f!=null?MAP(f,walk):null]},name:function(name){if(name=="eval")having_eval.push(current_scope);reference(name)}},function(){return walk(ast)});MAP(having_eval,function(scope){if(!scope.has("eval"))while(scope){scope.uses_eval=true;scope=scope.parent}});function fixrefs(scope,i){for(i=scope.children.length;--i>=0;)fixrefs(scope.children[i]);for(i in scope.refs)if(HOP(scope.refs,i)){for(var origin=scope.has(i),s=scope;s;s=s.parent){s.refs[i]=origin;if(s===origin)break}}}fixrefs(current_scope);return ret})}function ast_mangle(ast,options){var w=ast_walker(),walk=w.walk,scope;options=defaults(options,{mangle:true,toplevel:false,defines:null,except:null,no_functions:false});function get_mangled(name,newMangle){if(!options.mangle)return name;if(!options.toplevel&&!scope.parent)return name;if(options.except&&member(name,options.except))return name;if(options.no_functions&&HOP(scope.names,name)&&(scope.names[name]=="defun"||scope.names[name]=="lambda"))return name;return scope.get_mangled(name,newMangle)}function get_define(name){if(options.defines){if(!scope.has(name)){if(HOP(options.defines,name)){return options.defines[name]}}return null}}function _lambda(name,args,body){if(!options.no_functions&&options.mangle){var is_defun=this[0]=="defun",extra;if(name){if(is_defun)name=get_mangled(name);else if(body.scope.references(name)){extra={};if(!(scope.uses_eval||scope.uses_with))name=extra[name]=scope.next_mangled();else extra[name]=name}else name=null}}body=with_scope(body.scope,function(){args=MAP(args,function(name){return get_mangled(name)});return MAP(body,walk)},extra);return[this[0],name,args,body]}function with_scope(s,cont,extra){var _scope=scope;scope=s;if(extra)for(var i in extra)if(HOP(extra,i)){s.set_mangle(i,extra[i])}for(var i in s.names)if(HOP(s.names,i)){get_mangled(i,true)}var ret=cont();ret.scope=s;scope=_scope;return ret}function _vardefs(defs){return[this[0],MAP(defs,function(d){return[get_mangled(d[0]),walk(d[1])]})]}function _breacont(label){if(label)return[this[0],scope.labels.get_mangled(label)]}return w.with_walkers({"function":_lambda,defun:function(){var ast=_lambda.apply(this,arguments);switch(w.parent()[0]){case"toplevel":case"function":case"defun":return MAP.at_top(ast)}return ast},label:function(label,stat){if(scope.labels.refs[label])return[this[0],scope.labels.get_mangled(label,true),walk(stat)];return walk(stat)},"break":_breacont,"continue":_breacont,"var":_vardefs,"const":_vardefs,name:function(name){return get_define(name)||[this[0],get_mangled(name)]},"try":function(t,c,f){return[this[0],MAP(t,walk),c!=null?[get_mangled(c[0]),MAP(c[1],walk)]:null,f!=null?MAP(f,walk):null]},toplevel:function(body){var self=this;return with_scope(self.scope,function(){return[self[0],MAP(body,walk)]})},directive:function(){return MAP.at_top(this)}},function(){return walk(ast_add_scope(ast))})}var warn=function(){};function best_of(ast1,ast2){return gen_code(ast1).length>gen_code(ast2[0]=="stat"?ast2[1]:ast2).length?ast2:ast1}function last_stat(b){if(b[0]=="block"&&b[1]&&b[1].length>0)return b[1][b[1].length-1];return b}function aborts(t){if(t)switch(last_stat(t)[0]){case"return":case"break":case"continue":case"throw":return true}}function boolean_expr(expr){return expr[0]=="unary-prefix"&&member(expr[1],["!","delete"])||expr[0]=="binary"&&member(expr[1],["in","instanceof","==","!=","===","!==","<","<=",">=",">"])||expr[0]=="binary"&&member(expr[1],["&&","||"])&&boolean_expr(expr[2])&&boolean_expr(expr[3])||expr[0]=="conditional"&&boolean_expr(expr[2])&&boolean_expr(expr[3])||expr[0]=="assign"&&expr[1]===true&&boolean_expr(expr[3])||expr[0]=="seq"&&boolean_expr(expr[expr.length-1])}function empty(b){return!b||b[0]=="block"&&(!b[1]||b[1].length==0)}function is_string(node){return node[0]=="string"||node[0]=="unary-prefix"&&node[1]=="typeof"||node[0]=="binary"&&node[1]=="+"&&(is_string(node[2])||is_string(node[3]))}var when_constant=function(){var $NOT_CONSTANT={};function evaluate(expr){switch(expr[0]){case"string":case"num":return expr[1];case"name":case"atom":switch(expr[1]){case"true":return true;case"false":return false;case"null":return null}break;case"unary-prefix":switch(expr[1]){case"!":return!evaluate(expr[2]);case"typeof":return typeof evaluate(expr[2]);case"~":return~evaluate(expr[2]);case"-":return-evaluate(expr[2]);case"+":return+evaluate(expr[2])}break;case"binary":var left=expr[2],right=expr[3];switch(expr[1]){case"&&":return evaluate(left)&&evaluate(right);case"||":return evaluate(left)||evaluate(right);case"|":return evaluate(left)|evaluate(right);case"&":return evaluate(left)&evaluate(right);case"^":return evaluate(left)^evaluate(right);case"+":return evaluate(left)+evaluate(right);case"*":return evaluate(left)*evaluate(right);case"/":return evaluate(left)/evaluate(right);case"%":return evaluate(left)%evaluate(right);case"-":return evaluate(left)-evaluate(right);case"<<":return evaluate(left)<<evaluate(right);case">>":return evaluate(left)>>evaluate(right);case">>>":return evaluate(left)>>>evaluate(right);case"==":return evaluate(left)==evaluate(right);case"===":return evaluate(left)===evaluate(right);case"!=":return evaluate(left)!=evaluate(right);case"!==":return evaluate(left)!==evaluate(right);case"<":return evaluate(left)<evaluate(right);case"<=":return evaluate(left)<=evaluate(right);case">":return evaluate(left)>evaluate(right);case">=":return evaluate(left)>=evaluate(right);case"in":return evaluate(left)in evaluate(right);case"instanceof":return evaluate(left)instanceof evaluate(right)}}throw $NOT_CONSTANT}return function(expr,yes,no){try{var val=evaluate(expr),ast;switch(typeof val){case"string":ast=["string",val];break;case"number":ast=["num",val];break;case"boolean":ast=["name",String(val)];break;default:if(val===null){ast=["atom","null"];break}throw new Error("Can't handle constant of type: "+typeof val)}return yes.call(expr,ast,val)}catch(ex){if(ex===$NOT_CONSTANT){if(expr[0]=="binary"&&(expr[1]=="==="||expr[1]=="!==")&&(is_string(expr[2])&&is_string(expr[3])||boolean_expr(expr[2])&&boolean_expr(expr[3]))){expr[1]=expr[1].substr(0,2)}else if(no&&expr[0]=="binary"&&(expr[1]=="||"||expr[1]=="&&")){try{var lval=evaluate(expr[2]);expr=expr[1]=="&&"&&(lval?expr[3]:lval)||expr[1]=="||"&&(lval?lval:expr[3])||expr}catch(ex2){}}return no?no.call(expr,expr):null}else throw ex}}}();function warn_unreachable(ast){if(!empty(ast))warn("Dropping unreachable code: "+gen_code(ast,true))}function prepare_ifs(ast){var w=ast_walker(),walk=w.walk;function redo_if(statements){statements=MAP(statements,walk);for(var i=0;i<statements.length;++i){var fi=statements[i];if(fi[0]!="if")continue;if(fi[3]&&walk(fi[3]))continue;var t=walk(fi[2]);if(!aborts(t))continue;var conditional=walk(fi[1]);var e_body=redo_if(statements.slice(i+1));var e=e_body.length==1?e_body[0]:["block",e_body];return statements.slice(0,i).concat([[fi[0],conditional,t,e]])}return statements}function redo_if_lambda(name,args,body){body=redo_if(body);return[this[0],name,args,body]}function redo_if_block(statements){return[this[0],statements!=null?redo_if(statements):null]}return w.with_walkers({defun:redo_if_lambda,"function":redo_if_lambda,block:redo_if_block,splice:redo_if_block,toplevel:function(statements){return[this[0],redo_if(statements)]},"try":function(t,c,f){return[this[0],redo_if(t),c!=null?[c[0],redo_if(c[1])]:null,f!=null?redo_if(f):null]}},function(){return walk(ast)})}function for_side_effects(ast,handler){var w=ast_walker(),walk=w.walk;var $stop={},$restart={};function stop(){throw $stop}function restart(){throw $restart}function found(){return handler.call(this,this,w,stop,restart)}function unary(op){if(op=="++"||op=="--")return found.apply(this,arguments)}return w.with_walkers({"try":found,"throw":found,"return":found,"new":found,"switch":found,"break":found,"continue":found,assign:found,call:found,"if":found,"for":found,"for-in":found,"while":found,"do":found,"return":found,"unary-prefix":unary,"unary-postfix":unary,defun:found},function(){while(true)try{walk(ast);break}catch(ex){if(ex===$stop)break;if(ex===$restart)continue;throw ex}})}function ast_lift_variables(ast){var w=ast_walker(),walk=w.walk,scope;function do_body(body,env){var _scope=scope;scope=env;body=MAP(body,walk);var hash={},names=MAP(env.names,function(type,name){if(type!="var")return MAP.skip;if(!env.references(name))return MAP.skip;hash[name]=true;return[name]});if(names.length>0){for_side_effects(["block",body],function(ast,walker,stop,restart){if(ast[0]=="assign"&&ast[1]===true&&ast[2][0]=="name"&&HOP(hash,ast[2][1])){for(var i=names.length;--i>=0;){if(names[i][0]==ast[2][1]){if(names[i][1])stop();names[i][1]=ast[3];names.push(names.splice(i,1)[0]);break}}var p=walker.parent();if(p[0]=="seq"){var a=p[2];a.unshift(0,p.length);p.splice.apply(p,a)}else if(p[0]=="stat"){p.splice(0,p.length,"block")}else{stop()}restart()}stop()});body.unshift(["var",names])}scope=_scope;return body}function _vardefs(defs){var ret=null;for(var i=defs.length;--i>=0;){var d=defs[i];if(!d[1])continue;d=["assign",true,["name",d[0]],d[1]];if(ret==null)ret=d;else ret=["seq",d,ret]}if(ret==null){if(w.parent()[0]=="for-in")return["name",defs[0][0]];return MAP.skip}return["stat",ret]}function _toplevel(body){return[this[0],do_body(body,this.scope)]}return w.with_walkers({"function":function(name,args,body){for(var i=args.length;--i>=0&&!body.scope.references(args[i]);)args.pop();if(!body.scope.references(name))name=null;return[this[0],name,args,do_body(body,body.scope)]},defun:function(name,args,body){if(!scope.references(name))return MAP.skip;for(var i=args.length;--i>=0&&!body.scope.references(args[i]);)args.pop();return[this[0],name,args,do_body(body,body.scope)]},"var":_vardefs,toplevel:_toplevel},function(){return walk(ast_add_scope(ast))})}function ast_squeeze(ast,options){options=defaults(options,{make_seqs:true,dead_code:true,no_warnings:false,keep_comps:true,unsafe:false});var w=ast_walker(),walk=w.walk,scope;function negate(c){var not_c=["unary-prefix","!",c];switch(c[0]){case"unary-prefix":return c[1]=="!"&&boolean_expr(c[2])?c[2]:not_c;case"seq":c=slice(c);c[c.length-1]=negate(c[c.length-1]);return c;case"conditional":return best_of(not_c,["conditional",c[1],negate(c[2]),negate(c[3])]);case"binary":var op=c[1],left=c[2],right=c[3];if(!options.keep_comps)switch(op){case"<=":return["binary",">",left,right];case"<":return["binary",">=",left,right];case">=":return["binary","<",left,right];case">":return["binary","<=",left,right]}switch(op){case"==":return["binary","!=",left,right];case"!=":return["binary","==",left,right];case"===":return["binary","!==",left,right];case"!==":return["binary","===",left,right];case"&&":return best_of(not_c,["binary","||",negate(left),negate(right)]);case"||":return best_of(not_c,["binary","&&",negate(left),negate(right)])}break}return not_c}function make_conditional(c,t,e){var make_real_conditional=function(){if(c[0]=="unary-prefix"&&c[1]=="!"){return e?["conditional",c[2],e,t]:["binary","||",c[2],t]}else{return e?best_of(["conditional",c,t,e],["conditional",negate(c),e,t]):["binary","&&",c,t]}};return when_constant(c,function(ast,val){warn_unreachable(val?e:t);return val?t:e},make_real_conditional)}function rmblock(block){if(block!=null&&block[0]=="block"&&block[1]){if(block[1].length==1)block=block[1][0];else if(block[1].length==0)block=["block"]}return block}function _lambda(name,args,body){return[this[0],name,args,with_scope(body.scope,function(){return tighten(body,"lambda")})]}function with_scope(s,cont){var _scope=scope;scope=s;var ret=cont();scope=_scope;return ret}function tighten(statements,block_type){statements=MAP(statements,walk);statements=statements.reduce(function(a,stat){if(stat[0]=="block"){if(stat[1]){a.push.apply(a,stat[1])}}else{a.push(stat)}return a},[]);statements=function(a,prev){statements.forEach(function(cur){if(prev&&(cur[0]=="var"&&prev[0]=="var"||cur[0]=="const"&&prev[0]=="const")){prev[1]=prev[1].concat(cur[1])}else{a.push(cur);prev=cur}});return a}([]);if(options.dead_code)statements=function(a,has_quit){statements.forEach(function(st){if(has_quit){if(st[0]=="function"||st[0]=="defun"){a.push(st)}else if(st[0]=="var"||st[0]=="const"){if(!options.no_warnings)warn("Variables declared in unreachable code");st[1]=MAP(st[1],function(def){if(def[1]&&!options.no_warnings)warn_unreachable(["assign",true,["name",def[0]],def[1]]);return[def[0]]});a.push(st)}else if(!options.no_warnings)warn_unreachable(st)}else{a.push(st);if(member(st[0],["return","throw","break","continue"]))has_quit=true}});return a}([]);if(options.make_seqs)statements=function(a,prev){statements.forEach(function(cur){if(prev&&prev[0]=="stat"&&cur[0]=="stat"){prev[1]=["seq",prev[1],cur[1]]}else{a.push(cur);prev=cur}});if(a.length>=2&&a[a.length-2][0]=="stat"&&(a[a.length-1][0]=="return"||a[a.length-1][0]=="throw")&&a[a.length-1][1]){a.splice(a.length-2,2,[a[a.length-1][0],["seq",a[a.length-2][1],a[a.length-1][1]]])}return a}([]);return statements}function make_if(c,t,e){return when_constant(c,function(ast,val){if(val){t=walk(t);warn_unreachable(e);return t||["block"]}else{e=walk(e);warn_unreachable(t);return e||["block"]}},function(){return make_real_if(c,t,e)})}function abort_else(c,t,e){var ret=[["if",negate(c),e]];if(t[0]=="block"){if(t[1])ret=ret.concat(t[1])}else{ret.push(t)}return walk(["block",ret])}function make_real_if(c,t,e){c=walk(c);t=walk(t);e=walk(e);if(empty(e)&&empty(t))return["stat",c];if(empty(t)){c=negate(c);t=e;e=null}else if(empty(e)){e=null}else{(function(){var a=gen_code(c);var n=negate(c);var b=gen_code(n);if(b.length<a.length){var tmp=t;t=e;e=tmp;c=n}})()}var ret=["if",c,t,e];if(t[0]=="if"&&empty(t[3])&&empty(e)){ret=best_of(ret,walk(["if",["binary","&&",c,t[1]],t[2]]))}else if(t[0]=="stat"){if(e){if(e[0]=="stat")ret=best_of(ret,["stat",make_conditional(c,t[1],e[1])]);else if(aborts(e))ret=abort_else(c,t,e)}else{ret=best_of(ret,["stat",make_conditional(c,t[1])])}}else if(e&&t[0]==e[0]&&(t[0]=="return"||t[0]=="throw")&&t[1]&&e[1]){ret=best_of(ret,[t[0],make_conditional(c,t[1],e[1])])}else if(e&&aborts(t)){ret=[["if",c,t]];if(e[0]=="block"){if(e[1])ret=ret.concat(e[1])}else{ret.push(e)}ret=walk(["block",ret])}else if(t&&aborts(e)){ret=abort_else(c,t,e)}return ret}function _do_while(cond,body){return when_constant(cond,function(cond,val){if(!val){warn_unreachable(body);return["block"]}else{return["for",null,null,null,walk(body)]}})}return w.with_walkers({sub:function(expr,subscript){if(subscript[0]=="string"){var name=subscript[1];if(is_identifier(name))return["dot",walk(expr),name];else if(/^[1-9][0-9]*$/.test(name)||name==="0")return["sub",walk(expr),["num",parseInt(name,10)]]}},"if":make_if,toplevel:function(body){return with_scope(this.scope,function(){return["toplevel",tighten(body)]})},"switch":function(expr,body){var last=body.length-1;return["switch",walk(expr),MAP(body,function(branch,i){var block=tighten(branch[1]);if(i==last&&block.length>0){var node=block[block.length-1];if(node[0]=="break"&&!node[1])block.pop()}return[branch[0]?walk(branch[0]):null,block]})]},"function":_lambda,defun:_lambda,block:function(body){if(body)return rmblock(["block",tighten(body)])},binary:function(op,left,right){return when_constant(["binary",op,walk(left),walk(right)],function yes(c){return best_of(walk(c),this)},function no(){return function(){if(op!="=="&&op!="!=")return;var l=walk(left),r=walk(right);if(l&&l[0]=="unary-prefix"&&l[1]=="!"&&l[2][0]=="num")left=["num",+!l[2][1]];else if(r&&r[0]=="unary-prefix"&&r[1]=="!"&&r[2][0]=="num")right=["num",+!r[2][1]];return["binary",op,left,right]}()||this})},conditional:function(c,t,e){return make_conditional(walk(c),walk(t),walk(e))},"try":function(t,c,f){return["try",tighten(t),c!=null?[c[0],tighten(c[1])]:null,f!=null?tighten(f):null]},"unary-prefix":function(op,expr){expr=walk(expr);var ret=["unary-prefix",op,expr];if(op=="!")ret=best_of(ret,negate(expr));return when_constant(ret,function(ast,val){return walk(ast)},function(){return ret})},name:function(name){switch(name){case"true":return["unary-prefix","!",["num",0]];case"false":return["unary-prefix","!",["num",1]]}},"while":_do_while,assign:function(op,lvalue,rvalue){lvalue=walk(lvalue);rvalue=walk(rvalue);var okOps=["+","-","/","*","%",">>","<<",">>>","|","^","&"];if(op===true&&lvalue[0]==="name"&&rvalue[0]==="binary"&&~okOps.indexOf(rvalue[1])&&rvalue[2][0]==="name"&&rvalue[2][1]===lvalue[1]){return[this[0],rvalue[1],lvalue,rvalue[3]]}return[this[0],op,lvalue,rvalue]},directive:function(dir){if(scope.active(dir))return["block"];scope.directives.push(dir);return[this[0],dir]},call:function(expr,args){expr=walk(expr);if(options.unsafe&&expr[0]=="dot"&&expr[1][0]=="string"&&expr[2]=="toString"){return expr[1]}return[this[0],expr,MAP(args,walk)]},num:function(num){if(!isFinite(num))return["binary","/",num===1/0?["num",1]:num===-1/0?["unary-prefix","-",["num",1]]:["num",0],["num",0]];return[this[0],num]}},function(){for(var i=0;i<2;++i){ast=prepare_ifs(ast);ast=walk(ast_add_scope(ast))}return ast})}var DOT_CALL_NO_PARENS=jsp.array_to_hash(["name","array","object","string","dot","sub","call","regexp","defun"]);function make_string(str,ascii_only){var dq=0,sq=0;str=str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g,function(s){switch(s){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case'"':++dq;return'"';case"'":++sq;return"'";case"\0":return"\\0"}return s});if(ascii_only)str=to_ascii(str);if(dq>sq)return"'"+str.replace(/\x27/g,"\\'")+"'";else return'"'+str.replace(/\x22/g,'\\"')+'"'}function to_ascii(str){return str.replace(/[\u0080-\uffff]/g,function(ch){var code=ch.charCodeAt(0).toString(16);while(code.length<4)code="0"+code;return"\\u"+code})}var SPLICE_NEEDS_BRACKETS=jsp.array_to_hash(["if","while","do","for","for-in","with"]);function gen_code(ast,options){options=defaults(options,{indent_start:0,indent_level:4,quote_keys:false,space_colon:false,beautify:false,ascii_only:false,inline_script:false});var beautify=!!options.beautify;var indentation=0,newline=beautify?"\n":"",space=beautify?" ":"";function encode_string(str){var ret=make_string(str,options.ascii_only);if(options.inline_script)ret=ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi,"<\\/script$1");return ret}function make_name(name){name=name.toString();if(options.ascii_only)name=to_ascii(name);return name}function indent(line){if(line==null)line="";if(beautify)line=repeat_string(" ",options.indent_start+indentation*options.indent_level)+line;return line}function with_indent(cont,incr){if(incr==null)incr=1;indentation+=incr;try{return cont.apply(null,slice(arguments,1))}finally{indentation-=incr}}function add_spaces(a){if(beautify)return a.join(" ");var b=[];for(var i=0;i<a.length;++i){var next=a[i+1];b.push(a[i]);if(next&&(/[a-z0-9_\x24]$/i.test(a[i].toString())&&/^[a-z0-9_\x24]/i.test(next.toString())||/[\+\-]$/.test(a[i].toString())&&/^[\+\-]/.test(next.toString()))){b.push(" ")}}return b.join("")}function add_commas(a){return a.join(","+space)}function parenthesize(expr){var gen=make(expr);for(var i=1;i<arguments.length;++i){var el=arguments[i];if(el instanceof Function&&el(expr)||expr[0]==el)return"("+gen+")"}return gen}function best_of(a){if(a.length==1){return a[0]}if(a.length==2){var b=a[1];a=a[0];return a.length<=b.length?a:b}return best_of([a[0],best_of(a.slice(1))])}function needs_parens(expr){if(expr[0]=="function"||expr[0]=="object"){var a=slice(w.stack()),self=a.pop(),p=a.pop();while(p){if(p[0]=="stat")return true;if((p[0]=="seq"||p[0]=="call"||p[0]=="dot"||p[0]=="sub"||p[0]=="conditional")&&p[1]===self||(p[0]=="binary"||p[0]=="assign"||p[0]=="unary-postfix")&&p[2]===self){self=p;p=a.pop()}else{return false}}}return!HOP(DOT_CALL_NO_PARENS,expr[0])}function make_num(num){var str=num.toString(10),a=[str.replace(/^0\./,".").replace("e+","e")],m;if(Math.floor(num)===num){if(num>=0){a.push("0x"+num.toString(16).toLowerCase(),"0"+num.toString(8))}else{a.push("-0x"+(-num).toString(16).toLowerCase(),"-0"+(-num).toString(8))}if(m=/^(.*?)(0+)$/.exec(num)){a.push(m[1]+"e"+m[2].length)}}else if(m=/^0?\.(0+)(.*)$/.exec(num)){a.push(m[2]+"e-"+(m[1].length+m[2].length),str.substr(str.indexOf(".")))}return best_of(a)}var w=ast_walker();var make=w.walk;return w.with_walkers({string:encode_string,num:make_num,name:make_name,"debugger":function(){return"debugger;"},toplevel:function(statements){return make_block_statements(statements).join(newline+newline)},splice:function(statements){var parent=w.parent();if(HOP(SPLICE_NEEDS_BRACKETS,parent)){return make_block.apply(this,arguments)}else{return MAP(make_block_statements(statements,true),function(line,i){return i>0?indent(line):line}).join(newline)}},block:make_block,"var":function(defs){return"var "+add_commas(MAP(defs,make_1vardef))+";"},"const":function(defs){return"const "+add_commas(MAP(defs,make_1vardef))+";"},"try":function(tr,ca,fi){var out=["try",make_block(tr)];if(ca)out.push("catch","("+ca[0]+")",make_block(ca[1]));if(fi)out.push("finally",make_block(fi));return add_spaces(out)},"throw":function(expr){return add_spaces(["throw",make(expr)])+";"},"new":function(ctor,args){args=args.length>0?"("+add_commas(MAP(args,function(expr){return parenthesize(expr,"seq")}))+")":"";return add_spaces(["new",parenthesize(ctor,"seq","binary","conditional","assign",function(expr){var w=ast_walker(),has_call={};try{w.with_walkers({call:function(){throw has_call},"function":function(){return this}},function(){w.walk(expr)})}catch(ex){if(ex===has_call)return true;throw ex}})+args])},"switch":function(expr,body){return add_spaces(["switch","("+make(expr)+")",make_switch_block(body)])},"break":function(label){var out="break";if(label!=null)out+=" "+make_name(label);return out+";"},"continue":function(label){var out="continue";if(label!=null)out+=" "+make_name(label);return out+";"},conditional:function(co,th,el){return add_spaces([parenthesize(co,"assign","seq","conditional"),"?",parenthesize(th,"seq"),":",parenthesize(el,"seq")])},assign:function(op,lvalue,rvalue){if(op&&op!==true)op+="=";else op="=";return add_spaces([make(lvalue),op,parenthesize(rvalue,"seq")])},dot:function(expr){var out=make(expr),i=1;if(expr[0]=="num"){if(!/[a-f.]/i.test(out))out+="."}else if(expr[0]!="function"&&needs_parens(expr))out="("+out+")";while(i<arguments.length)out+="."+make_name(arguments[i++]);return out},call:function(func,args){var f=make(func);if(f.charAt(0)!="("&&needs_parens(func))f="("+f+")";return f+"("+add_commas(MAP(args,function(expr){return parenthesize(expr,"seq")}))+")"},"function":make_function,defun:make_function,"if":function(co,th,el){var out=["if","("+make(co)+")",el?make_then(th):make(th)];if(el){out.push("else",make(el))}return add_spaces(out)},"for":function(init,cond,step,block){var out=["for"];init=(init!=null?make(init):"").replace(/;*\s*$/,";"+space);cond=(cond!=null?make(cond):"").replace(/;*\s*$/,";"+space);step=(step!=null?make(step):"").replace(/;*\s*$/,"");var args=init+cond+step;if(args=="; ; ")args=";;";out.push("("+args+")",make(block));return add_spaces(out)},"for-in":function(vvar,key,hash,block){return add_spaces(["for","("+(vvar?make(vvar).replace(/;+$/,""):make(key)),"in",make(hash)+")",make(block)])},"while":function(condition,block){return add_spaces(["while","("+make(condition)+")",make(block)])},"do":function(condition,block){return add_spaces(["do",make(block),"while","("+make(condition)+")"])+";"},"return":function(expr){var out=["return"];if(expr!=null)out.push(make(expr));return add_spaces(out)+";"},binary:function(operator,lvalue,rvalue){var left=make(lvalue),right=make(rvalue);if(member(lvalue[0],["assign","conditional","seq"])||lvalue[0]=="binary"&&PRECEDENCE[operator]>PRECEDENCE[lvalue[1]]||lvalue[0]=="function"&&needs_parens(this)){left="("+left+")"}if(member(rvalue[0],["assign","conditional","seq"])||rvalue[0]=="binary"&&PRECEDENCE[operator]>=PRECEDENCE[rvalue[1]]&&!(rvalue[1]==operator&&member(operator,["&&","||","*"]))){right="("+right+")"}else if(!beautify&&options.inline_script&&(operator=="<"||operator=="<<")&&rvalue[0]=="regexp"&&/^script/i.test(rvalue[1])){right=" "+right}return add_spaces([left,operator,right])},"unary-prefix":function(operator,expr){var val=make(expr);if(!(expr[0]=="num"||expr[0]=="unary-prefix"&&!HOP(OPERATORS,operator+expr[1])||!needs_parens(expr)))val="("+val+")";return operator+(jsp.is_alphanumeric_char(operator.charAt(0))?" ":"")+val},"unary-postfix":function(operator,expr){var val=make(expr);if(!(expr[0]=="num"||expr[0]=="unary-postfix"&&!HOP(OPERATORS,operator+expr[1])||!needs_parens(expr)))val="("+val+")";return val+operator},sub:function(expr,subscript){var hash=make(expr);if(needs_parens(expr))hash="("+hash+")";return hash+"["+make(subscript)+"]"},object:function(props){var obj_needs_parens=needs_parens(this);if(props.length==0)return obj_needs_parens?"({})":"{}";var out="{"+newline+with_indent(function(){return MAP(props,function(p){if(p.length==3){return indent(make_function(p[0],p[1][2],p[1][3],p[2],true))}var key=p[0],val=parenthesize(p[1],"seq");if(options.quote_keys){key=encode_string(key)}else if((typeof key=="number"||!beautify&&+key+""==key)&&parseFloat(key)>=0){key=make_num(+key)}else if(!is_identifier(key)){key=encode_string(key)}return indent(add_spaces(beautify&&options.space_colon?[key,":",val]:[key+":",val]))}).join(","+newline)})+newline+indent("}");return obj_needs_parens?"("+out+")":out},regexp:function(rx,mods){if(options.ascii_only)rx=to_ascii(rx);return"/"+rx+"/"+mods},array:function(elements){if(elements.length==0)return"[]";return add_spaces(["[",add_commas(MAP(elements,function(el,i){if(!beautify&&el[0]=="atom"&&el[1]=="undefined")return i===elements.length-1?",":"";return parenthesize(el,"seq")})),"]"])},stat:function(stmt){return make(stmt).replace(/;*\s*$/,";")},seq:function(){return add_commas(MAP(slice(arguments),make))},label:function(name,block){return add_spaces([make_name(name),":",make(block)])},"with":function(expr,block){return add_spaces(["with","("+make(expr)+")",make(block)])},atom:function(name){return make_name(name)},directive:function(dir){return make_string(dir)+";"}},function(){return make(ast)});function make_then(th){if(th==null)return";";if(th[0]=="do"){return make_block([th])}var b=th;while(true){var type=b[0];if(type=="if"){if(!b[3])return make(["block",[th]]);b=b[3]}else if(type=="while"||type=="do")b=b[2];else if(type=="for"||type=="for-in")b=b[4];else break}return make(th)}function make_function(name,args,body,keyword,no_parens){var out=keyword||"function";if(name){out+=" "+make_name(name)}out+="("+add_commas(MAP(args,make_name))+")";out=add_spaces([out,make_block(body)]);return!no_parens&&needs_parens(this)?"("+out+")":out}function must_has_semicolon(node){switch(node[0]){case"with":case"while":return empty(node[2])||must_has_semicolon(node[2]);case"for":case"for-in":return empty(node[4])||must_has_semicolon(node[4]);case"if":if(empty(node[2])&&!node[3])return true;if(node[3]){if(empty(node[3]))return true;return must_has_semicolon(node[3])}return must_has_semicolon(node[2]);case"directive":return true}}function make_block_statements(statements,noindent){for(var a=[],last=statements.length-1,i=0;i<=last;++i){var stat=statements[i];var code=make(stat);if(code!=";"){if(!beautify&&i==last&&!must_has_semicolon(stat)){code=code.replace(/;+\s*$/,"")}a.push(code)}}return noindent?a:MAP(a,indent)}function make_switch_block(body){var n=body.length;if(n==0)return"{}";return"{"+newline+MAP(body,function(branch,i){var has_body=branch[1].length>0,code=with_indent(function(){return indent(branch[0]?add_spaces(["case",make(branch[0])+":"]):"default:")},.5)+(has_body?newline+with_indent(function(){return make_block_statements(branch[1]).join(newline)}):"");if(!beautify&&has_body&&i<n-1)code+=";";return code}).join(newline)+newline+indent("}")}function make_block(statements){if(!statements)return";";if(statements.length==0)return"{}";return"{"+newline+with_indent(function(){return make_block_statements(statements).join(newline)})+newline+indent("}")}function make_1vardef(def){var name=def[0],val=def[1];if(val!=null)name=add_spaces([make_name(name),"=",parenthesize(val,"seq")]);return name}}function split_lines(code,max_line_length){var splits=[0];jsp.parse(function(){var next_token=jsp.tokenizer(code);var last_split=0;var prev_token;function current_length(tok){return tok.pos-last_split}function split_here(tok){last_split=tok.pos;splits.push(last_split)}function custom(){var tok=next_token.apply(this,arguments);out:{if(prev_token){if(prev_token.type=="keyword")break out}if(current_length(tok)>max_line_length){switch(tok.type){case"keyword":case"atom":case"name":case"punc":split_here(tok);break out}}}prev_token=tok;return tok}custom.context=function(){return next_token.context.apply(this,arguments)};return custom}());return splits.map(function(pos,i){return code.substring(pos,splits[i+1]||code.length)}).join("\n")}function repeat_string(str,i){if(i<=0)return"";if(i==1)return str;var d=repeat_string(str,i>>1);d+=d;if(i&1)d+=str;return d}function defaults(args,defs){var ret={};if(args===true)args={};for(var i in defs)if(HOP(defs,i)){ret[i]=args&&HOP(args,i)?args[i]:defs[i]}return ret}function is_identifier(name){return/^[a-z_$][a-z0-9_$]*$/i.test(name)&&name!="this"&&!HOP(jsp.KEYWORDS_ATOM,name)&&!HOP(jsp.RESERVED_WORDS,name)&&!HOP(jsp.KEYWORDS,name)}function HOP(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var MAP;(function(){MAP=function(a,f,o){var ret=[],top=[],i;function doit(){var val=f.call(o,a[i],i);if(val instanceof AtTop){val=val.v;if(val instanceof Splice){top.push.apply(top,val.v)}else{top.push(val)}}else if(val!=skip){if(val instanceof Splice){ret.push.apply(ret,val.v)}else{ret.push(val)}}}if(a instanceof Array)for(i=0;i<a.length;++i)doit();else for(i in a)if(HOP(a,i))doit();return top.concat(ret)};MAP.at_top=function(val){return new AtTop(val)};MAP.splice=function(val){return new Splice(val)};var skip=MAP.skip={};function AtTop(val){this.v=val}function Splice(val){this.v=val}})();exports.ast_walker=ast_walker;exports.ast_mangle=ast_mangle;exports.ast_squeeze=ast_squeeze;exports.ast_lift_variables=ast_lift_variables;exports.gen_code=gen_code;exports.ast_add_scope=ast_add_scope;exports.set_logger=function(logger){warn=logger};exports.make_string=make_string;exports.split_lines=split_lines;exports.MAP=MAP;var jsp=require("uglify-js/parser"),slice=jsp.slice,member=jsp.member,curry=jsp.curry,MAP=MAP,PRECEDENCE=jsp.PRECEDENCE,OPERATORS=jsp.OPERATORS;function ast_squeeze_more(ast){var w=ast_walker(),walk=w.walk,scope;function with_scope(s,cont){var save=scope,ret;scope=s;ret=cont();scope=save;return ret}function _lambda(name,args,body){return[this[0],name,args,with_scope(body.scope,curry(MAP,body,walk))]}return w.with_walkers({toplevel:function(body){return[this[0],with_scope(this.scope,curry(MAP,body,walk))]},"function":_lambda,defun:_lambda,"new":function(ctor,args){if(ctor[0]=="name"){if(ctor[1]=="Array"&&!scope.has("Array")){if(args.length!=1){return["array",args]}else{return walk(["call",["name","Array"],args])}}else if(ctor[1]=="Object"&&!scope.has("Object")){if(!args.length){return["object",[]]}else{return walk(["call",["name","Object"],args])}}else if((ctor[1]=="RegExp"||ctor[1]=="Function"||ctor[1]=="Error")&&!scope.has(ctor[1])){return walk(["call",["name",ctor[1]],args])}}},call:function(expr,args){if(expr[0]=="dot"&&expr[1][0]=="string"&&args.length==1&&(args[0][1]>0&&expr[2]=="substring"||expr[2]=="substr")){return["call",["dot",expr[1],"slice"],args]}if(expr[0]=="dot"&&expr[2]=="toString"&&args.length==0){if(expr[1][0]=="string")return expr[1];return["binary","+",expr[1],["string",""]]}if(expr[0]=="name"){if(expr[1]=="Array"&&args.length!=1&&!scope.has("Array")){return["array",args]}if(expr[1]=="Object"&&!args.length&&!scope.has("Object")){return["object",[]]}if(expr[1]=="String"&&!scope.has("String")){return["binary","+",args[0],["string",""]]}}}},function(){return walk(ast_add_scope(ast))})}exports.ast_squeeze_more=ast_squeeze_more});define("uglify-js",["require","exports","uglify-js/parser","uglify-js/uglify"],function(require,exports,parser,uglify){exports.parser=parser;exports.uglify=uglify});define("gear-csslint",["require","exports","csslint"],function(require,exports){var linter=require("csslint").CSSLint;exports.csslint=function(options,blob,done){options=options||{};var result=linter.verify(blob.result,options.config||null),linted=result.messages.length?new blob.constructor(blob,{csslint:result.messages}):blob;done(options.callback?options.callback(linted):null,linted)}});define("cssminify",["require","exports","less"],function(require,exports){var less=require("less"),dirname=typeof module==="undefined"?function(s){return s}:require("path").dirname;exports.cssminify=exports.less=function(options,blob,done){options=options||{};var parser=new less.Parser({paths:[dirname(blob.name)]});if(options.compress===undefined&&options.yuicompress===undefined){options.compress=true}parser.parse(blob.result,function(err,tree){if(err){done(err)}else{try{done(null,new blob.constructor(tree.toCSS(options),blob))}catch(exc){done(exc)}}})}});define("gear-jslint",["require","exports","jslint/lib/linter"],function(require,exports){var linter=require("jslint/lib/linter");exports.jslint=function(options,blob,done){options=options||{};var result=linter.lint(blob.result,options.config||{}),linted=result.errors?new blob.constructor(blob,{jslint:result.errors}):blob;done(options.callback?options.callback(linted):null,linted)}});define("gear-jshint",["require","exports","jshint"],function(require,exports){var JSHINT=require("jshint").JSHINT;var fs=require("fs");exports.jshint=function(options,blob,done){function lint(){JSHINT(blob.result,options.config||{});if(JSHINT.errors.length){var linted=new blob.constructor(blob,{jshint:JSHINT.errors});var errors=JSHINT.errors.map(function(err){return"Line "+err.line+" char "+err.character+": "+err.reason+"\n    "+err.evidence+"\n"});done(options.callback?options.callback(JSHINT.errors):errors,linted)}else{done(null,blob)}}options=options||{};if(options.configFile){fs.readFile(options.configFile,function(err,result){var json=String(result).replace(/\/\/.*/g,"").replace(/\/\*[\d\D]*?\*\//g,"");options.config=JSON.parse(json);lint()})}else{lint()}}});define("jsminify",["require","exports","uglify-js"],function(require,exports){var parser=require("uglify-js").parser,uglify=require("uglify-js").uglify;exports.jsminify=function(options,blob,done){options=options||{};var config=options.config||{},comments=[],token='
undefined
',reMultiComments=/\/\*![\s\S]*?\*\//g,reTokens=new RegExp(token,"g"),source=blob.result,ast;try{source=source.replace(reMultiComments,function(comment){comments.push(comment);return";"+token+";"});ast=parser.parse(source,config.semicolon||false);if(config.mangle){ast=uglify.ast_mangle(ast,config)}if(config.squeeze){ast=uglify.ast_squeeze(ast,config)}source=uglify.gen_code(ast,config);source=source.replace(reTokens,function(){return"\n"+comments.shift()+"\n"});if(source.substr(source.length-1)===")"){source+=";"}source+="\n"}catch(e){if(options.callback){options.callback(e)}done("Minify failed, "+(blob.name||"file")+" unparseable.\nException:\n"+JSON.stringify(e));return}done(null,new blob.constructor(source,blob))}});define("gear-handlebars",["require","exports","handlebars"],function(require,exports){var handlebars=require("handlebars");exports.handlebars=function(vars,blob,done){var tmpl=handlebars.compile(blob.result);done(null,new blob.constructor(tmpl(vars),blob))}});define("gear-lib",["require","exports","gear-csslint","cssminify","gear-jslint","gear-jshint","jsminify","gear-handlebars"],function(require,exports){var tasks=[];tasks.push(require("gear-csslint"));tasks.push(require("cssminify"));tasks.push(require("gear-jslint"));tasks.push(require("gear-jshint"));tasks.push(require("jsminify"));tasks.push(require("gear-handlebars"));tasks.forEach(function(mod){for(var task in mod){exports[task]=mod[task]}})});
