/g,t),new RegExp(n)}function t(n,t,e){return n=(n=n.source).replace(t,e.source||e),new RegExp(n)}function r(n,t){return n.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",t).join("/")}function o(n,r,t){"even"===(e=(e=n).replace(/\s+/g,""))?e="2n+0":"odd"===e?e="2n+1":~e.indexOf("n")||(e="0n"+e);var e,o=(n={group:"-"===(e=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(e))[1]?-(e[2]||1):+(e[2]||1),offset:e[4]?"-"===e[3]?-e[4]:+e[4]:0}).group,u=n.offset,i=t?l:s,c=t?a:f;return function(n){if(1===n.parentNode.nodeType)for(var t=i(n.parentNode),e=0;t;){if(r(t,n)&&e++,t===n)return e-=u,o&&e?!(e%o)&&e<0==o<0:!e;t=c(t)}}}function u(n,t){for(var e,r=[],o=N(n),u=t.getElementsByTagName(o.qname),i=0;e=u[i++];)o(e)&&r.push(e);if(o.sel){for(;o.sel;)for(o=N(o.sel),u=t.getElementsByTagName(o.qname),i=0;e=u[i++];)o(e)&&!~w.call(r,e)&&r.push(e);r.sort(c)}return r}var e,i,d=this,p=this.document,h=this.zest,m=p.compareDocumentPosition?function(n,t){return n.compareDocumentPosition(t)}:function(n,t){for(var e=n.ownerDocument.getElementsByTagName("*"),r=e.length;r--;){if(e[r]===n)return 2;if(e[r]===t)return 4}return 1},g=function(n){if(!n)return n;var t=n[0];return'"'===t||"'"===t?n.slice(1,-1):n},w=Array.prototype.indexOf||function(n,t){for(var e=this.length;e--;)if(this[e]===t)return e;return-1},y={"*":((e=p.createElement("div")).appendChild(p.createComment("")),e.getElementsByTagName("*")[0]?function(n){if(1===n.nodeType)return!0}:function(){return!0}),type:function(t){return t=t.toLowerCase(),function(n){return n.nodeName.toLowerCase()===t}},attr:function(e,r,o,u){return r=v[r],function(n){var t;switch(e){case"for":t=n.htmlFor;break;case"class":""===(t=n.className)&&null==n.getAttribute("class")&&(t=null);break;case"href":t=n.getAttribute("href",2);break;case"title":t=n.getAttribute("title")||null;break;case"id":if(n.getAttribute){t=n.getAttribute("id");break}default:t=null!=n[e]?n[e]:n.getAttribute&&n.getAttribute(e)}if(null!=t)return t+="",u&&(t=t.toLowerCase(),o=o.toLowerCase()),r(t,o)}},":first-child":function(n){return!a(n)&&1===n.parentNode.nodeType},":last-child":function(n){return!f(n)&&1===n.parentNode.nodeType},":only-child":function(n){return!a(n)&&!f(n)&&1===n.parentNode.nodeType},":nth-child":function(n,t){return o(n,function(){return 1},t)},":nth-last-child":function(n){return y[":nth-child"](n,!0)},":root":function(n){return n.ownerDocument.documentElement===n},":empty":function(n){return!n.firstChild},":not":function(n){var t=A(n);return function(n){return!t(n)}},":first-of-type":function(n){if(1===n.parentNode.nodeType){for(var t=n.nodeName;n=a(n);)if(n.nodeName===t)return;return!0}},":last-of-type":function(n){if(1===n.parentNode.nodeType){for(var t=n.nodeName;n=f(n);)if(n.nodeName===t)return;return!0}},":only-of-type":function(n){return y[":first-of-type"](n)&&y[":last-of-type"](n)},":nth-of-type":function(n,t){return o(n,function(n,t){return n.nodeName===t.nodeName},t)},":nth-last-of-type":function(n){return y[":nth-of-type"](n,!0)},":checked":function(n){return!(!n.checked&&!n.selected)},":indeterminate":function(n){return!y[":checked"](n)},":enabled":function(n){return!n.disabled&&"hidden"!==n.type},":disabled":function(n){return!!n.disabled},":target":function(n){return n.id===d.location.hash.substring(1)},":focus":function(n){return n===n.ownerDocument.activeElement},":matches":function(n){return A(n)},":nth-match":function(n,t){var n=n.split(/\s*,\s*/),e=n.shift(),n=A(n.join(","));return o(e,n,t)},":nth-last-match":function(n){return y[":nth-match"](n,!0)},":links-here":function(n){return n+""==d.location+""},":lang":function(t){return function(n){for(;n;){if(n.lang)return 0===n.lang.indexOf(t);n=n.parentNode}}},":dir":function(t){return function(n){for(;n;){if(n.dir)return n.dir===t;n=n.parentNode}}},":scope":function(n,t){t=t||n.ownerDocument;return 9===t.nodeType?n===t.documentElement:n===t},":any-link":function(n){return"string"==typeof n.href},":local-link":function(n){if(n.nodeName)return n.href&&n.host===d.location.host;var e=+n+1;return function(n){var t;if(n.href)return t=d.location+"",n+="",r(t,e)===r(n,e)}},":default":function(n){return!!n.defaultSelected},":valid":function(n){return n.willValidate||n.validity&&n.validity.valid},":invalid":function(n){return!y[":valid"](n)},":in-range":function(n){return n.value>n.min&&n.value<=n.max},":out-of-range":function(n){return!y[":in-range"](n)},":required":function(n){return!!n.required},":optional":function(n){return!n.required},":read-only":function(n){if(n.readOnly)return!0;var t=n.getAttribute("contenteditable"),e=n.contentEditable,r=n.nodeName.toLowerCase();return((r="input"!==r&&"textarea"!==r)||n.disabled)&&null==t&&"true"!==e},":read-write":function(n){return!y[":read-only"](n)},":hover":function(){throw new Error(":hover is not supported.")},":active":function(){throw new Error(":active is not supported.")},":link":function(){throw new Error(":link is not supported.")},":visited":function(){throw new Error(":visited is not supported.")},":column":function(){throw new Error(":column is not supported.")},":nth-column":function(){throw new Error(":nth-column is not supported.")},":nth-last-column":function(){throw new Error(":nth-last-column is not supported.")},":current":function(){throw new Error(":current is not supported.")},":past":function(){throw new Error(":past is not supported.")},":future":function(){throw new Error(":future is not supported.")},":contains":function(t){return function(n){return!!~(n.innerText||n.textContent||n.value||"").indexOf(t)}},":has":function(t){return function(n){return 0":function(t){return function(n){return t(n=n.parentNode)&&n}},"+":function(t){return function(n){return t(n=a(n))&&n}},"~":function(t){return function(n){for(;n=a(n);)if(t(n))return n}},noop:function(t){return function(n){return t(n)&&n}},ref:function(e,r){var o;function u(n){for(var t=n.ownerDocument.getElementsByTagName("*"),e=t.length;e--;)if(o=t[e],u.test(n))return!(o=null);o=null}return u.combinator=function(n){var t;if(o&&o.getAttribute)return t=o.getAttribute(r)||"",(t="#"===t[0]?t.substring(1):t)===n.id&&e(o)?o:void 0},u}},E={qname:/^ *([\w\-]+|\*)/,simple:/^(?:([.#][\w\-]+)|pseudo|attr)/,ref:/^ *\/([\w\-]+)\/ */,combinator:/^(?: +([^ \w*]) +|( )+|([^ \w*]))(?! *$)/,attr:/^\[([\w\-]+)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:[\w\-]+)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/},N=(E.inside=t(E.inside,"[^\"'>]*",E.inside),E.attr=t(E.attr,"inside",n("\\[","\\]")),E.pseudo=t(E.pseudo,"inside",n("\\(","\\)")),E.simple=t(E.simple,"pseudo",E.pseudo),E.simple=t(E.simple,"attr",E.attr),function(n){for(var t,e,r,o,u,i,n=n.replace(/^\s+|\s+$/g,""),c=[],f=[];n;){if(o=E.qname.exec(n))n=n.substring(o[0].length),r=o[1],f.push(x(r,!0));else{if(!(o=E.simple.exec(n)))throw new Error("Invalid selector.");n=n.substring(o[0].length),f.push(x(r="*",!0)),f.push(x(o))}for(;o=E.simple.exec(n);)n=n.substring(o[0].length),f.push(x(o));if("!"===n[0]&&(n=n.substring(1),(e=q()).qname=r,f.push(e.simple)),o=E.ref.exec(n))n=n.substring(o[0].length),i=b.ref(T(f),o[1]),c.push(i.combinator),f=[];else{if(o=E.combinator.exec(n)){if(n=n.substring(o[0].length),","===(u=o[1]||o[2]||o[3])){c.push(b.noop(T(f)));break}}else u="noop";c.push(b[u](T(f))),f=[]}}return(t=k(c)).qname=r,t.sel=n,e&&(e.lname=t.qname,e.test=t,e.qname=e.qname,e.sel=t.sel,t=e),i&&(i.test=t,i.qname=t.qname,i.sel=t.sel,t=i),t}),x=function(n,t){if(t)return"*"===n?y["*"]:y.type(n);if(n[1])return"."===n[1][0]?y.attr("class","~=",n[1].substring(1)):y.attr("id","=",n[1].substring(1));if(n[2])return n[3]?y[n[2]](g(n[3])):y[n[2]];var e;if(n[4])return n[6]&&(e=n[6].length,n[6]=n[6].replace(/ +i$/,""),e=e>n[6].length),y.attr(n[4],n[5]||"-",g(n[6]),e);throw new Error("Unknown Selector.")},T=function(t){var e,r=t.length;return r<2?t[0]:function(n){if(n){for(e=0;e