dom-min.js revision 9ad2c0a37183c979f01d692e09b9404ea735b234
YUI.add("dom-base",function(d){(function(h){var o="nodeType",u="ownerDocument",v="documentElement",g="defaultView",m="parentWindow",s="tagName",k="parentNode",e="firstChild",t="previousSibling",w="nextSibling",l="contains",r="compareDocumentPosition",f="",i=[],y=h.config.doc.documentElement,n=/<([a-z]+)/i,j=function(B,z){var C=h.config.doc.createElement("div"),A=true;C.innerHTML=B;if(!C.firstChild||C.firstChild.tagName!==z.toUpperCase()){A=false;}return A;},p=h.Features.add,q=h.Features.test,x={byId:function(A,z){return x.allById(A,z)[0]||null;},getText:(y.textContent!==undefined)?function(A){var z="";if(A){z=A.textContent;}return z||"";}:function(A){var z="";if(A){z=A.innerText||A.nodeValue;}return z||"";},setText:(y.textContent!==undefined)?function(z,A){if(z){z.textContent=A;}}:function(z,A){if("innerText" in z){z.innerText=A;}else{if("nodeValue" in z){z.nodeValue=A;}}},ancestor:function(A,B,C){var z=null;if(C){z=(!B||B(A))?A:null;}return z||x.elementByAxis(A,k,B,null);},ancestors:function(B,C,D){var A=x.ancestor.apply(x,arguments),z=(A)?[A]:[];while((A=x.ancestor(A,C))){if(A){z.unshift(A);}}return z;},elementByAxis:function(z,C,B,A){while(z&&(z=z[C])){if((A||z[s])&&(!B||B(z))){return z;}}return null;},contains:function(A,B){var z=false;if(!B||!A||!B[o]||!A[o]){z=false;}else{if(A[l]){if(h.UA.opera||B[o]===1){z=A[l](B);}else{z=x._bruteContains(A,B);}}else{if(A[r]){if(A===B||!!(A[r](B)&16)){z=true;}}}}return z;},inDoc:function(B,C){var A=false,z;if(B&&B.nodeType){(C)||(C=B[u]);z=C[v];if(z&&z.contains&&B.tagName){A=z.contains(B);}else{A=x.contains(z,B);}}return A;},allById:function(E,z){z=z||h.config.doc;var A=[],B=[],C,D;if(z.querySelectorAll){B=z.querySelectorAll('[id="'+E+'"]');}else{if(z.all){A=z.all(E);if(A){if(A.nodeName){if(A.id===E){B.push(A);A=i;}else{A=[A];}}if(A.length){for(C=0;D=A[C++];){if(D.id===E||(D.attributes&&D.attributes.id&&D.attributes.id.value===E)){B.push(D);}}}}}else{B=[x._getDoc(z).getElementById(E)];}}return B;},create:function(D,G){if(typeof D==="string"){D=h.Lang.trim(D);}G=G||h.config.doc;var C=n.exec(D),E=x._create,A=x.creators,F=null,B,H,z;if(D!=undefined){if(C&&C[1]){B=A[C[1].toLowerCase()];if(typeof B==="function"){E=B;}else{H=B;}}z=E(D,G,H).childNodes;if(z.length===1){F=z[0].parentNode.removeChild(z[0]);}else{if(z[0]&&z[0].className==="yui3-big-dummy"){if(z.length===2){F=z[0].nextSibling;}else{z[0].parentNode.removeChild(z[0]);F=x._nl2frag(z,G);}}else{F=x._nl2frag(z,G);}}}return F;},_nl2frag:function(A,D){var B=null,C,z;if(A&&(A.push||A.item)&&A[0]){D=D||A[0].ownerDocument;B=D.createDocumentFragment();if(A.item){A=h.Array(A,0,true);}for(C=0,z=A.length;C<z;C++){B.appendChild(A[C]);}}return B;},CUSTOM_ATTRIBUTES:(!y.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(B,z,C,A){if(B&&z&&B.setAttribute){z=x.CUSTOM_ATTRIBUTES[z]||z;B.setAttribute(z,C,A);}},getAttribute:function(C,z,B){B=(B!==undefined)?B:2;var A="";if(C&&z&&C.getAttribute){z=x.CUSTOM_ATTRIBUTES[z]||z;A=C.getAttribute(z,B);if(A===null){A="";}}return A;},isWindow:function(z){return !!(z&&z.alert&&z.document);},_fragClones:{},_create:function(A,B,z){z=z||"div";var C=x._fragClones[z];if(C){C=C.cloneNode(false);}else{C=x._fragClones[z]=B.createElement(z);}C.innerHTML=A;return C;},_removeChildNodes:function(z){while(z.firstChild){z.removeChild(z.firstChild);}},addHTML:function(G,F,B){var z=G.parentNode,D=0,E,A=F,C;if(F!=undefined){if(F.nodeType){C=F;}else{if(typeof F=="string"||typeof F=="number"){A=C=x.create(F);}else{if(F[0]&&F[0].nodeType){C=h.config.doc.createDocumentFragment();while((E=F[D++])){C.appendChild(E);}}}}}if(B){if(B.nodeType){B.parentNode.insertBefore(C,B);}else{switch(B){case"replace":while(G.firstChild){G.removeChild(G.firstChild);}if(C){G.appendChild(C);}break;case"before":z.insertBefore(C,G);break;case"after":if(G.nextSibling){z.insertBefore(C,G.nextSibling);}else{z.appendChild(C);}break;default:G.appendChild(C);}}}else{if(C){G.appendChild(C);}}return A;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(B){var A="",z;if(B&&B[s]){z=x.VALUE_GETTERS[B[s].toLowerCase()];if(z){A=z(B);}else{A=B.value;}}if(A===f){A=f;}return(typeof A==="string")?A:"";},setValue:function(z,A){var B;if(z&&z[s]){B=x.VALUE_SETTERS[z[s].toLowerCase()];if(B){B(z,A);}else{z.value=A;}}},siblings:function(C,B){var z=[],A=C;while((A=A[t])){if(A[s]&&(!B||B(A))){z.unshift(A);}}A=C;while((A=A[w])){if(A[s]&&(!B||B(A))){z.push(A);}}return z;},_bruteContains:function(z,A){while(A){if(z===A){return true;}A=A.parentNode;}return false;},_getRegExp:function(A,z){z=z||"";x._regexCache=x._regexCache||{};if(!x._regexCache[A+z]){x._regexCache[A+z]=new RegExp(A,z);}return x._regexCache[A+z];},_getDoc:function(z){var A=h.config.doc;if(z){A=(z[o]===9)?z:z[u]||z.document||h.config.doc;}return A;},_getWin:function(z){var A=x._getDoc(z);return A[g]||A[m]||h.config.win;},_batch:function(z,I,F,E,D,B){I=(typeof I==="string")?x[I]:I;var J,H=Array.prototype.slice.call(arguments,2),C=0,A,G;if(I&&z){while((A=z[C++])){J=J=I.call(x,A,F,E,D,B);if(typeof J!=="undefined"){(G)||(G=[]);G.push(J);}}}return(typeof G!=="undefined")?G:z;},wrap:function(C,A){var B=h.DOM.create(A),z=B.getElementsByTagName("*");if(z.length){B=z[z.length-1];}if(C.parentNode){C.parentNode.replaceChild(B,C);}B.appendChild(C);},unwrap:function(C){var A=C.parentNode,B=A.lastChild,C=A.firstChild,z=C,D;if(A){D=A.parentNode;if(D){while(C!==B){z=C.nextSibling;D.insertBefore(C,A);C=z;}D.replaceChild(B,A);}else{A.removeChild(C);}}},generateID:function(z){var A=z.id;if(!A){A=h.stamp(z);z.id=A;}return A;},creators:{}};p("innerhtml","table",{test:function(){var z=h.config.doc.createElement("table");try{z.innerHTML="<tbody></tbody>";}catch(A){return false;}return(z.firstChild&&z.firstChild.nodeName==="TBODY");}});p("innerhtml-div","tr",{test:function(){return j("<tr></tr>","tr");}});p("innerhtml-div","script",{test:function(){return j("<script><\/script>","script");}});p("value-set","select",{test:function(){var z=h.config.doc.createElement("select");
z.innerHTML="<option>1</option><option>2</option>";z.value="2";return(z.value&&z.value==="2");}});(function(D){var E=x.creators,z=x.create,C=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,B="<table>",A="</table>";if(!q("innerhtml","table")){E.tbody=function(G,H){var I=z(B+G+A,H),F=I.children.tags("tbody")[0];if(I.children.length>1&&F&&!C.test(G)){F[k].removeChild(F);}return I;};}if(!q("innerhtml-div","script")){E.script=function(F,G){var H=G.createElement("div");H.innerHTML="-"+F;H.removeChild(H[e]);return H;};x.creators.link=x.creators.style=x.creators.script;}if(!q("value-set","select")){x.VALUE_SETTERS.select=function(I,J){for(var G=0,F=I.getElementsByTagName("option"),H;H=F[G++];){if(x.getValue(H)===J){H.selected=true;break;}}};}D.mix(x.VALUE_GETTERS,{button:function(F){return(F.attributes&&F.attributes.value)?F.attributes.value.value:"";}});D.mix(x.VALUE_SETTERS,{button:function(G,H){var F=G.attributes.value;if(!F){F=G[u].createAttribute("value");G.setAttributeNode(F);}F.value=H;}});if(!q("innerhtml-div","tr")){D.mix(E,{option:function(F,G){return z('<select><option class="yui3-big-dummy" selected></option>'+F+"</select>",G);},tr:function(F,G){return z("<tbody>"+F+"</tbody>",G);},td:function(F,G){return z("<tr>"+F+"</tr>",G);},col:function(F,G){return z("<colgroup>"+F+"</colgroup>",G);},tbody:"table"});D.mix(E,{legend:"fieldset",th:E.td,thead:E.tbody,tfoot:E.tbody,caption:E.tbody,colgroup:E.tbody,optgroup:E.option});}D.mix(x.VALUE_GETTERS,{option:function(G){var F=G.attributes;return(F.value&&F.value.specified)?G.value:G.text;},select:function(G){var H=G.value,F=G.options;if(F&&F.length){if(G.multiple){}else{H=x.getValue(F[G.selectedIndex]);}}return H;}});})(h);h.DOM=x;})(d);var b,a,c;d.mix(d.DOM,{hasClass:function(g,f){var e=d.DOM._getRegExp("(?:^|\\s+)"+f+"(?:\\s+|$)");return e.test(g.className);},addClass:function(f,e){if(!d.DOM.hasClass(f,e)){f.className=d.Lang.trim([f.className,e].join(" "));}},removeClass:function(f,e){if(e&&a(f,e)){f.className=d.Lang.trim(f.className.replace(d.DOM._getRegExp("(?:^|\\s+)"+e+"(?:\\s+|$)")," "));if(a(f,e)){c(f,e);}}},replaceClass:function(f,e,g){c(f,e);b(f,g);},toggleClass:function(f,e,g){var h=(g!==undefined)?g:!(a(f,e));if(h){b(f,e);}else{c(f,e);}}});a=d.DOM.hasClass;c=d.DOM.removeClass;b=d.DOM.addClass;d.mix(d.DOM,{setWidth:function(f,e){d.DOM._setSize(f,"width",e);},setHeight:function(f,e){d.DOM._setSize(f,"height",e);},_setSize:function(f,h,g){g=(g>0)?g:0;var e=0;f.style[h]=g+"px";e=(h==="height")?f.offsetHeight:f.offsetWidth;if(e>g){g=g-(e-g);if(g<0){g=0;}f.style[h]=g+"px";}}});},"@VERSION@",{requires:["oop"]});YUI.add("dom-style",function(a){(function(e){var p="documentElement",b="defaultView",n="ownerDocument",h="style",i="float",r="cssFloat",s="styleFloat",k="transparent",d="getComputedStyle",c="getBoundingClientRect",o=e.config.win,g=e.config.doc,t=undefined,q=e.DOM,f="transform",l=["WebkitTransform","MozTransform","OTransform"],m=/color$/i,j=/width|height|top|left|right|bottom|margin|padding/i;e.Array.each(l,function(u){if(u in g[p].style){f=u;}});e.mix(q,{DEFAULT_UNIT:"px",CUSTOM_STYLES:{},setStyle:function(x,u,y,w){w=w||x.style;var v=q.CUSTOM_STYLES;if(w){if(y===null||y===""){y="";}else{if(!isNaN(new Number(y))&&j.test(u)){y+=q.DEFAULT_UNIT;}}if(u in v){if(v[u].set){v[u].set(x,y,w);return;}else{if(typeof v[u]==="string"){u=v[u];}}}else{if(u===""){u="cssText";y="";}}w[u]=y;}},getStyle:function(x,u,w){w=w||x.style;var v=q.CUSTOM_STYLES,y="";if(w){if(u in v){if(v[u].get){return v[u].get(x,u,w);}else{if(typeof v[u]==="string"){u=v[u];}}}y=w[u];if(y===""){y=q[d](x,u);}}return y;},setStyles:function(v,w){var u=v.style;e.each(w,function(x,y){q.setStyle(v,y,x,u);},q);},getComputedStyle:function(v,u){var x="",w=v[n];if(v[h]&&w[b]&&w[b][d]){x=w[b][d](v,null)[u];}return x;}});if(g[p][h][r]!==t){q.CUSTOM_STYLES[i]=r;}else{if(g[p][h][s]!==t){q.CUSTOM_STYLES[i]=s;}}if(e.UA.opera){q[d]=function(w,v){var u=w[n][b],x=u[d](w,"")[v];if(m.test(v)){x=e.Color.toRGB(x);}return x;};}if(e.UA.webkit){q[d]=function(w,v){var u=w[n][b],x=u[d](w,"")[v];if(x==="rgba(0, 0, 0, 0)"){x=k;}return x;};}e.DOM._getAttrOffset=function(y,v){var A=e.DOM[d](y,v),x=y.offsetParent,u,w,z;if(A==="auto"){u=e.DOM.getStyle(y,"position");if(u==="static"||u==="relative"){A=0;}else{if(x&&x[c]){w=x[c]()[v];z=y[c]()[v];if(v==="left"||v==="top"){A=z-w;}else{A=w-y[c]()[v];}}}}return A;};e.DOM._getOffset=function(u){var w,v=null;if(u){w=q.getStyle(u,"position");v=[parseInt(q[d](u,"left"),10),parseInt(q[d](u,"top"),10)];if(isNaN(v[0])){v[0]=parseInt(q.getStyle(u,"left"),10);if(isNaN(v[0])){v[0]=(w==="relative")?0:u.offsetLeft||0;}}if(isNaN(v[1])){v[1]=parseInt(q.getStyle(u,"top"),10);if(isNaN(v[1])){v[1]=(w==="relative")?0:u.offsetTop||0;}}}return v;};q.CUSTOM_STYLES.transform={set:function(v,w,u){u[f]=w;},get:function(v,u){return q[d](v,f);}};})(a);(function(d){var b=parseInt,c=RegExp;d.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Color.re_RGB.test(e)){e=d.Color.toHex(e);}if(d.Color.re_hex.exec(e)){e="rgb("+[b(c.$1,16),b(c.$2,16),b(c.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Color.KEYWORDS[f]||f;if(d.Color.re_RGB.exec(f)){f=[Number(c.$1).toString(16),Number(c.$2).toString(16),Number(c.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};})(a);},"@VERSION@",{requires:["dom-base"]});YUI.add("dom-screen",function(a){(function(f){var d="documentElement",q="compatMode",o="position",c="fixed",m="relative",g="left",h="top",i="BackCompat",p="medium",e="borderLeftWidth",b="borderTopWidth",r="getBoundingClientRect",k="getComputedStyle",l=f.DOM,n=/^t(?:able|d|h)$/i,j;
if(f.UA.ie){if(f.config.doc[q]!=="quirks"){j=d;}else{j="body";}}f.mix(l,{winHeight:function(t){var s=l._getWinSize(t).height;return s;},winWidth:function(t){var s=l._getWinSize(t).width;return s;},docHeight:function(t){var s=l._getDocSize(t).height;return Math.max(s,l._getWinSize(t).height);},docWidth:function(t){var s=l._getDocSize(t).width;return Math.max(s,l._getWinSize(t).width);},docScrollX:function(u,v){v=v||(u)?l._getDoc(u):f.config.doc;var t=v.defaultView,s=(t)?t.pageXOffset:0;return Math.max(v[d].scrollLeft,v.body.scrollLeft,s);},docScrollY:function(u,v){v=v||(u)?l._getDoc(u):f.config.doc;var t=v.defaultView,s=(t)?t.pageYOffset:0;return Math.max(v[d].scrollTop,v.body.scrollTop,s);},getXY:function(){if(f.config.doc[d][r]){return function(x){var E=null,y,u,z,C,B,t,w,A,D,s,v;if(x&&x.tagName){D=x.ownerDocument;v=D[d];if(v.contains){s=v.contains(x);}else{s=f.DOM.contains(v,x);}if(s){y=(j)?D[j].scrollLeft:l.docScrollX(x,D);u=(j)?D[j].scrollTop:l.docScrollY(x,D);z=x[r]();E=[z.left,z.top];if(f.UA.ie){C=2;B=2;A=D[q];t=l[k](D[d],e);w=l[k](D[d],b);if(f.UA.ie===6){if(A!==i){C=0;B=0;}}if((A==i)){if(t!==p){C=parseInt(t,10);}if(w!==p){B=parseInt(w,10);}}E[0]-=C;E[1]-=B;}if((u||y)){if(!f.UA.ios){E[0]+=y;E[1]+=u;}}}else{E=l._getOffset(x);}}return E;};}else{return function(t){var w=null,v,s,y,u,x;if(t){if(l.inDoc(t)){w=[t.offsetLeft,t.offsetTop];v=t.ownerDocument;s=t;y=((f.UA.gecko||f.UA.webkit>519)?true:false);while((s=s.offsetParent)){w[0]+=s.offsetLeft;w[1]+=s.offsetTop;if(y){w=l._calcBorders(s,w);}}if(l.getStyle(t,o)!=c){s=t;while((s=s.parentNode)){u=s.scrollTop;x=s.scrollLeft;if(f.UA.gecko&&(l.getStyle(s,"overflow")!=="visible")){w=l._calcBorders(s,w);}if(u||x){w[0]-=x;w[1]-=u;}}w[0]+=l.docScrollX(t,v);w[1]+=l.docScrollY(t,v);}else{w[0]+=l.docScrollX(t,v);w[1]+=l.docScrollY(t,v);}}else{w=l._getOffset(t);}}return w;};}}(),getX:function(s){return l.getXY(s)[0];},getY:function(s){return l.getXY(s)[1];},setXY:function(t,w,z){var u=l.setStyle,y,x,s,v;if(t&&w){y=l.getStyle(t,o);x=l._getOffset(t);if(y=="static"){y=m;u(t,o,y);}v=l.getXY(t);if(w[0]!==null){u(t,g,w[0]-v[0]+x[0]+"px");}if(w[1]!==null){u(t,h,w[1]-v[1]+x[1]+"px");}if(!z){s=l.getXY(t);if(s[0]!==w[0]||s[1]!==w[1]){l.setXY(t,w,true);}}}else{}},setX:function(t,s){return l.setXY(t,[s,null]);},setY:function(s,t){return l.setXY(s,[null,t]);},swapXY:function(t,s){var u=l.getXY(t);l.setXY(t,l.getXY(s));l.setXY(s,u);},_calcBorders:function(v,w){var u=parseInt(l[k](v,b),10)||0,s=parseInt(l[k](v,e),10)||0;if(f.UA.gecko){if(n.test(v.tagName)){u=0;s=0;}}w[0]+=s;w[1]+=u;return w;},_getWinSize:function(v,y){y=y||(v)?l._getDoc(v):f.config.doc;var x=y.defaultView||y.parentWindow,z=y[q],u=x.innerHeight,t=x.innerWidth,s=y[d];if(z&&!f.UA.opera){if(z!="CSS1Compat"){s=y.body;}u=s.clientHeight;t=s.clientWidth;}return{height:u,width:t};},_getDocSize:function(t){var u=(t)?l._getDoc(t):f.config.doc,s=u[d];if(u[q]!="CSS1Compat"){s=u.body;}return{height:s.scrollHeight,width:s.scrollWidth};}});})(a);(function(g){var d="top",c="right",h="bottom",b="left",f=function(m,k){var o=Math.max(m[d],k[d]),p=Math.min(m[c],k[c]),i=Math.min(m[h],k[h]),j=Math.max(m[b],k[b]),n={};n[d]=o;n[c]=p;n[h]=i;n[b]=j;return n;},e=g.DOM;g.mix(e,{region:function(j){var k=e.getXY(j),i=false;if(j&&k){i=e._getRegion(k[1],k[0]+j.offsetWidth,k[1]+j.offsetHeight,k[0]);}return i;},intersect:function(k,i,m){var j=m||e.region(k),l={},p=i,o;if(p.tagName){l=e.region(p);}else{if(g.Lang.isObject(i)){l=i;}else{return false;}}o=f(l,j);return{top:o[d],right:o[c],bottom:o[h],left:o[b],area:((o[h]-o[d])*(o[c]-o[b])),yoff:((o[h]-o[d])),xoff:(o[c]-o[b]),inRegion:e.inRegion(k,i,false,m)};},inRegion:function(l,i,j,o){var m={},k=o||e.region(l),q=i,p;if(q.tagName){m=e.region(q);}else{if(g.Lang.isObject(i)){m=i;}else{return false;}}if(j){return(k[b]>=m[b]&&k[c]<=m[c]&&k[d]>=m[d]&&k[h]<=m[h]);}else{p=f(m,k);if(p[h]>=p[d]&&p[c]>=p[b]){return true;}else{return false;}}},inViewportRegion:function(j,i,k){return e.inRegion(j,e.viewportRegion(j),i,k);},_getRegion:function(k,m,i,j){var n={};n[d]=n[1]=k;n[b]=n[0]=j;n[h]=i;n[c]=m;n.width=n[c]-n[b];n.height=n[h]-n[d];return n;},viewportRegion:function(j){j=j||g.config.doc.documentElement;var i=false,l,k;if(j){l=e.docScrollX(j);k=e.docScrollY(j);i=e._getRegion(k,e.winWidth(j)+l,k+e.winHeight(j),l);}return i;}});})(a);},"@VERSION@",{requires:["dom-base","dom-style","event-base"]});YUI.add("selector-native",function(a){(function(e){e.namespace("Selector");var c="compareDocumentPosition",d="ownerDocument";var b={_foundCache:[],useNative:true,_compare:("sourceIndex" in e.config.doc.documentElement)?function(i,h){var g=i.sourceIndex,f=h.sourceIndex;if(g===f){return 0;}else{if(g>f){return 1;}}return -1;}:(e.config.doc.documentElement[c]?function(g,f){if(g[c](f)&4){return -1;}else{return 1;}}:function(j,i){var h,f,g;if(j&&i){h=j[d].createRange();h.setStart(j,0);f=i[d].createRange();f.setStart(i,0);g=h.compareBoundaryPoints(1,f);}return g;}),_sort:function(f){if(f){f=e.Array(f,0,true);if(f.sort){f.sort(b._compare);}}return f;},_deDupe:function(f){var g=[],h,j;for(h=0;(j=f[h++]);){if(!j._found){g[g.length]=j;j._found=true;}}for(h=0;(j=g[h++]);){j._found=null;j.removeAttribute("_found");}return g;},query:function(g,o,p,f){o=o||e.config.doc;var l=[],h=(e.Selector.useNative&&e.config.doc.querySelector&&!f),k=[[g,o]],m,q,j,n=(h)?e.Selector._nativeQuery:e.Selector._bruteQuery;if(g&&n){if(!f&&(!h||o.tagName)){k=b._splitQueries(g,o);}for(j=0;(m=k[j++]);){q=n(m[0],m[1],p);if(!p){q=e.Array(q,0,true);}if(q){l=l.concat(q);}}if(k.length>1){l=b._sort(b._deDupe(l));}}return(p)?(l[0]||null):l;},_splitQueries:function(h,l){var g=h.split(","),j=[],m="",k,f;if(l){if(l.tagName){l.id=l.id||e.guid();m='[id="'+l.id+'"] ';}for(k=0,f=g.length;k<f;++k){h=m+g[k];j.push([h,l]);}}return j;},_nativeQuery:function(f,g,h){if(e.UA.webkit&&f.indexOf(":checked")>-1&&(e.Selector.pseudos&&e.Selector.pseudos.checked)){return e.Selector.query(f,g,h,true);}try{return g["querySelector"+(h?"":"All")](f);}catch(i){return e.Selector.query(f,g,h,true);
}},filter:function(g,f){var h=[],j,k;if(g&&f){for(j=0;(k=g[j++]);){if(e.Selector.test(k,f)){h[h.length]=k;}}}else{}return h;},test:function(h,k,p){var n=false,g=k.split(","),f=false,q,t,o,s,m,l,r;if(h&&h.tagName){if(!p&&!e.DOM.inDoc(h)){q=h.parentNode;if(q){p=q;}else{s=h[d].createDocumentFragment();s.appendChild(h);p=s;f=true;}}p=p||h[d];if(!h.id){h.id=e.guid();}for(m=0;(r=g[m++]);){r+='[id="'+h.id+'"]';o=e.Selector.query(r,p);for(l=0;t=o[l++];){if(t===h){n=true;break;}}if(n){break;}}if(f){s.removeChild(h);}}return n;},ancestor:function(g,f,h){return e.DOM.ancestor(g,function(i){return e.Selector.test(i,f);},h);}};e.mix(e.Selector,b,true);})(a);},"@VERSION@",{requires:["dom-base"]});YUI.add("selector-css2",function(g){var h="parentNode",d="tagName",e="attributes",a="combinator",f="pseudos",c=g.Selector,b={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_children:function(n,j){var k=n.children,m,l=[],o,p;if(n.children&&j&&n.children.tags){l=n.children.tags(j);}else{if((!k&&n[d])||(k&&j)){o=k||n.childNodes;k=[];for(m=0;(p=o[m++]);){if(p.tagName){if(!j||j===p.tagName){k.push(p);}}}}}return k||[];},_re:{attr:/(\[[^\]]*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(j,i){return g.DOM.getAttribute(j,i)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(i){return g.Selector._children(i[h])[0]===i;}},_bruteQuery:function(n,r,t){var o=[],i=[],q=c._tokenize(n),m=q[q.length-1],s=g.DOM._getDoc(r),k,j,p,l;if(m){j=m.id;p=m.className;l=m.tagName||"*";if(r.getElementsByTagName){if(j&&(r.all||(r.nodeType===9||g.DOM.inDoc(r)))){i=g.DOM.allById(j,r);}else{if(p){i=r.getElementsByClassName(p);}else{i=r.getElementsByTagName(l);}}}else{k=r.firstChild;while(k){if(k.tagName){i.push(k);}k=k.nextSilbing||k.firstChild;}}if(i.length){o=c._filterNodes(i,q,t);}}return o;},_filterNodes:function(u,q,s){var z=0,y,A=q.length,t=A-1,p=[],w=u[0],D=w,B=g.Selector.getters,o,x,m,r,k,v,l,C;for(z=0;(D=w=u[z++]);){t=A-1;r=null;testLoop:while(D&&D.tagName){m=q[t];l=m.tests;y=l.length;if(y&&!k){while((C=l[--y])){o=C[1];if(B[C[0]]){v=B[C[0]](D,C[0]);}else{v=D[C[0]];if(v===undefined&&D.getAttribute){v=D.getAttribute(C[0]);}}if((o==="="&&v!==C[2])||(typeof o!=="string"&&o.test&&!o.test(v))||(!o.test&&typeof o==="function"&&!o(D,C[0]))){if((D=D[r])){while(D&&(!D.tagName||(m.tagName&&m.tagName!==D.tagName))){D=D[r];}}continue testLoop;}}}t--;if(!k&&(x=m.combinator)){r=x.axis;D=D[r];while(D&&!D.tagName){D=D[r];}if(x.direct){r=null;}}else{p.push(w);if(s){return p;}break;}}}w=D=null;return p;},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:e,re:/^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(k,l){var j=k[2]||"",i=g.Selector.operators,m;if((k[1]==="id"&&j==="=")||(k[1]==="className"&&g.config.doc.documentElement.getElementsByClassName&&(j==="~="||j==="="))){l.prefilter=k[1];l[k[1]]=k[3];}if(j in i){m=i[j];if(typeof m==="string"){k[3]=k[3].replace(g.Selector._reRegExpTokens,"\\$1");m=g.DOM._getRegExp(m.replace("{val}",k[3]));}k[2]=m;}if(!l.last||l.prefilter!==k[1]){return k.slice(1);}}},{name:d,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(j,k){var i=j[1].toUpperCase();k.tagName=i;if(i!=="*"&&(!k.last||k.prefilter)){return[d,"=",i];}if(!k.prefilter){k.prefilter="tagName";}}},{name:a,re:/^\s*([>+~]|\s)\s*/,fn:function(i,j){}},{name:f,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(i,j){var k=c[f][i[1]];if(k){return[i[2],k];}else{return false;}}}],_getToken:function(i){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(l){l=l||"";l=c._replaceShorthand(g.Lang.trim(l));var k=c._getToken(),q=l,p=[],r=false,n,o,m,j;outer:do{r=false;for(m=0;(j=c._parsers[m++]);){if((n=j.re.exec(l))){if(j.name!==a){k.selector=l;}l=l.replace(n[0],"");if(!l.length){k.last=true;}if(c._attrFilters[n[1]]){n[1]=c._attrFilters[n[1]];}o=j.fn(n,k);if(o===false){r=false;break outer;}else{if(o){k.tests.push(o);}}if(!l.length||j.name===a){p.push(k);k=c._getToken(k);if(j.name===a){k.combinator=g.Selector.combinators[n[1]];}}r=true;}}}while(r&&l.length);if(!r||l.length){p=[];}return p;},_replaceShorthand:function(k){var l=c.shorthand,m=k.match(c._re.attr),p=k.match(c._re.pseudos),o,n,j;if(p){k=k.replace(c._re.pseudos,"!!REPLACED_PSEUDO!!");}if(m){k=k.replace(c._re.attr,"!!REPLACED_ATTRIBUTE!!");}for(o in l){if(l.hasOwnProperty(o)){k=k.replace(g.DOM._getRegExp(o,"gi"),l[o]);}}if(m){for(n=0,j=m.length;n<j;++n){k=k.replace("!!REPLACED_ATTRIBUTE!!",m[n]);}}if(p){for(n=0,j=p.length;n<j;++n){k=k.replace("!!REPLACED_PSEUDO!!",p[n]);}}return k;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(j,i){return g.DOM.getAttribute(j,i);}}};g.mix(g.Selector,b,true);g.Selector.getters.src=g.Selector.getters.rel=g.Selector.getters.href;if(g.Selector.useNative&&g.config.doc.querySelector){g.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]";}},"@VERSION@",{requires:["selector-native"]});YUI.add("selector",function(a){},"@VERSION@",{use:["selector-native","selector-css2"]});YUI.add("dom",function(a){},"@VERSION@",{use:["dom-base","dom-style","dom-screen","selector"]});