Innovenergy_trunk/frontend/node_modules/testcafe/lib/client/automation/index.min.js

1 line
112 KiB
JavaScript

window["%hammerhead%"].utils.removeInjectedScript(),function tf(ef){var nf=ef.document;!function(m,e,g,i){var h="default"in m?m.default:m;e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var E="default"in g?g.default:g;i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;var n=h.nativeMethods,o=/^((mouse\w+)|((dbl)?click)|(contextmenu))$/,r=/^((drag\w*)|(drop))$/,s=/^key\w+$/,l=/^(before)?input$/,a=/^(blur|(focus(in|out)?))$/,u=/^pointer\w+/,c={click:1,dblclick:2,mousedown:1,mouseup:1},f="MouseEvent",d="PointerEvent",p="KeyboardEvent",v="InputEvent",y="FocusEvent",t=(b.prototype.run=function(){var t=this.options,e=t.bubbles,n=t.cancelable,i=t.detail,o=(t.view,t.buttons),e=!1!==e,n=!1!==n,i=i||c[this.eventName],o=void 0===o?1:o;Object.assign(this.options,{bubbles:e,cancelable:n,detail:i,view:ef,buttons:o});var r,s=b._getEventCtorByEventType(this.eventName,this.options.eventConstructor);s&&(r=new s(this.eventName,this.options),this.element.dispatchEvent(r))},b._getEventCtorByEventType=function(t,e){if(e&&"function"==typeof b._getEventCtorFromWindow(e)){var n=b._getEventCtorFromNativeMethods(e);if(n&&"function"==typeof n)return n}return o.test(t)||r.test(t)?b._getEventCtorFromNativeMethods(f):u.test(t)?b._getEventCtorFromNativeMethods(d):s.test(t)?b._getEventCtorFromNativeMethods(p):l.test(t)?b._getEventCtorFromNativeMethods(v):a.test(t)?b._getEventCtorFromNativeMethods(y):b._getEventCtorFromNativeMethods("CustomEvent")},b._getEventCtorFromNativeMethods=function(t){return n["Window"+t]||b._getEventCtorFromWindow(t)},b._getEventCtorFromWindow=function(t){return ef[t]},b);function b(t,e,n){this.element=t,this.eventName=e,this.options=n}var S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function _(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function w(t,s,l,a){return new(l=l||e)(function(n,e){function i(t){try{r(a.next(t))}catch(t){e(t)}}function o(t){try{r(a.throw(t))}catch(t){e(t)}}function r(t){var e;t.done?n(t.value):((e=t.value)instanceof l?e:new l(function(t){t(e)})).then(i,o)}r((a=a.apply(t,s||[])).next())})}function P(n,i){var o,r,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a&&e[a=0]&&(l=0),l;)try{if(o=1,r&&(s=2&e[0]?r.return:e[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,r=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){l.label=e[1];break}if(6===e[0]&&l.label<s[1]){l.label=s[1],s=e;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(e);break}s[2]&&l.ops.pop(),l.trys.pop();continue}e=i.call(n,l)}catch(t){e=[6,t],r=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var x=(C.create=function(t){return"left"in t?new C(t.left,t.top):"right"in t?new C(t.right,t.bottom):new C(t.x,t.y)},C.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},C.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},C.prototype.round=function(t){return void 0===t&&(t=Math.round),this.x=t(this.x),this.y=t(this.y),this},C.prototype.eql=function(t){return this.x===t.x&&this.y===t.y},C.prototype.mul=function(t){return this.x*=t,this.y*=t,this},C.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},C);function C(t,e){this.x=t,this.y=e}function A(t){var e="array"+t.charAt(0).toUpperCase()+t.slice(1),n=m.nativeMethods[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,t)}}A("filter"),A("map"),A("slice"),A("splice"),A("unshift"),A("forEach"),A("indexOf");var T=A("some"),M=(A("reverse"),A("reduce"),A("concat"),A("join"),h.utils.browser,h.nativeMethods),D=(h.utils.style.get,h.utils.dom.getActiveElement,h.utils.dom.findDocument),U=h.utils.dom.find,I=(h.utils.dom.isElementInDocument,h.utils.dom.isElementInIframe),O=h.utils.dom.getIframeByElement,k=(h.utils.dom.isCrossDomainWindows,h.utils.dom.getSelectParent,h.utils.dom.getChildVisibleIndex,h.utils.dom.getSelectVisibleChildren,h.utils.dom.isElementNode),N=(h.utils.dom.isTextNode,h.utils.dom.isRenderedNode,h.utils.dom.isIframeElement,h.utils.dom.isInputElement,h.utils.dom.isButtonElement,h.utils.dom.isFileInput,h.utils.dom.isTextAreaElement,h.utils.dom.isAnchorElement,h.utils.dom.isImgElement),B=(h.utils.dom.isFormElement,h.utils.dom.isLabelElement,h.utils.dom.isSelectElement,h.utils.dom.isRadioButtonElement,h.utils.dom.isColorInputElement,h.utils.dom.isCheckboxElement,h.utils.dom.isOptionElement,h.utils.dom.isSVGElement,h.utils.dom.isMapElement),F=h.utils.dom.isBodyElement,L=h.utils.dom.isHtmlElement,R=(h.utils.dom.isDocument,h.utils.dom.isWindow,h.utils.dom.isTextEditableInput,h.utils.dom.isTextEditableElement,h.utils.dom.isTextEditableElementAndEditingAllowed,h.utils.dom.isContentEditableElement,h.utils.dom.isDomElement,h.utils.dom.isShadowUIElement,h.utils.dom.isShadowRoot,h.utils.dom.isElementFocusable,h.utils.dom.isHammerheadAttr,h.utils.dom.isElementReadOnly,h.utils.dom.getScrollbarSize),V=h.utils.dom.getMapContainer,W=h.utils.dom.getTagName,Y=h.utils.dom.closest,K=h.utils.dom.getParents,X=h.utils.dom.findParent;function H(t,e){return t.contains?t.contains(e):T(t,function(t){return t.contains(e)})}function G(t){return M.nodeTextContentGetter.call(t)}h.utils.dom.getTopSameDomainWindow,h.utils.dom.getParentExceptShadowRoot;var q=(z.create=function(t){return new z(t.top,t.right,t.bottom,t.left)},z.prototype.add=function(t){return this.top+=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left+=t.left,this},z.prototype.sub=function(t){return"top"in t&&(this.top-=t.top,this.left-=t.left),this.bottom-=t.bottom,this.right-=t.right,this},z.prototype.round=function(t,e){return void 0===t&&(t=Math.round),void 0===e&&(e=t),this.top=t(this.top),this.right=e(this.right),this.bottom=e(this.bottom),this.left=t(this.left),this},z.prototype.contains=function(t){return t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom},z);function z(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}var j=h.utils.style,$=h.utils.style.getBordersWidth,Q=(h.utils.style.getComputedStyle,h.utils.style.getElementMargin,h.utils.style.getElementPadding),Z=h.utils.style.getElementScroll,J=(h.utils.style.getOptionHeight,h.utils.style.getSelectElementSize,h.utils.style.isElementVisible,h.utils.style.isVisibleChild,h.utils.style.getWidth),tt=h.utils.style.getHeight,et=h.utils.style.getInnerWidth,nt=h.utils.style.getInnerHeight,it=h.utils.style.getScrollLeft,ot=h.utils.style.getScrollTop,rt=h.utils.style.setScrollLeft,st=h.utils.style.setScrollTop,lt=h.utils.style.get;function at(t){return k(t)&&"fixed"===j.get(t,"position")}h.utils.style.getBordersWidthFloat,h.utils.style.getElementPaddingFloat,h.shadowUI,h.nativeMethods;var ut=function(t,e,n,i,o,r){this.width=t,this.height=e,this.left=n.x,this.top=n.y,this.right=n.x+t,this.bottom=n.y+e,this.border=i,this.scrollbar=r,this.scroll=o},ct={notElementOrTextNode:function(t){return"\n The ".concat(t," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(t,e){return"\n The ".concat(e," (").concat(t,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(t,e,n,i){return"\n The ".concat(e," (").concat(t,") is too small to be visible: ").concat(n,"px x ").concat(i,"px.\n ")},elHasDisplayNone:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(t,e){return"\n The ".concat(e," (").concat(t,") has not been rendered.\n ")},optionNotVisible:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(t,e){return"\n The action target (".concat(t,") is invisible because ").concat(e,"\n ")}},ht=h.utils.html,ft=h.nativeMethods,dt=10;function mt(t){if(!t)return"";var e,n,i,o=ft.cloneNode.call(t),r=ht.cleanUpHtml(ft.elementOuterHTMLGetter.call(o)),s=(e=ft.nodeTextContentGetter.call(t),n=dt,void 0===i&&(i="..."),e.length<n?e:e.substring(0,n-i.length)+i),l=ft.elementChildrenGetter.call(t);return 0<ft.htmlCollectionLengthGetter.call(l)?r.replace("></",">...</"):s?r.replace("></",">".concat(s,"</")):r}var pt=h.utils.position.getElementRectangle,vt=h.utils.position.getOffsetPosition,gt=h.utils.position.offsetToClientCoords;function yt(t){var e,n,i,o,r=L(t),s=r?t.getElementsByTagName("body")[0]:null,l=t.getBoundingClientRect(),a=q.create($(t)),u=Z(t),c=I(t),h="BackCompat"===t.ownerDocument.compatMode,f=r?new x(0,0):x.create(l),d=l.height,m=l.width;r&&(m=s&&h?(d=s.clientHeight,s.clientWidth):(d=t.clientHeight,t.clientWidth)),!c||(e=O(t))&&(n=vt(e),i=gt(x.create(n)),o=$(e),f.add(i).add(x.create(o)),r&&a.add(o));var p=!r&&et(t)!==t.clientWidth,v=!r&&nt(t)!==t.clientHeight,g={right:p?R():0,bottom:v?R():0};return new ut(m,d,f,a,u,g)}function Et(t){var e=t.x,n=t.y,i=nf.getElementFromPoint||nf.elementFromPoint,o=null;try{o=i.call(nf,e,n)}catch(t){return null}for(null===o&&(o=i.call(nf,e-1,n-1));o&&o.shadowRoot&&o.shadowRoot.elementFromPoint;){var r=o.shadowRoot.elementFromPoint(e,n);if(!r||o===r)break;o=r}return o}function bt(t,e,n){var i=yt(t),o=Math.max(t.scrollWidth,i.width),r=Math.max(t.scrollHeight,i.height),s=i.scrollbar.right+i.border.left+i.border.right+o,l=i.scrollbar.bottom+i.border.top+i.border.bottom+r;return(void 0===e||0<=e&&e<=s)&&(void 0===n||0<=n&&n<=l)}function St(t){var e=vt(t),n=e.left,i=e.top,o=gt({x:n,y:i});return o.x=Math.round(o.x),o.y=Math.round(o.y),o}function _t(n,e){return m.Promise.resolve(n===nf.documentElement).then(function(t){if(t)return new x(0,0);var e=m.utils.browser.isFirefox?Math.ceil:Math.round;return m.Promise.resolve(vt(n,e)).then(function(t){return x.create(t)})}).then(function(t){return t.add(e)})}var wt=/auto|scroll|hidden/i,Pt="visible";function xt(t){var e,n=lt(t,"overflowX"),i=lt(t,"overflowY"),o=wt.test(n),r=wt.test(i),s=D(t).documentElement,l=t.scrollHeight;return(m.utils.browser.isChrome||m.utils.browser.isFirefox||m.utils.browser.isSafari)&&(e=t.getBoundingClientRect().top,l=l-s.getBoundingClientRect().top+e),(o||r)&&l>s.scrollHeight}function Ct(t){if(F(t))return xt(t);if(L(t))return function(t){var e=lt(t,"overflowX"),n=lt(t,"overflowY");if("hidden"===e&&"hidden"===n)return!1;var i=t.scrollHeight>t.clientHeight,o=t.scrollWidth>t.clientWidth;if(i||o)return!0;var r=t.getElementsByTagName("body")[0];if(!r)return!1;if(xt(r))return!1;var s=Math.min(t.clientWidth,r.clientWidth),l=Math.min(t.clientHeight,r.clientHeight);return r.scrollHeight>l||r.scrollWidth>s}(t);var e,n,i,o,r,s=(n=lt(e=t,"overflowX"),i=lt(e,"overflowY"),o=wt.test(n),r=wt.test(i),m.utils.browser.isIE&&(o=o||r&&n===Pt,r=r||o&&i===Pt),new x(o,r));if(!s.x&&!s.y)return!1;var l=s.y&&t.scrollHeight>t.clientHeight;return s.x&&t.scrollWidth>t.clientWidth||l}function At(i,o){return w(this,void 0,void 0,function(){var e,n;return P(this,function(t){switch(t.label){case 0:return[4,Z(i)];case 1:return e=t.sent(),n=Ct(i),!/html/i.test(i.tagName)&&n&&(o.x-=e.left,o.y-=e.top),[2,gt(o)]}})})}function Tt(t){if(!t)return null;var e,n,i=(e=ef.screenLeft||ef.screenX,n=ef.screenTop||ef.screenY,new x(e,n)),o=i.x,r=i.y,s=o+t.x,l=r+t.y;return new x(s,l)}function Mt(t){var e=t/2;return e<1?0:Math.round(e)}function Dt(t){var e=pt(t);return{offsetX:Mt(e.width),offsetY:Mt(e.height)}}function Ut(t,e,n){var i=Dt(t);if(e="number"==typeof e?Math.round(e):i.offsetX,n="number"==typeof n?Math.round(n):i.offsetY,0<e&&0<n)return{offsetX:e,offsetY:n};var o=yt(t),r=Math.round(Math.max(t.scrollWidth,o.width)),s=Math.round(Math.max(t.scrollHeight,o.height)),l=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+s;return{offsetX:e<0?l+e:e,offsetY:n<0?a+n:n}}var It=E.positionUtils;function Ot(e,n){return void 0===n&&(n=!1),i.hide(n).then(function(){var t=It.getElementFromPoint(e);return i.show(n).then(function(){return t})})}function kt(t,n){return m.Promise.resolve(Et(t)).then(function(e){return m.Promise.resolve(H(n,e)).then(function(t){return t&&G(e)}).then(function(t){return t||e&&e===n?e:null})})}function Nt(n,i){if(!i||!n||n===i)return n;if("tref"===W(i))return i;var e,o,t="area"===W(i)&&N(n);return m.utils.browser.isFirefox&&t?(e=n,o=i,m.Promise.resolve(Y(o,"map")).then(function(t){return t&&t.name===e.useMap.substring(1)?o:e})):m.Promise.resolve(Y(i,"a")).then(function(t){return!!t}).then(function(t){return!!t&&m.Promise.resolve(H(i,n)).then(function(t){return t&&G(n)}).then(function(t){return!t&&G(i)})}).then(function(t){return t?m.Promise.resolve(yt(i)).then(function(e){return kt({x:e.right-1,y:e.top+1},i).then(function(t){return t||kt({x:e.left+1,y:e.bottom-1},i)}).then(function(t){return t||n})}):n})}function Bt(n,i,o){return Ot(n).then(function(t){var e=m.Promise.resolve(t);return!t&&m.utils.dom.isIframeWindow(i||ef)&&0<n.x&&0<n.y&&(e=e.then(function(){return Ot(n,!0)})),e.then(function(t){return Nt(t,o)})})}function Ft(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var Lt,Rt,Vt,Wt="E1",Yt="E4",Kt="E5",Xt="E9",Ht="E10",Gt="E11",qt="E12",zt="E24",jt="E26",$t="E27",Qt="E28",Zt="E29",Jt="E30",te="E31",ee="E32",ne="E33",ie="E34",oe="E35",re="E36",se="E37",le="E39",ae="E40",ue="E41",ce="E42",he="E43",fe="E44",de="E45",me="E46",pe="E49",ve="E50",ge="E51",ye="E52",Ee="E57",be="E64",Se="E65",_e="E68",we="E69",Pe="E70",xe="E71",Ce="E72",Ae="E73",Te="E74",Me="E76",De="E77",Ue="E78",Ie="E82",Oe="E83",ke="E90",Ne="E91",Be="E92",Fe="E93",Le="E94",Re="E95",Ve="E97",We="E99",Ye="E100",Ke="E101",Xe=(_(He,Lt=Ft),He);function He(t,e,n){var i=Lt.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function Ge(t,e){var n=Rt.call(this,pe,e)||this;return n.instantiationCallsiteName=t,n}function qe(t,e){var n=Vt.call(this,ve,e)||this;return n.instantiationCallsiteName=t,n}_(Ge,Rt=Ft),_(qe,Vt=Ft);var ze,je,$e,Qe,Ze,Je,tn,en,nn=(_(on,ze=Ft),on);function on(t,e,n){var i=void 0===e?{}:e,o=i.apiFnChain,r=i.apiFnIndex,s=i.reason,l=ze.call(this,t,n)||this;return l.apiFnChain=o,l.apiFnIndex=r,l.reason=s,l}function rn(t){return je.call(this,ge,t)||this}function sn(t,e){return $e.call(this,ye,e,t)||this}function ln(t,e){var n=Qe.call(this,Wt)||this;return n.errStack=t,n.pageDestUrl=e,n}function an(t,e,n){var i=Ze.call(this,Yt,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}function un(t,e,n,i){var o=Je.call(this,Kt,i)||this;return o.errMsg=String(e),o.property=n,o.instantiationCallsiteName=t,o}function cn(t){var e=tn.call(this,be)||this;return e.errMsg=String(t),e}function hn(t,e){var n=en.call(this,Se)||this;return n.errMsg=String(t),n.moduleName=e,n}_(rn,je=Ft),_(sn,$e=nn),_(ln,Qe=Ft),_(an,Ze=Ft),_(un,Je=Ft),_(cn,tn=Ft),_(hn,en=Ft);var fn,dn=(_(mn,fn=Xe),mn);function mn(t,e){return fn.call(this,Xt,t,e)||this}var pn,vn=(_(gn,pn=Xe),gn);function gn(t,e){return pn.call(this,Ht,t,e)||this}var yn,En=(_(bn,yn=Xe),bn);function bn(t,e){return yn.call(this,Gt,t,e)||this}var Sn,_n=(_(wn,Sn=Xe),wn);function wn(t,e){return Sn.call(this,qt,t,e)||this}var Pn,xn=(_(Cn,Pn=Xe),Cn);function Cn(t,e){return Pn.call(this,ke,t,e)||this}var An,Tn=(_(Mn,An=Xe),Mn);function Mn(t,e){return An.call(this,Ve,t,e)||this}var Dn,Un=(_(In,Dn=Xe),In);function In(t,e){return Dn.call(this,Ne,t,e)||this}var On,kn=(_(Nn,On=Xe),Nn);function Nn(t,e){return On.call(this,Be,t,e)||this}var Bn,Fn=(_(Ln,Bn=Xe),Ln);function Ln(t,e){return Bn.call(this,Fe,t,e)||this}var Rn,Vn=(_(Wn,Rn=Xe),Wn);function Wn(t,e){return Rn.call(this,Le,t,e)||this}var Yn,Kn=(_(Xn,Yn=Xe),Xn);function Xn(t,e){return Yn.call(this,Re,t,e)||this}var Hn,Gn=(_(qn,Hn=Xe),qn);function qn(t,e){return Hn.call(this,We,t,e)||this}var zn,jn,$n=(_(Qn,zn=Ft),Qn);function Qn(t,e,n){var i=zn.call(this,Ye)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function Zn(t,e){return jn.call(this,zt,e,t)||this}_(Zn,jn=nn);var Jn,ti,ei,ni=(_(ii,Jn=nn),ii);function ii(t,e){return Jn.call(this,jt,e,t)||this}function oi(t){var e=ti.call(this,$t)||this;return e.nodeDescription=t,e}function ri(t,e){var n=ei.call(this,Qt,e)||this;return n.argumentName=t,n}_(oi,ti=Ft),_(ri,ei=nn);var si,li,ai,ui,ci,hi,fi,di,mi,pi,vi,gi,yi,Ei,bi,Si,_i,wi,Pi,xi,Ci,Ai,Ti,Mi,Di,Ui,Ii,Oi,ki,Ni,Bi,Fi=(_(Li,si=Ft),Li);function Li(t){return si.call(this,Ke,t)||this}function Ri(t,e){var n=li.call(this,Zt,e)||this;return n.argumentName=t,n}function Vi(t,e){var n=ai.call(this,Jt)||this;return n.argumentName=t,n.nodeDescription=e,n}function Wi(){return ui.call(this,te)||this}function Yi(){return ci.call(this,ee)||this}function Ki(t){var e=hi.call(this,ne)||this;return e.argumentName=t,e}function Xi(){return fi.call(this,oe)||this}function Hi(t){var e=di.call(this,re)||this;return e.argumentName=t,e}function Gi(t,e){var n=mi.call(this,se)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function qi(){return pi.call(this,ie)||this}function zi(t,e){var n=vi.call(this,ue)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function ji(t,e){var n=gi.call(this,Ee)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function $i(t){return yi.call(this,ae,t)||this}function Qi(){return Ei.call(this,le)||this}function Zi(){return bi.call(this,ce)||this}function Ji(){return Si.call(this,we)||this}function to(){return _i.call(this,_e)||this}function eo(){return wi.call(this,Pe)||this}function no(){return Pi.call(this,xe)||this}function io(){return xi.call(this,Ae)||this}function oo(){return Ci.call(this,Ie)||this}function ro(t){var e=Ai.call(this,Ue)||this;return e.errMsg=t,e}function so(){return Ti.call(this,Te)||this}function lo(){return Mi.call(this,Me)||this}function ao(){return Di.call(this,De)||this}function uo(){return Ui.call(this,Ce)||this}function co(){return Ii.call(this,Oe)||this}function ho(){return Oi.call(this,he)||this}function fo(){return ki.call(this,fe)||this}function mo(t,e){var n=Ni.call(this,de)||this;return n.dialogType=t,n.pageUrl=e,n}function po(t,e,n){var i=Bi.call(this,me)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}_(Ri,li=nn),_(Vi,ai=Ft),_(Wi,ui=Ft),_(Yi,ci=Ft),_(Ki,hi=Ft),_(Xi,fi=Ft),_(Hi,di=Ft),_(Gi,mi=Ft),_(qi,pi=Ft),_(zi,vi=Ft),_(ji,gi=Ft),_($i,yi=Ft),_(Qi,Ei=Ft),_(Zi,bi=Ft),_(Ji,Si=Ft),_(to,_i=Ft),_(eo,wi=Ft),_(no,Pi=Ft),_(io,xi=Ft),_(oo,Ci=Ft),_(ro,Ai=Ft),_(so,Ti=Ft),_(lo,Mi=Ft),_(ao,Di=Ft),_(uo,Ui=Ft),_(co,Ii=Ft),_(ho,Oi=Ft),_(fo,ki=Ft),_(mo,Ni=Ft),_(po,Bi=Ft);var vo=(Object.defineProperty(go.prototype,"mouseActionStepDelay",{get:function(){return 1===this._speedFactor?10:400*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(go.prototype,"keyActionStepDelay",{get:function(){return 1===this._speedFactor?10:200*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(go.prototype,"cursorSpeed",{get:function(){return Math.pow(400,this._speedFactor)/4},enumerable:!1,configurable:!0}),Object.defineProperty(go.prototype,"draggingSpeed",{get:function(){return Math.pow(16,this._speedFactor)/4},enumerable:!1,configurable:!0}),go);function go(t){this._speedFactor=t||1}var yo=h.Promise,Eo=h.nativeMethods;function bo(e){return new yo(function(t){return Eo.setTimeout.call(ef,t,e)})}function So(){return bo(0)}var _o=Object.prototype.toString,wo=String.prototype.indexOf,Po=String.prototype.endsWith||function(t,e){var n=_o.call(this);(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=wo.call(n,t,e);return-1!==i&&i===e},xo=Array.prototype.indexOf,Co=Array.prototype.map,Ao=Array.prototype.sort,To=Array.prototype.filter,Mo=Array.prototype.concat,Do="Command",Uo=(Io.prototype.getAssignableProperties=function(){return[]},Io.prototype.getAllAssignableProperties=function(){for(var t=Object.getPrototypeOf(this),e=[];t&&t.getAssignableProperties;)e=Mo.call(e,t.getAssignableProperties()),t=Object.getPrototypeOf(t);return e},Io.prototype.getNonReportedProperties=function(){return[]},Io.prototype.getReportedProperties=function(){var t=Co.call(this.getAllAssignableProperties(),function(t){return t.name}),e=this.getNonReportedProperties();return To.call(t,function(t){return!(-1<xo.call(e,t))})},Io.prototype._assignFrom=function(t,e,n){if(void 0===n&&(n={}),t){e&&function(t,e){var n,i=e.constructor.name,o=Co.call(e.getAllAssignableProperties(),function(t){return t.name}),r=Ao.call(e.getReportedProperties());for(n in t)if(!(-1<xo.call(o,n)||n in e))throw new $n(i,n,r)}(t,this);for(var i,o,r=this.getAllAssignableProperties(),s=0;s<r.length;s++){var l=r[s],a=l.name,u=l.type,c=l.required,h=l.init,f=l.defaultValue;void 0!==f&&(this[a]=f);var d=t[a];void 0===d&&!c||(e&&u&&u((i=this.constructor.name,o=a,Po.call(i,Do)?o:"".concat(i,".").concat(o)),d),this[a]=h?h(a,d,n,e):d)}}},Io);function Io(){}function Oo(i){return function(t,e){var n=typeof e;if("number"!=n)throw new i(t,n);if(isNaN(e)||!isFinite(e)||e!==Math.floor(e))throw new i(t,e)}}var ko,No,Bo,Fo,Lo,Ro,Vo,Wo,Yo,Ko,Xo,Ho,Go,qo=Oo(dn),zo=(No=Oo(ko=vn),function(t,e){if(No(t,e),e<0)throw new ko(t,e)}),jo=(Bo=En,function(t,e){var n=typeof e;if("boolean"!=n)throw new Bo(t,n)}),$o=(Fo=_n,function(t,e){var n=typeof e;if("number"!=n)throw new Fo(t,n);if(isNaN(e)||e<.01||1<e)throw new Fo(t,e)}),Qo=(Lo=xn,function(t,e){var n=typeof e;if("string"!=n)throw new Lo(t,n)}),Zo=(Ro=Tn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof RegExp))throw new Ro(t,n)}),Jo=(Vo=Un,function(t,e){if(!(e instanceof Date))throw new Vo(t,e)}),tr=(Wo=kn,function(t,e){if(isNaN(Number(e)))throw new Wo(t,typeof e)}),er=(Yo=Fn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof URL))throw new Yo(t,n)}),nr=(Ko=Vn,function(t,e){var n=typeof e;if("object"!=n&&!(e instanceof URLSearchParams))throw new Ko(t,n)}),ir=(Xo=Kn,function(t,e){var n=typeof e;if("object"!=n)throw new Xo(t,n)}),or=(Ho=Gn,function(t,e){var n=typeof e;if("function"!=n)throw new Ho(t,n)}),rr=(_(sr,Go=Uo),sr.prototype.getAssignableProperties=function(){return[{name:"speed",type:$o}]},sr);function sr(t,e){var n=Go.call(this)||this;return n.speed=null,n._assignFrom(t,e),n}var lr,ar=(_(ur,lr=rr),ur.prototype.getAssignableProperties=function(){return[{name:"offsetX",type:qo},{name:"offsetY",type:qo},{name:"isDefaultOffset",type:jo}]},ur);function ur(t,e){var n=lr.call(this)||this;return n.offsetX=null,n.offsetY=null,n._assignFrom(t,e),n}var cr,hr=(_(fr,cr=ar),fr.prototype.getAssignableProperties=function(){return[{name:"scrollToCenter",type:jo},{name:"skipParentFrames",type:jo}]},fr);function fr(t,e){var n=cr.call(this)||this;return n.scrollToCenter=!1,n.skipParentFrames=!1,n._assignFrom(t,e),n}var dr,mr,pr=(_(vr,dr=Uo),vr.prototype.getAssignableProperties=function(){return[{name:"left",type:qo,defaultValue:null},{name:"right",type:qo,defaultValue:null},{name:"top",type:qo,defaultValue:null},{name:"bottom",type:qo,defaultValue:null}]},vr);function vr(t,e){var n=dr.call(this)||this;return n._assignFrom(t,e),n}function gr(t,e){var n=mr.call(this)||this;return n.scrollTargetX=null,n.scrollTargetY=null,n.includeMargins=!1,n.includeBorders=!0,n.includePaddings=!0,n.crop={left:null,right:null,top:null,bottom:null},n._assignFrom(t,e),n}_(gr,mr=rr),gr.prototype.getAssignableProperties=function(){return[{name:"scrollTargetX",type:qo},{name:"scrollTargetY",type:qo},{name:"crop",type:ir,init:rs},{name:"includeMargins",type:jo},{name:"includeBorders",type:jo},{name:"includePaddings",type:jo}]};var yr,Er=(_(br,yr=Uo),br.prototype.getAssignableProperties=function(){return[{name:"ctrl",type:jo,defaultValue:!1},{name:"alt",type:jo,defaultValue:!1},{name:"shift",type:jo,defaultValue:!1},{name:"meta",type:jo,defaultValue:!1}]},br);function br(t,e){var n=yr.call(this)||this;return n._assignFrom(t,e),n}var Sr,_r=(_(wr,Sr=ar),wr.prototype.getAssignableProperties=function(){return[{name:"modifiers",type:ir,init:ss}]},wr);function wr(t,e){var n=Sr.call(this)||this;return n.modifiers={ctrl:!1,alt:!1,shift:!1,meta:!1},n._assignFrom(t,e),n}var Pr,xr=(_(Cr,Pr=_r),Cr.prototype.getAssignableProperties=function(){return[{name:"caretPos",type:zo}]},Cr);function Cr(t,e){var n=Pr.call(this)||this;return n.caretPos=null,n._assignFrom(t,e),n}var Ar,Tr=(_(Mr,Ar=_r),Mr.prototype.getAssignableProperties=function(){return[{name:"speed"},{name:"minMovingTime"},{name:"holdLeftButton"},{name:"skipScrolling",type:jo},{name:"skipDefaultDragBehavior",type:jo}]},Mr);function Mr(t,e){var n=Ar.call(this)||this;return n.speed=null,n.minMovingTime=null,n.holdLeftButton=!1,n.skipScrolling=!1,n.skipDefaultDragBehavior=!1,n._assignFrom(t,e),n}var Dr,Ur,Ir,Or,kr,Nr,Br=(_(Fr,Dr=xr),Fr.prototype.getAssignableProperties=function(){return[{name:"replace",type:jo},{name:"paste",type:jo},{name:"confidential",type:jo}]},Fr);function Fr(t,e){var n=Dr.call(this)||this;return n.replace=!1,n.paste=!1,n.confidential=void 0,n._assignFrom(t,e),n}function Lr(t,e){var n=Ur.call(this,t,e)||this;return n.destinationOffsetX=null,n.destinationOffsetY=null,n._assignFrom(t,e),n}function Rr(t,e){var n=Ir.call(this)||this;return n.portraitOrientation=!1,n._assignFrom(t,e),n}function Vr(t,e){var n=Or.call(this)||this;return n.timeout=void 0,n.allowUnawaitedPromise=!1,n._assignFrom(t,e),n}function Wr(t,e){var n=kr.call(this)||this;return n.confidential=void 0,n._assignFrom(t,e),n}function Yr(t,e){var n=Nr.call(this)||this;return n._assignFrom(t,e),n}_(Lr,Ur=_r),Lr.prototype.getAssignableProperties=function(){return[{name:"destinationOffsetX",type:qo},{name:"destinationOffsetY",type:qo}]},_(Rr,Ir=Uo),Rr.prototype.getAssignableProperties=function(){return[{name:"portraitOrientation",type:jo}]},_(Vr,Or=Uo),Vr.prototype.getAssignableProperties=function(){return[{name:"timeout",type:zo},{name:"allowUnawaitedPromise",type:jo}]},_(Wr,kr=rr),Wr.prototype.getAssignableProperties=function(){return[{name:"confidential",type:jo}]},_(Yr,Nr=Uo),Yr.prototype.getAssignableProperties=function(){return[{name:"name",type:Qo},{name:"value",type:Qo},{name:"domain",type:Qo},{name:"path",type:Qo},{name:"expires",type:Jo},{name:"maxAge",type:tr},{name:"secure",type:jo},{name:"httpOnly",type:jo},{name:"sameSite",type:Qo}]};var Kr,Xr=(_(Hr,Kr=Uo),Hr.prototype.getAssignableProperties=function(){return[{name:"username",type:Qo,required:!0},{name:"password",type:Qo}]},Hr);function Hr(t,e){var n=Kr.call(this)||this;return n._assignFrom(t,e),n}var Gr,qr,zr,jr,$r,Qr=(_(Zr,Gr=Uo),Zr.prototype.getAssignableProperties=function(){return[{name:"protocol",type:Qo},{name:"host",type:Qo,required:!0},{name:"port",type:tr,required:!0},{name:"auth",type:ir,init:is}]},Zr);function Zr(t,e){var n=Gr.call(this)||this;return n._assignFrom(t,e),n}function Jr(t,e){var n=qr.call(this)||this;return n._assignFrom(t,e),n}function ts(t,e){var n=zr.call(this)||this;return n._assignFrom(t,e),n}function es(t,e){var n=jr.call(this)||this;return n._assignFrom(t,e),n}function ns(t,e){var n=$r.call(this)||this;return n._assignFrom(t,e),n}function is(t,e,n,i){return void 0===i&&(i=!0),new Xr(e,i)}function os(t,e,n,i){return void 0===i&&(i=!0),new Qr(e,i)}function rs(t,e,n,i){return void 0===i&&(i=!0),new pr(e,i)}function ss(t,e,n,i){return void 0===i&&(i=!0),new Er(e,i)}_(Jr,qr=Uo),Jr.prototype.getAssignableProperties=function(){return[{name:"url",type:er},{name:"method",type:Qo},{name:"headers",type:ir},{name:"params",type:nr},{name:"body"},{name:"timeout",type:tr},{name:"withCredentials",type:jo},{name:"auth",type:ir,init:is},{name:"proxy",type:ir,init:os},{name:"rawResponse",type:jo}]},_(ts,zr=Uo),ts.prototype.getAssignableProperties=function(){return[{name:"credentials",type:tr}]},_(es,jr=Uo),es.prototype.getAssignableProperties=function(){return[{name:"stack",type:Zo,required:!1},{name:"message",type:Zo,required:!1},{name:"pageUrl",type:Zo,required:!1}]},_(ns,$r=Uo),ns.prototype.getAssignableProperties=function(){return[{name:"fn",type:or,required:!0},{name:"dependencies",type:ir,required:!1}]};var ls=null,as=function(){return ls},us=function(t){ls=t},cs=(h.Promise,h.nativeMethods,h.eventSandbox.listeners,h.utils.browser,h.utils.event.BUTTON,h.utils.event.BUTTONS_PARAMETER);function hs(t){return t.top!==t}h.utils.event.DOM_EVENTS,h.utils.event.WHICH_PARAMETER,h.utils.event.preventDefault;var fs=h.Promise,ds=h.eventSandbox.message;function ms(t,i,e){return new fs(function(n){ds.on(ds.SERVICE_MSG_RECEIVED_EVENT,function t(e){e.message.cmd===i&&(ds.off(ds.SERVICE_MSG_RECEIVED_EVENT,t),n(e.message))}),ds.sendServiceMsg(t,e)})}var ps=(vs.prototype.on=function(t,e){this._eventsListeners[t]||(this._eventsListeners[t]=[]),this._eventsListeners[t].push(e)},vs.prototype.once=function(n,i){var o=this;this.on(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.off(n,i),i.apply(void 0,t)})},vs.prototype.off=function(t,e){var n=this._eventsListeners[t];n&&(this._eventsListeners[t]=m.nativeMethods.arrayFilter.call(n,function(t){return t!==e}))},vs.prototype.offAll=function(t){t?this._eventsListeners[t]=[]:this._eventsListeners={}},vs.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=this._eventsListeners[e];if(i)for(var o=0;o<i.length;o++)try{i[o].apply(this,t)}catch(t){if(!(t.message&&-1<t.message.indexOf("freed script")))throw t;this.off(e,i[o])}},vs);function vs(){this._eventsListeners={}}var gs=ps,ys=m.eventSandbox.listeners;function Es(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new gs}var bs=(Es.prototype._internalListener=function(t,e,n,i,o){this.events.emit("scroll",t),this.stopPropagationFlag&&(i(),o())},Es.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,ys.initElementListening(ef,["scroll"]),ys.addFirstInternalEventBeforeListener(ef,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n._internalListener.apply(n,t)}))},Es.prototype.waitForScroll=function(t){var e=this,n=null,i=new m.Promise(function(t){n=t});return i.cancel=function(){return e.events.off("scroll",n)},this.initialized?this.handleScrollEvents(t,n):n(),i},Es.prototype.handleScrollEvents=function(n,t){var e,i=this;this.events.once("scroll",t),(e=n)&&e.getRootNode&&D(e)!==e.getRootNode()&&(ys.initElementListening(n,["scroll"]),ys.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._internalListener.apply(i,t),ys.cancelElementListening(n)}))},Es.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Es.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Es),Ss=(_s._isScrollValuesChanged=function(t,e){return it(t)!==e.left||ot(t)!==e.top},_s.prototype._setScroll=function(t,e){var n=this,i=e.left,o=e.top,r=L(t)?D(t):t,s={left:it(r),top:ot(r)},i=Math.max(i,0),o=Math.max(o,0),l=bs.waitForScroll(r);return rt(r,i),st(r,o),_s._isScrollValuesChanged(r,s)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=_s._isScrollValuesChanged(r,s))}):(l.cancel(),m.Promise.resolve())},_s.prototype._getScrollToPoint=function(t,e,n){var i=Math.floor(t.width/2),o=Math.floor(t.height/2),r=this._scrollToCenter?i:Math.min(n.left,i),s=this._scrollToCenter?o:Math.min(n.top,o),l=t.scroll,a=l.left,u=l.top,c=e.x>=a+t.width-r,h=e.x<=a+r,f=e.y>=u+t.height-s,d=e.y<=u+s;return c?a=e.x-t.width+r:h&&(a=e.x-r),f?u=e.y-t.height+s:d&&(u=e.y-s),{left:a,top:u}},_s.prototype._getScrollToFullChildView=function(t,e,n){var i,o,r,s,l,a,u={left:null,top:null},c=t.width>=e.width,h=t.height>=e.height,f=(i=e,o=t,q.create({top:i.top-o.top,left:i.left-o.left,right:o.right-i.right,bottom:o.bottom-i.bottom}).sub(o.border).sub(o.scrollbar).round(Math.ceil,Math.floor));return c&&(r=t.width-e.width,s=Math.min(n.left,r),this._scrollToCenter&&(s=r/2),f.left<s?u.left=Math.round(t.scroll.left+f.left-s):f.right<s&&(u.left=Math.round(t.scroll.left+Math.min(f.left,-f.right)+s))),h&&(l=t.height-e.height,a=Math.min(n.top,l),this._scrollToCenter&&(a=l/2),f.top<a?u.top=Math.round(t.scroll.top+f.top-a):f.bottom<a&&(u.top=Math.round(t.scroll.top+Math.min(f.top,-f.bottom)+a))),u},_s._getChildPoint=function(t,e,n){return x.create(e).sub(x.create(t)).add(x.create(t.scroll)).add(x.create(e.border)).add(n)},_s.prototype._getScrollPosition=function(t,e,n,i){var o=_s._getChildPoint(t,e,n),r=this._getScrollToPoint(t,o,i),s=this._getScrollToFullChildView(t,e,i);return{left:Math.max(null===s.left?r.left:s.left,0),top:Math.max(null===s.top?r.top:s.top,0)}},_s._getChildPointAfterScroll=function(t,e,n,i){return x.create(e).add(x.create(t.scroll)).sub(x.create(n)).add(i)},_s.prototype._isChildFullyVisible=function(t,e,n){var i=_s._getChildPointAfterScroll(t,e,t.scroll,n),o=this._getScrollPosition(t,e,n,{left:0,top:0}),r=o.left,s=o.top;return!this._isTargetElementObscuredInPoint(i)&&r===t.scroll.left&&s===t.scroll.top},_s.prototype._scrollToChild=function(t,e,n){for(var i=yt(t),o=yt(e),r=et(ef),s=nt(ef),l=i.scroll,a=!this._isChildFullyVisible(i,o,n);a;){l=this._getScrollPosition(i,o,n,this._maxScrollMargin);var u=_s._getChildPointAfterScroll(i,o,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=r&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),a=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(t,l)},_s.prototype._scrollElement=function(){if(!Ct(this._element))return m.Promise.resolve();var t=yt(this._element),e=this._getScrollToPoint(t,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,e)},_s.prototype._scrollParents=function(){var t,e,n,i,o,r,s=this,l=(t=this._element,i=K(t),!I(t)||(e=O(t))&&(n=K(e),i.concat(n)),m.nativeMethods.arrayFilter.call(i,Ct)),a=this._element,u=it(a),c=ot(a),h=x.create(this._offsets).sub(new x(u,c).round()),f=function(n,i){return w(this,void 0,void 0,function(){var e;return P(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<n?[4,i(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}(l.length,function(t){return s._scrollToChild(l[t],a,h).then(function(){o=yt(a),r=yt(l[t]),h.add(x.create(o)).sub(x.create(r)).add(x.create(r.border)),a=l[t]})}),d={scrollWasPerformed:this._scrollWasPerformed,offsetX:h.x,offsetY:h.y,maxScrollMargin:this._maxScrollMargin};return f.then(function(){if(!s._skipParentFrames&&hs(ef))return d.cmd=_s.SCROLL_REQUEST_CMD,ms(d,_s.SCROLL_RESPONSE_CMD,ef.parent)}).then(function(){return s._scrollWasPerformed})},_s._getFixedAncestorOrSelf=function(t){return X(t,!0,at)},_s.prototype._isTargetElementObscuredInPoint=function(t){var e=Et(t);if(!e)return!1;var n=_s._getFixedAncestorOrSelf(e);return!!n&&!n.contains(this._element)},_s.prototype.run=function(){var t=this;return this._scrollElement().then(function(){return t._scrollParents()})},_s.SCROLL_REQUEST_CMD="automation|scroll|request",_s.SCROLL_RESPONSE_CMD="automation|scroll|response",_s);function _s(t,e,n){this._element=t,this._offsets=new x(e.offsetX,e.offsetY),this._scrollToCenter=!!e.scrollToCenter,this._skipParentFrames=!!e.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}var ws=h.utils.browser,Ps=(xs.prototype.setup=function(){this.dragAndDropMode=!1,this.dropAllowed=!1},xs.prototype.leaveElement=function(){},xs.prototype.move=function(){},xs.prototype.enterElement=function(){},xs.prototype.dragAndDrop=function(){},xs.prototype.teardown=function(){},xs.prototype.run=function(t,e,n,i,o){var r=e&&g.domUtils.isElementInDocument(e),s=e&&g.domUtils.isElementInIframe(e)&&!g.domUtils.getIframeByElement(e);r&&!s||(e=null);var l=t!==e,a=l?g.domUtils.getCommonAncestor(t,e):null;this.setup(),l&&e&&this.leaveElement(t,e,a,n),ws.isIE&&this.move(t,n),l&&g.domUtils.isElementInDocument(t)&&this.enterElement(t,e,a,n),ws.isIE||this.move(t,n),this.dragAndDrop(i,t,e,n,o),this.teardown(t,n,e);var u=this.dragAndDropMode,c=this.dropAllowed;return this.dragAndDropMode=!1,this.dropAllowed=!1,{dragAndDropMode:u,dropAllowed:c}},xs);function xs(t){var e=t.moveEvent;this.dragAndDropMode=!1,this.dropAllowed=!1,this.moveEvent=e}var Cs=h.eventSandbox.eventSimulator,As=h.utils.extend,Ts=h.nativeMethods,Ms=(Ds.leaveElement=function(t,e,n,i){Cs.mouseout(e,As({relatedTarget:t},i));for(var o=e;o&&o!==n;)Cs.mouseleave(o,As({relatedTarget:t},i)),o=Ts.nodeParentNodeGetter.call(o)},Ds.enterElement=function(t,e,n,i){Cs.mouseover(t,As({relatedTarget:e},i));for(var o=t,r=[];o&&o!==n;)r.push(o),o=g.domUtils.getParentExceptShadowRoot(o);for(var s=r.length-1;-1<s;s--)Cs.mouseenter(r[s],As({relatedTarget:e},i))},Ds.move=function(t,e,n){Cs[t](e,n)},Ds);function Ds(){}var Us=(Is.dragAndDrop=function(t,e,n,i){return Cs.drag(t,i),e!==n&&(g.domUtils.isElementInDocument(e)&&(i.relatedTarget=n,Cs.dragenter(e,i)),n&&(i.relatedTarget=e,Cs.dragleave(n,i))),!Cs.dragover(e,i)},Is);function Is(){}var Os,ks=h.eventSandbox.eventSimulator,Ns=(_(Bs,Os=Ps),Bs.prototype.leaveElement=function(t,e,n,i){Ms.leaveElement(t,e,n,i)},Bs.prototype.enterElement=function(t,e,n,i){Ms.enterElement(t,e,n,i)},Bs.prototype.move=function(t,e){this._needEmulateMoveEvent()&&Ms.move(this.moveEvent,t,e)},Bs.prototype.teardown=function(t,e,n){this._needEmulateMoveEvent()&&g.domUtils.isElementInDocument(t)&&t!==n&&ks[this.moveEvent](t,e)},Bs.prototype._needEmulateMoveEvent=function(){return"touchmove"!==this.moveEvent||this.holdLeftButton},Bs);function Bs(t){var e=Os.call(this,t)||this;return e.holdLeftButton=t.holdLeftButton,e}var Fs,Ls=(_(Rs,Fs=Ps),Rs.prototype.setup=function(){Fs.prototype.setup.call(this),this.dragAndDropMode=!0},Rs.prototype.dragAndDrop=function(t,e,n,i){this.dropAllowed=Us.dragAndDrop(t,e,n,i)},Rs);function Rs(){return null!==Fs&&Fs.apply(this,arguments)||this}var Vs,Ws=h.eventSandbox.eventSimulator,Ys=(_(Ks,Vs=Ps),Ks.prototype.setup=function(){Vs.prototype.setup.call(this),this.dragAndDropMode=!0},Ks.prototype.leaveElement=function(t,e,n,i){Ms.leaveElement(t,e,n,i)},Ks.prototype.move=function(t,e){Ms.move(this.moveEvent,t,e)},Ks.prototype.enterElement=function(t,e,n,i){Ms.enterElement(t,e,n,i)},Ks.prototype.dragAndDrop=function(t,e,n,i,o){var r=Ws.dragstart(t,i);o.setReadOnlyMode(),r?this.dropAllowed=Us.dragAndDrop(t,e,n,i):this.dragAndDropMode=!1},Ks.prototype.run=function(t,e,n,i,o){return Vs.prototype.run.call(this,t,null,n,i,o)},Ks);function Ks(){return null!==Vs&&Vs.apply(this,arguments)||this}function Xs(t,e,n){return new(t?e?Ls:Ys:Ns)(n)}var Hs=(Gs.create=function(o,r,s,l){return w(this,void 0,m.Promise,function(){var e,n,i;return P(this,function(t){switch(t.label){case 0:return[4,Gs.getTarget(o,s,new x(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new Gs(n,i,r,s,l)]}})})},Gs.getTarget=function(e,n,i){return m.Promise.resolve(bt(e,i.x,i.y)).then(function(t){return t?{element:e,offset:i}:m.Promise.all([_t(e,i),n.document.documentElement]).then(function(t){var e=t[0];return{element:t[1],offset:e}})})},Gs.prototype._getCursorSpeed=function(){return this.automationSettings.cursorSpeed},Gs.prototype._getTargetClientPoint=function(){var o=this;return m.Promise.resolve(Z(this.element)).then(function(i){return L(o.element)?x.create(o.offset).sub(x.create(i)).round(Math.round):m.Promise.resolve(St(o.element)).then(function(t){var e=F(o.element),n=x.create(t).add(o.offset);return e||n.sub(x.create(i)),n.round(Math.floor)})})},Gs.prototype._getEventSequenceOptions=function(t){var e=cs.noButton,n=Tt(t);return{eventOptions:{clientX:t.x,clientY:t.y,screenX:null==n?void 0:n.x,screenY:null==n?void 0:n.y,buttons:e,ctrl:this.modifiers.ctrl,alt:this.modifiers.alt,shift:this.modifiers.shift,meta:this.modifiers.meta},eventSequenceOptions:{moveEvent:this.moveEvent}}},Gs.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions;return Xs(!1,this.firstMovingStepOccured,i).run(t,as(),n,null,null)},Gs.prototype._emulateEvents=function(t,e){var n=this._getEventSequenceOptions(e);this._runEventSequence(t,n),this.firstMovingStepOccured=!0,us(t)},Gs.prototype._movingStep=function(n){var i=this;return this.cursor.move(n).then(function(){return Ot(i.cursor.getPosition())}).then(function(t){var e=i._getCorrectedTopElement(t);return e?i._emulateEvents(e,n):null}).then(So)},Gs.prototype._getCorrectedTopElement=function(t){return t},Gs.prototype._move=function(e){var n=this,i=this.cursor.getPosition(),o=x.create(e).sub(i),r=m.nativeMethods.dateNow(),s=Math.max(Math.max(Math.abs(o.x),Math.abs(o.y))/this.cursorSpeed,this.minMovingTime),l=x.create(i),a=!0;return function(e,n){return w(this,void 0,void 0,function(){return P(this,function(t){switch(t.label){case 0:return e()?[4,n()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}})})}(function(){return!l.eql(e)},function(){var t;return n._needMoveCursorImmediately()?l=x.create(e):a?(a=!1,l.add({x:0<o.x?1:-1,y:0<o.y?1:-1})):(t=Math.min((m.nativeMethods.dateNow()-r)/s,1),l=x.create(o).mul(t).add(i).round(Math.floor)),n._movingStep(l)})},Gs.prototype._needMoveCursorImmediately=function(){return this.touchMode},Gs.prototype._scroll=function(){if(this.skipScrolling)return m.Promise.resolve(!1);var t=new hr({offsetX:this.offset.x,offsetY:this.offset.y},!1);return new Ss(this.element,t).run()},Gs.prototype._moveToCurrentFrame=function(t){var e=this;if(this.cursor.isActive(this.window))return m.Promise.resolve();var n=this.cursor.getPosition(),i=n.x,o=n.y,r=this.cursor.getActiveWindow(this.window),c=null,s=null,h={cmd:"automation|move|request",startX:i,startY:o,endX:t.x,endY:t.y,modifiers:this.modifiers,speed:this.speed,shouldRender:this.cursor.shouldRender};return m.Promise.resolve().then(function(){if(r.parent===e.window)return m.Promise.resolve(function(t){var e=[];U(nf,"*",function(t){"IFRAME"===t.tagName&&e.push(t),t.shadowRoot&&U(t.shadowRoot,"iframe",function(t){return e.push(t)})});for(var n=0;n<e.length;n++)if(M.contentWindowGetter.call(e[n])===t)return e[n];return null}(r)).then(function(t){return c=t,m.Promise.resolve((n=vt(e=t),i=n.left,o=n.top,r=gt({x:i,y:o}),s=$(e),l=Q(e),a=r.x+s.left+l.left,u=r.y+s.top+l.top,new q(u,a+J(e),u+tt(e),a))).then(function(t){h.left=t.left,h.top=t.top,h.right=t.right,h.bottom=t.bottom});var e,n,i,o,r,s,l,a,u})}).then(function(){return Ot(e.cursor.getPosition())}).then(function(t){return s=t===c,r.parent===e.window&&(h.iframeUnderCursor=s),ms(h,"automation|move|response",r)}).then(function(t){if(e.cursor.setActiveWindow(e.window),s||m.utils.dom.isIframeWindow(e.window))return e.cursor.move(t)})},Gs.prototype.run=function(){var n=this;return this._scroll().then(function(){return m.Promise.all([n._getTargetClientPoint(),(t=n.window,new q(0,J(t),tt(t),0))]);var t}).then(function(t){var e=t[0];if(t[1].contains(e))return n._moveToCurrentFrame(e).then(function(){return n._move(e)})})},Gs);function Gs(t,e,n,i,o){this.touchMode=m.utils.featureDetection.isTouchDevice,this.moveEvent=this.touchMode?"touchmove":"mousemove",this.automationSettings=new vo(n.speed),this.cursorSpeed=this._getCursorSpeed(),this.element=t,this.window=i,this.offset=e,this.cursor=o,this.minMovingTime=n.minMovingTime||0,this.modifiers=n.modifiers||{},this.skipScrolling=n.skipScrolling,this.skipDefaultDragBehavior=n.skipDefaultDragBehavior,this.speed=n.speed,this.firstMovingStepOccured=!1}var qs=(zs.prototype._ensureActiveWindow=function(t){this._activeWindow!==t&&this._activeWindow!==t.parent&&this._activeWindow.parent!==t&&(this._activeWindow=t)},zs.prototype.isActive=function(t){return this._ensureActiveWindow(t),this._activeWindow===t},zs.prototype.setActiveWindow=function(t){this._activeWindow=t},zs.prototype.getActiveWindow=function(t){return this._ensureActiveWindow(t),this._activeWindow},zs.prototype.getPosition=function(){return new x(this._x,this._y)},Object.defineProperty(zs.prototype,"shouldRender",{get:function(){return this._ui.shouldRender},set:function(t){this._ui.shouldRender=t},enumerable:!1,configurable:!0}),zs.prototype.move=function(t){return this._x=t.x,this._y=t.y,this._ui.move(t)},zs.prototype.hide=function(){return this._ui.hide?this._ui.hide():m.Promise.resolve()},zs.prototype.show=function(){return this._ui.show?this._ui.show():m.Promise.resolve()},zs.prototype.leftButtonDown=function(){return this._ui.leftButtonDown()},zs.prototype.rightButtonDown=function(){return this._ui.rightButtonDown()},zs.prototype.buttonUp=function(){return this._ui.buttonUp()},zs);function zs(t,e){this._ui=e,this._x=-1,this._y=-1,this._activeWindow=t}var js,$s,Qs,Zs,Js=hs(ef)?i.iframeCursorUI:i.cursorUI,tl=new qs(ef.top,Js),el=E.positionUtils,nl=E.domUtils,il=E.eventUtils,ol="elementOverlapped";($s=js=js||{})[$s.Mouse=0]="Mouse",$s[$s.Key=1]="Key",$s[$s.Touch=2]="Touch",(Zs=Qs=Qs||{})[Zs.alt=1]="alt",Zs[Zs.ctrl=2]="ctrl",Zs[Zs.meta=4]="meta",Zs[Zs.shift=8]="shift";var rl={clickCount:1,button:"left"},sl=(ll.prototype._createMouseEventOptions=function(t,e){return m.utils.extend({x:e.options.clientX+this._leftTopPoint.x,y:e.options.clientY+this._leftTopPoint.y,modifiers:(n=e.options,i=0,n.ctrl&&(i|=Qs.ctrl),n.alt&&(i|=Qs.alt),n.shift&&(i|=Qs.shift),n.meta&&(i|=Qs.meta),i),button:e.options.button?"right":"left",type:t},rl);var n,i},ll.prototype.mouseDown=function(t){var e=this._createMouseEventOptions("mousePressed",t);return this._dispatchEventFn(js.Mouse,e)},ll.prototype.mouseUp=function(t){var e=this._createMouseEventOptions("mouseReleased",t);return this._dispatchEventFn(js.Mouse,e)},ll);function ll(t,e){this._dispatchEventFn=t,this._leftTopPoint=e||new x(0,0)}var al=(ul.create=function(t){var n=t.element,i=t.clientPoint,o=t.screenPoint,r=t.isTarget,s=t.inMoving;return w(this,void 0,void 0,function(){var e;return P(this,function(t){switch(t.label){case 0:return e=null,i?[4,Tt(i)]:[3,2];case 1:e=t.sent(),t.label=2;case 2:return[2,new ul({element:n,clientPoint:i,screenPoint:o,isTarget:r,inMoving:s,devicePoint:e})]}})})},ul);function ul(t){var e=t.element,n=void 0===e?null:e,i=t.clientPoint,o=void 0===i?null:i,r=t.screenPoint,s=void 0===r?null:r,l=t.isTarget,a=void 0!==l&&l,u=t.inMoving,c=void 0!==u&&u,h=t.devicePoint,f=void 0===h?null:h;this.element=n,this.clientPoint=o,this.screenPoint=s,this.devicePoint=f,this.isTarget=a,this.inMoving=c}var cl,hl=(_(fl,cl=ps),fl.prototype._ensureWindowAndCursorForLegacyTests=function(t){t.window=t.window||ef,t.cursor=tl},fl.prototype.canUseProxylessEventSimulator=function(t){return!!this.proxylessEventSimulator&&!!t&&"select"!==W(t)},fl.prototype._getElementForEvent=function(n){return w(this,void 0,void 0,function(){var e;return P(this,function(t){return e=bt(this.element,this.options.offsetX,this.options.offsetY)?this.element:null,[2,Bt(n.point,this.window,e)]})})},fl.prototype._moveToElement=function(){return w(this,void 0,void 0,function(){var e,n=this;return P(this,function(t){switch(t.label){case 0:return e=new Tr(m.utils.extend({skipScrolling:!0},this.options),!1),[4,Hs.create(this.element,e,this.window,this.cursor)];case 1:return[2,t.sent().run().then(function(){return bo(n.automationSettings.mouseActionStepDelay)})]}})})},fl.prototype._scrollToElement=function(){var e=this,n=!1,t=new hr(this.options,!1);return new Ss(this.element,t).run().then(function(t){return n=!!t,bo(e.automationSettings.mouseActionStepDelay)}).then(function(){return Bt(e.cursor.getPosition(),e.window)}).then(function(t){return function(s,l,a){return w(this,void 0,h.Promise,function(){var e,n,i,o,r;return P(this,function(t){switch(t.label){case 0:return s&&nl.contains(l,s)&&a?(e=as(),n=nl.getCommonAncestor(s,e),[4,el.getClientPosition(s)]):[2];case 1:return[4,Tt(i=t.sent())];case 2:return(o=t.sent())&&(r={clientX:i.x,clientY:i.y,screenX:o.x,screenY:o.y,ctrl:!1,alt:!1,shift:!1,meta:!1,buttons:il.BUTTONS_PARAMETER.leftButton},Ms.leaveElement(s,e,n,r),Ms.enterElement(s,e,n,r),us(s)),[2]}})})}(t,e.element,n)}).then(function(){return n})},fl.prototype._getElementOffset=function(){var t=Ut(this.element),e=this.options,n=e.offsetX,i=e.offsetY,o=i||0===i?i:t.offsetY,r=n||0===n?n:t.offsetX;return x.create({x:r,y:o})},fl.prototype._isTargetElement=function(n,i){return w(this,void 0,void 0,function(){var e;return P(this,function(t){switch(t.label){case 0:return(e=!i||n===i||n===this.element)||!n?[3,2]:[4,this._contains(this.element,n)];case 1:e=t.sent(),t.label=2;case 2:return[2,e]}})})},fl.prototype._getCheckedPoints=function(t){for(var e=[t],n=t.x/2,i=t.y/2,o=2*t.x,r=2*t.y,s=i;s<r;s+=i)for(var l=n;l<o;l+=n)e.push(x.create({x:l,y:s}));return e},fl.prototype._getAvailableOffset=function(r,s){return w(this,void 0,void 0,function(){var e,n,i,o;return P(this,function(t){switch(t.label){case 0:e=this._getCheckedPoints(s),i=n=null,o=0,t.label=1;case 1:return o<e.length?[4,_t(this.element,e[o])]:[3,7];case 2:return n=t.sent(),[4,At(this.element,n)];case 3:return[4,Bt(t.sent(),this.window,r)];case 4:return i=t.sent(),[4,this._isTargetElement(i,r)];case 5:if(t.sent())return[2,e[o]];t.label=6;case 6:return o++,[3,1];case 7:return[2,null]}})})},fl.prototype._wrapAction=function(m){return w(this,void 0,void 0,function(){var e,n,i,o,r,s,l,a,u,c,h,f,d;return P(this,function(t){switch(t.label){case 0:return e=this._getElementOffset(),[4,bt(this.element,e.x,e.y)];case 1:return n=t.sent()?this.element:null,[4,_t(this.element,e)];case 2:return i=t.sent(),[4,St(this.element)];case 3:return o=t.sent(),[4,m()];case 4:return t.sent(),this.options.isDefaultOffset?[4,this._getAvailableOffset(n,e)]:[3,6];case 5:r=t.sent(),e.x=(null==r?void 0:r.x)||e.x,e.y=(null==r?void 0:r.y)||e.y,this.options.offsetX=e.x,this.options.offsetY=e.y,t.label=6;case 6:return[4,_t(this.element,e)];case 7:return s=t.sent(),[4,St(this.element)];case 8:return l=t.sent(),[4,At(this.element,s)];case 9:return[4,Bt(a=t.sent(),this.window,n)];case 10:return(u=t.sent())?[4,this._isTargetElement(u,n)]:[2,al.create({element:null,clientPoint:null,screenPoint:null,isTarget:!1,inMoving:!1})];case 11:return c=t.sent(),h=i.x!==s.x||i.y!==s.y,f=o.x!==l.x||o.y!==l.y,d=h&&f,[2,al.create({element:u,clientPoint:a,screenPoint:s,isTarget:c,inMoving:d})]}})})},fl.prototype._checkElementState=function(t,e){if(!t.element)throw new ni(null,{reason:function t(e,n){void 0===n&&(n="action target");var i=mt(e);if(B(e)){var o=(t(V(Y(e,"map")),"container")||"").replace(/.*The/,"its");return ct.mapContainerNotVisible(i,o)}return ct.elOutsideBounds(i,n)}(this.element)});if(e&&(!t.isTarget||t.inMoving))throw new Fi;return t},fl.prototype._ensureElement=function(o,e,n){var r=this;return void 0===e&&(e=!1),void 0===n&&(n=!1),this._wrapAction(function(){return r._scrollToElement()}).then(function(t){return r._checkElementState(t,o)}).then(function(t){return n?t:r._wrapAction(function(){return r._moveToElement()})}).then(function(t){return e||r._checkElementState(t,o),t}).then(function(t){var e,n,i=null==t?void 0:t.element;return r.emit(r.TARGET_ELEMENT_FOUND_EVENT,{element:i||null}),o||!i||t.isTarget||(e=mt(r.element),n=mt(i),r.emit(r.WARNING_EVENT,{type:ol,args:[e,n]})),{element:(null==t?void 0:t.element)||null,clientPoint:(null==t?void 0:t.clientPoint)||null,screenPoint:(null==t?void 0:t.screenPoint)||null,devicePoint:(null==t?void 0:t.devicePoint)||null}})},fl.prototype._contains=function(o,r){return w(this,void 0,void 0,function(){var e,n,i;return P(this,function(t){switch(t.label){case 0:return[4,K(r)];case 1:for(e=t.sent(),n=0,i=e;n<i.length;n++)if(i[n]===o)return[2,!0];return[2,!1]}})})},fl);function fl(t,e,n,i,o,r){var s=cl.call(this)||this;return s.TARGET_ELEMENT_FOUND_EVENT="automation|target-element-found-event",s.WARNING_EVENT="automation|warning-event",s.element=t,s.options=e,s.automationSettings=new vo(e.speed||1),s.window=n,s.cursor=i,s.proxylessEventSimulator=o?new sl(o,r):null,s._ensureWindowAndCursorForLegacyTests(s),s}var dl,ml=h.Promise,pl=(_(vl,dl=hl),vl.prototype.run=function(t){var e=this,n=ml.resolve();return this.element!==nf.scrollingElement&&this.element!==nf.documentElement&&(n=this._ensureElement(t,!0,!0)),n.then(function(){e.element.scrollLeft=e.scrollLeft,e.element.scrollTop=e.scrollTop})},vl);function vl(t,e,n){var i,o,r,s,l,a=e.x,u=e.y,c=e.position,h=e.byX,f=e.byY,d=dl.call(this,t,n,ef,tl)||this;return c&&(o=t,r=c,s=Math.floor(o.scrollWidth/2-o.clientWidth/2),l=Math.floor(o.scrollHeight/2-o.clientHeight/2),a=(i={top:[s,0],right:[o.scrollWidth,l],bottom:[s,o.scrollHeight],left:[0,l],topRight:[o.scrollWidth,0],topLeft:[0,0],bottomRight:[o.scrollWidth,o.scrollHeight],bottomLeft:[0,o.scrollHeight],center:[s,l]}[r])[0],u=i[1]),d.scrollLeft="number"==typeof a?a:t.scrollLeft,d.scrollTop="number"==typeof u?u:t.scrollTop,h&&(d.scrollLeft+=h),f&&(d.scrollTop+=f),d}var gl,yl=(_(El,gl=hl),El.prototype.run=function(t){return this._ensureElement(t,!0,!0)},El);function El(t,e){return gl.call(this,t,e,ef,tl)||this}var bl=h.Promise,Sl=h.nativeMethods,_l=h.utils.browser,wl=h.eventSandbox.focusBlur,Pl=E.contentEditable,xl=E.textSelection,Cl=E.domUtils,Al=E.styleUtils,Tl=h.eventSandbox.message,Ml="automation|iframe|request",Dl="automation|iframe|response";function Ul(v,g,y){var t=this;return new bl(function(p){return w(t,void 0,void 0,function(){var s,n,i,o,r,l,a,u,c,h,f,d,m;return P(this,function(t){switch(t.label){case 0:return hs(ef)?[4,ms({cmd:Ml},Dl,ef.parent)]:[3,2];case 1:t.sent(),t.label=2;case 2:if(s=Cl.getActiveElement(),n=Cl.isTextEditableElement(v),i=Cl.closest(v,"label[for]"),o=Cl.isElementFocusable(v),r=!o&&i,l=Cl.isContentEditableElement(v),a=l?Pl.findContentEditableParent(v):v,g&&_l.isWebKit&&n&&xl.select(v,0,0),r)return g&&(e=i,Cl.isElementFocusable(e)?wl.focus(e,E.noop,!1,!0):Ol(e)),p(),[2];if(u=!g,c=!1,!o&&!l){if(h=Cl.findDocument(a),f=Sl.documentActiveElementGetter.call(h),d=Cl.isBodyElement(f),m=Cl.isBodyElement(a)?a:Cl.getFocusableParent(a),f&&!d&&Cl.containsElement(f,a)||d&&Cl.isBodyElement(m))return p(),[2];a=m||h.body,c=!0}return wl.focus(a,function(){var t,e,n,i,o,r;!g||l||v===Cl.getActiveElement()?(t=v,e=y,o=Cl.isTextEditableElement(t),r=Cl.isContentEditableElement(t),o||r?r&&isNaN(parseInt(e,10))?xl.setCursorToLastVisiblePosition(t):(n=isNaN(parseInt(e,10))?Cl.getElementValue(t).length:e,xl.select(t,n,n)):(i=Pl.findContentEditableParent(t))&&xl.setCursorToLastVisiblePosition(Pl.findContentEditableParent(i)),g||Cl.getActiveElement()===s?p():wl.focus(s,p,!0,!0)):p()},u,!0,!1,c),[2]}var e})})})}function Il(t){var e=Cl.closest(t,"label[for]"),n=e&&(e.control||nf.getElementById(e.htmlFor));return n&&Al.isElementVisible(n)?n:null}function Ol(t){var e=Il(t);e&&Cl.getActiveElement()!==e&&wl.focus(e,E.noop,!1,!0)}Tl.on(Tl.SERVICE_MSG_RECEIVED_EVENT,function(t){var e;t.message.cmd===Ml&&(e=Cl.findIframeByWindow(t.source),wl.focus(e,function(){Tl.sendServiceMsg({cmd:Dl},t.source)},!1))});var kl=h.utils.browser,Nl=h.eventSandbox.eventSimulator,Bl=h.eventSandbox.listeners,Fl=h.nativeMethods,Ll=E.domUtils,Rl=E.styleUtils,Vl=E.selectController,Wl=i.selectElement,Yl=(Kl.prototype.run=function(){this.eventState.clickElement&&Nl.click(this.eventState.clickElement,this.eventArgs.options),Ll.isElementFocusable(this.eventArgs.element)||Ol(this.eventArgs.element)},Kl);function Kl(t,e){this.eventState=t,this.eventArgs=e}var Xl,Hl=(_(Gl,Xl=Yl),Gl.prototype.run=function(){function t(t){n=Fl.eventTargetGetter.call(t)===e.input}var e=this,n=!1;Bl.addInternalEventBeforeListener(ef,["focus"],t),Xl.prototype.run.call(this),Bl.removeInternalEventBeforeListener(ef,["focus"],t),Ll.isElementFocusable(this.targetElement)&&!n&&this._ensureBoundElementFocusRaised()},Gl.prototype._ensureBoundElementFocusRaised=function(){Nl.focus(this.input)},Gl);function Gl(t,e){var n=Xl.call(this,t,e)||this;return n.targetElement=n.eventArgs.element,n.input=Il(n.eventArgs.element),n}var ql,zl=(_(jl,ql=Yl),jl.prototype.run=function(){ql.prototype.run.call(this),this._toggleSelectOptionList()},jl.prototype._toggleSelectOptionList=function(){var t=this.eventArgs.element;1===Rl.getSelectElementSize(t)&&!1!==this.eventState.simulateDefaultBehavior&&(Vl.isOptionListExpanded(t)?Wl.collapseOptionList():Wl.expandOptionList(t))},jl);function jl(t,e){return ql.call(this,t,e)||this}var $l,Ql=(_(Zl,$l=Yl),Zl.prototype.run=function(){return this.eventArgs.element},Zl);function Zl(t,e){return $l.call(this,t,e)||this}var Jl,ta=(_(ea,Jl=Hl),ea.prototype.run=function(){function t(){e=!0}var e=!1;Bl.addInternalEventBeforeListener(ef,["change"],t),Jl.prototype.run.call(this),Bl.removeInternalEventBeforeListener(ef,["change"],t),!kl.isChrome||e||this.checkbox.disabled||this._isClickableElementInsideLabel(this.targetElement)||this._ensureCheckboxStateChanged()},ea.prototype._ensureCheckboxStateChanged=function(){this.checkbox.checked=!this.checkbox.checked,Nl.change(this.checkbox)},ea.prototype._isClickableElementInsideLabel=function(t){var e=Ll.isAnchorElement(t)&&t.getAttribute("href"),n=Ll.isButtonElement(t);return e||n},ea);function ea(t,e){var n=Jl.call(this,t,e)||this;return n.checkbox=n.input,n}var na=h.Promise,ia=h.utils.browser,oa=h.utils.featureDetection,ra=h.eventSandbox.eventSimulator,sa=h.eventSandbox.listeners,la=E.domUtils,aa=E.eventUtils,ua=E.arrayUtils,ca=(ha.prototype.mousedown=function(t){var e=this;this.targetElementParentNodes=la.getParents(t.element),this.mouseDownElement=t.element,this._raiseTouchEvents(t);var n=la.getActiveElement();this.activeElementBeforeMouseDown=n;var i=(ia.isWebKit||ia.isIE)&&la.isSelectElement(this.mouseDownElement);return i&&this._bindMousedownHandler(),this._bindBlurHandler(n),this._isTouchEventWasCancelled()||(this.eventState.simulateDefaultBehavior=ra.mousedown(t.element,t.options)),!1===this.eventState.simulateDefaultBehavior&&(this.eventState.simulateDefaultBehavior=i&&!this.eventState.mousedownPrevented),this._ensureActiveElementBlur(n).then(function(){return e._focus(t)})},ha.prototype.mouseup=function(t,e){var n,i,o,r,s;e.element=t,this.eventState.clickElement=(n=this.mouseDownElement,i=t,o=this.targetElementParentNodes,r=la.getParents(i),s=la.isTheSameNode(i,n),ia.isFirefox?s?n:null:s?ua.equals(o,r)?n:null:n.contains(i)&&!la.isEditableFormElement(i)?n:i.contains(n)?i:ua.getCommonElement(r,o));var l={},a=function(t){l=t.timeStamp,sa.removeInternalEventBeforeListener(ef,["mouseup"],a)};return ia.isIE||sa.addInternalEventBeforeListener(ef,["mouseup"],a),this._isTouchEventWasCancelled()||ra.mouseup(t,e.options),e.options&&(e.options.timeStamp=l),this._click(e)},ha.prototype._click=function(u){return w(this,void 0,h.Promise,function(){var a;return P(this,function(t){var e,n,i,o,r,s,l;return e=this.eventState,i=Il((n=u).element),o=Ll.isSelectElement(n.element),r=Ll.isOptionElement(n.element),s=Ll.isLabelElement(n.element)&&i,l=i&&Ll.isCheckboxElement(i),a=new(o?zl:r?Ql:l?ta:s?Hl:Yl)(e,n),this._isTouchEventWasCancelled()||a.run(),[2,u]})})},ha.prototype._isTouchEventWasCancelled=function(){return this.eventState.touchStartCancelled||this.eventState.touchEndCancelled},ha.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,aa.preventDefault(t),aa.unbind(e.element,"mousedown",n)};aa.bind(this.element,"mousedown",n)},ha.prototype._bindBlurHandler=function(t){var e=this,n=function(){e.eventState.blurRaised=!0,aa.unbind(t,"blur",n,!0)};aa.bind(t,"blur",n,!0)},ha.prototype._ensureActiveElementBlur=function(e){var n=this;return new na(function(t){la.getActiveElement()===e||n.eventState.blurRaised?t():ia.isIE&&ia.version<12?So().then(function(){n.eventState.blurRaised||ra.blur(e),t()}):(ra.blur(e),t())})},ha.prototype._focus=function(t){return!1===this.eventState.simulateDefaultBehavior?na.resolve():Ul(la.isContentEditableElement(this.element)?this.element:t.element,!ia.isIE||this.activeElementBeforeMouseDown===la.getActiveElement(),this.caretPos)},ha.prototype._raiseTouchEvents=function(t){oa.isTouchDevice&&(this.eventState.touchStartCancelled=!ra.touchstart(t.element,t.options),this.eventState.touchEndCancelled=!ra.touchend(t.element,t.options))},ha);function ha(t,e){this.element=t,this.caretPos=e,this.targetElementParentNodes=[],this.activeElementBeforeMouseDown=null,this.mouseDownElement=null,this.eventState={mousedownPrevented:!1,blurRaised:!1,simulateDefaultBehavior:!0,clickElement:null,touchStartCancelled:!1,touchEndCancelled:!1}}var fa,da=(_(ma,fa=hl),ma.prototype._mousedown=function(t){return this.canUseProxylessEventSimulator(t.element)?this.proxylessEventSimulator.mouseDown(t):this.strategy.mousedown(t)},ma.prototype._mouseup=function(t,e){return this.canUseProxylessEventSimulator(e.element)?this.proxylessEventSimulator.mouseUp(e):this.strategy.mouseup(t,e)},ma.prototype.run=function(t){var r,s=this;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.screenPoint,o=t.devicePoint;return r={point:n,screenPoint:i,element:e,options:m.utils.extend({clientX:null==n?void 0:n.x,clientY:null==n?void 0:n.y,screenX:null==o?void 0:o.x,screenY:null==o?void 0:o.y},s.modifiers)},m.Promise.all([bo(s.automationSettings.mouseActionStepDelay),s.cursor.leftButtonDown().then(function(){return s._mousedown(r)})])}).then(function(){return s.cursor.buttonUp()}).then(function(){return s._getElementForEvent(r)}).then(function(t){return t?s._mouseup(t,r):null})},ma);function ma(t,e,n,i,o,r){var s,l,a=fa.call(this,t,e,n,i,o,r)||this;return a.modifiers=e.modifiers,a.strategy=(s=a.element,l=e.caretPos,new ca(s,l)),a}function pa(t,e,n){var i=function(t,e,n){if(e.y-t.y==0)return 0;var i=(e.x-t.x)/(e.y-t.y),o=t.y*(t.x-e.x)/(e.y-t.y)+t.x;return Math.round(i*n+o)}(t,e,n.top);return i&&i>=n.left&&i<=n.right?new x(i,n.top):null}function va(t,e,n){var i=function(t,e,n){if(e.x===t.x)return 0;var i=(e.y-t.y)/(e.x-t.x),o=t.x*(t.y-e.y)/(e.x-t.x)+t.y;return Math.round(i*n+o)}(t,e,n.left);return i&&i>=n.top&&i<=n.bottom?new x(n.left,i):null}function ga(t,e,n){for(var i=[],o=0,r=[{left:n.left,top:n.top,right:n.left,bottom:n.bottom,isHorizontal:!1},{left:n.right,top:n.top,right:n.right,bottom:n.bottom,isHorizontal:!1},{left:n.left,top:n.top,right:n.right,bottom:n.top,isHorizontal:!0},{left:n.left,top:n.bottom,right:n.right,bottom:n.bottom,isHorizontal:!0}];o<r.length;o++){var s=r[o],l=(s.isHorizontal?pa:va)(t,e,s);l&&i.push(l)}return i.length?1===i.length||i[0].distance(t)<i[1].distance(t)?i[0]:i[1]:null}var ya=h.eventSandbox.eventSimulator,Ea=h.eventSandbox.message,ba=E.positionUtils,Sa=E.domUtils,_a=E.styleUtils,wa="automation|move|response";Ea.on(Ea.SERVICE_MSG_RECEIVED_EVENT,function(t){"automation|move|request"===t.message.cmd&&(t.source.parent===ef?function(t){var e=new x(t.message.endX,t.message.endY),n=t.source,i=Sa.findIframeByWindow(n),o=_a.getBordersWidth(i),r=_a.getElementPadding(i),s=ba.getIframeClientCoordinates(i),l=ba.getIframePointRelativeToParentFrame(e,n),a=tl.getPosition();tl.shouldRender=t.message.shouldRender;var u=ba.isInRectangle(a,s)?a:ga(a,l,s),c={x:u.x-s.left,y:u.y-s.top},h=new Tr({modifiers:t.message.modifiers,offsetX:c.x+o.left+r.left,offsetY:c.y+o.top+r.top,speed:t.message.speed,skipScrolling:!0},!1),f={cmd:wa,x:c.x,y:c.y};tl.getActiveWindow(ef)!==n?Hs.create(i,h,ef,tl).then(function(t){return t.run()}).then(function(){tl.setActiveWindow(n),Ea.sendServiceMsg(f,n)}):Ea.sendServiceMsg(f,n)}(t):(h.on(h.EVENTS.beforeUnload,function(){return Ea.sendServiceMsg({cmd:wa},t.source)}),function(t){var e=t.source,n={left:t.message.left,right:t.message.right,top:t.message.top,bottom:t.message.bottom};if(!t.message.iframeUnderCursor){var i=t.message,o=i.startX,r=i.startY,s=o-n.left,l=r-n.top,a=as();return a&&(ya.mouseout(a,{clientX:s,clientY:l,relatedTarget:null}),ya.mouseleave(a,{clientX:s,clientY:l,relatedTarget:null})),Ea.sendServiceMsg({cmd:wa},e)}var u,c=tl.getPosition(),h=ga(x.create(n).add(c),new x(t.message.endX,t.message.endY),n);h?(u=new Tr({modifiers:t.message.modifiers,offsetX:h.x-n.left,offsetY:h.y-n.top,speed:t.message.speed,skipScrolling:!0},!1),Hs.create(nf.documentElement,u,ef,tl).then(function(t){return t.run()}).then(function(){var t={cmd:wa,x:h.x,y:h.y};tl.setActiveWindow(e),Ea.sendServiceMsg(t,e)})):Ea.sendServiceMsg({cmd:wa,x:n.left,y:n.top},e)}(t)))});var Pa=h.Promise,xa=h.utils.browser,Ca=h.utils.featureDetection,Aa=h.eventSandbox.eventSimulator,Ta=h.eventSandbox.focusBlur,Ma=h.nativeMethods,Da=E.domUtils,Ua=E.styleUtils,Ia=E.delay,Oa=E.selectController,ka=i.selectElement,Na=Ca.isTouchDevice?0:160,Ba=(Fa.prototype._calculateEventArguments=function(){var t=this.optionListExpanded?Oa.getEmulatedChildElement(this.element):this.element,e=1<Ua.getSelectElementSize(this.parentSelect);return{options:this.modifiers,element:xa.isIE&&e?this.parentSelect:t}},Fa.prototype._getMoveArguments=function(){var t,e,n=null,i=null,o=null;return o=this.optionListExpanded?(i=(t=Dt(n=Oa.getEmulatedChildElement(this.element))).offsetX,t.offsetY):(n=nf.documentElement,i=(e=ka.getSelectChildCenter(this.element)).x,e.y),{element:n,offsetX:i,offsetY:o,speed:this.speed}},Fa.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Tr({offsetX:i,offsetY:o,speed:r,modifiers:this.modifiers},!1);return Hs.create(n,s,ef,tl).then(function(t){return t.run()}).then(function(){return Ia(e.automationSettings.mouseActionStepDelay)})},Fa.prototype._mousedown=function(){var t=this;return xa.isFirefox?(Aa.mousedown(this.eventsArgs.element,this.eventsArgs.options),this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex),this._focus()):xa.isIE?(Aa.mousedown(this.eventsArgs.element,this.eventsArgs.options),this._focus()):this._focus().then(function(){return Ia(Na)}).then(function(){Aa.mousedown(t.eventsArgs.element,t.eventsArgs.options),t.clickCausesChange&&(t.parentSelect.selectedIndex=t.childIndex)})},Fa.prototype._focus=function(){var e=this;return new Pa(function(t){Ta.focus(e.parentSelect,t,!1,!0)})},Fa.prototype._mouseup=function(){var t=xa.isIE?this.parentSelect:this.eventsArgs.element;Aa.mouseup(t,this.eventsArgs.options),xa.isIE&&this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex);var e=xa.isFirefox||xa.isSafari||xa.isChrome&&53<=xa.version,n=e||xa.isIE;return e&&this.clickCausesChange&&Aa.input(this.parentSelect),n&&this.clickCausesChange&&Aa.change(this.parentSelect),Pa.resolve()},Fa.prototype._click=function(){Aa.click(this.eventsArgs.element,this.eventsArgs.options)},Fa.prototype.run=function(){var t=this;if(!this.parentSelect)return Aa.click(this.eventsArgs.element,this.eventsArgs.options),Pa.resolve();this.optionListExpanded||ka.scrollOptionListByChild(this.element);var e=this._getMoveArguments();return this.eventsArgs=this._calculateEventArguments(),Ua.getSelectElementSize(this.parentSelect)<=1?this._move(e).then(function(){return t._click()}):this._move(e).then(function(){return t._mousedown()}).then(function(){return t._mouseup()}).then(function(){return t._click()})},Fa);function Fa(t,e){var n,i,o,r,s;this.element=t,this.modifiers=e.modifiers,this.caretPos=e.caretPos,this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.speed=e.speed,this.automationSettings=new vo(e.speed),this.parentSelect=Da.getSelectParent(this.element),this.optionListExpanded=!!this.parentSelect&&Oa.isOptionListExpanded(this.parentSelect),this.childIndex=null,this.clickCausesChange=!1,this.parentSelect&&(n=Da.isOptionElement(this.element),i=this.parentSelect.selectedIndex,this.childIndex=Da.getElementIndexInParent(this.parentSelect,this.element),o=Ma.nodeParentNodeGetter.call(this.element),r=Da.isOptionGroupElement(o)?o:null,s=this.element.disabled||r&&r.disabled,this.clickCausesChange=n&&!s&&this.childIndex!==i),this.eventsArgs={options:this.modifiers,element:this.element}}var La,Ra=h.utils.featureDetection,Va=h.utils.browser,Wa=h.eventSandbox.eventSimulator,Ya=E.eventUtils,Ka=E.delay,Xa=Ra.isTouchDevice?0:160,Ha=(_(Ga,La=hl),Ga.prototype._firstClick=function(t){var e=this,n=new xr(this.options);n.speed=1;var i=new da(this.element,n,ef,tl);return i.on(i.TARGET_ELEMENT_FOUND_EVENT,function(t){return e.emit(e.TARGET_ELEMENT_FOUND_EVENT,t)}),i.run(t).then(function(t){return Ka(Xa).then(function(){return t})})},Ga.prototype._secondClick=function(t){var e=this;Va.isIE&&Ya.bind(nf,"focus",Ya.preventDefault,!0);var n=new xr({offsetX:t.screenPoint.x,offsetY:t.screenPoint.y,caretPos:this.caretPos,modifiers:this.modifiers,speed:1}),i=new da(nf.documentElement,n,ef,tl);return i.run().then(function(t){return e.eventState.dblClickElement=i.strategy.eventState.clickElement,Va.isIE&&Ya.unbind(nf,"focus",Ya.preventDefault,!0),t})},Ga.prototype._dblClick=function(t){this.eventState.dblClickElement&&Wa.dblclick(this.eventState.dblClickElement,t.options)},Ga.prototype.run=function(t){var e=this;return this._firstClick(t).then(function(t){return e._secondClick(t)}).then(function(t){return e._dblClick(t)})},Ga);function Ga(t,e){var n=La.call(this,t,e,ef,tl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.speed=e.speed,n.automationSettings=new vo(n.speed),n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.eventArgs=null,n.eventState={dblClickElement:null},n}var qa,za=function(){this.enabled=!1,this.dropAllowed=!1,this.element=null,this.dataTransfer=null,this.dataStore=null},ja=h.nativeMethods,$a=h.utils.featureDetection,Qa=h.utils.html,Za=h.utils.url,Ja=h.eventSandbox.DataTransfer,tu=h.eventSandbox.DragDataStore,eu=E.eventUtils,nu=E.domUtils,iu=(_(ou,qa=Hs),ou.create=function(o,r,s,l){return w(this,void 0,void 0,function(){var e,n,i;return P(this,function(t){switch(t.label){case 0:return[4,Hs.getTarget(o,s,new x(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new ou(n,i,r,s,l)]}})})},ou.prototype._getCursorSpeed=function(){return this.automationSettings.draggingSpeed},ou.prototype._getEventSequenceOptions=function(t){var e=qa.prototype._getEventSequenceOptions.call(this,t),n=e.eventOptions,i=e.eventSequenceOptions;return n.dataTransfer=this.dragAndDropState.dataTransfer,n.buttons=eu.BUTTONS_PARAMETER.leftButton,i.holdLeftButton=!0,{eventOptions:n,eventSequenceOptions:i}},ou.prototype._getCorrectedTopElement=function(t){return this.touchMode?this.dragElement:t},ou.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions,o=Xs(this.dragAndDropState.enabled,this.firstMovingStepOccured,i).run(t,as(),n,this.dragElement,this.dragAndDropState.dataStore),r=o.dragAndDropMode,s=o.dropAllowed;this.dragAndDropState.enabled=r,this.dragAndDropState.dropAllowed=s},ou.prototype._needMoveCursorImmediately=function(){return!1},ou.prototype.run=function(){var l=this;return Bt(this.cursor.getPosition()).then(function(t){l.dragElement=t;var e,n,i,o,r,s=function(t){for(var e=t;e;){if(e.draggable)return e;e=ja.nodeParentNodeGetter.call(e)}return null}(l.dragElement);return s&&$a.hasDataTransfer&&!l.skipDefaultDragBehavior&&(l.dragAndDropState.enabled=!0,l.dragElement=s,l.dragAndDropState.element=l.dragElement,l.dragAndDropState.dataStore=new tu,l.dragAndDropState.dataTransfer=new Ja(l.dragAndDropState.dataStore),((e=nu.isAnchorElement(l.dragElement))||nu.isImgElement(l.dragElement))&&(n=e?"href":"src",o=(i=Za.parseProxyUrl(l.dragElement[n]))?i.destUrl:l.dragElement[n],r=Qa.cleanUpHtml(ja.elementOuterHTMLGetter.call(l.dragElement)),l.dragAndDropState.dataTransfer.setData("text/plain",o),l.dragAndDropState.dataTransfer.setData("text/uri-list",o),l.dragAndDropState.dataTransfer.setData("text/html",r))),qa.prototype.run.call(l).then(function(){return l.dragAndDropState})})},ou);function ou(t,e,n,i,o){var r=qa.call(this,t,e,n,i,o)||this;return r.dragElement=null,r.dragAndDropState=new za,r}var ru,su=h.Promise,lu=h.utils.extend,au=h.utils.featureDetection,uu=h.eventSandbox.eventSimulator,cu=h.eventSandbox.focusBlur,hu=(_(fu,ru=hl),fu.prototype._getEndPoint=function(){throw new Error("Not implemented")},fu.prototype._mousedown=function(t){var e=this;return tl.leftButtonDown().then(function(){return e.simulateDefaultBehavior=uu[e.downEvent](t.element,t.options),e._focus(t)})},fu.prototype._focus=function(n){var i=this;return new su(function(t){var e=g.domUtils.isContentEditableElement(i.element)?g.contentEditable.findContentEditableParent(i.element):n.element;cu.focus(e,t,!1,!0)})},fu.prototype._getDestination=function(){throw new Error("Not implemented")},fu.prototype._drag=function(){var r=this;return this._getDestination().then(function(t){var e=t.element,n=t.offsets,i=t.endPoint;r.endPoint=i;var o=new Tr({offsetX:n.offsetX,offsetY:n.offsetY,modifiers:r.modifiers,speed:r.speed,minMovingTime:25,skipDefaultDragBehavior:!1===r.simulateDefaultBehavior},!1);return iu.create(e,o,ef,tl)}).then(function(t){return t.run()}).then(function(t){return r.dragAndDropState=t,g.delay(r.automationSettings.mouseActionStepDelay)})},fu.prototype._mouseup=function(){var o=this;return tl.buttonUp().then(function(){var e=g.positionUtils.offsetToClientCoords(o.endPoint),n=null,i=lu({clientX:e.x,clientY:e.y},o.modifiers);return Bt(e).then(function(t){return(n=t)?(o.dragAndDropState.enabled?(i.dataTransfer=o.dragAndDropState.dataTransfer,o.dragAndDropState.dropAllowed&&uu.drop(n,i),uu.dragend(o.dragAndDropState.element,i),o.dragAndDropState.dataStore.setProtectedMode()):uu[o.upEvent](n,i),Bt(e)):n}).then(function(t){n&&t===n&&!o.dragAndDropState.enabled&&uu.click(n,i)})})},fu.prototype.run=function(t){var i,o=this;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint;return i={point:n,element:e,options:lu({clientX:n.x,clientY:n.y},o.modifiers)},su.all([g.delay(o.automationSettings.mouseActionStepDelay),o._mousedown(i)])}).then(function(){return o._drag()}).then(function(){return o._mouseup()})},fu);function fu(t,e){var n=ru.call(this,t,e,ef,tl)||this;return n.modifiers=e.modifiers,n.speed=e.speed,n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.endPoint=null,n.simulateDefaultBehavior=!0,n.downEvent=au.isTouchDevice?"touchstart":"mousedown",n.upEvent=au.isTouchDevice?"touchend":"mouseup",n.dragAndDropState=null,n}var du,mu=E.styleUtils,pu=(_(vu,du=hu),vu.prototype._getDestination=function(){return w(this,void 0,void 0,function(){var e,n,i,o;return P(this,function(t){switch(t.label){case 0:return[4,_t(this.element,{x:this.offsetX,y:this.offsetY})];case 1:return e=t.sent(),n=mu.getWidth(nf),i=mu.getHeight(nf),o={x:e.x+this.dragOffsetX,y:e.y+this.dragOffsetY},o={x:Math.min(Math.max(0,o.x),n),y:Math.min(Math.max(0,o.y),i)},[2,{element:nf.documentElement,offsets:{offsetX:o.x,offsetY:o.y},endPoint:o}]}})})},vu);function vu(t,e,n,i){var o=du.call(this,t,i)||this;return o.dragOffsetX=e,o.dragOffsetY=n,o}var gu,yu=E.positionUtils,Eu=(_(bu,gu=hu),bu.prototype._getDestination=function(){return w(this,void 0,void 0,function(){var e,n,i,o;return P(this,function(t){return e=this.destinationElement,n=yu.getElementRectangle(e),i=Ut(e,this.destinationOffsetX,this.destinationOffsetY),o={x:n.left+i.offsetX,y:n.top+i.offsetY},[2,{element:e,offsets:i,endPoint:o}]})})},bu);function bu(t,e,n){var i=gu.call(this,t,n)||this;return i.destinationElement=e,i.destinationOffsetX=n.destinationOffsetX,i.destinationOffsetY=n.destinationOffsetY,i}var Su,_u=(_(wu,Su=hl),wu.prototype.run=function(t){return this._ensureElement(t,!0)},wu);function wu(t,e){return Su.call(this,t,e,ef,tl)||this}var Pu=h.utils.browser,xu=h.sandbox.event,Cu=h.eventSandbox.eventSimulator,Au=h.eventSandbox.listeners,Tu=h.nativeMethods,Mu=E.domUtils,Du=E.contentEditable,Uu=E.textSelection,Iu=/ /g;function Ou(t){var e=Uu.getSelectionByElement(t),n=Uu.hasInverseSelectionContentEditable(t);return Uu.hasElementContainsSelection(t)?Du.getSelection(t,e,n):{startPos:Du.calculateNodeAndOffsetByPosition(t,0),endPos:Du.calculateNodeAndOffsetByPosition(t,0)}}function ku(t){var e=t.startPos.node,n=t.startPos.offset,i=t.endPos.offset,o=Du.getFirstNonWhitespaceSymbolIndex(e.nodeValue),r=Du.getLastNonWhitespaceSymbolIndex(e.nodeValue);return n<o&&0!==n?(t.startPos.offset=o,t.endPos.offset=i+o-n):r<i&&i!==e.nodeValue.length&&(t.startPos.offset=e.nodeValue.length,t.endPos.offset=i+e.nodeValue.length-n),t}function Nu(t,e,n){return!n||Cu.beforeInput(t,e)}function Bu(t,e){var n;function i(t){t.preventDefault(),n=!0}function o(t){"textInput"===t.type&&(n=!1)}Pu.isSafari&&(Au.addInternalEventBeforeListener(ef,["textInput"],i),xu.on(xu.EVENT_PREVENTED_EVENT,o));var r=Pu.isFirefox||Cu.textInput(t,e)||n;return Pu.isSafari&&(Au.removeInternalEventBeforeListener(ef,["textInput"],i),xu.off(xu.EVENT_PREVENTED_EVENT,o)),r||Pu.isIE11}function Fu(t,e){var n,i,o,r,s,l,a,u,c,h,f,d=Ou(t),m=d.startPos.node,p=d.endPos.node,v=!0,g=!0,y=e;function E(){g=!1}function b(t,e,n){n()}e=e.replace(Iu,String.fromCharCode(160)),m&&p&&Mu.isContentEditableElement(m)&&Mu.isContentEditableElement(p)&&(Mu.isTheSameNode(m,p)||(Uu.deleteSelectionContents(t),n=t,o=(i=d).startPos.node,r=Tu.nodeParentNodeGetter.call(o)&&o.parentElement,!(Pu.isChrome&&Pu.version<58||Pu.isSafari)&&r&&Mu.isElementContainsNode(n,o)||(i=Ou(n),Uu.hasInverseSelectionContentEditable(n)&&(i={startPos:i.endPos,endPos:i.startPos})),i.endPos.offset=i.startPos.offset,m=(d=i).startPos.node),m&&Mu.isContentEditableElement(m)&&Mu.isRenderedNode(m)&&Nu(t,e,Pu.isChrome||Pu.isFirefox)&&(v=Bu(t,y),g=v&&!Pu.isIE11,Au.addInternalEventBeforeListener(ef,["input"],E),Au.addInternalEventBeforeListener(ef,["textinput"],b),(v=v&&Nu(t,e,Pu.isSafari))&&(Mu.isElementNode(m)?(s=m,l=e,c=nf.createTextNode(l),h={node:c,offset:l.length},f=Tu.nodeParentNodeGetter.call(s),"br"===Mu.getTagName(s)?f.insertBefore(c,s):0<a?(u=Tu.nodeChildNodesGetter.call(s),s.insertBefore(c,u[a])):s.appendChild(c),Uu.selectByNodesAndOffsets(h,h)):function(t,e,n){var i=e.startPos.node;Mu.isElementContainsNode(t,i)||(i=(e=ku(Ou(t))).startPos.node);var o=e.startPos.offset,r=e.endPos.offset,s=i.nodeValue,l={node:i,offset:o+n.length};i.nodeValue=s.substring(0,o)+n+s.substring(r,s.length),Uu.selectByNodesAndOffsets(l,l)}(t,ku(d),e)),So().then(function(){g&&Cu.input(t,e),Au.removeInternalEventBeforeListener(ef,["input"],E),Au.removeInternalEventBeforeListener(ef,["textinput"],b)})))}function Lu(t,e,n){var i,o,r,s,l,a,u,c,h,f,d,m,p;Mu.isContentEditableElement(t)&&Fu(t,e),Mu.isElementReadOnly(t)||(Mu.isTextEditableElement(t)?(l=t,a=e,h=Mu.getElementValue(l),f=a.length,d=Uu.getSelectionStart(l),m=Uu.getSelectionEnd(l),p=Mu.isInputElement(l)&&"number"===l.type,Nu(l,a,Pu.isChrome||Pu.isFirefox)&&Bu(l,a)&&Nu(l,a,Pu.isSafari)&&((u=!Pu.isIE&&p?null:parseInt(l.maxLength,10))<0&&(u=Pu.isIE&&Pu.version<17?0:null),c=h.substring(0,d)+a+h.substring(m,h.length),(null===u||isNaN(u)||c.length<=u)&&(p&&Pu.isIOS&&"."===h[h.length-1]&&(d+=1),Mu.setElementValue(l,c),Uu.select(l,d+f,d+f)),Cu.input(l,a))):Mu.isInputElement(t)&&(i=t,o=e,null!==(r=n)?(s=Mu.getElementValue(i),Mu.setElementValue(i,s.substr(0,r)+o+s.substr(r+o.length))):Mu.setElementValue(i,o),Cu.change(i),Cu.input(i,o)))}function Ru(t){return 1===t.length&&("a"<=t&&t<="z"||"A"<=t&&t<="Z")}var Vu=h.nativeMethods,Wu=h.utils.browser,Yu=h.eventSandbox.focusBlur,Ku=h.Promise,Xu=g.domUtils.isRadioButtonElement,Hu=g.domUtils.getActiveElement,Gu=g.domUtils.getTabIndexAttributeIntValue;function qu(t){return t===t.toLowerCase()?t.toUpperCase():t.toLowerCase()}function zu(t){var e=Hu(t||nf),n=null;if(e&&g.domUtils.isIframeElement(e)&&Vu.contentDocumentGetter.call(e))try{n=zu(Vu.contentDocumentGetter.call(e))}catch(t){}return n||e}function ju(t,e,n){if(!Xu(e))return t;if(!n&&!e.name&&!Wu.isChrome)return[e];var i,o,r=(i=e,o=null,n?""===i.name||Wu.isFirefox||(o=function(t){return!t.name||t===i||t.name!==i.name}):""!==i.name?o=function(t){return Xu(t)&&t.name===i.name}:Wu.isChrome&&(o=function(t){return Xu(t)&&!t.name}),o);return r&&(t=g.arrayUtils.filter(t,r)),t}function $u(t,e,n){var i,o,r,s,l,a,u,c,h=e?-1:1,f=g.domUtils.getTopSameDomainWindow(ef).document,d=(i=f,o=Vu.documentActiveElementGetter.call(i),r=o&&Gu(o),!(o&&r<0)),m=ju(m=g.domUtils.getFocusableElements(f,d),t,n),p=Xu(t),v=g.arrayUtils.indexOf(m,t);return(e?0===v:v===m.length-1)?!e&&t.tabIndex<0?g.arrayUtils.find(m,function(t){return 0===t.tabIndex}):n||!p?nf.body:m[m.length-1-v]:e&&-1===v?m[m.length-1]:(l=(s=m)[v+h],a=n,u=Xu(l)&&l.name&&!l.checked,c=null,a&&u&&(c=g.arrayUtils.find(s,function(t){return Xu(t)&&t.name===l.name&&t.checked})),c||l)}function Qu(t){if(Ru(t))return t.toUpperCase().charCodeAt(0);var e=g.KEY_MAPS.shiftMap[t]?g.KEY_MAPS.shiftMap[t].charCodeAt(0):t.charCodeAt(0);return g.KEY_MAPS.symbolCharCodeToKeyCode[e]||e}var Zu={SPECIAL_KEYS:{capslock:"CapsLock",delete:"U+007F",end:"End",enter:"Enter",esc:"U+001B",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:"U+0020",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"},LETTERS:{a:"U+0041",b:"U+0042",c:"U+0043",d:"U+0044",e:"U+0045",f:"U+0046",g:"U+0047",h:"U+0048",i:"U+0049",j:"U+004A",k:"U+004B",l:"U+004C",m:"U+004D",n:"U+004E",o:"U+004F",p:"U+0050",q:"U+0051",r:"U+0052",s:"U+0053",t:"U+0054",u:"U+0055",v:"U+0056",w:"U+0057",x:"U+0058",y:"U+0059",z:"U+005A"},SYMBOLS:{0:"U+0030",1:"U+0031",2:"U+0032",3:"U+0033",4:"U+0034",5:"U+0035",6:"U+0036",7:"U+0037",8:"U+0038",9:"U+0039"," ":"U+0020","!":"U+0021","@":"U+0040","#":"U+0023",$:"U+0024","%":"U+0025","^":"U+005E","*":"U+002A","(":"U+0028",")":"U+0029",_:"U+005F","|":"U+007C","\\":"U+005C","/":"U+002F","?":"U+003F",".":"U+002E",",":"U+002C","<":"U+003C",">":"U+003E","[":"U+005B","]":"U+005D","{":"U+007B","}":"U+007D","§":"U+00A7","±":"U+00B1","'":"U+0027",'"':"U+0022",":":"U+003A",";":"U+003B","`":"U+0060","~":"U+007E"}};function Ju(t){return Ru(t)?Zu.LETTERS[t.toLowerCase()]:Zu.SYMBOLS[t]||Zu.SPECIAL_KEYS[t]||t}function tc(t,e,n){var i={};return"keyIdentifier"in KeyboardEvent.prototype&&(i.keyIdentifier=t?"":n),"key"in KeyboardEvent.prototype&&(i.key=e),i}var ec=h.utils.browser,nc=h.utils.extend,ic=h.eventSandbox.eventSimulator,oc=(rc._isKeyActivatedInputElement=function(t){return g.domUtils.isInputElement(t)&&/button|submit|reset|radio|checkbox/.test(t.type)},rc.prototype._type=function(t,e){var n,i=t!==this.storedActiveElement,o=!i,r=t,s=g.domUtils.isEditableElement(t),l=g.domUtils.isEditableElement(this.storedActiveElement);try{i&&(n=g.domUtils.isElementInIframe(t)===g.domUtils.isElementInIframe(this.storedActiveElement)||l,o=(!ec.isFirefox||l)&&(!ec.isWebKit||n))}catch(t){}o&&(!ec.isIE&&i&&l&&s&&(r=this.storedActiveElement),Lu(r,e))},rc.prototype._addKeyPropertyToEventOptions=function(t){return nc(t,tc("keypress"===t.type,this.keyProperty,this.keyIdentifierProperty)),t},rc.prototype.down=function(t){this.storedActiveElement=zu(this.topSameDomainDocument),this.modifierKeyCode&&(t[this.sanitizedKey]=!0),t.shift&&this.isLetter&&(this.keyProperty=qu(this.keyProperty));var e={keyCode:this.keyCode,type:"keydown"};return this._addKeyPropertyToEventOptions(e),ic.keydown(this.storedActiveElement,nc(e,t))},rc.prototype.press=function(t){if(!this.isChar&&!this.specialKeyCode)return!0;var e=zu(this.topSameDomainDocument),n=this.isChar?function(t,e){if("space"===t)return" ";if(e){if(Ru(t))return qu(t);if(g.KEY_MAPS.reversedShiftMap[t])return g.KEY_MAPS.reversedShiftMap[t]}return t}(this.sanitizedKey,t.shift):null,i=this.specialKeyCode||n.charCodeAt(0),o=e!==this.storedActiveElement;if(ec.isWebKit&&o&&g.domUtils.isElementInIframe(e)!==g.domUtils.isElementInIframe(this.storedActiveElement))return!0;this.storedActiveElement=e;var r={keyCode:i,charCode:i,type:"keypress"};this._addKeyPropertyToEventOptions(r);var s=ec.isAndroid||ic.keypress(e,nc(r,t));if(!s)return s;e=zu(this.topSameDomainDocument),!n||t.ctrl||t.alt||this._type(e,n);var l=rc._isKeyActivatedInputElement(e),a=g.domUtils.isButtonElement(e);return ec.isSafari&&0<=ec.compareVersions([ec.webkitVersion,"603.1.30"])||!l&&!a||"enter"!==this.sanitizedKey||e.click(),s},rc.prototype.up=function(t){this.modifierKeyCode&&(t[this.sanitizedKey]=!1);var e={keyCode:this.keyCode,type:"keyup"};this._addKeyPropertyToEventOptions(e);var n=ic.keyup(zu(this.topSameDomainDocument),nc(e,t)),i=zu(this.topSameDomainDocument);return!ec.isFirefox&&!ec.isSafari&&(!ec.isChrome||53<=ec.version)&&n&&"space"===this.sanitizedKey&&rc._isKeyActivatedInputElement(i)&&i.click(),n},Object.defineProperty(rc.prototype,"key",{get:function(){return this.sanitizedKey},enumerable:!1,configurable:!0}),rc);function rc(t,e){this.isLetter=Ru(t),this.isChar=1===t.length||"space"===t,this.sanitizedKey=g.getSanitizedKey(t),this.modifierKeyCode=g.KEY_MAPS.modifiers[this.sanitizedKey],this.specialKeyCode=g.KEY_MAPS.specialKeys[this.sanitizedKey],this.keyCode=null,this.keyIdentifierProperty=Ju(e),this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(ef).document,this.keyProperty=g.KEY_MAPS.keyProperty[e]||e,this.isChar&&"space"!==t?this.keyCode=Qu(this.sanitizedKey):this.modifierKeyCode?this.keyCode=this.modifierKeyCode:this.specialKeyCode&&(this.keyCode=this.specialKeyCode),this.storedActiveElement=null}var sc,lc={ctrlA:"ctrl+a",backspace:"backspace",delete:"delete",left:"left",right:"right",up:"up",down:"down",shiftLeft:"shift+left",shiftRight:"shift+right",shiftUp:"shift+up",shiftDown:"shift+down",shiftHome:"shift+home",shiftEnd:"shift+end",home:"home",end:"end",enter:"enter",tab:"tab",shiftTab:"shift+tab",esc:"esc"},ac=h.Promise,uc=h.utils.browser,cc=h.eventSandbox.eventSimulator,hc=h.eventSandbox.elementEditingWatcher,fc=E.textSelection,dc=E.eventUtils,mc=E.domUtils,pc=i.selectElement,vc=null,gc=null;function yc(){gc=vc=null,dc.unbind(this,"blur",yc,!0)}function Ec(t){var e,n,i,o;mc.isTextAreaElement(t)&&(vc!==t&&(dc.bind(t,"blur",yc,!0),vc=t),e=t,n=fc.hasInverseSelection(e),i=mc.getTextAreaValue(e),o=n?fc.getSelectionStart(e):fc.getSelectionEnd(e),gc=i&&o?mc.getTextareaIndentInLine(e,o):0)}function bc(t,e){var n,i,o,r,s,l,a=mc.getTextAreaValue(t);a&&(n=fc.getSelectionStart(t),i=fc.getSelectionEnd(t),o=fc.hasInverseSelection(t),s=(r=a.substring(0,o?n:i)).lastIndexOf("\n"),l=r.substring(0,s),null!==gc&&vc===t||Ec(t),s=l.lastIndexOf("\n"),_c(t,n,i,o,Math.min(s+1+gc,l.length),e))}function Sc(t,e){var n,i,o,r,s,l,a,u,c,h,f=mc.getTextAreaValue(t);f&&(n=fc.getSelectionStart(t),i=fc.getSelectionEnd(t),u=(r=(o=fc.hasInverseSelection(t))?n:i)+(l=-1===(c=(s=f.substring(r)).indexOf("\n"))?s.length:c+1),h=-1===(c=(a=s.substring(l)).indexOf("\n"))?a.length:c,null!==gc&&vc===t||Ec(t),_c(t,n,i,o,u=Math.min(u+gc,u+h),e))}function _c(t,e,n,i,o,r){var s=null,l=null,l=r?(s=e!==n&&i?n:e,o):s=o;fc.select(t,s,l)}function wc(t,e,n){mc.isInputElement(t)&&"number"===t.type&&("-"===e.charAt(0)&&"."===e.charAt(1)&&(e=e.substring(1)),"."===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1))),mc.setElementValue(t,e),fc.select(t,n,n),cc.input(t)}function Pc(t,e){var n,i,o,r,s,l,a,u;return mc.isTextEditableElement(t)&&(n=fc.getSelectionStart(t),i=fc.getSelectionEnd(t),o=fc.hasInverseSelection(t),s=null,s=(r=!mc.isTextAreaElement(t)||mc.getTextareaLineNumberByPosition(t,n)===mc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,a=-1===(l=mc.getElementValue(t).substring(0,s).lastIndexOf("\n"))?0:l+1,u=null,r?(u=e?s:a,fc.select(t,u,a)):o?fc.select(t,i,a):fc.select(t,n,a)),ac.resolve()}function xc(t,e){var n,i,o,r,s,l,a,u,c;return mc.isTextEditableElement(t)&&(n=fc.getSelectionStart(t),i=fc.getSelectionEnd(t),o=fc.hasInverseSelection(t),s=null,u=s=(r=!mc.isTextAreaElement(t)||mc.getTextareaLineNumberByPosition(t,n)===mc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,c=null,u+=-1===(a=(l=mc.getElementValue(t).substring(s)).indexOf("\n"))?l.length:a,r?(c=e?s:u,fc.select(t,c,u)):o?fc.select(t,i,u):fc.select(t,n,u)),ac.resolve()}function Cc(t){return Pc(t,!0)}function Ac(t){return xc(t,!0)}function Tc(t){return mc.isRadioButtonElement(t)}function Mc(t,e){return Dc(t,e,!1).then(function(t){t&&(t.checked=!0)})}function Dc(t,e,n){return void 0===n&&(n=!0),t?(mc.isSelectElement(t)&&pc.collapseOptionList(),i=t,o=e,r=n,new Ku(function(t){var e=$u(i,o,r);e?Yu.focus(e,function(){return t(e)}):t()}).then(function(t){return t&&mc.isTextEditableInput(t)&&fc.select(t),t})):ac.resolve();var i,o,r}var Uc=((sc={})[lc.ctrlA]=function(t){return mc.isEditableElement(t)&&fc.select(t),ac.resolve()},sc[lc.backspace]=function(t){var e,n,i;return mc.isTextEditableElementAndEditingAllowed(t)&&(e=fc.getSelectionStart(t),n=fc.getSelectionEnd(t),i=mc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?0<e&&wc(t,i.substring(0,e-1)+i.substring(n,i.length),e-1):wc(t,i.substring(0,e)+i.substring(n,i.length),e)),mc.isContentEditableElement(t)&&fc.deleteSelectionContents(t),ac.resolve()},sc[lc.delete]=function(t){var e,n,i;return mc.isTextEditableElementAndEditingAllowed(t)&&(e=fc.getSelectionStart(t),n=fc.getSelectionEnd(t),i=mc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?e<i.length&&wc(t,i.substring(0,e)+i.substring(n+1,i.length),e):wc(t,i.substring(0,e)+i.substring(n,i.length),e)),mc.isContentEditableElement(t)&&fc.deleteSelectionContents(t),ac.resolve()},sc[lc.left]=function(t){var e,n,i,o,r=null;return mc.isSelectElement(t)&&pc.switchOptionsByKeys(t,"left"),Tc(t)?Mc(t,!0):(mc.isTextEditableElement(t)&&(e=(r=fc.getSelectionStart(t)||0)===fc.getSelectionEnd(t)?r-1:r,fc.select(t,e,e),Ec(t)),mc.isContentEditableElement(t)&&(r=fc.getSelectionStart(t))!==fc.getSelectionEnd(t)&&(n=fc.getSelectionByElement(t),o={node:(i=fc.hasInverseSelectionContentEditable(t))?n.focusNode:n.anchorNode,offset:i?n.focusOffset:n.anchorOffset},fc.selectByNodesAndOffsets(o,o,!0)),ac.resolve())},sc[lc.right]=function(t){var e,n,i,o,r=null,s=null;return mc.isSelectElement(t)&&pc.switchOptionsByKeys(t,"right"),Tc(t)?Mc(t,!1):(mc.isTextEditableElement(t)&&(e=(r=fc.getSelectionStart(t))===(s=fc.getSelectionEnd(t))?s+1:s,r===mc.getElementValue(t).length&&(e=r),fc.select(t,e,e),Ec(t)),mc.isContentEditableElement(t)&&(r=fc.getSelectionStart(t))!==(s=fc.getSelectionEnd(t))&&(n=fc.getSelectionByElement(t),o={node:(i=fc.hasInverseSelectionContentEditable(t))?n.anchorNode:n.focusNode,offset:i?n.anchorOffset:n.focusOffset},fc.selectByNodesAndOffsets(o,o,!0)),ac.resolve())},sc[lc.up]=function(t){return mc.isSelectElement(t)&&pc.switchOptionsByKeys(t,"up"),Tc(t)?Mc(t,!0):uc.isWebKit&&mc.isInputElement(t)?Pc(t):(mc.isTextAreaElement(t)&&bc(t,!1),ac.resolve())},sc[lc.down]=function(t){return mc.isSelectElement(t)&&pc.switchOptionsByKeys(t,"down"),Tc(t)?Mc(t,!1):uc.isWebKit&&mc.isInputElement(t)?xc(t):(mc.isTextAreaElement(t)&&Sc(t,!1),ac.resolve())},sc[lc.shiftLeft]=function(t){var e,n;return mc.isTextEditableElement(t)&&((e=fc.getSelectionStart(t))===(n=fc.getSelectionEnd(t))||fc.hasInverseSelection(t)?fc.select(t,n,Math.max(e-1,0)):fc.select(t,e,Math.max(n-1,0)),Ec(t)),ac.resolve()},sc[lc.shiftRight]=function(t){var e,n,i;return mc.isTextEditableElement(t)&&(e=fc.getSelectionStart(t),n=fc.getSelectionEnd(t),i=mc.getElementValue(t).length,e!==n&&fc.hasInverseSelection(t)?fc.select(t,n,Math.min(e+1,i)):fc.select(t,e,Math.min(n+1,i)),Ec(t)),ac.resolve()},sc[lc.shiftUp]=function(t){return uc.isWebKit&&mc.isInputElement(t)?Cc(t):(mc.isTextAreaElement(t)&&bc(t,!0),ac.resolve())},sc[lc.shiftDown]=function(t){return uc.isWebKit&&mc.isInputElement(t)?Ac(t):(mc.isTextAreaElement(t)&&Sc(t,!0),ac.resolve())},sc[lc.shiftHome]=Cc,sc[lc.shiftEnd]=Ac,sc[lc.home]=Pc,sc[lc.end]=xc,sc[lc.enter]=function(t){var e,n,i,o,r,s;return mc.isSelectElement(t)&&pc.collapseOptionList(),mc.isInputElement(t)?(uc.isIE||hc.processElementChanging(t),(e=mc.getParents(t,"form")[0])&&function(t,e){var n=t.querySelectorAll("input, button"),i=null,o=null;for(o=0;o<n.length;o++)if(!i&&"submit"===n[o].type&&!n[o].disabled){i=n[o];break}if(i)cc.click(i);else if(mc.blocksImplicitSubmission(e)){for(var r=t.getElementsByTagName("input"),s=[],o=0;o<r.length;o++)mc.blocksImplicitSubmission(r[o])&&s.push(r[o]);1===s.length&&s[0]===e&&e.validity.valid&&cc.submit(t)&&t.submit()}}(e,t)):mc.isTextAreaElement(t)?(n=fc.getSelectionStart(t),o=(i=mc.getTextAreaValue(t)).substring(0,n),r=i.substring(n),s=n+1,wc(t,o+String.fromCharCode(10)+r,s)):t.tagName&&mc.isAnchorElement(t)&&cc.click(t),ac.resolve()},sc[lc.tab]=function(t){return Dc(t,!1)},sc[lc.shiftTab]=function(t){return Dc(t,!0)},sc[lc.esc]=function(t){return mc.isSelectElement(t)&&pc.collapseOptionList(),ac.resolve()},sc),Ic=h.Promise,Oc=h.utils.browser,kc=h.eventSandbox.message,Nc=h.nativeMethods,Bc="automation|press|request",Fc="automation|press|response";kc.on(kc.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===Bc&&(h.on(h.EVENTS.beforeUnload,function(){return kc.sendServiceMsg({cmd:Fc},t.source)}),new Lc(t.message.keyCombinations,t.message.options).run().then(function(){return kc.sendServiceMsg({cmd:Fc},t.source)}))});var Lc=(Rc._getKeyPressSimulators=function(t){var e=function(t){for(var e=t.slice(),n=0;n<t.length;n++){var i=t[n];if("shift"===i.toLowerCase()){var o=t[n+1];if(!o)continue;g.KEY_MAPS.shiftMap[o]?t[n+1]=g.KEY_MAPS.shiftMap[o]:g.KEY_MAPS.reversedShiftMap[o]&&(e[n+1]=g.KEY_MAPS.reversedShiftMap[o])}!g.KEY_MAPS.shiftMap[i]||t[n-1]&&"shift"===t[n-1].toLowerCase()||(t[n]=g.KEY_MAPS.shiftMap[i],t.splice(n,0,"shift"),e.splice(n,0,"shift"),n++)}return{actualKeys:t,eventKeyProperties:e}}(g.getKeyArray(t)),n=e.actualKeys,i=e.eventKeyProperties;return g.arrayUtils.map(n,function(t,e){return new oc(t,i[e])})},Rc._getShortcuts=function(t){for(var e=g.getKeyArray(t.toLowerCase()),n=[],i=[],o=[],r=0;r<e.length;r++)for(i.push(e[r]),o=i.slice();o.length;){var s=o.join("+");Uc[s]?(n.push(s),i=o=[]):o.shift()}return n},Rc._getShortcutHandlers=function(t){for(var e,n,i,o=Rc._getShortcuts(t.toLowerCase()),r={},s="",l=0;l<o.length;l++)e=o[l],n=t.indexOf(e),i=e.length,r[s+=t.substring(0,n+i)]=Uc[e],t=t.substring(n+i);return r},Rc.prototype._down=function(t){this.pressedKeyString+=(this.pressedKeyString?"+":"")+t.key;var e=!t.down(this.modifiersState);return Ic.resolve(e)},Rc.prototype._press=function(t,e){var n=this;if(e&&!this.isSelectElement)return g.delay(this.automationSettings.keyActionStepDelay);var i=this.shortcutHandlers[this.pressedKeyString],o=!1;return i&&!Oc.isFirefox&&"enter"!==t.key||(o=!t.press(this.modifiersState)),o&&!this.isSelectElement||!i?g.delay(this.automationSettings.keyActionStepDelay):i(zu(this.topSameDomainDocument)).then(function(){return g.delay(n.automationSettings.keyActionStepDelay)})},Rc.prototype._up=function(t){return t.up(this.modifiersState),g.delay(this.automationSettings.keyActionStepDelay)},Rc.prototype._runCombination=function(t){var n=this;this.modifiersState={ctrl:!1,alt:!1,shift:!1,meta:!1},this.isSelectElement=g.domUtils.isSelectElement(zu(this.topSameDomainDocument)),this.pressedKeyString="",this.shortcutHandlers=Rc._getShortcutHandlers(t);var e=Rc._getKeyPressSimulators(t);return g.promiseUtils.each(e,function(e){return n._down(e).then(function(t){return n._press(e,t)})}).then(function(){return g.arrayUtils.reverse(e),g.promiseUtils.each(e,function(t){return n._up(t)})})},Rc.prototype.run=function(){var e=this,t=g.domUtils.getActiveElement(),n=g.domUtils.isIframeElement(t);if(!hs(ef)&&n&&Nc.contentWindowGetter.call(t)){var i={cmd:Bc,keyCombinations:this.keyCombinations,options:this.options};return g.sendRequestToFrame(i,Fc,Nc.contentWindowGetter.call(t))}return g.promiseUtils.each(this.keyCombinations,function(t){return e._runCombination(t).then(function(){return g.delay(e.automationSettings.keyActionStepDelay)})})},Rc);function Rc(t,e){this.keyCombinations=t,this.isSelectElement=!1,this.pressedKeyString="",this.modifiersState=null,this.shortcutHandlers=null,this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(ef).document,this.automationSettings=new vo(e.speed),this.options=e}var Vc,Wc=h.Promise,Yc=h.utils.extend,Kc=h.utils.browser,Xc=h.eventSandbox.eventSimulator,Hc=E.domUtils,Gc=E.eventUtils,qc=E.delay,zc=(_(jc,Vc=hl),jc.prototype._mousedown=function(t){var e=this;return tl.rightButtonDown().then(function(){return e.eventState.activeElementBeforeMouseDown=Hc.getActiveElement(),e.eventState.simulateDefaultBehavior=Xc.mousedown(t.element,t.options),e._focus(t)})},jc.prototype._focus=function(t){return!1===this.simulateDefaultBehavior?So():Ul(Hc.isContentEditableElement(this.element)?this.element:t.element,!Kc.isIE||this.eventState.activeElementBeforeMouseDown===Hc.getActiveElement(),this.caretPos).then(So)},jc.prototype._mouseup=function(e){var t=this;return tl.buttonUp().then(function(){return t._getElementForEvent(e)}).then(function(t){return Xc.mouseup(t,e.options)})},jc.prototype._contextmenu=function(e){return this._getElementForEvent(e).then(function(t){Xc.contextmenu(t,e.options),Hc.isElementFocusable(t)||Ol(t)})},jc.prototype.run=function(t){var o=this,r=null;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.devicePoint;return r={point:n,element:e,options:Yc({clientX:n.x,clientY:n.y,screenX:i.x,screenY:i.y,button:Gc.BUTTON.right},o.modifiers)},Wc.all([qc(o.automationSettings.mouseActionStepDelay),o._mousedown(r)])}).then(function(){return o._mouseup(r)}).then(function(){return o._contextmenu(r)})},jc);function jc(t,e){var n=Vc.call(this,t,e,ef,tl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.eventState={simulateDefaultBehavior:!0,activeElementBeforeMouseDown:null},n}var $c=h.utils.browser,Qc=E.domUtils,Zc=E.positionUtils,Jc=E.styleUtils,th=E.contentEditable,eh=E.arrayUtils,nh=["direction","font-family","font-size","font-size-adjust","font-variant","font-weight","font-style","letter-spacing","line-height","text-align","text-indent","text-transform","word-wrap","word-spacing","padding-top","padding-left","padding-right","padding-bottom","margin-top","margin-left","margin-right","margin-bottom","border-top-width","border-left-width","border-right-width","border-bottom-width"];function ih(t,e){var n,i,o,r,s,l=Jc.getBordersWidth(t),a=Zc.getOffsetPosition(t),u=t.scrollHeight||t.getBoundingClientRect().height,c=Math.ceil(e.left),h=Math.ceil(e.top),f=Math.floor(e.bottom);return Qc.isTextAreaElement(t)||(i=(n=Zc.offsetToClientCoords({x:a.left,y:a.top})).x+l.left+1,o=n.y+l.top+1,r=n.y+l.top+l.bottom+u,s=n.y+l.top+u-1,c=Math.ceil(c<=n.x?i:e.left),h=Math.ceil(h<=n.y?o:e.top),f=Math.floor(r<=f?s:e.bottom)),{left:c,top:h,bottom:f}}function oh(t){var e=Jc.getElementScroll(nf);return{left:t.left+e.left,top:t.top+e.top,bottom:t.bottom+e.top}}function rh(t,e){var n=t.getBoundingClientRect(),i=function(e){var t,n,i,o=nf.body,r=Zc.getOffsetPosition(e),s=Jc.getElementMargin(e),l=r.top-s.top,a=r.left-s.left,u=nf.createElement("div"),c="white-space:pre-wrap;border-style:solid;";return"absolute"===Jc.get(o,"position")&&(t=Jc.getElementMargin(o),n=Jc.get(o,"left"),i=Jc.get(o,"top"),a-=t.left+(parseInt(n.replace("px",""),10)||0),l-=t.top+(parseInt(i.replace("px",""),10)||0)),eh.forEach(nh,function(t){c+="".concat(t,":").concat(Jc.get(e,t),";")}),Jc.set(u,{cssText:c,position:"absolute",left:a+"px",top:l+"px",width:e.scrollWidth+"px",height:e.scrollHeight+"px"}),h.nativeMethods.nodeTextContentSetter.call(u,Qc.getElementValue(e)+" "),o.appendChild(u),u}(t),o=null,r=t.getBoundingClientRect(),s=r.top-n.top,l=r.left-n.left,a=Qc.getElementValue(t).length;try{var u=nf.createRange();u.setStart(h.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e,a)),u.setEnd(h.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e+1,a+1)),Qc.isTextAreaElement(t)&&(0!==(o=u.getBoundingClientRect()).width||0!==o.height)||(o=u.getClientRects()[0])}catch(t){o=null}return Qc.remove(i),o?{width:o.width,height:o.height,top:o.top-s,bottom:o.bottom-s,left:o.left-l,right:o.right-l}:null}function sh(t,e){var n,i,o,r,s,l,a=null;return(a=Qc.isContentEditableElement(t)?(o=t,r=e,s=Qc.findDocument(o).createRange(),l=th.calculateNodeAndOffsetByPosition(o,r),s.setStart(l.node,Math.min(l.offset,l.node.length)),s.setEnd(l.node,Math.min(l.offset,l.node.length)),s.getClientRects()[0]):"function"==typeof t.createTextRange?(n=e,(i=t.createTextRange()).collapse(!0),i.moveStart("character",n),i.moveEnd("character",n),i.collapse(!0),i.getBoundingClientRect()):rh(t,e))?{x:(a=oh(a=ih(t,a))).left,y:Math.floor(a.top+(a.bottom-a.top)/2)}:null}function lh(t,e){var n=Qc.isTextEditableElement(t),i=Qc.isContentEditableElement(t);return n&&0<Qc.getElementValue(t).length||i&&th.getContentEditableValue(t).length?sh(t,e):Zc.findCenter(t)}function ah(t,e,n){var i=Qc.findDocument(t).createRange();i.setStart(e,Math.min(n,e.length)),i.setEnd(e,Math.min(n,e.length));var o=i.getClientRects()[0];return o?{x:(o=oh(ih(t,o))).left,y:Math.floor(o.top+(o.bottom-o.top)/2)}:null}var uh,ch=h.Promise,hh=h.utils.browser,fh=h.utils.featureDetection,dh=h.eventSandbox.eventSimulator,mh=h.eventSandbox.focusBlur,ph=E.contentEditable,vh=E.domUtils,gh=E.positionUtils,yh=E.eventUtils,Eh=E.delay,bh=(_(Sh,uh=hl),Sh.prototype._calculateEventArguments=function(){var e=this,n=gh.offsetToClientCoords(this.clientPoint);return Bt(n).then(function(t){if(!t)throw new ni(null,{reason:gh.getElOutsideBoundsReason(e.element)});return{element:t,options:{clientX:n.x,clientY:n.y}}})},Sh.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Tr({offsetX:i,offsetY:o,speed:r},!1);return Hs.create(n,s,ef,tl).then(function(t){return t.run()}).then(function(){return Eh(e.automationSettings.mouseActionStepDelay)})},Sh.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,yh.preventDefault(t),yh.unbind(e.element,"mousedown",n)};yh.bind(this.element,"mousedown",n)},Sh.prototype._calculateAbsoluteStartPoint=function(){throw new Error("Not implemented")},Sh.prototype._calculateAbsoluteEndPoint=function(){throw new Error("Not implemented")},Sh.prototype._moveToPoint=function(t){!function(t,e){if(Qc.isEditableElement(t)){var n=Qc.isTextAreaElement(t);if(!Qc.isInputElement(t)||!($c.isFirefox||$c.isIE&&10<$c.version)){var i=Zc.getOffsetPosition(t),o=Jc.getBordersWidth(t),r=Jc.getElementScroll(t),s=e.x-i.left-o.left,l=e.y-i.top-o.top,a=null;if(n)return l<r.top&&(a=l),l>t.clientHeight+r.top&&(a=l-t.clientHeight),null!==a&&Jc.setScrollTop(t,Math.round(a));s<r.left&&(a=s),s>t.clientWidth+r.left&&(a=s-t.clientWidth),null!==a&&Jc.setScrollLeft(t,Math.round(a))}}}(this.element,t),this.clientPoint=function(t,e){var n=Qc.isTextEditableElement(t),i=Qc.isInputElement(t);if(!n&&!Qc.isContentEditableElement(t))return e;var o=Zc.getOffsetPosition(t),r=Jc.getBordersWidth(t),s=Jc.getElementScroll(t),l=o.left+r.left+t.clientWidth;return i&&n&&($c.isFirefox||$c.isIE&&10<$c.version)?{x:Math.min(e.x,l),y:e.y}:{x:e.x-s.left,y:e.y-s.top}}(this.element,t);var e={element:nf.documentElement,offsetX:this.clientPoint.x,offsetY:this.clientPoint.y,speed:this.speed};return this._move(e)},Sh.prototype._mousedown=function(){var n=this;return tl.leftButtonDown().then(function(){return n._calculateEventArguments()}).then(function(t){n.eventArgs=t;var e=(hh.isWebKit||hh.isIE)&&vh.isSelectElement(n.element);return e&&n._bindMousedownHandler(),n.eventState.simulateDefaultBehavior=dh[n.downEvent](n.eventArgs.element,n.eventArgs.options),!1===n.eventState.simulateDefaultBehavior&&(n.eventState.simulateDefaultBehavior=e&&!n.eventState.mousedownPrevented),n._focus()})},Sh.prototype._focus=function(){var n=this;return new ch(function(t){var e=vh.isContentEditableElement(n.element)?ph.findContentEditableParent(n.element):n.element;mh.focus(e,t,!1,!0)})},Sh.prototype._setSelection=function(){throw new Error("Not implemented")},Sh.prototype._mouseup=function(){var e=this;return tl.buttonUp().then(function(){return e._setSelection(),e._calculateEventArguments()}).then(function(t){e.eventArgs=t,dh[e.upEvent](e.eventArgs.element,e.eventArgs.options)})},Sh.prototype.run=function(){var t=this;return this.absoluteStartPoint=this._calculateAbsoluteStartPoint(),this.absoluteEndPoint=this._calculateAbsoluteEndPoint(),this._moveToPoint(this.absoluteStartPoint).then(function(){return t._mousedown()}).then(function(){return t._moveToPoint(t.absoluteEndPoint)}).then(function(){return t._mouseup()})},Sh);function Sh(t,e){var n=uh.call(this,t,e,ef,tl)||this;return n.absoluteStartPoint=null,n.absoluteEndPoint=null,n.clientPoint=null,n.speed=e.speed,n.downEvent=fh.isTouchDevice?"touchstart":"mousedown",n.upEvent=fh.isTouchDevice?"touchend":"mouseup",n.eventArgs={options:null,element:null},n.eventState={mousedownPrevented:!1,simulateDefaultBehavior:!0},n}var _h,wh=E.textSelection,Ph=E.domUtils,xh=E.positionUtils,Ch=(_(Ah,_h=bh),Ah.prototype._calculateAbsoluteStartPoint=function(){return lh(this.element,this.startPos)||xh.findCenter(this.element)},Ah.prototype._calculateAbsoluteEndPoint=function(){var t=lh(this.element,this.endPos);return t||(Ph.isContentEditableElement(this.element)?function(t,e,n){for(var i=n<e?1:-1,o=n,r=null;o!==e&&!(r=sh(t,o+=i)););return r=r||sh(t,e)||Zc.findCenter(t)}(this.element,this.startPos,this.endPos):xh.findCenter(this.element))},Ah.prototype._setSelection=function(){var t=Ph.isTextEditableElement(this.element),e=Ph.isContentEditableElement(this.element);(t||e)&&!1!==this.eventState.simulateDefaultBehavior&&wh.select(this.element,this.startPos,this.endPos)},Ah.prototype.run=function(t){var e=this;return this._ensureElement(t).then(function(){return _h.prototype.run.call(e)})},Ah);function Ah(t,e,n,i){var o=_h.call(this,t,i)||this;return o.startPos=e,o.endPos=n,o}var Th,Mh=E.textSelection,Dh=E.contentEditable,Uh=E.positionUtils,Ih=(_(Oh,Th=bh),Oh.prototype._calculateAbsoluteStartPoint=function(){return ah(this.element,this.startNode,this.startOffset)||Uh.findCenter(this.element)},Oh.prototype._calculateAbsoluteEndPoint=function(){return ah(this.element,this.endNode,this.endOffset)||Uh.findCenter(this.element)},Oh.prototype._setSelection=function(){var t,e;!1!==this.eventState.simulateDefaultBehavior&&(t={node:this.startNode,offset:this.startOffset},e={node:this.endNode,offset:this.endOffset},Mh.selectByNodesAndOffsets(t,e,!0))},Oh);function Oh(t,e,n){var i=Th.call(this,Dh.getNearestCommonAncestor(t,e),n)||this,o=Dh.getFirstVisiblePosition(t),r=Dh.getLastVisiblePosition(e),s={node:t,offset:o},l={node:e,offset:r},a=Dh.calculatePositionByNodeAndOffset(i.element,s);return Dh.calculatePositionByNodeAndOffset(i.element,l)<a&&(o=Dh.getLastVisiblePosition(t),r=Dh.getFirstVisiblePosition(e)),s=Dh.calculateNodeAndOffsetByPosition(t,o),l=Dh.calculateNodeAndOffsetByPosition(e,r),i.startNode=s.node,i.startOffset=s.offset,i.endNode=l.node,i.endOffset=l.offset,i}var kh=h.Promise,Nh=h.utils.extend,Bh=h.utils.browser,Fh=h.eventSandbox.eventSimulator,Lh=h.eventSandbox.elementEditingWatcher,Rh=E.domUtils,Vh=E.promiseUtils,Wh=E.contentEditable,Yh=E.textSelection,Kh=E.delay,Xh=E.KEY_MAPS.specialKeys,Hh=(Gh.findTextEditableChild=function(t){var e=null;if(!Rh.isEditableElement(t))for(var n=t.querySelectorAll("*"),i=0;i<n.length;i++)if(Rh.isTextEditableElementAndEditingAllowed(n[i])){e=n[i];break}return e},Gh.prototype._calculateEventArguments=function(t){var e=Rh.getActiveElement(),n=Rh.isContentEditableElement(this.element),i=this.eventArgs.element||this.element;n||e===i||(i=Gh.findTextEditableChild(e)||e);var o=Nh({keyCode:t?this.currentCharCode:this.currentKeyCode},this.modifiers);return t&&(o.charCode=this.currentCharCode),Nh(o,tc(t,this.currentKey,this.currentKeyIdentifier)),{element:i,options:o}},Gh.prototype._calculateTargetElement=function(){var t=Rh.getActiveElement(),e=Rh.isContentEditableElement(this.element);if(e){if(t!==Wh.findContentEditableParent(this.element))return void(this.eventState.skipType=!0)}else if(t!==this.element)return void(this.eventState.skipType=!0);this.element=e?this.element:t},Gh.prototype._click=function(t){var e,n=this,i=Rh.getActiveElement(),o=Rh.isTextEditableElementAndEditingAllowed(this.element),r=Rh.isContentEditableElement(this.element);if(i===this.element)return o&&Lh.watchElementEditing(this.element),(o||r)&&(e=Yh.getSelectionStart(this.element),isNaN(parseInt(this.caretPos,10))||this.caretPos===e||Yh.select(this.element,this.caretPos,this.caretPos)),kh.resolve();var s=Dt(this.element),l=s.offsetX,a=s.offsetY,u=new xr({offsetX:this.elementChanged?l:this.offsetX,offsetY:this.elementChanged?a:this.offsetY,speed:this.speed,caretPos:this.caretPos,modifiers:this.modifiers});return new da(this.element,u,ef,tl).run(t).then(function(){return Kh(n.automationSettings.mouseActionStepDelay)})},Gh.prototype._type=function(){var t=this;if(this.eventState.skipType)return kh.resolve();var e=Rh.isContentEditableElement(this.element);return this.replace&&(Rh.isTextEditableElementAndEditingAllowed(this.element)?Yh.select(this.element):e&&Yh.deleteSelectionContents(this.element,!0)),Vh.whilst(function(){return!t._isTypingFinished()},function(){return t._typingStep()})},Gh.prototype._isTypingFinished=function(){return this.currentPos===this.typingText.length},Gh.prototype._typingStep=function(){var t=this.typingText.charAt(this.currentPos);return this.currentKeyCode=Qu(t),this.currentCharCode=this.typingText.charCodeAt(this.currentPos),this.currentKey=this.currentKeyCode===Xh.enter?"Enter":t,this.currentKeyIdentifier=Ju(this.currentKey),this.ignoreChangeEvent=Rh.getElementValue(this.element)===Lh.getElementSavedValue(this.element),this._keydown(),this._keypress(),this._keyup()},Gh.prototype._keydown=function(){this.eventArgs=this._calculateEventArguments(),this.eventState.simulateKeypress=Fh.keydown(this.eventArgs.element,this.eventArgs.options)},Gh.prototype._keypress=function(){!1!==this.eventState.simulateKeypress&&(this.eventArgs=this._calculateEventArguments(!0),this.eventState.simulateTypeChar=Bh.isAndroid||Fh.keypress(this.eventArgs.element,this.eventArgs.options))},Gh.prototype._keyup=function(){var t=this,e=this.eventArgs.element;this.eventArgs=this._calculateEventArguments();var n=Rh.isTextEditableElement(this.element),i=Rh.isContentEditableElement(this.element),o=this.paste||!n&&!i;return kh.resolve().then(function(){return o?t._typeAllText(e):t._typeChar(e)}).then(function(){Fh.keyup(t.eventArgs.element,t.eventArgs.options),o?t.currentPos=t.typingText.length:t.currentPos++})},Gh.prototype._typeChar=function(t){if(!1===this.eventState.simulateKeypress||!1===this.eventState.simulateTypeChar)return this.ignoreChangeEvent&&Lh.restartWatchingElementEditing(t),Kh(this.automationSettings.keyActionStepDelay);var e=this.typingText.charAt(this.currentPos),n=/^\d$/.test(e),i=0===this.currentPos?null:this.typingText.charAt(this.currentPos-1);if(Rh.isInputElement(t)&&"number"===t.type){var o=Yh.getSelectionStart(t),r=Rh.getInputValue(t).length,s=/^\d/.test(this.typingText);if(!n&&(s||!("."===e||"-"===e&&r)||0!==o))return Kh(this.automationSettings.keyActionStepDelay);n&&("."===i||"-"===i&&!r)&&(e=i+e)}return Lu(t,e,null),Kh(this.automationSettings.keyActionStepDelay)},Gh.prototype._typeAllText=function(t){return Lu(t,this.typingText,this.caretPos),Kh(this.automationSettings.keyActionStepDelay)},Gh.prototype.run=function(t){var e=this;return this._click(t).then(function(){return e._calculateTargetElement()}).then(function(){return e._type()})},Gh);function Gh(t,e,n){this.element=Gh.findTextEditableChild(t)||t,this.typingText=e.toString(),this.modifiers=n.modifiers,this.caretPos=n.caretPos,this.replace=n.replace,this.paste=n.paste,this.offsetX=n.offsetX,this.offsetY=n.offsetY,this.speed=n.speed,this.automationSettings=new vo(this.speed),this.elementChanged=t!==this.element,this.currentPos=0,this.currentKeyCode=null,this.currentCharCode=null,this.currentKey=null,this.currentKeyIdentifier=null,this.ignoreChangeEvent=!0,this.eventArgs={options:null,element:null},this.eventState={skipType:!1,simulateKeypress:!0,simulateTypeChar:!0}}var qh=(zh.prototype.run=function(){var i=this;return m.doUpload(this.element,this.paths).then(function(t){if(t.length){var e=g.arrayUtils.map(t,function(t){return t.path}),n=g.arrayUtils.reduce(t,function(t,e){return t.concat(e.resolvedPaths)},[]);throw i.createError(e,n)}})},zh);function zh(t,e,n){this.element=t,this.paths=e,this.createError=n}var jh=E.domUtils,$h=E.contentEditable,Qh={};Qh.DispatchEvent=t,Qh.SetScroll=pl,Qh.ScrollIntoView=yl,Qh.Click=da,Qh.SelectChildClick=Ba,Qh.DblClick=Ha,Qh.DragToOffset=pu,Qh.DragToElement=Eu,Qh.Hover=_u,Qh.Press=Lc,Qh.RClick=zc,Qh.SelectText=Ch,Qh.SelectEditableContent=Ih,Qh.Type=Hh,Qh.Upload=qh,Qh.MouseOptions=_r,Qh.ClickOptions=xr,Qh.TypeOptions=Br,Qh.AutomationSettings=vo,Qh.getOffsetOptions=Ut,Qh.calculateSelectTextArguments=function(t,e){void 0===e&&(e={});var n,i,o,r,s,l,a,u,c,h,f,d=jh.isTextEditableElement(t),m=d?0:$h.getFirstVisiblePosition(t),p=d?jh.getElementValue(t).length:$h.getLastVisiblePosition(t),v=e.startPos?Math.min(e.startPos,p):m,g=void 0===e.endPos||null===e.endPos?p:Math.min(e.endPos,p);return void 0!==e.offset?(g=0<=e.offset?Math.min(e.offset,g):(v=g,Math.max(0,g+e.offset)),{startPos:v,endPos:g}):void 0!==e.startLine?(n=t,i=e,o=jh.getTextAreaValue(n),r=o&&o.length?o.split("\n"):[],s=r.length-1,l=i.startLine?Math.min(i.startLine,s):0,a=r[l]?r[l].length:0,u=i.startPos?Math.min(i.startPos,a):0,c=void 0===i.endLine||null===i.endLine?s:Math.min(i.endLine,s),h=r[c]?r[c].length:0,f=void 0===i.endPos||null===i.endPos?h:Math.min(i.endPos,h),{startPos:jh.getTextareaPositionByLineAndOffset(n,l,0)+u,endPos:jh.getTextareaPositionByLineAndOffset(n,c,0)+f}):{startPos:v,endPos:g}},Qh.cursor=tl,Qh.getNextFocusableElement=$u,Qh.SHORTCUT_TYPE=lc,Qh.getSelectionCoordinatesByPosition=lh,Qh.getElementFromPoint=Bt,Qh.MoveAutomation=Hs;var Zh=h.nativeMethods,Jh=h.EVENTS.evalIframeScript;Zh.objectDefineProperty(ef,"%testCafeAutomation%",{configurable:!0,value:Qh}),h.on(Jh,function(t){return tf(Zh.contentWindowGetter.call(t.iframe))})}(ef["%hammerhead%"],ef["%hammerhead%"].Promise,ef["%testCafeCore%"],ef["%testCafeUI%"])}(window);