text: !function C(B){var F=B.document;!function(a){"use strict";var d,h,r,m,p,i={".js":[],".json":[],".css":[],".html":[]},u="function"==typeof require?require:null;return m=function(e){var t=new Error("Could not find module '"+e+"'");return t.code="MODULE_NOT_FOUND",t},p=function(e,t,n){var o,r;if("function"==typeof e[t+n])return t+n;for(o=0;r=i[n][o];++o)if("function"==typeof e[t+r])return t+r;return null},d=function(e,t,n,o,r,i){var s,l,a,u,c,f;for("."!==(s=(n=n.split(/[\\/]/)).pop())&&".."!==s||(n.push(s),s="");null!=(l=n.shift());)if(l&&"."!==l&&(".."===l?(e=t.pop(),i=i.slice(0,i.lastIndexOf("/"))):(t.push(e),e=e[l],i+="/"+l),!e))throw m(o);if(s&&"function"!=typeof e[s]&&((f=(f=(f=(f=p(e,s,".js"))||p(e,s,".json"))||p(e,s,".css"))||p(e,s,".html"))?s=f:2!==r&&"object"==typeof e[s]&&(t.push(e),e=e[s],i+="/"+s,s="")),!s)return 1!==r&&e[":mainpath:"]?d(e,t,e[":mainpath:"],o,1,i):d(e,t,"index",o,2,i);if(!(c=e[s]))throw m(o);return c.hasOwnProperty("module")?c.module.exports:(a={},c.module=u={exports:a,id:i+"/"+s},c.call(a,a,u,h(e,t,i)),u.exports)},r=function(e,t,n,o){var r,i=n,s=n.charAt(0),l=0;if("/"===s){if(i=i.slice(1),!(e=a["/"])){if(u)return u(n);throw m(n)}o="/",t=[]}else if("."!==s){if(r=i.split("/",1)[0],!(e=a[r])){if(u)return u(n);throw m(n)}o=r,t=[],(i=i.slice(r.length+1))||(l=(i=e[":mainpath:"])?1:(i="index",2))}return d(e,t,i,n,l,o)},(h=function(t,n,o){return function(e){return r(t,[].concat(n),e,o)}})(a,[],"")}({"testcafe-release":{src:{client:{automation:{"cursor.js":function(e,t,n){e.__esModule=!0;var o=i(n("./deps/testcafe-core")),r=i(n("./deps/testcafe-ui"));function i(e){return e&&e.__esModule?e:{default:e}}var s=o.default.domUtils,l=B.top===B?r.default.cursorUI:r.default.iframeCursorUI;e.default={x:-1,y:-1,currentActiveWindow:B.top,_ensureActiveWindow:function(){if(this.currentActiveWindow!==B&&this.currentActiveWindow!==B.parent){var e=s.findIframeByWindow(this.currentActiveWindow);e&&s.isElementInDocument(e)||(this.currentActiveWindow=B)}},get active(){return this._ensureActiveWindow(),this.currentActiveWindow===B},set activeWindow(e){this.currentActiveWindow=e},get activeWindow(){return this._ensureActiveWindow(),this.currentActiveWindow},get position(){return{x:this.x,y:this.y}},get visible(){return B.top===B&&l.isVisible()},move:function(e,t){return this.x=e,this.y=t,l.move(this.x,this.y)},hide:function(){this.visible&&l.hide()},show:function(){B.top===B&&l.show()},leftButtonDown:function(){return l.leftButtonDown()},rightButtonDown:function(){return l.rightButtonDown()},buttonUp:function(){return l.buttonUp()}},t.exports=e.default},deps:{"hammerhead.js":function(e,t,n){e.__esModule=!0,e.default=B["%hammerhead%"],t.exports=e.default},"testcafe-core.js":function(e,t,n){e.__esModule=!0,e.default=B["%testCafeCore%"],t.exports=e.default},"testcafe-ui.js":function(e,t,n){e.__esModule=!0,e.default=B["%testCafeUI%"],t.exports=e.default}},"errors.js":function(e,t,n){e.__esModule=!0,e.default={elementIsInvisibleError:"elementIsInvisibleError",foundElementIsNotTarget:"foundElementIsNotTarget"},t.exports=e.default},"get-element.js":function(e,t,n){e.__esModule=!0,e.fromPoint=E,e.underCursor=function(){var e=s.default.position;return E(e.x,e.y).then(function(e){return e.element})};var o=l(n("./deps/hammerhead")),r=l(n("./deps/testcafe-core")),i=l(n("./deps/testcafe-ui")),s=l(n("./cursor"));function l(e){return e&&e.__esModule?e:{default:e}}var a=o.default.utils.browser,u=o.default.Promise,c=o.default.nativeMethods,f=r.default.positionUtils,d=r.default.domUtils;function h(e,t,n){var o=null;return i.default.hide(n).then(function(){return o=f.getElementFromPoint(e,t),i.default.show(n)}).then(function(){return o})}function m(e,t,n){var o=f.getElementFromPoint(e,t),r=d.containsElement(n,o)&&c.nodeTextContentGetter.call(o).length;return o&&o===n||r?o:null}function p(e,t){if(!t||!d.isDomElement(t)||!e||e===t)return e;if("tref"===d.getTagName(t))return t;var n="area"===d.getTagName(t)&&d.isImgElement(e);if(a.isFirefox&&n)return function(e,t){var n=d.closest(t,"map");return n&&n.name===e.useMap.substring(1)?t:e}(e,t);var o=d.isAnchorElement(t)||d.getParents(t,"a").length,r=o&&d.containsElement(t,e)&&c.nodeTextContentGetter.call(e).length;if(!o||r||!c.nodeTextContentGetter.call(t).length)return e;var i=t.getBoundingClientRect();return m(i.right-1,i.top+1,t)||m(i.left+1,i.bottom-1,t)||e}function E(n,o,r){var i=B!==B.top,s=null;return h(n,o).then(function(e){s=e;var t=u.resolve(e);return!s&&i&&0<n&&0<o&&(t=t.then(function(){return h(n,o,!0)}).then(function(e){return s=e})),t.then(function(e){return p(e,r)}).then(function(e){return{element:e,corrected:e!==s}})})}},"index.js":function(e,t,n){var o=A(n("./deps/hammerhead")),r=A(n("./playback/scroll")),i=A(n("./playback/click")),s=A(n("./playback/click/select-child")),l=A(n("./playback/dblclick")),a=A(n("./playback/drag/to-offset")),u=A(n("./playback/drag/to-element")),c=A(n("./playback/hover")),f=A(n("./playback/press")),d=A(n("./playback/rclick")),h=A(n("./playback/select/select-text")),m=A(n("./playback/select/select-editable-content")),p=A(n("./playback/type")),E=A(n("./playback/upload")),g=n("../../test-run/commands/options"),v=A(n("./settings")),y=n("./utils/offsets"),S=n("./playback/press/utils"),b=A(n("./playback/select/calculate-select-text-arguments")),_=A(n("./errors")),T=A(n("./cursor"));function A(e){return e&&e.__esModule?e:{default:e}}e.Scroll=r.default,e.Click=i.default,e.SelectChildClick=s.default,e.DblClick=l.default,e.DragToOffset=a.default,e.DragToElement=u.default,e.Hover=c.default,e.Press=f.default,e.RClick=d.default,e.SelectText=h.default,e.SelectEditableContent=m.default,e.Type=p.default,e.Upload=E.default,e.MouseOptions=g.MouseOptions,e.ClickOptions=g.ClickOptions,e.TypeOptions=g.TypeOptions,e.ERROR_TYPES=_.default,e.AutomationSettings=v.default,e.getOffsetOptions=y.getOffsetOptions,e.calculateSelectTextArguments=b.default,e.cursor=T.default,e.getNextFocusableElement=S.getNextFocusableElement,e.get=n;var x=o.default.nativeMethods,w=o.default.EVENTS.evalIframeScript;x.objectDefineProperty(B,"%testCafeAutomation%",{configurable:!0,value:e}),o.default.on(w,function(e){return C(x.contentWindowGetter.call(e.iframe),!0)})},playback:{click:{"click-command.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t){var n=(0,l.getElementBoundToLabel)(t.element),o=m.isSelectElement(t.element),r=m.isOptionElement(t.element),i=m.isLabelElement(t.element)&&n,s=n&&m.isCheckboxElement(n);return o?new T(e,t):r?new w(e,t):s?new O(e,t):i?new S(e,t):new g(e,t)};var o=s(n("../../deps/hammerhead")),r=s(n("../../deps/testcafe-core")),i=s(n("../../deps/testcafe-ui")),l=n("../../utils/utils");function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=o.default.utils.browser,d=o.default.eventSandbox.eventSimulator,h=o.default.eventSandbox.listeners,m=r.default.domUtils,p=r.default.styleUtils,E=i.default.selectElement,g=(v.prototype.run=function(){this.eventState.clickElement&&d.click(this.eventState.clickElement,this.eventArgs.options),m.isElementFocusable(this.eventArgs.element)||(0,l.focusByRelatedElement)(this.eventArgs.element)},v);function v(e,t){c(this,v),this.eventState=e,this.eventArgs=t}var y,S=(u(b,y=g),b.prototype.run=function(){function e(e){n=e.target===t.input}var t=this,n=!1;h.addInternalEventListener(B,["focus"],e),y.prototype.run.call(this),h.removeInternalEventListener(B,["focus"],e),m.isElementFocusable(this.label)&&!n&&this._ensureBoundElementFocusRaised()},b.prototype._ensureBoundElementFocusRaised=function(){d.focus(this.input)},b);function b(e,t){c(this,b);var n=a(this,y.call(this,e,t));return n.label=n.eventArgs.element,n.input=(0,l.getElementBoundToLabel)(n.eventArgs.element),n}var _,T=(u(A,_=g),A.prototype.run=function(){_.prototype.run.call(this),this._toggleSelectOptionList()},A.prototype._toggleSelectOptionList=function(){var e=this.eventArgs.element;1===p.getSelectElementSize(e)&&!1!==this.eventState.simulateDefaultBehavior&&(E.isOptionListExpanded(e)?E.collapseOptionList():E.expandOptionList(e))},A);function A(e,t){return c(this,A),a(this,_.call(this,e,t))}var x,w=(u(C,x=g),C.prototype.run=function(){return this.eventArgs.element},C);function C(e,t){return c(this,C),a(this,x.call(this,e,t))}var P,O=(u(R,P=S),R.prototype.run=function(){function e(){t=!0}var t=!1;h.addInternalEventListener(B,["change"],e),P.prototype.run.call(this),h.removeInternalEventListener(B,["change"],e),f.isChrome&&!t&&this._ensureCheckboxStateChanged()},R.prototype._ensureCheckboxStateChanged=function(){this.checkbox.checked=!this.checkbox.checked,d.change(this.checkbox)},R);function R(e,t){c(this,R);var n=a(this,P.call(this,e,t));return n.checkbox=n.input,n}t.exports=e.default},"index.js":function(e,t,n){e.__esModule=!0;var o=c(n("../../deps/hammerhead")),r=c(n("../../deps/testcafe-core")),i=c(n("../visible-element-automation")),s=n("../../utils/utils"),l=c(n("../../cursor")),a=c(n("../../utils/next-tick")),u=c(n("./click-command"));function c(e){return e&&e.__esModule?e:{default:e}}var f,d=o.default.Promise,h=o.default.utils.extend,m=o.default.utils.browser,p=o.default.utils.featureDetection,E=o.default.eventSandbox.eventSimulator,g=o.default.eventSandbox.listeners,v=r.default.domUtils,y=r.default.eventUtils,S=r.default.arrayUtils,b=r.default.delay,_=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(T,f=i.default),T.prototype._bindMousedownHandler=function(){var n=this;y.bind(this.element,"mousedown",function e(t){n.eventState.mousedownPrevented=t.defaultPrevented,y.preventDefault(t),y.unbind(n.element,"mousedown",e)})},T.prototype._bindBlurHandler=function(t){var n=this;y.bind(t,"blur",function e(){n.eventState.blurRaised=!0,y.unbind(t,"blur",e,!0)},!0)},T.prototype._raiseTouchEvents=function(e){p.isTouchDevice&&(E.touchstart(e.element,e.options),E.touchend(e.element,e.options))},T.prototype._mousedown=function(n){var o=this;return this.targetElementParentNodes=v.getParents(n.element),this.mouseDownElement=n.element,l.default.leftButtonDown().then(function(){o._raiseTouchEvents(n);var e=v.getActiveElement();o.activeElementBeforeMouseDown=e;var t=(m.isWebKit||m.isIE)&&v.isSelectElement(o.mouseDownElement);return t&&o._bindMousedownHandler(),o._bindBlurHandler(e),o.eventState.simulateDefaultBehavior=E.mousedown(n.element,n.options),!1===o.eventState.simulateDefaultBehavior&&(o.eventState.simulateDefaultBehavior=t&&!o.eventState.mousedownPrevented),o._ensureActiveElementBlur(e)}).then(function(){return o._focus(n)})},T.prototype._ensureActiveElementBlur=function(t){var n=this;return new d(function(e){v.getActiveElement()===t||n.eventState.blurRaised?e():m.isIE&&m.version<12?(0,a.default)().then(function(){n.eventState.blurRaised||E.blur(t),e()}):(E.blur(t),e())})},T.prototype._focus=function(e){if(!1===this.eventState.simulateDefaultBehavior)return d.resolve();var t=v.isContentEditableElement(this.element)?this.element:e.element,n=!m.isIE||this.activeElementBeforeMouseDown===v.getActiveElement();return(0,s.focusAndSetSelection)(t,n,this.caretPos)},T._getElementForClick=function(e,t,n){var o=v.getParents(t),r=v.isTheSameNode(t,e);return m.isFirefox?r?e:null:r?S.equals(n,o)?e:null:e.contains(t)&&!v.isEditableFormElement(t)?e:t.contains(e)?t:S.getCommonElement(o,n)},T.prototype._mouseup=function(t){var o=this;return l.default.buttonUp().then(function(){return o._getElementForEvent(t)}).then(function(e){t.element=e,o.eventState.clickElement=T._getElementForClick(o.mouseDownElement,e,o.targetElementParentNodes);var n={};return m.isIE||g.addInternalEventListener(B,["mouseup"],function e(t){n=t.timeStamp,g.removeInternalEventListener(B,["mouseup"],e)}),E.mouseup(e,t.options),{timeStamp:n}})},T.prototype._click=function(e){return(0,u.default)(this.eventState,e).run(),e},T.prototype.run=function(e){var i=this,s=null;return this._ensureElement(e).then(function(e){var t=e.element,n=e.clientPoint,o=e.screenPoint,r=e.devicePoint;return s={point:n,screenPoint:o,element:t,options:h({clientX:n.x,clientY:n.y,screenX:r.x,screenY:r.y},i.modifiers)},d.all([b(i.automationSettings.mouseActionStepDelay),i._mousedown(s)])}).then(function(){return i._mouseup(s)}).then(function(e){var t=e.timeStamp;return s.options.timeStamp=t,i._click(s)})},T);function T(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,f.call(this,e,t));return n.modifiers=t.modifiers,n.caretPos=t.caretPos,n.targetElementParentNodes=[],n.activeElementBeforeMouseDown=null,n.mouseDownElement=null,n.eventState={mousedownPrevented:!1,blurRaised:!1,simulateDefaultBehavior:!0,clickElement:null},n}e.default=_,t.exports=e.default},"select-child.js":function(e,t,n){e.__esModule=!0;var o=c(n("../../deps/hammerhead")),r=c(n("../../deps/testcafe-core")),i=c(n("../../deps/testcafe-ui")),l=c(n("../move")),a=n("../../../../test-run/commands/options"),s=n("../../utils/offsets"),u=c(n("../../settings"));function c(e){return e&&e.__esModule?e:{default:e}}var f=o.default.Promise,d=o.default.utils.browser,h=o.default.utils.featureDetection,m=o.default.eventSandbox.eventSimulator,p=o.default.eventSandbox.focusBlur,E=o.default.nativeMethods,g=r.default.domUtils,v=r.default.styleUtils,y=r.default.delay,S=i.default.selectElement,b=h.isTouchDevice?0:160,_=(T.prototype._calculateEventArguments=function(){var e=this.optionListExpanded?S.getEmulatedChildElement(this.element):this.element,t=1<v.getSelectElementSize(this.parentSelect);return{options:this.modifiers,element:d.isIE&&t?this.parentSelect:e}},T.prototype._getMoveArguments=function(){var e=null,t=null,n=null;if(this.optionListExpanded){e=S.getEmulatedChildElement(this.element);var o=(0,s.getDefaultAutomationOffsets)(e);t=o.offsetX,n=o.offsetY}else{e=F.documentElement;var r=S.getSelectChildCenter(this.element);t=r.x,n=r.y}return{element:e,offsetX:t,offsetY:n,speed:this.speed}},T.prototype._move=function(e){var t=this,n=e.element,o=e.offsetX,r=e.offsetY,i=e.speed,s=new a.MoveOptions({offsetX:o,offsetY:r,speed:i,modifiers:this.modifiers},!1);return new l.default(n,s).run().then(function(){return y(t.automationSettings.mouseActionStepDelay)})},T.prototype._mousedown=function(){var e=this;return d.isFirefox?(m.mousedown(this.eventsArgs.element,this.eventsArgs.options),this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex),this._focus()):d.isIE?(m.mousedown(this.eventsArgs.element,this.eventsArgs.options),this._focus()):this._focus().then(function(){return y(b)}).then(function(){m.mousedown(e.eventsArgs.element,e.eventsArgs.options),e.clickCausesChange&&(e.parentSelect.selectedIndex=e.childIndex)})},T.prototype._focus=function(){var t=this;return new f(function(e){p.focus(t.parentSelect,e,!1,!0)})},T.prototype._mouseup=function(){var e=d.isIE?this.parentSelect:this.eventsArgs.element;m.mouseup(e,this.eventsArgs.options),d.isIE&&this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex);var t=d.isFirefox||d.isSafari||d.isChrome&&53<=d.version,n=t||d.isIE;return t&&this.clickCausesChange&&m.input(this.parentSelect),n&&this.clickCausesChange&&m.change(this.parentSelect),f.resolve()},T.prototype._click=function(){m.click(this.eventsArgs.element,this.eventsArgs.options)},T.prototype.run=function(){var e=this;if(!this.parentSelect)return m.click(this.eventsArgs.element,this.eventsArgs.options),f.resolve();this.optionListExpanded||S.scrollOptionListByChild(this.element);var t=this._getMoveArguments();return this.eventsArgs=this._calculateEventArguments(),v.getSelectElementSize(this.parentSelect)<=1?this._move(t).then(function(){return e._click()}):this._move(t).then(function(){return e._mousedown()}).then(function(){return e._mouseup()}).then(function(){return e._click()})},T);function T(e,t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),this.element=e,this.modifiers=t.modifiers,this.caretPos=t.caretPos,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.speed=t.speed,this.automationSettings=new u.default(t.speed),this.parentSelect=g.getSelectParent(this.element),this.optionListExpanded=!!this.parentSelect&&S.isOptionListExpanded(this.parentSelect),this.childIndex=null,this.clickCausesChange=!1,this.parentSelect){var n=g.isOptionElement(this.element),o=this.parentSelect.selectedIndex;this.childIndex=g.getElementIndexInParent(this.parentSelect,this.element);var r=E.nodeParentNodeGetter.call(this.element),i=g.isOptionGroupElement(r)?r:null,s=this.element.disabled||i&&i.disabled;this.clickCausesChange=n&&!s&&this.childIndex!==o}this.eventsArgs={options:this.modifiers,element:this.element}}e.default=_,t.exports=e.default}},"dblclick.js":function(e,t,n){e.__esModule=!0;var o=u(n("../deps/hammerhead")),r=u(n("../deps/testcafe-core")),i=n("../../../test-run/commands/options"),s=u(n("./visible-element-automation")),l=u(n("./click")),a=u(n("../settings"));function u(e){return e&&e.__esModule?e:{default:e}}var c,f=o.default.utils.featureDetection,d=o.default.utils.browser,h=o.default.eventSandbox.eventSimulator,m=r.default.eventUtils,p=r.default.delay,E=f.isTouchDevice?0:160,g=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(v,c=s.default),v.prototype._firstClick=function(e){var t=this,n=new i.ClickOptions(this.options);n.speed=1;var o=new l.default(this.element,n);return o.on(o.TARGET_ELEMENT_FOUND_EVENT,function(e){return t.emit(t.TARGET_ELEMENT_FOUND_EVENT,e)}),o.run(e).then(function(e){return p(E).then(function(){return e})})},v.prototype._secondClick=function(e){var t=this;d.isIE&&m.bind(F,"focus",m.preventDefault,!0);var n=new i.ClickOptions({offsetX:e.screenPoint.x,offsetY:e.screenPoint.y,caretPos:this.caretPos,modifiers:this.modifiers,speed:1}),o=new l.default(F.documentElement,n);return o.run().then(function(e){return t.eventState.dblClickElement=o.eventState.clickElement,d.isIE&&m.unbind(F,"focus",m.preventDefault,!0),e})},v.prototype._dblClick=function(e){this.eventState.dblClickElement&&h.dblclick(this.eventState.dblClickElement,e.options)},v.prototype.run=function(e){var t=this;return this._firstClick(e).then(function(e){return t._secondClick(e)}).then(function(e){return t._dblClick(e)})},v);function v(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,c.call(this,e,t));return n.modifiers=t.modifiers,n.caretPos=t.caretPos,n.speed=t.speed,n.automationSettings=new a.default(n.speed),n.offsetX=t.offsetX,n.offsetY=t.offsetY,n.eventArgs=null,n.eventState={dblClickElement:null},n}e.default=g,t.exports=e.default},drag:{"base.js":function(e,t,n){e.__esModule=!0;var o=i(n("../../deps/hammerhead")),s=n("../../deps/testcafe-core"),l=n("../../get-element"),r=i(n("../visible-element-automation")),a=i(n("../move")),u=n("../../../../test-run/commands/options"),c=i(n("../../cursor"));function i(e){return e&&e.__esModule?e:{default:e}}var f,d=o.default.Promise,h=o.default.utils.extend,m=o.default.utils.featureDetection,p=o.default.eventSandbox.eventSimulator,E=o.default.eventSandbox.focusBlur,g=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(v,f=r.default),v.prototype._getEndPoint=function(){throw new Error("Not implemented")},v.prototype._mousedown=function(e){var t=this;return c.default.leftButtonDown().then(function(){return t.simulateDefaultBehavior=p[t.downEvent](e.element,e.options),t._focus(e)})},v.prototype._focus=function(n){var o=this;return new d(function(e){var t=s.domUtils.isContentEditableElement(o.element)?s.contentEditable.findContentEditableParent(o.element):n.element;E.focus(t,e,!1,!0)})},v.prototype._getDestination=function(){throw new Error("Not implemented")},v.prototype._drag=function(){var t=this,e=this._getDestination(),n=e.element,o=e.offsets,r=e.endPoint;this.endPoint=r;var i=new u.MoveOptions({offsetX:o.offsetX,offsetY:o.offsetY,modifiers:this.modifiers,speed:this.speed,minMovingTime:25,holdLeftButton:!0,skipDefaultDragBehavior:!1===this.simulateDefaultBehavior},!1);return new a.default(n,i).run().then(function(e){return t.dragAndDropState=e,(0,s.delay)(t.automationSettings.mouseActionStepDelay)})},v.prototype._mouseup=function(){var i=this;return c.default.buttonUp().then(function(){var n=s.positionUtils.offsetToClientCoords(i.endPoint),o=null,r=h({clientX:n.x,clientY:n.y},i.modifiers);return(0,l.fromPoint)(n.x,n.y).then(function(e){var t=e.element;return(o=t)?(i.dragAndDropState.enabled?(r.dataTransfer=i.dragAndDropState.dataTransfer,i.dragAndDropState.dropAllowed&&p.drop(o,r),p.dragend(i.dragAndDropState.element,r),i.dragAndDropState.dataStore.setProtectedMode()):p[i.upEvent](o,r),(0,l.fromPoint)(n.x,n.y)):o}).then(function(e){var t=e.element;o&&t===o&&!i.dragAndDropState.enabled&&p.click(o,r)})})},v.prototype.run=function(e){var o=this,r=null;return this._ensureElement(e).then(function(e){var t=e.element,n=e.clientPoint;return r={point:n,element:t,options:h({clientX:n.x,clientY:n.y},o.modifiers)},d.all([(0,s.delay)(o.automationSettings.mouseActionStepDelay),o._mousedown(r)])}).then(function(){return o._drag()}).then(function(){return o._mouseup()})},v);function v(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,f.call(this,e,t));return n.modifiers=t.modifiers,n.speed=t.speed,n.offsetX=t.offsetX,n.offsetY=t.offsetY,n.endPoint=null,n.simulateDefaultBehavior=!0,n.downEvent=m.isTouchDevice?"touchstart":"mousedown",n.upEvent=m.isTouchDevice?"touchend":"mouseup",n.dragAndDropState=null,n}e.default=g,t.exports=e.default},"drag-and-drop-state.js":function(e,t,n){e.__esModule=!0,e.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enabled=!1,this.dropAllowed=!1,this.element=null,this.dataTransfer=null,this.dataStore=null},t.exports=e.default},"to-element.js":function(e,t,n){e.__esModule=!0;var o=s(n("../../deps/testcafe-core")),r=s(n("./base")),i=n("../../utils/offsets");function s(e){return e&&e.__esModule?e:{default:e}}var l,a=o.default.positionUtils,u=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(c,l=r.default),c.prototype._getDestination=function(){var e=this.destinationElement,t=a.getElementRectangle(e),n=(0,i.getOffsetOptions)(e,this.destinationOffsetX,this.destinationOffsetY);return{element:e,offsets:n,endPoint:{x:t.left+n.offsetX,y:t.top+n.offsetY}}},c);function c(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,l.call(this,e,n));return o.destinationElement=t,o.destinationOffsetX=n.destinationOffsetX,o.destinationOffsetY=n.destinationOffsetY,o}e.default=u,t.exports=e.default},"to-offset.js":function(e,t,n){e.__esModule=!0;var o=s(n("../../deps/testcafe-core")),r=s(n("./base")),i=s(n("../../utils/get-automation-point"));function s(e){return e&&e.__esModule?e:{default:e}}var l,a=o.default.styleUtils,u=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(c,l=r.default),c.prototype._getDestination=function(){var e=(0,i.default)(this.element,this.offsetX,this.offsetY),t=a.getWidth(F),n=a.getHeight(F),o={x:e.x+this.dragOffsetX,y:e.y+this.dragOffsetY};return o={x:Math.min(Math.max(0,o.x),t),y:Math.min(Math.max(0,o.y),n)},{element:F.documentElement,offsets:{offsetX:o.x,offsetY:o.y},endPoint:o}},c);function c(e,t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,l.call(this,e,o));return r.dragOffsetX=t,r.dragOffsetY=n,r}e.default=u,t.exports=e.default}},"hover.js":function(e,t,n){e.__esModule=!0;var o,r,i=n("./visible-element-automation"),s=(o=i)&&o.__esModule?o:{default:o},l=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,r=s.default),a.prototype.run=function(e){return this._ensureElement(e,!0)},a);function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,e,t))}e.default=l,t.exports=e.default},"last-hovered-element-holder.js":function(e,t,n){e.__esModule=!0;var o=null;e.default={get:function(){return o},set:function(e){o=e}},t.exports=e.default},move:{"event-sequence":{"base.js":function(e,t,n){e.__esModule=!0;var o,r=n("../../../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},f=n("../../../deps/testcafe-core"),d=i.default.utils.browser,s=(l.prototype.setup=function(){this.dragAndDropMode=!1,this.dropAllowed=!1},l.prototype.leaveElement=function(){},l.prototype.move=function(){},l.prototype.enterElement=function(){},l.prototype.dragAndDrop=function(){},l.prototype.teardown=function(){},l.prototype.run=function(e,t,n,o,r){var i=t&&f.domUtils.isElementInDocument(t),s=t&&f.domUtils.isElementInIframe(t)&&!f.domUtils.getIframeByElement(t);i&&!s||(t=null);var l=e!==t,a=l?f.domUtils.getCommonAncestor(e,t):null;this.setup(),l&&t&&this.leaveElement(e,t,a,n),d.isIE&&this.move(e,n),l&&f.domUtils.isElementInDocument(e)&&this.enterElement(e,t,a,n),d.isIE||this.move(e,n),this.dragAndDrop(o,e,t,n,r),this.teardown(e,n,t);var u=this.dragAndDropMode,c=this.dropAllowed;return this.dragAndDropMode=!1,this.dropAllowed=!1,{dragAndDropMode:u,dropAllowed:c}},l);function l(e){var t=e.moveEvent;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),this.dragAndDropMode=!1,this.dropAllowed=!1,this.moveEvent=t}e.default=s,t.exports=e.default},"create-event-sequence.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t,n){return e?t?new r.default(n):new i.default(n):new o.default(n)};var o=s(n("./move-event-sequence")),r=s(n("./drag-and-drop-move")),i=s(n("./drag-and-drop-first-move"));function s(e){return e&&e.__esModule?e:{default:e}}t.exports=e.default},"drag-and-drop-first-move.js":function(e,t,n){e.__esModule=!0;var o=i(n("../../../deps/hammerhead")),r=i(n("./base")),s=n("./event-behaviors");function i(e){return e&&e.__esModule?e:{default:e}}var l,a=o.default.eventSandbox.eventSimulator,u=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(c,l=r.default),c.prototype.setup=function(){l.prototype.setup.call(this),this.dragAndDropMode=!0},c.prototype.leaveElement=function(e,t,n,o){s.MoveBehaviour.leaveElement(e,t,n,o)},c.prototype.move=function(e,t){s.MoveBehaviour.move(this.moveEvent,e,t)},c.prototype.enterElement=function(e,t,n,o){s.MoveBehaviour.enterElement(e,t,n,o)},c.prototype.dragAndDrop=function(e,t,n,o,r){var i=a.dragstart(e,o);r.setReadOnlyMode(),i?this.dropAllowed=s.DragAndDropBehavior.dragAndDrop(e,t,n,o):this.dragAndDropMode=!1},c.prototype.run=function(e,t,n,o,r){return l.prototype.run.call(this,e,null,n,o,r)},c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,l.apply(this,arguments))}e.default=u,t.exports=e.default},"drag-and-drop-move.js":function(e,t,n){e.__esModule=!0;var o,r,i=n("./base"),s=(o=i)&&o.__esModule?o:{default:o},l=n("./event-behaviors"),a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,r=s.default),u.prototype.setup=function(){r.prototype.setup.call(this),this.dragAndDropMode=!0},u.prototype.dragAndDrop=function(e,t,n,o){this.dropAllowed=l.DragAndDropBehavior.dragAndDrop(e,t,n,o)},u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.apply(this,arguments))}e.default=a,t.exports=e.default},"event-behaviors.js":function(e,t,n){e.__esModule=!0,e.DragAndDropBehavior=e.MoveBehaviour=void 0;var o,r=n("../../../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},s=n("../../../deps/testcafe-core");function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=i.default.eventSandbox.eventSimulator,u=i.default.utils.extend,c=i.default.nativeMethods;function f(){l(this,f)}function d(){l(this,d)}e.MoveBehaviour=(f.leaveElement=function(e,t,n,o){a.mouseout(t,u({relatedTarget:e},o));for(var r=t;r&&r!==n;)a.mouseleave(r,u({relatedTarget:e},o)),r=c.nodeParentNodeGetter.call(r)},f.enterElement=function(e,t,n,o){a.mouseover(e,u({relatedTarget:t},o));for(var r=e,i=[];r&&r!==n;)i.push(r),r=c.nodeParentNodeGetter.call(r);i.reverse();for(var s=0;s<i.length;s++)a.mouseenter(i[s],u({relatedTarget:t},o))},f.move=function(e,t,n){a[e](t,n)},f),e.DragAndDropBehavior=(d.dragAndDrop=function(e,t,n,o){return a.drag(e,o),t!==n&&(s.domUtils.isElementInDocument(t)&&(o.relatedTarget=n,a.dragenter(t,o)),n&&(o.relatedTarget=t,a.dragleave(n,o))),!a.dragover(t,o)},d)},"move-event-sequence.js":function(e,t,n){e.__esModule=!0;var o=l(n("../../../deps/hammerhead")),r=n("../../../deps/testcafe-core"),i=l(n("./base")),s=n("./event-behaviors");function l(e){return e&&e.__esModule?e:{default:e}}var a,u=o.default.eventSandbox.eventSimulator,c=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(f,a=i.default),f.prototype.leaveElement=function(e,t,n,o){s.MoveBehaviour.leaveElement(e,t,n,o)},f.prototype.enterElement=function(e,t,n,o){s.MoveBehaviour.enterElement(e,t,n,o)},f.prototype.move=function(e,t){this._needEmulateMoveEvent()&&s.MoveBehaviour.move(this.moveEvent,e,t)},f.prototype.teardown=function(e,t,n){this._needEmulateMoveEvent()&&r.domUtils.isElementInDocument(e)&&e!==n&&u[this.moveEvent](e,t)},f.prototype._needEmulateMoveEvent=function(){return"touchmove"!==this.moveEvent||this.holdLeftButton},f);function f(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,a.call(this,e));return t.holdLeftButton=e.holdLeftButton,t}e.default=c,t.exports=e.default}},"index.js":function(e,t,n){e.__esModule=!0;var o=h(n("../../deps/hammerhead")),r=h(n("../../deps/testcafe-core")),m=n("../../../../test-run/commands/options"),i=h(n("../scroll")),p=h(n("../../cursor")),a=n("../../get-element"),s=h(n("../../utils/get-automation-point")),E=h(n("../../utils/get-line-rect-intersection")),u=h(n("../../utils/get-device-point")),l=h(n("../../utils/next-tick")),c=h(n("../../settings")),f=h(n("../drag/drag-and-drop-state")),d=h(n("./event-sequence/create-event-sequence")),g=h(n("../last-hovered-element-holder"));function h(e){return e&&e.__esModule?e:{default:e}}var v=o.default.Promise,y=o.default.nativeMethods,S=o.default.utils.featureDetection,b=o.default.utils.html,_=o.default.utils.url,T=o.default.eventSandbox.eventSimulator,A=o.default.eventSandbox.message,x=o.default.eventSandbox.DataTransfer,w=o.default.eventSandbox.DragDataStore,C=r.default.positionUtils,P=r.default.domUtils,O=r.default.styleUtils,R=r.default.eventUtils,M=r.default.promiseUtils,I=r.default.sendRequestToFrame,U="automation|move|request",N="automation|move|response";A.on(A.SERVICE_MSG_RECEIVED_EVENT,function(e){e.message.cmd===U&&(e.source.parent===B?D.onMoveToIframeRequest(e):(o.default.on(o.default.EVENTS.beforeUnload,function(){return A.sendServiceMsg({cmd:N},e.source)}),D.onMoveOutRequest(e)))});var D=(k.getTarget=function(e,t,n){var o=!C.containsOffset(e,t,n),r=o?(0,s.default)(e,t,n):{x:t,y:n};return{element:o?F.documentElement:e,offsetX:r.x,offsetY:r.y}},k.onMoveToIframeRequest=function(e){var t={x:e.message.endX,y:e.message.endY},n=e.source,o=P.findIframeByWindow(n),r=O.getBordersWidth(o),i=O.getElementPadding(o),s=C.getIframeClientCoordinates(o),l=C.getIframePointRelativeToParentFrame(t,n),a=p.default.position,u=C.isInRectangle(a,s)?a:(0,E.default)(a,l,s),c={x:u.x-s.left,y:u.y-s.top},f=new k(o,new m.MoveOptions({modifiers:e.message.modifiers,offsetX:c.x+r.left+i.left,offsetY:c.y+r.top+i.top,speed:e.message.speed,skipScrolling:!0},!1)),d={cmd:N,x:c.x,y:c.y};p.default.activeWindow!==n?f.run().then(function(){p.default.activeWindow=n,A.sendServiceMsg(d,n)}):A.sendServiceMsg(d,n)},k.onMoveOutRequest=function(e){var t=e.source,n={left:e.message.left,right:e.message.right,top:e.message.top,bottom:e.message.bottom};if(!e.message.iframeUnderCursor){var o=e.message,r=o.startX,i=o.startY,s=r-n.left,l=i-n.top,a=g.default.get();return a&&(T.mouseout(a,{clientX:s,clientY:l,relatedTarget:null}),T.mouseleave(a,{clientX:s,clientY:l,relatedTarget:null})),void A.sendServiceMsg({cmd:N},t)}var u=p.default.position,c={x:n.left+u.x,y:n.top+u.y},f={x:e.message.endX,y:e.message.endY},d=(0,E.default)(c,f,n);if(d){var h=new m.MoveOptions({modifiers:e.message.modifiers,offsetX:d.x-n.left,offsetY:d.y-n.top,speed:e.message.speed,skipScrolling:!0},!1);new k(F.documentElement,h).run().then(function(){var e={cmd:N,x:d.x,y:d.y};p.default.activeWindow=t,A.sendServiceMsg(e,t)})}else A.sendServiceMsg({cmd:N,x:n.left,y:n.top},t)},k.prototype._getTargetClientPoint=function(){var e=O.getElementScroll(this.element);if(P.isHtmlElement(this.element))return{x:Math.floor(this.offsetX-e.left),y:Math.floor(this.offsetY-e.top)};var t=C.getClientPosition(this.element),n=this.element.tagName&&P.isBodyElement(this.element);return{x:Math.floor(n?t.x+this.offsetX:t.x+this.offsetX-e.left),y:Math.floor(n?t.y+this.offsetY:t.y+this.offsetY-e.top)}},k.prototype._emulateEvents=function(e){var t=this.holdLeftButton?R.BUTTONS_PARAMETER.leftButton:R.BUTTONS_PARAMETER.noButton,n=(0,u.default)({x:this.x,y:this.y}),o={clientX:this.x,clientY:this.y,screenX:n.x,screenY:n.y,buttons:t,ctrl:this.modifiers.ctrl,alt:this.modifiers.alt,shift:this.modifiers.shift,meta:this.modifiers.meta,dataTransfer:this.dragAndDropState.dataTransfer},r={moveEvent:this.moveEvent,holdLeftButton:this.holdLeftButton},i=(0,d.default)(this.dragAndDropState.enabled,this.firstMovingStepOccured,r).run(e,g.default.get(),o,this.dragElement,this.dragAndDropState.dataStore),s=i.dragAndDropMode,l=i.dropAllowed;this.firstMovingStepOccured=!0,this.dragAndDropState.enabled=s,this.dragAndDropState.dropAllowed=l,g.default.set(e)},k.prototype._movingStep=function(){var n=this;if(this.touchMode&&!this.holdLeftButton)this.x=this.endPoint.x,this.y=this.endPoint.y;else if(this.startTime){var e=(Math.min(y.dateNow(),this.endTime)-this.startTime)/(this.endTime-this.startTime);this.x=Math.floor(this.startPoint.x+this.distanceX*e),this.y=Math.floor(this.startPoint.y+this.distanceY*e)}else this.startTime=y.dateNow(),this.endTime=this.startTime+this.movingTime,this.x+=0<this.distanceX?1:-1,this.y+=0<this.distanceY?1:-1;return p.default.move(this.x,this.y).then(a.underCursor).then(function(e){var t=n.holdLeftButton&&n.touchMode?n.dragElement:e;return t?n._emulateEvents(t):null}).then(l.default)},k.prototype._isMovingFinished=function(){return this.x===this.endPoint.x&&this.y===this.endPoint.y},k.prototype._move=function(){var e=this;return this.startPoint=p.default.position,this.x=this.startPoint.x,this.y=this.startPoint.y,this.distanceX=this.endPoint.x-this.startPoint.x,this.distanceY=this.endPoint.y-this.startPoint.y,this.movingTime=Math.max(Math.abs(this.distanceX),Math.abs(this.distanceY))/this.cursorSpeed,this.minMovingTime&&(this.movingTime=Math.max(this.movingTime,this.minMovingTime)),M.whilst(function(){return!e._isMovingFinished()},function(){return e._movingStep()})},k.prototype._scroll=function(){if(this.skipScrolling)return v.resolve();var e=new m.ScrollOptions({offsetX:this.offsetX,offsetY:this.offsetY},!1);return new i.default(this.element,e).run()},k.prototype._moveToCurrentFrame=function(){if(p.default.active)return v.resolve();var e=p.default.position,t=e.x,n=e.y,o=p.default.activeWindow,r=null,i=null,s=null,l={cmd:U,startX:t,startY:n,endX:this.endPoint.x,endY:this.endPoint.y,modifiers:this.modifiers,speed:this.speed};return o.parent===B&&(r=P.findIframeByWindow(o),s=C.getIframeClientCoordinates(r),l.left=s.left,l.top=s.top,l.right=s.right,l.bottom=s.bottom),(0,a.underCursor)().then(function(e){return i=e===r,o.parent===B&&(l.iframeUnderCursor=i),I(l,N,o)}).then(function(e){return p.default.activeWindow=B,i||B.top!==B?p.default.move(e.x,e.y):null})},k.prototype.run=function(){var l=this;return(0,a.underCursor)().then(function(e){l.dragElement=l.holdLeftButton?e:null;var t=function(e){for(var t=e;t;){if(t.draggable)return t;t=y.nodeParentNodeGetter.call(t)}return null}(l.dragElement);if(t&&S.hasDataTransfer&&!l.skipDefaultDragBehavior){l.dragAndDropState.enabled=!0,l.dragElement=t,l.dragAndDropState.element=l.dragElement,l.dragAndDropState.dataStore=new w,l.dragAndDropState.dataTransfer=new x(l.dragAndDropState.dataStore);var n=P.isAnchorElement(l.dragElement);if(n||P.isImgElement(l.dragElement)){var o=n?"href":"src",r=_.parseProxyUrl(l.dragElement[o]),i=r?r.destUrl:l.dragElement[o],s=b.cleanUpHtml(y.elementOuterHTMLGetter.call(l.dragElement));l.dragAndDropState.dataTransfer.setData("text/plain",i),l.dragAndDropState.dataTransfer.setData("text/uri-list",i),l.dragAndDropState.dataTransfer.setData("text/html",s)}}return l._scroll()}).then(function(){var e=l._getTargetClientPoint(),t=e.x,n=e.y,o=O.getWidth(B),r=O.getHeight(B);return 0<=t&&t<=o&&0<=n&&n<=r?(l.endPoint={x:t,y:n},l._moveToCurrentFrame().then(function(){return l._move()})):null}).then(function(){return l.dragAndDropState})},k);function k(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),this.touchMode=S.isTouchDevice,this.moveEvent=this.touchMode?"touchmove":"mousemove",this.holdLeftButton=t.holdLeftButton,this.dragElement=null,this.dragAndDropState=new f.default,this.automationSettings=new c.default(t.speed);var n=k.getTarget(e,t.offsetX,t.offsetY);this.element=n.element,this.offsetX=n.offsetX,this.offsetY=n.offsetY,this.speed=t.speed,this.cursorSpeed=this.holdLeftButton?this.automationSettings.draggingSpeed:this.automationSettings.cursorSpeed,this.minMovingTime=t.minMovingTime||null,this.modifiers=t.modifiers||{},this.skipScrolling=t.skipScrolling,this.skipDefaultDragBehavior=t.skipDefaultDragBehavior,this.endPoint=null,this.movingTime=null,this.x=null,this.y=null,this.startTime=null,this.endTime=null,this.distanceX=null,this.distanceY=null,this.firstMovingStepOccured=!1}e.default=D,t.exports=e.default}},press:{"index.js":function(e,t,n){e.__esModule=!0;var o=u(n("../../deps/hammerhead")),l=n("../../deps/testcafe-core"),i=u(n("./key-press-simulator")),a=u(n("./shortcuts")),s=n("./utils"),r=u(n("../../settings"));function u(e){return e&&e.__esModule?e:{default:e}}var c=o.default.Promise,f=o.default.utils.browser,d=o.default.eventSandbox.message,h=o.default.nativeMethods,m="automation|press|request",p="automation|press|response";d.on(d.SERVICE_MSG_RECEIVED_EVENT,function(e){e.message.cmd===m&&(o.default.on(o.default.EVENTS.beforeUnload,function(){return d.sendServiceMsg({cmd:p},e.source)}),new E(e.message.keyCombinations,e.message.options).run().then(function(){return d.sendServiceMsg({cmd:p},e.source)}))});var E=(g._getKeyPressSimulators=function(e){var t=(0,l.getKeyArray)(e),n=(0,s.getActualKeysAndEventKeyProperties)(t),o=n.actualKeys,r=n.eventKeyProperties;return l.arrayUtils.map(o,function(e,t){return new i.default(e,r[t])})},g._getShortcuts=function(e){for(var t=(0,l.getKeyArray)(e.toLowerCase()),n=[],o=[],r=[],i=0;i<t.length;i++)for(o.push(t[i]),r=o.slice();r.length;){var s=r.join("+");a.default[s]?(n.push(s),o=r=[]):r.shift()}return n},g._getShortcutHandlers=function(e){for(var t=g._getShortcuts(e.toLowerCase()),n={},o="",r=null,i=null,s=null,l=0;l<t.length;l++)r=t[l],i=e.indexOf(r),s=r.length,n[o+=e.substring(0,i+s)]=a.default[r],e=e.substring(i+s);return n},g.prototype._down=function(e){this.pressedKeyString+=(this.pressedKeyString?"+":"")+e.key;var t=!e.down(this.modifiersState);return c.resolve(t)},g.prototype._press=function(e,t){var n=this;if(t&&!this.isSelectElement)return(0,l.delay)(this.automationSettings.keyActionStepDelay);var o=this.shortcutHandlers[this.pressedKeyString],r=!1;return o&&!f.isFirefox&&"enter"!==e.key||(r=!e.press(this.modifiersState)),r&&!this.isSelectElement||!o?(0,l.delay)(this.automationSettings.keyActionStepDelay):o((0,s.getDeepActiveElement)(this.topSameDomainDocument)).then(function(){return(0,l.delay)(n.automationSettings.keyActionStepDelay)})},g.prototype._up=function(e){return e.up(this.modifiersState),(0,l.delay)(this.automationSettings.keyActionStepDelay)},g.prototype._runCombination=function(e){var n=this;this.modifiersState={ctrl:!1,alt:!1,shift:!1,meta:!1},this.isSelectElement=l.domUtils.isSelectElement((0,s.getDeepActiveElement)(this.topSameDomainDocument)),this.pressedKeyString="",this.shortcutHandlers=g._getShortcutHandlers(e);var t=g._getKeyPressSimulators(e);return l.promiseUtils.each(t,function(t){return n._down(t).then(function(e){return n._press(t,e)})}).then(function(){return l.arrayUtils.reverse(t),l.promiseUtils.each(t,function(e){return n._up(e)})})},g.prototype.run=function(){var t=this,e=l.domUtils.getActiveElement(),n=l.domUtils.isIframeElement(e);if(B.top===B&&n&&h.contentWindowGetter.call(e)){var o={cmd:m,keyCombinations:this.keyCombinations,options:this.options};return(0,l.sendRequestToFrame)(o,p,h.contentWindowGetter.call(e))}return l.promiseUtils.each(this.keyCombinations,function(e){return t._runCombination(e).then(function(){return(0,l.delay)(t.automationSettings.keyActionStepDelay)})})},g);function g(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),this.keyCombinations=e,this.isSelectElement=!1,this.pressedKeyString="",this.modifiersState=null,this.shortcutHandlers=null,this.topSameDomainDocument=l.domUtils.getTopSameDomainWindow(B).document,this.automationSettings=new r.default(t.speed),this.options=t}e.default=E,t.exports=e.default},"key-press-simulator.js":function(e,t,n){e.__esModule=!0;var o=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e};function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var i=h(n("../../deps/hammerhead")),c=n("../../deps/testcafe-core"),a=h(n("../type/type-text")),f=n("./utils"),s=h(n("../../utils/get-key-code")),l=h(n("../../utils/get-key-identifier")),u=h(n("../../utils/is-letter")),d=h(n("../../utils/get-key-properties"));function h(e){return e&&e.__esModule?e:{default:e}}var m=i.default.utils.browser,p=i.default.utils.extend,E=i.default.eventSandbox.eventSimulator,g=(v._isKeyActivatedInputElement=function(e){return c.domUtils.isInputElement(e)&&/button|submit|reset|radio|checkbox/.test(e.type)},v.prototype._type=function(e,t){var n=e!==this.storedActiveElement,o=!n,r=e,i=c.domUtils.isEditableElement(e),s=c.domUtils.isEditableElement(this.storedActiveElement);try{if(n){var l=c.domUtils.isElementInIframe(e)===c.domUtils.isElementInIframe(this.storedActiveElement)||s;o=(!m.isFirefox||s)&&(!m.isWebKit||l)}}catch(e){}o&&(!m.isIE&&n&&s&&i&&(r=this.storedActiveElement),(0,a.default)(r,t))},v.prototype._addKeyPropertyToEventOptions=function(e){return p(e,(0,d.default)("keypress"===e.type,this.keyProperty,this.keyIdentifierProperty)),e},v.prototype.down=function(e){this.storedActiveElement=(0,f.getDeepActiveElement)(this.topSameDomainDocument),this.modifierKeyCode&&(e[this.sanitizedKey]=!0),e.shift&&this.isLetter&&(this.keyProperty=(0,f.changeLetterCase)(this.keyProperty));var t={keyCode:this.keyCode,type:"keydown"};return this._addKeyPropertyToEventOptions(t),E.keydown(this.storedActiveElement,p(t,e))},v.prototype.press=function(e){if(!this.isChar&&!this.specialKeyCode)return!0;var t=(0,f.getDeepActiveElement)(this.topSameDomainDocument),n=this.isChar?(0,f.getChar)(this.sanitizedKey,e.shift):null,o=this.specialKeyCode||n.charCodeAt(0),r=t!==this.storedActiveElement;if(m.isWebKit&&r&&c.domUtils.isElementInIframe(t)!==c.domUtils.isElementInIframe(this.storedActiveElement))return!0;this.storedActiveElement=t;var i={keyCode:o,charCode:o,type:"keypress"};this._addKeyPropertyToEventOptions(i);var s=m.isAndroid||E.keypress(t,p(i,e));if(!s)return s;t=(0,f.getDeepActiveElement)(this.topSameDomainDocument),!n||e.ctrl||e.alt||this._type(t,n);var l=v._isKeyActivatedInputElement(t),a=c.domUtils.isButtonElement(t),u=m.isSafari&&0<=m.compareVersions([m.webkitVersion,"603.1.30"]);return m.isFirefox||u||!l&&!a||"enter"!==this.sanitizedKey||t.click(),s},v.prototype.up=function(e){this.modifierKeyCode&&(e[this.sanitizedKey]=!1);var t={keyCode:this.keyCode,type:"keyup"};this._addKeyPropertyToEventOptions(t);var n=E.keyup((0,f.getDeepActiveElement)(this.topSameDomainDocument),p(t,e)),o=(0,f.getDeepActiveElement)(this.topSameDomainDocument);return!m.isFirefox&&!m.isSafari&&(!m.isChrome||53<=m.version)&&n&&"space"===this.sanitizedKey&&v._isKeyActivatedInputElement(o)&&o.click(),n},o(v,[{key:"key",get:function(){return this.sanitizedKey}}]),v);function v(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),this.isLetter=(0,u.default)(e),this.isChar=1===e.length||"space"===e,this.sanitizedKey=(0,c.getSanitizedKey)(e),this.modifierKeyCode=c.KEY_MAPS.modifiers[this.sanitizedKey],this.specialKeyCode=c.KEY_MAPS.specialKeys[this.sanitizedKey],this.keyCode=null,this.keyIdentifierProperty=(0,l.default)(t),this.topSameDomainDocument=c.domUtils.getTopSameDomainWindow(B).document,this.keyProperty=c.KEY_MAPS.keyProperty[t]||t,this.isChar&&"space"!==e?this.keyCode=(0,s.default)(this.sanitizedKey):this.modifierKeyCode?this.keyCode=this.modifierKeyCode:this.specialKeyCode&&(this.keyCode=this.specialKeyCode),this.storedActiveElement=null}e.default=g,t.exports=e.default},"shortcuts.js":function(e,t,n){e.__esModule=!0;var o=l(n("../../deps/hammerhead")),r=l(n("../../deps/testcafe-core")),i=l(n("../../deps/testcafe-ui")),s=n("./utils");function l(e){return e&&e.__esModule?e:{default:e}}var d=o.default.Promise,a=o.default.utils.browser,u=o.default.eventSandbox.eventSimulator,c=o.default.eventSandbox.elementEditingWatcher,h=r.default.textSelection,f=r.default.eventUtils,m=r.default.domUtils,p=i.default.selectElement,E=null,g=null;function v(){g=E=null,f.unbind(this,"blur",v,!0)}function y(e){m.isTextAreaElement(e)&&(E!==e&&(f.bind(e,"blur",v,!0),E=e),g=function(e){var t=h.hasInverseSelection(e),n=m.getTextAreaValue(e),o=t?h.getSelectionStart(e):h.getSelectionEnd(e);return n&&o?m.getTextareaIndentInLine(e,o):0}(e))}function S(e,t){var n=m.getTextAreaValue(e);if(n){var o=h.getSelectionStart(e),r=h.getSelectionEnd(e),i=h.hasInverseSelection(e),s=n.substring(0,i?o:r),l=s.lastIndexOf("\n"),a=s.substring(0,l);null!==g&&E===e||y(e),l=a.lastIndexOf("\n"),_(e,o,r,i,Math.min(l+1+g,a.length),t)}}function b(e,t){var n=m.getTextAreaValue(e);if(n){var o=h.getSelectionStart(e),r=h.getSelectionEnd(e),i=h.hasInverseSelection(e),s=i?o:r,l=n.substring(s),a=l.indexOf("\n"),u=-1===a?l.length:a+1,c=l.substring(u),f=s+u,d=-1===(a=c.indexOf("\n"))?c.length:a;null!==g&&E===e||y(e),_(e,o,r,i,f=Math.min(f+g,f+d),t)}}function _(e,t,n,o,r,i){var s=null,l=null;l=i?(s=t===n?t:o?n:t,r):s=r,h.select(e,s,l)}function T(e,t,n){m.isInputElement(e)&&"number"===e.type&&("-"===t.charAt(0)&&"."===t.charAt(1)&&(t=t.substring(1)),"."===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))),m.setElementValue(e,t),h.select(e,n,n),u.input(e)}function A(e,t){if(m.isTextEditableElement(e)){var n=h.getSelectionStart(e),o=h.getSelectionEnd(e),r=h.hasInverseSelection(e),i=null,s=!m.isTextAreaElement(e)||m.getTextareaLineNumberByPosition(e,n)===m.getTextareaLineNumberByPosition(e,o);i=s?r?o:n:r?n:o;var l=m.getElementValue(e).substring(0,i).lastIndexOf("\n"),a=-1===l?0:l+1,u=null,c=null;s?(u=a,c=t?i:a,h.select(e,c,u)):r?h.select(e,o,a):h.select(e,n,a)}return d.resolve()}function x(e,t){if(m.isTextEditableElement(e)){var n=h.getSelectionStart(e),o=h.getSelectionEnd(e),r=h.hasInverseSelection(e),i=null,s=!m.isTextAreaElement(e)||m.getTextareaLineNumberByPosition(e,n)===m.getTextareaLineNumberByPosition(e,o);i=s?r?o:n:r?n:o;var l=m.getElementValue(e).substring(i),a=l.indexOf("\n"),u=i,c=null,f=null;u+=-1===a?l.length:a,s?(c=t?i:u,f=u,h.select(e,c,f)):r?h.select(e,o,u):h.select(e,n,u)}return d.resolve()}function w(e){return A(e,!0)}function C(e){return x(e,!0)}function P(e){return m.isRadioButtonElement(e)&&!a.isFirefox}function O(e,t){return R(e,t,!1).then(function(e){e&&(e.checked=!0)})}function R(e,t,n){var o=!(2<arguments.length&&void 0!==n)||n;return e?(m.isSelectElement(e)&&p.collapseOptionList(),(0,s.focusNextElement)(e,t,o).then(function(e){return e&&m.isTextEditableInput(e)&&h.select(e),e})):d.resolve()}e.default={"ctrl+a":function(e){return m.isEditableElement(e)&&h.select(e),d.resolve()},backspace:function(e){if(m.isTextEditableElementAndEditingAllowed(e)){var t=h.getSelectionStart(e),n=h.getSelectionEnd(e),o=m.getElementValue(e).replace(/\r\n/g,"\n");n===t?0<t&&T(e,o.substring(0,t-1)+o.substring(n,o.length),t-1):T(e,o.substring(0,t)+o.substring(n,o.length),t)}return m.isContentEditableElement(e)&&h.deleteSelectionContents(e),d.resolve()},delete:function(e){if(m.isTextEditableElementAndEditingAllowed(e)){var t=h.getSelectionStart(e),n=h.getSelectionEnd(e),o=m.getElementValue(e).replace(/\r\n/g,"\n");n===t?t<o.length&&T(e,o.substring(0,t)+o.substring(n+1,o.length),t):T(e,o.substring(0,t)+o.substring(n,o.length),t)}return m.isContentEditableElement(e)&&h.deleteSelectionContents(e),d.resolve()},left:function(e){var t=null;if(m.isSelectElement(e)&&p.switchOptionsByKeys(e,"left"),P(e))return O(e,!0);if(m.isTextEditableElement(e)){var n=(t=h.getSelectionStart(e)||0)===h.getSelectionEnd(e)?t-1:t;h.select(e,n,n),y(e)}if(m.isContentEditableElement(e)&&(t=h.getSelectionStart(e))!==h.getSelectionEnd(e)){var o=h.getSelectionByElement(e),r=h.hasInverseSelectionContentEditable(e),i={node:r?o.focusNode:o.anchorNode,offset:r?o.focusOffset:o.anchorOffset};h.selectByNodesAndOffsets(i,i,!0)}return d.resolve()},right:function(e){var t=null,n=null;if(m.isSelectElement(e)&&p.switchOptionsByKeys(e,"right"),P(e))return O(e,!1);if(m.isTextEditableElement(e)){var o=(t=h.getSelectionStart(e))===(n=h.getSelectionEnd(e))?n+1:n;t===m.getElementValue(e).length&&(o=t),h.select(e,o,o),y(e)}if(m.isContentEditableElement(e)&&(t=h.getSelectionStart(e))!==(n=h.getSelectionEnd(e))){var r=h.getSelectionByElement(e),i=h.hasInverseSelectionContentEditable(e),s={node:i?r.anchorNode:r.focusNode,offset:i?r.anchorOffset:r.focusOffset};h.selectByNodesAndOffsets(s,s,!0)}return d.resolve()},up:function(e){return m.isSelectElement(e)&&p.switchOptionsByKeys(e,"up"),P(e)?O(e,!0):a.isWebKit&&m.isInputElement(e)?A(e):(m.isTextAreaElement(e)&&S(e,!1),d.resolve())},down:function(e){return m.isSelectElement(e)&&p.switchOptionsByKeys(e,"down"),P(e)?O(e,!1):a.isWebKit&&m.isInputElement(e)?x(e):(m.isTextAreaElement(e)&&b(e,!1),d.resolve())},"shift+left":function(e){if(m.isTextEditableElement(e)){var t=h.getSelectionStart(e),n=h.getSelectionEnd(e);t===n||h.hasInverseSelection(e)?h.select(e,n,Math.max(t-1,0)):h.select(e,t,Math.max(n-1,0)),y(e)}return d.resolve()},"shift+right":function(e){if(m.isTextEditableElement(e)){var t=h.getSelectionStart(e),n=h.getSelectionEnd(e),o=m.getElementValue(e).length;t!==n&&h.hasInverseSelection(e)?h.select(e,n,Math.min(t+1,o)):h.select(e,t,Math.min(n+1,o)),y(e)}return d.resolve()},"shift+up":function(e){return a.isWebKit&&m.isInputElement(e)?w(e):(m.isTextAreaElement(e)&&S(e,!0),d.resolve())},"shift+down":function(e){return a.isWebKit&&m.isInputElement(e)?C(e):(m.isTextAreaElement(e)&&b(e,!0),d.resolve())},"shift+home":w,"shift+end":C,home:A,end:x,enter:function(e){if(m.isSelectElement(e)&&p.collapseOptionList(),m.isInputElement(e)){a.isIE||c.processElementChanging(e);var t=m.getParents(e,"form")[0];t&&function(e,t){var n=e.querySelectorAll("input, button"),o=null,r=null;for(r=0;r<n.length;r++)if(!o&&"submit"===n[r].type&&!n[r].disabled){o=n[r];break}if(o)u.click(o);else if(m.blocksImplicitSubmission(t)){var i=e.getElementsByTagName("input"),s=[];for(r=0;r<i.length;r++)m.blocksImplicitSubmission(i[r])&&s.push(i[r]);1===s.length&&s[0]===t&&t.validity.valid&&u.submit(e)&&e.submit()}}(t,e)}else if(m.isTextAreaElement(e)){var n=h.getSelectionStart(e),o=m.getTextAreaValue(e),r=o.substring(0,n),i=o.substring(n),s=n+1;T(e,r+String.fromCharCode(10)+i,s)}else e.tagName&&m.isAnchorElement(e)&&u.click(e);return d.resolve()},tab:function(e){return R(e,!1)},"shift+tab":function(e){return R(e,!0)},esc:function(e){return m.isSelectElement(e)&&p.collapseOptionList(),d.resolve()}},t.exports=e.default},"utils.js":function(e,t,n){e.__esModule=!0,e.changeLetterCase=h,e.getActualKeysAndEventKeyProperties=function(e){for(var t=e.slice(),n=0;n<e.length;n++){var o=e[n];if("shift"===o.toLowerCase()){var r=e[n+1];if(!r)continue;l.KEY_MAPS.shiftMap[r]?e[n+1]=l.KEY_MAPS.shiftMap[r]:l.KEY_MAPS.reversedShiftMap[r]&&(t[n+1]=l.KEY_MAPS.reversedShiftMap[r])}!l.KEY_MAPS.shiftMap[o]||e[n-1]&&"shift"===e[n-1].toLowerCase()||(e[n]=l.KEY_MAPS.shiftMap[o],e.splice(n,0,"shift"),t.splice(n,0,"shift"),n++)}return{actualKeys:e,eventKeyProperties:t}},e.getChar=function(e,t){if("space"===e)return" ";if(t){if((0,r.default)(e))return h(e);if(l.KEY_MAPS.reversedShiftMap[e])return l.KEY_MAPS.reversedShiftMap[e]}return e},e.getDeepActiveElement=function e(t){var n=t||F,o=null,r=s.documentActiveElementGetter.call(n);if(r&&l.domUtils.isDomElement(r)||(r=n.body),r&&l.domUtils.isIframeElement(r)&&s.contentDocumentGetter.call(r))try{o=e(s.contentDocumentGetter.call(r))}catch(e){}return o||r},e.focusNextElement=function(n,o,r){return new d(function(e){var t=p(n,o,r);t?f.focus(t,function(){return e(t)}):e()})},e.getNextFocusableElement=p;var o=i(n("../../deps/hammerhead")),l=n("../../deps/testcafe-core"),r=i(n("../../utils/is-letter")),a=n("../../../core/utils/dom"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("../../../core/utils/array"));function i(e){return e&&e.__esModule?e:{default:e}}var s=o.default.nativeMethods,c=o.default.utils.browser,f=o.default.eventSandbox.focusBlur,d=o.default.Promise;function h(e){return e===e.toLowerCase()?e.toUpperCase():e.toLowerCase()}function m(e,t,n){if(!(0,a.isRadioButtonElement)(t))return e;if(!n&&!t.name&&!c.isChrome)return[t];var o=function(t,e){var n=null;return e?""===t.name||c.isFirefox||(n=function(e){return!e.name||e===t||e.name!==t.name}):""!==t.name?n=function(e){return(0,a.isRadioButtonElement)(e)&&e.name===t.name}:c.isChrome&&(n=function(e){return(0,a.isRadioButtonElement)(e)&&!e.name}),n}(t,n);return o&&(e=u.filter(e,o)),e}function p(e,t,n){var o=t?-1:1,r=l.domUtils.getFocusableElements((0,a.findDocument)(e),!0);r=m(r,e,n);var i=(0,a.isRadioButtonElement)(e),s=u.indexOf(r,e);return(t?0===s:s===r.length-1)?n||!i?F.body:r[r.length-1-s]:t&&-1===s?r[r.length-1]:function(e,t,n){var o=(0,a.isRadioButtonElement)(t)&&t.name&&!t.checked,r=null;return n&&o&&(r=u.find(e,function(e){return(0,a.isRadioButtonElement)(e)&&e.name===t.name&&e.checked})),r||t}(r,r[s+o],n)}}},"rclick.js":function(e,t,n){e.__esModule=!0;var o=u(n("../deps/hammerhead")),r=u(n("../deps/testcafe-core")),i=u(n("./visible-element-automation")),s=n("../utils/utils"),l=u(n("../cursor")),a=u(n("../utils/next-tick"));function u(e){return e&&e.__esModule?e:{default:e}}var c,f=o.default.Promise,d=o.default.utils.extend,h=o.default.utils.browser,m=o.default.eventSandbox.eventSimulator,p=r.default.domUtils,E=r.default.eventUtils,g=r.default.delay,v=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(y,c=i.default),y.prototype._mousedown=function(e){var t=this;return l.default.rightButtonDown().then(function(){t.eventState.activeElementBeforeMouseDown=p.getActiveElement(),t.eventState.simulateDefaultBehavior=m.mousedown(e.element,e.options)}).then(function(){return t._focus(e)})},y.prototype._focus=function(e){if(!1===this.simulateDefaultBehavior)return(0,a.default)();var t=p.isContentEditableElement(this.element)?this.element:e.element,n=!h.isIE||this.eventState.activeElementBeforeMouseDown===p.getActiveElement();return(0,s.focusAndSetSelection)(t,n,this.caretPos).then(function(){return(0,a.default)()})},y.prototype._mouseup=function(t){var e=this;return l.default.buttonUp().then(function(){return e._getElementForEvent(t)}).then(function(e){return m.mouseup(e,t.options)})},y.prototype._contextmenu=function(t){return this._getElementForEvent(t).then(function(e){m.contextmenu(e,t.options),p.isElementFocusable(e)||(0,s.focusByRelatedElement)(e)})},y.prototype.run=function(e){var r=this,i=null;return this._ensureElement(e).then(function(e){var t=e.element,n=e.clientPoint,o=e.devicePoint;return i={point:n,element:t,options:d({clientX:n.x,clientY:n.y,screenX:o.x,screenY:o.y,button:E.BUTTON.right},r.modifiers)},f.all([g(r.automationSettings.mouseActionStepDelay),r._mousedown(i)])}).then(function(){return r._mouseup(i)}).then(function(){return r._contextmenu(i)})},y);function y(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,c.call(this,e,t));return n.modifiers=t.modifiers,n.caretPos=t.caretPos,n.eventState={simulateDefaultBehavior:!0,activeElementBeforeMouseDown:null},n}e.default=v,t.exports=e.default},"scroll.js":function(e,t,n){e.__esModule=!0;var o,r=n("../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},h=n("../deps/testcafe-core"),a=i.default.Promise,l=i.default.eventSandbox.message,u="automation|scroll|request",c="automation|scroll|response";l.on(l.SERVICE_MSG_RECEIVED_EVENT,function(e){if(e.message.cmd===u){var t=e.message,n=t.offsetX,o=t.offsetY,r=t.maxScrollMargin,i=h.domUtils.findIframeByWindow(e.source),s=new f(i,{offsetX:n,offsetY:o});s.maxScrollMargin=r,s.run().then(function(){return l.sendServiceMsg({cmd:c},e.source)})}});var f=(m.prototype._isScrollValuesChanged=function(e,t){return h.styleUtils.getScrollLeft(e)!==t.left||h.styleUtils.getScrollTop(e)!==t.top},m.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=h.domUtils.isHtmlElement(e)?h.domUtils.findDocument(e):e,s={left:h.styleUtils.getScrollLeft(i),top:h.styleUtils.getScrollTop(i)};o=Math.max(o,0),r=Math.max(r,0);var l=h.scrollController.waitForScroll();return h.styleUtils.setScrollLeft(i,o),h.styleUtils.setScrollTop(i,r),this._isScrollValuesChanged(i,s)?l=l.then(function(){n.scrollWasPerformed=n.scrollWasPerformed||n._isScrollValuesChanged(i,s)}):(l.cancel(),a.resolve())},m.prototype._getScrollToPoint=function(e,t,n){var o=t.x,r=t.y,i=Math.floor(e.width/2),s=Math.floor(Math.floor(e.height/2)),l=this.scrollToCenter?i:Math.min(n.left,i),a=this.scrollToCenter?s:Math.min(n.top,s),u=o>=e.scroll.left+e.width-l,c=o<=e.scroll.left+l,f=r>=e.scroll.top+e.height-a,d=r<=e.scroll.top+a,h=e.scroll.left,m=e.scroll.top;return u?h=o-e.width+l:c&&(h=o-l),f?m=r-e.height+a:d&&(m=r-a),{left:h,top:m}},m.prototype._getScrollToFullChildView=function(e,t,n){var o=null,r=null,i=e.width>=t.width,s=e.height>=t.height,l=h.positionUtils.calcRelativePosition(t,e);if(i){var a=e.width-t.width,u=Math.min(n.left,a);this.scrollToCenter&&(u=a/2),l.left<u?o=Math.round(e.scroll.left+l.left-u):l.right<u&&(o=Math.round(e.scroll.left+Math.min(l.left,-l.right)+u))}if(s){var c=e.height-t.height,f=Math.min(n.top,c);this.scrollToCenter&&(f=c/2),l.top<f?r=Math.round(e.scroll.top+l.top-f):l.bottom<f&&(r=Math.round(e.scroll.top+Math.min(l.top,-l.bottom)+f))}return{left:o,top:r}},m._getChildPoint=function(e,t,n){return{x:t.left-e.left+e.scroll.left+t.border.left+n.x,y:t.top-e.top+e.scroll.top+t.border.top+n.y}},m.prototype._getScrollPosition=function(e,t,n,o){var r=m._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),s=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===s.left?i.left:s.left,0),top:Math.max(null===s.top?i.top:s.top,0)}},m._getChildPointAfterScroll=function(e,t,n,o){return{x:Math.round(t.left+e.scroll.left-n.left+o.x),y:Math.round(t.top+e.scroll.top-n.top+o.y)}},m.prototype._isChildFullyVisible=function(e,t,n){var o=m._getChildPointAfterScroll(e,t,e.scroll,n),r=o.x,i=o.y,s=this._getScrollPosition(e,t,n,{left:0,top:0}),l=s.left,a=s.top;return!this._isTargetElementObscuredInPoint(r,i)&&l===e.scroll.left&&a===e.scroll.top},m.prototype._scrollToChild=function(e,t,n){for(var o=h.positionUtils.getClientDimensions(e),r=h.positionUtils.getClientDimensions(t),i=h.styleUtils.getInnerWidth(B),s=h.styleUtils.getInnerHeight(B),l=o.scroll,a=!this._isChildFullyVisible(o,r,n);a;){l=this._getScrollPosition(o,r,n,this.maxScrollMargin);var u=m._getChildPointAfterScroll(o,r,l,n),c=u.x,f=u.y,d=this._isTargetElementObscuredInPoint(c,f);this.maxScrollMargin.left+=20,this.maxScrollMargin.left>=i&&(this.maxScrollMargin.left=50,this.maxScrollMargin.top+=20),a=d&&this.maxScrollMargin.top<s}return this.maxScrollMargin={left:50,top:50},this._setScroll(e,l)},m.prototype._scrollElement=function(){if(!h.styleUtils.hasScroll(this.element))return a.resolve();var e=h.positionUtils.getClientDimensions(this.element),t=this._getScrollToPoint(e,{x:this.offsetX,y:this.offsetY},this.maxScrollMargin);return this._setScroll(this.element,t)},m.prototype._scrollParents=function(){var t=this,n=h.styleUtils.getScrollableParents(this.element),o=this.element,r=this.offsetX-Math.round(h.styleUtils.getScrollLeft(o)),i=this.offsetY-Math.round(h.styleUtils.getScrollTop(o)),s=null,l=null;return h.promiseUtils.times(n.length,function(e){return t._scrollToChild(n[e],o,{x:r,y:i}).then(function(){s=h.positionUtils.getClientDimensions(o),l=h.positionUtils.getClientDimensions(n[e]),r+=s.left-l.left+l.border.left,i+=s.top-l.top+l.border.top,o=n[e]})}).then(function(){return B.top===B||t.skipParentFrames?a.resolve():(0,h.sendRequestToFrame)({cmd:u,offsetX:r,offsetY:i,maxScrollMargin:t.maxScrollMargin},c,B.parent)})},m._getFixedAncestorOrSelf=function(e){return h.domUtils.findParent(e,!0,h.styleUtils.isFixedElement)},m.prototype._isTargetElementObscuredInPoint=function(e,t){var n=h.positionUtils.getElementFromPoint(e,t);if(!n)return!1;var o=m._getFixedAncestorOrSelf(n);return o&&!o.contains(this.element)},m.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()}).then(function(){return e.scrollWasPerformed})},m);function m(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),this.element=e,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.scrollToCenter=t.scrollToCenter,this.skipParentFrames=t.skipParentFrames,this.raiseEvents=t.raiseEvents,this.maxScrollMargin={left:50,top:50},this.scrollWasPerformed=!1}e.default=f,t.exports=e.default},select:{"base.js":function(e,t,n){e.__esModule=!0;var o=d(n("../../deps/hammerhead")),r=d(n("../../deps/testcafe-core")),i=d(n("../visible-element-automation")),s=n("../../get-element"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("./utils")),a=d(n("../move")),u=n("../../../../test-run/commands/options"),c=d(n("../../cursor")),f=d(n("../../errors"));function d(e){return e&&e.__esModule?e:{default:e}}var h,m=o.default.Promise,p=o.default.utils.browser,E=o.default.utils.featureDetection,g=o.default.eventSandbox.eventSimulator,v=o.default.eventSandbox.focusBlur,y=r.default.contentEditable,S=r.default.domUtils,b=r.default.positionUtils,_=r.default.eventUtils,T=r.default.delay,A=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(x,h=i.default),x._calculateEventArguments=function(e){var n=b.offsetToClientCoords(e);return(0,s.fromPoint)(n.x,n.y).then(function(e){var t=e.element;if(!t)throw new Error(f.default.elementIsInvisibleError);return{element:t,options:{clientX:n.x,clientY:n.y}}})},x.prototype._move=function(e){var t=this,n=e.element,o=e.offsetX,r=e.offsetY,i=e.speed,s=new u.MoveOptions({offsetX:o,offsetY:r,speed:i},!1);return new a.default(n,s).run().then(function(){return T(t.automationSettings.mouseActionStepDelay)})},x.prototype._bindMousedownHandler=function(){var n=this;_.bind(this.element,"mousedown",function e(t){n.eventState.mousedownPrevented=t.defaultPrevented,_.preventDefault(t),_.unbind(n.element,"mousedown",e)})},x.prototype._calculateAbsoluteStartPoint=function(){throw new Error("Not implemented")},x.prototype._calculateAbsoluteEndPoint=function(){throw new Error("Not implemented")},x.prototype._moveToPoint=function(e){l.scrollEditableElementByPoint(this.element,e),this.clientPoint=l.excludeElementScroll(this.element,e);var t={element:F.documentElement,offsetX:this.clientPoint.x,offsetY:this.clientPoint.y,speed:this.speed};return this._move(t)},x.prototype._mousedown=function(){var n=this;return c.default.leftButtonDown().then(function(){return x._calculateEventArguments(n.clientPoint)}).then(function(e){n.eventArgs=e;var t=(p.isWebKit||p.isIE)&&S.isSelectElement(n.element);return t&&n._bindMousedownHandler(),n.eventState.simulateDefaultBehavior=g[n.downEvent](n.eventArgs.element,n.eventArgs.options),!1===n.eventState.simulateDefaultBehavior&&(n.eventState.simulateDefaultBehavior=t&&!n.eventState.mousedownPrevented),n._focus()})},x.prototype._focus=function(){var n=this;return new m(function(e){var t=S.isContentEditableElement(n.element)?y.findContentEditableParent(n.element):n.element;v.focus(t,e,!1,!0)})},x.prototype._setSelection=function(){throw new Error("Not implemented")},x.prototype._mouseup=function(){var t=this;return c.default.buttonUp().then(function(){return t._setSelection(),x._calculateEventArguments(t.clientPoint)}).then(function(e){t.eventArgs=e,g[t.upEvent](t.eventArgs.element,t.eventArgs.options)})},x.prototype.run=function(){var e=this;return this.absoluteStartPoint=this._calculateAbsoluteStartPoint(),this.absoluteEndPoint=this._calculateAbsoluteEndPoint(),this._moveToPoint(this.absoluteStartPoint).then(function(){return e._mousedown()}).then(function(){return e._moveToPoint(e.absoluteEndPoint)}).then(function(){return e._mouseup()})},x);function x(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,h.call(this,e,t));return n.absoluteStartPoint=null,n.absoluteEndPoint=null,n.clientPoint=null,n.speed=t.speed,n.downEvent=E.isTouchDevice?"touchstart":"mousedown",n.upEvent=E.isTouchDevice?"touchend":"mouseup",n.eventArgs={options:null,element:null},n.eventState={mousedownPrevented:!1,simulateDefaultBehavior:!0},n}e.default=A,t.exports=e.default},"calculate-select-text-arguments.js":function(e,t,n){e.__esModule=!0,e.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=h.isTextEditableElement(e),o=n?0:l.getFirstVisiblePosition(e),r=n?h.getElementValue(e).length:l.getLastVisiblePosition(e),i=t.startPos?Math.min(t.startPos,r):o,s=void 0===t.endPos||null===t.endPos?r:Math.min(t.endPos,r);return void 0!==t.offset?(s=0<=t.offset?Math.min(t.offset,s):(i=s,Math.max(0,s+t.offset)),{startPos:i,endPos:s}):void 0!==t.startLine?function(e,t){var n=h.getTextAreaValue(e),o=n&&n.length?n.split("\n"):[],r=o.length-1,i=t.startLine?Math.min(t.startLine,r):0,s=o[i]?o[i].length:0,l=t.startPos?Math.min(t.startPos,s):0,a=void 0===t.endLine||null===t.endLine?r:Math.min(t.endLine,r),u=o[a]?o[a].length:0,c=void 0===t.endPos||null===t.endPos?u:Math.min(t.endPos,u),f=h.getTextareaPositionByLineAndOffset(e,i,0),d=h.getTextareaPositionByLineAndOffset(e,a,0);return{startPos:f+l,endPos:d+c}}(e,t):{startPos:i,endPos:s}};var o,r=n("../../deps/testcafe-core"),i=(o=r)&&o.__esModule?o:{default:o},h=i.default.domUtils,l=i.default.contentEditable;t.exports=e.default},"select-editable-content.js":function(e,t,n){e.__esModule=!0;var o=s(n("../../deps/testcafe-core")),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("./utils")),i=s(n("./base"));function s(e){return e&&e.__esModule?e:{default:e}}var u,l=o.default.textSelection,c=o.default.contentEditable,a=o.default.positionUtils,f=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(d,u=i.default),d.prototype._calculateAbsoluteStartPoint=function(){return r.getSelectionCoordinatesByNodeAndOffset(this.element,this.startNode,this.startOffset)||a.findCenter(this.element)},d.prototype._calculateAbsoluteEndPoint=function(){return r.getSelectionCoordinatesByNodeAndOffset(this.element,this.endNode,this.endOffset)||a.findCenter(this.element)},d.prototype._setSelection=function(){if(!1!==this.eventState.simulateDefaultBehavior){var e={node:this.startNode,offset:this.startOffset},t={node:this.endNode,offset:this.endOffset};l.selectByNodesAndOffsets(e,t,!0)}},d);function d(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,u.call(this,c.getNearestCommonAncestor(e,t),n)),r=c.getFirstVisiblePosition(e),i=c.getLastVisiblePosition(t),s={node:e,offset:r},l={node:t,offset:i},a=c.calculatePositionByNodeAndOffset(o.element,s);return c.calculatePositionByNodeAndOffset(o.element,l)<a&&(r=c.getLastVisiblePosition(e),i=c.getFirstVisiblePosition(t)),s=c.calculateNodeAndOffsetByPosition(e,r),l=c.calculateNodeAndOffsetByPosition(t,i),o.startNode=s.node,o.startOffset=s.offset,o.endNode=l.node,o.endOffset=l.offset,o}e.default=f,t.exports=e.default},"select-text.js":function(e,t,n){e.__esModule=!0;var o=s(n("../../deps/testcafe-core")),r=s(n("./base")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("./utils"));function s(e){return e&&e.__esModule?e:{default:e}}var l,a=o.default.textSelection,u=o.default.domUtils,c=o.default.positionUtils,f=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(d,l=r.default),d.prototype._calculateAbsoluteStartPoint=function(){return i.getSelectionCoordinatesByPosition(this.element,this.startPos)||c.findCenter(this.element)},d.prototype._calculateAbsoluteEndPoint=function(){var e=i.getSelectionCoordinatesByPosition(this.element,this.endPos);return e||(u.isContentEditableElement(this.element)?i.getLastVisibleSelectionPosition(this.element,this.startPos,this.endPos):c.findCenter(this.element))},d.prototype._setSelection=function(){var e=u.isTextEditableElement(this.element),t=u.isContentEditableElement(this.element);(e||t)&&!1!==this.eventState.simulateDefaultBehavior&&a.select(this.element,this.startPos,this.endPos)},d.prototype.run=function(e){var t=this;return this._ensureElement(e).then(function(){return l.prototype.run.call(t)})},d);function d(e,t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,l.call(this,e,o));return r.startPos=t,r.endPos=n,r}e.default=f,t.exports=e.default},"utils.js":function(e,t,n){e.__esModule=!0,e.getSelectionCoordinatesByPosition=function(e,t){var n=h.isTextEditableElement(e),o=h.isContentEditableElement(e);return n&&0<h.getElementValue(e).length||o&&i.getContentEditableValue(e).length?c(e,t):m.findCenter(e)},e.getSelectionCoordinatesByNodeAndOffset=function(e,t,n){var o=h.findDocument(e).createRange();o.setStart(t,Math.min(n,t.length)),o.setEnd(t,Math.min(n,t.length));var r=o.getClientRects()[0];return r?{x:(r=l(r=s(e,r))).left,y:Math.floor(r.top+(r.bottom-r.top)/2)}:null},e.getLastVisibleSelectionPosition=function(e,t,n){for(var o=n<t?1:-1,r=n,i=null;r!==t&&!(i=c(e,r+=o)););return i=i||c(e,t)||m.findCenter(e)},e.scrollEditableElementByPoint=function(e,t){if(h.isEditableElement(e)){var n=h.isTextAreaElement(e);if(!h.isInputElement(e)||!(u.isFirefox||u.isIE&&10<u.version)){var o=m.getOffsetPosition(e),r=p.getBordersWidth(e),i=p.getElementScroll(e),s=t.x-o.left-r.left,l=t.y-o.top-r.top,a=null;if(n)return l<i.top&&(a=l),l>e.clientHeight+i.top&&(a=l-e.clientHeight),void(null!==a&&p.setScrollTop(e,Math.round(a)));s<i.left&&(a=s),s>e.clientWidth+i.left&&(a=s-e.clientWidth),null!==a&&p.setScrollLeft(e,Math.round(a))}}},e.excludeElementScroll=function(e,t){var n=h.isTextEditableElement(e),o=h.isInputElement(e);if(!n&&!h.isContentEditableElement(e))return t;var r=m.getOffsetPosition(e),i=p.getBordersWidth(e),s=p.getElementScroll(e),l=r.left+i.left+e.clientWidth;return o&&n&&(u.isFirefox||u.isIE&&10<u.version)?{x:Math.min(t.x,l),y:t.y}:{x:t.x-s.left,y:t.y-s.top}};var f=r(n("../../deps/hammerhead")),o=r(n("../../deps/testcafe-core"));function r(e){return e&&e.__esModule?e:{default:e}}var u=f.default.utils.browser,h=o.default.domUtils,m=o.default.positionUtils,p=o.default.styleUtils,i=o.default.contentEditable,d=o.default.arrayUtils,E=["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 s(e,t){var n=p.getBordersWidth(e),o=m.getOffsetPosition(e),r=e.scrollHeight||e.getBoundingClientRect().height,i=Math.ceil(t.left),s=Math.ceil(t.top),l=Math.floor(t.bottom);if(!h.isTextAreaElement(e)){var a=m.offsetToClientCoords({x:o.left,y:o.top}),u=a.x+n.left+1,c=a.y+n.top+1,f=a.y+n.top+n.bottom+r,d=a.y+n.top+r-1;i=Math.ceil(i<=a.x?u:t.left),s=Math.ceil(s<=a.y?c:t.top),l=Math.floor(f<=l?d:t.bottom)}return{left:i,top:s,bottom:l}}function l(e){var t=p.getElementScroll(F);return{left:e.left+t.left,top:e.top+t.top,bottom:e.bottom+t.top}}function a(e,t){var n=e.getBoundingClientRect(),o=function(t){var e=F.body,n=m.getOffsetPosition(t),o=p.getElementMargin(t),r=n.top-o.top,i=n.left-o.left,s=F.createElement("div"),l="white-space:pre-wrap;border-style:solid;";if("absolute"===p.get(e,"position")){var a=p.getElementMargin(e),u=p.get(e,"left"),c=p.get(e,"top");i-=a.left+(parseInt(u.replace("px",""),10)||0),r-=a.top+(parseInt(c.replace("px",""),10)||0)}return d.forEach(E,function(e){l+=e+":"+p.get(t,e)+";"}),p.set(s,{cssText:l,position:"absolute",left:i+"px",top:r+"px",width:t.scrollWidth+"px",height:t.scrollHeight+"px"}),f.default.nativeMethods.nodeTextContentSetter.call(s,h.getElementValue(t)+" "),e.appendChild(s),s}(e),r=null,i=e.getBoundingClientRect(),s=i.top-n.top,l=i.left-n.left,a=h.getElementValue(e).length;try{var u=F.createRange();u.setStart(f.default.nativeMethods.nodeFirstChildGetter.call(o),Math.min(t,a)),u.setEnd(f.default.nativeMethods.nodeFirstChildGetter.call(o),Math.min(t+1,a+1)),h.isTextAreaElement(e)?0===(r=u.getBoundingClientRect()).width&&0===r.height&&(r=u.getClientRects()[0]):r=u.getClientRects()[0]}catch(e){r=null}return h.remove(o),r?{width:r.width,height:r.height,top:r.top-s,bottom:r.bottom-s,left:r.left-l,right:r.right-l}:null}function c(e,t){var n=null;return(n=h.isContentEditableElement(e)?function(e,t){var n=h.findDocument(e).createRange(),o=i.calculateNodeAndOffsetByPosition(e,t);return n.setStart(o.node,Math.min(o.offset,o.node.length)),n.setEnd(o.node,Math.min(o.offset,o.node.length)),n.getClientRects()[0]}(e,t):"function"==typeof e.createTextRange?function(e,t){var n=e.createTextRange();return n.collapse(!0),n.moveStart("character",t),n.moveEnd("character",t),n.collapse(!0),n.getBoundingClientRect()}(e,t):a(e,t))?{x:(n=l(n=s(e,n))).left,y:Math.floor(n.top+(n.bottom-n.top)/2)}:null}}},type:{"index.js":function(e,t,n){e.__esModule=!0;var o=h(n("../../deps/hammerhead")),r=h(n("../../deps/testcafe-core")),c=n("../../../../test-run/commands/options"),f=h(n("../click")),l=h(n("./type-text")),i=h(n("../../utils/get-key-code")),s=h(n("../../utils/get-key-identifier")),d=n("../../utils/offsets"),a=h(n("../../settings")),u=h(n("../../utils/get-key-properties"));function h(e){return e&&e.__esModule?e:{default:e}}var m=o.default.Promise,p=o.default.utils.extend,E=o.default.utils.browser,g=o.default.eventSandbox.eventSimulator,v=o.default.eventSandbox.elementEditingWatcher,y=r.default.domUtils,S=r.default.promiseUtils,b=r.default.contentEditable,_=r.default.textSelection,T=r.default.delay,A=r.default.KEY_MAPS.specialKeys,x=(w.findTextEditableChild=function(e){var t=null;if(!y.isEditableElement(e))for(var n=e.querySelectorAll("*"),o=0;o<n.length;o++)if(y.isTextEditableElementAndEditingAllowed(n[o])){t=n[o];break}return t},w.prototype._calculateEventArguments=function(e){var t=y.getActiveElement(),n=y.isContentEditableElement(this.element),o=this.eventArgs.element||this.element;n||t===o||(o=w.findTextEditableChild(t)||t);var r=p({keyCode:e?this.currentCharCode:this.currentKeyCode},this.modifiers);return e&&(r.charCode=this.currentCharCode),p(r,(0,u.default)(e,this.currentKey,this.currentKeyIdentifier)),{element:o,options:r}},w.prototype._calculateTargetElement=function(){var e=y.getActiveElement(),t=y.isContentEditableElement(this.element);if(t){if(e!==b.findContentEditableParent(this.element))return void(this.eventState.skipType=!0)}else if(e!==this.element)return void(this.eventState.skipType=!0);this.element=t?this.element:e},w.prototype._click=function(e){var t=this,n=y.getActiveElement(),o=y.isTextEditableElementAndEditingAllowed(this.element),r=y.isContentEditableElement(this.element);if(n!==this.element){var i=(0,d.getDefaultAutomationOffsets)(this.element),s=i.offsetX,l=i.offsetY,a=new c.ClickOptions({offsetX:this.elementChanged?s:this.offsetX,offsetY:this.elementChanged?l:this.offsetY,speed:this.speed,caretPos:this.caretPos,modifiers:this.modifiers});return new f.default(this.element,a).run(e).then(function(){return T(t.automationSettings.mouseActionStepDelay)})}if(o&&v.watchElementEditing(this.element),o||r){var u=_.getSelectionStart(this.element);isNaN(parseInt(this.caretPos,10))||this.caretPos===u||_.select(this.element,this.caretPos,this.caretPos)}return m.resolve()},w.prototype._type=function(){var e=this;if(this.eventState.skipType)return m.resolve();var t=y.isContentEditableElement(this.element);return this.replace&&(y.isTextEditableElementAndEditingAllowed(this.element)?_.select(this.element):t&&_.deleteSelectionContents(this.element,!0)),S.whilst(function(){return!e._isTypingFinished()},function(){return e._typingStep()})},w.prototype._isTypingFinished=function(){return this.currentPos===this.typingText.length},w.prototype._typingStep=function(){var e=this.typingText.charAt(this.currentPos);return this.currentKeyCode=(0,i.default)(e),this.currentCharCode=this.typingText.charCodeAt(this.currentPos),this.currentKey=this.currentKeyCode===A.enter?"Enter":e,this.currentKeyIdentifier=(0,s.default)(this.currentKey),this._keydown(),this._keypress(),this._keyup()},w.prototype._keydown=function(){this.eventArgs=this._calculateEventArguments(),this.eventState.simulateKeypress=g.keydown(this.eventArgs.element,this.eventArgs.options)},w.prototype._keypress=function(){!1!==this.eventState.simulateKeypress&&(this.eventArgs=this._calculateEventArguments(!0),this.eventState.simulateTypeChar=E.isAndroid||g.keypress(this.eventArgs.element,this.eventArgs.options))},w.prototype._keyup=function(){var e=this,t=this.eventArgs.element;this.eventArgs=this._calculateEventArguments();var n=y.isTextEditableElement(this.element),o=y.isContentEditableElement(this.element),r=this.paste||!n&&!o;return m.resolve().then(function(){return r?e._typeAllText(t):e._typeChar(t)}).then(function(){g.keyup(e.eventArgs.element,e.eventArgs.options),r?e.currentPos=e.typingText.length:e.currentPos++})},w.prototype._typeChar=function(e){if(!1===this.eventState.simulateKeypress||!1===this.eventState.simulateTypeChar)return v.restartWatchingElementEditing(e),T(this.automationSettings.keyActionStepDelay);var t=this.typingText.charAt(this.currentPos),n=/^\d$/.test(t),o=0===this.currentPos?null:this.typingText.charAt(this.currentPos-1);if(y.isInputElement(e)&&"number"===e.type){var r=_.getSelectionStart(e),i=y.getInputValue(e).length,s=/^\d/.test(this.typingText);if(!n&&(s||!("."===t||"-"===t&&i)||0!==r))return T(this.automationSettings.keyActionStepDelay);n&&("."===o||"-"===o&&!i)&&(t=o+t)}return(0,l.default)(e,t,null),T(this.automationSettings.keyActionStepDelay)},w.prototype._typeAllText=function(e){return(0,l.default)(e,this.typingText,this.caretPos),T(this.automationSettings.keyActionStepDelay)},w.prototype.run=function(e){var t=this;return this._click(e).then(function(){return t._calculateTargetElement()}).then(function(){return t._type()})},w);function w(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),this.element=w.findTextEditableChild(e)||e,this.typingText=t.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 a.default(this.speed),this.elementChanged=e!==this.element,this.currentPos=0,this.currentKeyCode=null,this.currentCharCode=null,this.currentKey=null,this.currentKeyIdentifier=null,this.eventArgs={options:null,element:null},this.eventState={skipType:!1,simulateKeypress:!0,simulateTypeChar:!0}}e.default=x,t.exports=e.default},"type-text.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t,n){p.isContentEditableElement(e)&&function(e,t){var n=v(e),o=n.startPos.node,r=n.endPos.node,i=!0,s=!0,l=t;function a(){s=!1}function u(e,t,n){n()}t=t.replace(g,String.fromCharCode(160)),o&&r&&p.isContentEditableElement(o)&&p.isContentEditableElement(r)&&(p.isTheSameNode(o,r)||(E.deleteSelectionContents(e),n=function(e,t){var n=t.startPos.node,o=m.nodeParentNodeGetter.call(n)&&n.parentElement;return!(f.isChrome&&f.version<58||f.isSafari)&&o&&p.isElementContainsNode(e,n)||(t=v(e),E.hasInverseSelectionContentEditable(e)&&(t={startPos:t.endPos,endPos:t.startPos})),t.endPos.offset=t.startPos.offset,t}(e,n),o=n.startPos.node),o&&p.isContentEditableElement(o)&&p.isRenderedNode(o)&&(i=S(e,l),s=i&&!f.isIE11,h.addInternalEventListener(B,["input"],a),h.addInternalEventListener(B,["textinput"],u),i&&(p.isElementNode(o)?function(e,t,n){var o=F.createTextNode(t),r=t.length,i={node:o,offset:r},s=m.nodeParentNodeGetter.call(e);"br"===p.getTagName(e)?s.insertBefore(o,e):0<n?e.insertBefore(o,e.childNodes[n]):e.appendChild(o),E.selectByNodesAndOffsets(i,i)}(o,t):function(e,t,n){var o=t.startPos.node;p.isElementContainsNode(e,o)||(t=y(v(e)),o=t.startPos.node);var r=t.startPos.offset,i=t.endPos.offset,s=o.nodeValue,l={node:o,offset:r+n.length};o.nodeValue=s.substring(0,r)+n+s.substring(i,s.length),E.selectByNodesAndOffsets(l,l)}(e,y(n),t)),(0,c.default)().then(function(){s&&d.input(e),h.removeInternalEventListener(B,["input"],a),h.removeInternalEventListener(B,["textinput"],u)})))}(e,t),p.isElementReadOnly(e)||(p.isTextEditableElement(e)?function(e,t){var n=p.getElementValue(e),o=t.length,r=E.getSelectionStart(e),i=E.getSelectionEnd(e),s=p.isInputElement(e)&&"number"===e.type;if(S(e,t)){var l=!f.isIE&&s?null:parseInt(e.maxLength,10);l<0&&(l=f.isIE&&f.version<17?0:null),(null===l||isNaN(l)||l>n.length)&&(s&&f.isIOS&&"."===n[n.length-1]&&(r+=1,i+=1),p.setElementValue(e,n.substring(0,r)+t+n.substring(i,n.length)),E.select(e,r+o,r+o)),d.input(e)}}(e,t):p.isInputElement(e)&&function(e,t,n){if(null!==n){var o=p.getElementValue(e);p.setElementValue(e,o.substr(0,n)+t+o.substr(n+t.length))}else p.setElementValue(e,t);d.change(e),d.input(e)}(e,t,n))};var o=i(n("../../deps/hammerhead")),r=i(n("../../deps/testcafe-core")),c=i(n("../../utils/next-tick"));function i(e){return e&&e.__esModule?e:{default:e}}var f=o.default.utils.browser,s=o.default.sandbox.event,d=o.default.eventSandbox.eventSimulator,h=o.default.eventSandbox.listeners,m=o.default.nativeMethods,p=r.default.domUtils,l=r.default.contentEditable,E=r.default.textSelection,g=/ /g;function v(e){var t=E.getSelectionByElement(e),n=E.hasInverseSelectionContentEditable(e);return E.hasElementContainsSelection(e)?l.getSelection(e,t,n):{startPos:l.calculateNodeAndOffsetByPosition(e,0),endPos:l.calculateNodeAndOffsetByPosition(e,0)}}function y(e){var t=e.startPos.node,n=e.startPos.offset,o=e.endPos.offset,r=l.getFirstNonWhitespaceSymbolIndex(t.nodeValue),i=l.getLastNonWhitespaceSymbolIndex(t.nodeValue);return n<r&&0!==n?(e.startPos.offset=r,e.endPos.offset=o+r-n):i<o&&o!==t.nodeValue.length&&(e.startPos.offset=t.nodeValue.length,e.endPos.offset=o+t.nodeValue.length-n),e}function S(e,t){var n=void 0;function o(e){e.preventDefault(),n=!0}function r(e){"textInput"===e.type&&(n=!1)}f.isSafari&&(h.addInternalEventListener(B,["textInput"],o),s.on(s.EVENT_PREVENTED_EVENT,r));var i=f.isFirefox||d.textInput(e,t)||n;return f.isSafari&&(h.removeInternalEventListener(B,["textInput"],o),s.off(s.EVENT_PREVENTED_EVENT,r)),i||f.isIE11}t.exports=e.default}},"upload.js":function(e,t,n){e.__esModule=!0;var o=n("../deps/hammerhead"),r=n("../deps/testcafe-core"),i=(s.prototype.run=function(){var t=this;return(0,o.doUpload)(this.element,this.paths).then(function(e){if(e.length)throw t.createError(r.arrayUtils.map(e,function(e){return e.path}))})},s);function s(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),this.element=e,this.paths=t,this.createError=n}e.default=i,t.exports=e.default},"visible-element-automation.js":function(e,t,n){e.__esModule=!0;var o=g(n("../deps/hammerhead")),m=n("../deps/testcafe-core"),r=g(n("../utils/get-automation-point")),i=g(n("../utils/screen-point-to-client")),f=g(n("../utils/get-device-point")),s=n("../utils/offsets"),p=n("../get-element"),l=g(n("../errors")),a=g(n("../settings")),u=g(n("./scroll")),c=g(n("./move")),d=n("../../../test-run/commands/options"),h=g(n("./last-hovered-element-holder")),E=n("./move/event-sequence/event-behaviors");function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e){var t=e.element,n=void 0===t?null:t,o=e.clientPoint,r=void 0===o?null:o,i=e.screenPoint,s=void 0===i?null:i,l=e.isTarget,a=void 0!==l&&l,u=e.inMoving,c=void 0!==u&&u;v(this,y),this.element=n,this.clientPoint=r,this.screenPoint=s,this.isTarget=a,this.inMoving=c,this.devicePoint=(0,f.default)(r)}var S,b=o.default.utils.extend,_=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(T,S=m.serviceUtils.EventEmitter),T.prototype._getElementForEvent=function(e){var t=e.point,n=t.x,o=t.y,r=m.positionUtils.containsOffset(this.element,this.options.offsetX,this.options.offsetY)?this.element:null;return(0,p.fromPoint)(n,o,r).then(function(e){return e.element})},T.prototype._moveToElement=function(){var e=this,t=new d.MoveOptions(b({skipScrolling:!0},this.options),!1);return new c.default(this.element,t).run().then(function(){return(0,m.delay)(e.automationSettings.mouseActionStepDelay)})},T.prototype._scrollToElement=function(){var s=this,e=new d.ScrollOptions(this.options),t=new u.default(this.element,e),l=!1;return t.run().then(function(e){return l=e,(0,m.delay)(s.automationSettings.mouseActionStepDelay)}).then(p.underCursor).then(function(e){if(!e||!s.element.contains(e)||!l)return null;var t=h.default.get(),n=m.domUtils.getCommonAncestor(e,t),o=m.positionUtils.getClientPosition(e),r=(0,f.default)({x:o.x,y:o.y}),i={clientX:o.x,clientY:o.y,screenX:r.x,screenY:r.y,ctrl:!1,alt:!1,shift:!1,meta:!1,buttons:m.eventUtils.BUTTONS_PARAMETER.leftButton};return E.MoveBehaviour.leaveElement(e,t,n,i),E.MoveBehaviour.enterElement(e,t,n,i),h.default.set(e),l})},T.prototype._getElementOffset=function(){var e=(0,s.getOffsetOptions)(this.element),t=this.options,n=t.offsetX,o=t.offsetY;return{offsetX:n=n||0===n?n:e.offsetX,offsetY:o=o||0===o?o:e.offsetY}},T.prototype._wrapAction=function(e){var f=this,t=this._getElementOffset(),n=t.offsetX,o=t.offsetY,d=(0,r.default)(this.element,n,o),h=m.positionUtils.getClientPosition(this.element);return e().then(function(){var l=(0,r.default)(f.element,n,o),a=m.positionUtils.getClientPosition(f.element),u=(0,i.default)(f.element,l),c=m.positionUtils.containsOffset(f.element,n,o)?f.element:null;return(0,p.fromPoint)(u.x,u.y,c).then(function(e){var t=e.element,n=e.corrected,o=t;if(!o)return new y({});var r=!c||n||o===f.element;r=r||-1<m.arrayUtils.indexOf(m.domUtils.getParents(o),f.element);var i=d.x!==l.x||d.y!==l.y,s=h.x!==a.x||h.y!==a.y;return new y({element:t,clientPoint:u,screenPoint:l,isTarget:r,inMoving:i&&s})})})},T._checkElementState=function(e,t){if(!e.element)throw new Error(l.default.elementIsInvisibleError);if(t&&(!e.isTarget||e.inMoving))throw new Error(l.default.foundElementIsNotTarget)},T.prototype._ensureElement=function(t,n){var o=this;return this._wrapAction(function(){return o._scrollToElement()}).then(function(e){return T._checkElementState(e,t)}).then(function(){return o._wrapAction(function(){return o._moveToElement()})}).then(function(e){return n||T._checkElementState(e,t),e}).then(function(e){return o.emit(o.TARGET_ELEMENT_FOUND_EVENT,{}),{element:e.element,clientPoint:e.clientPoint,screenPoint:e.screenPoint,devicePoint:e.devicePoint}})},T);function T(e,t){v(this,T);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,S.call(this));return n.TARGET_ELEMENT_FOUND_EVENT="automation|target-element-found-event",n.element=e,n.options=t,n.automationSettings=new a.default(t.speed),n}e.default=_,t.exports=e.default}},"settings.js":function(e,t,n){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.__esModule=!0;var r=(function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(i,[{key:"mouseActionStepDelay",get:function(){return 1===this.speedFactor?10:400*(1-this.speedFactor)}},{key:"keyActionStepDelay",get:function(){return 1===this.speedFactor?10:200*(1-this.speedFactor)}},{key:"cursorSpeed",get:function(){return Math.pow(400,this.speedFactor)/4}},{key:"draggingSpeed",get:function(){return Math.pow(16,this.speedFactor)/4}}]),i);function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.speedFactor=e||1}e.default=r,t.exports=e.default},utils:{"get-automation-point.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t,n){var o=a.isFirefox?Math.ceil:Math.round,r=l.positionUtils.getOffsetPosition(e,o),i=e===F.documentElement?0:r.left,s=e===F.documentElement?0:r.top;return{x:i+t,y:s+n}};var o,l=n("../deps/testcafe-core"),r=n("../deps/hammerhead"),a=((o=r)&&o.__esModule?o:{default:o}).default.utils.browser;t.exports=e.default},"get-device-point.js":function(e,t,n){e.__esModule=!0,e.default=function(e){if(!e)return null;var t=B.screenLeft||B.screenX,n=B.screenTop||B.screenY,o=t+e.x,r=n+e.y;return{x:o,y:r}},t.exports=e.default},"get-key-code.js":function(e,t,n){e.__esModule=!0,e.default=function(e){if((0,s.default)(e))return e.toUpperCase().charCodeAt(0);var t=r.KEY_MAPS.shiftMap[e]?r.KEY_MAPS.shiftMap[e].charCodeAt(0):e.charCodeAt(0);return r.KEY_MAPS.symbolCharCodeToKeyCode[t]||t};var o,r=n("../deps/testcafe-core"),i=n("./is-letter"),s=(o=i)&&o.__esModule?o:{default:o};t.exports=e.default},"get-key-identifier.js":function(e,t,n){e.__esModule=!0,e.default=function(e){return(0,r.default)(e)?o.default.LETTERS[e.toLowerCase()]:o.default.SYMBOLS[e]||o.default.SPECIAL_KEYS[e]||e};var o=i(n("./key-identifier-maps")),r=i(n("./is-letter"));function i(e){return e&&e.__esModule?e:{default:e}}t.exports=e.default},"get-key-properties.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t,n){var o={};return"keyIdentifier"in KeyboardEvent.prototype&&(o.keyIdentifier=e?"":n),"key"in KeyboardEvent.prototype&&(o.key=t),o},t.exports=e.default},"get-line-rect-intersection.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t,n){for(var o=[],r=null,i=[{x1:n.left,y1:n.top,x2:n.left,y2:n.bottom,isHorizontal:!1},{x1:n.right,y1:n.top,x2:n.right,y2:n.bottom,isHorizontal:!1},{x1:n.left,y1:n.top,x2:n.right,y2:n.top,isHorizontal:!0},{x1:n.left,y1:n.bottom,x2:n.right,y2:n.bottom,isHorizontal:!0}],s=0;s<i.length;s++)(r=a(e,t,i[s]))&&o.push(r);return o.length?1===o.length?o[0]:l(e,o[0])<l(e,o[1])?o[0]:o[1]:null};var i=n("../deps/testcafe-core");function l(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function a(e,t,n){var o=null;if(n.isHorizontal)return(o=i.positionUtils.getLineXByYCoord(e,t,n.y1))&&o>=n.x1&&o<=n.x2?{x:o,y:n.y1}:null;var r=i.positionUtils.getLineYByXCoord(e,t,n.x1);return r&&r>=n.y1&&r<=n.y2?{x:n.x1,y:r}:null}t.exports=e.default},"is-letter.js":function(e,t,n){e.__esModule=!0,e.default=function(e){return 1===e.length&&("a"<=e&&e<="z"||"A"<=e&&e<="Z")},t.exports=e.default},"key-identifier-maps.js":function(e,t,n){e.__esModule=!0,e.default={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"}},t.exports=e.default},"next-tick.js":function(e,t,n){e.__esModule=!0,e.default=function(){return new s(function(e){return l.setTimeout.call(B,e,0)})};var o,r=n("../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},s=i.default.Promise,l=i.default.nativeMethods;t.exports=e.default},"offsets.js":function(e,t,n){e.__esModule=!0,e.getDefaultAutomationOffsets=c,e.getOffsetOptions=function(e,t,n){var o=c(e);if(t="number"==typeof t?Math.round(t):o.offsetX,n="number"==typeof n?Math.round(n):o.offsetY,0<t&&0<n)return{offsetX:t,offsetY:n};var r=u.positionUtils.getClientDimensions(e),i=Math.round(Math.max(e.scrollWidth,r.width)),s=Math.round(Math.max(e.scrollHeight,r.height)),l=r.scrollbar.right+r.border.left+r.border.right+i,a=r.scrollbar.bottom+r.border.top+r.border.bottom+s;return{offsetX:t<0?l+t:t,offsetY:n<0?a+n:n}};var u=n("../deps/testcafe-core");function o(e){var t=e/2;return t<1?0:Math.round(t)}function c(e){var t=u.positionUtils.getElementRectangle(e);return{offsetX:o(t.width),offsetY:o(t.height)}}},"screen-point-to-client.js":function(e,t,n){e.__esModule=!0,e.default=function(e,t){var n=o.styleUtils.getElementScroll(e);return!/html/i.test(e.tagName)&&o.styleUtils.hasScroll(e)&&(t.x-=n.left,t.y-=n.top),o.positionUtils.offsetToClientCoords(t)};var o=n("../deps/testcafe-core");t.exports=e.default},"utils.js":function(e,t,n){e.__esModule=!0,e.focusAndSetSelection=function(m,p,E){return new s(function(e){var t=_.getActiveElement(),n=_.isTextEditableElement(m),o=_.closest(m,"label[for]"),r=_.isElementFocusable(m),i=!r&&o,s=_.isContentEditableElement(m),l=s?S.findContentEditableParent(m):m;if(p&&v.isWebKit&&n&&b.select(m,0,0),i)return p&&T(o),void e();var a=!p,u=!1;if(!r&&!s){var c=_.findDocument(l),f=g.documentActiveElementGetter.call(c),d=_.isBodyElement(f),h=_.isBodyElement(l)?l:_.getFocusableParent(l);if(f&&!d&&_.containsElement(f,l)||d&&_.isBodyElement(h))return void e();l=h||c.body,u=!0}y.focus(l,function(){!p||s||m===_.getActiveElement()?(function(e,t){var n=_.isTextEditableElement(e),o=_.isContentEditableElement(e);if(n||o)if(o&&isNaN(parseInt(t,10)))b.setCursorToLastVisiblePosition(e);else{var r=isNaN(parseInt(t,10))?_.getElementValue(e).length:t;b.select(e,r,r)}else{var i=S.findContentEditableParent(e);i&&b.setCursorToLastVisiblePosition(S.findContentEditableParent(i))}}(m,E),p||_.getActiveElement()===t?e():y.focus(t,e,!0,!0)):e()},a,!0,!1,u)})},e.getElementBoundToLabel=a,e.focusByLabel=T,e.focusByRelatedElement=u;var o=i(n("../deps/hammerhead")),r=i(n("../deps/testcafe-core"));function i(e){return e&&e.__esModule?e:{default:e}}var s=o.default.Promise,g=o.default.nativeMethods,v=o.default.utils.browser,y=o.default.eventSandbox.focusBlur,S=r.default.contentEditable,b=r.default.textSelection,_=r.default.domUtils,l=r.default.styleUtils;function a(e){var t=_.closest(e,"label[for]"),n=t&&(t.control||F.getElementById(t.htmlFor));return n&&l.isElementVisible(n)?n:null}function T(e){_.isElementFocusable(e)?y.focus(e,r.default.noop,!1,!0):u(e)}function u(e){var t=a(e);t&&_.getActiveElement()!==t&&y.focus(t,r.default.noop,!1,!0)}}}},core:{deps:{"hammerhead.js":function(e,t,n){e.__esModule=!0,e.default=B["%hammerhead%"],t.exports=e.default}},utils:{"array.js":function(e,t,n){e.__esModule=!0,e.toArray=function(e){for(var t=[],n=e.length,o=0;o<n;o++)t.push(e[o]);return t},e.reverse=function(e){return f.call(e)},e.isArray=function(e){return"[object Array]"===i.default.nativeMethods.objectToString.call(e)},e.find=function(e,t){for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null},e.indexOf=m,e.forEach=function(e,t){l.call(e,t)},e.some=function(e,t){return a.call(e,t)},e.map=function(e,t){return u.call(e,t)},e.filter=function(e,t){return c.call(e,t)},e.reduce=function(e,t,n){return d.call(e,t,n)},e.remove=function(e,t){var n=m(e,t);-1<n&&h.call(e,n,1)},e.equals=function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},e.getCommonElement=function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null};var o,r=n("../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},s=Array.prototype.indexOf,l=Array.prototype.forEach,a=Array.prototype.some,u=Array.prototype.map,c=Array.prototype.filter,f=Array.prototype.reverse,d=Array.prototype.reduce,h=Array.prototype.splice;function m(e,t){return s.call(e,t)}},"dom.js":function(e,t,n){e.__esModule=!0,e.getTopSameDomainWindow=e.findParent=e.getParents=e.closest=e.getTagName=e.getMapContainer=e.getScrollbarSize=e.isElementReadOnly=e.isHammerheadAttr=e.isElementFocusable=e.isShadowUIElement=e.isDomElement=e.isContentEditableElement=e.isTextEditableElementAndEditingAllowed=e.isTextEditableElement=e.isTextEditableInput=e.isWindow=e.isDocument=e.isHtmlElement=e.isBodyElement=e.isMapElement=e.isSVGElement=e.isOptionElement=e.isCheckboxElement=e.isColorInputElement=e.isRadioButtonElement=e.isSelectElement=e.isLabelElement=e.isFormElement=e.isImgElement=e.isAnchorElement=e.isTextAreaElement=e.isFileInput=e.isButtonElement=e.isInputElement=e.isIframeElement=e.isRenderedNode=e.isTextNode=e.isElementNode=e.getSelectVisibleChildren=e.getChildVisibleIndex=e.getSelectParent=e.isCrossDomainWindows=e.getIframeByElement=e.isElementInIframe=e.isElementInDocument=e.findDocument=e.getActiveElement=void 0,e.getFocusableElements=O,e.containsElement=R,e.getTextareaIndentInLine=function(e,t){var n=N(e);if(!n)return 0;var o=n.substring(0,t),r=-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1;return t-r},e.getTextareaLineNumberByPosition=function(e,t){for(var n=N(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},e.getTextareaPositionByLineAndOffset=function(e,t,n){for(var o=N(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},e.blocksImplicitSubmission=function(e){return(E.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:E.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:E.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},e.isEditableElement=function(e,t){return t?d(e)||h(e):f(e)||h(e)},e.isElementContainsNode=function e(t,n){if(M(n,t))return!0;for(var o=t.childNodes,r=I(o),i=0;i<r;i++){var s=o[i];if(!S(s)&&e(s,n))return!0}return!1},e.isOptionGroupElement=function(e){return"[object HTMLOptGroupElement]"===i.default.utils.dom.instanceToString(e)},e.getElementIndexInParent=function(e,t){var n=e.querySelectorAll(_(t));return p.indexOf(n,t)},e.isTheSameNode=M,e.getElementDescription=function(e){var t={id:"id",name:"name",class:"className"},n=[];for(var o in n.push("<"),n.push(_(e)),t)if(t.hasOwnProperty(o)){var r=e[t[o]];r&&n.push(" "+o+'="'+r+'"')}return n.push(">"),n.join("")},e.getFocusableParent=function(e){for(var t=T(e),n=0;n<t.length;n++)if(b(t[n]))return t[n];return null},e.remove=function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},e.isIFrameWindowInDOM=function(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!E.isFirefox&&!E.isWebKit||t.top===t||e)||!(!e||!c.contentDocumentGetter.call(e))},e.isTopWindow=function(e){try{return e.top===e}catch(e){return!1}},e.findIframeByWindow=function(e,t){for(var n=(t||B).document.getElementsByTagName("iframe"),o=0;o<n.length;o++)if(c.contentWindowGetter.call(n[o])===e)return n[o];return null},e.isEditableFormElement=function(e){return f(e)||u(e)},e.getCommonAncestor=function(e,t){if(M(e,t))return e;for(var n=[e].concat(T(e)),o=t;o;){if(-1<p.indexOf(n,o))return o;o=c.nodeParentNodeGetter.call(o)}return o},e.getChildrenLength=function(e){return c.htmlCollectionLengthGetter.call(e)},e.getChildNodesLength=I,e.getInputValue=U,e.getTextAreaValue=N,e.setInputValue=D,e.setTextAreaValue=k,e.getElementValue=function(e){return l(e)?U(e):a(e)?N(e):e.value},e.setElementValue=function(e,t){return l(e)?D(e,t):a(e)?k(e,t):e.value=t};var o,r=n("../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},m=s(n("./style")),p=s(n("./array"));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var E=i.default.utils.browser,c=i.default.nativeMethods,g=(e.getActiveElement=i.default.utils.dom.getActiveElement,e.findDocument=i.default.utils.dom.findDocument,e.isElementInDocument=i.default.utils.dom.isElementInDocument,e.isElementInIframe=i.default.utils.dom.isElementInIframe,e.getIframeByElement=i.default.utils.dom.getIframeByElement,e.isCrossDomainWindows=i.default.utils.dom.isCrossDomainWindows,e.getSelectParent=i.default.utils.dom.getSelectParent,e.getChildVisibleIndex=i.default.utils.dom.getChildVisibleIndex,e.getSelectVisibleChildren=i.default.utils.dom.getSelectVisibleChildren,e.isElementNode=i.default.utils.dom.isElementNode,e.isTextNode=i.default.utils.dom.isTextNode,e.isRenderedNode=i.default.utils.dom.isRenderedNode,e.isIframeElement=i.default.utils.dom.isIframeElement),l=e.isInputElement=i.default.utils.dom.isInputElement,a=(e.isButtonElement=i.default.utils.dom.isButtonElement,e.isFileInput=i.default.utils.dom.isFileInput,e.isTextAreaElement=i.default.utils.dom.isTextAreaElement),v=e.isAnchorElement=i.default.utils.dom.isAnchorElement,u=(e.isImgElement=i.default.utils.dom.isImgElement,e.isFormElement=i.default.utils.dom.isFormElement,e.isLabelElement=i.default.utils.dom.isLabelElement,e.isSelectElement=i.default.utils.dom.isSelectElement),y=(e.isRadioButtonElement=i.default.utils.dom.isRadioButtonElement,e.isColorInputElement=i.default.utils.dom.isColorInputElement,e.isCheckboxElement=i.default.utils.dom.isCheckboxElement,e.isOptionElement=i.default.utils.dom.isOptionElement),f=(e.isSVGElement=i.default.utils.dom.isSVGElement,e.isMapElement=i.default.utils.dom.isMapElement,e.isBodyElement=i.default.utils.dom.isBodyElement,e.isHtmlElement=i.default.utils.dom.isHtmlElement,e.isDocument=i.default.utils.dom.isDocument,e.isWindow=i.default.utils.dom.isWindow,e.isTextEditableInput=i.default.utils.dom.isTextEditableInput,e.isTextEditableElement=i.default.utils.dom.isTextEditableElement),d=e.isTextEditableElementAndEditingAllowed=i.default.utils.dom.isTextEditableElementAndEditingAllowed,h=e.isContentEditableElement=i.default.utils.dom.isContentEditableElement,S=(e.isDomElement=i.default.utils.dom.isDomElement,e.isShadowUIElement=i.default.utils.dom.isShadowUIElement),b=e.isElementFocusable=i.default.utils.dom.isElementFocusable,_=(e.isHammerheadAttr=i.default.utils.dom.isHammerheadAttr,e.isElementReadOnly=i.default.utils.dom.isElementReadOnly,e.getScrollbarSize=i.default.utils.dom.getScrollbarSize,e.getMapContainer=i.default.utils.dom.getMapContainer,e.getTagName=i.default.utils.dom.getTagName),T=(e.closest=i.default.utils.dom.closest,e.getParents=i.default.utils.dom.getParents);function A(e){return p.filter(e,function(e){return 0<e.tabIndex})}function x(e){return p.filter(e,function(e){return e.tabIndex<=0})}function w(e){if(!e||!e.length)return[];var t=A(e),n=p.filter(e,function(e){return g(e)});if(!t.length)return n.length&&(e=C(e,n)),e;t=t.sort(P("tabIndex"));var o=x(e);return n.length?C(t,n).concat(C(o,n)):t.concat(o)}function C(e,t){var n=function(e){var t=A(e);return t.length?t.sort(P("tabIndex")).concat(x(e)):e}(t),o=[],r=[],i=[],s=0;for(s=0;s<n.length;s++){try{i=O(c.contentDocumentGetter.call(n[s]))}catch(e){i=[]}r.push(w(i))}for(s=0;s<e.length;s++)if(o.push(e[s]),g(e[s]))if(E.isIE){o.pop();var l=r[p.indexOf(t,e[s])],a=A(l),u=x(l);a=a.sort(P("tabIndex")),(o=o.concat(a)).push(e[s]),o=o.concat(u)}else E.isWebKit&&r[p.indexOf(t,e[s])].length&&o.pop(),o=o.concat(r[p.indexOf(t,e[s])]);return o}function P(n){return function(e,t){return e[n]<t[n]?-1:e[n]>t[n]?1:0}}function O(e){for(var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===m.get(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],s=null,l=null,a=null,u=!1,c=0;c<n.length;c++)if(s=n[c],l=_(s),d=void 0,null!==(d=s.getAttribute("tabIndex"))&&(d=parseInt(d,10),d=isNaN(d)?null:d),a=d,u=!1,!s.disabled&&"none"!==m.get(s,"display")&&"hidden"!==m.get(s,"visibility")&&!((E.isIE||E.isAndroid)&&y(s)||null!==a&&a<0)){r.test(l)?u=!0:E.isIE&&g(s)?i.push(s):v(s)&&s.hasAttribute("href")&&(u=""!==s.getAttribute("href")||!E.isIE||null!==a);var f=s.getAttribute("contenteditable");""!==f&&"true"!==f||(u=!0),null!==a&&(u=!0),u&&i.push(s)}var d,h=p.filter(i,function(e){return!R(o,e)});return t&&(h=w(h)),h}function R(e,t){return e.contains?e.contains(t):p.some(e,function(e){return e.contains(t)})}function M(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function I(e){return c.nodeListLengthGetter.call(e)}function U(e){return c.inputValueGetter.call(e)}function N(e){return c.textAreaValueGetter.call(e)}function D(e,t){return c.inputValueSetter.call(e,t)}function k(e,t){return c.textAreaValueSetter.call(e,t)}e.findParent=i.default.utils.dom.findParent,e.getTopSameDomainWindow=i.default.utils.dom.getTopSameDomainWindow},"style.js":function(e,t,n){e.__esModule=!0,e.get=e.setScrollTop=e.setScrollLeft=e.getScrollTop=e.getScrollLeft=e.getInnerHeight=e.getInnerWidth=e.getHeight=e.getWidth=e.isSelectVisibleChild=e.isElementVisible=e.getSelectElementSize=e.getOptionHeight=e.getElementScroll=e.getElementPadding=e.getElementMargin=e.getComputedStyle=e.getBordersWidth=void 0,e.isFixedElement=function(e){return a.isElementNode(e)&&"fixed"===c(e,"position")},e.isNotVisibleNode=function(e){return!a.isRenderedNode(e)||p(e)||m(e)},e.getScrollableParents=function(e){var t=a.getParents(e);if(a.isElementInIframe(e)){var n=a.getParents(a.getIframeByElement(e));t.concat(n)}return(0,s.filter)(t,g)},e.hasScroll=g,e.hasDimensions=function(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)},e.set=function(e,t,n){for(var o in"string"==typeof t&&l.set(e,t,n),t)t.hasOwnProperty(o)&&l.set(e,o,t[o])},e.getViewportDimensions=function(){return{width:v(B.innerWidth,F.documentElement.clientWidth,F.body.clientWidth),height:v(B.innerHeight,F.documentElement.clientHeight,F.body.clientHeight)}};var o,r=n("../deps/hammerhead"),i=(o=r)&&o.__esModule?o:{default:o},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("./dom")),s=n("./array"),l=i.default.utils.style,u=i.default.utils.browser,c=(e.getBordersWidth=i.default.utils.style.getBordersWidth,e.getComputedStyle=i.default.utils.style.getComputedStyle,e.getElementMargin=i.default.utils.style.getElementMargin,e.getElementPadding=i.default.utils.style.getElementPadding,e.getElementScroll=i.default.utils.style.getElementScroll,e.getOptionHeight=i.default.utils.style.getOptionHeight,e.getSelectElementSize=i.default.utils.style.getSelectElementSize,e.isElementVisible=i.default.utils.style.isElementVisible,e.isSelectVisibleChild=i.default.utils.style.isVisibleChild,e.getWidth=i.default.utils.style.getWidth,e.getHeight=i.default.utils.style.getHeight,e.getInnerWidth=i.default.utils.style.getInnerWidth,e.getInnerHeight=i.default.utils.style.getInnerHeight,e.getScrollLeft=i.default.utils.style.getScrollLeft,e.getScrollTop=i.default.utils.style.getScrollTop,e.setScrollLeft=i.default.utils.style.setScrollLeft,e.setScrollTop=i.default.utils.style.setScrollTop,e.get=i.default.utils.style.get),f=/auto|scroll/i,d="visible",h=function(e){var t=c(e,"overflowX"),n=c(e,"overflowY"),o=f.test(t),r=f.test(n);return u.isIE&&(o=o||r&&t===d,r=r||o&&n===d),{scrollableHorizontally:o,scrollableVertically:r}},m=function(e){return!!(e=a.findParent(e,!0,function(e){return a.isElementNode(e)&&"hidden"===c(e,"visibility")}))},p=function(e){return!!(e=a.findParent(e,!0,function(e){return a.isElementNode(e)&&"none"===c(e,"display")}))};function E(e){var t=c(e,"overflowX"),n=c(e,"overflowY"),o=f.test(t),r=f.test(n),i=a.findDocument(e).documentElement,s=e.scrollHeight;if(u.isChrome||u.isFirefox){var l=e.getBoundingClientRect().top;s=s-i.getBoundingClientRect().top+l}return(o||r)&&s>i.scrollHeight}function g(e){var t=h(e),n=t.scrollableHorizontally,o=t.scrollableVertically;if(a.isBodyElement(e))return E(e);if(a.isHtmlElement(e))return function(e){var t=c(e,"overflowX"),n=c(e,"overflowY"),o=e.getElementsByTagName("body")[0];if("hidden"===t&&"hidden"===n)return!1;var r=e.scrollHeight>e.clientHeight,i=e.scrollWidth>e.clientWidth;if(r||i)return!0;if(o){if(E(o))return!1;var s=Math.min(e.clientWidth,o.clientWidth),l=Math.min(e.clientHeight,o.clientHeight);return o.scrollHeight>l||o.scrollWidth>s}return!1}(e);if(!n&&!o)return!1;var r=o&&e.scrollHeight>e.clientHeight;return n&&e.scrollWidth>e.clientWidth||r}function v(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}}}}},errors:{"test-run":{"index.js":function(e,t,n){e.__esModule=!0,e.RequestHookNotImplementedMethodError=e.RequestHookUnhandledError=e.SetNativeDialogHandlerCodeWrongTypeError=e.UncaughtErrorInNativeDialogHandler=e.NativeDialogNotHandledError=e.CurrentIframeIsInvisibleError=e.CurrentIframeNotFoundError=e.CurrentIframeIsNotLoadedError=e.ActionIframeIsNotLoadedError=e.ActionElementNotIframeError=e.RoleSwitchInRoleInitializerError=e.ForbiddenCharactersInScreenshotPathError=e.InvalidElementScreenshotDimensionsError=e.WindowDimensionsOverflowError=e.UncaughtTestCafeErrorInCustomScript=e.UncaughtErrorInCustomScript=e.ActionInvalidScrollTargetError=e.ActionElementIsNotFileInputError=e.ActionCannotFindFileToUploadError=e.ActionIncorrectKeysError=e.ActionRootContainerNotFoundError=e.ActionElementNonContentEditableError=e.ActionElementNotTextAreaError=e.ActionElementNonEditableError=e.ActionAdditionalSelectorMatchesWrongNodeTypeError=e.ActionAdditionalElementIsInvisibleError=e.ActionAdditionalElementNotFoundError=e.ActionSelectorMatchesWrongNodeTypeError=e.ActionElementIsInvisibleError=e.ActionElementNotFoundError=e.ActionSelectorError=e.ActionUnsupportedDeviceTypeError=e.SetTestSpeedArgumentError=e.ActionStringArrayElementError=e.ActionStringOrStringArrayArgumentError=e.ActionPositiveIntegerArgumentError=e.ActionRoleArgumentError=e.ActionIntegerArgumentError=e.ActionNullableStringArgumentError=e.ActionStringArgumentError=e.ActionOptionsTypeError=e.ActionSpeedOptionError=e.ActionBooleanArgumentError=e.ActionBooleanOptionError=e.ActionPositiveIntegerOptionError=e.ActionIntegerOptionError=e.AssertionUnawaitedPromiseError=e.AssertionWithoutMethodCallError=e.AssertionExecutableArgumentError=e.ExternalAssertionLibraryError=e.UncaughtErrorInCustomClientScriptLoadedFromModule=e.UncaughtErrorInCustomClientScriptCode=e.UncaughtExceptionError=e.UnhandledPromiseRejectionError=e.UncaughtErrorInCustomDOMPropertyCode=e.UncaughtErrorInClientFunctionCode=e.UncaughtNonErrorObjectInTestCode=e.UncaughtErrorInTestCode=e.UncaughtErrorOnPage=e.PageLoadError=e.CannotObtainInfoForElementSpecifiedBySelectorError=e.InvalidSelectorResultError=e.DomNodeClientFunctionResultError=e.ClientFunctionExecutionInterruptionError=e.MissingAwaitError=void 0;var s=n("../types");function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){a(this,r),this.code=e,this.isTestCafeError=!0,this.callsite=null}var i,u=(o(c,i=r),c);function c(e,t,n){a(this,c);var o=l(this,i.call(this,e));return o.optionName=t,o.actualValue=n,o}var f,d,h,m,p=(o(E,f=r),E);function E(e,t,n){a(this,E);var o=l(this,f.call(this,e));return o.argumentName=t,o.actualValue=n,o}function g(e){a(this,g);var t=l(this,d.call(this,s.TEST_RUN_ERRORS.missingAwaitError));return t.callsite=e,t}function v(e){a(this,v);var t=l(this,h.call(this,s.TEST_RUN_ERRORS.clientFunctionExecutionInterruptionError));return t.instantiationCallsiteName=e,t}function y(e){a(this,y);var t=l(this,m.call(this,s.TEST_RUN_ERRORS.domNodeClientFunctionResultError));return t.instantiationCallsiteName=e,t}e.MissingAwaitError=(o(g,d=r),g),e.ClientFunctionExecutionInterruptionError=(o(v,h=r),v),e.DomNodeClientFunctionResultError=(o(y,m=r),y);var S,b,_,T,A,x,w,C,P,O,R,M,I,U,N,D,k,B,F,j,L,V,W,Y,K,X,H,G,z,q,$,Z,J,Q,ee,te,ne,oe,re,ie,se,le,ae,ue,ce,fe,de,he,me,pe,Ee,ge,ve,ye,Se,be,_e,Te,Ae,xe,we,Ce,Pe,Oe=(o(Re,S=r),Re);function Re(e,t){var n=t.apiFnChain,o=t.apiFnIndex;a(this,Re);var r=l(this,S.call(this,e));return r.apiFnChain=n,r.apiFnIndex=o,r}function Me(){return a(this,Me),l(this,b.call(this,s.TEST_RUN_ERRORS.invalidSelectorResultError))}function Ie(e,t){a(this,Ie);var n=l(this,_.call(this,s.TEST_RUN_ERRORS.cannotObtainInfoForElementSpecifiedBySelectorError,t));return n.callsite=e,n}function Ue(e,t){a(this,Ue);var n=l(this,T.call(this,s.TEST_RUN_ERRORS.pageLoadError));return n.url=t,n.errMsg=e,n}function Ne(e,t){a(this,Ne);var n=l(this,A.call(this,s.TEST_RUN_ERRORS.uncaughtErrorOnPage));return n.errStack=e,n.pageDestUrl=t,n}function De(e,t){a(this,De);var n=l(this,x.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInTestCode));return n.errMsg=String(e.rawMessage||e),n.callsite=e.callsite||t,n.originError=e,n}function ke(e){a(this,ke);var t=l(this,w.call(this,s.TEST_RUN_ERRORS.uncaughtNonErrorObjectInTestCode));return t.objType=typeof e,t.objStr=String(e),t}function Be(e,t){a(this,Be);var n=l(this,C.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInClientFunctionCode));return n.errMsg=String(t),n.instantiationCallsiteName=e,n}function Fe(e,t,n){a(this,Fe);var o=l(this,P.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInCustomDOMPropertyCode,t,n));return o.errMsg=String(t),o.property=n,o.instantiationCallsiteName=e,o}function je(e){a(this,je);var t=l(this,O.call(this,s.TEST_RUN_ERRORS.unhandledPromiseRejection));return t.errMsg=String(e),t}function Le(e){a(this,Le);var t=l(this,R.call(this,s.TEST_RUN_ERRORS.uncaughtException));return t.errMsg=String(e),t}function Ve(e){a(this,Ve);var t=l(this,M.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInCustomClientScriptCode));return t.errMsg=String(e),t}function We(e,t){a(this,We);var n=l(this,I.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInCustomClientScriptCodeLoadedFromModule));return n.errMsg=String(e),n.moduleName=t,n}function Ye(e,t){a(this,Ye);var n=l(this,U.call(this,s.TEST_RUN_ERRORS.externalAssertionLibraryError));return n.errMsg=String(e),n.callsite=t,n}function Ke(e,t,n,o){a(this,Ke);var r=l(this,N.call(this,s.TEST_RUN_ERRORS.assertionExecutableArgumentError,e,t));return r.errMsg=o?n.rawMessage:n.message,r.originError=n,r}function Xe(e){a(this,Xe);var t=l(this,D.call(this,s.TEST_RUN_ERRORS.assertionWithoutMethodCallError));return t.callsite=e,t}function He(e){a(this,He);var t=l(this,k.call(this,s.TEST_RUN_ERRORS.assertionUnawaitedPromiseError));return t.callsite=e,t}function Ge(e,t){return a(this,Ge),l(this,B.call(this,s.TEST_RUN_ERRORS.actionIntegerOptionError,e,t))}function ze(e,t){return a(this,ze),l(this,F.call(this,s.TEST_RUN_ERRORS.actionPositiveIntegerOptionError,e,t))}function qe(e,t){return a(this,qe),l(this,j.call(this,s.TEST_RUN_ERRORS.actionBooleanOptionError,e,t))}function $e(e,t){return a(this,$e),l(this,L.call(this,s.TEST_RUN_ERRORS.actionBooleanArgumentError,e,t))}function Ze(e,t){return a(this,Ze),l(this,V.call(this,s.TEST_RUN_ERRORS.actionSpeedOptionError,e,t))}function Je(e){a(this,Je);var t=l(this,W.call(this,s.TEST_RUN_ERRORS.actionOptionsTypeError));return t.actualType=e,t}function Qe(e,t){return a(this,Qe),l(this,Y.call(this,s.TEST_RUN_ERRORS.actionStringArgumentError,e,t))}function et(e,t){return a(this,et),l(this,K.call(this,s.TEST_RUN_ERRORS.actionNullableStringArgumentError,e,t))}function tt(e,t){return a(this,tt),l(this,X.call(this,s.TEST_RUN_ERRORS.actionIntegerArgumentError,e,t))}function nt(e,t){return a(this,nt),l(this,H.call(this,s.TEST_RUN_ERRORS.actionRoleArgumentError,e,t))}function ot(e,t){return a(this,ot),l(this,G.call(this,s.TEST_RUN_ERRORS.actionPositiveIntegerArgumentError,e,t))}function rt(e,t){return a(this,rt),l(this,z.call(this,s.TEST_RUN_ERRORS.actionStringOrStringArrayArgumentError,e,t))}function it(e,t,n){a(this,it);var o=l(this,q.call(this,s.TEST_RUN_ERRORS.actionStringArrayElementError,e,t));return o.elementIndex=n,o}function st(e,t){return a(this,st),l(this,$.call(this,s.TEST_RUN_ERRORS.setTestSpeedArgumentError,e,t))}function lt(e,t){return a(this,lt),l(this,Z.call(this,s.TEST_RUN_ERRORS.actionUnsupportedDeviceTypeError,e,t))}function at(e,t,n){a(this,at);var o=l(this,J.call(this,s.TEST_RUN_ERRORS.actionSelectorError));return o.selectorName=e,o.errMsg=n?t.rawMessage:t.message,o.originError=t,o}function ut(e){return a(this,ut),l(this,Q.call(this,s.TEST_RUN_ERRORS.actionElementNotFoundError,e))}function ct(){return a(this,ct),l(this,ee.call(this,s.TEST_RUN_ERRORS.actionElementIsInvisibleError))}function ft(e){a(this,ft);var t=l(this,te.call(this,s.TEST_RUN_ERRORS.actionSelectorMatchesWrongNodeTypeError));return t.nodeDescription=e,t}function dt(e,t){a(this,dt);var n=l(this,ne.call(this,s.TEST_RUN_ERRORS.actionAdditionalElementNotFoundError,t));return n.argumentName=e,n}function ht(e){a(this,ht);var t=l(this,oe.call(this,s.TEST_RUN_ERRORS.actionAdditionalElementIsInvisibleError));return t.argumentName=e,t}function mt(e,t){a(this,mt);var n=l(this,re.call(this,s.TEST_RUN_ERRORS.actionAdditionalSelectorMatchesWrongNodeTypeError));return n.argumentName=e,n.nodeDescription=t,n}function pt(){return a(this,pt),l(this,ie.call(this,s.TEST_RUN_ERRORS.actionElementNonEditableError))}function Et(){return a(this,Et),l(this,se.call(this,s.TEST_RUN_ERRORS.actionElementNotTextAreaError))}function gt(e){a(this,gt);var t=l(this,le.call(this,s.TEST_RUN_ERRORS.actionElementNonContentEditableError));return t.argumentName=e,t}function vt(){return a(this,vt),l(this,ae.call(this,s.TEST_RUN_ERRORS.actionRootContainerNotFoundError))}function yt(e){a(this,yt);var t=l(this,ue.call(this,s.TEST_RUN_ERRORS.actionIncorrectKeysError));return t.argumentName=e,t}function St(e){a(this,St);var t=l(this,ce.call(this,s.TEST_RUN_ERRORS.actionCannotFindFileToUploadError));return t.filePaths=e,t}function bt(){return a(this,bt),l(this,fe.call(this,s.TEST_RUN_ERRORS.actionElementIsNotFileInputError))}function _t(e,t){a(this,_t);var n=l(this,de.call(this,s.TEST_RUN_ERRORS.actionInvalidScrollTargetError));return n.properties=e?"scrollTargetY property":t?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function Tt(e,t,n,o,r){a(this,Tt);var i=l(this,he.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInCustomScript));return i.callsite=r,i.expression=t,i.line=n,i.column=o,i.originError=e,i.errMsg=e.message||String(e),i}function At(e,t,n,o,r){a(this,At);var i=l(this,me.call(this,s.TEST_RUN_ERRORS.uncaughtTestCafeErrorInCustomScript));return i.callsite=r,i.expression=t,i.line=n,i.column=o,i.originError=e,i.errCallsite=e.callsite,i}function xt(e){a(this,xt);var t=l(this,pe.call(this,s.TEST_RUN_ERRORS.windowDimensionsOverflowError));return t.callsite=e,t}function wt(e,t){a(this,wt);var n=l(this,Ee.call(this,s.TEST_RUN_ERRORS.invalidElementScreenshotDimensionsError));return e<=0?t<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function Ct(e,t){a(this,Ct);var n=l(this,ge.call(this,s.TEST_RUN_ERRORS.forbiddenCharactersInScreenshotPathError));return n.screenshotPath=e,n.forbiddenCharsList=t,n}function Pt(e){a(this,Pt);var t=l(this,ve.call(this,s.TEST_RUN_ERRORS.roleSwitchInRoleInitializerError));return t.callsite=e,t}function Ot(){return a(this,Ot),l(this,ye.call(this,s.TEST_RUN_ERRORS.actionElementNotIframeError))}function Rt(){return a(this,Rt),l(this,Se.call(this,s.TEST_RUN_ERRORS.actionIframeIsNotLoadedError))}function Mt(){return a(this,Mt),l(this,be.call(this,s.TEST_RUN_ERRORS.currentIframeIsNotLoadedError))}function It(){return a(this,It),l(this,_e.call(this,s.TEST_RUN_ERRORS.currentIframeNotFoundError))}function Ut(){return a(this,Ut),l(this,Te.call(this,s.TEST_RUN_ERRORS.currentIframeIsInvisibleError))}function Nt(e,t){a(this,Nt);var n=l(this,Ae.call(this,s.TEST_RUN_ERRORS.nativeDialogNotHandledError));return n.dialogType=e,n.pageUrl=t,n}function Dt(e,t,n){a(this,Dt);var o=l(this,xe.call(this,s.TEST_RUN_ERRORS.uncaughtErrorInNativeDialogHandler));return o.dialogType=e,o.errMsg=t,o.pageUrl=n,o}function kt(e){a(this,kt);var t=l(this,we.call(this,s.TEST_RUN_ERRORS.setNativeDialogHandlerCodeWrongTypeError));return t.actualType=e,t}function Bt(e,t,n){a(this,Bt);var o=l(this,Ce.call(this,s.TEST_RUN_ERRORS.requestHookUnhandledError));return o.errMsg=String(e),o.hookClassName=t,o.methodName=n,o}function Ft(e,t){a(this,Ft);var n=l(this,Pe.call(this,s.TEST_RUN_ERRORS.requestHookNotImplementedError));return n.methodName=e,n.hookClassName=t,n}e.InvalidSelectorResultError=(o(Me,b=r),Me),e.CannotObtainInfoForElementSpecifiedBySelectorError=(o(Ie,_=Oe),Ie),e.PageLoadError=(o(Ue,T=r),Ue),e.UncaughtErrorOnPage=(o(Ne,A=r),Ne),e.UncaughtErrorInTestCode=(o(De,x=r),De),e.UncaughtNonErrorObjectInTestCode=(o(ke,w=r),ke),e.UncaughtErrorInClientFunctionCode=(o(Be,C=r),Be),e.UncaughtErrorInCustomDOMPropertyCode=(o(Fe,P=r),Fe),e.UnhandledPromiseRejectionError=(o(je,O=r),je),e.UncaughtExceptionError=(o(Le,R=r),Le),e.UncaughtErrorInCustomClientScriptCode=(o(Ve,M=r),Ve),e.UncaughtErrorInCustomClientScriptLoadedFromModule=(o(We,I=r),We),e.ExternalAssertionLibraryError=(o(Ye,U=r),Ye),e.AssertionExecutableArgumentError=(o(Ke,N=p),Ke),e.AssertionWithoutMethodCallError=(o(Xe,D=r),Xe),e.AssertionUnawaitedPromiseError=(o(He,k=r),He),e.ActionIntegerOptionError=(o(Ge,B=u),Ge),e.ActionPositiveIntegerOptionError=(o(ze,F=u),ze),e.ActionBooleanOptionError=(o(qe,j=u),qe),e.ActionBooleanArgumentError=(o($e,L=p),$e),e.ActionSpeedOptionError=(o(Ze,V=u),Ze),e.ActionOptionsTypeError=(o(Je,W=r),Je),e.ActionStringArgumentError=(o(Qe,Y=p),Qe),e.ActionNullableStringArgumentError=(o(et,K=p),et),e.ActionIntegerArgumentError=(o(tt,X=p),tt),e.ActionRoleArgumentError=(o(nt,H=p),nt),e.ActionPositiveIntegerArgumentError=(o(ot,G=p),ot),e.ActionStringOrStringArrayArgumentError=(o(rt,z=p),rt),e.ActionStringArrayElementError=(o(it,q=p),it),e.SetTestSpeedArgumentError=(o(st,$=p),st),e.ActionUnsupportedDeviceTypeError=(o(lt,Z=p),lt),e.ActionSelectorError=(o(at,J=r),at),e.ActionElementNotFoundError=(o(ut,Q=Oe),ut),e.ActionElementIsInvisibleError=(o(ct,ee=r),ct),e.ActionSelectorMatchesWrongNodeTypeError=(o(ft,te=r),ft),e.ActionAdditionalElementNotFoundError=(o(dt,ne=Oe),dt),e.ActionAdditionalElementIsInvisibleError=(o(ht,oe=r),ht),e.ActionAdditionalSelectorMatchesWrongNodeTypeError=(o(mt,re=r),mt),e.ActionElementNonEditableError=(o(pt,ie=r),pt),e.ActionElementNotTextAreaError=(o(Et,se=r),Et),e.ActionElementNonContentEditableError=(o(gt,le=r),gt),e.ActionRootContainerNotFoundError=(o(vt,ae=r),vt),e.ActionIncorrectKeysError=(o(yt,ue=r),yt),e.ActionCannotFindFileToUploadError=(o(St,ce=r),St),e.ActionElementIsNotFileInputError=(o(bt,fe=r),bt),e.ActionInvalidScrollTargetError=(o(_t,de=r),_t),e.UncaughtErrorInCustomScript=(o(Tt,he=r),Tt),e.UncaughtTestCafeErrorInCustomScript=(o(At,me=r),At),e.WindowDimensionsOverflowError=(o(xt,pe=r),xt),e.InvalidElementScreenshotDimensionsError=(o(wt,Ee=r),wt),e.ForbiddenCharactersInScreenshotPathError=(o(Ct,ge=r),Ct),e.RoleSwitchInRoleInitializerError=(o(Pt,ve=r),Pt),e.ActionElementNotIframeError=(o(Ot,ye=r),Ot),e.ActionIframeIsNotLoadedError=(o(Rt,Se=r),Rt),e.CurrentIframeIsNotLoadedError=(o(Mt,be=r),Mt),e.CurrentIframeNotFoundError=(o(It,_e=r),It),e.CurrentIframeIsInvisibleError=(o(Ut,Te=r),Ut),e.NativeDialogNotHandledError=(o(Nt,Ae=r),Nt),e.UncaughtErrorInNativeDialogHandler=(o(Dt,xe=r),Dt),e.SetNativeDialogHandlerCodeWrongTypeError=(o(kt,we=r),kt),e.RequestHookUnhandledError=(o(Bt,Ce=r),Bt),e.RequestHookNotImplementedMethodError=(o(Ft,Pe=r),Ft)}},"types.js":function(e,t,n){e.__esModule=!0,e.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67"},e.RUNTIME_ERRORS={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testSourcesNotSet:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleStdoutReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048"}}},"test-run":{commands:{"options.js":function(e,t,n){e.__esModule=!0,e.AssertionOptions=e.ResizeToFitDeviceOptions=e.DragToElementOptions=e.TypeOptions=e.MoveOptions=e.ClickOptions=e.MouseOptions=e.ElementScreenshotOptions=e.ScrollOptions=e.OffsetOptions=e.ActionOptions=e.speedOption=e.booleanOption=e.positiveIntegerOption=e.integerOption=void 0;var o,r=n("../../utils/assignable"),i=(o=r)&&o.__esModule?o:{default:o},s=n("./validations/factories"),l=n("../../errors/test-run");function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f,d=e.integerOption=(0,s.createIntegerValidator)(l.ActionIntegerOptionError),h=e.positiveIntegerOption=(0,s.createPositiveIntegerValidator)(l.ActionPositiveIntegerOptionError),m=e.booleanOption=(0,s.createBooleanValidator)(l.ActionBooleanOptionError),p=e.speedOption=(0,s.createSpeedValidator)(l.ActionSpeedOptionError),E=e.ActionOptions=(c(g,f=i.default),g.prototype._getAssignableProperties=function(){return[{name:"speed",type:p}]},g);function g(e,t){a(this,g);var n=u(this,f.call(this));return n.speed=null,n._assignFrom(e,t),n}var v,y,S,b=e.OffsetOptions=(c(_,v=E),_.prototype._getAssignableProperties=function(){return v.prototype._getAssignableProperties.call(this).concat([{name:"offsetX",type:d},{name:"offsetY",type:d}])},_);function _(e,t){a(this,_);var n=u(this,v.call(this));return n.offsetX=null,n.offsetY=null,n._assignFrom(e,t),n}function T(e,t){a(this,T);var n=u(this,y.call(this));return n.scrollToCenter=!1,n.skipParentFrames=!1,n._assignFrom(e,t),n}function A(e,t){a(this,A);var n=u(this,S.call(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(e,t),n}e.ScrollOptions=(c(T,y=b),T.prototype._getAssignableProperties=function(){return y.prototype._getAssignableProperties.call(this).concat([{name:"scrollToCenter",type:m},{name:"skipParentFrames",type:m}])},T),e.ElementScreenshotOptions=(c(A,S=E),A.prototype._getAssignableProperties=function(){return S.prototype._getAssignableProperties.call(this).concat([{name:"scrollTargetX",type:d},{name:"scrollTargetY",type:d},{name:"crop.left",type:d},{name:"crop.right",type:d},{name:"crop.top",type:d},{name:"crop.bottom",type:d},{name:"includeMargins",type:m},{name:"includeBorders",type:m},{name:"includePaddings",type:m}])},A);var x,w=e.MouseOptions=(c(C,x=b),C.prototype._getAssignableProperties=function(){return x.prototype._getAssignableProperties.call(this).concat([{name:"modifiers.ctrl",type:m},{name:"modifiers.alt",type:m},{name:"modifiers.shift",type:m},{name:"modifiers.meta",type:m}])},C);function C(e,t){a(this,C);var n=u(this,x.call(this));return n.modifiers={ctrl:!1,alt:!1,shift:!1,meta:!1},n._assignFrom(e,t),n}var P,O,R,M,I,U,N=e.ClickOptions=(c(D,P=w),D.prototype._getAssignableProperties=function(){return P.prototype._getAssignableProperties.call(this).concat([{name:"caretPos",type:h}])},D);function D(e,t){a(this,D);var n=u(this,P.call(this));return n.caretPos=null,n._assignFrom(e,t),n}function k(e,t){a(this,k);var n=u(this,O.call(this));return n.speed=null,n.minMovingTime=null,n.holdLeftButton=!1,n.skipScrolling=!1,n.skipDefaultDragBehavior=!1,n._assignFrom(e,t),n}function B(e,t){a(this,B);var n=u(this,R.call(this));return n.replace=!1,n.paste=!1,n._assignFrom(e,t),n}function F(e,t){a(this,F);var n=u(this,M.call(this,e,t));return n.destinationOffsetX=null,n.destinationOffsetY=null,n._assignFrom(e,t),n}function j(e,t){a(this,j);var n=u(this,I.call(this));return n.portraitOrientation=!1,n._assignFrom(e,t),n}function L(e,t){a(this,L);var n=u(this,U.call(this));return n.timeout=void 0,n.allowUnawaitedPromise=!1,n._assignFrom(e,t),n}e.MoveOptions=(c(k,O=w),k.prototype._getAssignableProperties=function(){return O.prototype._getAssignableProperties.call(this).concat([{name:"speed"},{name:"minMovingTime"},{name:"holdLeftButton"},{name:"skipScrolling",type:m},{name:"skipDefaultDragBehavior",type:m}])},k),e.TypeOptions=(c(B,R=N),B.prototype._getAssignableProperties=function(){return R.prototype._getAssignableProperties.call(this).concat([{name:"replace",type:m},{name:"paste",type:m}])},B),e.DragToElementOptions=(c(F,M=w),F.prototype._getAssignableProperties=function(){return M.prototype._getAssignableProperties.call(this).concat([{name:"destinationOffsetX",type:d},{name:"destinationOffsetY",type:d}])},F),e.ResizeToFitDeviceOptions=(c(j,I=i.default),j.prototype._getAssignableProperties=function(){return[{name:"portraitOrientation",type:m}]},j),e.AssertionOptions=(c(L,U=i.default),L.prototype._getAssignableProperties=function(){return[{name:"timeout",type:h},{name:"allowUnawaitedPromise",type:m}]},L)},validations:{"factories.js":function(e,t,n){function r(o){return function(e,t){var n=typeof t;if("number"!=n)throw new o(e,n);if(isNaN(t)||!isFinite(t)||t!==Math.floor(t))throw new o(e,t)}}e.__esModule=!0,e.createIntegerValidator=r,e.createPositiveIntegerValidator=function(n){var o=r(n);return function(e,t){if(o(e,t),t<0)throw new n(e,t)}},e.createBooleanValidator=function(o){return function(e,t){var n=typeof t;if("boolean"!=n)throw new o(e,n)}},e.createSpeedValidator=function(o){return function(e,t){var n=typeof t;if("number"!=n)throw new o(e,n);if(isNaN(t)||t<.01||1<t)throw new o(e,t)}}}}}},utils:{"assignable.js":function(e,t,n){e.__esModule=!0;var o=(r.prototype._getAssignableProperties=function(){throw new Error("Not implemented")},r.prototype._assignFrom=function(e,t,n){var o=2<arguments.length&&void 0!==n?n:{};if(e)for(var r=this._getAssignableProperties(),i=0;i<r.length;i++){for(var s=r[i],l=s.name,a=s.type,u=s.required,c=s.init,f=s.defaultValue,d=l.split("."),h=d.length-1,m=d[h],p=e,E=this,g=0;g<h&&p&&E;g++)p=p[d[g]],E=E[d[g]];if(E&&"defaultValue"in r[i]&&(E[l]=f),p&&E){var v=p[m];void 0===v&&!u||(t&&a&&a(l,v),E[m]=c?c(l,v,o):v)}}},r);function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r)}e.default=o,t.exports=e.default}}}}})("testcafe-release/src/client/automation/index")}(window);