зеркало из https://github.com/mozilla/gecko-dev.git
Bug 811053: Allow transforms to have negative values but not affect Marionettes visibility on the element; r=jgriffin
This commit is contained in:
Родитель
2a55eaaad3
Коммит
697501ec2e
|
@ -203,55 +203,56 @@ var p={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"S
|
|||
o.prototype.toString=function(){return"["+this.name+"] "+this.message};function q(a){this.stack=Error().stack||"";a&&(this.message=""+a)}h(q,Error);q.prototype.name="CustomError";function r(a,b){b.unshift(a);q.call(this,i.apply(null,b));b.shift()}h(r,q);r.prototype.name="AssertionError";if(!n["1.9.1"]){for(var s=0,t=(""+k).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),u="1.9.1".replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),v=Math.max(t.length,u.length),w=0;0==s&&w<v;w++){var x=t[w]||"",y=u[w]||"",z=RegExp("(\\d*)(\\D*)","g"),A=RegExp("(\\d*)(\\D*)","g");do{var B=z.exec(x)||["","",""],C=A.exec(y)||["","",""];if(0==B[0].length&&0==C[0].length)break;s=((0==B[1].length?0:parseInt(B[1],10))<(0==C[1].length?0:parseInt(C[1],10))?-1:(0==B[1].length?0:parseInt(B[1],10))>(0==C[1].length?
|
||||
0:parseInt(C[1],10))?1:0)||((0==B[2].length)<(0==C[2].length)?-1:(0==B[2].length)>(0==C[2].length)?1:0)||(B[2]<C[2]?-1:B[2]>C[2]?1:0)}while(0==s)}n["1.9.1"]=0<=s};var D={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},E={IMG:" ",BR:"\n"};function F(a,b,c){if(!(a.nodeName in D))if(3==a.nodeType)c?b.push((""+a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in E)b.push(E[a.nodeName]);else for(a=a.firstChild;a;)F(a,b,c),a=a.nextSibling};(function(){var a=g.Components;if(!a)return f;try{if(!a.classes)return f}catch(b){return f}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!0})();function G(a,b,c,d,e){this.b=!!b;if(a&&(this.a=a))this.c="number"==typeof d?d:1!=this.a.nodeType?0:this.b?-1:1;this.depth=void 0!=e?e:this.c||0;this.b&&(this.depth*=-1)}h(G,function(){});G.prototype.a=null;G.prototype.c=0;h(function(a,b,c,d){G.call(this,a,b,0,null,d)},G);function H(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function I(a){return H(a,"OPTION")?!0:H(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):f}var J={"class":"className",readonly:"readOnly"},K=["checked","disabled","draggable","hidden"];function L(a){if(I(a)){if(!I(a))throw new o(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";var c=b,d=J[c]||c,b=a[d],e;if(e=void 0===b){b:if("string"==typeof K)d="string"!=typeof d||1!=d.length?-1:K.indexOf(d,0);else{for(e=0;e<K.length;e++)if(e in K&&K[e]===d){d=e;break b}d=-1}e=0<=d}if(e)a=f;else{if(d="value"==c)if(d=H(a,"OPTION")){var j;c=c.toLowerCase();if(a.hasAttribute)j=a.hasAttribute(c);else try{j=a.attributes[c].specified}catch(P){j=
|
||||
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
|
||||
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 o=this;
|
||||
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;
|
||||
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 q(a){return a!==i}function r(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);function t(a,b){function c(){}c.prototype=b.prototype;a.fa=b.prototype;a.prototype=new c};var ca=window;var da={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",
|
||||
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}
|
||||
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",
|
||||
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",
|
||||
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",
|
||||
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"};function ea(a){Error.captureStackTrace?Error.captureStackTrace(this,ea):this.stack=Error().stack||"";a&&(this.message=String(a))}t(ea,Error);ea.prototype.name="CustomError";function fa(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 ga(a,b){b.unshift(a);ea.call(this,fa.apply(k,b));b.shift();this.da=a}t(ga,ea);ga.prototype.name="AssertionError";function ha(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);h(new ga(""+e,f||[]))}function ia(a,b,c){a||ha("",k,b,Array.prototype.slice.call(arguments,2))}function ja(a,b,c){var d=typeof a;"object"==d&&a!=k||"function"==d||ha("Expected object but got %s: %s.",[ba(a),a],b,Array.prototype.slice.call(arguments,2))};var ka=Array.prototype;function u(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(i,d[e],e,a)}function la(a,b){for(var c=a.length,d=[],e=0,f=r(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 ma(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;u(a,function(c,f){d=b.call(i,d,c,f,a)});return d}function na(a,b){for(var c=a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a))return j;return m}
|
||||
function oa(a,b){var c;a:if(r(a))c=!r(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 ka.concat.apply(ka,arguments)}function qa(a,b,c){ia(a.length!=k);return 2>=arguments.length?ka.slice.call(a,b):ka.slice.call(a,b,c)};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;
|
||||
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||""}t(za,Error);
|
||||
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;
|
||||
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);
|
||||
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 v=m,w=m,x=j,Ba;a:{var Ca="",Da;if(v&&o.opera)var Ea=o.opera.version,Ca="function"==typeof Ea?Ea():Ea;else if(x?Da=/rv\:([^\);]+)(\)|;)/:w&&(Da=/MSIE\s+([^\);]+)(\)|;)/),Da)var Fa=Da.exec(o.navigator?o.navigator.userAgent:k),Ca=Fa?Fa[1]:"";if(w){var Ga,Ha=o.document;Ga=Ha?Ha.documentMode:i;if(Ga>parseFloat(Ca)){Ba=String(Ga);break a}}Ba=Ca}var Ia={};
|
||||
function y(a){var b;if(!(b=Ia[a])){b=0;for(var c=String(Ba).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]||"",p=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var G=p.exec(g)||["","",""],M=s.exec(l)||["","",""];if(0==G[0].length&&0==M[0].length)break;b=((0==G[1].length?0:parseInt(G[1],10))<(0==M[1].length?0:parseInt(M[1],10))?-1:(0==G[1].length?0:parseInt(G[1],
|
||||
10))>(0==M[1].length?0:parseInt(M[1],10))?1:0)||((0==G[2].length)<(0==M[2].length)?-1:(0==G[2].length)>(0==M[2].length)?1:0)||(G[2]<M[2]?-1:G[2]>M[2]?1:0)}while(0==b)}b=Ia[a]=0<=b}return b}var Ja={};function z(a){return Ja[a]||(Ja[a]=w&&!!document.documentMode&&document.documentMode>=a)};(function(){if(!x)return m;var a=o.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 Ka=w&&9<=document.documentMode,La=w&&!Ka;var Ma;!w||z(9);!x&&!w||w&&z(9)||x&&y("1.9.1");w&&y("9");var Na="BODY";function A(a,b){this.x=q(a)?a:0;this.y=q(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}
|
||||
function Sa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&w&&!y(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();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(o.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 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||o.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=w&&!z(9),Ya=w&&!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 H(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 I(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,r(c)?c:k,r(d)?d:k,e||new J)}
|
||||
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++];)I(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}
|
||||
function fb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),u(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),u(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()),u(b,function(a){I(a,c,d)&&e.add(a)}));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=la(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=la(f,function(a){return I(a,c,d)}));u(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)I(b,c,d)&&a.matches(b)&&e.add(b);return e}
|
||||
function hb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(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}
|
||||
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))?H(a):""}function N(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}
|
||||
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}))}t(qb,O);
|
||||
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=N(b);for(b=f.next();b;b=f.next()){e=N(c);for(d=e.next();d;d=e.next())if(a(H(b),H(d)))return j}return m}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=N(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:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return j}return m}return e?
|
||||
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={};
|
||||
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],
|
||||
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}
|
||||
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();
|
||||
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 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 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)}
|
||||
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}
|
||||
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 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}
|
||||
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}
|
||||
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}
|
||||
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);
|
||||
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?
|
||||
"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={};
|
||||
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)});
|
||||
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}t(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.$&&u(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||na(b,function(a){return a.d()});this.e=a.Y&&!b.length||a.X&&!!b.length||na(b,function(a){return a.e})}t(xb,O);
|
||||
xb.prototype.evaluate=function(a){return this.w.p.apply(k,pa(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=ma(this.C,function(a,d){return a+"\n"+d.toString(b)},a));return a};function yb(a,b,c,d,e,f,g,l,p){this.h=a;this.f=b;this.k=c;this.Y=d;this.X=e;this.p=f;this.Q=g;this.G=q(l)?l:g;this.$=!!p}yb.prototype.toString=n("h");var zb={};
|
||||
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=qa(arguments,1);return ma(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);
|
||||
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);
|
||||
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={};
|
||||
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);
|
||||
S("floor",1,m,m,function(a,b){return Math.floor(P(b,a))},1);
|
||||
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=r(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:r(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=[];u(d,function(a){(a=c(a))&&!oa(f,a)&&f.push(a)});f.sort(Sa);var g=new J;u(f,function(a){g.add(a)});return g},1);
|
||||
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):H(a.c)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
|
||||
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):+H(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):H(a.c)},0,1);S("string-length",1,m,j,function(a,b){return(b?Q(b,a):H(a.c)).length},0,1);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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=N(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+H(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=q(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");
|
||||
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)}t(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}t(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}))}}t(Db,O);function Fb(){O.call(this,4)}t(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)}t(Gb,O);Gb.prototype.evaluate=function(a){var b=new J;b.add(a.c);return b};
|
||||
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");
|
||||
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};
|
||||
Gb.prototype.toString=function(a){return a+"ContextHelperExpr"};
|
||||
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=N(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};
|
||||
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+=" ",u(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=N(b),f=b.m(),g,l=0;g=e.next();l++){var p=a.r?f-l:l+1;g=d.evaluate(new D(g,p,f));var s;"number"==typeof g?s=p==g:"string"==typeof g||"boolean"==typeof g?s=!!g:g instanceof J?s=0<g.m():h(Error("Predicate.evaluate returned an unexpected type."));s||e.remove()}return b}T.prototype.o=function(){return 0<this.b.length?this.b[0].o():k};
|
||||
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 ma(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()}t(U,O);
|
||||
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=N((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)};
|
||||
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};
|
||||
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};
|
||||
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);
|
||||
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)};
|
||||
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 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);
|
||||
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,r(c)?c:k,r(d)?d:k,e||new J)},m,j);
|
||||
V("descendant",db,m,j);var Kb=V("descendant-or-self",function(a,b,c,d){var e=new J;I(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;)I(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);
|
||||
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 p=[],b=f[g];b=b.previousSibling;)p.unshift(b);for(var s=0,G=p.length;s<G;s++)b=p[s],I(b,c,d)&&a.matches(b)&&e.add(b),e=db(a,b,c,d,e)}return e},j,j);
|
||||
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}t(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=na(this.A,function(a){return a.d()});this.e=na(this.A,function(a){return a.e})}t(Qb,O);Qb.prototype.evaluate=function(a){var b=new J;u(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+" ";u(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))}
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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 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())}
|
||||
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)&&
|
||||
"("==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,
|
||||
|
@ -259,21 +260,21 @@ c)}
|
|||
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,
|
||||
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)}
|
||||
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=N(a);c=[];
|
||||
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 dc(a,b){var c=C(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b)||"":""}function ec(a,b){return dc(a,b)||(a.currentStyle?a.currentStyle[b]:k)||a.style&&a.style[b]}function fc(a){var b=a.getBoundingClientRect();w&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
|
||||
function gc(a){if(w&&!z(8))return a.offsetParent;for(var b=C(a),c=ec(a,"position"),d="fixed"==c||"absolute"==c,a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=ec(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 hc(a){var b=new A;if(1==a.nodeType){if(a.getBoundingClientRect){var c=fc(a);b.x=c.left;b.y=c.top}else{c=Xa(Pa(a));var d,e=C(a),f=ec(a,"position");ja(a,"Parameter is required");var g=x&&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=w)if(l=!z(9))l="CSS1Compat"!=Pa(d).K.compatMode;l=l?d.body:d.documentElement;if(a!=l)if(a.getBoundingClientRect)d=fc(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);v&&(f.y-=e.body.offsetTop);for(d=a;(d=gc(d))&&d!=e.body&&d!=l;)if(f.x-=d.scrollLeft,!v||"TR"!=d.tagName)f.y-=d.scrollTop}b.x=f.x-c.x;b.y=f.y-c.y}if(x&&!y(12)){var p;w?p="-ms-transform":v?p="-o-transform":x&&(p="-moz-transform");var s;p&&(s=ec(a,
|
||||
p));s||(s=ec(a,"transform"));s?(a=s.match(ic),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 p="function"==ba(a.N),s=a,a.targetTouches?s=a.targetTouches[0]:p&&a.N().targetTouches&&(s=a.N().targetTouches[0]),b.x=s.clientX,b.y=s.clientY;return b}function jc(a){var b=a.offsetWidth,c=a.offsetHeight;return!q(b)&&a.getBoundingClientRect?(a=fc(a),new B(a.right-a.left,a.bottom-a.top)):new B(b,c)}var ic=/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 kc="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" "),lc=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
|
||||
function mc(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=La?"styleFloat":"cssFloat";c=dc(a,c)||nc(a,c);if(c===k)c=k;else if(oa(ra,b)&&(ua.test("#"==c.charAt(0)?c:"#"+c)||ya(c).length||da&&da[c.toLowerCase()]||wa(c).length)){var d=wa(c);if(!d.length){a:if(d=ya(c),!d.length){d=da[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 nc(a,b){var c=a.currentStyle||a.style,d=c[b];!q(d)&&"function"==ba(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?q(d)?d:k:(c=mc(a))?nc(c,b):k}
|
||||
function oc(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=mc(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"!=ec(a,"display"))a=jc(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=jc(a);b.display=d;b.position=f;b.visibility=e}return a}
|
||||
function pc(a,b){function c(a){if("none"==Z(a,"display"))return m;a=mc(a);return!a||c(a)}function d(a){var b=oc(a);return 0<b.height&&0<b.width?j:na(a.childNodes,function(a){return a.nodeType==Oa||Y(a)&&d(a)})}function e(a){var b=gc(a),c=x||w||v?mc(a):b;if((x||w||v)&&Y(c,Na))b=c;if(b&&"hidden"==Z(b,"overflow")){var c=oc(b),d=hc(b),a=hc(a);return d.x+c.width<a.x||d.y+c.height<a.y?m:e(b)}return j}function f(a){var b;if((b=Z(a,"-o-transform")||Z(a,"-webkit-transform")||Z(a,"-ms-transform")||Z(a,"transform"))&&
|
||||
"none"!==b)return b=b.split("(")[1],b=b.split(")")[0],b=b.split(","),a=b[4].trim(),b=b[5].trim(),0<=1*a&&0<=1*b?j:m;a=mc(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&&pc(g,j)}if(Y(a,"MAP")){if(!a.name)return m;var l=C(a);if(l.evaluate){var p='/descendant::*[@usemap = "#'+a.name+'"]',g=function(){var a;a:{var b=C(l);if(w){var c=(b?b.parentWindow||b.defaultView:window)||o,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)})}else try{if(!b.implementation||!b.implementation.hasFeature("XPath","3.0")){a=k;break a}}catch(e){a=k;break a}try{var f=b.createNSResolver?b.createNSResolver(b.documentElement):bc;a=w&&!y(7)?b.evaluate.apply(k,[p,l,f,9,k]):b.evaluate(p,l,f,9,k);break a}catch(g){x&&"NS_ERROR_ILLEGAL_VALUE"==g.name||h(new za(32,"Unable to locate an element with the xpath expression "+
|
||||
p+" because of the following error:\n"+g))}a=i}return a?(a=a.singleNodeValue,v?a:a||k):l.selectSingleNode?(a=C(l),a.setProperty&&a.setProperty("SelectionLanguage","XPath"),l.selectSingleNode(p)):k}();g!==k&&(!g||1!=g.nodeType)&&h(new za(32,'The result of the xpath expression "'+p+'" is: '+g+". It should be an element."))}else g=[],g=Va(l,function(b){var c;if(c=Y(b)){if(8==b.nodeType)b=k;else if(c="usemap","style"==c){var d=[];u(b.style.cssText.split(lc),function(a){var b=a.indexOf(":");0<b&&(a=[a.slice(0,
|
||||
b),a.slice(b+1)],2==a.length&&d.push(a[0].toLowerCase(),":",a[1],";"))});d=d.join("");d=";"==d.charAt(d.length-1)?d:d+";";b=v?d.replace(/\w+:;/g,""):d}else{var e=b.getAttributeNode(c);w&&!e&&(y(8)&&oa(kc,c))&&(e=b[c]);b=!e?k:oa(kc,c)?La&&"false"==e.value?k:"true":e.specified?e.value:k}c=b=="#"+a.name}return c},g,j)?g[0]:i;return!!g&&pc(g,b)}if(Y(a,"AREA"))return g=Wa(a,function(a){return Y(a,"MAP")}),!!g&&pc(g,b);if(!(g=Y(a,"INPUT")&&"hidden"==a.type.toLowerCase()||Y(a,"NOSCRIPT")||"hidden"==Z(a,
|
||||
"visibility")||!c(a)))if(g=!b)w?"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=qc(a),g=0==g;return g||!d(a)||!e(a)?m:f(a)}function qc(a){var b=1,c=Z(a,"opacity");c&&(b=Number(c));(a=mc(a))&&(b*=qc(a));return b};var rc=pc,sc=["_"],$=o;!(sc[0]in $)&&$.execScript&&$.execScript("var "+sc[0]);for(var tc;sc.length&&(tc=sc.shift());)!sc.length&&q(rc)?$[tc]=rc:$=$[tc]?$[tc]:$[tc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
|
||||
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);}
|
||||
|
|
|
@ -68,3 +68,9 @@ class TestVisibility(MarionetteTestCase):
|
|||
|
||||
zero_tranform = self.marionette.find_element("id", 'zero-tranform')
|
||||
self.assertTrue(zero_tranform.is_displayed())
|
||||
|
||||
def testShouldSayElementIsVisibleWhenItHasNegativeTransformButElementisntInANegativeSpace(self):
|
||||
test_html = self.marionette.absolute_url("cssTransform2.html")
|
||||
self.marionette.navigate(test_html)
|
||||
negative_percent__tranform = self.marionette.find_element("id", 'negative-percentage-transformY')
|
||||
self.assertTrue(negative_percent__tranform.is_displayed())
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
#negative-percentage-transformY{
|
||||
transform: translateY(-75px);
|
||||
-webkit-transform: translateY(-75%);
|
||||
-o-transform: translateY(-75%);
|
||||
-ms-transform: translateY(-75%);
|
||||
-moz-transform: translateY(-75%);
|
||||
}
|
||||
.block {
|
||||
display = block;
|
||||
}
|
||||
</style>
|
||||
<div class='block'>
|
||||
<br/>
|
||||
</div>
|
||||
<br/>
|
||||
<div class='block'>
|
||||
</div>
|
||||
<div id='negative-percentage-transformY'>I am not a hidden element </div>
|
Загрузка…
Ссылка в новой задаче