function(){return function(){var aa=this;function ba(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function h(a){return"string"==typeof a}function da(a,b,c){return a.call.apply(a.bind,arguments)}function ea(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
function fa(a,b,c){fa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return fa.apply(null,arguments)}function ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}
function l(a){var b=m;function c(){}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.F=function(a,c,f){for(var g=Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};function n(a,b){for(var c=a.length,d=h(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function p(a,b,c){var d=c;n(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function q(a,b){for(var c=a.length,d=h(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function ha(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function ia(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function r(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}r.prototype.clone=function(){return new r(this.x,this.y)};r.prototype.toString=function(){return"("+this.x+", "+this.y+")"};r.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};r.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};r.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};function ja(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function ka(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?la(a,b):!c&&ja(e,b)?-1*ma(a,b):!d&&ja(f,a)?ma(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);
d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(aa.Range.START_TO_END,d)}function ma(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return la(d,a)}function la(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};/*

 The MIT License

 Copyright (c) 2007 Cybozu Labs, Inc.
 Copyright (c) 2012 Google Inc.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to
 deal in the Software without restriction, including without limitation the
 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 sell copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 IN THE SOFTWARE.
*/
function t(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function na(a){this.b=a;this.a=0}function oa(a){a=a.match(pa);for(var b=0;b<a.length;b++)qa.test(a[b])&&a.splice(b,1);return new na(a)}var pa=RegExp("\\$?(?:(?![0-9-\\.])(?:\\*|[\\w-\\.]+):)?(?![0-9-\\.])(?:\\*|[\\w-\\.]+)|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),qa=/^\s/;function u(a,b){return a.b[a.a+(b||0)]}function w(a){return a.b[a.a++]}function x(a){return a.b.length<=a.a};function y(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}
function z(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function B(a,b,c,d,e){return ra.call(null,a,b,h(c)?c:null,h(d)?d:null,e||new C)}
function ra(a,b,c,d,e){b.getElementsByName&&d&&"name"==c?(b=b.getElementsByName(d),n(b,function(b){a.a(b)&&D(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),n(b,function(b){b.className==d&&a.a(b)&&D(e,b)})):a instanceof E?sa(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),n(b,function(a){z(a,c,d)&&D(e,a)}));return e}function ta(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)z(b,c,d)&&a.a(b)&&D(e,b);return e}
function sa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)z(b,c,d)&&a.a(b)&&D(e,b),sa(a,b,c,d,e)};function C(){this.b=this.a=null;this.l=0}function ua(a){this.node=a;this.a=this.b=null}function va(a,b){if(!a.a)return b;if(!b.a)return a;for(var c=a.a,d=b.a,e=null,f=null,g=0;c&&d;)c.node==d.node?(f=c,c=c.a,d=d.a):0<ka(c.node,d.node)?(f=d,d=d.a):(f=c,c=c.a),(f.b=e)?e.a=f:a.a=f,e=f,g++;for(f=c||d;f;)f.b=e,e=e.a=f,g++,f=f.a;a.b=e;a.l=g;return a}C.prototype.unshift=function(a){a=new ua(a);a.a=this.a;this.b?this.a.b=a:this.a=this.b=a;this.a=a;this.l++};
function D(a,b){var c=new ua(b);c.b=a.b;a.a?a.b.a=c:a.a=a.b=c;a.b=c;a.l++}function F(a){return(a=a.a)?a.node:null}function G(a){return(a=F(a))?y(a):""}function H(a,b){return new wa(a,!!b)}function wa(a,b){this.f=a;this.b=(this.c=b)?a.b:a.a;this.a=null}function I(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.c?b.b:b.a;return c.node};function m(a){this.i=a;this.b=this.g=!1;this.f=null}function J(a){return"\n  "+a.toString().split("\n").join("\n  ")}function xa(a,b){a.g=b}function ya(a,b){a.b=b}function K(a,b){var c=a.a(b);return c instanceof C?+G(c):+c}function L(a,b){var c=a.a(b);return c instanceof C?G(c):""+c}function M(a,b){var c=a.a(b);return c instanceof C?!!c.l:!!c};function N(a,b,c){m.call(this,a.i);this.c=a;this.h=b;this.o=c;this.g=b.g||c.g;this.b=b.b||c.b;this.c==za&&(c.b||c.g||4==c.i||0==c.i||!b.f?b.b||b.g||4==b.i||0==b.i||!c.f||(this.f={name:c.f.name,s:b}):this.f={name:b.f.name,s:c})}l(N);
function O(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof C&&c instanceof C){b=H(b);for(d=I(b);d;d=I(b))for(e=H(c),f=I(e);f;f=I(e))if(a(y(d),y(f)))return!0;return!1}if(b instanceof C||c instanceof C){b instanceof C?(e=b,d=c):(e=c,d=b);f=H(e);for(var g=typeof d,k=I(f);k;k=I(f)){switch(g){case "number":k=+y(k);break;case "boolean":k=!!y(k);break;case "string":k=y(k);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(k,d)||e==c&&a(d,k))return!0}return!1}return e?"boolean"==
typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}N.prototype.a=function(a){return this.c.m(this.h,this.o,a)};N.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+J(this.h);return a+=J(this.o)};function Aa(a,b,c,d){this.a=a;this.w=b;this.i=c;this.m=d}Aa.prototype.toString=function(){return this.a};var Ba={};
function P(a,b,c,d){if(Ba.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Aa(a,b,c,d);return Ba[a.toString()]=a}P("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});P("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});P("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});P("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});P("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});P("<",4,2,function(a,b,c){return O(function(a,b){return a<b},a,b,c)});
P(">",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});var za=P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});P("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function R(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");m.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}l(R);R.prototype.a=function(a){a=this.c.a(a);return Ca(this.h,a)};R.prototype.toString=function(){var a;a="Filter:"+J(this.c);return a+=J(this.h)};function Da(a,b){if(b.length<a.A)throw Error("Function "+a.j+" expects at least"+a.A+" arguments, "+b.length+" given");if(null!==a.v&&b.length>a.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&n(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});m.call(this,a.i);this.h=a;this.c=b;xa(this,a.g||q(b,function(a){return a.g}));ya(this,a.D&&!b.length||a.C&&!!b.length||q(b,function(a){return a.b}))}l(Da);
Da.prototype.a=function(a){return this.h.m.apply(null,ha(a,this.c))};Da.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=p(this.c,function(a,b){return a+J(b)},"Arguments:"),a=a+J(b);return a};function Ea(a,b,c,d,e,f,g,k,v){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==k?k:g;this.B=!!v}Ea.prototype.toString=function(){return this.j};var Fa={};
function S(a,b,c,d,e,f,g,k){if(Fa.hasOwnProperty(a))throw Error("Function already created: "+a+".");Fa[a]=new Ea(a,b,c,d,!1,e,f,g,k)}S("boolean",2,!1,!1,function(a,b){return M(b,a)},1);S("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);S("concat",3,!1,!1,function(a,b){return p(ia(arguments,1),function(b,d){return b+L(d,a)},"")},2,null);S("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);S("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0);
S("false",2,!1,!1,function(){return!1},0);S("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);S("id",4,!1,!1,function(a,b){var c=a.a,d=9==c.nodeType?c:c.ownerDocument,c=L(b,a).split(/\s+/),e=[];n(c,function(a){a=d.getElementById(a);var b;if(!(b=!a)){a:if(h(e))b=h(a)&&1==a.length?e.indexOf(a,0):-1;else{for(b=0;b<e.length;b++)if(b in e&&e[b]===a)break a;b=-1}b=0<=b}b||e.push(a)});e.sort(ka);var f=new C;n(e,function(a){D(f,a)});return f},1);S("lang",2,!1,!1,function(){return!1},1);
S("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);S("local-name",3,!1,!0,function(a,b){var c=b?F(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);S("name",3,!1,!0,function(a,b){var c=b?F(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);S("namespace-uri",3,!0,!1,function(){return""},0,1,!0);S("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):y(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
S("not",2,!1,!1,function(a,b){return!M(b,a)},1);S("number",1,!1,!0,function(a,b){return b?K(b,a):+y(a.a)},0,1);S("position",1,!0,!1,function(a){return a.b},0);S("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);S("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);S("string",3,!1,!0,function(a,b){return b?L(b,a):y(a.a)},0,1);S("string-length",1,!1,!0,function(a,b){return(b?L(b,a):y(a.a)).length},0,1);
S("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);S("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
S("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,!1,!1,function(a,b){for(var c=H(b.a(a)),d=0,e=I(c);e;e=I(c))d+=+y(e);return d},1,1,!0);S("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);S("true",2,!1,!1,function(){return!0},0);function E(a,b){this.h=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Ga(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}E.prototype.a=function(a){return null===this.b||this.b==a.nodeType};E.prototype.f=function(){return this.h};
E.prototype.toString=function(){var a="Kind Test: "+this.h;null===this.c||(a+=J(this.c));return a};function Ha(a){m.call(this,3);this.c=a.substring(1,a.length-1)}l(Ha);Ha.prototype.a=function(){return this.c};Ha.prototype.toString=function(){return"Literal: "+this.c};function T(a,b){this.j=a.toLowerCase();var c;c="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.b=b?b.toLowerCase():c}T.prototype.a=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.j&&this.j!=a.localName.toLowerCase()?!1:"*"==this.b?!0:this.b==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};T.prototype.f=function(){return this.j};T.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.b?"":this.b+":")+this.j};function Ia(a){m.call(this,1);this.c=a}l(Ia);Ia.prototype.a=function(){return this.c};Ia.prototype.toString=function(){return"Number: "+this.c};function Ja(a,b){m.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=Ka||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}l(Ja);function U(){m.call(this,4)}l(U);U.prototype.a=function(a){var b=new C;a=a.a;9==a.nodeType?D(b,a):D(b,a.ownerDocument);return b};U.prototype.toString=function(){return"Root Helper Expression"};function La(){m.call(this,4)}l(La);La.prototype.a=function(a){var b=new C;D(b,a.a);return b};La.prototype.toString=function(){return"Context Helper Expression"};
function Ma(a){return"/"==a||"//"==a}Ja.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof C))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.l;c++){var e=a[c],f=H(b,e.c.a),g;if(e.g||e.c!=Na)if(e.g||e.c!=Oa)for(g=I(f),b=e.a(new t(g));null!=(g=I(f));)g=e.a(new t(g)),b=va(b,g);else g=I(f),b=e.a(new t(g));else{for(g=I(f);(b=I(f))&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new t(g))}}return b};
Ja.prototype.toString=function(){var a;a="Path Expression:"+J(this.h);if(this.c.length){var b=p(this.c,function(a,b){return a+J(b)},"Steps:");a+=J(b)}return a};function Pa(a,b){this.a=a;this.b=!!b}
function Ca(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=H(b),f=b.l,g,k=0;g=I(e);k++){var v=a.b?f-k:k+1;g=d.a(new t(g,v,f));if("number"==typeof g)v=v==g;else if("string"==typeof g||"boolean"==typeof g)v=!!g;else if(g instanceof C)v=0<g.l;else throw Error("Predicate.evaluate returned an unexpected type.");if(!v){v=e;g=v.f;var A=v.a;if(!A)throw Error("Next must be called at least once before remove.");var Q=A.b,A=A.a;Q?Q.a=A:g.a=A;A?A.b=Q:g.b=Q;g.l--;v.a=null}}return b}
Pa.prototype.toString=function(){return p(this.a,function(a,b){return a+J(b)},"Predicates:")};function V(a,b,c,d){m.call(this,4);this.c=a;this.o=b;this.h=c||new Pa([]);this.u=!!d;b=this.h;b=0<b.a.length?b.a[0].f:null;a.b&&b&&(this.f={name:b.name,s:b.s});a:{a=this.h;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.g||1==c.i||0==c.i){a=!0;break a}a=!1}this.g=a}l(V);
V.prototype.a=function(a){var b=a.a,c=null,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.s?L(c.s,a):null,f=1);if(this.u)if(this.g||this.c!=Qa)if(a=H((new V(Ra,new E("node"))).a(a)),b=I(a))for(c=this.m(b,d,e,f);null!=(b=I(a));)c=va(c,this.m(b,d,e,f));else c=new C;else c=B(this.o,b,d,e),c=Ca(this.h,c,f);else c=this.m(a.a,d,e,f);return c};V.prototype.m=function(a,b,c,d){a=this.c.f(this.o,a,b,c);return a=Ca(this.h,a,d)};
V.prototype.toString=function(){var a;a="Step:"+J("Operator: "+(this.u?"//":"/"));this.c.j&&(a+=J("Axis: "+this.c));a+=J(this.o);if(this.h.a.length){var b=p(this.h.a,function(a,b){return a+J(b)},"Predicates:");a+=J(b)}return a};function Sa(a,b,c,d){this.j=a;this.f=b;this.a=c;this.b=d}Sa.prototype.toString=function(){return this.j};var Ta={};function W(a,b,c,d){if(Ta.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Sa(a,b,c,!!d);return Ta[a]=b}
W("ancestor",function(a,b){for(var c=new C,d=b;d=d.parentNode;)a.a(d)&&c.unshift(d);return c},!0);W("ancestor-or-self",function(a,b){var c=new C,d=b;do a.a(d)&&c.unshift(d);while(d=d.parentNode);return c},!0);var Ka=W("attribute",function(a,b){var c=new C,d=a.f(),e=b.attributes;if(e)if(a instanceof E&&null===a.b||"*"==d)for(var d=0,f;f=e[d];d++)D(c,f);else(f=e.getNamedItem(d))&&D(c,f);return c},!1),Qa=W("child",function(a,b,c,d,e){return ta.call(null,a,b,h(c)?c:null,h(d)?d:null,e||new C)},!1,!0);
W("descendant",B,!1,!0);var Ra=W("descendant-or-self",function(a,b,c,d){var e=new C;z(b,c,d)&&a.a(b)&&D(e,b);return B(a,b,c,d,e)},!1,!0),Na=W("following",function(a,b,c,d){var e=new C;do for(var f=b;f=f.nextSibling;)z(f,c,d)&&a.a(f)&&D(e,f),e=B(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);W("following-sibling",function(a,b){for(var c=new C,d=b;d=d.nextSibling;)a.a(d)&&D(c,d);return c},!1);W("namespace",function(){return new C},!1);
var Ua=W("parent",function(a,b){var c=new C;if(9==b.nodeType)return c;if(2==b.nodeType)return D(c,b.ownerElement),c;var d=b.parentNode;a.a(d)&&D(c,d);return c},!1),Oa=W("preceding",function(a,b,c,d){var e=new C,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var v=[];for(b=f[g];b=b.previousSibling;)v.unshift(b);for(var A=0,Q=v.length;A<Q;A++)b=v[A],z(b,c,d)&&a.a(b)&&D(e,b),e=B(a,b,c,d,e)}return e},!0,!0);
W("preceding-sibling",function(a,b){for(var c=new C,d=b;d=d.previousSibling;)a.a(d)&&c.unshift(d);return c},!0);var Va=W("self",function(a,b){var c=new C;a.a(b)&&D(c,b);return c},!1);function Wa(a){m.call(this,1);this.c=a;this.g=a.g;this.b=a.b}l(Wa);Wa.prototype.a=function(a){return-K(this.c,a)};Wa.prototype.toString=function(){return"Unary Expression: -"+J(this.c)};function Xa(a){m.call(this,4);this.c=a;xa(this,q(this.c,function(a){return a.g}));ya(this,q(this.c,function(a){return a.b}))}l(Xa);Xa.prototype.a=function(a){var b=new C;n(this.c,function(c){c=c.a(a);if(!(c instanceof C))throw Error("Path expression must evaluate to NodeSet.");b=va(b,c)});return b};Xa.prototype.toString=function(){return p(this.c,function(a,b){return a+J(b)},"Union Expression:")};function Ya(a,b){this.a=a;this.b=b}function Za(a){for(var b,c=[];;){X(a,"Missing right hand side of binary expression.");b=$a(a);var d=w(a.a);if(!d)break;var e=(d=Ba[d]||null)&&d.w;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].w;)b=new N(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new N(c.pop(),c.pop(),b);return b}function X(a,b){if(x(a.a))throw Error(b);}function ab(a,b){var c=w(a.a);if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);}
function bb(a){a=w(a.a);if(")"!=a)throw Error("Bad token: "+a);}function cb(a){a=w(a.a);if(2>a.length)throw Error("Unclosed literal string");return new Ha(a)}
function db(a){var b,c=[],d;if(Ma(u(a.a))){b=w(a.a);d=u(a.a);if("/"==b&&(x(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new U;d=new U;X(a,"Missing next location step.");b=eb(a,b);c.push(b)}else{a:{b=u(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":w(a.a);b=Za(a);X(a,'unclosed "("');ab(a,")");break;case '"':case "'":b=cb(a);break;default:if(isNaN(+b))if(!Ga(b)&&/(?![0-9])[\w]/.test(d)&&"("==u(a.a,1)){b=w(a.a);b=
Fa[b]||null;w(a.a);for(d=[];")"!=u(a.a);){X(a,"Missing function argument list.");d.push(Za(a));if(","!=u(a.a))break;w(a.a)}X(a,"Unclosed function argument list.");bb(a);b=new Da(b,d)}else{b=null;break a}else b=new Ia(+w(a.a))}"["==u(a.a)&&(d=new Pa(fb(a)),b=new R(b,d))}if(b)if(Ma(u(a.a)))d=b;else return b;else b=eb(a,"/"),d=new La,c.push(b)}for(;Ma(u(a.a));)b=w(a.a),X(a,"Missing next location step."),b=eb(a,b),c.push(b);return new Ja(d,c)}
function eb(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==u(a.a))return d=new V(Va,new E("node")),w(a.a),d;if(".."==u(a.a))return d=new V(Ua,new E("node")),w(a.a),d;var f;if("@"==u(a.a))f=Ka,w(a.a),X(a,"Missing attribute name");else if("::"==u(a.a,1)){if(!/(?![0-9])[\w]/.test(u(a.a).charAt(0)))throw Error("Bad token: "+w(a.a));c=w(a.a);f=Ta[c]||null;if(!f)throw Error("No axis with name: "+c);w(a.a);X(a,"Missing node name")}else f=Qa;c=u(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("==
u(a.a,1)){if(!Ga(c))throw Error("Invalid node type: "+c);c=w(a.a);if(!Ga(c))throw Error("Invalid type name: "+c);ab(a,"(");X(a,"Bad nodetype");e=u(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=cb(a);X(a,"Bad nodetype");bb(a);c=new E(c,g)}else if(c=w(a.a),e=c.indexOf(":"),-1==e)c=new T(c);else{var g=c.substring(0,e),k;if("*"==g)k="*";else if(k=a.b(g),!k)throw Error("Namespace prefix not declared: "+g);c=c.substr(e+1);c=new T(c,k)}else throw Error("Bad token: "+w(a.a));e=new Pa(fb(a),f.a);return d||
new V(f,c,e,"//"==b)}function fb(a){for(var b=[];"["==u(a.a);){w(a.a);X(a,"Missing predicate expression.");var c=Za(a);b.push(c);X(a,"Unclosed predicate expression.");ab(a,"]")}return b}function $a(a){if("-"==u(a.a))return w(a.a),new Wa($a(a));var b=db(a);if("|"!=u(a.a))a=b;else{for(b=[b];"|"==w(a.a);)X(a,"Missing next union location path."),b.push(db(a));a.a.a--;a=new Xa(b)}return a};function gb(a){switch(a.nodeType){case 1:return ga(hb,a);case 9:return gb(a.documentElement);case 11:case 10:case 6:case 12:return ib;default:return a.parentNode?gb(a.parentNode):ib}}function ib(){return null}function hb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?hb(a.parentNode,b):null};function jb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=oa(a);if(x(c))throw Error("Invalid XPath expression.");b?"function"==ca(b)||(b=fa(b.lookupNamespaceURI,b)):b=function(){return null};var d=Za(new Ya(c,b));if(!x(c))throw Error("Bad token: "+w(c));this.evaluate=function(a,b){var c=d.a(new t(a));return new Y(c,b)}}
function Y(a,b){if(0==b)if(a instanceof C)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof C))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof C?G(a):""+a;break;case 1:this.numberValue=a instanceof C?+G(a):+a;break;case 3:this.booleanValue=a instanceof C?0<a.l:!!a;break;case 4:case 5:case 6:case 7:var d=
H(a);c=[];for(var e=I(d);e;e=I(d))c.push(e);this.snapshotLength=a.l;this.invalidIteratorState=!1;break;case 8:case 9:this.singleNodeValue=F(a);break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||0>a?null:c[a]}}Y.ANY_TYPE=0;
Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function kb(a){this.lookupNamespaceURI=gb(a)}
ba("wgxpath.install",function(a,b){var c=a||aa,d=c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new jb(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new jb(a,b)},d.createNSResolver=function(a){return new kb(a)}});function Z(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}Z.prototype.clone=function(){return new Z(this.left,this.top,this.width,this.height)};Z.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};Z.prototype.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
Z.prototype.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Z.prototype.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};ba("_",function(a){var b=a.getClientRects();if(0==b.length)throw Error("Element does not have any client rects");b=b[0];if(1==a.nodeType){b:{var c;try{c=a.getBoundingClientRect()}catch(d){a={left:0,top:0,right:0,bottom:0};break b}a=c}a=new r(a.left,a.top)}else a=a.changedTouches?a.changedTouches[0]:a,a=new r(a.clientX,a.clientY);return new Z(b.left-a.x,b.top-a.y,b.right-b.left,b.bottom-b.top)});; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);}
