Bug 814037 - Check overflow x and overflow y when doing visibility checks with Marionette. Atom updated. r=mdas

This commit is contained in:
David Burns 2013-04-08 13:13:11 +01:00
parent 1488f0345a
commit fb53893fb5
3 changed files with 111 additions and 67 deletions

View File

@ -127,76 +127,59 @@ o.prototype.toString=function(){return"["+this.name+"] "+this.message};function
f}d=!j}d&&(j=[],F(a,j,f),b=j.join(""));a=b}a=!!a}else a=f;return a}var M=["_"],N=g;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)!M.length&&void 0!==L?N[O]=L:N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);} f}d=!j}d&&(j=[],F(a,j,f),b=j.join(""));a=b}a=!!a}else a=f;return a}var M=["_"],N=g;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)!M.length&&void 0!==L?N[O]=L:N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
// isElementDisplayed // isElementDisplayed
var isElementDisplayed = function(){return function(){function h(a){throw a;}var i=void 0,j=!0,k=null,m=!1;function n(a){return function(){return this[a]}}function aa(a){return function(){return a}}var p=this; var isElementDisplayed = function(){return function(){function g(a){throw a;}var h=void 0,l=!0,m=null,n=!1;function p(a){return function(){return this[a]}}function aa(a){return function(){return a}}var q=this;
function ba(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"; function ba(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 r(a){return a!==i}function s(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);function u(a,b){function c(){}c.prototype=b.prototype;a.fa=b.prototype;a.prototype=new c};var ca=window;function da(a){Error.captureStackTrace?Error.captureStackTrace(this,da):this.stack=Error().stack||"";a&&(this.message=String(a))}u(da,Error);da.prototype.name="CustomError";function ea(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a};function fa(a,b){b.unshift(a);da.call(this,ea.apply(k,b));b.shift();this.da=a}u(fa,da);fa.prototype.name="AssertionError";function ga(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);h(new fa(""+e,f||[]))}function ha(a,b,c){a||ga("",k,b,Array.prototype.slice.call(arguments,2))}function ia(a,b,c){var d=typeof a;"object"==d&&a!=k||"function"==d||ga("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var ja=Array.prototype;function v(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(i,d[e],e,a)}function ka(a,b){for(var c=a.length,d=[],e=0,f=s(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var l=f[g];b.call(i,l,g,a)&&(d[e++]=l)}return d}function la(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;v(a,function(c,f){d=b.call(i,d,c,f,a)});return d}function ma(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a))return j;return m} else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function s(a){return a!==h}function t(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}Math.floor(2147483648*Math.random()).toString(36);function v(a,b){function c(){}c.prototype=b.prototype;a.ba=b.prototype;a.prototype=new c};var da=window;function w(a){Error.captureStackTrace?Error.captureStackTrace(this,w):this.stack=Error().stack||"";a&&(this.message=String(a))}v(w,Error);w.prototype.name="CustomError";function ea(a,b){for(var c=1;c<arguments.length;c++){var d=String(arguments[c]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,d)}return a}
function na(a,b){var c;a:if(s(a))c=!s(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function oa(a){return ja.concat.apply(ja,arguments)}function pa(a,b,c){ha(a.length!=k);return 2>=arguments.length?ja.slice.call(a,b):ja.slice.call(a,b,c)};var qa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", function fa(a){var b=0,c=String(ga).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split(".");a=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split(".");for(var d=Math.max(c.length,a.length),e=0;0==b&&e<d;e++){var f=c[e]||"",k=a[e]||"",u=RegExp("(\\d*)(\\D*)","g"),E=RegExp("(\\d*)(\\D*)","g");do{var r=u.exec(f)||["","",""],B=E.exec(k)||["","",""];if(0==r[0].length&&0==B[0].length)break;b=((0==r[1].length?0:parseInt(r[1],10))<(0==B[1].length?0:parseInt(B[1],10))?-1:(0==r[1].length?0:parseInt(r[1],10))>(0==
B[1].length?0:parseInt(B[1],10))?1:0)||((0==r[2].length)<(0==B[2].length)?-1:(0==r[2].length)>(0==B[2].length)?1:0)||(r[2]<B[2]?-1:r[2]>B[2]?1:0)}while(0==b)}return b}function ha(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};function ia(a,b){b.unshift(a);w.call(this,ea.apply(m,b));b.shift();this.$=a}v(ia,w);ia.prototype.name="AssertionError";function ja(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);g(new ia(""+e,f||[]))}function ka(a,b,c){a||ja("",m,b,Array.prototype.slice.call(arguments,2))}function la(a,b,c){ca(a)||ja("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var ma=Array.prototype;function x(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(h,d[e],e,a)}function na(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;x(a,function(c,f){d=b.call(h,d,c,f,a)});return d}function y(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(h,d[e],e,a))return l;return n}function oa(a,b){var c;a:if(t(a))c=!t(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}
function pa(a){return ma.concat.apply(ma,arguments)}function qa(a,b,c){ka(a.length!=m);return 2>=arguments.length?ma.slice.call(a,b):ma.slice.call(a,b,c)};var ra={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var ra="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),sa=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ta(a){ua.test(a)||h(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(sa,"#$1$1$2$2$3$3"));return a.toLowerCase()}var ua=/^#(?:[0-9a-f]{3}){1,2}$/i,va=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i; seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var sa="background-color border-top-color border-right-color border-bottom-color border-left-color color outline-color".split(" "),ta=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/;function ua(a){va.test(a)||g(Error("'"+a+"' is not a valid hex color"));4==a.length&&(a=a.replace(ta,"#$1$1$2$2$3$3"));return a.toLowerCase()}var va=/^#(?:[0-9a-f]{3}){1,2}$/i,wa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i;
function wa(a){var b=a.match(va);if(b){var a=Number(b[1]),c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var xa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function ya(a){var b=a.match(xa);if(b){var a=Number(b[1]),c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function za(a,b){this.code=a;this.message=b||"";this.name=Aa[a]||Aa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(za,Error); function xa(a){var b=a.match(wa);if(b){a=Number(b[1]);var c=Number(b[2]),d=Number(b[3]),b=Number(b[4]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var ya=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function za(a){var b=a.match(ya);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};function z(a,b){this.code=a;this.message=b||"";this.name=Aa[a]||Aa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}v(z,Error);
var Aa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"}; var Aa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
za.prototype.toString=function(){return this.name+": "+this.message};var w=m,x=m,y=j;function Ba(){var a=p.document;return a?a.documentMode:i}var Ca;a:{var Da="",Ea;if(w&&p.opera)var Fa=p.opera.version,Da="function"==typeof Fa?Fa():Fa;else if(y?Ea=/rv\:([^\);]+)(\)|;)/:x&&(Ea=/MSIE\s+([^\);]+)(\)|;)/),Ea)var Ga=Ea.exec(p.navigator?p.navigator.userAgent:k),Da=Ga?Ga[1]:"";if(x){var Ha=Ba();if(Ha>parseFloat(Da)){Ca=String(Ha);break a}}Ca=Da}var Ia={}; z.prototype.toString=function(){return this.name+": "+this.message};var ga,Ba="",Ca=/rv\:([^\);]+)(\)|;)/.exec(q.navigator?q.navigator.userAgent:m);ga=Ba=Ca?Ca[1]:"";var Da={};var Ea;Da["1.9.1"]||(Da["1.9.1"]=0<=fa("1.9.1"));function A(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}A.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function C(a,b){this.width=a;this.height=b}C.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};C.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};C.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};C.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var Fa=3;function Ga(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function Ja(a){var b;if(!(b=Ia[a])){b=0;for(var c=String(Ca).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"",q=RegExp("(\\d*)(\\D*)","g"),t=RegExp("(\\d*)(\\D*)","g");do{var I=q.exec(g)||["","",""],N=t.exec(l)||["","",""];if(0==I[0].length&&0==N[0].length)break;b=((0==I[1].length?0:parseInt(I[1],10))<(0==N[1].length?0:parseInt(N[1],10))?-1:(0==I[1].length?0:parseInt(I[1], function Ha(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?Ia(a,b):!c&&Ga(e,b)?-1*Ja(a,b):!d&&Ga(f,a)?Ja(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=D(a);c=d.createRange();c.selectNode(a);c.collapse(l);d=d.createRange();d.selectNode(b);
10))>(0==N[1].length?0:parseInt(N[1],10))?1:0)||((0==I[2].length)<(0==N[2].length)?-1:(0==I[2].length)>(0==N[2].length)?1:0)||(I[2]<N[2]?-1:I[2]>N[2]?1:0)}while(0==b)}b=Ia[a]=0<=b}return b}function z(a){return x&&Ka>=a}var La=p.document,Ka=!La||!x?i:Ba()||("CSS1Compat"==La.compatMode?parseInt(Ca,10):5);var Ma;!y&&!x||x&&z(9)||y&&Ja("1.9.1");x&&Ja("9");var Na="BODY";function A(a,b){this.x=r(a)?a:0;this.y=r(b)?b:0}A.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function B(a,b){this.width=a;this.height=b}B.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};B.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};B.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};B.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var Oa=3;function Pa(a){return a?new Qa(C(a)):Ma||(Ma=new Qa)}function Ra(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} d.collapse(l);return c.compareBoundaryPoints(q.Range.START_TO_END,d)}function Ja(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ia(d,a)}function Ia(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function D(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Ka(a,b){var c=[];return La(a,b,c,l)?c[0]:h}function La(a,b,c,d){if(a!=m)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||La(a,b,c,d))return l;a=a.nextSibling}return n}
function Sa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!z(9)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 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?Ta(a,b):!c&&Ra(e,b)?-1*Ua(a,b):!d&&Ra(f,a)?Ua(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=C(a);c=d.createRange(); function Ma(a,b){a=a.parentNode;for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return m}function F(a){this.S=a||q.document||document}function Na(a){var b=a.S;a="CSS1Compat"==b.compatMode?b.documentElement:b.body;b=b.parentWindow||b.defaultView;return new A(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}F.prototype.contains=Ga;function G(a,b,c){this.g=a;this.Y=b||1;this.f=c||1};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==h||b==m?a.innerText:b,b=b==h||b==m?"":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 I(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}
c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Ua(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ta(d,a)}function Ta(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function C(a){return 9==a.nodeType?a:a.ownerDocument||a.document} function J(a,b,c,d,e){return Oa.call(m,a,b,t(c)?c:m,t(d)?d:m,e||new K)}function Oa(a,b,c,d,e){b.getElementsByName&&d&&"name"==c?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof L?Pa(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){I(a,c,d)&&e.add(a)}));return e}
function Va(a,b,c,d){if(a!=k)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Va(a,b,c,d))return j;a=a.nextSibling}return m}function Wa(a,b){for(var a=a.parentNode,c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function Qa(a){this.K=a||p.document||document}function Xa(a){var b=a.K,a="CSS1Compat"==b.compatMode?b.documentElement:b.body,b=b.parentWindow||b.defaultView;return new A(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}Qa.prototype.contains=Ra;function D(a,b,c){this.c=a;this.ba=b||1;this.j=c||1};var E=x&&!z(9),Ya=x&&!z(8);function Za(a,b,c,d,e){this.c=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ea=e;this.parentNode=b}function $a(a,b,c){var d=Ya&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Za(b,a,b.nodeName,d,c)};function ab(a){this.I=a;this.z=0}var bb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),cb=/^\s/;function F(a,b){return a.I[a.z+(b||0)]}ab.prototype.next=function(){return this.I[this.z++]};ab.prototype.back=function(){this.z--};ab.prototype.empty=function(){return this.I.length<=this.z};function G(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(E&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),E&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}else b=a.nodeValue;return""+b} function Qa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e}function Pa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),Pa(a,b,c,d,e)};function K(){this.f=this.d=m;this.r=0}function Ra(a){this.o=a;this.next=this.n=m}function Sa(a,b){if(a.d){if(!b.d)return a}else return b;for(var c=a.d,d=b.d,e=m,f=m,k=0;c&&d;)c.o==d.o?(f=c,c=c.next,d=d.next):0<Ha(c.o,d.o)?(f=d,d=d.next):(f=c,c=c.next),(f.n=e)?e.next=f:a.d=f,e=f,k++;for(f=c||d;f;)f.n=e,e=e.next=f,k++,f=f.next;a.f=e;a.r=k;return a}K.prototype.unshift=function(a){a=new Ra(a);a.next=this.d;this.f?this.d.n=a:this.d=this.f=a;this.d=a;this.r++};
function H(a,b,c){if(b===k)return j;try{if(!a.getAttribute)return m}catch(d){return m}Ya&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function db(a,b,c,d,e){return(E?eb:fb).call(k,a,b,s(c)?c:k,s(d)?d:k,e||new J)} K.prototype.add=function(a){a=new Ra(a);a.n=this.f;this.d?this.f.next=a:this.d=this.f=a;this.f=a;this.r++};function Ta(a){return(a=a.d)?a.o:m}K.prototype.l=p("r");function Ua(a){return(a=Ta(a))?H(a):""}function M(a,b){return new Va(a,!!b)}function Va(a,b){this.V=a;this.G=(this.t=b)?a.f:a.d;this.C=m}Va.prototype.next=function(){var a=this.G;if(a==m)return m;var b=this.C=a;this.G=this.t?a.n:a.next;return b.o};
function eb(a,b,c,d,e){if(a instanceof K||8==a.i||c&&a.i===k){var f=b.all;if(!f)return e;a=gb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],l=0;b=f[l++];)H(b,c,d)&&g.push(b);f=g}for(l=0;b=f[l++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}hb(a,b,c,d,e);return e} Va.prototype.remove=function(){var a=this.V,b=this.C;b||g(Error("Next must be called at least once before remove."));var c=b.n,b=b.next;c?c.next=b:a.d=b;b?b.n=c:a.f=c;a.r--;this.C=m};function N(a){this.c=a;this.e=this.h=n;this.s=m}N.prototype.b=p("h");function Wa(a,b){a.h=b}function Xa(a,b){a.e=b}N.prototype.j=p("s");function O(a,b){var c=a.evaluate(b);return c instanceof K?+Ua(c):+c}function P(a,b){var c=a.evaluate(b);return c instanceof K?Ua(c):""+c}function Q(a,b){var c=a.evaluate(b);return c instanceof K?!!c.l():!!c};function Ya(a,b,c){N.call(this,a.c);this.F=a;this.K=b;this.O=c;this.h=b.b()||c.b();this.e=b.e||c.e;this.F==Za&&(!c.e&&!c.b()&&4!=c.c&&0!=c.c&&b.j()?this.s={name:b.j().name,q:c}:!b.e&&(!b.b()&&4!=b.c&&0!=b.c&&c.j())&&(this.s={name:c.j().name,q:b}))}v(Ya,N);
function fb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),v(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),v(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof L?hb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),v(b,function(a){H(a,c,d)&&e.add(a)}));return e} function R(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof K&&c instanceof K){f=M(b);for(b=f.next();b;b=f.next()){e=M(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return l}return n}if(b instanceof K||c instanceof K){b instanceof K?e=b:(e=c,c=b);e=M(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+H(d);break;case "boolean":f=!!H(d);break;case "string":f=H(d);break;default:g(Error("Illegal primitive type for comparison."))}if(a(f,c))return l}return n}return e?
function ib(a,b,c,d,e){var f;if((a instanceof K||8==a.i||c&&a.i===k)&&(f=b.childNodes)){var g=gb(a);if("*"!=g&&(f=ka(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ka(f,function(a){return H(a,c,d)}));v(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return jb(a,b,c,d,e)}function jb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b);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)}Ya.prototype.evaluate=function(a){return this.F.k(this.K,this.O,a)};Ya.prototype.toString=function(a){a=a||"";var b=a+"binary expression: "+this.F+"\n";a+=" ";b+=this.K.toString(a)+"\n";return b+=this.O.toString(a)};function $a(a,b,c,d){this.X=a;this.aa=b;this.c=c;this.k=d}$a.prototype.toString=p("X");var ab={};
function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.matches(b)&&e.add(b),hb(a,b,c,d,e)}function gb(a){if(a instanceof L){if(8==a.i)return"!";if(a.i===k)return"*"}return a.getName()};function J(){this.j=this.g=k;this.t=0}function kb(a){this.l=a;this.next=this.q=k}function lb(a,b){if(a.g){if(!b.g)return a}else return b;for(var c=a.g,d=b.g,e=k,f=k,g=0;c&&d;)c.l==d.l||c.l instanceof Za&&d.l instanceof Za&&c.l.c==d.l.c?(f=c,c=c.next,d=d.next):0<Sa(c.l,d.l)?(f=d,d=d.next):(f=c,c=c.next),(f.q=e)?e.next=f:a.g=f,e=f,g++;for(f=c||d;f;)f.q=e,e=e.next=f,g++,f=f.next;a.j=e;a.t=g;return a} function S(a,b,c,d){a in ab&&g(Error("Binary operator already created: "+a));a=new $a(a,b,c,d);return ab[a.toString()]=a}S("div",6,1,function(a,b,c){return O(a,c)/O(b,c)});S("mod",6,1,function(a,b,c){return O(a,c)%O(b,c)});S("*",6,1,function(a,b,c){return O(a,c)*O(b,c)});S("+",5,1,function(a,b,c){return O(a,c)+O(b,c)});S("-",5,1,function(a,b,c){return O(a,c)-O(b,c)});S("<",4,2,function(a,b,c){return R(function(a,b){return a<b},a,b,c)});
J.prototype.unshift=function(a){a=new kb(a);a.next=this.g;this.j?this.g.q=a:this.g=this.j=a;this.g=a;this.t++};J.prototype.add=function(a){a=new kb(a);a.q=this.j;this.g?this.j.next=a:this.g=this.j=a;this.j=a;this.t++};function mb(a){return(a=a.g)?a.l:k}J.prototype.m=n("t");function nb(a){return(a=mb(a))?G(a):""}function M(a,b){return new ob(a,!!b)}function ob(a,b){this.Z=a;this.J=(this.r=b)?a.j:a.g;this.F=k} S(">",4,2,function(a,b,c){return R(function(a,b){return a>b},a,b,c)});S("<=",4,2,function(a,b,c){return R(function(a,b){return a<=b},a,b,c)});S(">=",4,2,function(a,b,c){return R(function(a,b){return a>=b},a,b,c)});var Za=S("=",3,2,function(a,b,c){return R(function(a,b){return a==b},a,b,c,l)});S("!=",3,2,function(a,b,c){return R(function(a,b){return a!=b},a,b,c,l)});S("and",2,2,function(a,b,c){return Q(a,c)&&Q(b,c)});S("or",1,2,function(a,b,c){return Q(a,c)||Q(b,c)});function bb(a,b){b.l()&&4!=a.c&&g(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.c);this.N=a;this.a=b;this.h=a.b();this.e=a.e}v(bb,N);bb.prototype.evaluate=function(a){a=this.N.evaluate(a);return cb(this.a,a)};bb.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.N.toString(a);return b+=this.a.toString(a)};function db(a,b){b.length<a.M&&g(Error("Function "+a.m+" expects at least"+a.M+" arguments, "+b.length+" given"));a.D!==m&&b.length>a.D&&g(Error("Function "+a.m+" expects at most "+a.D+" arguments, "+b.length+" given"));a.W&&x(b,function(b,d){4!=b.c&&g(Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+b))});N.call(this,a.c);this.v=a;this.A=b;Wa(this,a.h||y(b,function(a){return a.b()}));Xa(this,a.U&&!b.length||a.T&&!!b.length||y(b,function(a){return a.e}))}v(db,N);
ob.prototype.next=function(){var a=this.J;if(a==k)return k;var b=this.F=a;this.J=this.r?a.q:a.next;return b.l};ob.prototype.remove=function(){var a=this.Z,b=this.F;b||h(Error("Next must be called at least once before remove."));var c=b.q,b=b.next;c?c.next=b:a.g=b;b?b.q=c:a.j=c;a.t--;this.F=k};function O(a){this.f=a;this.e=this.k=m;this.u=k}O.prototype.d=n("k");O.prototype.o=n("u");function P(a,b){var c=a.evaluate(b);return c instanceof J?+nb(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof J?nb(c):""+c}function pb(a,b){var c=a.evaluate(b);return c instanceof J?!!c.m():!!c};function qb(a,b,c){O.call(this,a.f);this.H=a;this.O=b;this.T=c;this.k=b.d()||c.d();this.e=b.e||c.e;this.H==rb&&(!c.e&&!c.d()&&4!=c.f&&0!=c.f&&b.o()?this.u={name:b.o().name,s:c}:!b.e&&(!b.d()&&4!=b.f&&0!=b.f&&c.o())&&(this.u={name:c.o().name,s:b}))}u(qb,O); db.prototype.evaluate=function(a){return this.v.k.apply(m,pa(a,this.A))};db.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.v+"\n";b+=" ";this.A.length&&(a+=b+"Arguments:",b+=" ",a=na(this.A,function(a,d){return a+"\n"+d.toString(b)},a));return a};function eb(a,b,c,d,e,f,k,u,E){this.m=a;this.c=b;this.h=c;this.U=d;this.T=e;this.k=f;this.M=k;this.D=s(u)?u:k;this.W=!!E}eb.prototype.toString=p("m");var fb={};
function sb(a,b,c,d,e){var b=b.evaluate(d),c=c.evaluate(d),f;if(b instanceof J&&c instanceof J){f=M(b);for(b=f.next();b;b=f.next()){e=M(c);for(d=e.next();d;d=e.next())if(a(G(b),G(d)))return j}return m}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=M(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+G(d);break;case "boolean":f=!!G(d);break;case "string":f=G(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return j}return m}return e? function T(a,b,c,d,e,f,k,u){a in fb&&g(Error("Function already created: "+a+"."));fb[a]=new eb(a,b,c,d,n,e,f,k,u)}T("boolean",2,n,n,function(a,b){return Q(b,a)},1);T("ceiling",1,n,n,function(a,b){return Math.ceil(O(b,a))},1);T("concat",3,n,n,function(a,b){var c=qa(arguments,1);return na(c,function(b,c){return b+P(c,a)},"")},2,m);T("contains",2,n,n,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);T("count",1,n,n,function(a,b){return b.evaluate(a).l()},1,1,l);T("false",2,n,n,aa(n),0);
"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}qb.prototype.evaluate=function(a){return this.H.p(this.O,this.T,a)};qb.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.H+"\n",a=a+" ",b=b+(this.O.toString(a)+"\n");return b+=this.T.toString(a)};function tb(a,b,c,d){this.aa=a;this.R=b;this.f=c;this.p=d}tb.prototype.toString=n("aa");var ub={}; T("floor",1,n,n,function(a,b){return Math.floor(O(b,a))},1);T("id",4,n,n,function(a,b){var c=a.g,d=9==c.nodeType?c:c.ownerDocument,c=P(b,a).split(/\s+/),e=[];x(c,function(a){(a=d.getElementById(a))&&!oa(e,a)&&e.push(a)});e.sort(Ha);var f=new K;x(e,function(a){f.add(a)});return f},1);T("lang",2,n,n,aa(n),1);T("last",1,l,n,function(a){1!=arguments.length&&g(Error("Function last expects ()"));return a.f},0);
function R(a,b,c,d){a in ub&&h(Error("Binary operator already created: "+a));a=new tb(a,b,c,d);return ub[a.toString()]=a}R("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});R("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});R("*",6,1,function(a,b,c){return P(a,c)*P(b,c)});R("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});R("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});R("<",4,2,function(a,b,c){return sb(function(a,b){return a<b},a,b,c)}); T("local-name",3,n,l,function(a,b){var c=b?Ta(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);T("name",3,n,l,function(a,b){var c=b?Ta(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,l);T("namespace-uri",3,l,n,aa(""),0,1,l);T("normalize-space",3,n,l,function(a,b){return(b?P(b,a):H(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);T("not",2,n,n,function(a,b){return!Q(b,a)},1);T("number",1,n,l,function(a,b){return b?O(b,a):+H(a.g)},0,1);
R(">",4,2,function(a,b,c){return sb(function(a,b){return a>b},a,b,c)});R("<=",4,2,function(a,b,c){return sb(function(a,b){return a<=b},a,b,c)});R(">=",4,2,function(a,b,c){return sb(function(a,b){return a>=b},a,b,c)});var rb=R("=",3,2,function(a,b,c){return sb(function(a,b){return a==b},a,b,c,j)});R("!=",3,2,function(a,b,c){return sb(function(a,b){return a!=b},a,b,c,j)});R("and",2,2,function(a,b,c){return pb(a,c)&&pb(b,c)});R("or",1,2,function(a,b,c){return pb(a,c)||pb(b,c)});function vb(a,b){b.m()&&4!=a.f&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));O.call(this,a.f);this.S=a;this.b=b;this.k=a.d();this.e=a.e}u(vb,O);vb.prototype.evaluate=function(a){a=this.S.evaluate(a);return wb(this.b,a)};vb.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.S.toString(a);return b+=this.b.toString(a)};function xb(a,b){b.length<a.Q&&h(Error("Function "+a.h+" expects at least"+a.Q+" arguments, "+b.length+" given"));a.G!==k&&b.length>a.G&&h(Error("Function "+a.h+" expects at most "+a.G+" arguments, "+b.length+" given"));a.$&&v(b,function(b,d){4!=b.f&&h(Error("Argument "+d+" to function "+a.h+" is not of type Nodeset: "+b))});O.call(this,a.f);this.w=a;this.C=b;this.k=a.k||ma(b,function(a){return a.d()});this.e=a.Y&&!b.length||a.X&&!!b.length||ma(b,function(a){return a.e})}u(xb,O); T("position",1,l,n,function(a){return a.Y},0);T("round",1,n,n,function(a,b){return Math.round(O(b,a))},1);T("starts-with",2,n,n,function(a,b,c){b=P(b,a);a=P(c,a);return 0==b.lastIndexOf(a,0)},2);T("string",3,n,l,function(a,b){return b?P(b,a):H(a.g)},0,1);T("string-length",1,n,l,function(a,b){return(b?P(b,a):H(a.g)).length},0,1);
xb.prototype.evaluate=function(a){return this.w.p.apply(k,oa(a,this.C))};xb.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.w+"\n",b=b+" ";this.C.length&&(a+=b+"Arguments:",b+=" ",a=la(this.C,function(a,d){return a+"\n"+d.toString(b)},a));return a};function yb(a,b,c,d,e,f,g,l,q){this.h=a;this.f=b;this.k=c;this.Y=d;this.X=e;this.p=f;this.Q=g;this.G=r(l)?l:g;this.$=!!q}yb.prototype.toString=n("h");var zb={}; T("substring",3,n,n,function(a,b,c,d){c=O(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?O(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=P(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);T("substring-after",3,n,n,function(a,b,c){b=P(b,a);a=P(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
function S(a,b,c,d,e,f,g,l){a in zb&&h(Error("Function already created: "+a+"."));zb[a]=new yb(a,b,c,d,m,e,f,g,l)}S("boolean",2,m,m,function(a,b){return pb(b,a)},1);S("ceiling",1,m,m,function(a,b){return Math.ceil(P(b,a))},1);S("concat",3,m,m,function(a,b){var c=pa(arguments,1);return la(c,function(b,c){return b+Q(c,a)},"")},2,k);S("contains",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);S("count",1,m,m,function(a,b){return b.evaluate(a).m()},1,1,j);S("false",2,m,m,aa(m),0); T("substring-before",3,n,n,function(a,b,c){b=P(b,a);a=P(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);T("sum",1,n,n,function(a,b){for(var c=M(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(e);return d},1,1,l);T("translate",3,n,n,function(a,b,c,d){b=P(b,a);c=P(c,a);var e=P(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);T("true",2,n,n,aa(l),0);function L(a,b){this.Q=a;this.L=s(b)?b:m;this.p=m;switch(a){case "comment":this.p=8;break;case "text":this.p=Fa;break;case "processing-instruction":this.p=7;break;case "node":break;default:g(Error("Unexpected argument"))}}L.prototype.matches=function(a){return this.p===m||this.p==a.nodeType};L.prototype.getName=p("Q");L.prototype.toString=function(a){a=a||"";var b=a+"kindtest: "+this.Q;this.L===m||(b+="\n"+this.L.toString(a+" "));return b};function gb(a){N.call(this,3);this.P=a.substring(1,a.length-1)}v(gb,N);gb.prototype.evaluate=p("P");gb.prototype.toString=function(a){return(a||"")+"literal: "+this.P};function hb(a){N.call(this,1);this.R=a}v(hb,N);hb.prototype.evaluate=p("R");hb.prototype.toString=function(a){return(a||"")+"number: "+this.R};function ib(a,b){N.call(this,a.c);this.I=a;this.u=b;this.h=a.b();this.e=a.e;if(1==this.u.length){var c=this.u[0];!c.B&&c.i==jb&&(c=c.z,"*"!=c.getName()&&(this.s={name:c.getName(),q:m}))}}v(ib,N);function kb(){N.call(this,4)}v(kb,N);kb.prototype.evaluate=function(a){var b=new K;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};kb.prototype.toString=function(a){return a+"RootHelperExpr"};function lb(){N.call(this,4)}v(lb,N);lb.prototype.evaluate=function(a){var b=new K;b.add(a.g);return b};
S("floor",1,m,m,function(a,b){return Math.floor(P(b,a))},1); lb.prototype.toString=function(a){return a+"ContextHelperExpr"};
S("id",4,m,m,function(a,b){function c(a){if(E){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length){var c;a:{c=function(b){return a==b.id};for(var d=b.length,f=s(b)?b.split(""):b,g=0;g<d;g++)if(g in f&&c.call(i,f[g])){c=g;break a}c=-1}return 0>c?k:s(b)?b.charAt(c):b[c]}}return k}return e.getElementById(a)}var d=a.c,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];v(d,function(a){(a=c(a))&&!na(f,a)&&f.push(a)});f.sort(Sa);var g=new J;v(f,function(a){g.add(a)});return g},1); ib.prototype.evaluate=function(a){var b=this.I.evaluate(a);b instanceof K||g(Error("FilterExpr must evaluate to nodeset."));a=this.u;for(var c=0,d=a.length;c<d&&b.l();c++){var e=a[c],f=M(b,e.i.t),k;if(!e.b()&&e.i==mb){for(k=f.next();(b=f.next())&&(!k.contains||k.contains(b))&&b.compareDocumentPosition(k)&8;k=b);b=e.evaluate(new G(k))}else if(!e.b()&&e.i==nb)k=f.next(),b=e.evaluate(new G(k));else{k=f.next();for(b=e.evaluate(new G(k));(k=f.next())!=m;)k=e.evaluate(new G(k)),b=Sa(b,k)}}return b};
S("lang",2,m,m,aa(m),1);S("last",1,j,m,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.j},0);S("local-name",3,m,j,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,j);S("name",3,m,j,function(a,b){var c=b?mb(b.evaluate(a)):a.c;return c?c.nodeName.toLowerCase():""},0,1,j);S("namespace-uri",3,j,m,aa(""),0,1,j);S("normalize-space",3,m,j,function(a,b){return(b?Q(b,a):G(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1); ib.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.I.toString(b);this.u.length&&(c+=b+"Steps:\n",b+=" ",x(this.u,function(a){c+=a.toString(b)}));return c};function U(a,b){this.a=a;this.t=!!b}function cb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=M(b),f=b.l(),k,u=0;k=e.next();u++){var E=a.t?f-u:u+1;k=d.evaluate(new G(k,E,f));var r;"number"==typeof k?r=E==k:"string"==typeof k||"boolean"==typeof k?r=!!k:k instanceof K?r=0<k.l():g(Error("Predicate.evaluate returned an unexpected type."));r||e.remove()}return b}U.prototype.j=function(){return 0<this.a.length?this.a[0].j():m};
S("not",2,m,m,function(a,b){return!pb(b,a)},1);S("number",1,m,j,function(a,b){return b?P(b,a):+G(a.c)},0,1);S("position",1,j,m,function(a){return a.ba},0);S("round",1,m,m,function(a,b){return Math.round(P(b,a))},1);S("starts-with",2,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);S("string",3,m,j,function(a,b){return b?Q(b,a):G(a.c)},0,1);S("string-length",1,m,j,function(a,b){return(b?Q(b,a):G(a.c)).length},0,1); U.prototype.b=function(){for(var a=0;a<this.a.length;a++){var b=this.a[a];if(b.b()||1==b.c||0==b.c)return l}return n};U.prototype.l=function(){return this.a.length};U.prototype.toString=function(a){var b=a||"";a=b+"Predicates:";b+=" ";return na(this.a,function(a,d){return a+"\n"+b+d.toString(b)},a)};function V(a,b,c,d){N.call(this,4);this.i=a;this.z=b;this.a=c||new U([]);this.B=!!d;b=this.a.j();a.Z&&b&&(this.s={name:b.name,q:b.q});this.h=this.a.b()}v(V,N);V.prototype.evaluate=function(a){var b=a.g,c=m,c=this.j(),d=m,e=m,f=0;c&&(d=c.name,e=c.q?P(c.q,a):m,f=1);if(this.B)if(!this.b()&&this.i==ob)c=J(this.z,b,d,e),c=cb(this.a,c,f);else if(a=M((new V(pb,new L("node"))).evaluate(a)),b=a.next())for(c=this.k(b,d,e,f);(b=a.next())!=m;)c=Sa(c,this.k(b,d,e,f));else c=new K;else c=this.k(a.g,d,e,f);return c};
S("substring",3,m,m,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";var c=Math.round(c)-1,e=Math.max(c,0),a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);S("substring-after",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); V.prototype.k=function(a,b,c,d){a=this.i.v(this.z,a,b,c);return a=cb(this.a,a,d)};V.prototype.toString=function(a){a=a||"";var b=a+"Step: \n";a+=" ";b+=a+"Operator: "+(this.B?"//":"/")+"\n";this.i.m&&(b+=a+"Axis: "+this.i+"\n");b+=this.z.toString(a);if(this.a.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.a.length;c++)var d=c<this.a.length-1?", ":"",b=b+(this.a[c].toString(a)+d);return b};function qb(a,b,c,d){this.m=a;this.v=b;this.t=c;this.Z=d}qb.prototype.toString=p("m");var rb={};
S("substring-before",3,m,m,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);S("sum",1,m,m,function(a,b){for(var c=M(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+G(e);return d},1,1,j);S("translate",3,m,m,function(a,b,c,d){for(var b=Q(b,a),c=Q(c,a),e=Q(d,a),a=[],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,m,m,aa(j),0);function L(a,b){this.V=a;this.P=r(b)?b:k;this.i=k;switch(a){case "comment":this.i=8;break;case "text":this.i=Oa;break;case "processing-instruction":this.i=7;break;case "node":break;default:h(Error("Unexpected argument"))}}function Ab(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}L.prototype.matches=function(a){return this.i===k||this.i==a.nodeType};L.prototype.getName=n("V"); function W(a,b,c,d){a in rb&&g(Error("Axis already created: "+a));b=new qb(a,b,c,!!d);return rb[a]=b}W("ancestor",function(a,b){for(var c=new K,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},l);W("ancestor-or-self",function(a,b){var c=new K,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},l);
L.prototype.toString=function(a){var a=a||"",b=a+"kindtest: "+this.V;this.P===k||(b+="\n"+this.P.toString(a+" "));return b};function Bb(a){O.call(this,3);this.U=a.substring(1,a.length-1)}u(Bb,O);Bb.prototype.evaluate=n("U");Bb.prototype.toString=function(a){return(a||"")+"literal: "+this.U};function K(a){this.h=a.toLowerCase()}K.prototype.matches=function(a){var b=a.nodeType;if(1==b||2==b)return"*"==this.h||this.h==a.nodeName.toLowerCase()?j:this.h==(a.namespaceURI||"http://www.w3.org/1999/xhtml")+":*"};K.prototype.getName=n("h");K.prototype.toString=function(a){return(a||"")+"nametest: "+this.h};function Cb(a){O.call(this,1);this.W=a}u(Cb,O);Cb.prototype.evaluate=n("W");Cb.prototype.toString=function(a){return(a||"")+"number: "+this.W};function Db(a,b){O.call(this,a.f);this.M=a;this.v=b;this.k=a.d();this.e=a.e;if(1==this.v.length){var c=this.v[0];!c.D&&c.n==Eb&&(c=c.B,"*"!=c.getName()&&(this.u={name:c.getName(),s:k}))}}u(Db,O);function Fb(){O.call(this,4)}u(Fb,O);Fb.prototype.evaluate=function(a){var b=new J,a=a.c;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Fb.prototype.toString=function(a){return a+"RootHelperExpr"};function Gb(){O.call(this,4)}u(Gb,O);Gb.prototype.evaluate=function(a){var b=new J;b.add(a.c);return b}; var jb=W("attribute",function(a,b){var c=new K,d=a.getName(),e=b.attributes;if(e)if(a instanceof L&&a.p===m||"*"==d)for(var d=0,f;f=e[d];d++)c.add(f);else(f=e.getNamedItem(d))&&c.add(f);return c},n),ob=W("child",function(a,b,c,d,e){return Qa.call(m,a,b,t(c)?c:m,t(d)?d:m,e||new K)},n,l);W("descendant",J,n,l);
Gb.prototype.toString=function(a){return a+"ContextHelperExpr"}; var pb=W("descendant-or-self",function(a,b,c,d){var e=new K;I(b,c,d)&&a.matches(b)&&e.add(b);return J(a,b,c,d,e)},n,l),mb=W("following",function(a,b,c,d){var e=new K;do for(var f=b;f=f.nextSibling;)I(f,c,d)&&a.matches(f)&&e.add(f),e=J(a,f,c,d,e);while(b=b.parentNode);return e},n,l);W("following-sibling",function(a,b){for(var c=new K,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},n);W("namespace",function(){return new K},n);
Db.prototype.evaluate=function(a){var b=this.M.evaluate(a);b instanceof J||h(Error("FilterExpr must evaluate to nodeset."));for(var a=this.v,c=0,d=a.length;c<d&&b.m();c++){var e=a[c],f=M(b,e.n.r),g;if(!e.d()&&e.n==Hb){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new D(g))}else if(!e.d()&&e.n==Ib)g=f.next(),b=e.evaluate(new D(g));else{g=f.next();for(b=e.evaluate(new D(g));(g=f.next())!=k;)g=e.evaluate(new D(g)),b=lb(b,g)}}return b}; W("parent",function(a,b){var c=new K;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},n);var nb=W("preceding",function(a,b,c,d){var e=new K,f=[];do f.unshift(b);while(b=b.parentNode);for(var k=1,u=f.length;k<u;k++){var E=[];for(b=f[k];b=b.previousSibling;)E.unshift(b);for(var r=0,B=E.length;r<B;r++)b=E[r],I(b,c,d)&&a.matches(b)&&e.add(b),e=J(a,b,c,d,e)}return e},l,l);
Db.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.M.toString(b);this.v.length&&(c+=b+"Steps:\n",b+=" ",v(this.v,function(a){c+=a.toString(b)}));return c};function T(a,b){this.b=a;this.r=!!b}function wb(a,b,c){for(c=c||0;c<a.b.length;c++)for(var d=a.b[c],e=M(b),f=b.m(),g,l=0;g=e.next();l++){var q=a.r?f-l:l+1;g=d.evaluate(new D(g,q,f));var t;"number"==typeof g?t=q==g:"string"==typeof g||"boolean"==typeof g?t=!!g:g instanceof J?t=0<g.m():h(Error("Predicate.evaluate returned an unexpected type."));t||e.remove()}return b}T.prototype.o=function(){return 0<this.b.length?this.b[0].o():k}; W("preceding-sibling",function(a,b){for(var c=new K,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},l);W("self",function(a,b){var c=new K;a.matches(b)&&c.add(b);return c},n);function sb(a){N.call(this,1);this.H=a;this.h=a.b();this.e=a.e}v(sb,N);sb.prototype.evaluate=function(a){return-O(this.H,a)};sb.prototype.toString=function(a){a=a||"";var b=a+"UnaryExpr: -\n";return b+=this.H.toString(a+" ")};function tb(a){N.call(this,4);this.w=a;Wa(this,y(this.w,function(a){return a.b()}));Xa(this,y(this.w,function(a){return a.e}))}v(tb,N);tb.prototype.evaluate=function(a){var b=new K;x(this.w,function(c){c=c.evaluate(a);c instanceof K||g(Error("PathExpr must evaluate to NodeSet."));b=Sa(b,c)});return b};tb.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";x(this.w,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};var ub=function(){var a={ca:"http://www.w3.org/2000/svg"};return function(b){return a[b]||m}}();
T.prototype.d=function(){for(var a=0;a<this.b.length;a++){var b=this.b[a];if(b.d()||1==b.f||0==b.f)return j}return m};T.prototype.m=function(){return this.b.length};T.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return la(this.b,function(a,d){return a+"\n"+b+d.toString(b)},a)};function U(a,b,c,d){O.call(this,4);this.n=a;this.B=b;this.b=c||new T([]);this.D=!!d;b=this.b.o();a.ca&&b&&(a=b.name,a=E?a.toLowerCase():a,this.u={name:a,s:b.s});this.k=this.b.d()}u(U,O); function vb(a,b){var c=function(){var c;a:{var e=D(b);try{var f=e.createNSResolver?e.createNSResolver(e.documentElement):ub;c=e.evaluate(a,b,f,9,m);break a}catch(k){"NS_ERROR_ILLEGAL_VALUE"!=k.name&&g(new z(32,"Unable to locate an element with the xpath expression "+a+" because of the following error:\n"+k))}c=h}return c?c.singleNodeValue||m:b.selectSingleNode?(c=D(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):m}();c!==m&&(!c||1!=c.nodeType)&&g(new z(32,'The result of the xpath expression "'+
U.prototype.evaluate=function(a){var b=a.c,c=k,c=this.o(),d=k,e=k,f=0;c&&(d=c.name,e=c.s?Q(c.s,a):k,f=1);if(this.D)if(!this.d()&&this.n==Jb)c=db(this.B,b,d,e),c=wb(this.b,c,f);else if(a=M((new U(Kb,new L("node"))).evaluate(a)),b=a.next())for(c=this.p(b,d,e,f);(b=a.next())!=k;)c=lb(c,this.p(b,d,e,f));else c=new J;else c=this.p(a.c,d,e,f);return c};U.prototype.p=function(a,b,c,d){a=this.n.w(this.B,a,b,c);return a=wb(this.b,a,d)}; a+'" is: '+c+". It should be an element."));return c};(function(){var a=q.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}var c=a.classes,a=a.interfaces;c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator);c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo);return l})();function wb(a,b){var c=D(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function X(a,b){return wb(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style&&a.style[b]}
U.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.D?"//":"/")+"\n");this.n.h&&(b+=a+"Axis: "+this.n+"\n");b+=this.B.toString(a);if(this.b.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.b.length;c++)var d=c<this.b.length-1?", ":"",b=b+(this.b[c].toString(a)+d);return b};function Lb(a,b,c,d){this.h=a;this.w=b;this.r=c;this.ca=d}Lb.prototype.toString=n("h");var Mb={}; function xb(a){var b=D(a),c=X(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=X(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m}
function V(a,b,c,d){a in Mb&&h(Error("Axis already created: "+a));b=new Lb(a,b,c,!!d);return Mb[a]=b}V("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},j);V("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},j); function yb(a){var b=new A;if(1==a.nodeType){if(a.getBoundingClientRect){var c=a.getBoundingClientRect();b.x=c.left;b.y=c.top}else{c=Na(a?new F(D(a)):Ea||(Ea=new F));var d,e=D(a),f=X(a,"position");la(a,"Parameter is required");var k=e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),f=new A(0,0),u=(e?D(e):document).documentElement;if(a!=u)if(a.getBoundingClientRect)d=a.getBoundingClientRect(),e=Na(e?new F(D(e)):Ea||(Ea=new F)),f.x=d.left+
var Eb=V("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&E)return c.add(new Za(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof L&&a.i===k||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)E?g.nodeValue&&c.add($a(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(E?g.nodeValue&&c.add($a(b,g,b.sourceIndex)):c.add(g));return c},m),Jb=V("child",function(a,b,c,d,e){return(E?ib:jb).call(k,a,b,s(c)?c:k,s(d)?d:k,e||new J)},m,j); e.x,f.y=d.top+e.y;else if(e.getBoxObjectFor&&!k)d=e.getBoxObjectFor(a),e=e.getBoxObjectFor(u),f.x=d.screenX-e.screenX,f.y=d.screenY-e.screenY;else{d=a;do f.x+=d.offsetLeft,f.y+=d.offsetTop,d!=a&&(f.x+=d.clientLeft||0,f.y+=d.clientTop||0),d=d.offsetParent;while(d&&d!=a);for(d=a;(d=xb(d))&&d!=e.body&&d!=u;)f.x-=d.scrollLeft,f.y-=d.scrollTop}b.x=f.x-c.x;b.y=f.y-c.y}if(!Da[12]&&!(Da[12]=0<=fa(12)))(c=X(a,"-moz-transform"))||(c=X(a,"transform")),c?(a=c.match(zb),a=!a?new A(0,0):new A(parseFloat(a[1]),
V("descendant",db,m,j);var Kb=V("descendant-or-self",function(a,b,c,d){var e=new J;H(b,c,d)&&a.matches(b)&&e.add(b);return db(a,b,c,d,e)},m,j),Hb=V("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)H(f,c,d)&&a.matches(f)&&e.add(f),e=db(a,f,c,d,e);while(b=b.parentNode);return e},m,j);V("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},m);V("namespace",function(){return new J},m); parseFloat(a[2]))):a=new A(0,0),b=new A(b.x+a.x,b.y+a.y)}else c="function"==ba(a.J),d=a,a.targetTouches?d=a.targetTouches[0]:c&&a.J().targetTouches&&(d=a.J().targetTouches[0]),b.x=d.clientX,b.y=d.clientY;return b}function Ab(a){var b=a.offsetWidth,c=a.offsetHeight;return!s(b)&&a.getBoundingClientRect?(a=a.getBoundingClientRect(),new C(a.right-a.left,a.bottom-a.top)):new C(b,c)}var zb=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Bb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;function Cb(a){var b=[];x(a.split(Bb),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}
var Nb=V("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},m),Ib=V("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,l=f.length;g<l;g++){for(var q=[],b=f[g];b=b.previousSibling;)q.unshift(b);for(var t=0,I=q.length;t<I;t++)b=q[t],H(b,c,d)&&a.matches(b)&&e.add(b),e=db(a,b,c,d,e)}return e},j,j); function Db(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:m}
V("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},j);var Ob=V("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},m);function Pb(a){O.call(this,1);this.L=a;this.k=a.d();this.e=a.e}u(Pb,O);Pb.prototype.evaluate=function(a){return-P(this.L,a)};Pb.prototype.toString=function(a){var a=a||"",b=a+"UnaryExpr: -\n";return b+=this.L.toString(a+" ")};function Qb(a){O.call(this,4);this.A=a;this.k=ma(this.A,function(a){return a.d()});this.e=ma(this.A,function(a){return a.e})}u(Qb,O);Qb.prototype.evaluate=function(a){var b=new J;v(this.A,function(c){c=c.evaluate(a);c instanceof J||h(Error("PathExpr must evaluate to NodeSet."));b=lb(b,c)});return b};Qb.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";v(this.A,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};function Rb(a){this.a=a}function Sb(a){for(var b,c=[];;){W(a,"Missing right hand side of binary expression.");b=Tb(a);var d=a.a.next();if(!d)break;var e=(d=ub[d]||k)&&d.R;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].R;)b=new qb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new qb(c.pop(),c.pop(),b);return b}function W(a,b){a.a.empty()&&h(Error(b))}function Ub(a,b){var c=a.a.next();c!=b&&h(Error("Bad token, expected: "+b+" got: "+c))} function Z(a,b){var c=ha(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c="cssFloat";c=wb(a,c)||Eb(a,c);if(c===m)c=m;else if(oa(sa,b)&&(va.test("#"==c.charAt(0)?c:"#"+c)||za(c).length||ra&&ra[c.toLowerCase()]||xa(c).length)){var d=xa(c);if(!d.length){a:if(d=za(c),!d.length){d=ra[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(va.test(d)&&(d=ua(d),d=ua(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c=4!=d.length?
function Vb(a){a=a.a.next();")"!=a&&h(Error("Bad token: "+a))}function Wb(a){a=a.a.next();2>a.length&&h(Error("Unclosed literal string"));return new Bb(a)}function Xb(a){return"*"!=F(a.a)&&":"==F(a.a,1)&&"*"==F(a.a,2)?new K(a.a.next()+a.a.next()+a.a.next()):new K(a.a.next())} c:"rgba("+d.join(", ")+")"}return c}function Eb(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:m:(c=Db(a))?Eb(c,b):m}
function Yb(a){var b,c=[],d;if("/"==F(a.a)||"//"==F(a.a)){b=a.a.next();d=F(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Fb;d=new Fb;W(a,"Missing next location step.");b=Zb(a,b);c.push(b)}else{a:{b=F(a.a);d=b.charAt(0);switch(d){case "$":h(Error("Variable reference not allowed in HTML XPath"));case "(":a.a.next();b=Sb(a);W(a,'unclosed "("');Ub(a,")");break;case '"':case "'":b=Wb(a);break;default:if(isNaN(+b))if(!Ab(b)&&/(?![0-9])[\w]/.test(d)&& function Fb(a){if("function"==ba(a.getBBox))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,"BODY")){b=(D(a)?D(a).parentWindow||D(a).defaultView:window)||h;"hidden"!=Z(a,"overflow")?a=l:(a=Db(a),!a||!Y(a,"HTML")?a=l:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){b=(b||da).document;a=b.documentElement;var d=b.body;d||g(new z(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(m,[a.clientWidth,a.scrollWidth,a.offsetWidth,
"("==F(a.a,1)){b=a.a.next();b=zb[b]||k;a.a.next();for(d=[];")"!=F(a.a);){W(a,"Missing function argument list.");d.push(Sb(a));if(","!=F(a.a))break;a.a.next()}W(a,"Unclosed function argument list.");Vb(a);b=new xb(b,d)}else{b=k;break a}else b=new Cb(+a.a.next())}"["==F(a.a)&&(d=new T($b(a)),b=new vb(b,d))}if(b)if("/"==F(a.a)||"//"==F(a.a))d=b;else return b;else b=Zb(a,"/"),d=new Gb,c.push(b)}for(;"/"==F(a.a)||"//"==F(a.a);)b=a.a.next(),W(a,"Missing next location step."),b=Zb(a,b),c.push(b);return new Db(d, d.scrollWidth,d.offsetWidth]);b=Math.max.apply(m,b);a=new C(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new C(a.clientWidth,a.clientHeight);return a}if("none"!=X(a,"display"))a=Ab(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Ab(a);b.display=d;b.position=f;b.visibility=e}return a}
c)} function Gb(a,b){function c(a){if("none"==Z(a,"display"))return n;a=Db(a);return!a||c(a)}function d(a){var b=Fb(a);return 0<b.height&&0<b.width?l:Y(a,"PATH")&&(0<b.height||0<b.width)?(b=Z(a,"stroke-width"),!!b&&0<parseInt(b,10)):y(a.childNodes,function(b){return b.nodeType==Fa&&"hidden"!=Z(a,"overflow")||Y(b)&&d(b)})}function e(a){var b,c=a.parentNode;return(b=ca(c)&&1==c.nodeType?c:m)&&("hidden"==Z(b,"overflow")||"hidden"==Z(b,"overflow-x")||"hidden"==Z(b,"overflow-y"))?(c=Fb(b),b=yb(b),a=yb(a),
function Zb(a,b){var c,d,e;"/"!=b&&"//"!=b&&h(Error('Step op should be "/" or "//"'));if("."==F(a.a))return d=new U(Ob,new L("node")),a.a.next(),d;if(".."==F(a.a))return d=new U(Nb,new L("node")),a.a.next(),d;var f;"@"==F(a.a)?(f=Eb,a.a.next(),W(a,"Missing attribute name")):"::"==F(a.a,1)?(/(?![0-9])[\w]/.test(F(a.a).charAt(0))||h(Error("Bad token: "+a.a.next())),e=a.a.next(),(f=Mb[e]||k)||h(Error("No axis with name: "+e)),a.a.next(),W(a,"Missing node name")):f=Jb;e=F(a.a);if(/(?![0-9])[\w]/.test(e.charAt(0)))if("("==F(a.a, b.x+c.width<=a.x||b.y+c.height<=a.y?n:l):!b||e(b)}function f(a){var b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return b=yb(a),a=Fb(a),0<=b.x+a.width&&0<=b.y+a.height?l:n;a=Db(a);return!a||f(a)}Y(a)||g(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var k=Ma(a,function(a){return Y(a,"SELECT")});return!!k&&Gb(k,l)}if(Y(a,"MAP")){if(!a.name)return n;k=D(a);k=k.evaluate?vb('/descendant::*[@usemap = "#'+
1)){Ab(e)||h(Error("Invalid node type: "+e));c=a.a.next();Ab(c)||h(Error("Invalid type name: "+c));Ub(a,"(");W(a,"Bad nodetype");e=F(a.a).charAt(0);var g=k;if('"'==e||"'"==e)g=Wb(a);W(a,"Bad nodetype");Vb(a);c=new L(c,g)}else c=Xb(a);else"*"==e?c=Xb(a):h(Error("Bad token: "+a.a.next()));e=new T($b(a),f.r);return d||new U(f,c,e,"//"==b)} a.name+'"]',k):Ka(k,function(b){var c;if(c=Y(b))c="usemap",b="style"==c?Cb(b.style.cssText):(b=b.getAttributeNode(c))&&b.specified?b.value:m,c=b=="#"+a.name;return c});return!!k&&Gb(k,b)}return Y(a,"AREA")?(k=Ma(a,function(a){return Y(a,"MAP")}),!!k&&Gb(k,b)):Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,"visibility")||!c(a)||!b&&0==Hb(a)||!d(a)||!e(a)?n:f(a)}function Hb(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=Db(a))&&(b*=Hb(a));return b};var Ib=Gb,Jb=["_"],$=q;!(Jb[0]in $)&&$.execScript&&$.execScript("var "+Jb[0]);for(var Kb;Jb.length&&(Kb=Jb.shift());)!Jb.length&&s(Ib)?$[Kb]=Ib:$=$[Kb]?$[Kb]:$[Kb]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);}
function $b(a){for(var b=[];"["==F(a.a);){a.a.next();W(a,"Missing predicate expression.");var c=Sb(a);b.push(c);W(a,"Unclosed predicate expression.");Ub(a,"]")}return b}function Tb(a){if("-"==F(a.a))return a.a.next(),new Pb(Tb(a));var b=Yb(a);if("|"!=F(a.a))a=b;else{for(b=[b];"|"==a.a.next();)W(a,"Missing next union location path."),b.push(Yb(a));a.a.back();a=new Qb(b)}return a};function ac(a){a.length||h(Error("Empty XPath expression."));for(var a=a.match(bb),b=0;b<a.length;b++)cb.test(a[b])&&a.splice(b,1);a=new ab(a);a.empty()&&h(Error("Invalid XPath expression."));var c=Sb(new Rb(a));a.empty()||h(Error("Bad token: "+a.next()));this.evaluate=function(a,b){var f=c.evaluate(new D(a));return new X(f,b)}}
function X(a,b){0==b&&(a instanceof J?b=4:"string"==typeof a?b=2:"number"==typeof a?b=1:"boolean"==typeof a?b=3:h(Error("Unexpected evaluation result.")));2!=b&&(1!=b&&3!=b&&!(a instanceof J))&&h(Error("document.evaluate called with wrong result type."));this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof J?nb(a):""+a;break;case 1:this.numberValue=a instanceof J?+nb(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.m():!!a;break;case 4:case 5:case 6:case 7:var d=M(a);c=[];
for(var e=d.next();e;e=d.next())c.push(e instanceof Za?e.c:e);this.snapshotLength=a.m();this.invalidIteratorState=m;break;case 8:case 9:d=mb(a);this.singleNodeValue=d instanceof Za?d.c:d;break;default:h(Error("Unknown XPathResult type."))}var f=0;this.iterateNext=function(){4!=b&&5!=b&&h(Error("iterateNext called with wrong result type."));return f>=c.length?k:c[f++]};this.snapshotItem=function(a){6!=b&&7!=b&&h(Error("snapshotItem called with wrong result type."));return a>=c.length||0>a?k:c[a]}}
X.ANY_TYPE=0;X.NUMBER_TYPE=1;X.STRING_TYPE=2;X.BOOLEAN_TYPE=3;X.UNORDERED_NODE_ITERATOR_TYPE=4;X.ORDERED_NODE_ITERATOR_TYPE=5;X.UNORDERED_NODE_SNAPSHOT_TYPE=6;X.ORDERED_NODE_SNAPSHOT_TYPE=7;X.ANY_UNORDERED_NODE_TYPE=8;X.FIRST_ORDERED_NODE_TYPE=9;var bc,cc={ga:"http://www.w3.org/2000/svg"};bc=function(a){return cc[a]||k};(function(){if(!y)return m;var a=p.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}var c=a.classes,a=a.interfaces;c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator);c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo);return j})();var dc=x&&!z(8),ec=x&&!z(9),fc=x&&!z(10);function gc(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b)||"":""}function hc(a,b){return gc(a,b)||(a.currentStyle?a.currentStyle[b]:k)||a.style&&a.style[b]}function ic(a){var b=a.getBoundingClientRect();x&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function jc(a){if(x&&!z(8))return a.offsetParent;for(var b=C(a),c=hc(a,"position"),d="fixed"==c||"absolute"==c,a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=hc(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return k}
function kc(a){var b=new A;if(1==a.nodeType){if(a.getBoundingClientRect){var c=ic(a);b.x=c.left;b.y=c.top}else{c=Xa(Pa(a));var d,e=C(a),f=hc(a,"position");ia(a,"Parameter is required");var g=y&&e.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==f&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),f=new A(0,0),l;d=e?C(e):document;if(l=x)if(l=!z(9))l="CSS1Compat"!=Pa(d).K.compatMode;l=l?d.body:d.documentElement;if(a!=l)if(a.getBoundingClientRect)d=ic(a),e=Xa(Pa(e)),f.x=d.left+e.x,f.y=d.top+
e.y;else if(e.getBoxObjectFor&&!g)d=e.getBoxObjectFor(a),e=e.getBoxObjectFor(l),f.x=d.screenX-e.screenX,f.y=d.screenY-e.screenY;else{d=a;do f.x+=d.offsetLeft,f.y+=d.offsetTop,d!=a&&(f.x+=d.clientLeft||0,f.y+=d.clientTop||0),d=d.offsetParent;while(d&&d!=a);w&&(f.y-=e.body.offsetTop);for(d=a;(d=jc(d))&&d!=e.body&&d!=l;)if(f.x-=d.scrollLeft,!w||"TR"!=d.tagName)f.y-=d.scrollTop}b.x=f.x-c.x;b.y=f.y-c.y}if(y&&!Ja(12)){var q;x?q="-ms-transform":w?q="-o-transform":y&&(q="-moz-transform");var t;q&&(t=hc(a,
q));t||(t=hc(a,"transform"));t?(a=t.match(lc),a=!a?new A(0,0):new A(parseFloat(a[1]),parseFloat(a[2]))):a=new A(0,0);b=new A(b.x+a.x,b.y+a.y)}}else q="function"==ba(a.N),t=a,a.targetTouches?t=a.targetTouches[0]:q&&a.N().targetTouches&&(t=a.N().targetTouches[0]),b.x=t.clientX,b.y=t.clientY;return b}function mc(a){var b=a.offsetWidth,c=a.offsetHeight;return!r(b)&&a.getBoundingClientRect?(a=ic(a),new B(a.right-a.left,a.bottom-a.top)):new B(b,c)}var lc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Y(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var nc=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function oc(a){var b;b="usemap";if("style"==b){var c=[];v(a.style.cssText.split(nc),function(a){var b=a.indexOf(":");0<b&&(a=[a.slice(0,b),a.slice(b+1)],2==a.length&&c.push(a[0].toLowerCase(),":",a[1],";"))});c=c.join("");c=";"==c.charAt(c.length-1)?c:c+";";return w?c.replace(/\w+:;/g,""):c}return dc&&"value"==b&&Y(a,"INPUT")?a.value:ec&&a[b]===j?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:k}
function pc(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return Y(a)?a:k}
function Z(a,b){var c=String(b).replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()});if("float"==c||"cssFloat"==c||"styleFloat"==c)c=ec?"styleFloat":"cssFloat";c=gc(a,c)||qc(a,c);if(c===k)c=k;else if(na(ra,b)&&(ua.test("#"==c.charAt(0)?c:"#"+c)||ya(c).length||qa&&qa[c.toLowerCase()]||wa(c).length)){var d=wa(c);if(!d.length){a:if(d=ya(c),!d.length){d=qa[c.toLowerCase()];d=!d?"#"==c.charAt(0)?c:"#"+c:d;if(ua.test(d)&&(d=ta(d),d=ta(d),d=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,
2),16)],d.length))break a;d=[]}3==d.length&&d.push(1)}c=4!=d.length?c:"rgba("+d.join(", ")+")"}return c}function qc(a,b){var c=a.currentStyle||a.style,d=c[b];!r(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?r(d)?d:k:(c=pc(a))?qc(c,b):k}
function rc(a){if("function"==ba(a.getBBox))try{var b=a.getBBox();if(b)return b}catch(c){}if(Y(a,Na)){b=(C(a)?C(a).parentWindow||C(a).defaultView:window)||i;"hidden"!=Z(a,"overflow")?a=j:(a=pc(a),!a||!Y(a,"HTML")?a=j:(a=Z(a,"overflow"),a="auto"==a||"scroll"==a));if(a){var b=(b||ca).document,a=b.documentElement,d=b.body;d||h(new za(13,"No BODY element present"));b=[a.clientHeight,a.scrollHeight,a.offsetHeight,d.scrollHeight,d.offsetHeight];a=Math.max.apply(k,[a.clientWidth,a.scrollWidth,a.offsetWidth,
d.scrollWidth,d.offsetWidth]);b=Math.max.apply(k,b);a=new B(a,b)}else a=(b||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new B(a.clientWidth,a.clientHeight);return a}if("none"!=hc(a,"display"))a=mc(a);else{var b=a.style,d=b.display,e=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=mc(a);b.display=d;b.position=f;b.visibility=e}return a}
function sc(a,b){function c(a){if("none"==Z(a,"display"))return m;a=pc(a);return!a||c(a)}function d(a){var b=rc(a);return 0<b.height&&0<b.width?j:Y(a,"PATH")&&(0<b.height||0<b.width)?(a=Z(a,"stroke-width"),!!a&&0<parseInt(a,10)):ma(a.childNodes,function(a){return a.nodeType==Oa||Y(a)&&d(a)})}function e(a){var b=jc(a),c=y||x||w?pc(a):b;if((y||x||w)&&Y(c,Na))b=c;if(b&&"hidden"==Z(b,"overflow")){var c=rc(b),d=kc(b),a=kc(a);return d.x+c.width<a.x||d.y+c.height<a.y?m:e(b)}return j}function f(a){var b=
Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"-moz-transform")||Z(a,"transform");if(b&&"none"!==b)return a=kc(a),0<=a.x&&0<=a.y?j:m;a=pc(a);return!a||f(a)}Y(a)||h(Error("Argument to isShown must be of type Element"));if(Y(a,"OPTION")||Y(a,"OPTGROUP")){var g=Wa(a,function(a){return Y(a,"SELECT")});return!!g&&sc(g,j)}if(Y(a,"MAP")){if(!a.name)return m;var l=C(a);if(l.evaluate){var q='/descendant::*[@usemap = "#'+a.name+'"]',g=function(){var a;a:{var b=C(l);if(x){var c=(b?
b.parentWindow||b.defaultView:window)||p,d=c.document;d.evaluate||(c.XPathResult=X,d.evaluate=function(a,b,c,d){return(new ac(a)).evaluate(b,d)},d.createExpression=function(a){return new ac(a)})}try{var e=b.createNSResolver?b.createNSResolver(b.documentElement):bc;a=x&&!Ja(7)?b.evaluate.call(b,q,l,e,9,k):b.evaluate(q,l,e,9,k);break a}catch(f){y&&"NS_ERROR_ILLEGAL_VALUE"==f.name||h(new za(32,"Unable to locate an element with the xpath expression "+q+" because of the following error:\n"+f))}a=i}return a?
(a=a.singleNodeValue,w?a:a||k):l.selectSingleNode?(a=C(l),a.setProperty&&a.setProperty("SelectionLanguage","XPath"),l.selectSingleNode(q)):k}();g!==k&&(!g||1!=g.nodeType)&&h(new za(32,'The result of the xpath expression "'+q+'" is: '+g+". It should be an element."))}else g=[],g=Va(l,function(b){return Y(b)&&oc(b)=="#"+a.name},g,j)?g[0]:i;return!!g&&sc(g,b)}if(Y(a,"AREA"))return g=Wa(a,function(a){return Y(a,"MAP")}),!!g&&sc(g,b);if(!(g=Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||
"hidden"==Z(a,"visibility")||!c(a)))if(g=!b)fc?"relative"==Z(a,"position")?g=1:(g=Z(a,"filter"),g=(g=g.match(/^alpha\(opacity=(\d*)\)/)||g.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(g[1])/100:1):g=tc(a),g=0==g;return g||!d(a)||!e(a)?m:f(a)}function tc(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=pc(a))&&(b*=tc(a));return b};var uc=sc,vc=["_"],$=p;!(vc[0]in $)&&$.execScript&&$.execScript("var "+vc[0]);for(var wc;vc.length&&(wc=vc.shift());)!vc.length&&r(uc)?$[wc]=uc:$=$[wc]?$[wc]:$[wc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}

View File

@ -74,3 +74,9 @@ class TestVisibility(MarionetteTestCase):
self.marionette.navigate(test_html) self.marionette.navigate(test_html)
negative_percent__tranform = self.marionette.find_element("id", 'negative-percentage-transformY') negative_percent__tranform = self.marionette.find_element("id", 'negative-percentage-transformY')
self.assertTrue(negative_percent__tranform.is_displayed()) self.assertTrue(negative_percent__tranform.is_displayed())
def testShouldSayElementIsInvisibleWhenOverflowXIsHiddenAndOutOfViewport(self):
test_html = self.marionette.absolute_url("bug814037.html")
self.marionette.navigate(test_html)
overflow_x = self.marionette.find_element("id", "assertMe2")
self.assertFalse(overflow_x.is_displayed())

View File

@ -0,0 +1,55 @@
<html>
<head>
<style>
body {
width: 100%;
margin: 0px;
transition: transform 300ms ease;
overflow-x: hidden;
}
body.section1 {
transform: translateX(0%);
}
body.section2 {
transform: translateX(-100%);
}
section {
width: 100%;
height: 100%;
position: absolute;
}
#section1 {
left: 0px;
}
#section2 {
left: 100%;
}
.mypossie {
position:absolute;
left: -1000px;
}
</style>
</head>
<body class="section1">
<section id="section1">
<div id="assertMe1">
<p>Section 1</p>
</div>
<button id="b1" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section2'); sect.classList.remove('section1');">Show section 2</button>
</section>
<section id="section2">
<div id="assertMe2">
<p>Section 2</p>
</div>
<button id="b2" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section1'); sect.classList.remove('section2'); ">Show section 1</button>
</section>
<section class='mypossie'>out in left field!</section>
</body>
</html>