UNPKG

appium-remote-debugger

Version:
71 lines (65 loc) 27.5 kB
function(){return (function(){var h=this||self;function k(a){return"string"==typeof a}function aa(a,b){a=a.split(".");var c=h;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b} 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 ca(a,b,c){return a.call.apply(a.bind,arguments)}function da(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}} function l(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l=ca:l=da;return l.apply(null,arguments)}function ea(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function m(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};/* The MIT License Copyright (c) 2007 Cybozu Labs, Inc. Copyright (c) 2012 Google Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function p(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var fa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return"string"!==typeof 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},q=Array.prototype.forEach?function(a,b){Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)},r=Array.prototype.reduce?function(a,b,c){return Array.prototype.reduce.call(a, b,c)}:function(a,b,c){var d=c;q(a,function(e,f){d=b.call(void 0,d,e,f,a)});return d},t=Array.prototype.some?function(a,b){return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1};function ha(a){return Array.prototype.concat.apply([],arguments)}function ia(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var u;a:{var ja=h.navigator;if(ja){var ka=ja.userAgent;if(ka){u=ka;break a}}u=""}function v(a){return-1!=u.indexOf(a)};function la(){return v("Firefox")||v("FxiOS")}function ma(){return(v("Chrome")||v("CriOS"))&&!v("Edge")};function w(){return v("iPhone")&&!v("iPod")&&!v("iPad")};function na(a){this.b=a;this.a=0}function oa(a){a=a.match(pa);for(var b=0;b<a.length;b++)qa.test(a[b])&&a.splice(b,1);return new na(a)}var pa=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,qa=/^\s/;function y(a,b){return a.b[a.a+(b||0)]}function z(a){return a.b[a.a++]}function ra(a){return a.b.length<=a.a};function sa(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} function ta(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?ua(a,b):!c&&sa(e,b)?-1*va(a,b):!d&&sa(f,a)?va(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(!0); a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(h.Range.START_TO_END,a)}function va(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return ua(b,a)}function ua(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1};function A(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;c=0;var d=[];for(b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return b} function B(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function D(a,b,c,d,e){return wa.call(null,a,b,k(c)?c:null,k(d)?d:null,e||new E)} function wa(a,b,c,d,e){b.getElementsByName&&d&&"name"==c?(b=b.getElementsByName(d),q(b,function(f){a.a(f)&&e.add(f)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(f){f.className==d&&a.a(f)&&e.add(f)})):a instanceof F?xa(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),q(b,function(f){B(f,c,d)&&e.add(f)}));return e}function xa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)B(b,c,d)&&a.a(b)&&e.add(b),xa(a,b,c,d,e)};function E(){this.b=this.a=null;this.l=0}function ya(a){this.f=a;this.a=this.b=null}function za(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;)c.f==b.f?(e=c,c=c.a,b=b.a):0<ta(c.f,b.f)?(e=b,b=b.a):(e=c,c=c.a),(e.b=d)?d.a=e:a.a=e,d=e,f++;for(e=c||b;e;)e.b=d,d=d.a=e,f++,e=e.a;a.b=d;a.l=f;return a}function Aa(a,b){b=new ya(b);b.a=a.a;a.b?a.a.b=b:a.a=a.b=b;a.a=b;a.l++}E.prototype.add=function(a){a=new ya(a);a.b=this.b;this.a?this.b.a=a:this.a=this.b=a;this.b=a;this.l++}; function Ba(a){return(a=a.a)?a.f:null}function Ca(a){return(a=Ba(a))?A(a):""}function G(a,b){return new Da(a,!!b)}function Da(a,b){this.f=a;this.b=(this.s=b)?a.b:a.a;this.a=null}function H(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.s?b.b:b.a;return c.f};function I(a){this.i=a;this.b=this.g=!1;this.f=null}function J(a){return"\n "+a.toString().split("\n").join("\n ")}function Ea(a,b){a.g=b}function Fa(a,b){a.b=b}function K(a,b){a=a.a(b);return a instanceof E?+Ca(a):+a}function L(a,b){a=a.a(b);return a instanceof E?Ca(a):""+a}function M(a,b){a=a.a(b);return a instanceof E?!!a.l:!!a};function N(a,b,c){I.call(this,a.i);this.c=a;this.h=b;this.o=c;this.g=b.g||c.g;this.b=b.b||c.b;this.c==Ga&&(c.b||c.g||4==c.i||0==c.i||!b.f?b.b||b.g||4==b.i||0==b.i||!c.f||(this.f={name:c.f.name,u:b}):this.f={name:b.f.name,u:c})}m(N,I); function P(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof E&&c instanceof E){b=G(b);for(d=H(b);d;d=H(b))for(e=G(c),f=H(e);f;f=H(e))if(a(A(d),A(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?(e=b,d=c):(e=c,d=b);f=G(e);for(var g=typeof d,n=H(f);n;n=H(f)){switch(g){case "number":n=+A(n);break;case "boolean":n=!!A(n);break;case "string":n=A(n);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(n,d)||e==c&&a(d,n))return!0}return!1}return e?"boolean"== typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}N.prototype.a=function(a){return this.c.m(this.h,this.o,a)};N.prototype.toString=function(){var a="Binary Expression: "+this.c;a+=J(this.h);return a+=J(this.o)};function Ha(a,b,c,d){this.I=a;this.D=b;this.i=c;this.m=d}Ha.prototype.toString=function(){return this.I};var Ia={}; function Q(a,b,c,d){if(Ia.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Ha(a,b,c,d);return Ia[a.toString()]=a}Q("div",6,1,function(a,b,c){return K(a,c)/K(b,c)});Q("mod",6,1,function(a,b,c){return K(a,c)%K(b,c)});Q("*",6,1,function(a,b,c){return K(a,c)*K(b,c)});Q("+",5,1,function(a,b,c){return K(a,c)+K(b,c)});Q("-",5,1,function(a,b,c){return K(a,c)-K(b,c)});Q("<",4,2,function(a,b,c){return P(function(d,e){return d<e},a,b,c)}); Q(">",4,2,function(a,b,c){return P(function(d,e){return d>e},a,b,c)});Q("<=",4,2,function(a,b,c){return P(function(d,e){return d<=e},a,b,c)});Q(">=",4,2,function(a,b,c){return P(function(d,e){return d>=e},a,b,c)});var Ga=Q("=",3,2,function(a,b,c){return P(function(d,e){return d==e},a,b,c,!0)});Q("!=",3,2,function(a,b,c){return P(function(d,e){return d!=e},a,b,c,!0)});Q("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});Q("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function Ja(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");I.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}m(Ja,I);Ja.prototype.a=function(a){a=this.c.a(a);return Ka(this.h,a)};Ja.prototype.toString=function(){var a="Filter:"+J(this.c);return a+=J(this.h)};function La(a,b){if(b.length<a.C)throw Error("Function "+a.j+" expects at least"+a.C+" arguments, "+b.length+" given");if(null!==a.B&&b.length>a.B)throw Error("Function "+a.j+" expects at most "+a.B+" arguments, "+b.length+" given");a.H&&q(b,function(c,d){if(4!=c.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+c);});I.call(this,a.i);this.v=a;this.c=b;Ea(this,a.g||t(b,function(c){return c.g}));Fa(this,a.G&&!b.length||a.F&&!!b.length||t(b,function(c){return c.b}))}m(La,I); La.prototype.a=function(a){return this.v.m.apply(null,ha(a,this.c))};La.prototype.toString=function(){var a="Function: "+this.v;if(this.c.length){var b=r(this.c,function(c,d){return c+J(d)},"Arguments:");a+=J(b)}return a};function Ma(a,b,c,d,e,f,g,n){this.j=a;this.i=b;this.g=c;this.G=d;this.F=!1;this.m=e;this.C=f;this.B=void 0!==g?g:f;this.H=!!n}Ma.prototype.toString=function(){return this.j};var Na={}; function R(a,b,c,d,e,f,g,n){if(Na.hasOwnProperty(a))throw Error("Function already created: "+a+".");Na[a]=new Ma(a,b,c,d,e,f,g,n)}R("boolean",2,!1,!1,function(a,b){return M(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);R("concat",3,!1,!1,function(a,b){return r(ia(arguments,1),function(c,d){return c+L(d,a)},"")},2,null);R("contains",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return-1!=b.indexOf(a)},2);R("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0); R("false",2,!1,!1,function(){return!1},0);R("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);R("id",4,!1,!1,function(a,b){var c=a.a,d=9==c.nodeType?c:c.ownerDocument;a=L(b,a).split(/\s+/);var e=[];q(a,function(g){g=d.getElementById(g);!g||0<=fa(e,g)||e.push(g)});e.sort(ta);var f=new E;q(e,function(g){f.add(g)});return f},1);R("lang",2,!1,!1,function(){return!1},1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0); R("local-name",3,!1,!0,function(a,b){return(a=b?Ba(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){return(a=b?Ba(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,function(){return""},0,1,!0);R("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):A(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!M(b,a)},1);R("number",1,!1,!0,function(a,b){return b?K(b,a):+A(a.a)},0,1); R("position",1,!0,!1,function(a){return a.b},0);R("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?L(b,a):A(a.a)},0,1);R("string-length",1,!1,!0,function(a,b){return(b?L(b,a):A(a.a)).length},0,1); R("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); R("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){a=G(b.a(a));b=0;for(var c=H(a);c;c=H(a))b+=+A(c);return b},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);R("true",2,!1,!1,function(){return!0},0);function F(a,b){this.h=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function Oa(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}F.prototype.a=function(a){return null===this.b||this.b==a.nodeType};F.prototype.f=function(){return this.h}; F.prototype.toString=function(){var a="Kind Test: "+this.h;null===this.c||(a+=J(this.c));return a};function Pa(a){I.call(this,3);this.c=a.substring(1,a.length-1)}m(Pa,I);Pa.prototype.a=function(){return this.c};Pa.prototype.toString=function(){return"Literal: "+this.c};function S(a,b){this.j=a.toLowerCase();a="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.b=b?b.toLowerCase():a}S.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.b?!0:this.b==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};S.prototype.f=function(){return this.j}; S.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.b?"":this.b+":")+this.j};function Qa(a){I.call(this,1);this.c=a}m(Qa,I);Qa.prototype.a=function(){return this.c};Qa.prototype.toString=function(){return"Number: "+this.c};function Ra(a,b){I.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;1==this.c.length&&(a=this.c[0],a.A||a.c!=Sa||(a=a.o,"*"!=a.f()&&(this.f={name:a.f(),u:null})))}m(Ra,I);function T(){I.call(this,4)}m(T,I);T.prototype.a=function(a){var b=new E;a=a.a;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};T.prototype.toString=function(){return"Root Helper Expression"};function Ta(){I.call(this,4)}m(Ta,I);Ta.prototype.a=function(a){var b=new E;b.add(a.a);return b};Ta.prototype.toString=function(){return"Context Helper Expression"}; function Ua(a){return"/"==a||"//"==a}Ra.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.l;c++){var e=a[c],f=G(b,e.c.s);if(e.g||e.c!=Va)if(e.g||e.c!=Wa){var g=H(f);for(b=e.a(new p(g));null!=(g=H(f));)g=e.a(new p(g)),b=za(b,g)}else g=H(f),b=e.a(new p(g));else{for(g=H(f);(b=H(f))&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new p(g))}}return b}; Ra.prototype.toString=function(){var a="Path Expression:"+J(this.h);if(this.c.length){var b=r(this.c,function(c,d){return c+J(d)},"Steps:");a+=J(b)}return a};function Xa(a,b){this.a=a;this.s=!!b} function Ka(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=G(b),f=b.l,g,n=0;g=H(e);n++){var x=a.s?f-n:n+1;g=d.a(new p(g,x,f));if("number"==typeof g)x=x==g;else if("string"==typeof g||"boolean"==typeof g)x=!!g;else if(g instanceof E)x=0<g.l;else throw Error("Predicate.evaluate returned an unexpected type.");if(!x){x=e;g=x.f;var C=x.a;if(!C)throw Error("Next must be called at least once before remove.");var O=C.b;C=C.a;O?O.a=C:g.a=C;C?C.b=O:g.b=O;g.l--;x.a=null}}return b} Xa.prototype.toString=function(){return r(this.a,function(a,b){return a+J(b)},"Predicates:")};function U(a,b,c,d){I.call(this,4);this.c=a;this.o=b;this.h=c||new Xa([]);this.A=!!d;b=this.h;b=0<b.a.length?b.a[0].f:null;a.J&&b&&(this.f={name:b.name,u:b.u});a:{a=this.h;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.g||1==c.i||0==c.i){a=!0;break a}a=!1}this.g=a}m(U,I); U.prototype.a=function(a){var b=a.a,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.u?L(c.u,a):null,f=1);if(this.A)if(this.g||this.c!=Ya)if(b=G((new U(Za,new F("node"))).a(a)),c=H(b))for(a=this.m(c,d,e,f);null!=(c=H(b));)a=za(a,this.m(c,d,e,f));else a=new E;else a=D(this.o,b,d,e),a=Ka(this.h,a,f);else a=this.m(a.a,d,e,f);return a};U.prototype.m=function(a,b,c,d){a=this.c.v(this.o,a,b,c);return a=Ka(this.h,a,d)}; U.prototype.toString=function(){var a="Step:"+J("Operator: "+(this.A?"//":"/"));this.c.j&&(a+=J("Axis: "+this.c));a+=J(this.o);if(this.h.a.length){var b=r(this.h.a,function(c,d){return c+J(d)},"Predicates:");a+=J(b)}return a};function $a(a,b,c,d){this.j=a;this.v=b;this.s=c;this.J=d}$a.prototype.toString=function(){return this.j};var ab={};function V(a,b,c,d){if(ab.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new $a(a,b,c,!!d);return ab[a]=b} V("ancestor",function(a,b){for(var c=new E;b=b.parentNode;)a.a(b)&&Aa(c,b);return c},!0);V("ancestor-or-self",function(a,b){var c=new E;do a.a(b)&&Aa(c,b);while(b=b.parentNode);return c},!0); var Sa=V("attribute",function(a,b){var c=new E,d=a.f();if(b=b.attributes)if(a instanceof F&&null===a.b||"*"==d)for(a=0;d=b[a];a++)c.add(d);else(d=b.getNamedItem(d))&&c.add(d);return c},!1),Ya=V("child",function(a,b,c,d,e){c=k(c)?c:null;d=k(d)?d:null;e=e||new E;for(b=b.firstChild;b;b=b.nextSibling)B(b,c,d)&&a.a(b)&&e.add(b);return e},!1,!0);V("descendant",D,!1,!0); var Za=V("descendant-or-self",function(a,b,c,d){var e=new E;B(b,c,d)&&a.a(b)&&e.add(b);return D(a,b,c,d,e)},!1,!0),Va=V("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)B(f,c,d)&&a.a(f)&&e.add(f),e=D(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);V("following-sibling",function(a,b){for(var c=new E;b=b.nextSibling;)a.a(b)&&c.add(b);return c},!1);V("namespace",function(){return new E},!1); var bb=V("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;b=b.parentNode;a.a(b)&&c.add(b);return c},!1),Wa=V("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,n=f.length;g<n;g++){var x=[];for(b=f[g];b=b.previousSibling;)x.unshift(b);for(var C=0,O=x.length;C<O;C++)b=x[C],B(b,c,d)&&a.a(b)&&e.add(b),e=D(a,b,c,d,e)}return e},!0,!0); V("preceding-sibling",function(a,b){for(var c=new E;b=b.previousSibling;)a.a(b)&&Aa(c,b);return c},!0);var cb=V("self",function(a,b){var c=new E;a.a(b)&&c.add(b);return c},!1);function db(a){I.call(this,1);this.c=a;this.g=a.g;this.b=a.b}m(db,I);db.prototype.a=function(a){return-K(this.c,a)};db.prototype.toString=function(){return"Unary Expression: -"+J(this.c)};function eb(a){I.call(this,4);this.c=a;Ea(this,t(this.c,function(b){return b.g}));Fa(this,t(this.c,function(b){return b.b}))}m(eb,I);eb.prototype.a=function(a){var b=new E;q(this.c,function(c){c=c.a(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=za(b,c)});return b};eb.prototype.toString=function(){return r(this.c,function(a,b){return a+J(b)},"Union Expression:")};function fb(a,b){this.a=a;this.b=b}function gb(a){for(var b,c=[];;){W(a,"Missing right hand side of binary expression.");b=hb(a);var d=z(a.a);if(!d)break;var e=(d=Ia[d]||null)&&d.D;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].D;)b=new N(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new N(c.pop(),c.pop(),b);return b}function W(a,b){if(ra(a.a))throw Error(b);}function ib(a,b){a=z(a.a);if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);} function jb(a){a=z(a.a);if(")"!=a)throw Error("Bad token: "+a);}function kb(a){a=z(a.a);if(2>a.length)throw Error("Unclosed literal string");return new Pa(a)} function lb(a){var b=[];if(Ua(y(a.a))){var c=z(a.a);var d=y(a.a);if("/"==c&&(ra(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new T;d=new T;W(a,"Missing next location step.");c=mb(a,c);b.push(c)}else{a:{c=y(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":z(a.a);c=gb(a);W(a,'unclosed "("');ib(a,")");break;case '"':case "'":c=kb(a);break;default:if(isNaN(+c))if(!Oa(c)&&/(?![0-9])[\w]/.test(d)&&"("==y(a.a,1)){c=z(a.a); c=Na[c]||null;z(a.a);for(d=[];")"!=y(a.a);){W(a,"Missing function argument list.");d.push(gb(a));if(","!=y(a.a))break;z(a.a)}W(a,"Unclosed function argument list.");jb(a);c=new La(c,d)}else{c=null;break a}else c=new Qa(+z(a.a))}"["==y(a.a)&&(d=new Xa(nb(a)),c=new Ja(c,d))}if(c)if(Ua(y(a.a)))d=c;else return c;else c=mb(a,"/"),d=new Ta,b.push(c)}for(;Ua(y(a.a));)c=z(a.a),W(a,"Missing next location step."),c=mb(a,c),b.push(c);return new Ra(d,b)} function mb(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==y(a.a)){var c=new U(cb,new F("node"));z(a.a);return c}if(".."==y(a.a))return c=new U(bb,new F("node")),z(a.a),c;if("@"==y(a.a)){var d=Sa;z(a.a);W(a,"Missing attribute name")}else if("::"==y(a.a,1)){if(!/(?![0-9])[\w]/.test(y(a.a).charAt(0)))throw Error("Bad token: "+z(a.a));var e=z(a.a);d=ab[e]||null;if(!d)throw Error("No axis with name: "+e);z(a.a);W(a,"Missing node name")}else d=Ya;e=y(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("== y(a.a,1)){if(!Oa(e))throw Error("Invalid node type: "+e);e=z(a.a);if(!Oa(e))throw Error("Invalid type name: "+e);ib(a,"(");W(a,"Bad nodetype");var f=y(a.a).charAt(0),g=null;if('"'==f||"'"==f)g=kb(a);W(a,"Bad nodetype");jb(a);e=new F(e,g)}else if(e=z(a.a),f=e.indexOf(":"),-1==f)e=new S(e);else{g=e.substring(0,f);if("*"==g)var n="*";else if(n=a.b(g),!n)throw Error("Namespace prefix not declared: "+g);e=e.substr(f+1);e=new S(e,n)}else throw Error("Bad token: "+z(a.a));a=new Xa(nb(a),d.s);return c||new U(d, e,a,"//"==b)}function nb(a){for(var b=[];"["==y(a.a);){z(a.a);W(a,"Missing predicate expression.");var c=gb(a);b.push(c);W(a,"Unclosed predicate expression.");ib(a,"]")}return b}function hb(a){if("-"==y(a.a))return z(a.a),new db(hb(a));var b=lb(a);if("|"!=y(a.a))a=b;else{for(b=[b];"|"==z(a.a);)W(a,"Missing next union location path."),b.push(lb(a));a.a.a--;a=new eb(b)}return a};function ob(a){switch(a.nodeType){case 1:return ea(pb,a);case 9:return ob(a.documentElement);case 11:case 10:case 6:case 12:return qb;default:return a.parentNode?ob(a.parentNode):qb}}function qb(){return null}function pb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?pb(a.parentNode,b):null};function rb(a,b){if(!a.length)throw Error("Empty XPath expression.");a=oa(a);if(ra(a))throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=l(b.lookupNamespaceURI,b)):b=function(){return null};var c=gb(new fb(a,b));if(!ra(a))throw Error("Bad token: "+z(a));this.evaluate=function(d,e){d=c.a(new p(d));return new X(d,e)}} function X(a,b){if(0==b)if(a instanceof E)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof E))throw Error("value could not be converted to the specified type");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof E?Ca(a):""+a;break;case 1:this.numberValue=a instanceof E?+Ca(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.l:!!a;break;case 4:case 5:case 6:case 7:var c= G(a);var d=[];for(var e=H(c);e;e=H(c))d.push(e);this.snapshotLength=a.l;this.invalidIteratorState=!1;break;case 8:case 9:this.singleNodeValue=Ba(a);break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=d.length?null:d[f++]};this.snapshotItem=function(g){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return g>=d.length||0>g?null:d[g]}}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;function sb(a){this.lookupNamespaceURI=ob(a)} function tb(a,b){a=a||h;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=X,c.evaluate=function(d,e,f,g){return(new rb(d,f)).evaluate(e,g)},c.createExpression=function(d,e){return new rb(d,e)},c.createNSResolver=function(d){return new sb(d)}}aa("wgxpath.install",tb);aa("wgxpath.install",tb);var ub=window;function vb(a,b){this.code=a;this.a=Y[a]||wb;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(c){return c.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}m(vb,Error);var wb="unknown error",Y={15:"element not selectable",11:"element not visible"};Y[31]=wb;Y[30]=wb;Y[24]="invalid cookie domain";Y[29]="invalid element coordinates";Y[12]="invalid element state"; Y[32]="invalid selector";Y[51]="invalid selector";Y[52]="invalid selector";Y[17]="javascript error";Y[405]="unsupported operation";Y[34]="move target out of bounds";Y[27]="no such alert";Y[7]="no such element";Y[8]="no such frame";Y[23]="no such window";Y[28]="script timeout";Y[33]="session not created";Y[10]="stale element reference";Y[21]="timeout";Y[25]="unable to set cookie";Y[26]="unexpected alert open";Y[13]=wb;Y[9]="unknown command";var xb=la(),yb=w()||v("iPod"),zb=v("iPad"),Ab=v("Android")&&!(ma()||la()||v("Opera")||v("Silk")),Bb=ma(),Cb=v("Safari")&&!(ma()||v("Coast")||v("Opera")||v("Edge")||v("Edg/")||v("OPR")||la()||v("Silk")||v("Android"))&&!(w()||v("iPad")||v("iPod"));function Z(a){return(a=a.exec(u))?a[1]:""}(function(){if(xb)return Z(/Firefox\/([0-9.]+)/);if(Bb)return w()||v("iPad")||v("iPod")?Z(/CriOS\/([0-9.]+)/):Z(/Chrome\/([0-9.]+)/);if(Cb&&!(w()||v("iPad")||v("iPod")))return Z(/Version\/([0-9.]+)/);if(yb||zb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(u);if(a)return a[1]+"."+a[2]}else if(Ab)return(a=Z(/Android\s+([0-9.]+)/))?a:Z(/Version\/([0-9.]+)/);return""})();function Db(){var a=ub.localStorage;this.a=a}Db.prototype.key=function(a){return this.a.key(a)};aa("se_exportedFunctionSymbol",function(a){if(null==(ub||ub).localStorage)throw new vb(13,"Local storage undefined");return(new Db).key(a)});; return this.se_exportedFunctionSymbol.apply(null,arguments);}).apply(window, arguments);}