-
-
Save jleyba/2559802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is the addition to $/javascript/webdriver/atoms/build.desc to build the compiled JavaScript | |
js_fragment(name = "sendKeys", | |
module = "webdriver.atoms.inputs", | |
function = "webdriver.atoms.inputs.sendKeys", | |
deps = [ ":deps" ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 WebDriver committers | |
// Copyright 2012 Software Freedom Conservancy | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and | |
// limitations under the License. | |
/** | |
* @fileoverview Synthetic events for fun and profit. | |
*/ | |
goog.provide('webdriver.atoms.inputs'); | |
goog.require('bot.Keyboard'); | |
goog.require('bot.Mouse'); | |
goog.require('bot.action'); | |
goog.require('bot.userAgent'); | |
goog.require('goog.array'); | |
goog.require('goog.string'); | |
/** | |
* Examines the opt_keyboard parameter, and returns either that or a new | |
* keyboard instance, which is stored on the document for later use. | |
* | |
* @param {bot.Keyboard=} opt_keyboard A mouse to use. | |
* @return {!bot.Keyboard} A mouse instance. | |
*/ | |
webdriver.atoms.inputs.getKeyboard_ = function (opt_keyboard) { | |
if (opt_keyboard) { | |
return opt_keyboard; | |
} | |
if (!bot.userAgent.FIREFOX_EXTENSION && document['__webdriver_keyboard']) { | |
return document['__webdriver_keyboard']; | |
} | |
var keyboard = new bot.Keyboard(); | |
if (!bot.userAgent.FIREFOX_EXTENSION) { | |
document['__webdriver_keyboard'] = keyboard; | |
} | |
return keyboard; | |
}; | |
/** | |
* Examines the opt_mouse parameter, and returns either that or a new mouse | |
* instance, which is stored on the document for later use. | |
* | |
* @param {bot.Mouse=} opt_mouse A mouse to use. | |
* @return {!bot.Mouse} A mouse instance. | |
*/ | |
webdriver.atoms.inputs.getMouse_ = function (opt_mouse) { | |
if (opt_mouse) { | |
return opt_mouse; | |
} | |
if (!bot.userAgent.FIREFOX_EXTENSION && document['__webdriver_mouse']) { | |
return document['__webdriver_mouse']; | |
} | |
var mouse = new bot.Mouse(); | |
if (!bot.userAgent.FIREFOX_EXTENSION) { | |
document['__webdriver_mouse'] = mouse; | |
} | |
return mouse; | |
}; | |
/** | |
* | |
* @param {!Element} element The element to send the keyboard input to. | |
* @param {...(string|!Array.<string>)} var_args What to type. | |
* @param {bot.Keyboard=} opt_keyboard The keyboard to use, or construct one. | |
*/ | |
webdriver.atoms.inputs.sendKeys = function ( | |
element, var_args, opt_keyboard) { | |
var keyboard = webdriver.atoms.inputs.getKeyboard_(opt_keyboard); | |
var to_type = goog.array.slice(arguments, 2); | |
var flattened = goog.array.flatten(values); | |
bot.action.type(element, flattened, keyboard); | |
}; | |
/** | |
* Click on an element. | |
* | |
* @param {!Element} element The element to click. | |
* @param {bot.Mouse=} opt_mouse The mouse to use, or constructs one. | |
*/ | |
webdriver.atoms.inputs.click = function (element, opt_mouse) { | |
var mouse = webdriver.atoms.inputs.getMouse_(opt_mouse); | |
bot.action.click(element, null, mouse); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compiled from | |
// go //javascript/webdriver/atoms:sendKeys:ie | |
var sendKeys = function(){return function(){function g(a){throw a;}var i=void 0,j=!0,k=null,l=!1;function n(a){return function(){return this[a]}}function aa(a){return function(){return a}}var p,q=this; | |
function r(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 s(a){return a!==i}function ba(a){var b=r(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function u(a){return"function"==r(a)}function v(a){a=r(a);return"object"==a||"array"==a||"function"==a}var ca="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),da=0,ea=Date.now||function(){return+new Date}; | |
function w(a,b){function c(){}c.prototype=b.prototype;a.ba=b.prototype;a.prototype=new c;a.prototype.constructor=a};function fa(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ga(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}function ha(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function ia(a){if(!ja.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(ka,"&"));-1!=a.indexOf("<")&&(a=a.replace(la,"<"));-1!=a.indexOf(">")&&(a=a.replace(ma,">"));-1!=a.indexOf('"')&&(a=a.replace(na,"""));return a} | |
var ka=/&/g,la=/</g,ma=/>/g,na=/\"/g,ja=/[&<>\"]/; | |
function oa(a,b){for(var c=0,d=ha(""+a).split("."),e=ha(""+b).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var m=d[h]||"",o=e[h]||"",A=RegExp("(\\d*)(\\D*)","g"),x=RegExp("(\\d*)(\\D*)","g");do{var B=A.exec(m)||["","",""],C=x.exec(o)||["","",""];if(0==B[0].length&&0==C[0].length)break;c=((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==c)}return c}var pa=2147483648*Math.random()|0,qa={};function ra(a){return qa[a]||(qa[a]=(""+a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var sa,ta,ua,va=q.navigator;ua=va&&va.platform||"";sa=-1!=ua.indexOf("Mac");ta=-1!=ua.indexOf("Win");var wa=-1!=ua.indexOf("Linux"),xa,ya="",za=/MSIE\s+([^\);]+)(\)|;)/.exec(q.navigator?q.navigator.userAgent:k),ya=za?za[1]:"",Aa,Ba=q.document;Aa=Ba?Ba.documentMode:i;xa=Aa>parseFloat(ya)?""+Aa:ya;var Ca={};function Da(a){return Ca[a]||(Ca[a]=0<=oa(xa,a))}var Ea={};function Fa(a){return Ea[a]||(Ea[a]=document.documentMode&&document.documentMode>=a)};var Ga=window;function Ha(a,b){for(var c in a)b.call(i,a[c],c,a)}function Ia(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}var Ja="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");function Ka(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Ja.length;f++)c=Ja[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function y(a,b){this.code=a;this.message=b||"";this.name=La[a]||La[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}w(y,Error); | |
var La={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",33:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"}; | |
y.prototype.toString=function(){return"["+this.name+"] "+this.message};function Ma(a){this.stack=Error().stack||"";a&&(this.message=""+a)}w(Ma,Error);Ma.prototype.name="CustomError";function Na(a,b){b.unshift(a);Ma.call(this,ga.apply(k,b));b.shift()}w(Na,Ma);Na.prototype.name="AssertionError";function Oa(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;g(new Na(""+e,f||[]))}}function Pa(a,b){g(new Na("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};function z(a){return a[a.length-1]}var Qa=Array.prototype;function D(a,b){if(t(a))return!t(b)||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function E(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(i,d[e],e,a)}function Ra(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var m=f[h];b.call(i,m,h,a)&&(d[e++]=m)}return d} | |
function Sa(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(i,e[f],f,a));return d}function Ta(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return j;return l}function Ua(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return l;return j} | |
function Va(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a)){c=e;break a}c=-1}return 0>c?k:t(a)?a.charAt(c):a[c]}function Wa(a){return Qa.concat.apply(Qa,arguments)}function Xa(a){if("array"==r(a))return Wa(a);for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}function Ya(a,b,c){Oa(a.length!=k);return 2>=arguments.length?Qa.slice.call(a,b):Qa.slice.call(a,b,c)} | |
function Za(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];"array"==r(d)?b.push.apply(b,Za.apply(k,d)):b.push(d)}return b};var $a,ab=Fa(9);Fa(9);Da("9");function bb(a,b){var c;c=(c=a.className)&&"function"==typeof c.split?c.split(/\s+/):[];var d=Ya(arguments,1),e;e=c;for(var f=0,h=0;h<d.length;h++)0<=D(e,d[h])||(e.push(d[h]),f++);e=f==d.length;a.className=c.join(" ");return e};function F(a,b){this.x=s(a)?a:0;this.y=s(b)?b:0}F.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function cb(a,b){this.width=a;this.height=b}cb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};cb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};cb.prototype.scale=function(a){this.width*=a;this.height*=a;return this};var G=3;function H(a){return a?new db(I(a)):$a||($a=new db)}function eb(a,b){Ha(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in fb?a.setAttribute(fb[d],b):0==d.lastIndexOf("aria-",0)?a.setAttribute(d,b):a[d]=b})}var fb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",maxlength:"maxLength",type:"type"}; | |
function gb(a){return a?a.parentWindow||a.defaultView:window}function hb(a,b,c){function d(c){c&&b.appendChild(t(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];ba(f)&&!(v(f)&&0<f.nodeType)?E(ib(f)?Xa(f):f,d):d(f)}}function jb(a){return a&&a.parentNode?a.parentNode.removeChild(a):k} | |
function J(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 kb(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?lb(a,b):!c&&J(e,b)?-1*mb(a,b):!d&&J(f,a)?mb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=I(a);c=d.createRange();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j); | |
return c.compareBoundaryPoints(q.Range.START_TO_END,d)}function mb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return lb(d,a)}function lb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1} | |
function nb(a){var b,c=arguments.length;if(c){if(1==c)return arguments[0]}else return k;var d=[],e=Infinity;for(b=0;b<c;b++){for(var f=[],h=arguments[b];h;)f.unshift(h),h=h.parentNode;d.push(f);e=Math.min(e,f.length)}f=k;for(b=0;b<e;b++){for(var h=d[0][b],m=1;m<c;m++)if(h!=d[m][b])return f;f=h}return f}function I(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function ob(a,b){var c=[];return pb(a,b,c,j)?c[0]:i} | |
function pb(a,b,c,d){if(a!=k)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||pb(a,b,c,d))return j;a=a.nextSibling}return l}var qb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},rb={IMG:" ",BR:"\n"};function sb(a,b,c){if(!(a.nodeName in qb))if(a.nodeType==G)c?b.push((""+a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in rb)b.push(rb[a.nodeName]);else for(a=a.firstChild;a;)sb(a,b,c),a=a.nextSibling} | |
function ib(a){if(a&&"number"==typeof a.length){if(v(a))return"function"==typeof a.item||"string"==typeof a.item;if(u(a))return"function"==typeof a.item}return l}function tb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return k}function db(a){this.s=a||q.document||document}p=db.prototype;p.ka=n("s");p.j=function(a){return t(a)?this.s.getElementById(a):a}; | |
function K(a,b,c,d){a=d||a.s;b=b&&"*"!=b?b.toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))c=a.querySelectorAll(b+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(a=a.getElementsByClassName(c),b){for(var d={},e=0,f=0,h;h=a[f];f++)b==h.nodeName&&(d[e++]=h);d.length=e;c=d}else c=a;else if(a=a.getElementsByTagName(b||"*"),c){d={};for(f=e=0;h=a[f];f++)b=h.className,"function"==typeof b.split&&0<=D(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;c=d}else c=a;return c} | |
p.ia=function(a,b,c){var d=this.s,e=arguments,f=e[0],h=e[1];if(!ab&&h&&(h.name||h.type)){f=["<",f];h.name&&f.push(' name="',ia(h.name),'"');if(h.type){f.push(' type="',ia(h.type),'"');var m={};Ka(m,h);h=m;delete h.type}f.push(">");f=f.join("")}f=d.createElement(f);h&&(t(h)?f.className=h:"array"==r(h)?bb.apply(k,[f].concat(h)):eb(f,h));2<e.length&&hb(d,f,e);return f};p.createElement=function(a){return this.s.createElement(a)};p.createTextNode=function(a){return this.s.createTextNode(a)}; | |
p.za=function(){return this.s.parentWindow||this.s.defaultView};function ub(a){var b=a.s,a="CSS1Compat"==b.compatMode?b.documentElement:b.body,b=b.parentWindow||b.defaultView;return new F(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}p.appendChild=function(a,b){a.appendChild(b)};p.removeNode=jb;p.contains=J;var L={};L.Ha=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||k}}();L.va=function(a,b,c){var d=I(a);if(!d.implementation.hasFeature("XPath","3.0"))return k;try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):L.Ha;return d.evaluate(b,a,e,c,k)}catch(f){g(new y(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f))}}; | |
L.sa=function(a,b){(!a||1!=a.nodeType)&&g(new y(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element."))};L.G=function(a,b){var c=function(){var c=L.va(b,a,9);return c?c.singleNodeValue||k:b.selectSingleNode?(c=I(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):k}();c===k||L.sa(c,a);return c}; | |
L.r=function(a,b){var c=function(){var c=L.va(b,a,7);if(c){for(var e=c.snapshotLength,f=[],h=0;h<e;++h)f.push(c.snapshotItem(h));return f}return b.selectNodes?(c=I(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();E(c,function(b){L.sa(b,a)});return c};function vb(){return 0<=oa(document.documentMode,8)}var wb=9<=document.documentMode,xb=!wb;var M="StopIteration"in q?q.StopIteration:Error("StopIteration");function yb(){}yb.prototype.next=function(){g(M)};yb.prototype.w=function(){return this};function zb(a){if(a instanceof yb)return a;if("function"==typeof a.w)return a.w(l);if(ba(a)){var b=0,c=new yb;c.next=function(){for(;;){b>=a.length&&g(M);if(b in a)return a[b++];b++}};return c}g(Error("Not implemented"))};function Ab(a,b,c,d,e){this.q=!!b;a&&Bb(this,a,d);this.depth=e!=i?e:this.v||0;this.q&&(this.depth*=-1);this.Ia=!c}w(Ab,yb);p=Ab.prototype;p.u=k;p.v=0;p.pa=l;function Bb(a,b,c,d){if(a.u=b)a.v="number"==typeof c?c:1!=a.u.nodeType?0:a.q?-1:1;"number"==typeof d&&(a.depth=d)} | |
p.next=function(){var a;if(this.pa){(!this.u||this.Ia&&0==this.depth)&&g(M);a=this.u;var b=this.q?-1:1;if(this.v==b){var c=this.q?a.lastChild:a.firstChild;c?Bb(this,c):Bb(this,a,-1*b)}else(c=this.q?a.previousSibling:a.nextSibling)?Bb(this,c):Bb(this,a.parentNode,-1*b);this.depth+=this.v*(this.q?-1:1)}else this.pa=j;(a=this.u)||g(M);return a}; | |
p.splice=function(a){var b=this.u,c=this.q?1:-1;this.v==c&&(this.v=-1*c,this.depth+=this.v*(this.q?-1:1));this.q=!this.q;Ab.prototype.next.call(this);this.q=!this.q;for(var c=ba(arguments[0])?arguments[0]:arguments,d=c.length-1;0<=d;d--)b.parentNode&&b.parentNode.insertBefore(c[d],b.nextSibling);jb(b)};function Cb(a,b,c,d){Ab.call(this,a,b,c,k,d)}w(Cb,Ab);Cb.prototype.next=function(){do Cb.ba.next.call(this);while(-1==this.v);return this.u};function Db(a,b){var c=I(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,k))?c[b]||c.getPropertyValue(b):""}function Eb(a,b){return Db(a,b)||(a.currentStyle?a.currentStyle[b]:k)||a.style&&a.style[b]}function Fb(a){var b=a.getBoundingClientRect(),a=a.ownerDocument;b.left-=a.documentElement.clientLeft+a.body.clientLeft;b.top-=a.documentElement.clientTop+a.body.clientTop;return b} | |
function Gb(a){if(!Fa(8))return a.offsetParent;for(var b=I(a),c=Eb(a,"position"),d="fixed"==c||"absolute"==c,a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Eb(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 Hb(a){var b=new F;if(1==a.nodeType)if(a.getBoundingClientRect){var c=Fb(a);b.x=c.left;b.y=c.top}else{c=ub(H(a));var d=I(a);Eb(a,"position");var e=new F(0,0),f;f=d?9==d.nodeType?d:I(d):document;var h;if(h=!Fa(9))h="CSS1Compat"!=H(f).s.compatMode;f=h?f.body:f.documentElement;if(a!=f)if(a.getBoundingClientRect)a=Fb(a),d=ub(H(d)),e.x=a.left+d.x,e.y=a.top+d.y;else if(d.getBoxObjectFor)a=d.getBoxObjectFor(a),d=d.getBoxObjectFor(f),e.x=a.screenX-d.screenX,e.y=a.screenY-d.screenY;else{h=a;do e.x+= | |
h.offsetLeft,e.y+=h.offsetTop,h!=a&&(e.x+=h.clientLeft||0,e.y+=h.clientTop||0),h=h.offsetParent;while(h&&h!=a);for(h=a;(h=Gb(h))&&h!=d.body&&h!=f;)e.x-=h.scrollLeft,e.y-=h.scrollTop}b.x=e.x-c.x;b.y=e.y-c.y}else c=u(a.ya),e=a,a.targetTouches?e=a.targetTouches[0]:c&&a.ya().targetTouches&&(e=a.ya().targetTouches[0]),b.x=e.clientX,b.y=e.clientY;return b} | |
function Ib(a){var b=a.offsetWidth,c=a.offsetHeight;return!s(b)&&a.getBoundingClientRect?(a=Fb(a),new cb(a.right-a.left,a.bottom-a.top)):new cb(b,c)};function N(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Jb={"class":"className",readonly:"readOnly"},Kb=["checked","disabled","draggable","hidden"];function Lb(a,b){var c=Jb[b]||b,d=a[c];if(!s(d)&&0<=D(Kb,c))return l;if(c="value"==b)if(c=N(a,"OPTION")){var e;c=b.toLowerCase();if(a.hasAttribute)e=a.hasAttribute(c);else try{e=a.attributes[c].specified}catch(f){e=l}c=!e}c&&(d=[],sb(a,d,l),d=d.join(""));return d} | |
var Mb="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(","),Nb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; | |
function Ob(a){var b=[];E(a.split(Nb),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+";"}function Pb(a,b){if(8==a.nodeType)return k;b=b.toLowerCase();if("style"==b)return Ob(a.style.cssText);var c=a.getAttributeNode(b);!c&&Da(8)&&0<=D(Mb,b)&&(c=a[b]);return!c?k:0<=D(Mb,b)?xb&&"false"==c.value?k:"true":c.specified?c.value:k}var Qb="BUTTON,INPUT,OPTGROUP,OPTION,SELECT,TEXTAREA".split(","); | |
function Rb(a){var b=a.tagName.toUpperCase();return!(0<=D(Qb,b))?j:Lb(a,"disabled")?l:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Rb(a.parentNode):j}var Sb="text,search,tel,url,email,password,number".split(",");function Tb(a){return N(a,"TEXTAREA")?j:N(a,"INPUT")?0<=D(Sb,a.type.toLowerCase()):Ub(a)?j:l}function Ub(a){function b(a){return"inherit"==a.contentEditable?(a=Vb(a))?b(a):l:"true"==a.contentEditable}return!s(a.contentEditable)?l:b(a)} | |
function Vb(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return N(a)?a:k}function O(a,b){b=ra(b);return Db(a,b)||Wb(a,b)}function Wb(a,b){var c=a.currentStyle||a.style,d=c[b];!s(d)&&u(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?s(d)?d:k:(c=Vb(a))?Wb(c,b):k} | |
function Xb(a){if(u(a.getBBox))try{var b=a.getBBox();if(b)return b}catch(c){}if("none"!=Eb(a,"display"))a=Ib(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=Ib(a);b.display=d;b.position=f;b.visibility=e}return a} | |
function Yb(a,b){function c(a){if("none"==O(a,"display"))return l;a=Vb(a);return!a||c(a)}function d(a){var b=Xb(a);return 0<b.height&&0<b.width?j:Ta(a.childNodes,function(a){return a.nodeType==G||N(a)&&d(a)})}function e(a){var b=Vb(a);if(b&&"hidden"==O(b,"overflow")){var c=Xb(b),d=Hb(b),a=Hb(a);return d.x+c.width<a.x||d.y+c.height<a.y?l:e(b)}return j}N(a)||g(Error("Argument to isShown must be of type Element"));if(N(a,"OPTION")||N(a,"OPTGROUP")){var f=tb(a,function(a){return N(a,"SELECT")});return!!f&& | |
Yb(f,j)}if(N(a,"MAP")){if(!a.name)return l;f=I(a);f=f.evaluate?L.G('/descendant::*[@usemap = "#'+a.name+'"]',f):ob(f,function(b){return N(b)&&Pb(b,"usemap")=="#"+a.name});return!!f&&Yb(f,b)}return N(a,"AREA")?(f=tb(a,function(a){return N(a,"MAP")}),!!f&&Yb(f,b)):N(a,"INPUT")&&"hidden"==a.type.toLowerCase()||N(a,"NOSCRIPT")||"hidden"==O(a,"visibility")||!c(a)||!b&&0==Zb(a)||!d(a)||!e(a)?l:j}function $b(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")} | |
function ac(a){var b=[];bc(a,b);b=Sa(b,$b);return $b(b.join("\n")).replace(/\xa0/g," ")}function bc(a,b){if(N(a,"BR"))b.push("");else{var c=N(a,"TD"),d=O(a,"display"),e=!c&&!(0<=D(cc,d));e&&!/^[\s\xa0]*$/.test(z(b)||"")&&b.push("");var f=Yb(a),h=k,m=k;f&&(h=O(a,"white-space"),m=O(a,"text-transform"));E(a.childNodes,function(a){a.nodeType==G&&f?dc(a,b,h,m):N(a)&&bc(a,b)});var o=z(b)||"";if((c||"table-cell"==d)&&o&&!fa(o))b[b.length-1]+=" ";e&&!/^[\s\xa0]*$/.test(o)&&b.push("")}}var cc="inline,inline-block,inline-table,none,table-cell,table-column,table-column-group".split(","); | |
function dc(a,b,c,d){a=a.nodeValue.replace(/\u200b/g,"");a=a.replace(/(\r\n|\r|\n)/g,"\n");if("normal"==c||"nowrap"==c)a=a.replace(/\n/g," ");a="pre"==c||"pre-wrap"==c?a.replace(/[ \f\t\v\u2028\u2029]/g,"\u00a0"):a.replace(/[\ \f\t\v\u2028\u2029]+/g," ");"capitalize"==d?a=a.replace(/(^|\s)(\S)/g,function(a,b,c){return b+c.toUpperCase()}):"uppercase"==d?a=a.toUpperCase():"lowercase"==d&&(a=a.toLowerCase());c=b.pop()||"";fa(c)&&0==a.lastIndexOf(" ",0)&&(a=a.substr(1));b.push(c+a)} | |
function Zb(a){if("relative"==O(a,"position"))return 1;a=O(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1};function P(){this.t=Ga.document.documentElement;this.N=k;var a=I(this.t).activeElement;a&&ec(this,a)}P.prototype.j=n("t");function ec(a,b){a.t=b;a.N=N(b,"OPTION")?tb(b,function(a){return N(a,"SELECT")}):k} | |
function fc(a,b,c,d,e,f){function h(a,c){var d={identifier:a,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};m.changedTouches.push(d);if(b==gc||b==hc)m.touches.push(d),m.targetTouches.push(d)}var m={touches:[],targetTouches:[],changedTouches:[],altKey:l,ctrlKey:l,shiftKey:l,metaKey:l,relatedTarget:k,scale:0,rotation:0};h(c,d);s(e)&&h(e,f);ic(a.t,b,m)}function jc(a){return N(a,"FORM")} | |
function kc(a){jc(a)||g(new y(12,"Element was not in a form, so could not submit."));if(ic(a,lc))if(N(a.submit))if(vb())a.constructor.prototype.submit.call(a);else{var b=mc({id:"submit"},a),c=mc({name:"submit"},a);E(b,function(a){a.removeAttribute("id")});E(c,function(a){a.removeAttribute("name")});a=a.submit;E(b,function(a){a.setAttribute("id","submit")});E(c,function(a){a.setAttribute("name","submit")});a()}else a.submit()};function Q(a,b,c){this.W=a;this.ea=b;this.fa=c}Q.prototype.create=function(a){a=I(a);xb?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.W,this.ea,this.fa));return a};Q.prototype.toString=n("W");function R(a,b,c){Q.call(this,a,b,c)}w(R,Q); | |
R.prototype.create=function(a,b){this==nc&&g(new y(9,"Browser does not support a mouse pixel scroll event."));var c=I(a),d;if(xb){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==S||this==oc)if(Object.defineProperty){var e=this==S;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget:a)}else d.relatedTarget= | |
b.relatedTarget;this==pc&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else e=gb(c),d=c.createEvent("MouseEvents"),this==pc&&(d.wheelDelta=b.wheelDelta),d.initMouseEvent(this.W,this.ea,this.fa,e,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return d};function qc(a,b,c){Q.call(this,a,b,c)}w(qc,Q); | |
qc.prototype.create=function(a,b){var c=I(a);xb?c=c.createEventObject():(c=c.createEvent("Events"),c.initEvent(this.W,this.ea,this.fa));c.altKey=b.altKey;c.ctrlKey=b.ctrlKey;c.metaKey=b.metaKey;c.shiftKey=b.shiftKey;c.keyCode=b.charCode||b.keyCode;return c};function rc(a,b,c){Q.call(this,a,b,c)}w(rc,Q);rc.prototype.create=function(){g(new y(9,"Browser does not support firing touch events."))}; | |
var sc=new Q("input",l,l),lc=new Q("submit",j,j),tc=new R("click",j,j),uc=new R("contextmenu",j,j),vc=new R("dblclick",j,j),wc=new R("mousedown",j,j),xc=new R("mousemove",j,l),S=new R("mouseout",j,j),oc=new R("mouseover",j,j),yc=new R("mouseup",j,j),pc=new R("mousewheel",j,j),nc=new R("MozMousePixelScroll",j,j),zc=new qc("keydown",j,j),Ac=new qc("keypress",j,j),Bc=new qc("keyup",j,j),hc=new rc("touchmove",j,j),gc=new rc("touchstart",j,j); | |
function ic(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.Sa=l);return xb?a.fireEvent("on"+b.W,c):a.dispatchEvent(c)};function Cc(a,b){if(Dc(a))a.selectionStart=b;else{var c=Ec(a),d=c[0];d.inRange(c[1])&&(b=Fc(a,b),d.collapse(j),d.move("character",b),d.select())}} | |
function Gc(a,b){var c=0,d=0;if(Dc(a))c=a.selectionStart,d=b?-1:a.selectionEnd;else{var e=Ec(a),f=e[0],e=e[1];if(f.inRange(e)){f.setEndPoint("EndToStart",e);if("textarea"==a.type){for(var c=e.duplicate(),h=f.text,d=h,m=e=c.text,o=l;!o;)0==f.compareEndPoints("StartToEnd",f)?o=j:(f.moveEnd("character",-1),f.text==h?d+="\r\n":o=j);if(b)f=[d.length,-1];else{for(f=l;!f;)0==c.compareEndPoints("StartToEnd",c)?f=j:(c.moveEnd("character",-1),c.text==e?m+="\r\n":f=j);f=[d.length,d.length+m.length]}return f}c= | |
f.text.length;d=b?-1:f.text.length+e.text.length}}return[c,d]}function Hc(a,b){if(Dc(a))a.selectionEnd=b;else{var c=Ec(a),d=c[1];c[0].inRange(d)&&(b=Fc(a,b),c=Fc(a,Gc(a,j)[0]),d.collapse(j),d.moveEnd("character",b-c),d.select())}}function Ic(a,b){if(Dc(a))a.selectionStart=b,a.selectionEnd=b;else{var b=Fc(a,b),c=a.createTextRange();c.collapse(j);c.move("character",b);c.select()}} | |
function Jc(a,b){if(Dc(a)){var c=a.value,d=a.selectionStart;a.value=c.substr(0,d)+b+c.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d+b.length}else d=Ec(a),c=d[1],d[0].inRange(c)&&(d=c.duplicate(),c.text=b,c.setEndPoint("StartToStart",d),c.select())}function Ec(a){var b=a.ownerDocument||a.document,c=b.selection.createRange();"textarea"==a.type?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();return[b,c]} | |
function Fc(a,b){"textarea"==a.type&&(b=a.value.substring(0,b).replace(/(\r\n|\r|\n)/g,"\n").length);return b}function Dc(a){try{return"number"==typeof a.selectionStart}catch(b){return l}};function Kc(a){if("function"==typeof a.Q)return a.Q();if(t(a))return a.split("");if(ba(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ia(a)};function Lc(a,b){this.m={};this.ma={};var c=arguments.length;if(1<c){c%2&&g(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.da(a)}p=Lc.prototype;p.ca=0;p.Q=function(){var a=[],b;for(b in this.m)":"==b.charAt(0)&&a.push(this.m[b]);return a};function Mc(a){var b=[],c;for(c in a.m)if(":"==c.charAt(0)){var d=c.substring(1);b.push(a.ma[c]?Number(d):d)}return b} | |
p.remove=function(a){var a=":"+a,b=this.m,c;(c=a in b)&&delete b[a];return c?(delete this.ma[a],this.ca++,j):l};p.get=function(a,b){var c=":"+a;return c in this.m?this.m[c]:b};p.set=function(a,b){var c=":"+a;c in this.m||(this.ca++,"number"==typeof a&&(this.ma[c]=j));this.m[c]=b};p.da=function(a){var b;if(a instanceof Lc)b=Mc(a),a=a.Q();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=Ia(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])}; | |
p.w=function(a){var b=0,c=Mc(this),d=this.m,e=this.ca,f=this,h=new yb;h.next=function(){for(;;){e!=f.ca&&g(Error("The map has changed since the iterator was created"));b>=c.length&&g(M);var h=c[b++];return a?h:d[":"+h]}};return h};function Nc(a){this.m=new Lc;a&&this.da(a)}function Oc(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ca]||(a[ca]=++da)):b.substr(0,1)+a}p=Nc.prototype;p.add=function(a){this.m.set(Oc(a),a)};p.da=function(a){for(var a=Kc(a),b=a.length,c=0;c<b;c++)this.add(a[c])};p.remove=function(a){return this.m.remove(Oc(a))};p.contains=function(a){return":"+Oc(a)in this.m.m};p.Q=function(){return this.m.Q()};p.w=function(){return this.m.w(l)};function Pc(){P.call(this);this.ja=Tb(this.j())&&!Lb(this.j(),"readOnly");this.na=new Nc}w(Pc,P);var Qc={};function T(a,b,c){v(a)&&(a=a.e);a=new Rc(a,b,c);if(b&&(!(b in Qc)||c))Qc[b]={key:a,shift:l},c&&(Qc[c]={key:a,shift:j});return a}function Rc(a,b,c){this.code=a;this.H=b||k;this.Pa=c||this.H}var Sc=T(8);T(9);var Tc=T(13),Uc=T(16),Vc=T(17),Wc=T(18);T(19);T(20);var Xc=T(27);T(32," ");T(33);T(34);T(35);T(36);var Yc=T(37);T(38);var Zc=T(39);T(40);T(44);T(45);var $c=T(46);T(48,"0",")");T(49,"1","!"); | |
T(50,"2","@");T(51,"3","#");T(52,"4","$");T(53,"5","%");T(54,"6","^");T(55,"7","&");T(56,"8","*");T(57,"9","(");T(65,"a","A");T(66,"b","B");T(67,"c","C");T(68,"d","D");T(69,"e","E");T(70,"f","F");T(71,"g","G");T(72,"h","H");T(73,"i","I");T(74,"j","J");T(75,"k","K");T(76,"l","L");T(77,"m","M");T(78,"n","N");T(79,"o","O");T(80,"p","P");T(81,"q","Q");T(82,"r","R");T(83,"s","S");T(84,"t","T");T(85,"u","U");T(86,"v","V");T(87,"w","W");T(88,"x","X");T(89,"y","Y");T(90,"z","Z"); | |
var ad=T(ta?{g:91,e:91,opera:219}:sa?{g:224,e:91,opera:17}:{g:0,e:91,opera:k});T(ta?{g:92,e:92,opera:220}:sa?{g:224,e:93,opera:17}:{g:0,e:92,opera:k});T(ta?{g:93,e:93,opera:0}:sa?{g:0,e:0,opera:16}:{g:93,e:k,opera:0});T({g:96,e:96,opera:48},"0");T({g:97,e:97,opera:49},"1");T({g:98,e:98,opera:50},"2");T({g:99,e:99,opera:51},"3");T({g:100,e:100,opera:52},"4");T({g:101,e:101,opera:53},"5");T({g:102,e:102,opera:54},"6");T({g:103,e:103,opera:55},"7");T({g:104,e:104,opera:56},"8"); | |
T({g:105,e:105,opera:57},"9");T({g:106,e:106,opera:wa?56:42},"*");T({g:107,e:107,opera:wa?61:43},"+");T({g:109,e:109,opera:wa?109:45},"-");T({g:110,e:110,opera:wa?190:78},".");T({g:111,e:111,opera:wa?191:47},"/");T(144);T(112);T(113);T(114);T(115);T(116);T(117);T(118);T(119);T(120);T(121);T(122);T(123);T({g:107,e:187,opera:61},"=","+");T({g:109,e:189,opera:109},"-","_");T(188,",","<");T(190,".",">");T(191,"/","?");T(192,"`","~");T(219,"[","{");T(220,"\\","|");T(221,"]","}"); | |
T({g:59,e:186,opera:59},";",":");T(222,"'",'"');var bd=[Wc,Vc,ad,Uc];Pc.prototype.n=function(a){return this.na.contains(a)}; | |
function cd(a,b){a.n(b)&&0<=D(bd,b)&&g(new y(13,"Cannot press a modifier key that is already pressed."));var c=b.code!==k&&dd(a,zc,b);if(c&&(!(b.H||b==Tc||b==Xc)||dd(a,Ac,b,!c))&&c)if(ed(a,b),a.ja)if(b.H)c=fd(a,b),Jc(a.j(),c),Cc(a.j(),Gc(a.j(),j)[0]+1),xb||ic(a.t,sc);else switch(b){case Tc:N(a.j(),"TEXTAREA")&&(Jc(a.j(),"\r\n"),Cc(a.j(),Gc(a.j(),j)[0]+2));break;case Sc:case $c:c=Gc(a.j(),l);b==Sc&&c[0]==c[1]?(Cc(a.j(),c[1]-1),Hc(a.j(),c[1])):Hc(a.j(),c[1]+1);Gc(a.j(),l);Jc(a.j(),"");break;case Yc:case Zc:c= | |
Gc(a.j(),j)[0],b==Yc?Ic(a.j(),c-1):Ic(a.j(),c+1)}a.na.add(b)}function ed(a,b){if(b==Tc&&N(a.j(),"INPUT")){var c=tb(a.j(),jc,j);if(c){var d=c.getElementsByTagName("input");(Ta(d,function(a){a:{if(N(a,"INPUT")){var b=a.type.toLowerCase();if("submit"==b||"image"==b){a=j;break a}}if(N(a,"BUTTON")&&(b=a.type.toLowerCase(),"submit"==b)){a=j;break a}a=l}return a})||1==d.length)&&kc(c)}}} | |
function gd(a,b){a.n(b)||g(new y(13,"Cannot release a key that is not pressed."));b.code===k||dd(a,Bc,b);a.na.remove(b)}function fd(a,b){b.H||g(new y(13,"not a character key"));return a.n(Uc)?b.Pa:b.H}function dd(a,b,c,d){c.code===k&&g(new y(13,"Key must have a keycode to be fired."));c={altKey:a.n(Wc),ctrlKey:a.n(Vc),metaKey:a.n(ad),shiftKey:a.n(Uc),keyCode:c.code,charCode:c.H&&b==Ac?fd(a,c).charCodeAt(0):0,preventDefault:!!d};return ic(a.t,b,c)} | |
function hd(a,b){ec(a,b);a.ja=Tb(b)&&!Lb(b,"readOnly");var c;c=a.N||a.t;var d=I(c).activeElement;if(c==d)c=l;else{if(d&&(u(d.blur)||v(d.blur))){try{d.blur()}catch(e){"Unspecified error."!=e.message&&g(e)}!vb()&&gb(I(c)).focus()}u(c.focus)||v(c.focus)?(c.focus(),c=j):c=l}a.ja&&c&&Ic(b,b.value.length)};function id(a){return jd(a||arguments.callee.caller,[])} | |
function jd(a,b){var c=[];if(0<=D(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(kd(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=""+f;break;case "boolean":f=f?"true":"false";break;case "function":f=(f=kd(f))?f:"[fn]";break;default:f=typeof f}40<f.length&&(f=f.substr(0,40)+"...");c.push(f)}b.push(a);c.push(")\n");try{c.push(jd(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a? | |
c.push("[...long stack...]"):c.push("[end]");return c.join("")}function kd(a){if(ld[a])return ld[a];a=""+a;if(!ld[a]){var b=/function ([^\(]+)/.exec(a);ld[a]=b?b[1]:"[Anonymous]"}return ld[a]}var ld={};function md(a,b,c,d,e){this.reset(a,b,c,d,e)}md.prototype.xa=k;md.prototype.wa=k;var nd=0;md.prototype.reset=function(a,b,c,d,e){"number"==typeof e||nd++;d||ea();this.S=a;this.Na=b;delete this.xa;delete this.wa};md.prototype.Da=function(a){this.S=a};function U(a){this.Oa=a}U.prototype.$=k;U.prototype.S=k;U.prototype.ga=k;U.prototype.Aa=k;function od(a,b){this.name=a;this.value=b}od.prototype.toString=n("name");var pd=new od("SEVERE",1E3),qd=new od("WARNING",900),rd=new od("CONFIG",700);U.prototype.getParent=n("$");U.prototype.Da=function(a){this.S=a};function sd(a){if(a.S)return a.S;if(a.$)return sd(a.$);Pa("Root logger has no level set.");return k} | |
U.prototype.log=function(a,b,c){if(a.value>=sd(this).value){a=this.Ka(a,b,c);b="log:"+a.Na;q.console&&(q.console.timeStamp?q.console.timeStamp(b):q.console.markTimeline&&q.console.markTimeline(b));q.msWriteProfilerMark&&q.msWriteProfilerMark(b);for(b=this;b;){var c=b,d=a;if(c.Aa)for(var e=0,f=i;f=c.Aa[e];e++)f(d);b=b.getParent()}}}; | |
U.prototype.Ka=function(a,b,c){var d=new md(a,""+b,this.Oa);if(c){d.xa=c;var e;var f=arguments.callee.caller;try{var h;var m;c:{for(var o=["window","location","href"],A=q,x;x=o.shift();)if(A[x]!=k)A=A[x];else{m=k;break c}m=A}if(t(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:m,stack:"Not available"};else{var B,C,o=l;try{B=c.lineNumber||c.Ta||"Not available"}catch(se){B="Not available",o=j}try{C=c.fileName||c.filename||c.sourceURL||m}catch(te){C="Not available",o=j}h=o|| | |
!c.lineNumber||!c.fileName||!c.stack?{message:c.message,name:c.name,lineNumber:B,fileName:C,stack:c.stack||"Not available"}:c}e="Message: "+ia(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+ia(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+ia(id(f)+"-> ")}catch(oe){e="Exception trying to expose exception! You win, we lose. "+oe}d.wa=e}return d};var td={},ud=k; | |
function vd(a){ud||(ud=new U(""),td[""]=ud,ud.Da(rd));var b;if(!(b=td[a])){b=new U(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=vd(a.substr(0,c));c.ga||(c.ga={});c.ga[d]=b;b.$=c;td[a]=b}return b};function wd(){}w(wd,function(){});vd("goog.dom.SavedRange");w(function(a){this.Qa="goog_"+pa++;this.Ja="goog_"+pa++;this.ua=H(a.ka());a.V(this.ua.ia("SPAN",{id:this.Qa}),this.ua.ia("SPAN",{id:this.Ja}))},wd);function xd(){}function yd(a){if(a.getSelection)return a.getSelection();var a=a.document,b=a.selection;if(b){try{var c=b.createRange();if(c.parentElement){if(c.parentElement().document!=a)return k}else if(!c.length||c.item(0).document!=a)return k}catch(d){return k}return b}return k}function zd(a){for(var b=[],c=0,d=a.J();c<d;c++)b.push(a.D(c));return b}xd.prototype.K=aa(l);xd.prototype.ka=function(){return I(this.C())};xd.prototype.za=function(){return gb(this.ka())}; | |
xd.prototype.containsNode=function(a,b){return this.B(Ad(Bd(a),i),b)};function Cd(a,b){Ab.call(this,a,b,j)}w(Cd,Ab);function Dd(){}w(Dd,xd);Dd.prototype.B=function(a,b){var c=zd(this),d=zd(a);return(b?Ta:Ua)(d,function(a){return Ta(c,function(c){return c.B(a,b)})})};Dd.prototype.insertNode=function(a,b){if(b){var c=this.b();c.parentNode&&c.parentNode.insertBefore(a,c)}else c=this.i(),c.parentNode&&c.parentNode.insertBefore(a,c.nextSibling);return a};Dd.prototype.V=function(a,b){this.insertNode(a,j);this.insertNode(b,l)};function Ed(a,b,c,d,e){var f;if(a&&(this.d=a,this.h=b,this.c=c,this.f=d,1==a.nodeType&&"BR"!=a.tagName&&(a=a.childNodes,(b=a[b])?(this.d=b,this.h=0):(a.length&&(this.d=z(a)),f=j)),1==c.nodeType))(this.c=c.childNodes[d])?this.f=0:this.c=c;Cd.call(this,e?this.c:this.d,e);if(f)try{this.next()}catch(h){h!=M&&g(h)}}w(Ed,Cd);p=Ed.prototype;p.d=k;p.c=k;p.h=0;p.f=0;p.b=n("d");p.i=n("c");p.R=function(){return this.pa&&this.u==this.c&&(!this.f||1!=this.v)};p.next=function(){this.R()&&g(M);return Ed.ba.next.call(this)};"ScriptEngine"in q&&"JScript"==q.ScriptEngine()&&(q.ScriptEngineMajorVersion(),q.ScriptEngineMinorVersion(),q.ScriptEngineBuildVersion());function Fd(){}Fd.prototype.B=function(a,b){var c=b&&!a.isCollapsed(),d=a.a;try{return c?0<=this.o(d,0,1)&&0>=this.o(d,1,0):0<=this.o(d,0,0)&&0>=this.o(d,1,1)}catch(e){return l}};Fd.prototype.containsNode=function(a,b){return this.B(Bd(a),b)};Fd.prototype.w=function(){return new Ed(this.b(),this.k(),this.i(),this.l())};function V(a){this.a=a}w(V,Fd);p=V.prototype;p.C=function(){return this.a.commonAncestorContainer};p.b=function(){return this.a.startContainer};p.k=function(){return this.a.startOffset};p.i=function(){return this.a.endContainer};p.l=function(){return this.a.endOffset};p.o=function(a,b,c){return this.a.compareBoundaryPoints(1==c?1==b?q.Range.START_TO_START:q.Range.START_TO_END:1==b?q.Range.END_TO_START:q.Range.END_TO_END,a)};p.isCollapsed=function(){return this.a.collapsed}; | |
p.select=function(a){this.aa(gb(I(this.b())).getSelection(),a)};p.aa=function(a){a.removeAllRanges();a.addRange(this.a)};p.insertNode=function(a,b){var c=this.a.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a}; | |
p.V=function(a,b){var c=gb(I(this.b()));if(c=(c=yd(c||window))&&Gd(c))var d=c.b(),e=c.i(),f=c.k(),h=c.l();var m=this.a.cloneRange(),o=this.a.cloneRange();m.collapse(l);o.collapse(j);m.insertNode(b);o.insertNode(a);m.detach();o.detach();if(c){if(d.nodeType==G)for(;f>d.length;){f-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(e.nodeType==G)for(;h>e.length;){h-=e.length;do e=e.nextSibling;while(e==a||e==b)}c=new Hd;c.L=Id(d,f,e,h);"BR"==d.tagName&&(m=d.parentNode,f=D(m.childNodes,d),d=m);"BR"==e.tagName&& | |
(m=e.parentNode,h=D(m.childNodes,e),e=m);c.L?(c.d=e,c.h=h,c.c=d,c.f=f):(c.d=d,c.h=f,c.c=e,c.f=h);c.select()}};p.collapse=function(a){this.a.collapse(a)};function Jd(a){this.a=a}w(Jd,V);Jd.prototype.aa=function(a,b){var c=b?this.i():this.b(),d=b?this.l():this.k(),e=b?this.b():this.i(),f=b?this.k():this.l();a.collapse(c,d);(c!=e||d!=f)&&a.extend(e,f)};function Kd(a){this.a=a}w(Kd,Fd);var Ld=vd("goog.dom.browserrange.IeRange");function Md(a){var b=I(a).body.createTextRange();if(1==a.nodeType)b.moveToElementText(a),W(a)&&!a.childNodes.length&&b.collapse(l);else{for(var c=0,d=a;d=d.previousSibling;){var e=d.nodeType;if(e==G)c+=d.length;else if(1==e){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b}p=Kd.prototype;p.F=k;p.d=k;p.c=k;p.h=-1;p.f=-1; | |
p.z=function(){this.F=this.d=this.c=k;this.h=this.f=-1}; | |
p.C=function(){if(!this.F){var a=this.a.text,b=this.a.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&0<b)return this.F=c;for(;b>c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;1==c.childNodes.length&&c.innerText==(c.firstChild.nodeType==G?c.firstChild.nodeValue:c.firstChild.innerText)&&W(c.firstChild);)c=c.firstChild;0==a.length&&(c=Nd(this,c));this.F= | |
c}return this.F};function Nd(a,b){for(var c=b.childNodes,d=0,e=c.length;d<e;d++){var f=c[d];if(W(f)){var h=Md(f),m=h.htmlText!=f.outerHTML;if(a.isCollapsed()&&m?0<=a.o(h,1,1)&&0>=a.o(h,1,0):a.a.inRange(h))return Nd(a,f)}}return b}p.b=function(){this.d||(this.d=Od(this,1),this.isCollapsed()&&(this.c=this.d));return this.d};p.k=function(){0>this.h&&(this.h=Pd(this,1),this.isCollapsed()&&(this.f=this.h));return this.h}; | |
p.i=function(){if(this.isCollapsed())return this.b();this.c||(this.c=Od(this,0));return this.c};p.l=function(){if(this.isCollapsed())return this.k();0>this.f&&(this.f=Pd(this,0),this.isCollapsed()&&(this.h=this.f));return this.f};p.o=function(a,b,c){return this.a.compareEndPoints((1==b?"Start":"End")+"To"+(1==c?"Start":"End"),a)}; | |
function Od(a,b,c){c=c||a.C();if(!c||!c.firstChild)return c;for(var d=1==b,e=0,f=c.childNodes.length;e<f;e++){var h=d?e:f-e-1,m=c.childNodes[h],o;try{o=Bd(m)}catch(A){continue}var x=o.a;if(a.isCollapsed())if(W(m)){if(o.B(a))return Od(a,b,m)}else{if(0==a.o(x,1,1)){a.h=a.f=h;break}}else{if(a.B(o)){if(!W(m)){d?a.h=h:a.f=h+1;break}return Od(a,b,m)}if(0>a.o(x,1,0)&&0<a.o(x,0,1))return Od(a,b,m)}}return c} | |
function Pd(a,b){var c=1==b,d=c?a.b():a.i();if(1==d.nodeType){for(var d=d.childNodes,e=d.length,f=c?1:-1,h=c?0:e-1;0<=h&&h<e;h+=f){var m=d[h];if(!W(m)&&0==a.a.compareEndPoints((1==b?"Start":"End")+"To"+(1==b?"Start":"End"),Bd(m).a))return c?h:h+1}return-1==h?0:h}e=a.a.duplicate();f=Md(d);e.setEndPoint(c?"EndToEnd":"StartToStart",f);e=e.text.length;return c?d.length-e:e}p.isCollapsed=function(){return 0==this.a.compareEndPoints("StartToEnd",this.a)};p.select=function(){this.a.select()}; | |
function Qd(a,b,c){var d;d=d||H(a.parentElement());var e;1!=b.nodeType&&(e=j,b=d.ia("DIV",k,b));a.collapse(c);d=d||H(a.parentElement());var f=c=b.id;c||(c=b.id="goog_"+pa++);a.pasteHTML(b.outerHTML);(b=d.j(c))&&(f||b.removeAttribute("id"));if(e){a=b.firstChild;e=b;if((d=e.parentNode)&&11!=d.nodeType)if(e.removeNode)e.removeNode(l);else{for(;b=e.firstChild;)d.insertBefore(b,e);jb(e)}b=a}return b}p.insertNode=function(a,b){var c=Qd(this.a.duplicate(),a,b);this.z();return c}; | |
p.V=function(a,b){var c=this.a.duplicate(),d=this.a.duplicate();Qd(c,a,j);Qd(d,b,l);this.z()};p.collapse=function(a){this.a.collapse(a);a?(this.c=this.d,this.f=this.h):(this.d=this.c,this.h=this.f)};function Rd(a){this.a=a}w(Rd,V);Rd.prototype.aa=function(a){a.collapse(this.b(),this.k());(this.i()!=this.b()||this.l()!=this.k())&&a.extend(this.i(),this.l());0==a.rangeCount&&a.addRange(this.a)};function Sd(a){this.a=a}w(Sd,V);Sd.prototype.o=function(a,b,c){return Da("528")?Sd.ba.o.call(this,a,b,c):this.a.compareBoundaryPoints(1==c?1==b?q.Range.START_TO_START:q.Range.END_TO_START:1==b?q.Range.START_TO_END:q.Range.END_TO_END,a)};Sd.prototype.aa=function(a,b){a.removeAllRanges();b?a.setBaseAndExtent(this.i(),this.l(),this.b(),this.k()):a.setBaseAndExtent(this.b(),this.k(),this.i(),this.l())};function Td(a){return!Fa(9)?new Kd(a,I(a.parentElement())):new V(a)} | |
function Bd(a){if(Fa(9)){var b=I(a).createRange();if(a.nodeType==G)b.setStart(a,0),b.setEnd(a,a.length);else if(W(a)){for(var c,d=a;(c=d.firstChild)&&W(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&W(c);)d=c;b.setEnd(d,1==d.nodeType?d.childNodes.length:d.length)}else c=a.parentNode,a=D(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);a=new V(b)}else{c=new Kd(Md(a));if(W(a)){for(d=a;(b=d.firstChild)&&W(b);)d=b;c.d=d;c.h=0;for(d=a;(b=d.lastChild)&&W(b);)d=b;c.c=d;c.f=1==d.nodeType?d.childNodes.length: | |
d.length;c.F=a}else c.d=c.c=c.F=a.parentNode,c.h=D(c.F.childNodes,a),c.f=c.h+1;a=c}return a}function W(a){var b;a:if(1!=a.nodeType)b=l;else{switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "STYLE":b=l;break a}b=j}return b||a.nodeType==G};function Hd(){}w(Hd,xd);function Ad(a,b){var c=new Hd;c.P=a;c.L=!!b;return c}p=Hd.prototype;p.P=k;p.d=k;p.h=k;p.c=k;p.f=k;p.L=l;p.la=aa("text");p.Z=function(){return X(this).a};p.z=function(){this.d=this.h=this.c=this.f=k};p.J=aa(1);p.D=function(){return this}; | |
function X(a){var b;if(!(b=a.P)){b=a.b();var c=a.k(),d=a.i(),e=a.l();if(Fa(9)){var f=I(b).createRange();f.setStart(b,c);f.setEnd(d,e);b=new V(f)}else{var h=b,m=c,o=d,f=e,A=l;1==h.nodeType&&(m>h.childNodes.length&&Ld.log(pd,"Cannot have startOffset > startNode child count",i),m=h.childNodes[m],A=!m,h=m||h.lastChild||h,m=0);var x=Md(h);m&&x.move("character",m);h==o&&m==f?x.collapse(j):(A&&x.collapse(l),A=l,1==o.nodeType&&(f>o.childNodes.length&&Ld.log(pd,"Cannot have endOffset > endNode child count", | |
i),o=(m=o.childNodes[f])||o.lastChild||o,f=0,A=!m),h=Md(o),h.collapse(!A),f&&h.moveEnd("character",f),x.setEndPoint("EndToEnd",h));f=new Kd(x);f.d=b;f.h=c;f.c=d;f.f=e;b=f}b=a.P=b}return b}p.C=function(){return X(this).C()};p.b=function(){return this.d||(this.d=X(this).b())};p.k=function(){return this.h!=k?this.h:this.h=X(this).k()};p.i=function(){return this.c||(this.c=X(this).i())};p.l=function(){return this.f!=k?this.f:this.f=X(this).l()};p.K=n("L"); | |
p.B=function(a,b){var c=a.la();return"text"==c?X(this).B(X(a),b):"control"==c?(c=Ud(a),(b?Ta:Ua)(c,function(a){return this.containsNode(a,b)},this)):l};p.isCollapsed=function(){return X(this).isCollapsed()};p.w=function(){return new Ed(this.b(),this.k(),this.i(),this.l())};p.select=function(){X(this).select(this.L)};p.insertNode=function(a,b){var c=X(this).insertNode(a,b);this.z();return c};p.V=function(a,b){X(this).V(a,b);this.z()};p.oa=function(){return new Vd(this)}; | |
p.collapse=function(a){a=this.K()?!a:a;this.P&&this.P.collapse(a);a?(this.c=this.d,this.f=this.h):(this.d=this.c,this.h=this.f);this.L=l};function Vd(a){a.K()?a.i():a.b();a.K()?a.l():a.k();a.K()?a.b():a.i();a.K()?a.k():a.l()}w(Vd,wd);function Wd(){}w(Wd,Dd);p=Wd.prototype;p.a=k;p.p=k;p.U=k;p.z=function(){this.U=this.p=k};p.la=aa("control");p.Z=function(){return this.a||document.body.createControlRange()};p.J=function(){return this.a?this.a.length:0};p.D=function(a){a=this.a.item(a);return Ad(Bd(a),i)};p.C=function(){return nb.apply(k,Ud(this))};p.b=function(){return Xd(this)[0]};p.k=aa(0);p.i=function(){var a=Xd(this),b=z(a);return Va(a,function(a){return J(a,b)})};p.l=function(){return this.i().childNodes.length}; | |
function Ud(a){if(!a.p&&(a.p=[],a.a))for(var b=0;b<a.a.length;b++)a.p.push(a.a.item(b));return a.p}function Xd(a){a.U||(a.U=Ud(a).concat(),a.U.sort(function(a,c){return a.sourceIndex-c.sourceIndex}));return a.U}p.isCollapsed=function(){return!this.a||!this.a.length};p.w=function(){return new Yd(this)};p.select=function(){this.a&&this.a.select()};p.oa=function(){return new Zd(this)};p.collapse=function(){this.a=k;this.z()};function Zd(a){this.p=Ud(a)}w(Zd,wd); | |
function Yd(a){a&&(this.p=Xd(a),this.d=this.p.shift(),this.c=z(this.p)||this.d);Cd.call(this,this.d,l)}w(Yd,Cd);p=Yd.prototype;p.d=k;p.c=k;p.p=k;p.b=n("d");p.i=n("c");p.R=function(){return!this.depth&&!this.p.length};p.next=function(){this.R()&&g(M);if(!this.depth){var a=this.p.shift();Bb(this,a,1,1);return a}return Yd.ba.next.call(this)};function $d(){this.A=[];this.T=[];this.X=this.O=k}w($d,Dd);p=$d.prototype;p.Ma=vd("goog.dom.MultiRange");p.z=function(){this.T=[];this.X=this.O=k};p.la=aa("mutli");p.Z=function(){1<this.A.length&&this.Ma.log(qd,"getBrowserRangeObject called on MultiRange with more than 1 range",i);return this.A[0]};p.J=function(){return this.A.length};p.D=function(a){this.T[a]||(this.T[a]=Ad(Td(this.A[a]),i));return this.T[a]}; | |
p.C=function(){if(!this.X){for(var a=[],b=0,c=this.J();b<c;b++)a.push(this.D(b).C());this.X=nb.apply(k,a)}return this.X};function ae(a){a.O||(a.O=zd(a),a.O.sort(function(a,c){var d=a.b(),e=a.k(),f=c.b(),h=c.k();return d==f&&e==h?0:Id(d,e,f,h)?1:-1}));return a.O}p.b=function(){return ae(this)[0].b()};p.k=function(){return ae(this)[0].k()};p.i=function(){return z(ae(this)).i()};p.l=function(){return z(ae(this)).l()};p.isCollapsed=function(){return 0==this.A.length||1==this.A.length&&this.D(0).isCollapsed()}; | |
p.w=function(){return new be(this)};p.select=function(){var a=yd(this.za());a.removeAllRanges();for(var b=0,c=this.J();b<c;b++)a.addRange(this.D(b).Z())};p.oa=function(){return new ce(this)};p.collapse=function(a){if(!this.isCollapsed()){var b=a?this.D(0):this.D(this.J()-1);this.z();b.collapse(a);this.T=[b];this.O=[b];this.A=[b.Z()]}};function ce(a){Sa(zd(a),function(a){return a.oa()})}w(ce,wd);function be(a){a&&(this.M=Sa(ae(a),function(a){return zb(a)}));Cd.call(this,a?this.b():k,l)}w(be,Cd); | |
p=be.prototype;p.M=k;p.Y=0;p.b=function(){return this.M[0].b()};p.i=function(){return z(this.M).i()};p.R=function(){return this.M[this.Y].R()};p.next=function(){try{var a=this.M[this.Y],b=a.next();Bb(this,a.u,a.v,a.depth);return b}catch(c){return(c!==M||this.M.length-1==this.Y)&&g(c),this.Y++,this.next()}};function Gd(a){var b,c=l;if(a.createRange)try{b=a.createRange()}catch(d){return k}else if(a.rangeCount){if(1<a.rangeCount){b=new $d;for(var c=0,e=a.rangeCount;c<e;c++)b.A.push(a.getRangeAt(c));return b}b=a.getRangeAt(0);c=Id(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)}else return k;b&&b.addElement?(a=new Wd,a.a=b):a=Ad(Td(b),c);return a} | |
function Id(a,b,c,d){if(a==c)return d<b;var e;if(1==a.nodeType&&b)if(e=a.childNodes[b])a=e,b=0;else if(J(a,c))return j;if(1==c.nodeType&&d)if(e=c.childNodes[d])c=e,d=0;else if(J(c,a))return l;return 0<(kb(a,c)||b-d)};function de(){P.call(this);this.qa=k;this.I=new F(0,0);this.Ba=l}w(de,P);var Y={};xb?(Y[tc]=[0,0,0,k],Y[uc]=[k,k,0,k],Y[yc]=[1,4,2,k],Y[S]=[0,0,0,0],Y[xc]=[1,4,2,0]):wb?(Y[tc]=[0,1,2,k],Y[uc]=[k,k,2,k],Y[yc]=[0,1,2,k],Y[S]=[0,1,2,0],Y[xc]=[0,1,2,0]):(Y[tc]=[0,1,2,k],Y[uc]=[k,k,2,k],Y[yc]=[0,1,2,k],Y[S]=[0,0,0,0],Y[xc]=[0,0,0,0]);Y[vc]=Y[tc];Y[wc]=Y[yc];Y[oc]=Y[S]; | |
de.prototype.move=function(a,b){var c=Hb(a);this.I.x=b.x+c.x;this.I.y=b.y+c.y;c=this.j();if(a!=c){try{gb(I(c)).closed&&(c=k)}catch(d){c=k}if(c){var e=c===Ga.document.documentElement||c===Ga.document.body,c=!this.Ba&&e?k:c;ee(this,S,a)}ec(this,a);ee(this,oc,c)}ee(this,xc)}; | |
function ee(a,b,c){a.Ba=j;var d=a.I,e;if(b in Y){e=Y[b][a.qa===k?3:a.qa];e===k&&g(new y(13,"Event does not permit the specified mouse button."))}else e=0;if(Yb(a.t,j)&&Rb(a.t)){c&&!(oc==b||S==b)&&g(new y(12,"Event type does not allow related target: "+b));c={clientX:d.x,clientY:d.y,button:e,altKey:l,ctrlKey:l,shiftKey:l,metaKey:l,wheelDelta:0,relatedTarget:c||k};if(a.N)b:switch(b){case oc:a=k;break b;case uc:case xc:a=a.N.multiple?a.N:k;break b;default:a=a.N}else a=a.t;a&&ic(a,b,c)}};function fe(){P.call(this);this.I=new F(0,0);this.ha=new F(0,0)}w(fe,P);fe.prototype.Ga=0;fe.prototype.Fa=0;fe.prototype.move=function(a,b,c){this.n()||ec(this,a);a=Hb(a);this.I.x=b.x+a.x;this.I.y=b.y+a.y;s(c)&&(this.ha.x=c.x+a.x,this.ha.y=c.y+a.y);if(this.n()){b=hc;this.n()||g(new y(13,"Should never fire event when touchscreen is not pressed."));var d,e;this.Fa&&(d=this.Fa,e=this.ha);fc(this,b,this.Ga,this.I,d,e)}};fe.prototype.n=function(){return!!this.Ga};var ge={ra:function(a){return!(!a.querySelectorAll||!a.querySelector)},G:function(a,b){a||g(Error("No class name specified"));a=ha(a);1<a.split(/\s+/).length&&g(Error("Compound class names not permitted"));if(ge.ra(b))return b.querySelector("."+a.replace(/\./g,"\\."))||k;var c=K(H(b),"*",a,b);return c.length?c[0]:k},r:function(a,b){a||g(Error("No class name specified"));a=ha(a);1<a.split(/\s+/).length&&g(Error("Compound class names not permitted"));return ge.ra(b)?b.querySelectorAll("."+a.replace(/\./g, | |
"\\.")):K(H(b),"*",a,b)}};var he={G:function(a,b){!u(b.querySelector)&&vb()&&!v(b.querySelector)&&g(Error("CSS selection is not supported"));a||g(Error("No selector specified"));he.ta(a)&&g(Error("Compound selectors not permitted"));var a=ha(a),c=b.querySelector(a);return c&&1==c.nodeType?c:k},r:function(a,b){!u(b.querySelectorAll)&&vb()&&!v(b.querySelector)&&g(Error("CSS selection is not supported"));a||g(Error("No selector specified"));he.ta(a)&&g(Error("Compound selectors not permitted"));a=ha(a);return b.querySelectorAll(a)}, | |
ta:function(a){return 1<a.split(/(,)(?=(?:[^']|'[^']*')*$)/).length&&1<a.split(/(,)(?=(?:[^"]|"[^"]*")*$)/).length}};var Z={},ie={};Z.Ea=function(a,b,c){var d;try{d=he.r("a",b)}catch(e){d=K(H(b),"A",k,b)}return Va(d,function(b){b=ac(b);return c&&-1!=b.indexOf(a)||b==a})};Z.Ca=function(a,b,c){var d;try{d=he.r("a",b)}catch(e){d=K(H(b),"A",k,b)}return Ra(d,function(b){b=ac(b);return c&&-1!=b.indexOf(a)||b==a})};Z.G=function(a,b){return Z.Ea(a,b,l)};Z.r=function(a,b){return Z.Ca(a,b,l)};ie.G=function(a,b){return Z.Ea(a,b,j)};ie.r=function(a,b){return Z.Ca(a,b,j)};var je={G:function(a,b){return b.getElementsByTagName(a)[0]||k},r:function(a,b){return b.getElementsByTagName(a)}};var ke={className:ge,"class name":ge,css:he,"css selector":he,id:{G:function(a,b){var c=H(b),d=c.j(a);if(!d)return k;if(Pb(d,"id")==a&&J(b,d))return d;c=K(c,"*");return Va(c,function(c){return Pb(c,"id")==a&&J(b,c)})},r:function(a,b){var c=K(H(b),"*",k,b);return Ra(c,function(b){return Pb(b,"id")==a})}},linkText:Z,"link text":Z,name:{G:function(a,b){var c=K(H(b),"*",k,b);return Va(c,function(b){return Pb(b,"name")==a})},r:function(a,b){var c=K(H(b),"*",k,b);return Ra(c,function(b){return Pb(b,"name")== | |
a})}},partialLinkText:ie,"partial link text":ie,tagName:je,"tag name":je,xpath:L};function mc(a,b){var c;a:{for(c in a)if(a.hasOwnProperty(c))break a;c=k}if(c){var d=ke[c];if(d&&u(d.r))return d.r(a[c],b||Ga.document)}g(Error("Unsupported locator strategy: "+c))};function le(a,b){this.x=a;this.y=b}w(le,F);le.prototype.scale=function(a){this.x*=a;this.y*=a;return this};le.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function me(a,b,c){function d(a){t(a)?E(a.split(""),function(a){1!=a.length&&g(new y(13,"Argument not a single character: "+a));var b=Qc[a];b||(b=a.toUpperCase(),b=T(b.charCodeAt(0),a.toLowerCase(),b),b={key:b,shift:a!=b.H});a=b;a.shift&&cd(e,Uc);cd(e,a.key);gd(e,a.key);a.shift&&gd(e,Uc)}):0<=D(bd,a)?e.n(a)?gd(e,a):cd(e,a):(cd(e,a),gd(e,a))}Yb(a,j)||g(new y(11,"Element is not currently visible and may not be manipulated"));(!Yb(a,j)||!Rb(a))&&g(new y(12,"Element is not currently interactable and may not be manipulated")); | |
var e=c||new Pc;hd(e,a);"array"==r(b)?E(b,d):d(b);E(bd,function(a){e.n(a)&&gd(e,a)})}function ne(){P.call(this)}w(ne,P);(function(a){a.Ra=function(){return a.La||(a.La=new a)}})(ne);function pe(a,b,c){var d;c?d=c:document.__webdriver_keyboard?d=document.__webdriver_keyboard:(d=new Pc,document.__webdriver_keyboard=d);Ya(arguments,2);var e=Za(values);me(a,e,d)}var qe=["_"],$=q;!(qe[0]in $)&&$.execScript&&$.execScript("var "+qe[0]);for(var re;qe.length&&(re=qe.shift());)!qe.length&&s(pe)?$[re]=pe:$=$[re]?$[re]:$[re]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);} | |
sendKeys(document.getElementsByName('q')[0], ['hello']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment