text: /**
   * skylark-texts-css - The skylark css utility library.
   * @author Hudaokeji Co.,Ltd
   * @version v0.9.0
   * @link www.skylarkjs.org
   * @license MIT
   */
  !function(factory,globals){var define=globals.define,require=globals.require,isAmd="function"==typeof define&&define.amd,isCmd=!isAmd&&"undefined"!=typeof exports;if(!isAmd&&!define){var map={};define=globals.define=function(e,t,r){"function"==typeof r?(map[e]={factory:r,deps:t.map(function(t){return function(e,t){if("."!==e[0])return e;var r=t.split("/"),n=e.split("/");r.pop();for(var i=0;i<n.length;i++)"."!=n[i]&&(".."==n[i]?r.pop():r.push(n[i]));return r.join("/")}(t,e)}),resolved:!1,exports:null},require(e)):map[e]={factory:null,resolved:!0,exports:r}},require=globals.require=function(e){if(!map.hasOwnProperty(e))throw new Error("Module "+e+" has not been defined");var module=map[e];if(!module.resolved){var t=[];module.deps.forEach(function(e){t.push(require(e))}),module.exports=module.factory.apply(globals,t)||null,module.resolved=!0}return module.exports}}if(!define)throw new Error("The module utility (ex: requirejs or skylark-utils) is not loaded!");if(function(define,require){define("skylark-texts-css/css",["skylark-langx/skylark"],function(e){return e.attach("markups.css",{})}),define("skylark-texts-css/primitives/beautify-css",[],function(){function e(t,r){var n=(r=r||{}).indent_size||4,i=r.indent_char||" ",o=void 0===r.selector_separator_newline||r.selector_separator_newline,a=void 0!==r.end_with_newline&&r.end_with_newline;"string"==typeof n&&(n=parseInt(n,10));var s,l=/^\s+$/,u=-1;function c(){return(s=t.charAt(++u))||""}function d(e){var r=u;return e&&m(),result=t.charAt(u+1)||"",u=r-1,c(),result}function h(e){for(var r=u;c();)if("\\"===s)c();else{if(-1!==e.indexOf(s))break;if("\n"===s)break}return t.substring(r,u+1)}function p(e){var t=u,r=h(e);return u=t-1,c(),r}function m(){for(var e="";l.test(d());)c(),e+=s;return e}function f(){var e="";for(s&&l.test(s)&&(e=s);l.test(c());)e+=s;return e}function g(e){var r=u,e="/"===d();for(c();c();){if(!e&&"*"===s&&"/"===d()){c();break}if(e&&"\n"===s)return t.substring(r,u)}return t.substring(r,u)+s}function k(e){return t.substring(u-e.length,u).toLowerCase()===e}function b(){for(var e=u+1;e<t.length;e++){var r=t.charAt(e);if("{"===r)return!0;if(";"===r||"}"===r||")"===r)return!1}return!1}var y=t.match(/^[\t ]*/)[0],T=new Array(n+1).join(i),_=0,w=0;function v(){_++,y+=T}function x(){_--,y=y.slice(0,-n)}var E={"{":function(e){E.singleSpace(),S.push(e),E.newLine()},"}":function(e){E.newLine(),S.push(e),E.newLine()},_lastCharWhitespace:function(){return l.test(S[S.length-1])},newLine:function(e){e||E.trim(),S.length&&S.push("\n"),y&&S.push(y)},singleSpace:function(){S.length&&!E._lastCharWhitespace()&&S.push(" ")},trim:function(){for(;E._lastCharWhitespace();)S.pop()}},S=[];y&&S.push(y);for(var L=!1,R=!1,C="",A="";;){var P=f(),N=""!==P,O=-1!==P.indexOf("\n"),A=C,C=s;if(!s)break;if("/"===s&&"*"===d()){var M=k("");E.newLine(),S.push(g()),E.newLine(),M&&E.newLine(!0)}else if("/"===s&&"/"===d())O||"{"===A||E.trim(),E.singleSpace(),S.push(g()),E.newLine();else if("@"===s){N&&E.singleSpace(),S.push(s);var I=p(": ,;{}()[]/='\"").replace(/\s$/,"");I in e.NESTED_AT_RULE?(w+=1,I in e.CONDITIONAL_GROUP_RULE&&(R=!0)):": ".indexOf(I[I.length-1])>=0&&(c(),I=h(": ").replace(/\s$/,""),S.push(I),E.singleSpace())}else"{"===s?"}"===d(!0)?(m(),c(),E.singleSpace(),S.push("{}")):(v(),E["{"](s),R?(R=!1,L=_>w):L=_>=w):"}"===s?(x(),E["}"](s),L=!1,w&&w--):":"===s?(m(),!L&&!R||k("&")||b()?":"===d()?(c(),S.push("::")):S.push(":"):(S.push(":"),E.singleSpace())):'"'===s||"'"===s?(N&&E.singleSpace(),S.push(h(s))):";"===s?(S.push(s),E.newLine()):"("===s?k("url")?(S.push(s),m(),c()&&(")"!==s&&'"'!==s&&"'"!==s?S.push(h(")")):u--)):(N&&E.singleSpace(),S.push(s),m()):")"===s?S.push(s):","===s?(S.push(s),m(),!L&&o?E.newLine():E.singleSpace()):"]"===s?S.push(s):"["===s?(N&&E.singleSpace(),S.push(s)):"="===s?(m(),S.push(s)):(N&&E.singleSpace(),S.push(s))}var z=S.join("").replace(/[\r\n\t ]+$/,"");return a&&(z+="\n"),z}return e.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},e.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},{css_beautify:e}}),define("skylark-texts-css/beautify",["./css","./primitives/beautify-css"],function(e,t){return e.beautify=t.css_beautify}),define("skylark-texts-css/primitives/parser-lib",[],function(){var parserlib={};function EventTarget(){this._listeners={}}function StringReader(e){this._input=e.replace(/\n\r?/g,"\n"),this._line=1,this._col=1,this._cursor=0}function SyntaxError(e,t,r){this.col=r,this.line=t,this.message=e}function SyntaxUnit(e,t,r,n){this.col=r,this.line=t,this.text=e,this.type=n}function TokenStreamBase(e,t){this._reader=e?new StringReader(e.toString()):null,this._token=null,this._tokenData=t,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}EventTarget.prototype={constructor:EventTarget,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){if("string"==typeof e&&(e={type:e}),void 0!==e.target&&(e.target=this),void 0===e.type)throw new Error("Event object missing 'type' property.");if(this._listeners[e.type])for(var t=this._listeners[e.type].concat(),r=0,n=t.length;r<n;r++)t[r].call(this,e)},removeListener:function(e,t){if(this._listeners[e])for(var r=this._listeners[e],n=0,i=r.length;n<i;n++)if(r[n]===t){r.splice(n,1);break}}},StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(e){var t=null;return e=void 0===e?1:e,this._cursor<this._input.length&&(t=this._input.charAt(this._cursor+e-1)),t},read:function(){var e=null;return this._cursor<this._input.length&&("\n"==this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,e=this._input.charAt(this._cursor++)),e},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(e){for(var t,r="";r.length<e.length||r.lastIndexOf(e)!=r.length-e.length;){if(!(t=this.read()))throw new Error('Expected "'+e+'" at line '+this._line+", col "+this._col+".");r+=t}return r},readWhile:function(e){for(var t="",r=this.read();null!==r&&e(r);)t+=r,r=this.read();return t},readMatch:function(e){var t=this._input.substring(this._cursor),r=null;return"string"==typeof e?0===t.indexOf(e)&&(r=this.readCount(e.length)):e instanceof RegExp&&e.test(t)&&(r=this.readCount(RegExp.lastMatch.length)),r},readCount:function(e){for(var t="";e--;)t+=this.read();return t}},SyntaxError.prototype=new Error,SyntaxUnit.fromToken=function(e){return new SyntaxUnit(e.value,e.startLine,e.startCol)},SyntaxUnit.prototype={constructor:SyntaxUnit,valueOf:function(){return this.toString()},toString:function(){return this.text}},TokenStreamBase.createTokenData=function(e){var t=[],r={},n=e.concat([]),i=0,o=n.length+1;for(n.UNKNOWN=-1,n.unshift({name:"EOF"});i<o;i++)t.push(n[i].name),n[n[i].name]=i,n[i].text&&(r[n[i].text]=i);return n.name=function(e){return t[e]},n.type=function(e){return r[e]},n},TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(e,t){e instanceof Array||(e=[e]);for(var r=this.get(t),n=0,i=e.length;n<i;)if(r==e[n++])return!0;return this.unget(),!1},mustMatch:function(e,t){var r;if(e instanceof Array||(e=[e]),!this.match.apply(this,arguments))throw r=this.LT(1),new SyntaxError("Expected "+this._tokenData[e[0]].name+" at line "+r.startLine+", col "+r.startCol+".",r.startLine,r.startCol)},advance:function(e,t){for(;0!==this.LA(0)&&!this.match(e,t);)this.get();return this.LA(0)},get:function(e){var t,r,n=this._tokenData,i=(this._reader,0);n.length;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){for(i++,this._token=this._lt[this._ltIndex++],r=n[this._token.type];void 0!==r.channel&&e!==r.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],r=n[this._token.type],i++;if((void 0===r.channel||e===r.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(i),this._token.type}return(t=this._getToken()).type>-1&&!n[t.type].hide&&(t.channel=n[t.type].channel,this._token=t,this._lt.push(t),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),(r=n[t.type])&&(r.hide||void 0!==r.channel&&e!==r.channel)?this.get(e):t.type},LA:function(e){var t,r=e;if(e>0){if(e>5)throw new Error("Too much lookahead.");for(;r;)t=this.get(),r--;for(;r<e;)this.unget(),r++}else if(e<0){if(!this._lt[this._ltIndex+e])throw new Error("Too much lookbehind.");t=this._lt[this._ltIndex+e].type}else t=this._token.type;return t},LT:function(e){return this.LA(e),this._lt[this._ltIndex+e-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(e){return e<0||e>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[e].name},tokenType:function(e){return this._tokenData[e]||-1},unget:function(){if(!this._ltIndexCache.length)throw new Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase};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",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."};function Combinator(e,t,r){SyntaxUnit.call(this,e,t,r,Parser.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":">"==e?this.type="child":"+"==e?this.type="adjacent-sibling":"~"==e&&(this.type="sibling")}function MediaFeature(e,t){SyntaxUnit.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}function MediaQuery(e,t,r,n,i){SyntaxUnit.call(this,(e?e+" ":"")+(t||"")+(t&&r.length>0?" and ":"")+r.join(" and "),n,i,Parser.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=r}function Parser(e){EventTarget.call(this),this.options=e||{},this._tokenStream=null}Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,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 e,t=new EventTarget,r={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 e,t,r,n=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();n.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;n.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(r=n.peek();r>Tokens.EOF;){try{switch(r){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.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(n.get(),this.options.strict)throw new SyntaxError("Unknown @ rule.",n.LT(0).startLine,n.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+n.LT(0).value+".",line:n.LT(0).startLine,col:n.LT(0).startCol}),e=0;n.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)e++;for(;e;)n.advance([Tokens.RBRACE]),e--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(r){case Tokens.CHARSET_SYM:throw t=n.LT(1),this._charset(!1),new SyntaxError("@charset not allowed here.",t.startLine,t.startCol);case Tokens.IMPORT_SYM:throw t=n.LT(1),this._import(!1),new SyntaxError("@import not allowed here.",t.startLine,t.startCol);case Tokens.NAMESPACE_SYM:throw t=n.LT(1),this._namespace(!1),new SyntaxError("@namespace not allowed here.",t.startLine,t.startCol);default:n.get(),this._unexpectedToken(n.token())}}}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}r=n.peek()}r!=Tokens.EOF&&this._unexpectedToken(n.token()),this.fire("endstylesheet")},_charset:function(e){var t,r,n,i,o=this._tokenStream;o.match(Tokens.CHARSET_SYM)&&(n=o.token().startLine,i=o.token().startCol,this._readWhitespace(),o.mustMatch(Tokens.STRING),r=o.token(),t=r.value,this._readWhitespace(),o.mustMatch(Tokens.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:n,col:i}))},_import:function(e){var t,r,n=this._tokenStream,i=[];n.mustMatch(Tokens.IMPORT_SYM),r=n.token(),this._readWhitespace(),n.mustMatch([Tokens.STRING,Tokens.URI]),t=n.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),i=this._media_query_list(),n.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:i,line:r.startLine,col:r.startCol})},_namespace:function(e){var t,r,n,i,o=this._tokenStream;o.mustMatch(Tokens.NAMESPACE_SYM),t=o.token().startLine,r=o.token().startCol,this._readWhitespace(),o.match(Tokens.IDENT)&&(n=o.token().value,this._readWhitespace()),o.mustMatch([Tokens.STRING,Tokens.URI]),i=o.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),o.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:n,uri:i,line:t,col:r})},_media:function(){var e,t,r,n=this._tokenStream;for(n.mustMatch(Tokens.MEDIA_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),r=this._media_query_list(),n.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:r,line:e,col:t});;)if(n.peek()==Tokens.PAGE_SYM)this._page();else if(n.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(!this._ruleset())break;n.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:r,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!=Tokens.IDENT&&e.peek()!=Tokens.LPAREN||t.push(this._media_query());e.match(Tokens.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,r=null,n=null,i=[];if(e.match(Tokens.IDENT)&&("only"!=(r=e.token().value.toLowerCase())&&"not"!=r?(e.unget(),r=null):n=e.token()),this._readWhitespace(),e.peek()==Tokens.IDENT?(t=this._media_type(),null===n&&(n=e.token())):e.peek()==Tokens.LPAREN&&(null===n&&(n=e.LT(1)),i.push(this._media_expression())),null===t&&0===i.length)return null;for(this._readWhitespace();e.match(Tokens.IDENT);)"and"!=e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),i.push(this._media_expression());return new MediaQuery(r,t,i,n.startLine,n.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t=this._tokenStream,r=null,n=null;return t.mustMatch(Tokens.LPAREN),r=this._media_feature(),this._readWhitespace(),t.match(Tokens.COLON)&&(this._readWhitespace(),e=t.LT(1),n=this._expression()),t.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(r,n?new SyntaxUnit(n,e.startLine,e.startCol):null)},_media_feature:function(){var e=this._tokenStream;return e.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(e.token())},_page:function(){var e,t,r=this._tokenStream,n=null,i=null;r.mustMatch(Tokens.PAGE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),r.match(Tokens.IDENT)&&"auto"===(n=r.token().value).toLowerCase()&&this._unexpectedToken(r.token()),r.peek()==Tokens.COLON&&(i=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:n,pseudo:i,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:n,pseudo:i,line:e,col:t})},_margin:function(){var e,t,r=this._tokenStream,n=this._margin_sym();return!!n&&(e=r.token().startLine,t=r.token().startCol,this.fire({type:"startpagemargin",margin:n,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:n,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.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])?SyntaxUnit.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(Tokens.COLON),e.mustMatch(Tokens.IDENT),e.token().value},_font_face:function(){var e,t,r=this._tokenStream;r.mustMatch(Tokens.FONT_FACE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,r=this._tokenStream;r.mustMatch(Tokens.VIEWPORT_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_operator:function(e){var t=this._tokenStream,r=null;return(t.match([Tokens.SLASH,Tokens.COMMA])||e&&t.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(r=t.token(),this._readWhitespace()),r?PropertyValuePart.fromToken(r):null},_combinator:function(){var e,t=this._tokenStream,r=null;return t.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(e=t.token(),r=new Combinator(e.value,e.startLine,e.startCol),this._readWhitespace()),r},_unary_operator:function(){var e=this._tokenStream;return e.match([Tokens.MINUS,Tokens.PLUS])?e.token().value:null},_property:function(){var e,t,r,n,i=this._tokenStream,o=null,a=null;return i.peek()==Tokens.STAR&&this.options.starHack&&(i.get(),t=i.token(),a=t.value,r=t.startLine,n=t.startCol),i.match(Tokens.IDENT)&&(t=i.token(),"_"==(e=t.value).charAt(0)&&this.options.underscoreHack&&(a="_",e=e.substring(1)),o=new PropertyName(e,a,r||t.startLine,n||t.startCol),this._readWhitespace()),o},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([Tokens.RBRACE])!=Tokens.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,r=[];if(null!==(e=this._selector()))for(r.push(e);t.match(Tokens.COMMA);)this._readWhitespace(),null!==(e=this._selector())?r.push(e):this._unexpectedToken(t.LT(1));return r.length?r:null},_selector:function(){var e=this._tokenStream,t=[],r=null,n=null,i=null;if(null===(r=this._simple_selector_sequence()))return null;for(t.push(r);;)if(null!==(n=this._combinator()))t.push(n),null===(r=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(r);else{if(!this._readWhitespace())break;i=new Combinator(e.token().value,e.token().startLine,e.token().startCol),n=this._combinator(),null===(r=this._simple_selector_sequence())?null!==n&&this._unexpectedToken(e.LT(1)):(null!==n?t.push(n):t.push(i),t.push(r))}return new Selector(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,r=this._tokenStream,n=null,i=[],o="",a=[function(){return r.match(Tokens.HASH)?new SelectorSubPart(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],s=0,l=a.length,u=null;for(e=r.LT(1).startLine,t=r.LT(1).startCol,(n=this._type_selector())||(n=this._universal()),null!==n&&(o+=n);r.peek()!==Tokens.S;){for(;s<l&&null===u;)u=a[s++].call(this);if(null===u){if(""===o)return null;break}s=0,i.push(u),o+=u.toString(),u=null}return""!==o?new SelectorPart(n,i,o,e,t):null},_type_selector:function(){var e=this._tokenStream,t=this._namespace_prefix(),r=this._element_name();return r?(t&&(r.text=t+r.text,r.col-=t.length),r):(t&&(e.unget(),t.length>1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(Tokens.DOT)?(t.mustMatch(Tokens.IDENT),new SelectorSubPart("."+(e=t.token()).value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(Tokens.IDENT)?new SelectorSubPart((e=t.token()).value,"elementName",e.startLine,e.startCol):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==Tokens.PIPE&&e.LA(2)!==Tokens.PIPE||(e.match([Tokens.IDENT,Tokens.STAR])&&(t+=e.token().value),e.mustMatch(Tokens.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,r="";return(e=this._namespace_prefix())&&(r+=e),t.match(Tokens.STAR)&&(r+="*"),r.length?r:null},_attrib:function(){var e,t,r=this._tokenStream,n=null;return r.match(Tokens.LBRACKET)?(t=r.token(),n=t.value,n+=this._readWhitespace(),(e=this._namespace_prefix())&&(n+=e),r.mustMatch(Tokens.IDENT),n+=r.token().value,n+=this._readWhitespace(),r.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(n+=r.token().value,n+=this._readWhitespace(),r.mustMatch([Tokens.IDENT,Tokens.STRING]),n+=r.token().value,n+=this._readWhitespace()),r.mustMatch(Tokens.RBRACKET),new SelectorSubPart(n+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,r=this._tokenStream,n=null,i=":";return r.match(Tokens.COLON)&&(r.match(Tokens.COLON)&&(i+=":"),r.match(Tokens.IDENT)?(n=r.token().value,e=r.token().startLine,t=r.token().startCol-i.length):r.peek()==Tokens.FUNCTION&&(e=r.LT(1).startLine,t=r.LT(1).startCol-i.length,n=this._functional_pseudo()),n&&(n=new SelectorSubPart(i+n,"pseudo",e,t))),n},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(Tokens.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(Tokens.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,r,n=this._tokenStream,i="",o=null;return n.match(Tokens.NOT)&&(i=n.token().value,e=n.token().startLine,t=n.token().startCol,i+=this._readWhitespace(),r=this._negation_arg(),i+=r,i+=this._readWhitespace(),n.match(Tokens.RPAREN),i+=n.token().value,(o=new SelectorSubPart(i,"not",e,t)).args.push(r)),o},_negation_arg:function(){var e,t,r=this._tokenStream,n=[this._type_selector,this._universal,function(){return r.match(Tokens.HASH)?new SelectorSubPart(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo],i=null,o=0,a=n.length;for(e=r.LT(1).startLine,t=r.LT(1).startCol;o<a&&null===i;)i=n[o].call(this),o++;return null===i&&this._unexpectedToken(r.LT(1)),"elementName"==i.type?new SelectorPart(i,[],i.toString(),e,t):new SelectorPart(null,[i],i.toString(),e,t)},_declaration:function(){var e=this._tokenStream,t=null,r=null,n=null,i=null,o="";if(null!==(t=this._property())){e.mustMatch(Tokens.COLON),this._readWhitespace(),(r=this._expr())&&0!==r.length||this._unexpectedToken(e.LT(1)),n=this._prio(),o=t.toString(),(this.options.starHack&&"*"==t.hack||this.options.underscoreHack&&"_"==t.hack)&&(o=t.text);try{this._validateProperty(o,r)}catch(e){i=e}return this.fire({type:"property",property:t,value:r,important:n,line:t.line,col:t.col,invalid:i}),!0}return!1},_prio:function(){var e=this._tokenStream,t=e.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),t},_expr:function(e){this._tokenStream;var t=[],r=null,n=null;if(null!==(r=this._term()))for(t.push(r);;){if((n=this._operator(e))&&t.push(n),null===(r=this._term()))break;t.push(r)}return t.length>0?new PropertyValue(t,t[0].line,t[0].col):null},_term:function(){var e,t,r,n=this._tokenStream,i=null,o=null;return null!==(i=this._unary_operator())&&(t=n.token().startLine,r=n.token().startCol),n.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(o=this._ie_function(),null===i&&(t=n.token().startLine,r=n.token().startCol)):n.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(o=n.token().value,null===i&&(t=n.token().startLine,r=n.token().startCol),this._readWhitespace()):null===(e=this._hexcolor())?(null===i&&(t=n.LT(1).startLine,r=n.LT(1).startCol),null===o&&(o=n.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(o=e.value,null===i&&(t=e.startLine,r=e.startCol)),null!==o?new PropertyValuePart(null!==i?i+o:o,t,r):null},_function:function(){var e,t=this._tokenStream,r=null,n=null;if(t.match(Tokens.FUNCTION)){if(r=t.token().value,this._readWhitespace(),n=this._expr(!0),r+=n,this.options.ieFilters&&t.peek()==Tokens.EQUALS)do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)==Tokens.COMMA&&(r+=t.token().value),t.match(Tokens.IDENT),r+=t.token().value,t.match(Tokens.EQUALS),r+=t.token().value,e=t.peek();e!=Tokens.COMMA&&e!=Tokens.S&&e!=Tokens.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([Tokens.COMMA,Tokens.S]));t.match(Tokens.RPAREN),r+=")",this._readWhitespace()}return r},_ie_function:function(){var e,t=this._tokenStream,r=null;if(t.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){r=t.token().value;do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)==Tokens.COMMA&&(r+=t.token().value),t.match(Tokens.IDENT),r+=t.token().value,t.match(Tokens.EQUALS),r+=t.token().value,e=t.peek();e!=Tokens.COMMA&&e!=Tokens.S&&e!=Tokens.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([Tokens.COMMA,Tokens.S]));t.match(Tokens.RPAREN),r+=")",this._readWhitespace()}return r},_hexcolor:function(){var e,t=this._tokenStream,r=null;if(t.match(Tokens.HASH)){if(r=t.token(),e=r.value,!/#[a-f0-9]{3,6}/i.test(e))throw new SyntaxError("Expected a hex color but found '"+e+"' at line "+r.startLine+", col "+r.startCol+".",r.startLine,r.startCol);this._readWhitespace()}return r},_keyframes:function(){var e,t,r,n=this._tokenStream,i="";for(n.mustMatch(Tokens.KEYFRAMES_SYM),e=n.token(),/^@\-([^\-]+)\-/.test(e.value)&&(i=RegExp.$1),this._readWhitespace(),r=this._keyframe_name(),this._readWhitespace(),n.mustMatch(Tokens.LBRACE),this.fire({type:"startkeyframes",name:r,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=n.peek();t==Tokens.IDENT||t==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=n.peek();this.fire({type:"endkeyframes",name:r,prefix:i,line:e.startLine,col:e.startCol}),this._readWhitespace(),n.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(e.token())},_keyframe_rule:function(){this._tokenStream;var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(Tokens.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(t.token());if(t.match(Tokens.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return SyntaxUnit.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(e,t){var r,n=this._tokenStream;this._readWhitespace(),e&&n.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(n.match(Tokens.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!n.match(Tokens.SEMICOLON))break}this._readWhitespace()}n.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof SyntaxError)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(r=n.advance([Tokens.SEMICOLON,Tokens.RBRACE]))==Tokens.SEMICOLON)this._readDeclarations(!1,t);else if(r!=Tokens.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(Tokens.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new SyntaxError("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){Validation.validate(e,t)},parse:function(e){this._tokenStream=new TokenStream(e,Tokens),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new TokenStream(e,Tokens);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new TokenStream(e,Tokens),this._readDeclarations()}};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}();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:!0},"animation-direction":{multi:"normal | alternate",comma:!0},"animation-duration":{multi:"<time>",comma:!0},"animation-iteration-count":{multi:"<number> | infinite",comma:!0},"animation-name":{multi:"none | <ident>",comma:!0},"animation-play-state":{multi:"running | paused",comma:!0},"animation-timing-function":1,"-moz-animation-delay":{multi:"<time>",comma:!0},"-moz-animation-direction":{multi:"normal | alternate",comma:!0},"-moz-animation-duration":{multi:"<time>",comma:!0},"-moz-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-moz-animation-name":{multi:"none | <ident>",comma:!0},"-moz-animation-play-state":{multi:"running | paused",comma:!0},"-ms-animation-delay":{multi:"<time>",comma:!0},"-ms-animation-direction":{multi:"normal | alternate",comma:!0},"-ms-animation-duration":{multi:"<time>",comma:!0},"-ms-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-ms-animation-name":{multi:"none | <ident>",comma:!0},"-ms-animation-play-state":{multi:"running | paused",comma:!0},"-webkit-animation-delay":{multi:"<time>",comma:!0},"-webkit-animation-direction":{multi:"normal | alternate",comma:!0},"-webkit-animation-duration":{multi:"<time>",comma:!0},"-webkit-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-webkit-animation-name":{multi:"none | <ident>",comma:!0},"-webkit-animation-play-state":{multi:"running | paused",comma:!0},"-o-animation-delay":{multi:"<time>",comma:!0},"-o-animation-direction":{multi:"normal | alternate",comma:!0},"-o-animation-duration":{multi:"<time>",comma:!0},"-o-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-o-animation-name":{multi:"none | <ident>",comma:!0},"-o-animation-play-state":{multi:"running | paused",comma:!0},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 | none | inherit",azimuth:function(e){var t,r=!1,n=!1;if(ValidationTypes.isAny(e,"<angle> | leftwards | rightwards | inherit")||(ValidationTypes.isAny(e,"behind")&&(r=!0,n=!0),ValidationTypes.isAny(e,"left-side | far-left | left | center-left | center | center-right | right | far-right | right-side")&&(n=!0,r||ValidationTypes.isAny(e,"behind"))),e.hasNext())throw t=e.next(),new ValidationError(n?"Expected end of value but found '"+t+"'.":"Expected (<'azimuth'>) but found '"+t+"'.",t.line,t.col)},"backface-visibility":"visible | hidden",background:1,"background-attachment":{multi:"<attachment>",comma:!0},"background-clip":{multi:"<box>",comma:!0},"background-color":"<color> | inherit","background-image":{multi:"<bg-image>",comma:!0},"background-origin":{multi:"<box>",comma:!0},"background-position":{multi:"<bg-position>",comma:!0},"background-repeat":{multi:"<repeat-style>"},"background-size":{multi:"<bg-size>",comma:!0},"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> | inherit","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(e){var t,r=!1,n=!1,i=0;for(ValidationTypes.isAny(e,"fill")&&(n=!0,r=!0);e.hasNext()&&i<4&&(r=ValidationTypes.isAny(e,"<number> | <percentage>"));)i++;if(n?r=!0:ValidationTypes.isAny(e,"fill"),e.hasNext())throw t=e.next(),new ValidationError(r?"Expected end of value but found '"+t+"'.":"Expected ([<number> | <percentage>]{1,4} && fill?) but found '"+t+"'.",t.line,t.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(e){for(var t,r=!1,n=!1,i=0,o=8;e.hasNext()&&i<o;){if(!(r=ValidationTypes.isAny(e,"<length> | <percentage> | inherit"))){if(!("/"==e.peek()&&i>0)||n)break;n=!0,o=i+5,e.next()}i++}if(e.hasNext())throw t=e.next(),new ValidationError(r?"Expected end of value but found '"+t+"'.":"Expected (<'border-radius'>) but found '"+t+"'.",t.line,t.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(e){var t;if(ValidationTypes.isAny(e,"none")){if(e.hasNext())throw new ValidationError("Expected end of value but found '"+(t=e.next())+"'.",t.line,t.col)}else Validation.multiProperty("<shadow>",e,!0,1/0)},"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 | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box","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,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",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":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",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 | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","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(e,t,r,n){SyntaxUnit.call(this,e,r,n,Parser.PROPERTY_NAME_TYPE),this.hack=t}function PropertyValue(e,t,r){SyntaxUnit.call(this,e.join(" "),t,r,Parser.PROPERTY_VALUE_TYPE),this.parts=e}function PropertyValueIterator(e){this._i=0,this._parts=e.parts,this._marks=[],this.value=e}function PropertyValuePart(text,line,col){var temp;if(SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type="unknown",/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vm":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"}else/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(text)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(text)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type="color",temp=RegExp.$1,3==temp.length?(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)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^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):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^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):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^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):/^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):/^url\(["']?([^\)"']+)["']?\)/i.test(text)?(this.type="uri",this.uri=RegExp.$1):/^([^\(]+)\(/i.test(text)?(this.type="function",this.name=RegExp.$1,this.value=text):/^["'][^"']*["']/.test(text)?(this.type="string",this.value=eval(text)):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)):/^[\,\/]$/.test(text)?(this.type="operator",this.value=text):/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)&&(this.type="identifier",this.value=text)}PropertyName.prototype=new SyntaxUnit,PropertyName.prototype.constructor=PropertyName,PropertyName.prototype.toString=function(){return(this.hack?this.hack:"")+this.text},PropertyValue.prototype=new SyntaxUnit,PropertyValue.prototype.constructor=PropertyValue,PropertyValueIterator.prototype.count=function(){return this._parts.length},PropertyValueIterator.prototype.isFirst=function(){return 0===this._i},PropertyValueIterator.prototype.hasNext=function(){return this._i<this._parts.length},PropertyValueIterator.prototype.mark=function(){this._marks.push(this._i)},PropertyValueIterator.prototype.peek=function(e){return this.hasNext()?this._parts[this._i+(e||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(){this._marks.length&&(this._i=this._marks.pop())},PropertyValuePart.prototype=new SyntaxUnit,PropertyValuePart.prototype.constructor=PropertyValuePart,PropertyValuePart.fromToken=function(e){return new PropertyValuePart(e.value,e.startLine,e.startCol)};var Pseudos={":first-letter":1,":first-line":1,":before":1,":after":1};function Selector(e,t,r){SyntaxUnit.call(this,e.join(" "),t,r,Parser.SELECTOR_TYPE),this.parts=e,this.specificity=Specificity.calculate(this)}function SelectorPart(e,t,r,n,i){SyntaxUnit.call(this,r,n,i,Parser.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}function SelectorSubPart(e,t,r,n){SyntaxUnit.call(this,e,r,n,Parser.SELECTOR_SUB_PART_TYPE),this.type=t,this.args=[]}function Specificity(e,t,r,n){this.a=e,this.b=t,this.c=r,this.d=n}Pseudos.ELEMENT=1,Pseudos.CLASS=2,Pseudos.isElement=function(e){return 0===e.indexOf("::")||Pseudos[e.toLowerCase()]==Pseudos.ELEMENT},Selector.prototype=new SyntaxUnit,Selector.prototype.constructor=Selector,SelectorPart.prototype=new SyntaxUnit,SelectorPart.prototype.constructor=SelectorPart,SelectorSubPart.prototype=new SyntaxUnit,SelectorSubPart.prototype.constructor=SelectorSubPart,Specificity.prototype={constructor:Specificity,compare:function(e){var t,r,n=["a","b","c","d"];for(t=0,r=n.length;t<r;t++){if(this[n[t]]<e[n[t]])return-1;if(this[n[t]]>e[n[t]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},Specificity.calculate=function(e){var t,r,n,i=0,o=0,a=0;function s(e){var t,r,n,l,u,c=e.elementName?e.elementName.text:"";for(c&&"*"!=c.charAt(c.length-1)&&a++,t=0,n=e.modifiers.length;t<n;t++)switch((u=e.modifiers[t]).type){case"class":case"attribute":o++;break;case"id":i++;break;case"pseudo":Pseudos.isElement(u.text)?a++:o++;break;case"not":for(r=0,l=u.args.length;r<l;r++)s(u.args[r])}}for(t=0,r=e.parts.length;t<r;t++)(n=e.parts[t])instanceof SelectorPart&&s(n);return new Specificity(0,i,o,a)};var h=/^[0-9a-fA-F]$/,nonascii=/^[\u0080-\uFFFF]$/,nl=/\n|\r\n|\r|\f/;function isHexDigit(e){return null!==e&&h.test(e)}function isDigit(e){return null!==e&&/\d/.test(e)}function isWhitespace(e){return null!==e&&/\s/.test(e)}function isNewLine(e){return null!==e&&nl.test(e)}function isNameStart(e){return null!==e&&/[a-z_\u0080-\uFFFF\\]/i.test(e)}function isNameChar(e){return null!==e&&(isNameStart(e)||/[0-9\-\\]/.test(e))}function isIdentStart(e){return null!==e&&(isNameStart(e)||/\-\\/.test(e))}function mix(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function TokenStream(e){TokenStreamBase.call(this,e,Tokens)}TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(e){var t,r=this._reader,n=null,i=r.getLine(),o=r.getCol();for(t=r.read();t;){switch(t){case"/":n="*"==r.peek()?this.commentToken(t,i,o):this.charToken(t,i,o);break;case"|":case"~":case"^":case"$":case"*":n="="==r.peek()?this.comparisonToken(t,i,o):this.charToken(t,i,o);break;case'"':case"'":n=this.stringToken(t,i,o);break;case"#":n=isNameChar(r.peek())?this.hashToken(t,i,o):this.charToken(t,i,o);break;case".":n=isDigit(r.peek())?this.numberToken(t,i,o):this.charToken(t,i,o);break;case"-":n="-"==r.peek()?this.htmlCommentEndToken(t,i,o):isNameStart(r.peek())?this.identOrFunctionToken(t,i,o):this.charToken(t,i,o);break;case"!":n=this.importantToken(t,i,o);break;case"@":n=this.atRuleToken(t,i,o);break;case":":n=this.notToken(t,i,o);break;case"<":n=this.htmlCommentStartToken(t,i,o);break;case"U":case"u":if("+"==r.peek()){n=this.unicodeRangeToken(t,i,o);break}default:n=isDigit(t)?this.numberToken(t,i,o):isWhitespace(t)?this.whitespaceToken(t,i,o):isIdentStart(t)?this.identOrFunctionToken(t,i,o):this.charToken(t,i,o)}break}return n||null!==t||(n=this.createToken(Tokens.EOF,null,i,o)),n},createToken:function(e,t,r,n,i){var o=this._reader;return{value:t,type:e,channel:(i=i||{}).channel,hide:i.hide||!1,startLine:r,startCol:n,endLine:o.getLine(),endCol:o.getCol()}},atRuleToken:function(e,t,r){var n,i=e,o=this._reader,a=Tokens.CHAR;return o.mark(),n=this.readName(),i=e+n,(a=Tokens.type(i.toLowerCase()))!=Tokens.CHAR&&a!=Tokens.UNKNOWN||(i.length>1?a=Tokens.UNKNOWN_SYM:(a=Tokens.CHAR,i=e,o.reset())),this.createToken(a,i,t,r)},charToken:function(e,t,r){var n=Tokens.type(e);return-1==n&&(n=Tokens.CHAR),this.createToken(n,e,t,r)},commentToken:function(e,t,r){this._reader;var n=this.readComment(e);return this.createToken(Tokens.COMMENT,n,t,r)},comparisonToken:function(e,t,r){var n=this._reader,i=e+n.read(),o=Tokens.type(i)||Tokens.CHAR;return this.createToken(o,i,t,r)},hashToken:function(e,t,r){this._reader;var n=this.readName(e);return this.createToken(Tokens.HASH,n,t,r)},htmlCommentStartToken:function(e,t,r){var n=this._reader,i=e;return n.mark(),"\x3c!--"==(i+=n.readCount(3))?this.createToken(Tokens.CDO,i,t,r):(n.reset(),this.charToken(e,t,r))},htmlCommentEndToken:function(e,t,r){var n=this._reader,i=e;return n.mark(),"--\x3e"==(i+=n.readCount(2))?this.createToken(Tokens.CDC,i,t,r):(n.reset(),this.charToken(e,t,r))},identOrFunctionToken:function(e,t,r){var n=this._reader,i=this.readName(e),o=Tokens.IDENT;return"("==n.peek()?"url("==(i+=n.read()).toLowerCase()?(o=Tokens.URI,"url("==(i=this.readURI(i)).toLowerCase()&&(o=Tokens.FUNCTION)):o=Tokens.FUNCTION:":"==n.peek()&&"progid"==i.toLowerCase()&&(i+=n.readTo("("),o=Tokens.IE_FUNCTION),this.createToken(o,i,t,r)},importantToken:function(e,t,r){var n,i,o=this._reader,a=e,s=Tokens.CHAR;for(o.mark(),i=o.read();i;){if("/"==i){if("*"!=o.peek())break;if(""===(n=this.readComment(i)))break}else{if(!isWhitespace(i)){if(/i/i.test(i)){n=o.readCount(8),/mportant/i.test(n)&&(a+=i+n,s=Tokens.IMPORTANT_SYM);break}break}a+=i+this.readWhitespace()}i=o.read()}return s==Tokens.CHAR?(o.reset(),this.charToken(e,t,r)):this.createToken(s,a,t,r)},notToken:function(e,t,r){var n=this._reader,i=e;return n.mark(),":not("==(i+=n.readCount(4)).toLowerCase()?this.createToken(Tokens.NOT,i,t,r):(n.reset(),this.charToken(e,t,r))},numberToken:function(e,t,r){var n,i=this._reader,o=this.readNumber(e),a=Tokens.NUMBER,s=i.peek();return isIdentStart(s)?(n=this.readName(i.read()),o+=n,a=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(n)?Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(n)?Tokens.ANGLE:/^ms$|^s$/i.test(n)?Tokens.TIME:/^hz$|^khz$/i.test(n)?Tokens.FREQ:/^dpi$|^dpcm$/i.test(n)?Tokens.RESOLUTION:Tokens.DIMENSION):"%"==s&&(o+=i.read(),a=Tokens.PERCENTAGE),this.createToken(a,o,t,r)},stringToken:function(e,t,r){for(var n=e,i=e,o=this._reader,a=e,s=Tokens.STRING,l=o.read();l&&(i+=l,l!=n||"\\"==a);){if(isNewLine(o.peek())&&"\\"!=l){s=Tokens.INVALID;break}a=l,l=o.read()}return null===l&&(s=Tokens.INVALID),this.createToken(s,i,t,r)},unicodeRangeToken:function(e,t,r){var n,i=this._reader,o=e,a=Tokens.CHAR;return"+"==i.peek()&&(i.mark(),o+=i.read(),2==(o+=this.readUnicodeRangePart(!0)).length?i.reset():(a=Tokens.UNICODE_RANGE,-1==o.indexOf("?")&&"-"==i.peek()&&(i.mark(),n=i.read(),1==(n+=this.readUnicodeRangePart(!1)).length?i.reset():o+=n))),this.createToken(a,o,t,r)},whitespaceToken:function(e,t,r){this._reader;var n=e+this.readWhitespace();return this.createToken(Tokens.S,n,t,r)},readUnicodeRangePart:function(e){for(var t=this._reader,r="",n=t.peek();isHexDigit(n)&&r.length<6;)t.read(),r+=n,n=t.peek();if(e)for(;"?"==n&&r.length<6;)t.read(),r+=n,n=t.peek();return r},readWhitespace:function(){for(var e=this._reader,t="",r=e.peek();isWhitespace(r);)e.read(),t+=r,r=e.peek();return t},readNumber:function(e){for(var t=this._reader,r=e,n="."==e,i=t.peek();i;){if(isDigit(i))r+=t.read();else{if("."!=i)break;if(n)break;n=!0,r+=t.read()}i=t.peek()}return r},readString:function(){for(var e=this._reader,t=e.read(),r=t,n=t,i=e.peek();i&&(i=e.read(),r+=i,i!=t||"\\"==n);){if(isNewLine(e.peek())&&"\\"!=i){r="";break}n=i,i=e.peek()}return null===i&&(r=""),r},readURI:function(e){var t=this._reader,r=e,n="",i=t.peek();for(t.mark();i&&isWhitespace(i);)t.read(),i=t.peek();for(n="'"==i||'"'==i?this.readString():this.readURL(),i=t.peek();i&&isWhitespace(i);)t.read(),i=t.peek();return""===n||")"!=i?(r=e,t.reset()):r+=n+t.read(),r},readURL:function(){for(var e=this._reader,t="",r=e.peek();/^[!#$%&\\*-~]$/.test(r);)t+=e.read(),r=e.peek();return t},readName:function(e){for(var t=this._reader,r=e||"",n=t.peek();;)if("\\"==n)r+=this.readEscape(t.read()),n=t.peek();else{if(!n||!isNameChar(n))break;r+=t.read(),n=t.peek()}return r},readEscape:function(e){var t=this._reader,r=e||"",n=0,i=t.peek();if(isHexDigit(i))do{r+=t.read(),i=t.peek()}while(i&&isHexDigit(i)&&++n<6);return 3==r.length&&/\s/.test(i)||7==r.length||1==r.length?t.read():i="",r+i},readComment:function(e){var t=this._reader,r=e||"",n=t.read();if("*"==n){for(;n;){if((r+=n).length>2&&"*"==n&&"/"==t.peek()){r+=t.read();break}n=t.read()}return r}return""}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,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:"VIEWPORT_SYM",text:"@viewport"},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-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 e=[],t={};Tokens.UNKNOWN=-1,Tokens.unshift({name:"EOF"});for(var r=0,n=Tokens.length;r<n;r++)if(e.push(Tokens[r].name),Tokens[Tokens[r].name]=r,Tokens[r].text)if(Tokens[r].text instanceof Array)for(var i=0;i<Tokens[r].text.length;i++)t[Tokens[r].text[i]]=r;else t[Tokens[r].text]=r;Tokens.name=function(t){return e[t]},Tokens.type=function(e){return t[e]||-1}}();var Validation={validate:function(e,t){var r=e.toString().toLowerCase(),n=(t.parts,new PropertyValueIterator(t)),i=Properties[r];if(i)"number"!=typeof i&&("string"==typeof i?i.indexOf("||")>-1?this.groupProperty(i,n):this.singleProperty(i,n,1):i.multi?this.multiProperty(i.multi,n,i.comma,i.max||1/0):"function"==typeof i&&i(n));else if(0!==r.indexOf("-"))throw new ValidationError("Unknown property '"+e+"'.",e.line,e.col)},singleProperty:function(e,t,r,n){for(var i,o=!1,a=t.value,s=0;t.hasNext()&&s<r&&(o=ValidationTypes.isAny(t,e));)s++;if(!o)throw t.hasNext()&&!t.isFirst()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col);if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)},multiProperty:function(e,t,r,n){for(var i,o=!1,a=t.value,s=0;t.hasNext()&&!o&&s<n&&ValidationTypes.isAny(t,e);)if(s++,t.hasNext()){if(r){if(","!=t.peek())break;i=t.next()}}else o=!0;if(!o)throw t.hasNext()&&!t.isFirst()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):(i=t.previous(),r&&","==i?new ValidationError("Expected end of value but found '"+i+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col));if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)},groupProperty:function(e,t,r){for(var n,i,o=!1,a=t.value,s=e.split("||").length,l={count:0},u=!1;t.hasNext()&&!o&&(n=ValidationTypes.isAnyOfGroup(t,e))&&!l[n];)l[n]=1,l.count++,u=!0,l.count!=s&&t.hasNext()||(o=!0);if(!o)throw u&&t.hasNext()?new ValidationError("Expected end of value but found '"+(i=t.peek())+"'.",i.line,i.col):new ValidationError("Expected ("+e+") but found '"+a+"'.",a.line,a.col);if(t.hasNext())throw new ValidationError("Expected end of value but found '"+(i=t.next())+"'.",i.line,i.col)}};function ValidationError(e,t,r){this.col=r,this.line=t,this.message=e}ValidationError.prototype=new Error;var ValidationTypes={isLiteral:function(e,t){var r,n,i=e.text.toString().toLowerCase(),o=t.split(" | "),a=!1;for(r=0,n=o.length;r<n&&!a;r++)i==o[r].toLowerCase()&&(a=!0);return a},isSimple:function(e){return!!this.simple[e]},isComplex:function(e){return!!this.complex[e]},isAny:function(e,t){var r,n,i=t.split(" | "),o=!1;for(r=0,n=i.length;r<n&&!o&&e.hasNext();r++)o=this.isType(e,i[r]);return o},isAnyOfGroup:function(e,t){var r,n,i=t.split(" || "),o=!1;for(r=0,n=i.length;r<n&&!o;r++)o=this.isType(e,i[r]);return!!o&&i[r-1]},isType:function(e,t){var r=e.peek(),n=!1;return"<"!=t.charAt(0)?(n=this.isLiteral(r,t))&&e.next():this.simple[t]?(n=this.simple[t](r))&&e.next():n=this.complex[t](e),n},simple:{"<absolute-size>":function(e){return ValidationTypes.isLiteral(e,"xx-small | x-small | small | medium | large | x-large | xx-large")},"<attachment>":function(e){return ValidationTypes.isLiteral(e,"scroll | fixed | local")},"<attr>":function(e){return"function"==e.type&&"attr"==e.name},"<bg-image>":function(e){return this["<image>"](e)||this["<gradient>"](e)||"none"==e},"<gradient>":function(e){return"function"==e.type&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)},"<box>":function(e){return ValidationTypes.isLiteral(e,"padding-box | border-box | content-box")},"<content>":function(e){return"function"==e.type&&"content"==e.name},"<relative-size>":function(e){return ValidationTypes.isLiteral(e,"smaller | larger")},"<ident>":function(e){return"identifier"==e.type},"<length>":function(e){return!("function"!=e.type||!/^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(e))||("length"==e.type||"number"==e.type||"integer"==e.type||"0"==e)},"<color>":function(e){return"color"==e.type||"transparent"==e},"<number>":function(e){return"number"==e.type||this["<integer>"](e)},"<integer>":function(e){return"integer"==e.type},"<line>":function(e){return"integer"==e.type},"<angle>":function(e){return"angle"==e.type},"<uri>":function(e){return"uri"==e.type},"<image>":function(e){return this["<uri>"](e)},"<percentage>":function(e){return"percentage"==e.type||"0"==e},"<border-width>":function(e){return this["<length>"](e)||ValidationTypes.isLiteral(e,"thin | medium | thick")},"<border-style>":function(e){return ValidationTypes.isLiteral(e,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"<margin-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)||ValidationTypes.isLiteral(e,"auto")},"<padding-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)},"<shape>":function(e){return"function"==e.type&&("rect"==e.name||"inset-rect"==e.name)},"<time>":function(e){return"time"==e.type}},complex:{"<bg-position>":function(e){for(var t=!1,r="<percentage> | <length>",n="left | right",i="top | bottom",o=0;e.peek(o)&&","!=e.peek(o);)o++;return o<3?ValidationTypes.isAny(e,n+" | center | "+r)?(t=!0,ValidationTypes.isAny(e,i+" | center | "+r)):ValidationTypes.isAny(e,i)&&(t=!0,ValidationTypes.isAny(e,n+" | center")):ValidationTypes.isAny(e,n)?ValidationTypes.isAny(e,i)?(t=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,r)&&(ValidationTypes.isAny(e,i)?(t=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,"center")&&(t=!0)):ValidationTypes.isAny(e,i)?ValidationTypes.isAny(e,n)?(t=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,r)&&(ValidationTypes.isAny(e,n)?(t=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,"center")&&(t=!0)):ValidationTypes.isAny(e,"center")&&ValidationTypes.isAny(e,n+" | "+i)&&(t=!0,ValidationTypes.isAny(e,r)),t},"<bg-size>":function(e){var t=!1,r="<percentage> | <length> | auto";return ValidationTypes.isAny(e,"cover | contain")?t=!0:ValidationTypes.isAny(e,r)&&(t=!0,ValidationTypes.isAny(e,r)),t},"<repeat-style>":function(e){var t,r=!1,n="repeat | space | round | no-repeat";return e.hasNext()&&(t=e.next(),ValidationTypes.isLiteral(t,"repeat-x | repeat-y")?r=!0:ValidationTypes.isLiteral(t,n)&&(r=!0,e.hasNext()&&ValidationTypes.isLiteral(e.peek(),n)&&e.next())),r},"<shadow>":function(e){var t=!1,r=0,n=!1,i=!1;if(e.hasNext()){for(ValidationTypes.isAny(e,"inset")&&(n=!0),ValidationTypes.isAny(e,"<color>")&&(i=!0);ValidationTypes.isAny(e,"<length>")&&r<4;)r++;e.hasNext()&&(i||ValidationTypes.isAny(e,"<color>"),n||ValidationTypes.isAny(e,"inset")),t=r>=2&&r<=4}return t},"<x-one-radius>":function(e){var t=!1,r="<length> | <percentage> | inherit";return ValidationTypes.isAny(e,r)&&(t=!0,ValidationTypes.isAny(e,r)),t}}};return 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},parserlib}),define("skylark-texts-css/primitives/csslint",["./parser-lib"],function(e){var t,r=function(){var t=[],r=[],i=/\/\*csslint([^\*]*)\*\//,o=new e.util.EventTarget;return o.version="0.10.0",o.addRule=function(e){t.push(e),t[e.id]=e},o.clearRules=function(){t=[]},o.getRules=function(){return[].concat(t).sort(function(e,t){return e.id>t.id?1:0})},o.getRuleset=function(){for(var e={},r=0,n=t.length;r<n;)e[t[r++].id]=1;return e},o.addFormatter=function(e){r[e.id]=e},o.getFormatter=function(e){return r[e]},o.format=function(e,t,r,n){var i=this.getFormatter(r),o=null;return i&&(o=i.startFormat(),o+=i.formatResults(e,t,n||{}),o+=i.endFormat()),o},o.hasFormat=function(e){return r.hasOwnProperty(e)},o.verify=function(r,o){var a,s,l,u=0,c=(t.length,new e.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1}));for(u in s=r.replace(/\n\r?/g,"$split$").split("$split$"),o||(o=this.getRuleset()),i.test(r)&&(o=function(e,t){var r,n=e&&e.match(i),o=n&&n[1];o&&(r={true:2,"":1,false:0,2:2,1:1,0:0},o.toLowerCase().split(",").forEach(function(e){var n=e.split(":"),i=n[0]||"",o=n[1]||"";t[i.trim()]=r[o.trim()]}));return t}(r,o)),a=new n(s,o),o.errors=2,o)o.hasOwnProperty(u)&&o[u]&&t[u]&&t[u].init(c,a);try{c.parse(r)}catch(e){a.error("Fatal error, cannot continue: "+e.message,e.line,e.col,{})}return(l={messages:a.messages,stats:a.stats,ruleset:a.ruleset}).messages.sort(function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line}),l},o}();function n(e,t){this.messages=[],this.stats=[],this.lines=e,this.ruleset=t}return n.prototype={constructor:n,error:function(e,t,r,n){this.messages.push({type:"error",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n||{}})},warn:function(e,t,r,n){this.report(e,t,r,n)},report:function(e,t,r,n){this.messages.push({type:2==this.ruleset[n.id]?"error":"warning",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})},info:function(e,t,r,n){this.messages.push({type:"info",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})},rollupError:function(e,t){this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){this.stats[e]=t}},r._Reporter=n,r.Util={mix:function(e,t){var r;for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return r},indexOf:function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t){if(e.forEach)return e.forEach(t);for(var r=0,n=e.length;r<n;r++)t(e[r],r,e)}},r.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(e,t){var r=this;e.addListener("startrule",function(n){var i,o,a,s,l,u,c=n.selectors;for(s=0;s<c.length;s++)for(i=c[s],l=0;l<i.parts.length;l++)if((o=i.parts[l]).type==e.SELECTOR_PART_TYPE)for(a=0,u=0;u<o.modifiers.length;u++)"class"==o.modifiers[u].type&&a++,a>1&&t.report("Don't use adjoining classes.",o.line,o.col,r)})}}),r.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(e,t){var r,n=this,i={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},o={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},a=!1;function s(){r={},a=!1}function l(){var e,s;if(!a){if(r.height)for(e in o)o.hasOwnProperty(e)&&r[e]&&(s=r[e].value,"padding"==e&&2===s.parts.length&&0===s.parts[0].value||t.report("Using height with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n));if(r.width)for(e in i)i.hasOwnProperty(e)&&r[e]&&(s=r[e].value,"padding"==e&&2===s.parts.length&&0===s.parts[1].value||t.report("Using width with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n))}}e.addListener("startrule",s),e.addListener("startfontface",s),e.addListener("startpage",s),e.addListener("startpagemargin",s),e.addListener("startkeyframerule",s),e.addListener("property",function(e){var t=e.property.text.toLowerCase();o[t]||i[t]?/^0\S*$/.test(e.value)||"border"==t&&"none"==e.value||(r[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?r[t]=1:"box-sizing"==t&&(a=!0)}),e.addListener("endrule",l),e.addListener("endfontface",l),e.addListener("endpage",l),e.addListener("endpagemargin",l),e.addListener("endkeyframerule",l)}}),r.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(e,t){var r=this;e.addListener("property",function(e){var n=e.property.text.toLowerCase();"box-sizing"==n&&t.report("The box-sizing property isn't supported in IE6 and IE7.",e.line,e.col,r)})}}),r.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",browsers:"All",init:function(e,t){var r,n,i=this,o=!1,a=!0,s=!1;e.addListener("startfontface",function(e){o=!0}),e.addListener("property",function(e){if(o){var t=e.property.toString().toLowerCase(),i=e.value.toString();if(r=e.line,n=e.col,"src"===t){var l=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!i.match(l)&&a?(s=!0,a=!1):i.match(l)&&!a&&(s=!1)}}}),e.addListener("endfontface",function(e){o=!1,s&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",r,n,i)})}}),r.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(e,t){var n,i,o,a,s,l,u,c=this,d=!1,h=Array.prototype.push,p=[];for(o in n={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",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","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","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"})if(n.hasOwnProperty(o)){for(a=[],s=n[o].split(" "),l=0,u=s.length;l<u;l++)a.push("-"+s[l]+"-"+o);n[o]=a,h.apply(p,a)}e.addListener("startrule",function(){i=[]}),e.addListener("startkeyframes",function(e){d=e.prefix||!0}),e.addListener("endkeyframes",function(e){d=!1}),e.addListener("property",function(e){var t=e.property;r.Util.indexOf(p,t.text)>-1&&(d&&"string"==typeof d&&0===t.text.indexOf("-"+d+"-")||i.push(t))}),e.addListener("endrule",function(e){if(i.length){var o,a,s,l,u,d,h,p,m,f,g={};for(o=0,a=i.length;o<a;o++)for(l in s=i[o],n)n.hasOwnProperty(l)&&(u=n[l],r.Util.indexOf(u,s.text)>-1&&(g[l]||(g[l]={full:u.slice(0),actual:[],actualNodes:[]}),-1===r.Util.indexOf(g[l].actual,s.text)&&(g[l].actual.push(s.text),g[l].actualNodes.push(s))));for(l in g)if(g.hasOwnProperty(l)&&(d=g[l],h=d.full,p=d.actual,h.length>p.length))for(o=0,a=h.length;o<a;o++)m=h[o],-1===r.Util.indexOf(p,m)&&(f=1===p.length?p[0]:2==p.length?p.join(" and "):p.join(", "),t.report("The property "+m+" is compatible with "+f+" and should be included as well.",d.actualNodes[0].line,d.actualNodes[0].col,c))}})}}),r.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(e,t){var r,n=this,i={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};function o(e,o,a){r[e]&&("string"==typeof i[e]&&r[e].value.toLowerCase()==i[e]||t.report(a||e+" can't be used with display: "+o+".",r[e].line,r[e].col,n))}function a(){r={}}function s(){var e=r.display?r.display.value:null;if(e)switch(e){case"inline":o("height",e),o("width",e),o("margin",e),o("margin-top",e),o("margin-bottom",e),o("float",e,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":o("vertical-align",e);break;case"inline-block":o("float",e);break;default:0===e.indexOf("table-")&&(o("margin",e),o("margin-left",e),o("margin-right",e),o("margin-top",e),o("margin-bottom",e),o("float",e))}}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startkeyframerule",a),e.addListener("startpagemargin",a),e.addListener("startpage",a),e.addListener("property",function(e){var t=e.property.text.toLowerCase();i[t]&&(r[t]={value:e.value.text,line:e.property.line,col:e.property.col})}),e.addListener("endrule",s),e.addListener("endfontface",s),e.addListener("endkeyframerule",s),e.addListener("endpagemargin",s),e.addListener("endpage",s)}}),r.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(e,t){var r=this,n={};e.addListener("property",function(e){var i,o,a=e.property.text,s=e.value;if(a.match(/background/i))for(i=0,o=s.parts.length;i<o;i++)"uri"==s.parts[i].type&&(void 0===n[s.parts[i].uri]?n[s.parts[i].uri]=e:t.report("Background image '"+s.parts[i].uri+"' was used multiple times, first declared at line "+n[s.parts[i].uri].line+", col "+n[s.parts[i].uri].col+".",e.line,e.col,r))})}}),r.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(e,t){var r,n,i=this;function o(e){r={}}e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("property",function(e){var o=e.property,a=o.text.toLowerCase();!r[a]||n==a&&r[a]!=e.value.text||t.report("Duplicate property '"+e.property+"' found.",e.line,e.col,i),r[a]=e.value.text,n=a})}}),r.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(e,t){var r=this,n=0;e.addListener("startrule",function(){n=0}),e.addListener("property",function(){n++}),e.addListener("endrule",function(e){var i=e.selectors;0===n&&t.report("Rule is empty.",i[0].line,i[0].col,r)})}}),r.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(e,t){var r=this;e.addListener("error",function(e){t.error(e.message,e.line,e.col,r)})}}),r.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(e,t){var r,n=this,i={color:1,background:1,"border-color":1,"border-top-color":1,"border-right-color":1,"border-bottom-color":1,"border-left-color":1,border:1,"border-top":1,"border-right":1,"border-bottom":1,"border-left":1,"background-color":1};function o(e){({}),r=null}e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("property",function(e){var o=e.property,a=o.text.toLowerCase(),s=e.value.parts,l=0,u="",c=s.length;if(i[a])for(;l<c;)"color"==s[l].type&&("alpha"in s[l]||"hue"in s[l]?(/([^\)]+)\(/.test(s[l])&&(u=RegExp.$1.toUpperCase()),r&&r.property.text.toLowerCase()==a&&"compat"==r.colorType||t.report("Fallback "+a+" (hex or RGB) should precede "+u+" "+a+".",e.line,e.col,n)):e.colorType="compat"),l++;r=e})}}),r.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(e,t){var r=this,n=0;e.addListener("property",function(e){"float"==e.property.text.toLowerCase()&&"none"!=e.value.text.toLowerCase()&&n++}),e.addListener("endstylesheet",function(){t.stat("floats",n),n>=10&&t.rollupWarn("Too many floats ("+n+"), you're probably using them for layout. Consider using a grid system instead.",r)})}}),r.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(e,t){var r=this,n=0;e.addListener("startfontface",function(){n++}),e.addListener("endstylesheet",function(){n>5&&t.rollupWarn("Too many @font-face declarations ("+n+").",r)})}}),r.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(e,t){var r=this,n=0;e.addListener("property",function(e){"font-size"==e.property&&n++}),e.addListener("endstylesheet",function(){t.stat("font-sizes",n),n>=10&&t.rollupWarn("Too many font-size declarations ("+n+"), abstraction needed.",r)})}}),r.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(e,t){var r,n=this;e.addListener("startrule",function(){r={moz:0,webkit:0,oldWebkit:0,o:0}}),e.addListener("property",function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?r[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(r.oldWebkit=1)}),e.addListener("endrule",function(e){var i=[];r.moz||i.push("Firefox 3.6+"),r.webkit||i.push("Webkit (Safari 5+, Chrome)"),r.oldWebkit||i.push("Old Webkit (Safari 4+, Chrome)"),r.o||i.push("Opera 11.1+"),i.length&&i.length<4&&t.report("Missing vendor-prefixed CSS gradients for "+i.join(", ")+".",e.selectors[0].line,e.selectors[0].col,n)})}}),r.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(e,t){var r=this;e.addListener("startrule",function(n){var i,o,a,s,l,u,c=n.selectors;for(s=0;s<c.length;s++){for(i=c[s],a=0,l=0;l<i.parts.length;l++)if((o=i.parts[l]).type==e.SELECTOR_PART_TYPE)for(u=0;u<o.modifiers.length;u++)"id"==o.modifiers[u].type&&a++;1==a?t.report("Don't use IDs in selectors.",i.line,i.col,r):a>1&&t.report(a+" IDs in the selector, really?",i.line,i.col,r)}})}}),r.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(e,t){var r=this;e.addListener("import",function(e){t.report("@import prevents parallel downloads, use <link> instead.",e.line,e.col,r)})}}),r.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(e,t){var r=this,n=0;e.addListener("property",function(e){!0===e.important&&(n++,t.report("Use of !important",e.line,e.col,r))}),e.addListener("endstylesheet",function(){t.stat("important",n),n>=10&&t.rollupWarn("Too many !important declarations ("+n+"), try to use less than 10 to avoid specificity issues.",r)})}}),r.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",browsers:"All",init:function(e,t){var r=this;e.addListener("property",function(e){e.property.text.toLowerCase();e.invalid&&t.report(e.invalid.message,e.line,e.col,r)})}}),r.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(e,t){var r,n=this;function i(e){r=e.selectors?{line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:null}function o(e){r&&r.outline&&(-1==r.selectors.toString().toLowerCase().indexOf(":focus")?t.report("Outlines should only be modified using :focus.",r.line,r.col,n):1==r.propCount&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",r.line,r.col,n))}e.addListener("startrule",i),e.addListener("startfontface",i),e.addListener("startpage",i),e.addListener("startpagemargin",i),e.addListener("startkeyframerule",i),e.addListener("property",function(e){var t=e.property.text.toLowerCase(),n=e.value;r&&(r.propCount++,"outline"!=t||"none"!=n&&"0"!=n||(r.outline=!0))}),e.addListener("endrule",o),e.addListener("endfontface",o),e.addListener("endpage",o),e.addListener("endpagemargin",o),e.addListener("endkeyframerule",o)}}),r.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(e,t){var r=this,n={};e.addListener("startrule",function(i){var o,a,s,l,u,c,d=i.selectors;for(l=0;l<d.length;l++)for(o=d[l],u=0;u<o.parts.length;u++)if((a=o.parts[u]).type==e.SELECTOR_PART_TYPE)for(c=0;c<a.modifiers.length;c++)s=a.modifiers[c],a.elementName&&"id"==s.type?t.report("Element ("+a+") is overqualified, just use "+s+" without element name.",a.line,a.col,r):"class"==s.type&&(n[s]||(n[s]=[]),n[s].push({modifier:s,part:a}))}),e.addListener("endstylesheet",function(){var e;for(e in n)n.hasOwnProperty(e)&&1==n[e].length&&n[e][0].part.elementName&&t.report("Element ("+n[e][0].part+") is overqualified, just use "+n[e][0].modifier+" without element name.",n[e][0].part.line,n[e][0].part.col,r)})}}),r.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(e,t){var r=this;e.addListener("startrule",function(n){var i,o,a,s,l=n.selectors;for(a=0;a<l.length;a++)for(i=l[a],s=0;s<i.parts.length;s++)(o=i.parts[s]).type==e.SELECTOR_PART_TYPE&&o.elementName&&/h[1-6]/.test(o.elementName.toString())&&s>0&&t.report("Heading ("+o.elementName+") should not be qualified.",o.line,o.col,r)})}}),r.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(e,t){var r=this;e.addListener("startrule",function(n){var i,o,a,s,l,u,c=n.selectors;for(s=0;s<c.length;s++)for(i=c[s],l=0;l<i.parts.length;l++)if((o=i.parts[l]).type==e.SELECTOR_PART_TYPE)for(u=0;u<o.modifiers.length;u++)"attribute"==(a=o.modifiers[u]).type&&/([\~\|\^\$\*]=)/.test(a)&&t.report("Attribute selectors with "+RegExp.$1+" are slow!",a.line,a.col,r)})}}),r.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(e,t){var r=0;e.addListener("startrule",function(){r++}),e.addListener("endstylesheet",function(){t.stat("rule-count",r)})}}),r.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(e,t){var r=this,n=0;e.addListener("startrule",function(e){n+=e.selectors.length}),e.addListener("endstylesheet",function(){n>=3800&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)})}}),r.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){var r=this,n=0;e.addListener("startrule",function(e){n+=e.selectors.length}),e.addListener("endstylesheet",function(){n>4095&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)})}}),r.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(e,t){var r,n,i,o,a=this,s={},l={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(r in l)if(l.hasOwnProperty(r))for(n=0,i=l[r].length;n<i;n++)s[l[r][n]]=r;function u(e){o={}}function c(e){var r,n,i,s;for(r in l)if(l.hasOwnProperty(r)){for(s=0,n=0,i=l[r].length;n<i;n++)s+=o[l[r][n]]?1:0;s==l[r].length&&t.report("The properties "+l[r].join(", ")+" can be replaced by "+r+".",e.line,e.col,a)}}e.addListener("startrule",u),e.addListener("startfontface",u),e.addListener("property",function(e){var t=e.property.toString().toLowerCase();e.value.parts[0].value;s[t]&&(o[t]=1)}),e.addListener("endrule",c),e.addListener("endfontface",c)}}),r.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(e,t){var r=this;e.addListener("property",function(e){var n=e.property;"*"==n.hack&&t.report("Property with star prefix found.",e.property.line,e.property.col,r)})}}),r.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(e,t){var r,n,i=this;function o(e){r=!1,n="inherit"}function a(e){r&&"ltr"!=n&&t.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.",r.line,r.col,i)}e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("property",function(e){var t=e.property.toString().toLowerCase(),i=e.value;"text-indent"==t&&i.parts[0].value<-99?r=e.property:"direction"==t&&"ltr"==i&&(n="ltr")}),e.addListener("endrule",a),e.addListener("endfontface",a)}}),r.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(e,t){var r=this;e.addListener("property",function(e){var n=e.property;"_"==n.hack&&t.report("Property with underscore prefix found.",e.property.line,e.property.col,r)})}}),r.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(e,t){var r=this,n={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};e.addListener("startrule",function(e){var i,o,a,s,l,u=e.selectors;for(s=0;s<u.length;s++)if(i=u[s],(o=i.parts[i.parts.length-1]).elementName&&/(h[1-6])/i.test(o.elementName.toString())){for(l=0;l<o.modifiers.length;l++)if("pseudo"==o.modifiers[l].type){a=!0;break}a||(n[RegExp.$1]++,n[RegExp.$1]>1&&t.report("Heading ("+o.elementName+") has already been defined.",o.line,o.col,r))}}),e.addListener("endstylesheet",function(e){var i,o=[];for(i in n)n.hasOwnProperty(i)&&n[i]>1&&o.push(n[i]+" "+i+"s");o.length&&t.rollupWarn("You have "+o.join(", ")+" defined in this stylesheet.",r)})}}),r.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(e,t){var r=this;e.addListener("startrule",function(e){var n,i,o,a=e.selectors;for(o=0;o<a.length;o++)n=a[o],"*"==(i=n.parts[n.parts.length-1]).elementName&&t.report(r.desc,i.line,i.col,r)})}}),r.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",browsers:"All",init:function(e,t){var r=this;e.addListener("startrule",function(n){var i,o,a,s,l=n.selectors;for(a=0;a<l.length;a++)if(i=l[a],(o=i.parts[i.parts.length-1]).type==e.SELECTOR_PART_TYPE)for(s=0;s<o.modifiers.length;s++)"attribute"!=o.modifiers[s].type||o.elementName&&"*"!=o.elementName||t.report(r.desc,o.line,o.col,r)})}}),r.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(e,t){var r,n,i=this,o={"-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 a(){r={},n=1}function s(e){var n,a,s,l,u,c=[];for(n in r)o[n]&&c.push({actual:n,needed:o[n]});for(a=0,s=c.length;a<s;a++)l=c[a].needed,u=c[a].actual,r[l]?r[l][0].pos<r[u][0].pos&&t.report("Standard property '"+l+"' should come after vendor-prefixed property '"+u+"'.",r[u][0].name.line,r[u][0].name.col,i):t.report("Missing standard property '"+l+"' to go along with '"+u+"'.",r[u][0].name.line,r[u][0].name.col,i)}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startpage",a),e.addListener("startpagemargin",a),e.addListener("startkeyframerule",a),e.addListener("property",function(e){var t=e.property.text.toLowerCase();r[t]||(r[t]=[]),r[t].push({name:e.property,value:e.value,pos:n++})}),e.addListener("endrule",s),e.addListener("endfontface",s),e.addListener("endpage",s),e.addListener("endpagemargin",s),e.addListener("endkeyframerule",s)}}),r.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(e,t){var r=this;e.addListener("property",function(e){for(var n=e.value.parts,i=0,o=n.length;i<o;)!n[i].units&&"percentage"!=n[i].type||0!==n[i].value||"time"==n[i].type||t.report("Values of 0 shouldn't have units specified.",n[i].line,n[i].col,r),i++})}}),t=function(e){return e&&e.constructor===String?e.replace(/[\"&><]/g,function(e){switch(e){case'"':return"&quot;";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;"}}):""},r.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(e,r){return'<file name="'+t(e)+'"><error line="0" column="0" severty="error" message="'+t(r)+'"></error></file>'},formatResults:function(e,n,i){var o=e.messages,a=[];return o.length>0&&(a.push('<file name="'+n+'">'),r.Util.forEach(o,function(e,r){var n;e.rollup||a.push('<error line="'+e.line+'" column="'+e.col+'" severity="'+e.type+'" message="'+t(e.message)+'" source="'+((n=e.rule)&&"name"in n?"net.csslint."+n.name.replace(/\s/g,""):"")+'"/>')}),a.push("</file>")),a.join("")}}),r.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,t,n){var i=e.messages,o="";n=n||{};var a=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return 0===i.length?n.quiet?"":t+": Lint Free!":(r.Util.forEach(i,function(e,r){e.rollup?o+=t+": "+a(e.type)+" - "+e.message+"\n":o+=t+": line "+e.line+", col "+e.col+", "+a(e.type)+" - "+e.message+"\n"}),o)}}),r.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(e,t,n){var i=e.messages,o=[],a=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return i.length>0&&(o.push('<file name="'+t+'">'),r.Util.forEach(i,function(e,t){e.rollup?o.push('<issue severity="'+e.type+'" reason="'+a(e.message)+'" evidence="'+a(e.evidence)+'"/>'):o.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+a(e.message)+'" evidence="'+a(e.evidence)+'"/>')}),o.push("</file>")),o.join("")}}),r.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><testsuites>'},endFormat:function(){return"</testsuites>"},formatResults:function(e,t,r){var n=e.messages,i=[],o={error:0,failure:0},a=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return n.length>0&&(n.forEach(function(e,t){var r="warning"===e.type?"error":e.type;e.rollup||(i.push('<testcase time="0" name="'+function(e){if(!(e&&"name"in e))return"";return"net.csslint."+e.name.replace(/\s/g,"")}(e.rule)+'">'),i.push("<"+r+' message="'+a(e.message)+'"><![CDATA['+e.line+":"+e.col+":"+a(e.evidence)+"]]></"+r+">"),i.push("</testcase>"),o[r]+=1)}),i.unshift('<testsuite time="0" tests="'+n.length+'" skipped="0" errors="'+o.error+'" failures="'+o.failure+'" package="net.csslint" name="'+t+'">'),i.push("</testsuite>")),i.join("")}}),r.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(e,t,n){var i=e.messages,o=[],a=function(e){return e&&e.constructor===String?e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""};return i.length>0&&(o.push('<file name="'+t+'">'),r.Util.forEach(i,function(e,t){e.rollup?o.push('<issue severity="'+e.type+'" reason="'+a(e.message)+'" evidence="'+a(e.evidence)+'"/>'):o.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+a(e.message)+'" evidence="'+a(e.evidence)+'"/>')}),o.push("</file>")),o.join("")}}),r.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,t,n){var i=e.messages,o="";if(n=n||{},0===i.length)return n.quiet?"":"\n\ncsslint: No errors in "+t+".";o="\n\ncsslint: There are "+i.length+" problems in "+t+".";var a=t.lastIndexOf("/"),s=t;return-1===a&&(a=t.lastIndexOf("\\")),a>-1&&(s=t.substring(a+1)),r.Util.forEach(i,function(e,t){o=o+"\n\n"+s,e.rollup?(o+="\n"+(t+1)+": "+e.type,o+="\n"+e.message):(o+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,o+="\n"+e.message,o+="\n"+e.evidence)}),o}}),r}),define("skylark-texts-css/Lint",["./css","./primitives/csslint"],function(e,t){return e.Lint=t}),define("skylark-texts-css/Parser",["skylark-langx/langx","./css","./primitives/parser-lib"],function(e,t,r){var n=t.Parser=r.css.Parser;return e.mixin(n,r.css),n}),define("skylark-texts-css/toJSON",["skylark-langx/langx","./css","./Parser"],function(e,t,r){var n=e.klass({init:function(e){this._ordered=e&&e.ordered||!1},begin:function(){var e=this._ordered,t=this._stack=[];e?t.push([]):t.push({}),this._result=null},end:function(e){var t=this._stack;if(this._stack=null,e||1!==t.length)throw new Error("parse error");return this._result=t[0],this._result},beginBlock:function(e){this._stack.push(e)},endBlock:function(t){t&&this._orderd;var r=this._stack,n=r.pop(),i=r[r.length-1],o=i.values||i;if(e.isArray(o)){var a={};a[n.name]=n.values,o.push(a)}else o[n.name]=n.values},prop:function(e,t,r){r&&(t+=" !important");var n=this._stack,i=n[n.length-1];i.values[e]=t},result:function(){return this._result}});return t.toJSON=function(e,t){var i=new r({starHack:!1,ieFilters:!1,strict:!1}),o=new n(t);return i.addListener("startstylesheet",function(){o.begin()}),i.addListener("endstylesheet",function(){o.end()}),i.addListener("charset",function(e){o.beginBlock({name:"@charset",values:e.charset}),o.endBlock()}),i.addListener("namespace",function(e){var t="@Namespace";e.prefix&&(t=t+" "+e.prefix),o.beginBlock({name:t,values:'"'+e.uri+'"'}),o.endBlock()}),i.addListener("startfontface",function(e){}),i.addListener("endfontface",function(e){}),i.addListener("startkeyframes",function(e){o.beginBlock({name:"@keyframes "+e.name,values:{}})}),i.addListener("startkeyframerule",function(e){for(var t="",r=0,n=e.keys.length;r<n;r++){var i=e.keys[r].text;t=t?t+","+i:i}o.beginBlock({name:t,values:{}})}),i.addListener("endkeyframerule",function(e){o.endBlock(!1)}),i.addListener("endkeyframes",function(e){o.endBlock(!1)}),i.addListener("startpage",function(e){log("Starting page with ID="+e.id+" and pseudo="+e.pseudo);var t="@page";e.pseudo&&(t=t+" "+e.pseudo),o.beginBlock({name:t,values:{}})}),i.addListener("endpage",function(e){log("Ending page with ID="+e.id+" and pseudo="+e.pseudo),o.endBlock(!1)}),i.addListener("startpagemargin",function(e){log("Starting page margin "+e.margin),o.beginBlock({name:"@page-margin",values:{}})}),i.addListener("endpagemargin",function(e){log("Ending page margin "+e.margin),o.endBlock(!1)}),i.addListener("starttopcenter",function(e){o.beginBlock({name:"@top-center",values:{}})}),i.addListener("endtopcenter",function(e){o.endBlock(!1)}),i.addListener("import",function(e){log("Importing "+e.uri+" for media types ["+e.media+"]");var t="@import "+e.uri;e.media&&(t=t+" "+e.media),o.beginBlock({name:t,values:""}),o.endBlock(!0)}),i.addListener("startrule",function(e){for(var t="",r=0,n=e.selectors.length;r<n;r++){var i=e.selectors[r];t=t?t+","+i.text:i.text}o.beginBlock({name:t,values:{}})}),i.addListener("endrule",function(e){o.endBlock(!0)}),i.addListener("property",function(e){o.prop(e.property.text,e.value.text,e.important)}),i.addListener("startmedia",function(e){o.beginBlock({name:"@media "+e.media,values:{}})}),i.addListener("endmedia",function(e){o.endBlock(!0)}),i.addListener("error",function(e){o.end(!1)}),i.parse(document.getElementById("input").value),o.result()}}),define("skylark-texts-css/main",["./css","./beautify","./Lint","./Parser","./toJSON"],function(e){return e}),define("skylark-texts-css",["skylark-texts-css/main"],function(e){return e})}(define,require),!isAmd){var skylarkjs=require("skylark-langx-ns");isCmd?module.exports=skylarkjs:globals.skylarkjs=skylarkjs}}(0,this);
  //# sourceMappingURL=sourcemaps/skylark-texts-css.js.map
  