window["%hammerhead%"].utils.removeInjectedScript(),function Ue(Me){var Ae=Me.document;!function(s,o,t){var e="default"in s?s.default:s,i="default"in o?o.default:o;t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var u={uiRoot:null,element:function(){return this.uiRoot||(this.uiRoot=Ae.createElement("div"),s.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=s.shadowUI.getRoot();s.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},h=e.shadowUI,c=e.utils.browser,a=e.utils.featureDetection,d=e.nativeMethods,p=e.eventSandbox.eventSimulator,m=e.eventSandbox.listeners,f=i.positionUtils,g=i.domUtils,v=i.styleUtils,y=i.eventUtils,C=i.arrayUtils,E=i.selectController,_="tcOptionList",r="disabled",w=c.isIE?30:20;function S(t){var e=d.eventTargetGetter.call(t),i=E.currentEl;(e||t.srcElement)===i||g.containsElement(i,e)||g.containsElement(E.optionList,e)||I()}function x(t,e,i){var n,s=d.eventTargetGetter.call(t),o=C.indexOf(E.options,s);o<0||(i(),(n=-1w?v.getOptionHeight(t)*w:""});var o,a=f.getOffsetPosition(n).top,r=v.getHeight(s),l=a+v.getHeight(n)+2;l+r>v.getScrollTop(Me)+v.getHeight(Me)&&(o=a-3-r)>=v.getScrollTop(Me)&&(l=o),v.set(s,"top",l+"px")}},collapseOptionList:I,scrollOptionListByChild:function(t){var e,i,n,s,o,a,r=g.getSelectParent(t);r&&(e=v.getSelectElementSize(r),i=v.getOptionHeight(r),n=0,o=(s=Math.max(v.getScrollTop(r)/i,0))+e-1,(a=g.getChildVisibleIndex(r,t))e.windowHeight-e.visibleHeight?e._fadeOut(t):e.state.hidden&&e._fadeIn(t)):e._fadeIn(t)})},Gt.prototype._bindClickOnce=function(i,n){var s=this,o=Rt.isTouchDevice?"touchstart":"mousedown",a=function(t){var e=At.eventTargetGetter.call(t);Nt.find(i,function(t){return Ot.containsElement(t,e)})?(Wt.preventDefault(t),Pt.removeInternalEventBeforeListener(Me,[o],a),n(t)):Ot.containsElement(s.statusBar,e)&&Wt.preventDefault(t)};Pt.addInternalEventBeforeListener(Me,[o],a)},Gt.prototype._initChildListening=function(){var i=this;Vt.on(Vt.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.cmd===_t?i.showWaitingElementStatus(e.timeout):e.cmd===wt?i.hideWaitingElementStatus(e.waitingSuccess).then(function(){return Vt.sendServiceMsg({cmd:St},t.source)}):e.cmd===xt?i.showWaitingAssertionRetriesStatus(e.timeout):e.cmd===It&&i.hideWaitingAssertionRetriesStatus(e.waitingSuccess).then(function(){return Vt.sendServiceMsg({cmd:bt},t.source)})})},Gt.prototype._resetState=function(){this.state.debugging=!1,this.actionsContainer.style.display="none",this.unlockButton.style.display="none",At.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("")),this.progressBar.hide()},Gt.prototype._getFullStatusText=function(t){var e=this.contextStorage.getItem(qt)||"";return e+(e&&t?". ":"")+t},Gt.prototype._showWaitingStatus=function(){var t=this.state.assertionRetries?"Waiting for assertion execution...":"Waiting for element to appear...";At.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(t)),this.progressBar.show()},Gt.prototype._hideWaitingStatus=function(e){var i=this;return new Ut(function(t){At.setTimeout.call(Me,function(){i.state.waiting||i.state.debugging||(Mt.removeClass(i.statusBar,Lt),Mt.removeClass(i.statusBar,Ht),i.progressBar.determinateIndicator.reset(),i._resetState()),t()},e?0:500)})},Gt.prototype._showDebuggingStatus=function(t){var s=this;return new Ut(function(n){s.state.debugging=!0,s.state.locked=!0,t?(s.buttons.removeChild(s.nextButton),s.buttons.removeChild(s.resumeButton),s.buttons.appendChild(s.finishButton),At.nodeTextContentSetter.call(s.statusDiv,s._getFullStatusText("Test failed")),Mt.removeClass(s.statusBar,Lt),Mt.addClass(s.statusBar,Ht)):At.nodeTextContentSetter.call(s.statusDiv,s._getFullStatusText("Debugging test...")),s.actionsContainer.style.display="",s.unlockButton.style.display="",s._bindClickOnce([s.resumeButton,s.nextButton,s.finishButton],function(t){var e=At.eventTargetGetter.call(t),i=Ot.containsElement(s.nextButton,e);s._resetState(),n(i?Bt:Tt)})})},Gt.prototype._setWaitingStatus=function(t,e){var i=this;this.state.waiting=!0,this.progressBar.determinateIndicator.start(t,e),this.showingTimeout=At.setTimeout.call(Me,function(){i.showingTimeout=null,i._showWaitingStatus()},300)},Gt.prototype._resetWaitingStatus=function(t){this.state.waiting=!1,this.progressBar.determinateIndicator.stop(),t?Mt.addClass(this.statusBar,Lt):Mt.addClass(this.statusBar,Ht);var e=this.showingTimeout&&t;return this.showingTimeout&&(At.clearTimeout.call(Me,this.showingTimeout),this.showingTimeout=null,t||this._showWaitingStatus()),this._hideWaitingStatus(e)},Gt.prototype.hidePageLoadingStatus=function(){this.state.created||this._create(),this.progressBar.indeterminateIndicator.stop(),this._resetState()},Gt.prototype.showDebuggingStatus=function(t){return this._stopAnimation(),kt.set(this.statusBar,"opacity",1),kt.set(this.statusBar,"visibility",""),this.state.hiden=!1,this._showDebuggingStatus(t)},Gt.prototype.showWaitingElementStatus=function(t){this.state.assertionRetries||this._setWaitingStatus(t)},Gt.prototype.hideWaitingElementStatus=function(t){return this.state.assertionRetries?Ut.resolve():this._resetWaitingStatus(t)},Gt.prototype.showWaitingAssertionRetriesStatus=function(t,e){this.state.assertionRetries=!0,this._setWaitingStatus(t,e)},Gt.prototype.hideWaitingAssertionRetriesStatus=function(t){var e=this;return this._resetWaitingStatus(t).then(function(){e.state.assertionRetries=!1})},Gt.prototype.setStatusPrefix=function(t){this.contextStorage.setItem(qt,t),At.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(""))},Gt);function Gt(t,e,i,n){var s=Et.call(this)||this;return s.UNLOCK_PAGE_BTN_CLICK="testcafe|ui|status-bar|unlock-page-btn-click",s.userAgent=t,s.fixtureName=e,s.testName=i,s.contextStorage=n,s.statusBar=null,s.infoContainer=null,s.actionsContainer=null,s.icon=null,s.resumeButton=null,s.finishButton=null,s.nextButton=null,s.statusDiv=null,s.buttons=null,s.progressBar=null,s.animationInterval=null,s.showingTimeout=null,s.windowHeight=Ae.documentElement?kt.getHeight(Me):Me.innerHeight,s.maxHeight=0,s.state={created:!1,showing:!1,hiding:!1,debugging:!1,waiting:!1,assertionRetries:!1,hidden:!1},s.currentView=null,s._createBeforeReady(),s._initChildListening(),s}var jt,Kt=i.sendRequestToFrame,Yt=e.eventSandbox.message,Xt=(Q(Jt,jt=zt),Jt.prototype.showWaitingElementStatus=function(t){Yt.sendServiceMsg({cmd:_t,timeout:t},Me.top)},Jt.prototype.hideWaitingElementStatus=function(t){return Kt({cmd:wt,waitingSuccess:t},St,Me.top)},Jt.prototype.showWaitingAssertionRetriesStatus=function(t){Yt.sendServiceMsg({cmd:xt,timeout:t},Me.top)},Jt.prototype.hideWaitingAssertionRetriesStatus=function(t){return Kt({cmd:It,waitingSuccess:t},bt,Me.top)},Jt);function Jt(){return jt.call(this)||this}var Qt="ui|cursor|move|request",Zt="ui|cursor|leftbuttondown|request",$t="ui|cursor|rightbuttondown|request",te="ui|cursor|buttonup|request",ee="ui|cursor|move|response",ie="ui|cursor|leftbuttondown|response",ne="ui|cursor|rightbuttondown|response",se="ui|cursor|buttonup|response",oe=e.Promise,ae=e.shadowUI,re=e.utils.browser,le=e.utils.featureDetection,ue=e.eventSandbox.message,he=i.styleUtils,ce=i.positionUtils,de="l-mouse-down",pe="r-mouse-down",me=[de,pe].join(" ");ue.on(ue.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;switch(e.cmd){case Qt:e.shouldRender||(fe.shouldRender=e.shouldRender),fe.move(ce.getIframePointRelativeToParentFrame({x:e.x,y:e.y},t.source)).then(function(){return ue.sendServiceMsg({cmd:ee},t.source)});break;case Zt:fe.leftButtonDown().then(function(){return ue.sendServiceMsg({cmd:ie},t.source)});break;case $t:fe.rightButtonDown().then(function(){return ue.sendServiceMsg({cmd:ne},t.source)});break;case te:fe.buttonUp().then(function(){return ue.sendServiceMsg({cmd:se},t.source)})}});var fe={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,shouldRender:!0,_createElement:function(){this.cursorElement=Ae.createElement("div"),ae.addClass(this.cursorElement,"cursor"),le.isTouchDevice&&!re.isIE&&(ae.addClass(this.cursorElement,"touch"),this.pointerOffsetX=Math.ceil(he.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(he.getHeight(this.cursorElement)/2)),u.element().appendChild(this.cursorElement)},_ensureCursorElement:function(){return!!this.shouldRender&&(this.cursorElement||this._createElement(),!0)},isVisible:function(){return this.cursorElement&&"hidden"!==he.get(this.cursorElement,"visibility")},hide:function(){this._ensureCursorElement()&&this.isVisible()&&he.set(this.cursorElement,"visibility","hidden")},show:function(){this._ensureCursorElement()&&he.set(this.cursorElement,"visibility","")},move:function(t){return this._ensureCursorElement()&&(this.x=t.x,this.y=t.y,he.set(this.cursorElement,{left:this.x-this.pointerOffsetX+"px",top:this.y-this.pointerOffsetY+"px"})),oe.resolve()},leftButtonDown:function(){return this._ensureCursorElement()&&(ae.removeClass(this.cursorElement,me),ae.addClass(this.cursorElement,de)),oe.resolve()},rightButtonDown:function(){return this._ensureCursorElement()&&(ae.removeClass(this.cursorElement,me),ae.addClass(this.cursorElement,pe)),oe.resolve()},buttonUp:function(){return this._ensureCursorElement()&&ae.removeClass(this.cursorElement,me),oe.resolve()}},ge=e.utils.browser.isIE?1:0,ve={move:function(t){var e={cmd:Qt,x:t.x+ge,y:t.y+ge,shouldRender:this.shouldRender};return o.sendRequestToFrame(e,ee,Me.parent)},leftButtonDown:function(){return o.sendRequestToFrame({cmd:Zt},ie,Me.parent)},rightButtonDown:function(){return o.sendRequestToFrame({cmd:$t},ne,Me.parent)},buttonUp:function(){return o.sendRequestToFrame({cmd:te},se,Me.parent)}},ye={screenshotMark:null,_createMark:function(){this.screenshotMark=Ae.createElement("img"),s.shadowUI.addClass(this.screenshotMark,"screenshot-mark"),this.screenshotMark.style.right=10/Me.devicePixelRatio+"px",this.screenshotMark.style.width=32/Me.devicePixelRatio+"px",this.screenshotMark.style.height=10/Me.devicePixelRatio+"px",this.hide(),s.shadowUI.getRoot().appendChild(this.screenshotMark)},hide:function(){this.screenshotMark&&(this.screenshotMark.style.visibility="hidden")},show:function(t){this.screenshotMark||this._createMark(),s.nativeMethods.imageSrcSetter.call(this.screenshotMark,t),this.screenshotMark.style.visibility=""}},Ce=e.Promise,Ee=e.eventSandbox.message,_e=i.sendRequestToFrame,we="ui|hide|request",Se="ui|hide|response",xe="ui|show|request",Ie="ui|show|response";Ee.on(Ee.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===we?(u.hide(),Ee.sendServiceMsg({cmd:Se},t.source)):t.message.cmd===xe&&(u.show(),Ee.sendServiceMsg({cmd:Ie},t.source))});var be={};be.uiRoot=u,be.cursorUI=fe,be.iframeCursorUI=ve,be.selectElement=n,be.modalBackground=P,be.ProgressPanel=Y,be.StatusBar=zt,be.IframeStatusBar=Xt,be.hide=function(t){return t?_e({cmd:we},Se,Me.top):(u.hide(),Ce.resolve())},be.show=function(t){return t?_e({cmd:xe},Ie,Me.top):(u.show(),Ce.resolve())},be.showScreenshotMark=function(t){return ye.show(t)},be.hideScreenshotMark=function(){return ye.hide()};var Be=e.nativeMethods,Te=e.EVENTS.evalIframeScript;Be.objectDefineProperty(Me,"%testCafeUI%",{configurable:!0,value:be}),e.on(Te,function(t){return Ue(Be.contentWindowGetter.call(t.iframe))})}(Me["%hammerhead%"],Me["%testCafeCore%"],Me["%hammerhead%"].Promise)}(window);