//>>built define("xstyle/core/generate",["xstyle/core/elemental","put-selector/put","xstyle/core/utils","xstyle/core/expression","xstyle/core/base"],function(z,w,A,J,K){function m(a,e){a=a.sort?a:[a];return function(c,k,b){var f=c,B;"content"in c||(c.content=void 0);if(void 0===b){var g=(c._contentNode||c).childNodes||0,h=g[0];if(h){var u=t.createDocumentFragment();do u.appendChild(h);while(h=g[0]);c.content=u}if(c._contentNode){c._contentNode=void 0;try{c.innerHTML=""}catch(p){}}}for(var D=0,E=[c],C=[],g= 0,h=a.length;gD?(p(),E[a]=l):l=E[a]||l,D=a):p();var n;if(d)n=(F&&F.args?"":"span")+d+m;else{d=m.match(/^[-\w]+/);if(!d)throw new SyntaxError("Unable to parse selector",m);d=d[0];var v;y===r.length-1&&q&&q.selector?(q.bases||A.extend(q,d),v=q):v=e.getDefinition(d);v&&(v.then||v.newElement)?l=function(a,b,c,e){var d,f;A.when(v&&v.newElement&&v.newElement(), function(a){(d=a)?(c=c.slice(e.length))&&w(d,c):d=w(c);if(f){f.parentNode.replaceChild(d,f);a=f.childNodes;var b;for(d=d._contentNode||d;b=a[0];)d.appendChild(b)}});if(d)return a.insertBefore(d,b||null);f=w("span");return a.insertBefore(f,b||null)}(l,b,m,d):n=m}n&&(l=w(b||l,(b?"-":"")+n));b=null;u&&l.setAttribute(u,""===t?u:t);k&&(l.item=k);B=B||l;(y