Comparing version 0.9.1 to 0.9.2
@@ -0,1 +1,7 @@ | ||
## 0.9.2 (January 06, 2016) | ||
- variables `$foo: ;` -> `~~foo: ;` and `color: var(~~foo);` | ||
- prevent variable declarations in selectors | ||
- improve animation name finder | ||
## 0.9.1 (January 06, 2016) | ||
@@ -2,0 +8,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "stylis is a small css compiler", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"homepage": "https://github.com/thysultan/stylis.js", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -19,3 +19,3 @@ # Stylis | ||
// variables | ||
$foo: 20px; | ||
~~foo: 20px; | ||
@@ -25,3 +25,3 @@ // flat css | ||
font-family: sans-serif; | ||
width: $foo; | ||
width: var(~~foo); | ||
@@ -112,7 +112,7 @@ // emulation for shadow dom selectors | ||
// function mixins | ||
@mixin linx ($link, $visit, $hover, $active) { | ||
@mixin linx (link, visit, hover, active) { | ||
a { | ||
color: $link; | ||
color: var(~~link); | ||
&:hover { | ||
color: $hover; | ||
color: var(~~hover); | ||
} | ||
@@ -235,3 +235,3 @@ } | ||
a { | ||
#user a { | ||
color: white; | ||
@@ -267,3 +267,3 @@ &:hover { | ||
```html | ||
<script src=https://unpkg.com/stylis@0.9.1/stylis.min.js></script> | ||
<script src=https://unpkg.com/stylis@0.9.2/stylis.min.js></script> | ||
``` | ||
@@ -277,2 +277,17 @@ | ||
## Features | ||
- variables via `~~foo` and `var(~~foo)`; | ||
- web component emulation of `:host`, `:host()` and `:host-context()` | ||
- inline global injection via `:global(selector)` | ||
- block level global injection via `@global {}` | ||
- nesting `a { &:hover {} }` | ||
- static and function mixins via `@mixin ...` and `@include` | ||
- prefixer | ||
- namespacing | ||
- flat css `color: red; h1 { color: red; }` | ||
- middleware support | ||
- keyframes and animation namespacing (with the option to disable) | ||
## API | ||
@@ -279,0 +294,0 @@ |
143
stylis.js
@@ -44,3 +44,3 @@ /* | ||
// `[data-id=namespace]` -> ['data-id', 'namespace'] | ||
var attr = selector.substring(1, selector.length-1).split('='); | ||
var attr = selector.substring(1, selector.length-1).split('='); | ||
var char = (namespace = attr[1]).charCodeAt(0); | ||
@@ -69,3 +69,3 @@ | ||
// has middleware | ||
var plugin = middleware !== void 0 && typeof middleware === 'function'; | ||
var plugin = middleware != null && typeof middleware === 'function'; | ||
@@ -114,4 +114,4 @@ // variables, i.e $a = 1; | ||
// only trim when the first character is a space ` ` | ||
if (first === 32) { | ||
first = (buff = buff.trim()).charCodeAt(0); | ||
if (first === 32) { | ||
first = (buff = buff.trim()).charCodeAt(0); | ||
} | ||
@@ -128,6 +128,3 @@ | ||
if (comment === 2) { | ||
if (code === 125) { | ||
comment = 0; | ||
} | ||
code === 125 && (comment = 0); | ||
buff = ''; | ||
@@ -145,3 +142,3 @@ } | ||
} | ||
// g, @global | ||
// g, @global | ||
else { | ||
@@ -170,3 +167,3 @@ buff = ''; | ||
} | ||
// @media | ||
// @media | ||
else { | ||
@@ -202,7 +199,7 @@ type = 2; | ||
for (var i = 0, length = argsPassed.length; i < length; i++) { | ||
var arg = argsExpected[i].trim(); | ||
var arg = argsExpected[i].trim(); | ||
// if the mixin has a slot for that arg | ||
if (arg !== void 0) { | ||
buff = buff.replace(new RegExp('\\'+arg, 'g'), argsPassed[i].trim()); | ||
buff = buff.replace(new RegExp('var\\(~~'+arg+'\\)', 'g'), argsPassed[i].trim()); | ||
} | ||
@@ -235,3 +232,3 @@ } | ||
// avoid "foo.css"; "foo" screen; "http://foo.com/bar"; url(foo); | ||
var match = /@import.*?(["'][^\.\n\r]*?["'];|["'].*\.scss["'])/g.exec(buff); | ||
var match = /@import.*?(["'][^\.\n\r]*?["'];|["'].*\.scss["'])/g.exec(buff); | ||
@@ -256,4 +253,4 @@ if (match !== null) { | ||
} | ||
// $, variable | ||
else if (first === 36) { | ||
// ~, ; variables | ||
else if (code === 59 && first === 126 && second === 126) { | ||
var colon = buff.indexOf(':'); | ||
@@ -274,7 +271,15 @@ | ||
if (first === 97 && second === 110 && third === 105) { | ||
// removes ; | ||
buff = buff.substring(0, buff.length-1); | ||
// position of : | ||
var colon = buff.indexOf(':')+1; | ||
// left hand side everything before `:` | ||
var build = buff.substring(0, colon); | ||
var anims = buff.substring(colon).split(','); | ||
// short hand animation syntax | ||
// right hand side everything after `:` /* @type string[] */ | ||
var anims = buff.substring(colon).trim().split(','); | ||
// - short hand animation syntax | ||
if ((buff.charCodeAt(9) || 0) !== 45) { | ||
@@ -290,17 +295,44 @@ // because we can have multiple animations `animation: slide 4s, slideOut 2s` | ||
var prop = props[k].trim(); | ||
var frst = prop.charCodeAt(0); | ||
var third = prop.charCodeAt(2); | ||
var slen = prop.length; | ||
var last = prop.charCodeAt(slen-1); | ||
// animation name is anything not in this list | ||
if ( | ||
prop !== 'infinite' && | ||
prop !== 'linear' && | ||
prop !== 'alternate' && | ||
prop !== 'normal' && | ||
prop !== 'forwards' && | ||
prop !== 'backwards' && | ||
prop !== 'both' && | ||
prop !== 'none' && | ||
prop !== 'ease' && | ||
prop.indexOf('cubic-bezier(') === -1 && | ||
prop.indexOf('ease-') === -1 && | ||
isNaN(parseInt(prop)) | ||
// cubic-bezier() | ||
!(frst === 99 && last === 41) && | ||
// infinite, i, f, e | ||
!(frst === 105 && third === 102 && last === 101 && slen === 8) && | ||
// linear, l, n, r | ||
!(frst === 108 && third === 110 && last === 114 && slen === 6) && | ||
// alternate, a, t, e | ||
!(frst === 97 && third === 116 && last === 101 && slen === 9) && | ||
// normal, n, r, l | ||
!(frst === 110 && third === 114 && last === 108 && slen === 6) && | ||
// backwords, b, c, s | ||
!(frst === 98 && third === 99 && last === 115 && slen === 9) && | ||
// forwards, f, r, s | ||
!(frst === 102 && third === 114 && last === 115 && slen === 8) && | ||
// both, b, t, h | ||
!(frst === 98 && third === 116 && last === 104 && slen === 4) && | ||
// none, n, n, e | ||
!(frst === 110 && third === 110 && last === 101 && slen === 4)&& | ||
// ease, e, s, e | ||
!(frst === 101 && third === 115 && last === 101 && slen === 4) && | ||
// ease- | ||
!(frst === 101 && slen > 4 && prop.charCodeAt(4) === 45) && | ||
// 0.4ms, .4s, 400ms ... | ||
isNaN(parseFloat(prop)) | ||
) { | ||
@@ -315,3 +347,3 @@ props[k] = animns+prop; | ||
} | ||
// explicit syntax | ||
// explicit syntax, anims array should have only one elemenet | ||
else { | ||
@@ -323,3 +355,3 @@ // n | ||
// vendor prefix | ||
buff = '-webkit-' + build + build; | ||
buff = '-webkit-' + build + ';' + build + ';'; | ||
} | ||
@@ -377,3 +409,3 @@ // appearance: a, p, p | ||
// keep track of opening `{` and `}` occurrences | ||
var counter = 1; | ||
var closed = 1; | ||
@@ -385,6 +417,6 @@ // travel to the end of the block | ||
// {, }, nested blocks may have nested blocks | ||
char === 123 ? counter++ : char === 125 && counter--; | ||
char === 123 ? closed++ : char === 125 && closed--; | ||
// break when the has ended | ||
if (counter === 0) { | ||
// break when the nested block has ended | ||
if (closed === 0) { | ||
break; | ||
@@ -413,6 +445,6 @@ } | ||
// create block and update styles length | ||
// the new line is to avoid conflicts when the last line is a // line comments | ||
eof += (styles += ('\n' + prevSel.join(',') + '{'+inner+'}').replace(/&| +&/g, '')).length; | ||
// the `new line` is to avoid conflicts when the last line is a // line comment | ||
eof += (styles += ('\n' + prevSel.join(',') + ' {'+inner+'}').replace(/&| +&/g, '')).length; | ||
// clear current line, to avoid add block elements to the normal flow | ||
// clear current line, to avoid adding nested blocks to the normal flow | ||
buff = ''; | ||
@@ -459,11 +491,11 @@ | ||
} | ||
// : | ||
// : | ||
else if (firstChar === 58) { | ||
var secondChar = selector.charCodeAt(1); | ||
// h, t, :host | ||
// h, t, :host | ||
if (secondChar === 104 && selector.charCodeAt(4) === 116) { | ||
var nextChar = (selector = selector.substring(5)).charCodeAt(0); | ||
// :host(selector) | ||
// :host(selector) | ||
if (nextChar === 40) { | ||
@@ -473,3 +505,3 @@ // before: `(selector)` | ||
// after: ${prefx} selector { | ||
} | ||
} | ||
// :host-context(selector) | ||
@@ -514,3 +546,3 @@ else if (nextChar === 45) { | ||
} | ||
// @global/@keyframes | ||
@@ -568,3 +600,3 @@ if (special !== 0) { | ||
else if (type === 2 && depth === 0 && code !== 125) { | ||
blob += buff; | ||
blob += buff; | ||
buff = ''; | ||
@@ -575,3 +607,3 @@ } | ||
else if (depth === 0 && code !== 125) { | ||
flat += buff; | ||
flat += buff; | ||
buff = ''; | ||
@@ -582,11 +614,16 @@ } | ||
// append line to blck buffer | ||
blck += buff; | ||
blck += buff; | ||
// reset line buffer | ||
buff = ''; | ||
buff = ''; | ||
// add blck buffer to output, | ||
// add blck buffer to output | ||
if (code === 125 && type === 0 && comment === 0) { | ||
// middleware | ||
plugin && blck.length !== 0 && (blck = middleware(1, blck, line, column) || blck); | ||
// remove empty blocks | ||
if (blck.charCodeAt(blck.length-2) === 123) { | ||
blck = ''; | ||
} else { | ||
// middleware | ||
plugin && blck.length !== 0 && (blck = middleware(1, blck, line, column) || blck); | ||
} | ||
@@ -606,3 +643,3 @@ // append blck buffer | ||
if (comment === 2) { | ||
buff = ''; | ||
buff = ''; | ||
comment = 0; | ||
@@ -658,3 +695,3 @@ } | ||
for (var i = 0, l = vars.length; i < l; i++) { | ||
output = output.replace(new RegExp('\\'+vars[i][0], 'g'), vars[i][1]); | ||
output = output.replace(new RegExp('var\\('+vars[i][0]+'\\)', 'g'), vars[i][1]); | ||
} | ||
@@ -661,0 +698,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function i(e,i,r,t){var n="",s="",l=e.charCodeAt(0)||0;if(91===l){var a=e.substring(1,e.length-1).split("="),o=(s=a[1]).charCodeAt(0);34!==o&&39!==o||(s=s.substring(1,s.length-1)),n="["+a[0]+'="'+s+'"]'}else s=35===l||46===l||62===l?(n=e).substring(1):n=e;for(var f,g,d,h=void 0===r||r===!0?s:"",b=void 0!==t&&"function"==typeof t,c="",u="",v="",p="",m="",w=0,x=0,A=0,C=0,y=1,k=i.length,O=0,l=0,j=0,z=0,E=0,N="";x<k;){var R=i.charCodeAt(x);if(0!==E||123!==R&&125!==R&&59!==R)13===R||10===R?(2===z&&(c="",z=0),C=0,y++):9!==R&&(34===R?E=34===E?0:39===E?39:34:39===R?E=39===E?0:34===E?34:39:47===R&&47===R&&z<2&&z++,c+=i[x]);else{c+=i[x];var I=c.charCodeAt(0);32===I&&(I=(c=c.trim()).charCodeAt(0));var q=c.charCodeAt(1)||0,B=c.charCodeAt(2)||0;if(b&&(c=t(0,c,y,C)||c),2===z)125===R&&(z=0),c="";else if(64===I)if(107===q||103===q?107===q?(u=c.substring(1,11)+h+c.substring(11),c="@-webkit-"+u,l=1):c="":109===q&&(105===B?(void 0===g&&(g={}),u=(d=c.substring(7,c.indexOf("{"))+" ").trim(),d=d.substring(0,d.indexOf(" ")).trim(),g[d]={key:u.trim(),body:null},l=3,c="",u=""):l=2),105===q){if(110===B)if(c=c.substring(9,c.length-1),w=c.indexOf("("),w>-1){var D=c.substring(0,w),F=g[D],G=c.substring(D.length+1,c.length-1).split(","),H=F.key.replace(D,"").replace(/\(|\)/g,"").trim().split(",");c=F.body;for(var J=0,K=G.length;J<K;J++){var L=H[J].trim();void 0!==L&&(c=c.replace(new RegExp("\\"+L,"g"),G[J].trim()))}i+=c,k+=c.length,c=""}else c=g[c].body,0===A&&(i+=c,k+=c.length,c="");else if(109===B&&b){var M=/@import.*?(["'][^\.\n\r]*?["'];|["'].*\.scss["'])/g.exec(c);null!==M&&(c=t(3,M[1].replace(/['"; ]/g,""),y,C)||"",c&&(i+=c,k+=c.length),c="")}}else j=-1,O++;else if(36===I){var P=c.indexOf(":");void 0===f&&(f=[]),f[f.length]=[c.substring(0,P),c.substring(P+1,c.length-1).trim()],c=""}else{if(97===I&&110===q&&105===B){var P=c.indexOf(":")+1,Q=c.substring(0,P),S=c.substring(P).split(",");if(45!==(c.charCodeAt(9)||0))for(var T=0,K=S.length;T<K;T++){for(var U=S[T],V=U.split(" "),W=0,X=V.length;W<X;W++){var Y=V[W].trim();"infinite"!==Y&&"linear"!==Y&&"alternate"!==Y&&"normal"!==Y&&"forwards"!==Y&&"backwards"!==Y&&"both"!==Y&&"none"!==Y&&"ease"!==Y&&Y.indexOf("cubic-bezier(")===-1&&Y.indexOf("ease-")===-1&&isNaN(parseInt(Y))&&(V[W]=h+Y,U=V.join(" "))}Q+=(0===T?"":",")+U.trim()}else Q+=(110!==(c.charCodeAt(10)||0)?"":h)+S[0].trim();c="-webkit-"+Q+Q}else if(97===I&&112===q&&112===B)c="-webkit-"+c+"-moz-"+c+c;else if(104===I&&121===q&&112===B||117===I&&115===q&&101===B)c="-webkit-"+c+"-moz-"+c+"-ms-"+c+c;else if(102===I&&108===q&&101===B||111===I&&114===q&&100===B)c="-webkit-"+c+c;else if(116===I&&114===q&&97===B)c="-webkit-"+c+(102===c.charCodeAt(5)?"-ms-"+c:"")+c;else if(100===I&&105===q&&115===B)c.indexOf("flex")>-1&&(c="display:-webkit-flex; display:flex;");else if(123===R){if(A++,0===O||2===l)if(2===A){x++;for(var Z="",$=c.substring(0,c.length-1).split(","),_=v.substring(0,v.length-1).split(","),ee=1;x<k;){var o=i.charCodeAt(x);if(123===o?ee++:125===o&&ee--,0===ee)break;Z+=i[x++]}for(var T=0,K=_.length;T<K;T++){var ie=_[T];_[T]="";for(var W=0,X=$.length;W<X;W++)_[T]+=(ie.replace(n,"").trim()+" "+$[W].trim()).trim()+(W===X-1?"":",")}k+=(i+=("\n"+_.join(",")+"{"+Z+"}").replace(/&| +&/g,"")).length,c="",A--}else{for(var re=c.split(","),Q="",T=0,K=re.length;T<K;T++){var e=re[T],te=e.charCodeAt(0);if(32===te&&(te=(e=e.trim()).charCodeAt(0)),91===te)for(var W=T+1,X=K-T;W<X;W++){var ne=(e+=","+re[W]).trim();if(93===ne.charCodeAt(ne.length-1)){K-=W,re.splice(T,W);break}}if(38===te)e=n+e.substring(1);else if(58===te){var se=e.charCodeAt(1);if(104===se&&116===e.charCodeAt(4)){var le=(e=e.substring(5)).charCodeAt(0);e=40===le?n+e.substring(1).replace(")",""):45===le?e.substring(9,e.indexOf(")"))+" "+n+" {":n+e}else e=103===se?e.substring(8).replace(")",""):n+e}else e=n+" "+e;Q+=0===T?e:","+e}v=c=Q}}else 125===R&&0!==A&&A--;0!==O?(125===R?j++:123===R&&0!==j&&j--,0===j?(0===l?c="":1===l?(c="}@"+u+"}",u=""):2===l?(0!==u.length&&(c=n+" {"+u+"}"+c),u=""):3===l&&(g[d].body=u,d="",c="",u=""),l=0,j--,O--):1===l||3===l?(u+=c,3===l&&(c="")):2===l&&0===A&&125!==R&&(u+=c,c="")):0===A&&125!==R&&(p+=c,c="")}m+=c,c="",125===R&&0===l&&0===z&&(b&&0!==m.length&&(m=t(1,m,y,C)||m),N+=m,m="")}x++,C++}if(0!==p.length&&(p=n+" {"+p+"}",b&&(p=t(2,p,y,C)||p),N+=p),void 0!==f)for(var J=0,X=f.length;J<X;J++)N=N.replace(new RegExp("\\"+f[J][0],"g"),f[J][1]);return N}return i}); | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function t(e,t,r,i){var s="",n="",l=e.charCodeAt(0)||0;if(91===l){var a=e.substring(1,e.length-1).split("="),o=(n=a[1]).charCodeAt(0);34!==o&&39!==o||(n=n.substring(1,n.length-1)),s="["+a[0]+'="'+n+'"]'}else n=35===l||46===l||62===l?(s=e).substring(1):s=e;for(var f,g,d,h=void 0===r||r===!0?n:"",c=null!=i&&"function"==typeof i,b="",u="",v="",p="",m="",A=0,C=0,w=0,x=0,y=1,k=t.length,O=0,l=0,j=0,z=0,E=0,N="";C<k;){var R=t.charCodeAt(C);if(0!==E||123!==R&&125!==R&&59!==R)13===R||10===R?(2===z&&(b="",z=0),x=0,y++):9!==R&&(34===R?E=34===E?0:39===E?39:34:39===R?E=39===E?0:34===E?34:39:47===R&&47===R&&z<2&&z++,b+=t[C]);else{b+=t[C];var F=b.charCodeAt(0);32===F&&(F=(b=b.trim()).charCodeAt(0));var q=b.charCodeAt(1)||0,B=b.charCodeAt(2)||0;if(c&&(b=i(0,b,y,x)||b),2===z)125===R&&(z=0),b="";else if(64===F)if(107===q||103===q?107===q?(u=b.substring(1,11)+h+b.substring(11),b="@-webkit-"+u,l=1):b="":109===q&&(105===B?(void 0===g&&(g={}),u=(d=b.substring(7,b.indexOf("{"))+" ").trim(),d=d.substring(0,d.indexOf(" ")).trim(),g[d]={key:u.trim(),body:null},l=3,b="",u=""):l=2),105===q){if(110===B)if(b=b.substring(9,b.length-1),A=b.indexOf("("),A>-1){var D=b.substring(0,A),G=g[D],H=b.substring(D.length+1,b.length-1).split(","),I=G.key.replace(D,"").replace(/\(|\)/g,"").trim().split(",");b=G.body;for(var J=0,K=H.length;J<K;J++){var L=I[J].trim();void 0!==L&&(b=b.replace(new RegExp("var\\(~~"+L+"\\)","g"),H[J].trim()))}t+=b,k+=b.length,b=""}else b=g[b].body,0===w&&(t+=b,k+=b.length,b="");else if(109===B&&c){var M=/@import.*?(["'][^\.\n\r]*?["'];|["'].*\.scss["'])/g.exec(b);null!==M&&(b=i(3,M[1].replace(/['"; ]/g,""),y,x)||"",b&&(t+=b,k+=b.length),b="")}}else j=-1,O++;else if(59===R&&126===F&&126===q){var P=b.indexOf(":");void 0===f&&(f=[]),f[f.length]=[b.substring(0,P),b.substring(P+1,b.length-1).trim()],b=""}else{if(97===F&&110===q&&105===B){b=b.substring(0,b.length-1);var P=b.indexOf(":")+1,Q=b.substring(0,P),S=b.substring(P).trim().split(",");if(45!==(b.charCodeAt(9)||0))for(var T=0,K=S.length;T<K;T++){for(var U=S[T],V=U.split(" "),W=0,X=V.length;W<X;W++){var Y=V[W].trim(),Z=Y.charCodeAt(0),B=Y.charCodeAt(2),$=Y.length,_=Y.charCodeAt($-1);99===Z&&41===_||105===Z&&102===B&&101===_&&8===$||108===Z&&110===B&&114===_&&6===$||97===Z&&116===B&&101===_&&9===$||110===Z&&114===B&&108===_&&6===$||98===Z&&99===B&&115===_&&9===$||102===Z&&114===B&&115===_&&8===$||98===Z&&116===B&&104===_&&4===$||110===Z&&110===B&&101===_&&4===$||101===Z&&115===B&&101===_&&4===$||101===Z&&$>4&&45===Y.charCodeAt(4)||!isNaN(parseFloat(Y))||(V[W]=h+Y,U=V.join(" "))}Q+=(0===T?"":",")+U.trim()}else Q+=(110!==(b.charCodeAt(10)||0)?"":h)+S[0].trim();b="-webkit-"+Q+";"+Q+";"}else if(97===F&&112===q&&112===B)b="-webkit-"+b+"-moz-"+b+b;else if(104===F&&121===q&&112===B||117===F&&115===q&&101===B)b="-webkit-"+b+"-moz-"+b+"-ms-"+b+b;else if(102===F&&108===q&&101===B||111===F&&114===q&&100===B)b="-webkit-"+b+b;else if(116===F&&114===q&&97===B)b="-webkit-"+b+(102===b.charCodeAt(5)?"-ms-"+b:"")+b;else if(100===F&&105===q&&115===B)b.indexOf("flex")>-1&&(b="display:-webkit-flex; display:flex;");else if(123===R){if(w++,0===O||2===l)if(2===w){C++;for(var ee="",te=b.substring(0,b.length-1).split(","),re=v.substring(0,v.length-1).split(","),ie=1;C<k;){var o=t.charCodeAt(C);if(123===o?ie++:125===o&&ie--,0===ie)break;ee+=t[C++]}for(var T=0,K=re.length;T<K;T++){var se=re[T];re[T]="";for(var W=0,X=te.length;W<X;W++)re[T]+=(se.replace(s,"").trim()+" "+te[W].trim()).trim()+(W===X-1?"":",")}k+=(t+=("\n"+re.join(",")+" {"+ee+"}").replace(/&| +&/g,"")).length,b="",w--}else{for(var ne=b.split(","),Q="",T=0,K=ne.length;T<K;T++){var e=ne[T],le=e.charCodeAt(0);if(32===le&&(le=(e=e.trim()).charCodeAt(0)),91===le)for(var W=T+1,X=K-T;W<X;W++){var ae=(e+=","+ne[W]).trim();if(93===ae.charCodeAt(ae.length-1)){K-=W,ne.splice(T,W);break}}if(38===le)e=s+e.substring(1);else if(58===le){var oe=e.charCodeAt(1);if(104===oe&&116===e.charCodeAt(4)){var fe=(e=e.substring(5)).charCodeAt(0);e=40===fe?s+e.substring(1).replace(")",""):45===fe?e.substring(9,e.indexOf(")"))+" "+s+" {":s+e}else e=103===oe?e.substring(8).replace(")",""):s+e}else e=s+" "+e;Q+=0===T?e:","+e}v=b=Q}}else 125===R&&0!==w&&w--;0!==O?(125===R?j++:123===R&&0!==j&&j--,0===j?(0===l?b="":1===l?(b="}@"+u+"}",u=""):2===l?(0!==u.length&&(b=s+" {"+u+"}"+b),u=""):3===l&&(g[d].body=u,d="",b="",u=""),l=0,j--,O--):1===l||3===l?(u+=b,3===l&&(b="")):2===l&&0===w&&125!==R&&(u+=b,b="")):0===w&&125!==R&&(p+=b,b="")}m+=b,b="",125===R&&0===l&&0===z&&(123===m.charCodeAt(m.length-2)?m="":c&&0!==m.length&&(m=i(1,m,y,x)||m),N+=m,m="")}C++,x++}if(0!==p.length&&(p=s+" {"+p+"}",c&&(p=i(2,p,y,x)||p),N+=p),void 0!==f)for(var J=0,X=f.length;J<X;J++)N=N.replace(new RegExp("var\\("+f[J][0]+"\\)","g"),f[J][1]);return N}return t}); |
35355
574
401