testcafe 3.7.3 → 3.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- window["%hammerhead%"].utils.removeInjectedScript(),function nu(iu){var ru=iu.document;!function(u,c,t){function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(u),i=e(c),r=e(t),h={uiRoot:null,container:null,element:function(){return this.uiRoot||(this.uiRoot=ru.createElement("div"),u.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},panelsContainer:function(){return this.container||(this.container=ru.createElement("div"),u.shadowUI.addClass(this.container,"panels-container"),this.element().appendChild(this.container)),this.container},insertFirstChildToPanelsContainer:function(t){var e=this.panelsContainer(),n=u.nativeMethods.nodeFirstChildGetter.call(e);e.insertBefore(t,n)},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=u.shadowUI.getRoot();u.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},d=n.default.shadowUI,p=n.default.utils.browser,o=n.default.utils.featureDetection,f=n.default.nativeMethods,m=n.default.eventSandbox.eventSimulator,v=n.default.eventSandbox.listeners,g=i.default.positionUtils,y=i.default.domUtils,_=i.default.styleUtils,C=i.default.eventUtils,b=i.default.arrayUtils,E=i.default.selectController,w="tcOptionList",a="disabled";function S(t){var e=f.eventTargetGetter.call(t),n=E.currentEl;(e||t.srcElement)===n||y.containsElement(n,e)||y.containsElement(E.optionList,e)||x()}function T(t,e,n){var i,r=f.eventTargetGetter.call(t),s=b.indexOf(E.options,r);s<0||(n(),(i=-1<r.className.indexOf(a))&&p.isWebKit||function(t,e){var n=E.currentEl,i=n.selectedIndex,r=n.getElementsByTagName("option")[t],s=!e&&t!==i;s&&(n.selectedIndex=t),!p.isFirefox&&s&&(m.input(n),m.change(n)),p.isFirefox&&m.mousedown(p.isFirefox?r:n),o.isTouchDevice||m.mouseup(p.isFirefox?r:n),p.isFirefox&&s&&(m.input(n),m.change(n)),o.isTouchDevice||m.click(p.isFirefox?r:n),e||x()}(s,i))}function x(){y.remove(E.optionList),C.unbind(ru,"mousedown",S),E.clear()}var s=Object.freeze({__proto__:null,expandOptionList:function(t){var e=t.children;if(e.length&&!t.disabled){if(E.currentEl){var n=t===E.currentEl;if(x(),n)return}var i=E.currentEl=t,r=E.optionList=ru.createElement("div");h.element().appendChild(r),d.addClass(r,w),E.createChildren(e,r),v.addInternalEventBeforeListener(iu,["click"],T),f.setTimeout.call(iu,function(){C.bind(ru,"mousedown",S)},0),_.set(r,{position:"absolute",fontSize:_.get(i,"fontSize"),fontFamily:_.get(i,"fontFamily"),minWidth:_.getWidth(i)+"px",left:g.getOffsetPosition(i).left+"px",height:20<y.getSelectVisibleChildren(t).length?20*_.getOptionHeight(t):""});var s,o=g.getOffsetPosition(i).top,a=_.getHeight(r),l=o+_.getHeight(i)+2;l+a>_.getScrollTop(iu)+_.getHeight(iu)&&(s=o-3-a)>=_.getScrollTop(iu)&&(l=s),_.set(r,"top",l+"px")}},collapseOptionList:x,scrollOptionListByChild:function(t){var e,n,i,r,s,o,a=y.getSelectParent(t);a&&(e=_.getSelectElementSize(a),n=_.getOptionHeight(a),i=0,s=(r=Math.max(_.getScrollTop(a)/n,0))+e-1,(o=y.getChildVisibleIndex(a,t))<r?(i=n*(r-o),_.setScrollTop(a,Math.max(_.getScrollTop(a)-i,0))):s<o&&(i=n*(o-s),_.setScrollTop(a,_.getScrollTop(a)+i)))},getSelectChildCenter:function(t){var e=y.getSelectParent(t);if(!e)return{x:0,y:0};var n=_.getOptionHeight(e),i=g.getElementRectangle(t);return{x:Math.round(i.left+i.width/2),y:Math.round(i.top+n/2)}},switchOptionsByKeys:function(t,e){var n=_.getSelectElementSize(t),i=!_.hasDimensions(d.select("."+w)[0]);if(/down|up/.test(e)||(n<=1||p.isFirefox)&&(i||p.isFirefox)&&/left|right/.test(e)){for(var r=t.querySelectorAll("option"),s=[],o=0;o<r.length;o++){var a=r[o].parentElement;r[o].disabled||"optgroup"===y.getTagName(a)&&a.disabled||s.push(r[o])}var l=b.indexOf(s,r[t.selectedIndex])+(/down|right/.test(e)?1:-1);0<=l&&l<s.length&&(t.selectedIndex=b.indexOf(r,s[l]),m.input(t),m.change(t))}}}),l="Loading page...",I="modal-background",A="loading-text",M="loading-icon",B=null,N=null,U=null,R=!1;function D(){function t(){var t=c.styleUtils.getHeight(iu),e=c.styleUtils.getWidth(iu);c.styleUtils.set(B,"width",e+"px"),c.styleUtils.set(B,"height",t+"px"),c.styleUtils.set(U,{left:Math.round((e-c.styleUtils.getWidth(U))/2)+"px",top:Math.round((t-c.styleUtils.getHeight(U))/2)+"px"})}t(),c.eventUtils.bind(iu,"resize",t)}function k(){var t,e,n,i;t=h.element(),B=ru.createElement("div"),t.appendChild(B),u.shadowUI.addClass(B,I),N=ru.createElement("div"),u.nativeMethods.nodeTextContentSetter.call(N,l),t.appendChild(N),u.shadowUI.addClass(N,A),U=ru.createElement("div"),c.styleUtils.set(U,"visibility","hidden"),t.appendChild(U),u.shadowUI.addClass(U,M),D(),e=c.styleUtils.getHeight(iu),n=c.styleUtils.getWidth(iu),(i=!c.styleUtils.hasDimensions(N))&&(c.styleUtils.set(N,"visibility","hidden"),c.styleUtils.set(N,"display","block")),c.styleUtils.set(N,{left:Math.max((n-c.styleUtils.getWidth(N))/2,0)+"px",top:Math.max((e-c.styleUtils.getHeight(N))/2,0)+"px"}),i&&(c.styleUtils.set(N,"display","none"),c.styleUtils.set(N,"visibility","")),R=!0}var V=Object.freeze({__proto__:null,initAndShowLoadingText:function(){function t(){k(),c.styleUtils.set(B,"opacity",.8),c.styleUtils.set(B,"display","block"),c.styleUtils.set(N,"display","block"),e=!0}var e=!1,n=function(){e||(ru.body?t():u.nativeMethods.setTimeout.call(iu,n,0))};n(),c.eventUtils.documentReady().then(function(){e||t()})},show:function(t){R||k(),c.styleUtils.set(B,"opacity",t?0:.7),c.styleUtils.set(B,"display","block")},hide:function(){R&&(c.styleUtils.set(N,"display","none"),c.styleUtils.set(B,"display","none"))},showLoadingIcon:function(){c.styleUtils.set(U,"visibility","visible")},hideLoadingIcon:function(){c.styleUtils.set(U,"visibility","hidden")}}),O=n.default.shadowUI,P=i.default.styleUtils,F="success",$=(L.prototype.setValue=function(t){t="number"!=typeof t?0:Math.min(Math.max(t,0),100),P.set(this.valueElement,"width",t+"%")},L.prototype.setSuccess=function(t){t?O.addClass(this.containerElement,F):O.removeClass(this.containerElement,F)},L);function L(t){this.containerElement=ru.createElement("div"),this.valueElement=ru.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),O.addClass(this.containerElement,"progress-bar"),O.addClass(this.valueElement,"value")}var z=n.default.shadowUI,H=n.default.nativeMethods,W=i.default.eventUtils,j=i.default.styleUtils,G="progress-panel",q="title",Y="content",X=(K._getInvisibleElementProperty=function(t,e){var n="none"===j.get(t,"display");n&&j.set(t,"display","block");var i=t[e];return n&&j.set(t,"display","none"),i},K._showAtWindowCenter=function(t){var e=K._getInvisibleElementProperty(t,"offsetHeight"),n=K._getInvisibleElementProperty(t,"offsetWidth"),i=Math.round(j.getHeight(iu)/2-e/2),r=Math.round(j.getWidth(iu)/2-n/2);j.set(t,{left:r+"px",top:i+"px"})},K.prototype._setCurrentProgress=function(){var t=Math.round((H.dateNow()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(t)},K.prototype._setSuccess=function(t){this.progressBar.setSuccess(t)},K.prototype._stopAnimation=function(){H.clearInterval.call(iu,this.animationInterval)},K.prototype._animate=function(t,e,n,i){var r,s,o,a=this,l=H.dateNow(),u=n?0:1;n&&(j.set(t,"opacity",u),j.set(t,"display","block")),this._stopAnimation(),this.animationInterval=H.setInterval.call(iu,function(){r=H.dateNow()-l,s=Math.min(r/e,1),o=.5-Math.cos(s*Math.PI)/2,j.set(t,"opacity",u+(n?o:-o)),1===s&&(a._stopAnimation(),i&&i())},10)},K.prototype._showPanel=function(){W.bind(iu,"resize",this.disposePanel),this._animate(this.panelDiv,200,!0)},K.prototype._hidePanel=function(t){var e=this;this.startTime=null,W.unbind(iu,"resize",this.disposePanel),this._animate(this.panelDiv,t?0:600,!1,function(){return j.set(e.panelDiv,"display","none")})},K.prototype.show=function(t,e){var n=this;this.startTime=H.dateNow(),this.maxTimeout=e,H.nodeTextContentSetter.call(this.titleDiv,t),this._setSuccess(!1),this.openingTimeout=H.setTimeout.call(iu,function(){n.openingTimeout=null,n._setCurrentProgress(),n._showPanel(),n.updateInterval=H.setInterval.call(iu,function(){return n._setCurrentProgress()},100)},300)},K.prototype.close=function(t){var e=this;t&&this._setSuccess(!0),this.openingTimeout&&(H.clearTimeout.call(iu,this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(H.clearInterval.call(iu,this.updateInterval),this.updateInterval=null),t?this.startTime&&H.dateNow()-this.startTime<1e3?H.setTimeout.call(iu,function(){H.setTimeout.call(iu,function(){return e._hidePanel(!1)},200)},100):H.setTimeout.call(iu,function(){return e._hidePanel(!1)},200):this._hidePanel(!0)},K);function K(){var t=this;this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=ru.createElement("div"),h.element().appendChild(this.panelDiv),this.titleDiv=ru.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=ru.createElement("div"),this.panelDiv.appendChild(this.contentDiv),z.addClass(this.panelDiv,G),z.addClass(this.titleDiv,q),z.addClass(this.contentDiv,Y),K._showAtWindowCenter(this.panelDiv),this.progressBar=new $(this.contentDiv),this.disposePanel=function(){return K._showAtWindowCenter(t.panelDiv)}}var J=function(t,e){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Z(t,o,a,l){return new(a=a||r.default)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function r(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(i,r)}s((l=l.apply(t,o||[])).next())})}function tt(n,i){var r,s,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=t(0),l.throw=t(1),l.return=t(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;l&&e[l=0]&&(a=0),a;)try{if(r=1,s&&(o=2&e[0]?s.return:e[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,e[1])).done)return o;switch(s=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,s=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=i.call(n,a)}catch(t){e=[6,t],s=0}finally{r=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var et=n.default.shadowUI,nt=n.default.nativeMethods,it=i.default.styleUtils,rt="determinate",st=(ot.prototype._setCurrentProgress=function(){var t=(nt.dateNow()-this.startTime)/this.maxTimeout,e=Math.min(Math.max(t,0),1),n=it.getWidth(this.progressBar),i=Math.round(n*e);it.set(this.firstValueElement,"width",i+"px")},ot.prototype.start=function(t,e){var n=this;et.addClass(this.progressBar,rt),this.maxTimeout=t,this.startTime=e||nt.dateNow(),this._setCurrentProgress(),this.animationInterval=nt.setInterval.call(iu,function(){return n._setCurrentProgress()},10)},ot.prototype.stop=function(){this.animationInterval&&(nt.clearInterval.call(iu,this.animationInterval),this.animationInterval=null)},ot.prototype.reset=function(){it.set(this.firstValueElement,"width",0),et.removeClass(this.progressBar,rt)},ot);function ot(t,e){this.progressBar=t,this.firstValueElement=e,this.maxTimeout=null,this.startTime=null,this.animationInterval=null}function at(t,e,n){if(e.x===t.x)return 0;var i=(e.y-t.y)/(e.x-t.x),r=t.x*(t.y-e.y)/(e.x-t.x)+t.y;return Math.round(i*n+r)}var lt=n.default.shadowUI,ut=n.default.nativeMethods,ct=i.default.styleUtils,ht={time:2800,points:[.815,.395],positionByCompletePercent:{0:{left:-35,right:100},.6:{left:100,right:-90},1:{left:100,right:-90}}},dt={time:3e3,points:[.84,1],positionByCompletePercent:{0:{left:-200,right:100},.6:{left:107,right:-8},1:{left:107,right:-8}}},pt=0,ft=.6,mt=1,vt="indeterminate",gt=(yt._updateValueAnimation=function(t,e,n){var i,r,s,o,a,l,u,c,h,d,p=n.time,f=n.points,m=n.positionByCompletePercent,v=ut.dateNow()-t,g=(i=v/p,r=f[0],s=f[1],3*Math.pow(1-i,2)*i*r+3*(1-i)*i*i*s+i*i*i),y=(c=(l=(o=g)<ft)?ft:mt,h=(a=m)[u=l?pt:ft],d=a[c],{left:at({x:u,y:h.left},{x:c,y:d.left},o),right:at({x:u,y:h.right},{x:c,y:d.right},o)}),_=y.left,C=y.right;ct.set(e,"left",Math.round(_)+"%"),ct.set(e,"right",Math.round(C)+"%")},yt.prototype._clearFirstValueAnimation=function(){this.animationInterval&&(ut.clearInterval.call(iu,this.animationInterval),this.animationInterval=null),ct.set(this.firstValue,"left","-35%"),ct.set(this.firstValue,"right","100%")},yt.prototype._clearSecondValueAnimation=function(){this.secondValueAnimationInterval&&(ut.clearInterval.call(iu,this.secondValueAnimationInterval),this.secondValueAnimationInterval=null),ct.set(this.secondValue,"left","-200%"),ct.set(this.secondValue,"right","100%")},yt.prototype._startFirstValueAnimation=function(){var t=this;this._clearFirstValueAnimation();var e=ut.dateNow();this.animationInterval=ut.setInterval.call(iu,function(){yt._updateValueAnimation(e,t.firstValue,ht)},10)},yt.prototype._startSecondValueAnimation=function(){var t=this;this._clearSecondValueAnimation();var e=ut.dateNow();this.secondValueAnimationInterval=ut.setInterval.call(iu,function(){yt._updateValueAnimation(e,t.secondValue,dt)},10)},yt.prototype._startAnimation=function(){var t=this;this._startFirstValueAnimation(),this.secondValueAnimationTimeout=ut.setTimeout.call(iu,function(){return t._startSecondValueAnimation()},1e3),this.restartAnimationTimeout=ut.setTimeout.call(iu,function(){return t._startAnimation()},1950)},yt.prototype._stopAnimation=function(){this._clearFirstValueAnimation(),this._clearSecondValueAnimation(),this.secondValueAnimationTimeout&&(ut.clearInterval.call(iu,this.secondValueAnimationTimeout),this.secondValueAnimationTimeout=null),this.restartAnimationTimeout&&(ut.clearInterval.call(iu,this.restartAnimationTimeout),this.restartAnimationTimeout=null)},yt.prototype.start=function(){lt.addClass(this.progressBar,vt),this._startAnimation()},yt.prototype.stop=function(){lt.removeClass(this.progressBar,vt),this._stopAnimation()},yt);function yt(t,e,n){this.progressBar=t,this.firstValue=e,this.secondValue=n,this.animationInterval=null,this.secondValueAnimationInterval=null,this.secondValueAnimationTimeout=null,this.restartAnimationTimeout=null}var _t=n.default.shadowUI,Ct=i.default.styleUtils,bt=(Et.prototype._create=function(t){this.progressBar=ru.createElement("div"),_t.addClass(this.progressBar,"progress-bar"),t.appendChild(this.progressBar);var e=ru.createElement("div");_t.addClass(e,"value-container"),this.progressBar.appendChild(e),this.firstValueElement=ru.createElement("div"),_t.addClass(this.firstValueElement,"value"),e.appendChild(this.firstValueElement),this.secondValueElement=ru.createElement("div"),_t.addClass(this.secondValueElement,"value"),e.appendChild(this.secondValueElement)},Et.prototype.show=function(){Ct.set(this.progressBar,"visibility","visible")},Et.prototype.hide=function(){Ct.set(this.progressBar,"visibility","hidden")},Et);function Et(t){this.progressBar=null,this.firstValueElement=null,this.secondValueElement=null,this._create(t),this.determinateIndicator=new st(this.progressBar,this.firstValueElement),this.indeterminateIndicator=new gt(this.progressBar,this.firstValueElement,this.secondValueElement)}var wt,St="start-waiting-element",Tt="end-waiting-element-request",xt="end-waiting-element-response",It="start-waiting-assertion-retries",At="end-waiting-assertion-retries-request",Mt="end-waiting-assertion-retries-response",Bt="step",Nt="resume",Ut=n.default.Promise,Rt=n.default.shadowUI,Dt=n.default.nativeMethods,kt=n.default.eventSandbox.message,Vt=n.default.utils.browser,Ot=n.default.utils.featureDetection,Pt=n.default.eventSandbox.listeners,Ft=i.default.styleUtils,$t=i.default.eventUtils,Lt=i.default.domUtils,zt=i.default.serviceUtils,Ht=i.default.arrayUtils,Wt="status-bar-debugging",jt="waiting-element-failed",Gt="waiting-element-success",qt="%testCafeStatusPrefix%",Yt=(Q(Xt,wt=zt.EventEmitter),Object.defineProperty(Xt.prototype,"visibleHeight",{get:function(){return this.maxHeight=Math.max(this.maxHeight,Ft.getHeight(this.statusBar)),this.maxHeight},enumerable:!1,configurable:!0}),Xt.prototype._createButton=function(t,e){var n=ru.createElement("div"),i=ru.createElement("div"),r=ru.createElement("span");return Dt.nodeTextContentSetter.call(r,t),Rt.addClass(n,"button"),Rt.addClass(n,e),Rt.addClass(i,"button-icon"),Vt.isSafari&&(r.style.position="relative",r.style.top="1px"),n.appendChild(i),n.appendChild(r),n},Xt.prototype._createIconArea=function(){this.icon=ru.createElement("div"),Rt.addClass(this.icon,"icon"),this.statusBar.appendChild(this.icon)},Xt.prototype._createInformationArea=function(){this.infoContainer=ru.createElement("div"),Rt.addClass(this.infoContainer,"info-container"),this.statusBar.appendChild(this.infoContainer);var t=ru.createElement("div");Rt.addClass(t,"info-text-container"),this.infoContainer.appendChild(t);var e=ru.createElement("div");Rt.addClass(e,"status-container"),t.appendChild(e),this.statusDiv=ru.createElement("div"),this.statusDiv=ru.createElement("div"),Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("Loading Web Page...")),Rt.addClass(this.statusDiv,"status"),Rt.addClass(this.statusDiv,"info"),e.appendChild(this.statusDiv);var n=ru.createElement("div");Dt.nodeTextContentSetter.call(n,"".concat(this.fixtureName," - ").concat(this.testName)),Rt.addClass(n,"fixture"),Rt.addClass(n,"info"),e.appendChild(n);var i=ru.createElement("div");Dt.nodeTextContentSetter.call(i,this.userAgent),Rt.addClass(i,"user-agent"),t.appendChild(i)},Xt.prototype._createActionsArea=function(){var t=this;this.actionsContainer=ru.createElement("div"),Rt.addClass(this.actionsContainer,"actions-container"),this.statusBar.appendChild(this.actionsContainer),this.buttons=ru.createElement("div"),Rt.addClass(this.buttons,"buttons"),this.actionsContainer.appendChild(this.buttons),this.unlockButton=this._createButton("Unlock Page","locked"),this.resumeButton=this._createButton("Resume","resume"),this.nextButton=this._createButton("Next Action","step"),this.finishButton=this._createButton("Finish","finish"),this.buttons.appendChild(this.unlockButton),this.buttons.appendChild(this.resumeButton),this.buttons.appendChild(this.nextButton),this.actionsContainer.style.display="none",this._bindClickOnce([this.unlockButton],function(){Rt.removeClass(t.unlockButton,"locked"),Rt.addClass(t.unlockButton,"unlocked"),Dt.nodeTextContentSetter.call(t.unlockButton.querySelector("span"),"Page unlocked"),t.state.locked=!1,t.emit(t.UNLOCK_PAGE_BTN_CLICK,{})}),this.unlockButton.style.display="none"},Xt.prototype._create=function(){this.statusBar=ru.createElement("div"),Rt.addClass(this.statusBar,"status-bar"),this._createIconArea(),this._createInformationArea(),this._createActionsArea(),this.progressBar=new bt(this.infoContainer),this.progressBar.indeterminateIndicator.start(),this.progressBar.show(),h.panelsContainer().appendChild(this.statusBar),this._bindHandlers(),this.state.created=!0},Xt.prototype._createBeforeReady=function(){var t,e=this;this.state.created||(t=iu).top!==t||(ru.body?this._create():Dt.setTimeout.call(iu,function(){return e._createBeforeReady()},0))},Xt.prototype._animate=function(t){var e,n,i,r=this,s=Dt.dateNow(),o=parseInt(Ft.get(this.statusBar,"opacity"),10)||0;this._stopAnimation(),t&&(Ft.set(this.statusBar,"visibility",""),this.state.hidden=!1),this.animationInterval=Dt.setInterval.call(iu,function(){e=Dt.dateNow()-s,n=Math.min(e/500,1),i=.5-Math.cos(n*Math.PI)/2,Ft.set(r.statusBar,"opacity",o+(t?i:-i)),1===n&&(r._stopAnimation(),t||(Ft.set(r.statusBar,"visibility","hidden"),r.state.hidden=!0),r.state.showing=!1,r.state.hiding=!1)},10)},Xt.prototype._stopAnimation=function(){this.animationInterval&&(Dt.clearInterval.call(iu,this.animationInterval),this.animationInterval=null)},Xt.prototype._fadeOut=function(){this.state.hiding||this.state.debugging||(this.state.showing=!1,this.state.hiding=!0,this._animate())},Xt.prototype._fadeIn=function(){this.state.showing||this.state.debugging||(this.state.hiding=!1,this.state.showing=!0,this._animate(!0))},Xt.prototype._bindHandlers=function(){var e=this;Pt.initElementListening(iu,["resize"]),Pt.addInternalEventBeforeListener(iu,["resize"],function(){e.windowHeight=iu.innerHeight}),Pt.addFirstInternalEventBeforeListener(iu,["mousemove","mouseout","touchmove"],function(t){"mouseout"!==t.type||t.relatedTarget?"mousemove"!==t.type&&"touchmove"!==t.type||(t.clientY>e.windowHeight-e.visibleHeight?e._fadeOut(t):e.state.hidden&&e._fadeIn(t)):e._fadeIn(t)})},Xt.prototype._bindClickOnce=function(n,i){var r=this,s=!this.nativeAutomation&&Ot.isTouchDevice?"touchstart":"mousedown",o=function(t){var e=Dt.eventTargetGetter.call(t);Ht.find(n,function(t){return Lt.containsElement(t,e)})?($t.preventDefault(t),Pt.removeInternalEventBeforeListener(iu,[s],o),i(t)):Lt.containsElement(r.statusBar,e)&&$t.preventDefault(t)};Pt.addInternalEventBeforeListener(iu,[s],o)},Xt.prototype._initChildListening=function(){var n=this;kt.on(kt.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.cmd===St?n.showWaitingElementStatus(e.timeout):e.cmd===Tt?n.hideWaitingElementStatus(e.waitingSuccess).then(function(){return kt.sendServiceMsg({cmd:xt},t.source)}):e.cmd===It?n.showWaitingAssertionRetriesStatus(e.timeout):e.cmd===At&&n.hideWaitingAssertionRetriesStatus(e.waitingSuccess).then(function(){return kt.sendServiceMsg({cmd:Mt},t.source)})})},Xt.prototype._resetState=function(){this.state.debugging=!1,Rt.removeClass(h.panelsContainer(),Wt),this.actionsContainer.style.display="none",this.unlockButton.style.display="none",Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("")),this.progressBar.hide()},Xt.prototype._getFullStatusText=function(t){var e=this.contextStorage.getItem(qt)||"";return e+(e&&t?". ":"")+t},Xt.prototype._showWaitingStatus=function(){var t=this.state.assertionRetries?"Waiting for assertion execution...":"Waiting for element to appear...";Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(t)),this.progressBar.show()},Xt.prototype._hideWaitingStatus=function(e){var n=this;return new Ut(function(t){Dt.setTimeout.call(iu,function(){n.state.waiting||n.state.debugging||(Rt.removeClass(n.statusBar,Gt),Rt.removeClass(n.statusBar,jt),n.progressBar.determinateIndicator.reset(),n._resetState()),t()},e?0:500)})},Xt.prototype._showDebuggingStatus=function(t){var r=this;return new Ut(function(i){r.state.debugging=!0,r.state.locked=!0,Rt.addClass(h.panelsContainer(),Wt),t?(r.buttons.removeChild(r.nextButton),r.buttons.removeChild(r.resumeButton),r.buttons.appendChild(r.finishButton),Dt.nodeTextContentSetter.call(r.statusDiv,r._getFullStatusText("Test failed")),Rt.removeClass(r.statusBar,Gt),Rt.addClass(r.statusBar,jt)):Dt.nodeTextContentSetter.call(r.statusDiv,r._getFullStatusText("Debugging test...")),r.actionsContainer.style.display="",r.unlockButton.style.display="",r._bindClickOnce([r.resumeButton,r.nextButton,r.finishButton],function(t){var e=Dt.eventTargetGetter.call(t),n=Lt.containsElement(r.nextButton,e);r._resetState(),i(n?Bt:Nt)})})},Xt.prototype._setWaitingStatus=function(t,e){var n=this;this.state.waiting=!0,this.progressBar.determinateIndicator.start(t,e),this.showingTimeout=Dt.setTimeout.call(iu,function(){n.showingTimeout=null,n._showWaitingStatus()},300)},Xt.prototype._resetWaitingStatus=function(t){this.state.waiting=!1,this.progressBar.determinateIndicator.stop(),t?Rt.addClass(this.statusBar,Gt):Rt.addClass(this.statusBar,jt);var e=this.showingTimeout&&t;return this.showingTimeout&&(Dt.clearTimeout.call(iu,this.showingTimeout),this.showingTimeout=null,t||this._showWaitingStatus()),this._hideWaitingStatus(e)},Xt.prototype.hidePageLoadingStatus=function(){this.state.created||this._create(),this.progressBar.indeterminateIndicator.stop(),this._resetState()},Xt.prototype.showDebuggingStatus=function(t){return this._stopAnimation(),Ft.set(this.statusBar,"opacity",1),Ft.set(this.statusBar,"visibility",""),this.state.hiden=!1,this._showDebuggingStatus(t)},Xt.prototype.showWaitingElementStatus=function(t){this.state.assertionRetries||this._setWaitingStatus(t)},Xt.prototype.hideWaitingElementStatus=function(t){return this.state.assertionRetries?Ut.resolve():this._resetWaitingStatus(t)},Xt.prototype.showWaitingAssertionRetriesStatus=function(t,e){this.state.assertionRetries=!0,this._setWaitingStatus(t,e)},Xt.prototype.hideWaitingAssertionRetriesStatus=function(t){var e=this;return this._resetWaitingStatus(t).then(function(){e.state.assertionRetries=!1})},Xt.prototype.setStatusPrefix=function(t){this.contextStorage.setItem(qt,t),Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(""))},Xt);function Xt(t,e,n,i,r){var s=wt.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=n,s.contextStorage=i,s.nativeAutomation=r,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=ru.documentElement?Ft.getHeight(iu):iu.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 Kt,Jt=i.default.sendRequestToFrame,Qt=n.default.eventSandbox.message,Zt=(Q(te,Kt=Yt),te.prototype.showWaitingElementStatus=function(t){Qt.sendServiceMsg({cmd:St,timeout:t},iu.top)},te.prototype.hideWaitingElementStatus=function(t){return Jt({cmd:Tt,waitingSuccess:t},xt,iu.top)},te.prototype.showWaitingAssertionRetriesStatus=function(t){Qt.sendServiceMsg({cmd:It,timeout:t},iu.top)},te.prototype.hideWaitingAssertionRetriesStatus=function(t){return Jt({cmd:At,waitingSuccess:t},Mt,iu.top)},te);function te(){return Kt.call(this)||this}var ee="ui|cursor|move|request",ne="ui|cursor|leftbuttondown|request",ie="ui|cursor|rightbuttondown|request",re="ui|cursor|buttonup|request",se="ui|cursor|move|response",oe="ui|cursor|leftbuttondown|response",ae="ui|cursor|rightbuttondown|response",le="ui|cursor|buttonup|response",ue=n.default.Promise,ce=n.default.shadowUI,he=n.default.utils.featureDetection,de=n.default.eventSandbox.message,pe=i.default.styleUtils,fe=i.default.positionUtils,me="l-mouse-down",ve="r-mouse-down",ge=[me,ve].join(" ");de.on(de.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;switch(e.cmd){case ee:ye.move(fe.getIframePointRelativeToParentFrame({x:e.x,y:e.y},t.source)).then(function(){return de.sendServiceMsg({cmd:se},t.source)});break;case ne:ye.leftButtonDown().then(function(){return de.sendServiceMsg({cmd:oe},t.source)});break;case ie:ye.rightButtonDown().then(function(){return de.sendServiceMsg({cmd:ae},t.source)});break;case re:ye.buttonUp().then(function(){return de.sendServiceMsg({cmd:le},t.source)})}});var ye={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){this.cursorElement=ru.createElement("div"),ce.addClass(this.cursorElement,"cursor"),he.isTouchDevice&&(ce.addClass(this.cursorElement,"touch"),this.pointerOffsetX=Math.ceil(pe.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(pe.getHeight(this.cursorElement)/2)),h.element().appendChild(this.cursorElement)},_ensureCursorElement:function(){return this.cursorElement||this._createElement(),!0},isVisible:function(){return this.cursorElement&&"hidden"!==pe.get(this.cursorElement,"visibility")},hide:function(){this._ensureCursorElement()&&this.isVisible()&&pe.set(this.cursorElement,"visibility","hidden")},show:function(){this._ensureCursorElement()&&pe.set(this.cursorElement,"visibility","")},move:function(t){return this._ensureCursorElement()&&(this.x=t.x,this.y=t.y,pe.set(this.cursorElement,{left:this.x-this.pointerOffsetX+"px",top:this.y-this.pointerOffsetY+"px"})),ue.resolve()},leftButtonDown:function(){return this._ensureCursorElement()&&(ce.removeClass(this.cursorElement,ge),ce.addClass(this.cursorElement,me)),ue.resolve()},rightButtonDown:function(){return this._ensureCursorElement()&&(ce.removeClass(this.cursorElement,ge),ce.addClass(this.cursorElement,ve)),ue.resolve()},buttonUp:function(){return this._ensureCursorElement()&&ce.removeClass(this.cursorElement,ge),ue.resolve()}},_e={move:function(t){var e={cmd:ee,x:t.x,y:t.y};return c.sendRequestToFrame(e,se,iu.parent)},leftButtonDown:function(){return c.sendRequestToFrame({cmd:ne},oe,iu.parent)},rightButtonDown:function(){return c.sendRequestToFrame({cmd:ie},ae,iu.parent)},buttonUp:function(){return c.sendRequestToFrame({cmd:re},le,iu.parent)}},Ce={screenshotMark:null,_createMark:function(){this.screenshotMark=ru.createElement("img"),u.shadowUI.addClass(this.screenshotMark,"screenshot-mark"),this.screenshotMark.style.right=25/iu.devicePixelRatio+"px",this.screenshotMark.style.width=32/iu.devicePixelRatio+"px",this.screenshotMark.style.height=10/iu.devicePixelRatio+"px",this.hide(),u.shadowUI.getRoot().appendChild(this.screenshotMark)},hide:function(){this.screenshotMark&&(this.screenshotMark.style.visibility="hidden")},show:function(t){this.screenshotMark||this._createMark(),u.nativeMethods.imageSrcSetter.call(this.screenshotMark,t),this.screenshotMark.style.visibility=""}},be=n.default.shadowUI,Ee=n.default.nativeMethods;function we(t){var e=t.tag,n=void 0===e?"div":e,i=t.class,r=t.src,s=t.text,o=t.type,a=t.value,l=ru.createElement(n);return o&&Ee.setAttribute.call(l,"type",o),a&&Ee.inputValueSetter.call(l,a),r&&Ee.setAttribute.call(l,"src",r),i&&be.addClass(l,i),s&&Ee.nodeTextContentSetter.call(l,s),l}var Se=i.default.styleUtils;function Te(t,e){for(var n in e)Se.set(t,n,e[n])}var xe={tag:"input",type:"button",value:"Pick",class:"pick-button"},Ie={tag:"input",type:"text",class:"selector-input"},Ae={class:"match-indicator",text:"No Matching Elements"},Me={class:"expand-selector-list"},Be={class:"selector-input-container"},Ne={tag:"input",type:"button",value:"Copy"},Ue={class:"selector-panel-toggle-button-container"},Re={tag:"input",type:"button",class:"selector-panel-toggle-button"},De={class:"selectors-list"},ke={tag:"span"},Ve={class:"selector-inspector-panel"},Oe={class:"selector-inspector-panel-container"},Pe={class:"element-frame"},Fe={class:"tooltip"},$e={class:"arrow"},Le={tag:"input",type:"text",class:"auxiliary-input"};function ze(t){var e;t.parentElement||(e=h.panelsContainer(),h.element().insertBefore(t,e))}function He(t){t.parentElement&&h.element().removeChild(t)}var We,je=iu["%testCafeCore%"],Ge=function(t,e){void 0===e&&(e=!1),this.type=t,this.editable=e,this.disabled=void 0},qe=(Q(Ye,We=Ge),Ye);function Ye(t){return We.call(this,t.toLowerCase(),!0)||this}var Xe={edited:"$edited$",byTagName:"$tagName$",byId:"id",byText:"$text$",byClassAttr:"class",byAttr:"$attr$",byTagTree:"$dom$"},Ke=[new Ge(Xe.byTagName),new Ge(Xe.byId),new Ge(Xe.byText),new Ge(Xe.byClassAttr),new Ge(Xe.byAttr),new Ge(Xe.byTagTree)],Je=Xe.byTagTree,Qe=Object.freeze({__proto__:null,CustomSelectorRule:qe,DEFAULT_SELECTOR_RULES:Ke,RULE_TYPE:Xe,SelectorRule:Ge,UNSWITCHABLE_RULE_TYPE:Je}),Ze=(tn.prototype.concat=function(t){return t.type===this.type?new tn(this.type,this.filter.concat(" ",t.filter)):null},tn);function tn(t,e){this.type=t,this.filter=e}var en="index",nn="tag",rn="attr",sn=je.domUtils,on=je.arrayUtils;function an(t,e){var n=sn.getElementIndexInParent(e,t),i=new Ze(nn,sn.getTagName(t));return 0===n?[i]:[i,new Ze(en,n)]}function ln(t,e){for(var n=t.parentElement,i=[];n;){if(n===e)return i;i.push(n),n=n.parentElement}return i}var un=je.domUtils,cn=je.arrayUtils,hn=(Object.defineProperty(dn.prototype,"isCustom",{get:function(){return this.ancestorSelectorDescriptor?this.isCustomRule||this.ancestorSelectorDescriptor.isCustomRule:this.isCustomRule},enumerable:!1,configurable:!0}),dn.prototype._getStringArrayRepresentation=function(){return function(t){for(var e=[],n=0,i=t;n<i.length;n++){var r,s=i[n];0===cn.indexOf(t,s)?e.push("Selector('".concat(s.filter,"')")):"text"===s.type?e.push(".withText('".concat(s.filter,"')")):s.type===en?e.push(".nth(".concat(s.filter,")")):s.type===nn?e.push(".find('".concat(s.filter,"')")):s.type===rn&&(r=s.filter.attrValueRe?", ".concat(s.filter.attrValueRe):"",e.push(".withAttribute('".concat(s.filter.attrName,"'").concat(r,")")))}return e}(this._concatFilterOptions())},dn.prototype._addFilterByIndex=function(t){var e;1<t.length&&0!==(e=cn.indexOf(t,this.element))&&this.filterOptions.push(new Ze(en,e))},dn.prototype._concatFilterOptions=function(){var t=this.ancestorSelectorDescriptor,e=[];t&&(e=t._concatFilterOptions()),this.cssSelector&&e.push(new Ze(nn,this.cssSelector));var n=cn.concat(e,this.filterOptions);return cn.reduce(n,function(t,e){if(e.type===nn&&t.length){var n=t[t.length-1];if(n.type===nn)return t[t.length-1]=n.concat(e),t}return t.push(e),t},[])},dn.prototype._getElements=function(){if(this.ruleType===Xe.byTagTree)return[this.element];var t=this.ancestorSelectorDescriptor?this.ancestorSelectorDescriptor.element:un.findDocument(this.element),e=null;if(this.cssSelector)try{var n=iu.eval("(function(){return '".concat(this.cssSelector,"';})();")),e=cn.from(t.querySelectorAll(n))}catch(t){return null}else e=[t];return 0===(e=e.length&&this.filter?this.filter(e):e).length||-1===cn.indexOf(e,this.element)?[]:e},dn.createFromInstance=function(t,e){return new dn({ancestorSelectorDescriptor:e,cssSelector:t.cssSelector,element:t.element,filter:t.filter,filterOptions:[].concat(t.filterOptions||[]),isCustomRule:t.isCustomRule,ruleType:t.ruleType})},dn.prototype.makeUnique=function(){var t=this.ancestorSelectorDescriptor,e=t?t._getElements():[],n=!t||e?this._getElements():null;n&&(t&&t._addFilterByIndex(e),this._addFilterByIndex(n),this.stringArray=this._getStringArrayRepresentation())},dn);function dn(t){this.ruleType=t.ruleType,this.isCustomRule=t.isCustomRule,this.element=t.element,this.ancestorSelectorDescriptor=t.ancestorSelectorDescriptor,this.cssSelector=t.cssSelector,this.filterOptions=cn.concat([],t.filterOptions||[]),this.filter=t.filter,this.stringArray=this._getStringArrayRepresentation()}var pn=(fn.prototype._init=function(){},fn.prototype._shouldCreate=function(){throw new Error("Not implemented")},fn.prototype._getDescriptor=function(){throw new Error("Not implemented")},fn.prototype.create=function(t,e){return this.element=t,this._init(),this._shouldCreate(e)?this._getDescriptor(e):null},fn);function fn(t){this.type=t,this.element=null}var mn,vn=je.domUtils,gn=/html|body/,yn=/header|footer|main/,_n=(Q(Cn,mn=pn),Cn.prototype._init=function(){this.tagName=vn.getTagName(this.element)},Cn.prototype._shouldCreate=function(){return this.useTopLevelParents&&gn.test(this.tagName)||yn.test(this.tagName)},Cn.prototype._getDescriptor=function(){return new hn({ruleType:this.type,element:this.element,cssSelector:this.tagName})},Cn);function Cn(t){void 0===t&&(t=!0);var e=mn.call(this,Xe.byTagName)||this;return e.tagName="",e.useTopLevelParents=t,e}function bn(t){return t.replace(/\\/g,"\\\\\\$&").replace(/'/g,"\\\\\\$&").replace(/(\!|#|"|\$|%|&|\(|\||\)|\*|\+|,|\.|\/|:|;|<|=|>|\?|@|\[|\]|\^|`|{|\||}|~)/g,"\\\\$&")}function En(t){return t.replace(/'|"|\\|\||\-|\*|\?|\+|\^|\$|\[|\]/g,"\\$&").replace(/\(|\)/g,"\\S")}var wn=iu["%hammerhead%"],Sn=/[\\^$*+?.()|[\]{}]/g,Tn=je.selectorAttributeFilter,xn=je.arrayUtils,In=wn.nativeMethods;function An(t){return"string"==typeof t?new RegExp(t.replace(Sn,"\\$&")):t}var Mn=je.domUtils,Bn=je.arrayUtils,Nn=/\$ctl\d+|ctl\d+\$|_ctl\d+|ctl\d+_|^ctl\d+$/g,Un="!!!!!separator!!!!!",Rn="!!!!!anyNumber!!!!!",Dn=new RegExp(Un,"g"),kn=new RegExp(Rn,"g"),Vn=/\s{2,}/g,On="class";function Pn(t,e,n,i,r){return new hn({ancestorSelectorDescriptor:r,cssSelector:n,element:e,filter:(o=(s=i).attrName,a=s.attrValueRe,function(t){return xn.filter(t,function(t){return Tn(t,0,void 0,An(o),An(a))})}),filterOptions:new Ze(rn,i),ruleType:t});var s,o,a}function Fn(t,e,n,i){var r=Mn.getTagName(e),s="",o=null;return Bn.forEach(n,function(t){var e=t.name,n=t.value,i=!1,r=!1;50<n.replace(Vn," ").length&&(n=n.substr(0,50),i=!0),Nn.test(n)&&(r=!0,n=n.replace(Nn,function(t){return t.replace(/\d+/,Rn)})),Vn.test(n)&&(r=!0,n=n.replace(Vn,Un)),r?o||(n=(n=En(n)).replace(kn,"\\d+").replace(Dn,"\\s+"),o={attrName:e,attrValueRe:new RegExp(n)}):(n=e===On?bn(n).trimEnd():n.replace(/\\/g,"\\\\\\$&").replace(/'/g,"\\\\\\$&").replace(/"/g,"\\\\$&"),s+=e!==On||i?"[".concat(e).concat(i?"^":"").concat(n?'="'.concat(n,'"'):"","]"):(" "+n).replace(/\s+/g,"."))}),o?Pn(t,e,s||r,o,i):new hn({ruleType:t,element:e,ancestorSelectorDescriptor:i,cssSelector:s})}var $n,Ln=je.domUtils,zn=/_ctl\d+|ctl\d+_|^ctl\d+$/g,Hn=(Q(Wn,$n=pn),Wn.prototype._init=function(){this.idAttr=this.element.getAttribute("id")},Wn.prototype._shouldCreate=function(){return!!this.idAttr},Wn.prototype._getDescriptor=function(){if(zn.test(this.idAttr)){var t=(t=En(this.idAttr)).replace(zn,function(t){return t.replace(/\d+/,"\\d+")}),e=Ln.getTagName(this.element),n={attrName:"id",attrValueRe:new RegExp(t)};return Pn(Xe.byId,this.element,e,n)}return new hn({ruleType:Xe.byId,element:this.element,cssSelector:"#"+bn(this.idAttr).replace(/\s/g,"\\\\ ")})},Wn);function Wn(){var t=$n.call(this,Xe.byId)||this;return t.idAttr=null,t}var jn=je.domUtils,Gn=wn.utils.trim,qn=wn.nativeMethods,Yn=/^i$|^b$|^big$|^small$|^em$|^strong$|^dfn$|^code$|^samp$|^kbd$|^var$|^cite$|^abbr$|^acronym$|^sub$|^sup$|span$|^bdo$|^address$|^div$|^a$|^object$|^p$|^h\d$|^pre$|^q$|^ins$|^del$|^dt$|^dd$|^li$|^label$|^option$|^fieldset$|^legend$|^button$|^caption$|^td$|^th$|^title$/,Xn=50,Kn=/['"\\]/g,Jn=/\r?\n|\r/i;function Qn(t){t=t.trim().replace(Kn,"\\$&");var e=Jn.exec(t),n=e?e.index:t.length;return Gn(t.substring(0,Math.min(n,Xn)))}var Zn,ti=je.domUtils,ei=(Q(ni,Zn=pn),ni.prototype._init=function(){this.elementText=function(t){var e=jn.isHtmlElement(t)?qn.htmlElementInnerTextGetter.call(t):t.innerText;if(e)return Qn(e);if(jn.isOptionElement(t)){var n=qn.nodeTextContentGetter.call(t);return n?Qn(n):""}return""}(this.element)},ni.prototype._shouldCreate=function(){return t=this.element,e=this.elementText,Yn.test(jn.getTagName(t))?(e=Gn(e.replace(/\s+/g," ")),/\S/.test(e)):"";var t,e},ni.prototype._getDescriptor=function(){return new hn({ruleType:this.type,element:this.element,cssSelector:ti.getTagName(this.element),filterOptions:new Ze("text",this.elementText),filter:(e=this.elementText,function(t){return xn.filter(t,function(t){return-1<(In.htmlElementInnerTextGetter.call(t)||In.nodeTextContentGetter.call(t)).indexOf(e)})})});var e},ni);function ni(){var t=Zn.call(this,Xe.byText)||this;return t.elementText="",t}var ii=je.domUtils,ri=je.arrayUtils,si=wn.nativeMethods,oi="%testcafe-stored-attributes%",ai=/(^alt$|^name$|^class$|^title$|^data-\S+)/,li=/^data-ga\S+/;function ui(t,e){void 0===e&&(e=[]);var n=t[oi];if(n)return ri.filter(n,function(t){return t.name!==On});for(var i,r=si.elementAttributesGetter.call(t),s=[],o=0;o<r.length;o++)(i=r[o]).nodeName!==On&&function(t,e){void 0===e&&(e=[]);var n=t.nodeName;return t.nodeValue&&ai.test(n)&&-1===ri.indexOf(e,n)&&!li.test(n)&&!ii.isHammerheadAttr(n)}(i,e)&&s.push({name:i.nodeName,value:i.nodeValue});return s}var ci,hi=(Q(di,ci=pn),di.prototype._init=function(){this.elementAttributes=ui(this.element,this.customAttrNames)},di.prototype._shouldCreate=function(){return!!this.elementAttributes.length},di.prototype._getDescriptor=function(){return Fn(this.type,this.element,this.elementAttributes)},di);function di(t){void 0===t&&(t=[]);var e=ci.call(this,Xe.byAttr)||this;return e.customAttrNames=t,e.elementAttributes=[],e}var pi,fi=(Q(mi,pi=pn),mi.prototype._init=function(){this.className=function(t,e){for(var n,i=t[oi]||si.elementAttributesGetter.call(t),r=0;r<i.length;r++)if((n=i[r]).name===e&&n.value)return n.value;return null}(this.element,On)},mi.prototype._shouldCreate=function(){return!!this.className},mi.prototype._getDescriptor=function(){return Fn(this.type,this.element,[{name:On,value:this.className}])},mi);function mi(){var t=pi.call(this,Xe.byClassAttr)||this;return t.className="",t}var vi,gi,yi=je.domUtils,_i=je.arrayUtils,Ci=(Q(bi,vi=pn),bi.prototype._shouldCreate=function(t){var e=t?t.element:yi.findDocument(this.element).body;return this.parents=ln(this.element,e),this.parents.push(e),this.parents.length},bi.prototype._getDescriptor=function(t){var e,n="",i=[];return e=this.element,/html|body/.test(sn.getTagName(e).toLowerCase())?i.push(new Ze(nn,yi.getTagName(this.element))):i=function(t,e){for(var n=on.reverse(an(t,e[0])),i=e.length,r=0;r<i-1;r++){var s=an(e[r],e[r+1]),o=s[0],a=s[1];a&&n.push(a),n.push(o)}return on.reverse(n)}(this.element,this.parents),t?new hn({ruleType:this.type,element:this.element,ancestorSelectorDescriptor:t,filterOptions:i}):(i.length&&(n=i[0].filter,_i.splice(i,0,1)),new hn({ruleType:this.type,element:this.element,cssSelector:n,filterOptions:i}))},bi);function bi(){var t=vi.call(this,Xe.byTagTree)||this;return t.parents=[],t}var Ei,wi=((gi={})[Xe.byTagName]=new _n,gi[Xe.byId]=new Hn,gi[Xe.byText]=new ei,gi[Xe.byClassAttr]=new fi,gi[Xe.byAttr]=new hi,gi[Xe.byTagTree]=new Ci,gi),Si=(Q(Ti,Ei=pn),Ti.prototype._init=function(){var t=function(t,e){var n=t["%testcafe-custom-stored-attributes%"];if(n){var i=ri.find(n,function(t){return t.name===e});return i||null}return t.hasAttribute(e)?{name:e,value:t.getAttribute(e)}:null}(this.element,this.attrName);this.elementAttributes=t?[t]:[]},Ti.prototype._shouldCreate=function(){return!!this.elementAttributes.length},Ti.prototype._getDescriptor=function(){var t=Fn(this.type,this.element,this.elementAttributes);return t.isCustomRule=!0,t},Ti);function Ti(t){var e=Ei.call(this,t)||this;return e.attrName=t,e.elementAttributes=[],e}var xi=je.arrayUtils,Ii=[Xe.byTagName,Xe.byId,Xe.byClassAttr,Xe.byAttr],Ai=[Xe.byText,Xe.byClassAttr,Xe.byAttr,Xe.byTagTree];function Mi(t){return t.isCustomRule||-1!==xi.indexOf(Ai,t.ruleType)&&t.ruleType!==Xe.byTagTree}function Bi(t){return t.editable||-1!==xi.indexOf(Ii,t.type)}var Ni=" > ";function Ui(t,e){return e?e+Ni+t:t}var Ri=1;function Di(t){for(var e,n={},i=Ri,r=0,s=t;r<s.length;r++){var o=s[r];if(n[o.type]=i++,Bi(o))for(var a=0,l=t;a<l.length;a++){var u=l[a];!(e=u).editable&&-1===xi.indexOf(Ai,e.type)||(n[Ui(u.type,o.type)]=i++)}}return n}var ki=je.domUtils,Vi=je.arrayUtils;function Oi(t,e,n){for(var i=[],r=0,s=e;r<s.length;r++){var o=s[r].create(t,n);o&&i.push(o)}return i}function Pi(t,e){for(var n=[],i=0,r=e;i<r.length;i++){var s=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n],s=e.create(r);if(s)return s}return null}(t,r[i]);s&&n.push(s)}return n}function Fi(t){for(var n=[],e=0,i=t;e<i.length;e++){var r=i[e],s=function(e){return function(t,e){for(var n=t.length,i=0;i<n;i++)if(e(t[i]))return i;return-1}(n,function(t){return Vi.join(t.stringArray,"")===Vi.join(e.stringArray,"")})}(r);-1===s?n.push(r):n[s].priority>r.priority&&Vi.splice(n,s,1,r)}return n}function $i(t){function e(t){return t&&t.ancestorSelectorDescriptor?t.ancestorSelectorDescriptor.ruleType:null}for(var n=Vi.filter(t,function(t){return!t.isCustom}),i=Vi.filter(n,function(t){return t.ancestorSelectorDescriptor}),r=i.length,s=10-(n.length-r),o=r-1;s<r;){for(var a=e(i[o]);e(i[o-1])===a&&(Vi.remove(t,i[o]),!(--r<=s));)o--;o--}}function Li(t){void 0===t&&(t=Ke),this.rules=Vi.filter(t,function(t){return!t.disabled});var e=Li._processRules(this.rules),n=e.customRules,i=e.defaultRules;this.customRules=n,this.defaultRules=i,this.customAttrNames=[],this.customSelectorCreators=[],this.elementSelectorCreators=[],this.ancestorSelectorCreators=[],this._createCustomSelectorCreators(),this._createElementSelectorCreators(),this._createAncestorSelectorCreators(),this.rulePriority=Di(this.rules)}var zi=(Li._priorityComparator=function(t,e){return t.priority-e.priority},Li._getSelectorType=function(t){var e=t.ancestorSelectorDescriptor,n=e?e.ruleType:"";return Ui(t.ruleType,n)},Li._processRules=function(t){var e=[],n=[];return Vi.filter(t,function(t){t.editable?n.push(t):e.push(t)}),{customRules:n,defaultRules:e}},Li.prototype._createCustomSelectorCreators=function(){var e=this;Vi.forEach(this.customRules,function(t){e.customAttrNames.push(t.type),e.customSelectorCreators.push(new Si(t.type))})},Li.prototype._createElementSelectorCreators=function(){var n=this,i=[];Vi.forEach(this.defaultRules,function(t){var e=t.type===Xe.byAttr?new hi(n.customAttrNames):wi[t.type];i.push(e)}),this.elementSelectorCreators=Vi.concat(i,this.customSelectorCreators)},Li.prototype._createAncestorSelectorCreators=function(){for(var t=0,e=this.customRules;t<e.length;t++){var n=e[t];this.ancestorSelectorCreators.push(new Si(n.type))}for(var i=0,r=this.defaultRules;i<r.length;i++)Bi(n=r[i])&&(n.type===Xe.byTagName?this.ancestorSelectorCreators.push(new _n(!1)):this.ancestorSelectorCreators.push(wi[n.type]))},Li.prototype._generateCompoundSelectorDescriptor=function(t,e,n){for(var i=Vi.filter(n,Mi),r=[],s=null,o=null,a=0,l=Pi(e,this.ancestorSelectorCreators);a<l.length;a++){for(var u=l[a],c=0,h=i;c<h.length;c++){var d=h[c],o=hn.createFromInstance(u),s=hn.createFromInstance(d,o);r.push(s)}o=hn.createFromInstance(u),s=Oi(t,[wi[Xe.byTagTree]],u),r=Vi.concat(r,s)}return r},Li.prototype._cleanAndSortDescriptors=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var r=i[n];r.makeUnique();var s=Li._getSelectorType(r),o=this.rulePriority[s];null!==o&&(r.priority=o,e.push(r))}return $i(e=(e=Fi(e)).sort(Li._priorityComparator)),e},Li.prototype._generateDescriptors=function(t){var e=Oi(t,this.elementSelectorCreators),n=ln(t,ki.findDocument(t).body),i=this._generateCompoundSelectorDescriptor(t,n,e),r=Vi.concat(e,i);return this._cleanAndSortDescriptors(r)},Li.prototype.generate=function(t){var e=this._generateDescriptors(t);return Vi.map(e,function(t){var e=t.stringArray,n=t.ruleType,i=t.ancestorSelectorDescriptor,r={value:Vi.join(e,""),rules:[n]};return i&&r.rules.push(i.ruleType),r})},Li.RULES=Qe,new Li);function Hi(){this.targets=new Map}var Wi=(Hi.prototype._remove=function(t,e){this.targets.delete(t),He(e)},Hi.prototype._setPosition=function(t,e){for(var n,i,r,s=(n=t.getBoundingClientRect(),i=iu.pageYOffset||ru.documentElement.scrollTop,r=iu.pageXOffset||ru.documentElement.scrollLeft,{top:n.top+i,left:n.left+r,height:n.height,width:n.width,bottom:n.bottom+i,right:n.right+r}),o={},a=0,l=["top","left","width","height"];a<l.length;a++){var u=l[a];o[u]=s[u]+"px"}Te(e,o)},Hi.prototype.highlight=function(t){var e;t&&!this.targets.has(t)&&(e=we(Pe),this.targets.set(t,e),this._setPosition(t,e),ze(e))},Hi.prototype.stopHighlighting=function(){var n=this;this.targets.forEach(function(t,e){return n._remove(e,t)})},new Hi),ji=n.default.nativeMethods;function Gi(){this._createElements()}var qi,Yi=(Gi.prototype._createElements=function(){this.tooltip=we(Fe),this.arrow=we($e)},Gi.prototype._setTooltipText=function(t){ji.nodeTextContentSetter.call(this.tooltip,t)},Gi.prototype._getTooltipLeft=function(t,e,n,i){return n<=t?i:n-e<=t?n+i-t:e+i},Gi.prototype._getArrowLeft=function(t,e,n,i){return n-e<=t+12?n+i-t:e+i+12},Gi.prototype._getVerticalPostionStyles=function(t,e,n,i){var r={},s={},o=ru.documentElement.scrollTop,a=t.height+e.height;return n.top>=a?(r.top=n.top+o-a+"px",s.top=n.top+o-e.height+"px",s.transform="none",s.visibility="visible"):i.height-n.bottom>=a?(r.top=n.bottom+o+e.height+"px",s.top=n.bottom+o+"px",s.transform="rotate(180deg)",s.visibility="visible"):(r.top=i.height+o-t.height+"px",s.top=o+"px",s.transform="node",s.visibility="hidden"),{tooltip:r,arrow:s}},Gi.prototype._getElementsStyles=function(t){var e=this.tooltip.getBoundingClientRect(),n=this.arrow.getBoundingClientRect(),i=t.getBoundingClientRect(),r={width:ru.documentElement.clientWidth,height:ru.documentElement.clientHeight},s=this._getVerticalPostionStyles(e,n,i,r),o=ru.documentElement.scrollLeft;return s.tooltip.left=this._getTooltipLeft(e.width,i.left,r.width,o)+"px",s.arrow.left=this._getArrowLeft(n.width,i.left,r.width,o)+"px",s},Gi.prototype._placeElements=function(t){var e=this._getElementsStyles(t);Te(this.tooltip,e.tooltip),Te(this.arrow,e.arrow)},Gi.prototype.show=function(t,e){this._setTooltipText(t),this._placeElements(e),ze(this.tooltip),ze(this.arrow)},Gi.prototype.hide=function(){He(this.tooltip),He(this.arrow)},new Gi),Xi=n.default.eventSandbox.listeners,Ki=i.default.styleUtils,Ji=i.default.serviceUtils,Qi="element-piked";function Zi(){var t=qi.call(this)||this;return t.hiddenTestCafeElements=new Map,t.handlers={onClick:t._getClickHandler(),onMouseMove:t._getMouseMoveHandler()},t}var tr=(Q(Zi,qi=Ji.EventEmitter),Zi.prototype._hideTestCafeElements=function(){for(var t=0,e=h.element().children;t<e.length;t++){var n=e[t],i=Ki.get(n,"visibility");this.hiddenTestCafeElements.set(n,i),Ki.set(n,"visibility","hidden")}},Zi.prototype._showTestCafeElements=function(){this.hiddenTestCafeElements.forEach(function(t,e){Ki.set(e,"visibility",t)}),this.hiddenTestCafeElements.clear()},Zi.prototype._getClickHandler=function(){var t=this;return function(){t._showTestCafeElements(),Xi.removeInternalEventBeforeListener(iu,["mousemove"],t.handlers.onMouseMove),Xi.removeInternalEventBeforeListener(iu,["click"],t.handlers.onClick),t.emit(Qi,t.actualSelectors),Yi.hide()}},Zi.prototype._getMouseMoveHandler=function(){var r=this;return function(t){var e=t.clientX,n=t.clientY,i=ru.elementFromPoint(e,n);i&&i!==r.actualTarget&&(r.actualTarget=i,r.actualSelectors=zi.generate(i),Wi.stopHighlighting(),Wi.highlight(i),Yi.show(r.actualSelectors[0].value,i))}},Zi.prototype.start=function(t){this._hideTestCafeElements(),Xi.initElementListening(iu,["mousemove","click"]),Xi.addFirstInternalEventBeforeListener(iu,["mousemove"],this.handlers.onMouseMove),Xi.addFirstInternalEventBeforeListener(iu,["click"],this.handlers.onClick),this.handlers.onMouseMove(t)},new Zi),er=i.default.eventUtils,nr=function(){this.element=we(xe),er.bind(this.element,"click",function(t){return tr.start(t)})};function ir(t){return t}var rr,sr=(function(t){function n(t){return!!o[t]}function i(t,e){this.references=t,this.transforms=e,this.circularCandidates=[],this.circularCandidatesDescrs=[],this.circularRefCount=0}var s=/^#*@(t|r)$/,r=(0,eval)("this"),o={Int8Array:"function"==typeof Int8Array?Int8Array:void 0,Uint8Array:"function"==typeof Uint8Array?Uint8Array:void 0,Uint8ClampedArray:"function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0,Int16Array:"function"==typeof Int16Array?Int16Array:void 0,Uint16Array:"function"==typeof Uint16Array?Uint16Array:void 0,Int32Array:"function"==typeof Int32Array?Int32Array:void 0,Uint32Array:"function"==typeof Uint32Array?Uint32Array:void 0,Float32Array:"function"==typeof Float32Array?Float32Array:void 0,Float64Array:"function"==typeof Float64Array?Float64Array:void 0},a="function"==typeof ArrayBuffer,l="function"==typeof Map,u="function"==typeof Set,c="function"==typeof Buffer,h=Array.prototype.slice,e={serialize:function(t){return JSON.stringify(t)},deserialize:function(t){return JSON.parse(t)}};function d(t,e){this.references=t,this.transformMap=e,this.activeTransformsStack=[],this.visitedRefs=Object.create(null)}i._createRefMark=function(t){var e=Object.create(null);return e["@r"]=t,e},i.prototype._createCircularCandidate=function(t,e,n){this.circularCandidates.push(t),this.circularCandidatesDescrs.push({parent:e,key:n,refIdx:-1})},i.prototype._applyTransform=function(t,e,n,i){var r=Object.create(null),s=i.toSerializable(t);return"object"==typeof s&&this._createCircularCandidate(t,e,n),r["@t"]=i.type,r.data=this._handleValue(s,e,n),r},i.prototype._handleArray=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=this._handleValue(t[n],e,n);return e},i.prototype._handlePlainObject=function(n){var i=this,r=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){var e=s.test(t)?"#"+t:t;r[e]=i._handleValue(n[t],r,e)}),r},i.prototype._handleObject=function(t,e,n){return this._createCircularCandidate(t,e,n),Array.isArray(t)?this._handleArray(t):this._handlePlainObject(t)},i.prototype._ensureCircularReference=function(t){var e=this.circularCandidates.indexOf(t);if(-1<e){var n=this.circularCandidatesDescrs[e];return-1===n.refIdx&&(n.refIdx=n.parent?++this.circularRefCount:0),i._createRefMark(n.refIdx)}return null},i.prototype._handleValue=function(t,e,n){var i=typeof t,r="object"==i&&null!==t;if(r){var s=this._ensureCircularReference(t);if(s)return s}for(var o=0;o<this.transforms.length;o++){var a=this.transforms[o];if(a.shouldTransform(i,t))return this._applyTransform(t,e,n,a)}return r?this._handleObject(t,e,n):t},i.prototype.transform=function(){for(var t=[this._handleValue(this.references,null,null)],e=0;e<this.circularCandidatesDescrs.length;e++){var n=this.circularCandidatesDescrs[e];0<n.refIdx&&(t[n.refIdx]=n.parent[n.key],n.parent[n.key]=i._createRefMark(n.refIdx))}return t},d.prototype._handlePlainObject=function(e){var t,n=this,i=Object.create(null),r=Object.getOwnPropertyNames(e);for(t in r.forEach(function(t){n._handleValue(e[t],e,t),s.test(t)&&(i[t.substring(1)]=e[t],delete e[t])}),i)e[t]=i[t]},d.prototype._handleTransformedObject=function(t,e,n){var i=t["@t"],r=this.transformMap[i];if(!r)throw new Error("Can't find transform for \""+i+'" type.');this.activeTransformsStack.push(t),this._handleValue(t.data,t,"data"),this.activeTransformsStack.pop(),e[n]=r.fromSerializable(t.data)},d.prototype._handleCircularSelfRefDuringTransform=function(t,e,n){var i=this.references,r=void 0;Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){return void 0===r&&(r=i[t]),r},set:function(t){return r=t}})},d.prototype._handleCircularRef=function(t,e,n){-1<this.activeTransformsStack.indexOf(this.references[t])?this._handleCircularSelfRefDuringTransform(t,e,n):(this.visitedRefs[t]||(this.visitedRefs[t]=!0,this._handleValue(this.references[t],this.references,t)),e[n]=this.references[t])},d.prototype._handleValue=function(t,e,n){if("object"==typeof t&&null!==t){var i=t["@r"];if(void 0!==i)this._handleCircularRef(i,e,n);else if(t["@t"])this._handleTransformedObject(t,e,n);else if(Array.isArray(t))for(var r=0;r<t.length;r++)this._handleValue(t[r],t,r);else this._handlePlainObject(t)}},d.prototype.transform=function(){return this.visitedRefs[0]=!0,this._handleValue(this.references[0],this.references,0),this.references[0]};var p=[{type:"[[NaN]]",shouldTransform:function(t,e){return"number"===t&&isNaN(e)},toSerializable:function(){return""},fromSerializable:function(){return NaN}},{type:"[[undefined]]",shouldTransform:function(t){return"undefined"===t},toSerializable:function(){return""},fromSerializable:function(){}},{type:"[[Date]]",shouldTransform:function(t,e){return e instanceof Date},toSerializable:function(t){return t.getTime()},fromSerializable:function(t){var e=new Date;return e.setTime(t),e}},{type:"[[RegExp]]",shouldTransform:function(t,e){return e instanceof RegExp},toSerializable:function(t){var e={src:t.source,flags:""};return t.global&&(e.flags+="g"),t.ignoreCase&&(e.flags+="i"),t.multiline&&(e.flags+="m"),e},fromSerializable:function(t){return new RegExp(t.src,t.flags)}},{type:"[[Error]]",shouldTransform:function(t,e){return e instanceof Error},toSerializable:function(t){return{name:t.name,message:t.message,stack:t.stack}},fromSerializable:function(t){var e=new(r[t.name]||Error)(t.message);return e.stack=t.stack,e}},{type:"[[ArrayBuffer]]",shouldTransform:function(t,e){return a&&e instanceof ArrayBuffer},toSerializable:function(t){var e=new Int8Array(t);return h.call(e)},fromSerializable:function(t){if(a){var e=new ArrayBuffer(t.length);return new Int8Array(e).set(t),e}return t}},{type:"[[Buffer]]",shouldTransform:function(t,e){return c&&e instanceof Buffer},toSerializable:function(t){return h.call(t)},fromSerializable:function(t){return c?Buffer.from(t):t}},{type:"[[TypedArray]]",shouldTransform:function(t,e){return Object.keys(o).some(function(t){return n(t)&&e instanceof o[t]})},toSerializable:function(t){return{ctorName:t.constructor.name,arr:h.call(t)}},fromSerializable:function(t){return n(t.ctorName)?new o[t.ctorName](t.arr):t.arr}},{type:"[[Map]]",shouldTransform:function(t,e){return l&&e instanceof Map},toSerializable:function(t){var n=[];return t.forEach(function(t,e){n.push(e),n.push(t)}),n},fromSerializable:function(t){if(l){for(var e=new Map,n=0;n<t.length;n+=2)e.set(t[n],t[n+1]);return e}for(var i=[],r=0;r<t.length;r+=2)i.push([t[n],t[n+1]]);return i}},{type:"[[Set]]",shouldTransform:function(t,e){return u&&e instanceof Set},toSerializable:function(t){var e=[];return t.forEach(function(t){e.push(t)}),e},fromSerializable:function(t){if(u){for(var e=new Set,n=0;n<t.length;n++)e.add(t[n]);return e}return t}}],f=t.exports=function(t){this.transforms=[],this.transformsMap=Object.create(null),this.serializer=t||e,this.addTransforms(p)};f.prototype.addTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e];if(this.transformsMap[n.type])throw new Error('Transform with type "'+n.type+'" was already added.');this.transforms.push(n),this.transformsMap[n.type]=n}return this},f.prototype.removeTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e],i=this.transforms.indexOf(n);-1<i&&this.transforms.splice(i,1),delete this.transformsMap[n.type]}return this},f.prototype.encode=function(t){var e=new i(t,this.transforms).transform();return this.serializer.serialize(e)},f.prototype.decode=function(t){var e=this.serializer.deserialize(t);return new d(e,this.transformsMap).transform()}}(rr={exports:{}}),rr.exports);function or(t){return new sr({serialize:ir,deserialize:ir}).addTransforms(t)}function ar(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var lr,ur,cr="E1",hr="E4",dr="E5",pr="E9",fr="E10",mr="E11",vr="E12",gr="E24",yr="E26",_r="E27",Cr="E28",br="E29",Er="E30",wr="E31",Sr="E32",Tr="E33",xr="E34",Ir="E35",Ar="E36",Mr="E37",Br="E39",Nr="E40",Ur="E41",Rr="E42",Dr="E43",kr="E44",Vr="E45",Or="E46",Pr="E49",Fr="E50",$r="E51",Lr="E52",zr="E57",Hr="E64",Wr="E65",jr="E68",Gr="E69",qr="E70",Yr="E71",Xr="E72",Kr="E73",Jr="E74",Qr="E76",Zr="E77",ts="E78",es="E82",ns="E83",is="E90",rs="E91",ss="E92",os="E93",as="E94",ls="E95",us="E97",cs="E99",hs="E100",ds="E101",ps="E102",fs=(Q(ms,lr=ar),ms);function ms(t,e,n){var i=lr.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function vs(t,e){var n=ur.call(this,Pr,e)||this;return n.instantiationCallsiteName=t,n}Q(vs,ur=ar);var gs,ys=(Q(_s,gs=ar),_s);function _s(t,e){var n=gs.call(this,Fr,e)||this;return n.instantiationCallsiteName=t,n}var Cs,bs=(Q(Es,Cs=ar),Es);function Es(t,e,n){var i=void 0===e?{}:e,r=i.apiFnChain,s=i.apiFnIndex,o=i.reason,a=Cs.call(this,t,n)||this;return a.apiFnChain=r,a.apiFnIndex=s,a.reason=o,a}var ws,Ss,Ts,xs=(Q(Is,ws=ar),Is);function Is(t){return ws.call(this,$r,t)||this}function As(t,e){return Ss.call(this,Lr,e,t)||this}function Ms(t,e){var n=Ts.call(this,cr)||this;return n.errStack=t,n.pageDestUrl=e,n}Q(As,Ss=bs),Q(Ms,Ts=ar);var Bs,Ns=(Q(Us,Bs=ar),Us);function Us(t,e,n){var i=Bs.call(this,hr,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}var Rs,Ds,ks,Vs,Os,Ps,Fs,$s,Ls,zs,Hs,Ws,js,Gs,qs,Ys,Xs,Ks,Js,Qs,Zs,to,eo,no,io,ro,so,oo,ao,lo,uo,co,ho,po,fo,mo,vo,go,yo,_o,Co,bo,Eo,wo,So,To,xo,Io,Ao,Mo,Bo,No,Uo,Ro=(Q(Do,Rs=ar),Do);function Do(t,e,n,i){var r=Rs.call(this,dr,i)||this;return r.errMsg=String(e),r.property=n,r.instantiationCallsiteName=t,r}function ko(t){var e=Ds.call(this,Hr)||this;return e.errMsg=String(t),e}function Vo(t,e){var n=ks.call(this,Wr)||this;return n.errMsg=String(t),n.moduleName=e,n}function Oo(t,e){return Vs.call(this,pr,t,e)||this}function Po(t,e){return Os.call(this,fr,t,e)||this}function Fo(t,e){return Ps.call(this,mr,t,e)||this}function $o(t,e){return Fs.call(this,vr,t,e)||this}function Lo(t,e){return $s.call(this,is,t,e)||this}function zo(t,e){return Ls.call(this,us,t,e)||this}function Ho(t,e){return zs.call(this,rs,t,e)||this}function Wo(t,e){return Hs.call(this,ss,t,e)||this}function jo(t,e){return Ws.call(this,os,t,e)||this}function Go(t,e){return js.call(this,as,t,e)||this}function qo(t,e){return Gs.call(this,ls,t,e)||this}function Yo(t,e){return qs.call(this,cs,t,e)||this}function Xo(t,e,n){var i=Ys.call(this,hs)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function Ko(t,e){return Xs.call(this,gr,e,t)||this}function Jo(t,e){return Ks.call(this,yr,e,t)||this}function Qo(t){var e=Js.call(this,_r)||this;return e.nodeDescription=t,e}function Zo(t,e){var n=Qs.call(this,Cr,e)||this;return n.argumentName=t,n}function ta(t){return Zs.call(this,ds,t)||this}function ea(t,e){var n=to.call(this,br,e)||this;return n.argumentName=t,n}function na(t,e){var n=eo.call(this,Er)||this;return n.argumentName=t,n.nodeDescription=e,n}function ia(){return no.call(this,wr)||this}function ra(){return io.call(this,Sr)||this}function sa(t){var e=ro.call(this,Tr)||this;return e.argumentName=t,e}function oa(){return so.call(this,Ir)||this}function aa(t){var e=oo.call(this,Ar)||this;return e.argumentName=t,e}function la(t,e){var n=ao.call(this,Mr)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function ua(){return lo.call(this,xr)||this}function ca(t,e){var n=uo.call(this,Ur)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function ha(t,e){var n=co.call(this,zr)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function da(t){return ho.call(this,Nr,t)||this}function pa(){return po.call(this,Br)||this}function fa(){return fo.call(this,Rr)||this}function ma(){return mo.call(this,Gr)||this}function va(){return vo.call(this,jr)||this}function ga(){return go.call(this,qr)||this}function ya(){return yo.call(this,Yr)||this}function _a(){return _o.call(this,Kr)||this}function Ca(){return Co.call(this,es)||this}function ba(t){var e=bo.call(this,ts)||this;return e.errMsg=t,e}function Ea(){return Eo.call(this,Jr)||this}function wa(){return wo.call(this,Qr)||this}function Sa(){return So.call(this,Zr)||this}function Ta(){return To.call(this,Xr)||this}function xa(){return xo.call(this,ns)||this}function Ia(){return Io.call(this,Dr)||this}function Aa(){return Ao.call(this,kr)||this}function Ma(t,e){var n=Mo.call(this,Vr)||this;return n.dialogType=t,n.pageUrl=e,n}function Ba(t,e,n){var i=Bo.call(this,Or)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}function Na(){return No.call(this,ps)||this}Q(ko,Ds=ar),Q(Vo,ks=ar),Q(Oo,Vs=fs),Q(Po,Os=fs),Q(Fo,Ps=fs),Q($o,Fs=fs),Q(Lo,$s=fs),Q(zo,Ls=fs),Q(Ho,zs=fs),Q(Wo,Hs=fs),Q(jo,Ws=fs),Q(Go,js=fs),Q(qo,Gs=fs),Q(Yo,qs=fs),Q(Xo,Ys=ar),Q(Ko,Xs=bs),Q(Jo,Ks=bs),Q(Qo,Js=ar),Q(Zo,Qs=bs),Q(ta,Zs=ar),Q(ea,to=bs),Q(na,eo=ar),Q(ia,no=ar),Q(ra,io=ar),Q(sa,ro=ar),Q(oa,so=ar),Q(aa,oo=ar),Q(la,ao=ar),Q(ua,lo=ar),Q(ca,uo=ar),Q(ha,co=ar),Q(da,ho=ar),Q(pa,po=ar),Q(fa,fo=ar),Q(ma,mo=ar),Q(va,vo=ar),Q(ga,go=ar),Q(ya,yo=ar),Q(_a,_o=ar),Q(Ca,Co=ar),Q(ba,bo=ar),Q(Ea,Eo=ar),Q(wa,wo=ar),Q(Sa,So=ar),Q(Ta,To=ar),Q(xa,xo=ar),Q(Ia,Io=ar),Q(Aa,Ao=ar),Q(Ma,Mo=ar),Q(Ba,Bo=ar),Q(Na,No=ar);var Ua=1,Ra=2,Da=3,ka=((Uo={})[Ua]=/^\.filterVisible\(\)$/,Uo[Ra]=/^\.filterHidden\(\)$/,Uo[Da]=/^\.nth\(\d+\)$/,Uo);function Va(){this._err=null}var Oa=(Object.defineProperty(Va.prototype,"error",{get:function(){return this._err},set:function(t){null===this._err&&(this._err=t)},enumerable:!1,configurable:!0}),Va.prototype.filter=function(t,e,n){if(e.filterVisible&&(t=t.filter(c.positionUtils.isElementVisible),this._assertFilterError(t,n,Ua)),e.filterHidden&&(t=t.filter(function(t){return!c.positionUtils.isElementVisible(t)}),this._assertFilterError(t,n,Ra)),e.counterMode)return null===e.index?t.length:Va._getNodeByIndex(t,e.index)?1:0;var i;if(e.collectionMode)return null!==e.index&&(t=(i=Va._getNodeByIndex(t,e.index))?[i]:[],this._assertFilterError(t,n,Da)),t;var r=Va._getNodeByIndex(t,e.index||0);return r||(this.error=Va._getErrorItem(n,Da)),r},Va.prototype.cast=function(t){if(null==t)return[];if(t instanceof u.nativeMethods.Node)return[t];if(function(t){if(u.nativeMethods.isArray(t)){for(var e=0;e<t.length;e++)if(!(t[e]instanceof u.nativeMethods.Node))return;return 1}}(t))return t;if((e=t)instanceof u.nativeMethods.HTMLCollection||e instanceof u.nativeMethods.NodeList)return function(t){for(var e=t.length,n=[],i=0;i<e;i++)n.push(t[i]);return n}(t);var e;throw new xs},Va.prototype._assertFilterError=function(t,e,n){0===t.length&&(this.error=Va._getErrorItem(e,n))},Va._getErrorItem=function(t,e){var n=t.apiFnChain,i=t.apiFnID;if(e)for(var r=i;r<n.length;r++)if(ka[e].test(n[r]))return r;return null},Va._getNodeByIndex=function(t,e){return e<0?t[t.length+e]:t[e]},new Va);function Pa(t,e){return new u.nativeMethods.Function("fnCode","__dependencies$","Promise","RegExp",'"use strict"; return eval(fnCode)')(t,e,u.Promise,RegExp)}var Fa=($a.prototype.shouldTransform=function(t){return"function"===t},$a.prototype.toSerializable=function(){return""},$a.prototype.fromSerializable=function(t){var e=t.fnCode,n=t.dependencies;return"filterOptions"in n&&(n.selectorFilter=Oa),Pa(e,n)},$a);function $a(){this.type="Function"}var La=(za.prototype.shouldTransform=function(t,e){if(e instanceof u.nativeMethods.Node)throw new ys(this._instantiationCallsiteName);return!1},za.prototype.toSerializable=function(){},za.prototype.fromSerializable=function(){},za);function za(t){this.type="Node",this._instantiationCallsiteName=t}var Ha=(Wa.prototype.getResult=function(){var e=this;return u.Promise.resolve().then(function(){var t=e.replicator.decode(e.command.args);return e._executeFn(t)}).catch(function(t){throw t.isTestCafeError||(t=new Ns(e.command.instantiationCallsiteName,t)),t})},Wa.prototype.encodeResult=function(t){return this.replicator.encode(t)},Wa.prototype._createReplicator=function(){return or([new La(this.command.instantiationCallsiteName),new Fa])},Wa.prototype._executeFn=function(t){return this.fn.apply(iu,t)},Wa);function Wa(t){this.command=t,this.replicator=this._createReplicator(),this.dependencies=this.replicator.decode(t.dependencies),this.fn=Pa(t.fnCode,this.dependencies)}var ja=["nodeType","textContent","childNodeCount","hasChildNodes","childElementCount","hasChildElements"],Ga=["tagName","attributes"],qa=["tagName","visible","focused","attributes","boundingClientRect","classNames","style","innerText","namespaceURI","id","value","checked","selected","selectedIndex","scrollWidth","scrollHeight","scrollLeft","scrollTop","offsetWidth","offsetHeight","offsetLeft","offsetTop","clientWidth","clientHeight","clientLeft","clientTop"];ja.concat(qa);var Ya={childNodeCount:function(t){return t.childNodes.length},hasChildNodes:function(t){return!!Ya.childNodeCount(t)},childElementCount:function(t){var e;return(null===(e=t.children)||void 0===e?void 0:e.length)||0},hasChildElements:function(t){return!!Ya.childElementCount(t)}},Xa=(Ka.prototype._initializeProperties=function(t,e,n){for(var i=0,r=e;i<r.length;i++){var s=r[i],o=n[s];this[s]=o?o(t):t[s]}},Ka);function Ka(){}var Ja,Qa=(Q(Za,Ja=Xa),Za);function Za(t){var e=Ja.call(this)||this;return e._initializeProperties(t,ja,Ya),e}var tl,el={tagName:function(t){return t.tagName.toLowerCase()},visible:function(t){return c.positionUtils.isElementVisible(t)},focused:function(t){return u.utils.dom.getActiveElement()===t},attributes:function(t){for(var e=t.attributes,n={},i=e.length-1;0<=i;i--)n[e[i].name]=e[i].value;return n},boundingClientRect:function(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width,height:e.height}},classNames:function(t){var e=t.className;return"string"==typeof e.animVal&&(e=e.animVal),e.replace(/^\s+|\s+$/g,"").split(/\s+/g)},style:function(t){for(var e={},n=iu.getComputedStyle(t),i=0;i<n.length;i++){var r=n[i];e[r]=n[r]}return e},innerText:function(t){return t.innerText}};function nl(t){var e=tl.call(this)||this;return e._initializeProperties(t,Ga,el),e}Q(nl,tl=Xa);var il,rl=(Q(sl,il=Qa),sl);function sl(t){var e=il.call(this,t)||this;return e._initializeProperties(t,qa,el),e}var ol=(al.prototype._extend=function(t,e){for(var n=0,i=u.nativeMethods.objectKeys(this._customDOMProperties);n<i.length;n++){var r=i[n];try{t[r]=this._customDOMProperties[r](e)}catch(t){throw new Ro(this._instantiationCallsiteName,t,r)}}},al.prototype.shouldTransform=function(t,e){return e instanceof u.nativeMethods.Node},al.prototype.toSerializable=function(t){var e=new(1===t.nodeType?rl:Qa)(t);return this._extend(e,t),e},al.prototype.fromSerializable=function(){},al);function al(t,e){void 0===t&&(t={}),this.type="Node",this._customDOMProperties=t,this._instantiationCallsiteName=e}var ll,ul=(Q(cl,ll=Ha),cl.prototype._createReplicator=function(){return or([new Fa])},cl.prototype._getTimeoutErrorParams=function(t){return{apiFnIndex:Oa.error,apiFnChain:this.command.apiFnChain,reason:c.positionUtils.getHiddenReason(t)}},cl.prototype._getTimeoutError=function(t){return t?this.createIsInvisibleError:this.createNotFoundError},cl.prototype._validateElement=function(o,a){var l=this;return u.Promise.resolve().then(function(){return ll.prototype._executeFn.call(l,o)}).then(function(t){var e=t,n=!!e,i=!l.command.visibilityCheck||e&&c.positionUtils.isElementVisible(e),r=u.nativeMethods.dateNow()-a>=l.timeout;if(n&&(i||u.utils.dom.isShadowRoot(e)))return e;if(!r)return c.delay(200).then(function(){return l._validateElement(o,a)});var s=l.getVisibleValueMode?null:l._getTimeoutError(n);if(s)throw s(l._getTimeoutErrorParams(e));return null})},cl.prototype._executeFn=function(t){return this.counterMode?ll.prototype._executeFn.call(this,t):this._validateElement(t,u.nativeMethods.dateNow())},cl);function cl(t,e,n,i,r){var s,o=ll.call(this,t)||this;o.createNotFoundError=i,o.createIsInvisibleError=r,o.timeout="number"==typeof t.timeout?t.timeout:e,o.counterMode=o.dependencies.filterOptions.counterMode,o.getVisibleValueMode=o.dependencies.filterOptions.getVisibleValueMode,o.dependencies.selectorFilter=Oa,n&&(s=u.nativeMethods.dateNow()-n,o.timeout=Math.max(o.timeout-s,0));var a=o.dependencies.customDOMProperties;return o.replicator.addTransforms([new ol(a,t.instantiationCallsiteName)]),o}var hl={testCafeDriver:"%testCafeDriver%",testCafeIframeDriver:"%testCafeIframeDriver%",testCafeEmbeddingUtils:"%testCafeEmbeddingUtils%",testCafeDriverInstance:"%testCafeDriverInstance%"},dl=5e3;function pl(){return null}function fl(){return null}function ml(n){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){switch(t.label){case 0:return e=u.nativeMethods.date(),[4,new ul(n,dl,e,pl,fl).getResult()];case 1:return[2,t.sent()]}})})}function vl(e){return Z(this,void 0,void 0,function(){return tt(this,function(t){switch(t.label){case 0:return[4,function(n){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){return e=iu[hl.testCafeDriverInstance].communicationUrls,[2,c.browser.parseSelector(e.parseSelector,u.createNativeXHR,n)]})})}(e)];case 1:return[2,ml(t.sent()).catch(function(){return null})]}})})}var gl=n.default.nativeMethods;function yl(t){return gl.isArray(t)?t:[t]}var _l,Cl=n.default.eventSandbox.listeners,bl=i.default.serviceUtils,El="list-changed",wl="selector-selected";function Sl(){var e=_l.call(this)||this;return e._pickedSelectors=[],e.element=we(De),tr.on(Qi,function(t){e.pickedSelectors=t}),e}var Tl=(Q(Sl,_l=bl.EventEmitter),Object.defineProperty(Sl.prototype,"pickedSelectors",{get:function(){return this._pickedSelectors},set:function(t){void 0===t&&(t=[]),this._pickedSelectors!==t&&(this._pickedSelectors=t,this.emit(El,t))},enumerable:!1,configurable:!0}),Sl.prototype._renderSelectors=function(){var n=this;this.pickedSelectors.forEach(function(t){var e=we({text:t.value,class:"selector-value"});n.element.appendChild(e)}),this.renderedSelectors=this.pickedSelectors},Sl.prototype._clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.renderedSelectors=null},Sl.prototype._addClickListener=function(){var e=this,n=function(t){He(e.element),t.target.parentElement===e.element&&e.emit(wl,t.target.innerText),Cl.removeInternalEventBeforeListener(iu,["click"],n)};Cl.addFirstInternalEventBeforeListener(iu,["click"],n)},Sl.prototype.show=function(t){var e,n=t.left,i=t.bottom,r=t.width;this.pickedSelectors&&0!==this.pickedSelectors.length&&(this.pickedSelectors!==this.renderedSelectors&&(this._clear(),this._renderSelectors()),e={left:n+"px",bottom:i+"px",width:r+"px"},ze(this.element),Te(this.element,e),this._addClickListener())},Sl.prototype.clear=function(){this.pickedSelectors=null},new Sl),xl=n.default.nativeMethods,Il=n.default.shadowUI,Al=i.default.eventUtils,Ml="enabled",Bl={notFound:"not-found",invalid:"invalid",ok:"ok"},Nl=(Object.defineProperty(Ul.prototype,"value",{get:function(){return xl.inputValueGetter.call(this.input)},set:function(t){xl.inputValueSetter.call(this.input,t)},enumerable:!1,configurable:!0}),Ul.prototype._createElements=function(){this.element=we(Be),this.input=we(Ie),this.indicator=we(Ae),this.expandButton=we(Me),this.element.appendChild(this.input),this.element.appendChild(this.indicator),this.element.appendChild(this.expandButton)},Ul.prototype._addEventListeners=function(){var e=this;Al.bind(this.expandButton,"click",function(){return e._expandSelectorsList()}),Al.bind(this.input,"input",function(){return e._onSelectorTyped()}),Al.bind(this.input,"focus",function(){return e._onFocusInput()}),Al.bind(this.input,"blur",function(){return Wi.stopHighlighting()}),Tl.on(El,function(t){e._updateExpandButton(t)}),Tl.on(wl,function(t){e._setSelectorInputValue({value:t})}),tr.on(Qi,function(t){e._setSelectorInputValue(t[0])})},Ul.prototype._setMatchIndicatorText=function(t){xl.nodeTextContentSetter.call(this.indicator,t)},Ul.prototype._setMatchIndicatorClass=function(t){for(var e in Bl)Il.removeClass(this.indicator,Bl[e]);Il.addClass(this.indicator,t)},Ul.prototype._indicateMatches=function(t){return null===t?(this._setMatchIndicatorText("Invalid Selector"),void this._setMatchIndicatorClass(Bl.invalid)):0===t.length?(this._setMatchIndicatorText("No Matching Elements"),void this._setMatchIndicatorClass(Bl.notFound)):(this._setMatchIndicatorText("Found: ".concat(t.length)),void this._setMatchIndicatorClass(Bl.ok))},Ul.prototype._highlightElements=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];Wi.highlight(i)}},Ul.prototype._setSelectorInputValue=function(t){this.value=t.value,this.input.focus()},Ul.prototype._expandSelectorsList=function(){var t=this.element.getBoundingClientRect(),e=t.left,n=t.top,i={left:e,width:t.width,bottom:ru.documentElement.clientHeight-n+1};Tl.show(i)},Ul.prototype._updateExpandButton=function(t){t&&t.length?Il.addClass(this.expandButton,Ml):Il.removeClass(this.expandButton,Ml)},Ul.prototype._onSelectorTyped=function(){Tl.clear(),this._onFocusInput()},Ul.prototype._onFocusInput=function(){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){switch(t.label){case 0:return Wi.stopHighlighting(),this.value?[4,vl(this.value)]:(this._indicateMatches([]),[2]);case 1:return e=t.sent(),this._indicateMatches(e),this._highlightElements(e),[2]}})})},Ul.prototype.debugSelector=function(i){return Z(this,void 0,void 0,function(){var e,n;return tt(this,function(t){switch(t.label){case 0:return Wi.stopHighlighting(),this.value=i.apiFnChain.join(""),n=yl,[4,ml(i)];case 1:return e=n.apply(void 0,[t.sent()]),this._indicateMatches(e),this._highlightElements(e),[2]}})})},Ul);function Ul(){this._createElements(),this._addEventListeners()}var Rl=n.default.nativeMethods,Dl=i.default.eventUtils,kl="Copy",Vl="Copied!",Ol=(Pl.prototype._copySelector=function(){var t,e;t=this.sourceElement.value,ze(e=we(Le)),e.value=t,e.select(),ru.execCommand("copy"),He(e),this._animate()},Pl.prototype._animate=function(){var t=this;this._changeAppearance(Vl,"bold"),Rl.setTimeout.call(iu,function(){return t._resetAppearance()},1200)},Pl.prototype._resetAppearance=function(){this._changeAppearance(kl,"")},Pl.prototype._changeAppearance=function(t,e){Rl.inputValueSetter.call(this.element,t),Te(this.element,{fontWeight:e})},Pl);function Pl(t){var e=this;this.element=we(Ne),this.sourceElement=t,Dl.bind(this.element,"click",function(){return e._copySelector()})}var Fl=n.default.nativeMethods,$l=i.default.eventUtils,Ll=(zl.prototype._showAndHide=function(t){Fl.elementClassListGetter.call(t).toggle("selector-inspector-panel--hidden-hammerhead-shadow-ui")},zl);function zl(t){var e=this,n=we(Re);this.element=we(Ue),this.element.appendChild(n),this.element.appendChild(we(ke)),$l.bind(this.element,"click",function(){return e._showAndHide(t)})}var Hl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this;this.element=we(Oe),t.forEach(function(t){return n.element.appendChild(t)})},Wl=(jl.prototype.show=function(t){this.selectorInputContainer.debugSelector(t),this.element.parentElement||h.insertFirstChildToPanelsContainer(this.element),Te(this.element,{display:"flex"})},jl.prototype.hide=function(){Te(this.element,{display:"none"})},jl);function jl(){this.elementPicker=tr,this.element=we(Ve),this.selectorInputContainer=new Nl;var t=new nr,e=new Ol(this.selectorInputContainer),n=new Hl(t.element,this.selectorInputContainer.element,e.element),i=new Ll(this.element);this.element.appendChild(n.element),this.element.appendChild(i.element)}var Gl=n.default.Promise,ql=n.default.eventSandbox.message,Yl=i.default.sendRequestToFrame,Xl="ui|hide|request",Kl="ui|hide|response",Jl="ui|show|request",Ql="ui|show|response";ql.on(ql.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===Xl?(h.hide(),ql.sendServiceMsg({cmd:Kl},t.source)):t.message.cmd===Jl&&(h.show(),ql.sendServiceMsg({cmd:Ql},t.source))});var Zl={};Zl.uiRoot=h,Zl.cursorUI=ye,Zl.iframeCursorUI=_e,Zl.selectElement=s,Zl.modalBackground=V,Zl.ProgressPanel=X,Zl.StatusBar=Yt,Zl.IframeStatusBar=Zt,Zl.SelectorInspectorPanel=Wl,Zl.hide=function(t){return t?Yl({cmd:Xl},Kl,iu.top):(h.hide(),Gl.resolve())},Zl.show=function(t){return t?Yl({cmd:Jl},Ql,iu.top):(h.show(),Gl.resolve())},Zl.showScreenshotMark=function(t){return Ce.show(t)},Zl.hideScreenshotMark=function(){return Ce.hide()};var tu=n.default.nativeMethods,eu=n.default.EVENTS.evalIframeScript;tu.objectDefineProperty(iu,"%testCafeUI%",{configurable:!0,value:Zl}),n.default.on(eu,function(t){return nu(tu.contentWindowGetter.call(t.iframe))})}(iu["%hammerhead%"],iu["%testCafeCore%"],iu["%hammerhead%"].Promise)}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function pu(mu){var vu=mu.document;!function(u,c,t){function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(u),i=e(c),r=e(t),h={uiRoot:null,container:null,element:function(){return this.uiRoot||(this.uiRoot=vu.createElement("div"),u.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},panelsContainer:function(){return this.container||(this.container=vu.createElement("div"),u.shadowUI.addClass(this.container,"panels-container"),this.element().appendChild(this.container)),this.container},insertFirstChildToPanelsContainer:function(t){var e=this.panelsContainer(),n=u.nativeMethods.nodeFirstChildGetter.call(e);e.insertBefore(t,n)},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=u.shadowUI.getRoot();u.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},d=n.default.shadowUI,f=n.default.utils.browser,o=n.default.utils.featureDetection,p=n.default.nativeMethods,m=n.default.eventSandbox.eventSimulator,v=n.default.eventSandbox.listeners,g=i.default.positionUtils,y=i.default.domUtils,_=i.default.styleUtils,C=i.default.eventUtils,b=i.default.arrayUtils,E=i.default.selectController,w="tcOptionList",a="disabled";function S(t){var e=p.eventTargetGetter.call(t),n=E.currentEl;(e||t.srcElement)===n||y.containsElement(n,e)||y.containsElement(E.optionList,e)||x()}function T(t,e,n){var i,r=p.eventTargetGetter.call(t),s=b.indexOf(E.options,r);s<0||(n(),(i=-1<r.className.indexOf(a))&&f.isWebKit||function(t,e){var n=E.currentEl,i=n.selectedIndex,r=n.getElementsByTagName("option")[t],s=!e&&t!==i;s&&(n.selectedIndex=t),!f.isFirefox&&s&&(m.input(n),m.change(n)),f.isFirefox&&m.mousedown(f.isFirefox?r:n),o.isTouchDevice||m.mouseup(f.isFirefox?r:n),f.isFirefox&&s&&(m.input(n),m.change(n)),o.isTouchDevice||m.click(f.isFirefox?r:n),e||x()}(s,i))}function x(){y.remove(E.optionList),C.unbind(vu,"mousedown",S),E.clear()}var s=Object.freeze({__proto__:null,expandOptionList:function(t){var e=t.children;if(e.length&&!t.disabled){if(E.currentEl){var n=t===E.currentEl;if(x(),n)return}var i=E.currentEl=t,r=E.optionList=vu.createElement("div");h.element().appendChild(r),d.addClass(r,w),E.createChildren(e,r),v.addInternalEventBeforeListener(mu,["click"],T),p.setTimeout.call(mu,function(){C.bind(vu,"mousedown",S)},0),_.set(r,{position:"absolute",fontSize:_.get(i,"fontSize"),fontFamily:_.get(i,"fontFamily"),minWidth:_.getWidth(i)+"px",left:g.getOffsetPosition(i).left+"px",height:20<y.getSelectVisibleChildren(t).length?20*_.getOptionHeight(t):""});var s,o=g.getOffsetPosition(i).top,a=_.getHeight(r),l=o+_.getHeight(i)+2;l+a>_.getScrollTop(mu)+_.getHeight(mu)&&(s=o-3-a)>=_.getScrollTop(mu)&&(l=s),_.set(r,"top",l+"px")}},collapseOptionList:x,scrollOptionListByChild:function(t){var e,n,i,r,s,o,a=y.getSelectParent(t);a&&(e=_.getSelectElementSize(a),n=_.getOptionHeight(a),i=0,s=(r=Math.max(_.getScrollTop(a)/n,0))+e-1,(o=y.getChildVisibleIndex(a,t))<r?(i=n*(r-o),_.setScrollTop(a,Math.max(_.getScrollTop(a)-i,0))):s<o&&(i=n*(o-s),_.setScrollTop(a,_.getScrollTop(a)+i)))},getSelectChildCenter:function(t){var e=y.getSelectParent(t);if(!e)return{x:0,y:0};var n=_.getOptionHeight(e),i=g.getElementRectangle(t);return{x:Math.round(i.left+i.width/2),y:Math.round(i.top+n/2)}},switchOptionsByKeys:function(t,e){var n=_.getSelectElementSize(t),i=!_.hasDimensions(d.select("."+w)[0]);if(/down|up/.test(e)||(n<=1||f.isFirefox)&&(i||f.isFirefox)&&/left|right/.test(e)){for(var r=t.querySelectorAll("option"),s=[],o=0;o<r.length;o++){var a=r[o].parentElement;r[o].disabled||"optgroup"===y.getTagName(a)&&a.disabled||s.push(r[o])}var l=b.indexOf(s,r[t.selectedIndex])+(/down|right/.test(e)?1:-1);0<=l&&l<s.length&&(t.selectedIndex=b.indexOf(r,s[l]),m.input(t),m.change(t))}}}),l="Loading page...",I="modal-background",A="loading-text",M="loading-icon",B=null,N=null,U=null,R=!1;function D(){function t(){var t=c.styleUtils.getHeight(mu),e=c.styleUtils.getWidth(mu);c.styleUtils.set(B,"width",e+"px"),c.styleUtils.set(B,"height",t+"px"),c.styleUtils.set(U,{left:Math.round((e-c.styleUtils.getWidth(U))/2)+"px",top:Math.round((t-c.styleUtils.getHeight(U))/2)+"px"})}t(),c.eventUtils.bind(mu,"resize",t)}function k(){var t,e,n,i;t=h.element(),B=vu.createElement("div"),t.appendChild(B),u.shadowUI.addClass(B,I),N=vu.createElement("div"),u.nativeMethods.nodeTextContentSetter.call(N,l),t.appendChild(N),u.shadowUI.addClass(N,A),U=vu.createElement("div"),c.styleUtils.set(U,"visibility","hidden"),t.appendChild(U),u.shadowUI.addClass(U,M),D(),e=c.styleUtils.getHeight(mu),n=c.styleUtils.getWidth(mu),(i=!c.styleUtils.hasDimensions(N))&&(c.styleUtils.set(N,"visibility","hidden"),c.styleUtils.set(N,"display","block")),c.styleUtils.set(N,{left:Math.max((n-c.styleUtils.getWidth(N))/2,0)+"px",top:Math.max((e-c.styleUtils.getHeight(N))/2,0)+"px"}),i&&(c.styleUtils.set(N,"display","none"),c.styleUtils.set(N,"visibility","")),R=!0}var V=Object.freeze({__proto__:null,initAndShowLoadingText:function(){function t(){k(),c.styleUtils.set(B,"opacity",.8),c.styleUtils.set(B,"display","block"),c.styleUtils.set(N,"display","block"),e=!0}var e=!1,n=function(){e||(vu.body?t():u.nativeMethods.setTimeout.call(mu,n,0))};n(),c.eventUtils.documentReady().then(function(){e||t()})},show:function(t){R||k(),c.styleUtils.set(B,"opacity",t?0:.7),c.styleUtils.set(B,"display","block")},hide:function(){R&&(c.styleUtils.set(N,"display","none"),c.styleUtils.set(B,"display","none"))},showLoadingIcon:function(){c.styleUtils.set(U,"visibility","visible")},hideLoadingIcon:function(){c.styleUtils.set(U,"visibility","hidden")}}),O=n.default.shadowUI,P=i.default.styleUtils,F="success",$=(L.prototype.setValue=function(t){t="number"!=typeof t?0:Math.min(Math.max(t,0),100),P.set(this.valueElement,"width",t+"%")},L.prototype.setSuccess=function(t){t?O.addClass(this.containerElement,F):O.removeClass(this.containerElement,F)},L);function L(t){this.containerElement=vu.createElement("div"),this.valueElement=vu.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),O.addClass(this.containerElement,"progress-bar"),O.addClass(this.valueElement,"value")}var z=n.default.shadowUI,H=n.default.nativeMethods,W=i.default.eventUtils,j=i.default.styleUtils,G="progress-panel",q="title",Y="content",X=(K._getInvisibleElementProperty=function(t,e){var n="none"===j.get(t,"display");n&&j.set(t,"display","block");var i=t[e];return n&&j.set(t,"display","none"),i},K._showAtWindowCenter=function(t){var e=K._getInvisibleElementProperty(t,"offsetHeight"),n=K._getInvisibleElementProperty(t,"offsetWidth"),i=Math.round(j.getHeight(mu)/2-e/2),r=Math.round(j.getWidth(mu)/2-n/2);j.set(t,{left:r+"px",top:i+"px"})},K.prototype._setCurrentProgress=function(){var t=Math.round((H.dateNow()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(t)},K.prototype._setSuccess=function(t){this.progressBar.setSuccess(t)},K.prototype._stopAnimation=function(){H.clearInterval.call(mu,this.animationInterval)},K.prototype._animate=function(t,e,n,i){var r,s,o,a=this,l=H.dateNow(),u=n?0:1;n&&(j.set(t,"opacity",u),j.set(t,"display","block")),this._stopAnimation(),this.animationInterval=H.setInterval.call(mu,function(){r=H.dateNow()-l,s=Math.min(r/e,1),o=.5-Math.cos(s*Math.PI)/2,j.set(t,"opacity",u+(n?o:-o)),1===s&&(a._stopAnimation(),i&&i())},10)},K.prototype._showPanel=function(){W.bind(mu,"resize",this.disposePanel),this._animate(this.panelDiv,200,!0)},K.prototype._hidePanel=function(t){var e=this;this.startTime=null,W.unbind(mu,"resize",this.disposePanel),this._animate(this.panelDiv,t?0:600,!1,function(){return j.set(e.panelDiv,"display","none")})},K.prototype.show=function(t,e){var n=this;this.startTime=H.dateNow(),this.maxTimeout=e,H.nodeTextContentSetter.call(this.titleDiv,t),this._setSuccess(!1),this.openingTimeout=H.setTimeout.call(mu,function(){n.openingTimeout=null,n._setCurrentProgress(),n._showPanel(),n.updateInterval=H.setInterval.call(mu,function(){return n._setCurrentProgress()},100)},300)},K.prototype.close=function(t){var e=this;t&&this._setSuccess(!0),this.openingTimeout&&(H.clearTimeout.call(mu,this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(H.clearInterval.call(mu,this.updateInterval),this.updateInterval=null),t?this.startTime&&H.dateNow()-this.startTime<1e3?H.setTimeout.call(mu,function(){H.setTimeout.call(mu,function(){return e._hidePanel(!1)},200)},100):H.setTimeout.call(mu,function(){return e._hidePanel(!1)},200):this._hidePanel(!0)},K);function K(){var t=this;this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=vu.createElement("div"),h.element().appendChild(this.panelDiv),this.titleDiv=vu.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=vu.createElement("div"),this.panelDiv.appendChild(this.contentDiv),z.addClass(this.panelDiv,G),z.addClass(this.titleDiv,q),z.addClass(this.contentDiv,Y),K._showAtWindowCenter(this.panelDiv),this.progressBar=new $(this.contentDiv),this.disposePanel=function(){return K._showAtWindowCenter(t.panelDiv)}}var J=function(t,e){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Z(t,o,a,l){return new(a=a||r.default)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function r(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(i,r)}s((l=l.apply(t,o||[])).next())})}function tt(n,i){var r,s,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=t(0),l.throw=t(1),l.return=t(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;l&&e[l=0]&&(a=0),a;)try{if(r=1,s&&(o=2&e[0]?s.return:e[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,e[1])).done)return o;switch(s=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,s=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=i.call(n,a)}catch(t){e=[6,t],s=0}finally{r=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var et=n.default.shadowUI,nt=n.default.nativeMethods,it=i.default.styleUtils,rt="determinate",st=(ot.prototype._setCurrentProgress=function(){var t=(nt.dateNow()-this.startTime)/this.maxTimeout,e=Math.min(Math.max(t,0),1),n=it.getWidth(this.progressBar),i=Math.round(n*e);it.set(this.firstValueElement,"width",i+"px")},ot.prototype.start=function(t,e){var n=this;et.addClass(this.progressBar,rt),this.maxTimeout=t,this.startTime=e||nt.dateNow(),this._setCurrentProgress(),this.animationInterval=nt.setInterval.call(mu,function(){return n._setCurrentProgress()},10)},ot.prototype.stop=function(){this.animationInterval&&(nt.clearInterval.call(mu,this.animationInterval),this.animationInterval=null)},ot.prototype.reset=function(){it.set(this.firstValueElement,"width",0),et.removeClass(this.progressBar,rt)},ot);function ot(t,e){this.progressBar=t,this.firstValueElement=e,this.maxTimeout=null,this.startTime=null,this.animationInterval=null}function at(t,e,n){if(e.x===t.x)return 0;var i=(e.y-t.y)/(e.x-t.x),r=t.x*(t.y-e.y)/(e.x-t.x)+t.y;return Math.round(i*n+r)}var lt=n.default.shadowUI,ut=n.default.nativeMethods,ct=i.default.styleUtils,ht={time:2800,points:[.815,.395],positionByCompletePercent:{0:{left:-35,right:100},.6:{left:100,right:-90},1:{left:100,right:-90}}},dt={time:3e3,points:[.84,1],positionByCompletePercent:{0:{left:-200,right:100},.6:{left:107,right:-8},1:{left:107,right:-8}}},ft=0,pt=.6,mt=1,vt="indeterminate",gt=(yt._updateValueAnimation=function(t,e,n){var i,r,s,o,a,l,u,c,h,d,f=n.time,p=n.points,m=n.positionByCompletePercent,v=ut.dateNow()-t,g=(i=v/f,r=p[0],s=p[1],3*Math.pow(1-i,2)*i*r+3*(1-i)*i*i*s+i*i*i),y=(c=(l=(o=g)<pt)?pt:mt,h=(a=m)[u=l?ft:pt],d=a[c],{left:at({x:u,y:h.left},{x:c,y:d.left},o),right:at({x:u,y:h.right},{x:c,y:d.right},o)}),_=y.left,C=y.right;ct.set(e,"left",Math.round(_)+"%"),ct.set(e,"right",Math.round(C)+"%")},yt.prototype._clearFirstValueAnimation=function(){this.animationInterval&&(ut.clearInterval.call(mu,this.animationInterval),this.animationInterval=null),ct.set(this.firstValue,"left","-35%"),ct.set(this.firstValue,"right","100%")},yt.prototype._clearSecondValueAnimation=function(){this.secondValueAnimationInterval&&(ut.clearInterval.call(mu,this.secondValueAnimationInterval),this.secondValueAnimationInterval=null),ct.set(this.secondValue,"left","-200%"),ct.set(this.secondValue,"right","100%")},yt.prototype._startFirstValueAnimation=function(){var t=this;this._clearFirstValueAnimation();var e=ut.dateNow();this.animationInterval=ut.setInterval.call(mu,function(){yt._updateValueAnimation(e,t.firstValue,ht)},10)},yt.prototype._startSecondValueAnimation=function(){var t=this;this._clearSecondValueAnimation();var e=ut.dateNow();this.secondValueAnimationInterval=ut.setInterval.call(mu,function(){yt._updateValueAnimation(e,t.secondValue,dt)},10)},yt.prototype._startAnimation=function(){var t=this;this._startFirstValueAnimation(),this.secondValueAnimationTimeout=ut.setTimeout.call(mu,function(){return t._startSecondValueAnimation()},1e3),this.restartAnimationTimeout=ut.setTimeout.call(mu,function(){return t._startAnimation()},1950)},yt.prototype._stopAnimation=function(){this._clearFirstValueAnimation(),this._clearSecondValueAnimation(),this.secondValueAnimationTimeout&&(ut.clearInterval.call(mu,this.secondValueAnimationTimeout),this.secondValueAnimationTimeout=null),this.restartAnimationTimeout&&(ut.clearInterval.call(mu,this.restartAnimationTimeout),this.restartAnimationTimeout=null)},yt.prototype.start=function(){lt.addClass(this.progressBar,vt),this._startAnimation()},yt.prototype.stop=function(){lt.removeClass(this.progressBar,vt),this._stopAnimation()},yt);function yt(t,e,n){this.progressBar=t,this.firstValue=e,this.secondValue=n,this.animationInterval=null,this.secondValueAnimationInterval=null,this.secondValueAnimationTimeout=null,this.restartAnimationTimeout=null}var _t=n.default.shadowUI,Ct=i.default.styleUtils,bt=(Et.prototype._create=function(t){this.progressBar=vu.createElement("div"),_t.addClass(this.progressBar,"progress-bar"),t.appendChild(this.progressBar);var e=vu.createElement("div");_t.addClass(e,"value-container"),this.progressBar.appendChild(e),this.firstValueElement=vu.createElement("div"),_t.addClass(this.firstValueElement,"value"),e.appendChild(this.firstValueElement),this.secondValueElement=vu.createElement("div"),_t.addClass(this.secondValueElement,"value"),e.appendChild(this.secondValueElement)},Et.prototype.show=function(){Ct.set(this.progressBar,"visibility","visible")},Et.prototype.hide=function(){Ct.set(this.progressBar,"visibility","hidden")},Et);function Et(t){this.progressBar=null,this.firstValueElement=null,this.secondValueElement=null,this._create(t),this.determinateIndicator=new st(this.progressBar,this.firstValueElement),this.indeterminateIndicator=new gt(this.progressBar,this.firstValueElement,this.secondValueElement)}var wt,St="start-waiting-element",Tt="end-waiting-element-request",xt="end-waiting-element-response",It="start-waiting-assertion-retries",At="end-waiting-assertion-retries-request",Mt="end-waiting-assertion-retries-response",Bt="step",Nt="resume",Ut=n.default.Promise,Rt=n.default.shadowUI,Dt=n.default.nativeMethods,kt=n.default.eventSandbox.message,Vt=n.default.utils.browser,Ot=n.default.utils.featureDetection,Pt=n.default.eventSandbox.listeners,Ft=i.default.styleUtils,$t=i.default.eventUtils,Lt=i.default.domUtils,zt=i.default.serviceUtils,Ht=i.default.arrayUtils,Wt="status-bar-debugging",jt="waiting-element-failed",Gt="waiting-element-success",qt="%testCafeStatusPrefix%",Yt=(Q(Xt,wt=zt.EventEmitter),Object.defineProperty(Xt.prototype,"visibleHeight",{get:function(){return this.maxHeight=Math.max(this.maxHeight,Ft.getHeight(this.statusBar)),this.maxHeight},enumerable:!1,configurable:!0}),Xt.prototype._createButton=function(t,e){var n=vu.createElement("div"),i=vu.createElement("div"),r=vu.createElement("span");return Dt.nodeTextContentSetter.call(r,t),Rt.addClass(n,"button"),Rt.addClass(n,e),Rt.addClass(i,"button-icon"),Vt.isSafari&&(r.style.position="relative",r.style.top="1px"),n.appendChild(i),n.appendChild(r),n},Xt.prototype._createIconArea=function(){this.icon=vu.createElement("div"),Rt.addClass(this.icon,"icon"),this.statusBar.appendChild(this.icon)},Xt.prototype._createInformationArea=function(){this.infoContainer=vu.createElement("div"),Rt.addClass(this.infoContainer,"info-container"),this.statusBar.appendChild(this.infoContainer);var t=vu.createElement("div");Rt.addClass(t,"info-text-container"),this.infoContainer.appendChild(t);var e=vu.createElement("div");Rt.addClass(e,"status-container"),t.appendChild(e),this.statusDiv=vu.createElement("div"),this.statusDiv=vu.createElement("div"),Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("Loading Web Page...")),Rt.addClass(this.statusDiv,"status"),Rt.addClass(this.statusDiv,"info"),e.appendChild(this.statusDiv);var n=vu.createElement("div");Dt.nodeTextContentSetter.call(n,"".concat(this.fixtureName," - ").concat(this.testName)),Rt.addClass(n,"fixture"),Rt.addClass(n,"info"),e.appendChild(n);var i=vu.createElement("div");Dt.nodeTextContentSetter.call(i,this.userAgent),Rt.addClass(i,"user-agent"),t.appendChild(i)},Xt.prototype._createActionsArea=function(){var t=this;this.actionsContainer=vu.createElement("div"),Rt.addClass(this.actionsContainer,"actions-container"),this.statusBar.appendChild(this.actionsContainer),this.buttons=vu.createElement("div"),Rt.addClass(this.buttons,"buttons"),this.actionsContainer.appendChild(this.buttons),this.unlockButton=this._createButton("Unlock Page","locked"),this.resumeButton=this._createButton("Resume","resume"),this.nextButton=this._createButton("Next Action","step"),this.finishButton=this._createButton("Finish","finish"),this.buttons.appendChild(this.unlockButton),this.buttons.appendChild(this.resumeButton),this.buttons.appendChild(this.nextButton),this.actionsContainer.style.display="none",this._bindClickOnce([this.unlockButton],function(){Rt.removeClass(t.unlockButton,"locked"),Rt.addClass(t.unlockButton,"unlocked"),Dt.nodeTextContentSetter.call(t.unlockButton.querySelector("span"),"Page unlocked"),t.state.locked=!1,t.emit(t.UNLOCK_PAGE_BTN_CLICK,{})}),this.unlockButton.style.display="none"},Xt.prototype._create=function(){this.statusBar=vu.createElement("div"),Rt.addClass(this.statusBar,"status-bar"),this._createIconArea(),this._createInformationArea(),this._createActionsArea(),this.progressBar=new bt(this.infoContainer),this.progressBar.indeterminateIndicator.start(),this.progressBar.show(),h.panelsContainer().appendChild(this.statusBar),this._bindHandlers(),this.state.created=!0},Xt.prototype._createBeforeReady=function(){var t,e=this;this.state.created||(t=mu).top!==t||(vu.body?this._create():Dt.setTimeout.call(mu,function(){return e._createBeforeReady()},0))},Xt.prototype._animate=function(t){var e,n,i,r=this,s=Dt.dateNow(),o=parseInt(Ft.get(this.statusBar,"opacity"),10)||0;this._stopAnimation(),t&&(Ft.set(this.statusBar,"visibility",""),this.state.hidden=!1),this.animationInterval=Dt.setInterval.call(mu,function(){e=Dt.dateNow()-s,n=Math.min(e/500,1),i=.5-Math.cos(n*Math.PI)/2,Ft.set(r.statusBar,"opacity",o+(t?i:-i)),1===n&&(r._stopAnimation(),t||(Ft.set(r.statusBar,"visibility","hidden"),r.state.hidden=!0),r.state.showing=!1,r.state.hiding=!1)},10)},Xt.prototype._stopAnimation=function(){this.animationInterval&&(Dt.clearInterval.call(mu,this.animationInterval),this.animationInterval=null)},Xt.prototype._fadeOut=function(){this.state.hiding||this.state.debugging||(this.state.showing=!1,this.state.hiding=!0,this._animate())},Xt.prototype._fadeIn=function(){this.state.showing||this.state.debugging||(this.state.hiding=!1,this.state.showing=!0,this._animate(!0))},Xt.prototype._bindHandlers=function(){var e=this;Pt.initElementListening(mu,["resize"]),Pt.addInternalEventBeforeListener(mu,["resize"],function(){e.windowHeight=mu.innerHeight}),Pt.addFirstInternalEventBeforeListener(mu,["mousemove","mouseout","touchmove"],function(t){"mouseout"!==t.type||t.relatedTarget?"mousemove"!==t.type&&"touchmove"!==t.type||(t.clientY>e.windowHeight-e.visibleHeight?e._fadeOut(t):e.state.hidden&&e._fadeIn(t)):e._fadeIn(t)})},Xt.prototype._bindClickOnce=function(n,i){var r=this,s=!this.nativeAutomation&&Ot.isTouchDevice?"touchstart":"mousedown",o=function(t){var e=Dt.eventTargetGetter.call(t);Ht.find(n,function(t){return Lt.containsElement(t,e)})?($t.preventDefault(t),Pt.removeInternalEventBeforeListener(mu,[s],o),i(t)):Lt.containsElement(r.statusBar,e)&&$t.preventDefault(t)};Pt.addInternalEventBeforeListener(mu,[s],o)},Xt.prototype._initChildListening=function(){var n=this;kt.on(kt.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.cmd===St?n.showWaitingElementStatus(e.timeout):e.cmd===Tt?n.hideWaitingElementStatus(e.waitingSuccess).then(function(){return kt.sendServiceMsg({cmd:xt},t.source)}):e.cmd===It?n.showWaitingAssertionRetriesStatus(e.timeout):e.cmd===At&&n.hideWaitingAssertionRetriesStatus(e.waitingSuccess).then(function(){return kt.sendServiceMsg({cmd:Mt},t.source)})})},Xt.prototype._resetState=function(){this.state.debugging=!1,Rt.removeClass(h.panelsContainer(),Wt),this.actionsContainer.style.display="none",this.unlockButton.style.display="none",Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("")),this.progressBar.hide()},Xt.prototype._getFullStatusText=function(t){var e=this.contextStorage.getItem(qt)||"";return e+(e&&t?". ":"")+t},Xt.prototype._showWaitingStatus=function(){var t=this.state.assertionRetries?"Waiting for assertion execution...":"Waiting for element to appear...";Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(t)),this.progressBar.show()},Xt.prototype._hideWaitingStatus=function(e){var n=this;return new Ut(function(t){Dt.setTimeout.call(mu,function(){n.state.waiting||n.state.debugging||(Rt.removeClass(n.statusBar,Gt),Rt.removeClass(n.statusBar,jt),n.progressBar.determinateIndicator.reset(),n._resetState()),t()},e?0:500)})},Xt.prototype._showDebuggingStatus=function(t){var r=this;return new Ut(function(i){r.state.debugging=!0,r.state.locked=!0,Rt.addClass(h.panelsContainer(),Wt),t?(r.buttons.removeChild(r.nextButton),r.buttons.removeChild(r.resumeButton),r.buttons.appendChild(r.finishButton),Dt.nodeTextContentSetter.call(r.statusDiv,r._getFullStatusText("Test failed")),Rt.removeClass(r.statusBar,Gt),Rt.addClass(r.statusBar,jt)):Dt.nodeTextContentSetter.call(r.statusDiv,r._getFullStatusText("Debugging test...")),r.actionsContainer.style.display="",r.unlockButton.style.display="",r._bindClickOnce([r.resumeButton,r.nextButton,r.finishButton],function(t){var e=Dt.eventTargetGetter.call(t),n=Lt.containsElement(r.nextButton,e);r._resetState(),i(n?Bt:Nt)})})},Xt.prototype._setWaitingStatus=function(t,e){var n=this;this.state.waiting=!0,this.progressBar.determinateIndicator.start(t,e),this.showingTimeout=Dt.setTimeout.call(mu,function(){n.showingTimeout=null,n._showWaitingStatus()},300)},Xt.prototype._resetWaitingStatus=function(t){this.state.waiting=!1,this.progressBar.determinateIndicator.stop(),t?Rt.addClass(this.statusBar,Gt):Rt.addClass(this.statusBar,jt);var e=this.showingTimeout&&t;return this.showingTimeout&&(Dt.clearTimeout.call(mu,this.showingTimeout),this.showingTimeout=null,t||this._showWaitingStatus()),this._hideWaitingStatus(e)},Xt.prototype.hidePageLoadingStatus=function(){this.state.created||this._create(),this.progressBar.indeterminateIndicator.stop(),this._resetState()},Xt.prototype.showDebuggingStatus=function(t){return this._stopAnimation(),Ft.set(this.statusBar,"opacity",1),Ft.set(this.statusBar,"visibility",""),this.state.hiden=!1,this._showDebuggingStatus(t)},Xt.prototype.showWaitingElementStatus=function(t){this.state.assertionRetries||this._setWaitingStatus(t)},Xt.prototype.hideWaitingElementStatus=function(t){return this.state.assertionRetries?Ut.resolve():this._resetWaitingStatus(t)},Xt.prototype.showWaitingAssertionRetriesStatus=function(t,e){this.state.assertionRetries=!0,this._setWaitingStatus(t,e)},Xt.prototype.hideWaitingAssertionRetriesStatus=function(t){var e=this;return this._resetWaitingStatus(t).then(function(){e.state.assertionRetries=!1})},Xt.prototype.setStatusPrefix=function(t){this.contextStorage.setItem(qt,t),Dt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(""))},Xt);function Xt(t,e,n,i,r){var s=wt.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=n,s.contextStorage=i,s.nativeAutomation=r,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=vu.documentElement?Ft.getHeight(mu):mu.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 Kt,Jt=i.default.sendRequestToFrame,Qt=n.default.eventSandbox.message,Zt=(Q(te,Kt=Yt),te.prototype.showWaitingElementStatus=function(t){Qt.sendServiceMsg({cmd:St,timeout:t},mu.top)},te.prototype.hideWaitingElementStatus=function(t){return Jt({cmd:Tt,waitingSuccess:t},xt,mu.top)},te.prototype.showWaitingAssertionRetriesStatus=function(t){Qt.sendServiceMsg({cmd:It,timeout:t},mu.top)},te.prototype.hideWaitingAssertionRetriesStatus=function(t){return Jt({cmd:At,waitingSuccess:t},Mt,mu.top)},te);function te(){return Kt.call(this)||this}var ee="ui|cursor|move|request",ne="ui|cursor|leftbuttondown|request",ie="ui|cursor|rightbuttondown|request",re="ui|cursor|buttonup|request",se="ui|cursor|move|response",oe="ui|cursor|leftbuttondown|response",ae="ui|cursor|rightbuttondown|response",le="ui|cursor|buttonup|response",ue=n.default.Promise,ce=n.default.shadowUI,he=n.default.utils.featureDetection,de=n.default.eventSandbox.message,fe=i.default.styleUtils,pe=i.default.positionUtils,me="l-mouse-down",ve="r-mouse-down",ge=[me,ve].join(" ");de.on(de.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;switch(e.cmd){case ee:ye.move(pe.getIframePointRelativeToParentFrame({x:e.x,y:e.y},t.source)).then(function(){return de.sendServiceMsg({cmd:se},t.source)});break;case ne:ye.leftButtonDown().then(function(){return de.sendServiceMsg({cmd:oe},t.source)});break;case ie:ye.rightButtonDown().then(function(){return de.sendServiceMsg({cmd:ae},t.source)});break;case re:ye.buttonUp().then(function(){return de.sendServiceMsg({cmd:le},t.source)})}});var ye={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){this.cursorElement=vu.createElement("div"),ce.addClass(this.cursorElement,"cursor"),he.isTouchDevice&&(ce.addClass(this.cursorElement,"touch"),this.pointerOffsetX=Math.ceil(fe.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(fe.getHeight(this.cursorElement)/2)),h.element().appendChild(this.cursorElement)},_ensureCursorElement:function(){return this.cursorElement||this._createElement(),!0},isVisible:function(){return this.cursorElement&&"hidden"!==fe.get(this.cursorElement,"visibility")},hide:function(){this._ensureCursorElement()&&this.isVisible()&&fe.set(this.cursorElement,"visibility","hidden")},show:function(){this._ensureCursorElement()&&fe.set(this.cursorElement,"visibility","")},move:function(t){return this._ensureCursorElement()&&(this.x=t.x,this.y=t.y,fe.set(this.cursorElement,{left:this.x-this.pointerOffsetX+"px",top:this.y-this.pointerOffsetY+"px"})),ue.resolve()},leftButtonDown:function(){return this._ensureCursorElement()&&(ce.removeClass(this.cursorElement,ge),ce.addClass(this.cursorElement,me)),ue.resolve()},rightButtonDown:function(){return this._ensureCursorElement()&&(ce.removeClass(this.cursorElement,ge),ce.addClass(this.cursorElement,ve)),ue.resolve()},buttonUp:function(){return this._ensureCursorElement()&&ce.removeClass(this.cursorElement,ge),ue.resolve()}},_e={move:function(t){var e={cmd:ee,x:t.x,y:t.y};return c.sendRequestToFrame(e,se,mu.parent)},leftButtonDown:function(){return c.sendRequestToFrame({cmd:ne},oe,mu.parent)},rightButtonDown:function(){return c.sendRequestToFrame({cmd:ie},ae,mu.parent)},buttonUp:function(){return c.sendRequestToFrame({cmd:re},le,mu.parent)}},Ce={screenshotMark:null,_createMark:function(){this.screenshotMark=vu.createElement("img"),u.shadowUI.addClass(this.screenshotMark,"screenshot-mark"),this.screenshotMark.style.right=25/mu.devicePixelRatio+"px",this.screenshotMark.style.width=32/mu.devicePixelRatio+"px",this.screenshotMark.style.height=10/mu.devicePixelRatio+"px",this.hide(),u.shadowUI.getRoot().appendChild(this.screenshotMark)},hide:function(){this.screenshotMark&&(this.screenshotMark.style.visibility="hidden")},show:function(t){this.screenshotMark||this._createMark(),u.nativeMethods.imageSrcSetter.call(this.screenshotMark,t),this.screenshotMark.style.visibility=""}},be=n.default.shadowUI,Ee=n.default.nativeMethods;function we(t){var e=t.tag,n=void 0===e?"div":e,i=t.class,r=t.src,s=t.text,o=t.type,a=t.value,l=vu.createElement(n);return o&&Ee.setAttribute.call(l,"type",o),a&&Ee.inputValueSetter.call(l,a),r&&Ee.setAttribute.call(l,"src",r),i&&be.addClass(l,i),s&&Ee.nodeTextContentSetter.call(l,s),l}var Se=i.default.styleUtils;function Te(t,e){for(var n in e)Se.set(t,n,e[n])}var xe={tag:"input",type:"button",value:"Pick",class:"pick-button"},Ie={tag:"input",type:"text",class:"selector-input"},Ae={class:"match-indicator",text:"No Matching Elements"},Me={class:"expand-selector-list"},Be={class:"selector-input-container"},Ne={tag:"input",type:"button",value:"Copy"},Ue={class:"selector-panel-toggle-button-container"},Re={tag:"input",type:"button",class:"selector-panel-toggle-button"},De={class:"selectors-list"},ke={tag:"span"},Ve={class:"selector-inspector-panel"},Oe={class:"selector-inspector-panel-container"},Pe={class:"element-frame"},Fe={class:"tooltip"},$e={class:"arrow"},Le={tag:"input",type:"text",class:"auxiliary-input"};function ze(t){var e;t.parentElement||(e=h.panelsContainer(),h.element().insertBefore(t,e))}function He(t){t.parentElement&&h.element().removeChild(t)}var We,je=mu["%testCafeCore%"],Ge=function(t,e){void 0===e&&(e=!1),this.type=t,this.editable=e,this.disabled=void 0},qe=(Q(Ye,We=Ge),Ye);function Ye(t){return We.call(this,t.toLowerCase(),!0)||this}var Xe={edited:"$edited$",byTagName:"$tagName$",byId:"id",byText:"$text$",byClassAttr:"class",byAttr:"$attr$",byTagTree:"$dom$"},Ke=[new Ge(Xe.byTagName),new Ge(Xe.byId),new Ge(Xe.byText),new Ge(Xe.byClassAttr),new Ge(Xe.byAttr),new Ge(Xe.byTagTree)],Je=Xe.byTagTree,Qe=Object.freeze({__proto__:null,CustomSelectorRule:qe,DEFAULT_SELECTOR_RULES:Ke,RULE_TYPE:Xe,SelectorRule:Ge,UNSWITCHABLE_RULE_TYPE:Je}),Ze=(tn.prototype.concat=function(t){return t.type===this.type?new tn(this.type,this.filter.concat(" ",t.filter)):null},tn);function tn(t,e){this.type=t,this.filter=e}var en="index",nn="tag",rn="attr",sn=je.domUtils,on=je.arrayUtils;function an(t,e){var n=sn.getElementIndexInParent(e,t),i=new Ze(nn,sn.getTagName(t));return 0===n?[i]:[i,new Ze(en,n)]}function ln(t,e){for(var n=t.parentElement,i=[];n;){if(n===e)return i;i.push(n),n=n.parentElement}return i}var un=je.domUtils,cn=je.arrayUtils,hn=(Object.defineProperty(dn.prototype,"isCustom",{get:function(){return this.ancestorSelectorDescriptor?this.isCustomRule||this.ancestorSelectorDescriptor.isCustomRule:this.isCustomRule},enumerable:!1,configurable:!0}),dn.prototype._getStringArrayRepresentation=function(){return function(t){for(var e=[],n=0,i=t;n<i.length;n++){var r,s=i[n];0===cn.indexOf(t,s)?e.push("Selector('".concat(s.filter,"')")):"text"===s.type?e.push(".withText('".concat(s.filter,"')")):s.type===en?e.push(".nth(".concat(s.filter,")")):s.type===nn?e.push(".find('".concat(s.filter,"')")):s.type===rn&&(r=s.filter.attrValueRe?", ".concat(s.filter.attrValueRe):"",e.push(".withAttribute('".concat(s.filter.attrName,"'").concat(r,")")))}return e}(this._concatFilterOptions())},dn.prototype._addFilterByIndex=function(t){var e;1<t.length&&0!==(e=cn.indexOf(t,this.element))&&this.filterOptions.push(new Ze(en,e))},dn.prototype._concatFilterOptions=function(){var t=this.ancestorSelectorDescriptor,e=[];t&&(e=t._concatFilterOptions()),this.cssSelector&&e.push(new Ze(nn,this.cssSelector));var n=cn.concat(e,this.filterOptions);return cn.reduce(n,function(t,e){if(e.type===nn&&t.length){var n=t[t.length-1];if(n.type===nn)return t[t.length-1]=n.concat(e),t}return t.push(e),t},[])},dn.prototype._getElements=function(){if(this.ruleType===Xe.byTagTree)return[this.element];var t=this.ancestorSelectorDescriptor?this.ancestorSelectorDescriptor.element:un.findDocument(this.element),e=null;if(this.cssSelector)try{var n=mu.eval("(function(){return '".concat(this.cssSelector,"';})();")),e=cn.from(t.querySelectorAll(n))}catch(t){return null}else e=[t];return 0===(e=e.length&&this.filter?this.filter(e):e).length||-1===cn.indexOf(e,this.element)?[]:e},dn.createFromInstance=function(t,e){return new dn({ancestorSelectorDescriptor:e,cssSelector:t.cssSelector,element:t.element,filter:t.filter,filterOptions:[].concat(t.filterOptions||[]),isCustomRule:t.isCustomRule,ruleType:t.ruleType})},dn.prototype.makeUnique=function(){var t=this.ancestorSelectorDescriptor,e=t?t._getElements():[],n=!t||e?this._getElements():null;n&&(t&&t._addFilterByIndex(e),this._addFilterByIndex(n),this.stringArray=this._getStringArrayRepresentation())},dn);function dn(t){this.ruleType=t.ruleType,this.isCustomRule=t.isCustomRule,this.element=t.element,this.ancestorSelectorDescriptor=t.ancestorSelectorDescriptor,this.cssSelector=t.cssSelector,this.filterOptions=cn.concat([],t.filterOptions||[]),this.filter=t.filter,this.stringArray=this._getStringArrayRepresentation()}var fn=(pn.prototype._init=function(){},pn.prototype._shouldCreate=function(){throw new Error("Not implemented")},pn.prototype._getDescriptor=function(){throw new Error("Not implemented")},pn.prototype.create=function(t,e){return this.element=t,this._init(),this._shouldCreate(e)?this._getDescriptor(e):null},pn);function pn(t){this.type=t,this.element=null}var mn,vn=je.domUtils,gn=/html|body/,yn=/header|footer|main/,_n=(Q(Cn,mn=fn),Cn.prototype._init=function(){this.tagName=vn.getTagName(this.element)},Cn.prototype._shouldCreate=function(){return this.useTopLevelParents&&gn.test(this.tagName)||yn.test(this.tagName)},Cn.prototype._getDescriptor=function(){return new hn({ruleType:this.type,element:this.element,cssSelector:this.tagName})},Cn);function Cn(t){void 0===t&&(t=!0);var e=mn.call(this,Xe.byTagName)||this;return e.tagName="",e.useTopLevelParents=t,e}function bn(t){return t.replace(/\\/g,"\\\\\\$&").replace(/'/g,"\\\\\\$&").replace(/(\!|#|"|\$|%|&|\(|\||\)|\*|\+|,|\.|\/|:|;|<|=|>|\?|@|\[|\]|\^|`|{|\||}|~)/g,"\\\\$&")}function En(t){return t.replace(/'|"|\\|\||\-|\*|\?|\+|\^|\$|\[|\]/g,"\\$&").replace(/\(|\)/g,"\\S")}var wn=mu["%hammerhead%"],Sn=/[\\^$*+?.()|[\]{}]/g,Tn=je.selectorAttributeFilter,xn=je.arrayUtils,In=wn.nativeMethods;function An(t){return"string"==typeof t?new RegExp(t.replace(Sn,"\\$&")):t}var Mn=je.domUtils,Bn=je.arrayUtils,Nn=/\$ctl\d+|ctl\d+\$|_ctl\d+|ctl\d+_|^ctl\d+$/g,Un="!!!!!separator!!!!!",Rn="!!!!!anyNumber!!!!!",Dn=new RegExp(Un,"g"),kn=new RegExp(Rn,"g"),Vn=/\s{2,}/g,On="class";function Pn(t,e,n,i,r){return new hn({ancestorSelectorDescriptor:r,cssSelector:n,element:e,filter:(o=(s=i).attrName,a=s.attrValueRe,function(t){return xn.filter(t,function(t){return Tn(t,0,void 0,An(o),An(a))})}),filterOptions:new Ze(rn,i),ruleType:t});var s,o,a}function Fn(t,e,n,i){var r=Mn.getTagName(e),s="",o=null;return Bn.forEach(n,function(t){var e=t.name,n=t.value,i=!1,r=!1;50<n.replace(Vn," ").length&&(n=n.substr(0,50),i=!0),Nn.test(n)&&(r=!0,n=n.replace(Nn,function(t){return t.replace(/\d+/,Rn)})),Vn.test(n)&&(r=!0,n=n.replace(Vn,Un)),r?o||(n=(n=En(n)).replace(kn,"\\d+").replace(Dn,"\\s+"),o={attrName:e,attrValueRe:new RegExp(n)}):(n=e===On?bn(n).trimEnd():n.replace(/\\/g,"\\\\\\$&").replace(/'/g,"\\\\\\$&").replace(/"/g,"\\\\$&"),s+=e!==On||i?"[".concat(e).concat(i?"^":"").concat(n?'="'.concat(n,'"'):"","]"):(" "+n).replace(/\s+/g,"."))}),o?Pn(t,e,s||r,o,i):new hn({ruleType:t,element:e,ancestorSelectorDescriptor:i,cssSelector:s})}var $n,Ln=je.domUtils,zn=/_ctl\d+|ctl\d+_|^ctl\d+$/g,Hn=(Q(Wn,$n=fn),Wn.prototype._init=function(){this.idAttr=this.element.getAttribute("id")},Wn.prototype._shouldCreate=function(){return!!this.idAttr},Wn.prototype._getDescriptor=function(){if(zn.test(this.idAttr)){var t=(t=En(this.idAttr)).replace(zn,function(t){return t.replace(/\d+/,"\\d+")}),e=Ln.getTagName(this.element),n={attrName:"id",attrValueRe:new RegExp(t)};return Pn(Xe.byId,this.element,e,n)}return new hn({ruleType:Xe.byId,element:this.element,cssSelector:"#"+bn(this.idAttr).replace(/\s/g,"\\\\ ")})},Wn);function Wn(){var t=$n.call(this,Xe.byId)||this;return t.idAttr=null,t}var jn=je.domUtils,Gn=wn.utils.trim,qn=wn.nativeMethods,Yn=/^i$|^b$|^big$|^small$|^em$|^strong$|^dfn$|^code$|^samp$|^kbd$|^var$|^cite$|^abbr$|^acronym$|^sub$|^sup$|span$|^bdo$|^address$|^div$|^a$|^object$|^p$|^h\d$|^pre$|^q$|^ins$|^del$|^dt$|^dd$|^li$|^label$|^option$|^fieldset$|^legend$|^button$|^caption$|^td$|^th$|^title$/,Xn=50,Kn=/['"\\]/g,Jn=/\r?\n|\r/i;function Qn(t){t=t.trim().replace(Kn,"\\$&");var e=Jn.exec(t),n=e?e.index:t.length;return Gn(t.substring(0,Math.min(n,Xn)))}var Zn,ti=je.domUtils,ei=(Q(ni,Zn=fn),ni.prototype._init=function(){this.elementText=function(t){var e=jn.isHtmlElement(t)?qn.htmlElementInnerTextGetter.call(t):t.innerText;if(e)return Qn(e);if(jn.isOptionElement(t)){var n=qn.nodeTextContentGetter.call(t);return n?Qn(n):""}return""}(this.element)},ni.prototype._shouldCreate=function(){return t=this.element,e=this.elementText,Yn.test(jn.getTagName(t))?(e=Gn(e.replace(/\s+/g," ")),/\S/.test(e)):"";var t,e},ni.prototype._getDescriptor=function(){return new hn({ruleType:this.type,element:this.element,cssSelector:ti.getTagName(this.element),filterOptions:new Ze("text",this.elementText),filter:(e=this.elementText,function(t){return xn.filter(t,function(t){return-1<(In.htmlElementInnerTextGetter.call(t)||In.nodeTextContentGetter.call(t)).indexOf(e)})})});var e},ni);function ni(){var t=Zn.call(this,Xe.byText)||this;return t.elementText="",t}var ii=je.domUtils,ri=je.arrayUtils,si=wn.nativeMethods,oi="%testcafe-stored-attributes%",ai=/(^alt$|^name$|^class$|^title$|^data-\S+)/,li=/^data-ga\S+/;function ui(t,e){void 0===e&&(e=[]);var n=t[oi];if(n)return ri.filter(n,function(t){return t.name!==On});for(var i,r=si.elementAttributesGetter.call(t),s=[],o=0;o<r.length;o++)(i=r[o]).nodeName!==On&&function(t,e){void 0===e&&(e=[]);var n=t.nodeName;return t.nodeValue&&ai.test(n)&&-1===ri.indexOf(e,n)&&!li.test(n)&&!ii.isHammerheadAttr(n)}(i,e)&&s.push({name:i.nodeName,value:i.nodeValue});return s}var ci,hi=(Q(di,ci=fn),di.prototype._init=function(){this.elementAttributes=ui(this.element,this.customAttrNames)},di.prototype._shouldCreate=function(){return!!this.elementAttributes.length},di.prototype._getDescriptor=function(){return Fn(this.type,this.element,this.elementAttributes)},di);function di(t){void 0===t&&(t=[]);var e=ci.call(this,Xe.byAttr)||this;return e.customAttrNames=t,e.elementAttributes=[],e}var fi,pi=(Q(mi,fi=fn),mi.prototype._init=function(){this.className=function(t,e){for(var n,i=t[oi]||si.elementAttributesGetter.call(t),r=0;r<i.length;r++)if((n=i[r]).name===e&&n.value)return n.value;return null}(this.element,On)},mi.prototype._shouldCreate=function(){return!!this.className},mi.prototype._getDescriptor=function(){return Fn(this.type,this.element,[{name:On,value:this.className}])},mi);function mi(){var t=fi.call(this,Xe.byClassAttr)||this;return t.className="",t}var vi,gi,yi=je.domUtils,_i=je.arrayUtils,Ci=(Q(bi,vi=fn),bi.prototype._shouldCreate=function(t){var e=t?t.element:yi.findDocument(this.element).body;return this.parents=ln(this.element,e),this.parents.push(e),this.parents.length},bi.prototype._getDescriptor=function(t){var e,n="",i=[];return e=this.element,/html|body/.test(sn.getTagName(e).toLowerCase())?i.push(new Ze(nn,yi.getTagName(this.element))):i=function(t,e){for(var n=on.reverse(an(t,e[0])),i=e.length,r=0;r<i-1;r++){var s=an(e[r],e[r+1]),o=s[0],a=s[1];a&&n.push(a),n.push(o)}return on.reverse(n)}(this.element,this.parents),t?new hn({ruleType:this.type,element:this.element,ancestorSelectorDescriptor:t,filterOptions:i}):(i.length&&(n=i[0].filter,_i.splice(i,0,1)),new hn({ruleType:this.type,element:this.element,cssSelector:n,filterOptions:i}))},bi);function bi(){var t=vi.call(this,Xe.byTagTree)||this;return t.parents=[],t}var Ei,wi=((gi={})[Xe.byTagName]=new _n,gi[Xe.byId]=new Hn,gi[Xe.byText]=new ei,gi[Xe.byClassAttr]=new pi,gi[Xe.byAttr]=new hi,gi[Xe.byTagTree]=new Ci,gi),Si=(Q(Ti,Ei=fn),Ti.prototype._init=function(){var t=function(t,e){var n=t["%testcafe-custom-stored-attributes%"];if(n){var i=ri.find(n,function(t){return t.name===e});return i||null}return t.hasAttribute(e)?{name:e,value:t.getAttribute(e)}:null}(this.element,this.attrName);this.elementAttributes=t?[t]:[]},Ti.prototype._shouldCreate=function(){return!!this.elementAttributes.length},Ti.prototype._getDescriptor=function(){var t=Fn(this.type,this.element,this.elementAttributes);return t.isCustomRule=!0,t},Ti);function Ti(t){var e=Ei.call(this,t)||this;return e.attrName=t,e.elementAttributes=[],e}var xi=je.arrayUtils,Ii=[Xe.byTagName,Xe.byId,Xe.byClassAttr,Xe.byAttr],Ai=[Xe.byText,Xe.byClassAttr,Xe.byAttr,Xe.byTagTree];function Mi(t){return t.isCustomRule||-1!==xi.indexOf(Ai,t.ruleType)&&t.ruleType!==Xe.byTagTree}function Bi(t){return t.editable||-1!==xi.indexOf(Ii,t.type)}var Ni=" > ";function Ui(t,e){return e?e+Ni+t:t}var Ri=1;function Di(t){for(var e,n={},i=Ri,r=0,s=t;r<s.length;r++){var o=s[r];if(n[o.type]=i++,Bi(o))for(var a=0,l=t;a<l.length;a++){var u=l[a];!(e=u).editable&&-1===xi.indexOf(Ai,e.type)||(n[Ui(u.type,o.type)]=i++)}}return n}var ki=je.domUtils,Vi=je.arrayUtils;function Oi(t,e,n){for(var i=[],r=0,s=e;r<s.length;r++){var o=s[r].create(t,n);o&&i.push(o)}return i}function Pi(t,e){for(var n=[],i=0,r=e;i<r.length;i++){var s=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n],s=e.create(r);if(s)return s}return null}(t,r[i]);s&&n.push(s)}return n}function Fi(t){for(var n=[],e=0,i=t;e<i.length;e++){var r=i[e],s=function(e){return function(t,e){for(var n=t.length,i=0;i<n;i++)if(e(t[i]))return i;return-1}(n,function(t){return Vi.join(t.stringArray,"")===Vi.join(e.stringArray,"")})}(r);-1===s?n.push(r):n[s].priority>r.priority&&Vi.splice(n,s,1,r)}return n}function $i(t){function e(t){return t&&t.ancestorSelectorDescriptor?t.ancestorSelectorDescriptor.ruleType:null}for(var n=Vi.filter(t,function(t){return!t.isCustom}),i=Vi.filter(n,function(t){return t.ancestorSelectorDescriptor}),r=i.length,s=10-(n.length-r),o=r-1;s<r;){for(var a=e(i[o]);e(i[o-1])===a&&(Vi.remove(t,i[o]),!(--r<=s));)o--;o--}}function Li(t){void 0===t&&(t=Ke),this.rules=Vi.filter(t,function(t){return!t.disabled});var e=Li._processRules(this.rules),n=e.customRules,i=e.defaultRules;this.customRules=n,this.defaultRules=i,this.customAttrNames=[],this.customSelectorCreators=[],this.elementSelectorCreators=[],this.ancestorSelectorCreators=[],this._createCustomSelectorCreators(),this._createElementSelectorCreators(),this._createAncestorSelectorCreators(),this.rulePriority=Di(this.rules)}var zi=(Li._priorityComparator=function(t,e){return t.priority-e.priority},Li._getSelectorType=function(t){var e=t.ancestorSelectorDescriptor,n=e?e.ruleType:"";return Ui(t.ruleType,n)},Li._processRules=function(t){var e=[],n=[];return Vi.filter(t,function(t){t.editable?n.push(t):e.push(t)}),{customRules:n,defaultRules:e}},Li.prototype._createCustomSelectorCreators=function(){var e=this;Vi.forEach(this.customRules,function(t){e.customAttrNames.push(t.type),e.customSelectorCreators.push(new Si(t.type))})},Li.prototype._createElementSelectorCreators=function(){var n=this,i=[];Vi.forEach(this.defaultRules,function(t){var e=t.type===Xe.byAttr?new hi(n.customAttrNames):wi[t.type];i.push(e)}),this.elementSelectorCreators=Vi.concat(i,this.customSelectorCreators)},Li.prototype._createAncestorSelectorCreators=function(){for(var t=0,e=this.customRules;t<e.length;t++){var n=e[t];this.ancestorSelectorCreators.push(new Si(n.type))}for(var i=0,r=this.defaultRules;i<r.length;i++)Bi(n=r[i])&&(n.type===Xe.byTagName?this.ancestorSelectorCreators.push(new _n(!1)):this.ancestorSelectorCreators.push(wi[n.type]))},Li.prototype._generateCompoundSelectorDescriptor=function(t,e,n){for(var i=Vi.filter(n,Mi),r=[],s=null,o=null,a=0,l=Pi(e,this.ancestorSelectorCreators);a<l.length;a++){for(var u=l[a],c=0,h=i;c<h.length;c++){var d=h[c],o=hn.createFromInstance(u),s=hn.createFromInstance(d,o);r.push(s)}o=hn.createFromInstance(u),s=Oi(t,[wi[Xe.byTagTree]],u),r=Vi.concat(r,s)}return r},Li.prototype._cleanAndSortDescriptors=function(t){for(var e=[],n=0,i=t;n<i.length;n++){var r=i[n];r.makeUnique();var s=Li._getSelectorType(r),o=this.rulePriority[s];null!==o&&(r.priority=o,e.push(r))}return $i(e=(e=Fi(e)).sort(Li._priorityComparator)),e},Li.prototype._generateDescriptors=function(t){var e=Oi(t,this.elementSelectorCreators),n=ln(t,ki.findDocument(t).body),i=this._generateCompoundSelectorDescriptor(t,n,e),r=Vi.concat(e,i);return this._cleanAndSortDescriptors(r)},Li.prototype.generate=function(t){var e=this._generateDescriptors(t);return Vi.map(e,function(t){var e=t.stringArray,n=t.ruleType,i=t.ancestorSelectorDescriptor,r={value:Vi.join(e,""),rules:[n]};return i&&r.rules.push(i.ruleType),r})},Li.RULES=Qe,new Li);function Hi(){this.targets=new Map}var Wi=(Hi.prototype._remove=function(t,e){this.targets.delete(t),He(e)},Hi.prototype._setPosition=function(t,e){for(var n,i,r,s=(n=t.getBoundingClientRect(),i=mu.pageYOffset||vu.documentElement.scrollTop,r=mu.pageXOffset||vu.documentElement.scrollLeft,{top:n.top+i,left:n.left+r,height:n.height,width:n.width,bottom:n.bottom+i,right:n.right+r}),o={},a=0,l=["top","left","width","height"];a<l.length;a++){var u=l[a];o[u]=s[u]+"px"}Te(e,o)},Hi.prototype.highlight=function(t){var e;t&&!this.targets.has(t)&&(e=we(Pe),this.targets.set(t,e),this._setPosition(t,e),ze(e))},Hi.prototype.stopHighlighting=function(){var n=this;this.targets.forEach(function(t,e){return n._remove(e,t)})},new Hi),ji=n.default.nativeMethods;function Gi(){this._createElements()}var qi,Yi=(Gi.prototype._createElements=function(){this.tooltip=we(Fe),this.arrow=we($e)},Gi.prototype._setTooltipText=function(t){ji.nodeTextContentSetter.call(this.tooltip,t)},Gi.prototype._getTooltipLeft=function(t,e,n,i){return n<=t?i:n-e<=t?n+i-t:e+i},Gi.prototype._getArrowLeft=function(t,e,n,i){return n-e<=t+12?n+i-t:e+i+12},Gi.prototype._getVerticalPostionStyles=function(t,e,n,i){var r={},s={},o=vu.documentElement.scrollTop,a=t.height+e.height;return n.top>=a?(r.top=n.top+o-a+"px",s.top=n.top+o-e.height+"px",s.transform="none",s.visibility="visible"):i.height-n.bottom>=a?(r.top=n.bottom+o+e.height+"px",s.top=n.bottom+o+"px",s.transform="rotate(180deg)",s.visibility="visible"):(r.top=i.height+o-t.height+"px",s.top=o+"px",s.transform="node",s.visibility="hidden"),{tooltip:r,arrow:s}},Gi.prototype._getElementsStyles=function(t){var e=this.tooltip.getBoundingClientRect(),n=this.arrow.getBoundingClientRect(),i=t.getBoundingClientRect(),r={width:vu.documentElement.clientWidth,height:vu.documentElement.clientHeight},s=this._getVerticalPostionStyles(e,n,i,r),o=vu.documentElement.scrollLeft;return s.tooltip.left=this._getTooltipLeft(e.width,i.left,r.width,o)+"px",s.arrow.left=this._getArrowLeft(n.width,i.left,r.width,o)+"px",s},Gi.prototype._placeElements=function(t){var e=this._getElementsStyles(t);Te(this.tooltip,e.tooltip),Te(this.arrow,e.arrow)},Gi.prototype.show=function(t,e){this._setTooltipText(t),this._placeElements(e),ze(this.tooltip),ze(this.arrow)},Gi.prototype.hide=function(){He(this.tooltip),He(this.arrow)},new Gi),Xi=n.default.eventSandbox.listeners,Ki=i.default.styleUtils,Ji=i.default.serviceUtils,Qi="element-piked";function Zi(){var t=qi.call(this)||this;return t.hiddenTestCafeElements=new Map,t.handlers={onClick:t._getClickHandler(),onMouseMove:t._getMouseMoveHandler()},t}function tr(t){return!!or[t]}function er(t,e){this.references=t,this.transforms=e,this.circularCandidates=[],this.circularCandidatesDescrs=[],this.circularRefCount=0}var nr=(Q(Zi,qi=Ji.EventEmitter),Zi.prototype._hideTestCafeElements=function(){for(var t=0,e=h.element().children;t<e.length;t++){var n=e[t],i=Ki.get(n,"visibility");this.hiddenTestCafeElements.set(n,i),Ki.set(n,"visibility","hidden")}},Zi.prototype._showTestCafeElements=function(){this.hiddenTestCafeElements.forEach(function(t,e){Ki.set(e,"visibility",t)}),this.hiddenTestCafeElements.clear()},Zi.prototype._getClickHandler=function(){var t=this;return function(){t._showTestCafeElements(),Xi.removeInternalEventBeforeListener(mu,["mousemove"],t.handlers.onMouseMove),Xi.removeInternalEventBeforeListener(mu,["click"],t.handlers.onClick),t.emit(Qi,t.actualSelectors),Yi.hide()}},Zi.prototype._getMouseMoveHandler=function(){var r=this;return function(t){var e=t.clientX,n=t.clientY,i=vu.elementFromPoint(e,n);i&&i!==r.actualTarget&&(r.actualTarget=i,r.actualSelectors=zi.generate(i),Wi.stopHighlighting(),Wi.highlight(i),Yi.show(r.actualSelectors[0].value,i))}},Zi.prototype.start=function(t){this._hideTestCafeElements(),Xi.initElementListening(mu,["mousemove","click"]),Xi.addFirstInternalEventBeforeListener(mu,["mousemove"],this.handlers.onMouseMove),Xi.addFirstInternalEventBeforeListener(mu,["click"],this.handlers.onClick),this.handlers.onMouseMove(t)},new Zi),ir=i.default.eventUtils,rr=function(){this.element=we(xe),ir.bind(this.element,"click",function(t){return nr.start(t)})},sr=/^#*@(t|r)$/,or={Int8Array:"function"==typeof Int8Array?Int8Array:void 0,Uint8Array:"function"==typeof Uint8Array?Uint8Array:void 0,Uint8ClampedArray:"function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0,Int16Array:"function"==typeof Int16Array?Int16Array:void 0,Uint16Array:"function"==typeof Uint16Array?Uint16Array:void 0,Int32Array:"function"==typeof Int32Array?Int32Array:void 0,Uint32Array:"function"==typeof Uint32Array?Uint32Array:void 0,Float32Array:"function"==typeof Float32Array?Float32Array:void 0,Float64Array:"function"==typeof Float64Array?Float64Array:void 0},ar={Error:Error,EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},lr="function"==typeof ArrayBuffer,ur="function"==typeof Map,cr="function"==typeof Set,hr="function"==typeof Buffer,dr=Array.prototype.slice,fr={serialize:function(t){return JSON.stringify(t)},deserialize:function(t){return JSON.parse(t)}};function pr(t,e){this.references=t,this.transformMap=e,this.activeTransformsStack=[],this.visitedRefs=Object.create(null)}function mr(t){this.transforms=[],this.transformsMap=Object.create(null),this.serializer=t||fr,this.addTransforms(vr)}er._createRefMark=function(t){var e=Object.create(null);return e["@r"]=t,e},er.prototype._createCircularCandidate=function(t,e,n){this.circularCandidates.push(t),this.circularCandidatesDescrs.push({parent:e,key:n,refIdx:-1})},er.prototype._applyTransform=function(t,e,n,i){var r=Object.create(null),s=i.toSerializable(t);return"object"==typeof s&&this._createCircularCandidate(t,e,n),r["@t"]=i.type,r.data=this._handleValue(s,e,n),r},er.prototype._handleArray=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=this._handleValue(t[n],e,n);return e},er.prototype._handlePlainObject=function(n){var i=this,r=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){var e=sr.test(t)?"#"+t:t;r[e]=i._handleValue(n[t],r,e)}),r},er.prototype._handleObject=function(t,e,n){return this._createCircularCandidate(t,e,n),Array.isArray(t)?this._handleArray(t):this._handlePlainObject(t)},er.prototype._ensureCircularReference=function(t){var e=this.circularCandidates.indexOf(t);if(-1<e){var n=this.circularCandidatesDescrs[e];return-1===n.refIdx&&(n.refIdx=n.parent?++this.circularRefCount:0),er._createRefMark(n.refIdx)}return null},er.prototype._handleValue=function(t,e,n){var i=typeof t,r="object"==i&&null!==t;if(r){var s=this._ensureCircularReference(t);if(s)return s}for(var o=0;o<this.transforms.length;o++){var a=this.transforms[o];if(a.shouldTransform(i,t))return this._applyTransform(t,e,n,a)}return r?this._handleObject(t,e,n):t},er.prototype.transform=function(){for(var t=[this._handleValue(this.references,null,null)],e=0;e<this.circularCandidatesDescrs.length;e++){var n=this.circularCandidatesDescrs[e];0<n.refIdx&&(t[n.refIdx]=n.parent[n.key],n.parent[n.key]=er._createRefMark(n.refIdx))}return t},pr.prototype._handlePlainObject=function(e){var t,n=this,i=Object.create(null),r=Object.getOwnPropertyNames(e);for(t in r.forEach(function(t){n._handleValue(e[t],e,t),sr.test(t)&&(i[t.substring(1)]=e[t],delete e[t])}),i)e[t]=i[t]},pr.prototype._handleTransformedObject=function(t,e,n){var i=t["@t"],r=this.transformMap[i];if(!r)throw new Error("Can't find transform for \""+i+'" type.');this.activeTransformsStack.push(t),this._handleValue(t.data,t,"data"),this.activeTransformsStack.pop(),e[n]=r.fromSerializable(t.data)},pr.prototype._handleCircularSelfRefDuringTransform=function(t,e,n){var i=this.references,r=void 0;Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){return void 0===r&&(r=i[t]),r},set:function(t){return r=t}})},pr.prototype._handleCircularRef=function(t,e,n){-1<this.activeTransformsStack.indexOf(this.references[t])?this._handleCircularSelfRefDuringTransform(t,e,n):(this.visitedRefs[t]||(this.visitedRefs[t]=!0,this._handleValue(this.references[t],this.references,t)),e[n]=this.references[t])},pr.prototype._handleValue=function(t,e,n){if("object"==typeof t&&null!==t){var i=t["@r"];if(void 0!==i)this._handleCircularRef(i,e,n);else if(t["@t"])this._handleTransformedObject(t,e,n);else if(Array.isArray(t))for(var r=0;r<t.length;r++)this._handleValue(t[r],t,r);else this._handlePlainObject(t)}},pr.prototype.transform=function(){return this.visitedRefs[0]=!0,this._handleValue(this.references[0],this.references,0),this.references[0]};var vr=[{type:"[[NaN]]",shouldTransform:function(t,e){return"number"===t&&isNaN(e)},toSerializable:function(){return""},fromSerializable:function(){return NaN}},{type:"[[undefined]]",shouldTransform:function(t){return"undefined"===t},toSerializable:function(){return""},fromSerializable:function(){}},{type:"[[Date]]",shouldTransform:function(t,e){return e instanceof Date},toSerializable:function(t){return t.getTime()},fromSerializable:function(t){var e=new Date;return e.setTime(t),e}},{type:"[[RegExp]]",shouldTransform:function(t,e){return e instanceof RegExp},toSerializable:function(t){var e={src:t.source,flags:""};return t.global&&(e.flags+="g"),t.ignoreCase&&(e.flags+="i"),t.multiline&&(e.flags+="m"),e},fromSerializable:function(t){return new RegExp(t.src,t.flags)}},{type:"[[Error]]",shouldTransform:function(t,e){return e instanceof Error},toSerializable:function(t){return{name:t.name,message:t.message,stack:t.stack}},fromSerializable:function(t){var e=new(ar[t.name]||Error)(t.message);return e.stack=t.stack,e}},{type:"[[ArrayBuffer]]",shouldTransform:function(t,e){return lr&&e instanceof ArrayBuffer},toSerializable:function(t){var e=new Int8Array(t);return dr.call(e)},fromSerializable:function(t){if(lr){var e=new ArrayBuffer(t.length);return new Int8Array(e).set(t),e}return t}},{type:"[[Buffer]]",shouldTransform:function(t,e){return hr&&e instanceof Buffer},toSerializable:function(t){return dr.call(t)},fromSerializable:function(t){return hr?Buffer.from(t):t}},{type:"[[TypedArray]]",shouldTransform:function(t,e){return Object.keys(or).some(function(t){return tr(t)&&e instanceof or[t]})},toSerializable:function(t){return{ctorName:t.constructor.name,arr:dr.call(t)}},fromSerializable:function(t){return tr(t.ctorName)?new or[t.ctorName](t.arr):t.arr}},{type:"[[Map]]",shouldTransform:function(t,e){return ur&&e instanceof Map},toSerializable:function(t){var n=[];return t.forEach(function(t,e){n.push(e),n.push(t)}),n},fromSerializable:function(t){if(ur){for(var e=new Map,n=0;n<t.length;n+=2)e.set(t[n],t[n+1]);return e}for(var i=[],r=0;r<t.length;r+=2)i.push([t[r],t[r+1]]);return i}},{type:"[[Set]]",shouldTransform:function(t,e){return cr&&e instanceof Set},toSerializable:function(t){var e=[];return t.forEach(function(t){e.push(t)}),e},fromSerializable:function(t){if(cr){for(var e=new Set,n=0;n<t.length;n++)e.add(t[n]);return e}return t}}];function gr(t){return t}function yr(t){return new mr({serialize:gr,deserialize:gr}).addTransforms(t)}function _r(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}mr.prototype.addTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e];if(this.transformsMap[n.type])throw new Error('Transform with type "'+n.type+'" was already added.');this.transforms.push(n),this.transformsMap[n.type]=n}return this},mr.prototype.removeTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e],i=this.transforms.indexOf(n);-1<i&&this.transforms.splice(i,1),delete this.transformsMap[n.type]}return this},mr.prototype.encode=function(t){var e=new er(t,this.transforms).transform();return this.serializer.serialize(e)},mr.prototype.decode=function(t){var e=this.serializer.deserialize(t);return new pr(e,this.transformsMap).transform()};var Cr,br,Er="E1",wr="E4",Sr="E5",Tr="E9",xr="E10",Ir="E11",Ar="E12",Mr="E24",Br="E26",Nr="E27",Ur="E28",Rr="E29",Dr="E30",kr="E31",Vr="E32",Or="E33",Pr="E34",Fr="E35",$r="E36",Lr="E37",zr="E39",Hr="E40",Wr="E41",jr="E42",Gr="E43",qr="E44",Yr="E45",Xr="E46",Kr="E49",Jr="E50",Qr="E51",Zr="E52",ts="E57",es="E64",ns="E65",is="E68",rs="E69",ss="E70",os="E71",as="E72",ls="E73",us="E74",cs="E76",hs="E77",ds="E78",fs="E82",ps="E83",ms="E90",vs="E91",gs="E92",ys="E93",_s="E94",Cs="E95",bs="E97",Es="E99",ws="E100",Ss="E101",Ts="E102",xs=(Q(Is,Cr=_r),Is);function Is(t,e,n){var i=Cr.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function As(t,e){var n=br.call(this,Kr,e)||this;return n.instantiationCallsiteName=t,n}Q(As,br=_r);var Ms,Bs=(Q(Ns,Ms=_r),Ns);function Ns(t,e){var n=Ms.call(this,Jr,e)||this;return n.instantiationCallsiteName=t,n}var Us,Rs=(Q(Ds,Us=_r),Ds);function Ds(t,e,n){var i=void 0===e?{}:e,r=i.apiFnChain,s=i.apiFnIndex,o=i.reason,a=Us.call(this,t,n)||this;return a.apiFnChain=r,a.apiFnIndex=s,a.reason=o,a}var ks,Vs,Os,Ps=(Q(Fs,ks=_r),Fs);function Fs(t){return ks.call(this,Qr,t)||this}function $s(t,e){return Vs.call(this,Zr,e,t)||this}function Ls(t,e){var n=Os.call(this,Er)||this;return n.errStack=t,n.pageDestUrl=e,n}Q($s,Vs=Rs),Q(Ls,Os=_r);var zs,Hs=(Q(Ws,zs=_r),Ws);function Ws(t,e,n){var i=zs.call(this,wr,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}var js,Gs,qs,Ys,Xs,Ks,Js,Qs,Zs,to,eo,no,io,ro,so,oo,ao,lo,uo,co,ho,fo,po,mo,vo,go,yo,_o,Co,bo,Eo,wo,So,To,xo,Io,Ao,Mo,Bo,No,Uo,Ro,Do,ko,Vo,Oo,Po,Fo,$o,Lo,zo,Ho,Wo,jo=(Q(Go,js=_r),Go);function Go(t,e,n,i){var r=js.call(this,Sr,i)||this;return r.errMsg=String(e),r.property=n,r.instantiationCallsiteName=t,r}function qo(t){var e=Gs.call(this,es)||this;return e.errMsg=String(t),e}function Yo(t,e){var n=qs.call(this,ns)||this;return n.errMsg=String(t),n.moduleName=e,n}function Xo(t,e){return Ys.call(this,Tr,t,e)||this}function Ko(t,e){return Xs.call(this,xr,t,e)||this}function Jo(t,e){return Ks.call(this,Ir,t,e)||this}function Qo(t,e){return Js.call(this,Ar,t,e)||this}function Zo(t,e){return Qs.call(this,ms,t,e)||this}function ta(t,e){return Zs.call(this,bs,t,e)||this}function ea(t,e){return to.call(this,vs,t,e)||this}function na(t,e){return eo.call(this,gs,t,e)||this}function ia(t,e){return no.call(this,ys,t,e)||this}function ra(t,e){return io.call(this,_s,t,e)||this}function sa(t,e){return ro.call(this,Cs,t,e)||this}function oa(t,e){return so.call(this,Es,t,e)||this}function aa(t,e,n){var i=oo.call(this,ws)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function la(t,e){return ao.call(this,Mr,e,t)||this}function ua(t,e){return lo.call(this,Br,e,t)||this}function ca(t){var e=uo.call(this,Nr)||this;return e.nodeDescription=t,e}function ha(t,e){var n=co.call(this,Ur,e)||this;return n.argumentName=t,n}function da(t){return ho.call(this,Ss,t)||this}function fa(t,e){var n=fo.call(this,Rr,e)||this;return n.argumentName=t,n}function pa(t,e){var n=po.call(this,Dr)||this;return n.argumentName=t,n.nodeDescription=e,n}function ma(){return mo.call(this,kr)||this}function va(){return vo.call(this,Vr)||this}function ga(t){var e=go.call(this,Or)||this;return e.argumentName=t,e}function ya(){return yo.call(this,Fr)||this}function _a(t){var e=_o.call(this,$r)||this;return e.argumentName=t,e}function Ca(t,e){var n=Co.call(this,Lr)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function ba(){return bo.call(this,Pr)||this}function Ea(t,e){var n=Eo.call(this,Wr)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function wa(t,e){var n=wo.call(this,ts)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function Sa(t){return So.call(this,Hr,t)||this}function Ta(){return To.call(this,zr)||this}function xa(){return xo.call(this,jr)||this}function Ia(){return Io.call(this,rs)||this}function Aa(){return Ao.call(this,is)||this}function Ma(){return Mo.call(this,ss)||this}function Ba(){return Bo.call(this,os)||this}function Na(){return No.call(this,ls)||this}function Ua(){return Uo.call(this,fs)||this}function Ra(t){var e=Ro.call(this,ds)||this;return e.errMsg=t,e}function Da(){return Do.call(this,us)||this}function ka(){return ko.call(this,cs)||this}function Va(){return Vo.call(this,hs)||this}function Oa(){return Oo.call(this,as)||this}function Pa(){return Po.call(this,ps)||this}function Fa(){return Fo.call(this,Gr)||this}function $a(){return $o.call(this,qr)||this}function La(t,e){var n=Lo.call(this,Yr)||this;return n.dialogType=t,n.pageUrl=e,n}function za(t,e,n){var i=zo.call(this,Xr)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}function Ha(){return Ho.call(this,Ts)||this}Q(qo,Gs=_r),Q(Yo,qs=_r),Q(Xo,Ys=xs),Q(Ko,Xs=xs),Q(Jo,Ks=xs),Q(Qo,Js=xs),Q(Zo,Qs=xs),Q(ta,Zs=xs),Q(ea,to=xs),Q(na,eo=xs),Q(ia,no=xs),Q(ra,io=xs),Q(sa,ro=xs),Q(oa,so=xs),Q(aa,oo=_r),Q(la,ao=Rs),Q(ua,lo=Rs),Q(ca,uo=_r),Q(ha,co=Rs),Q(da,ho=_r),Q(fa,fo=Rs),Q(pa,po=_r),Q(ma,mo=_r),Q(va,vo=_r),Q(ga,go=_r),Q(ya,yo=_r),Q(_a,_o=_r),Q(Ca,Co=_r),Q(ba,bo=_r),Q(Ea,Eo=_r),Q(wa,wo=_r),Q(Sa,So=_r),Q(Ta,To=_r),Q(xa,xo=_r),Q(Ia,Io=_r),Q(Aa,Ao=_r),Q(Ma,Mo=_r),Q(Ba,Bo=_r),Q(Na,No=_r),Q(Ua,Uo=_r),Q(Ra,Ro=_r),Q(Da,Do=_r),Q(ka,ko=_r),Q(Va,Vo=_r),Q(Oa,Oo=_r),Q(Pa,Po=_r),Q(Fa,Fo=_r),Q($a,$o=_r),Q(La,Lo=_r),Q(za,zo=_r),Q(Ha,Ho=_r);var Wa=1,ja=2,Ga=3,qa=((Wo={})[Wa]=/^\.filterVisible\(\)$/,Wo[ja]=/^\.filterHidden\(\)$/,Wo[Ga]=/^\.nth\(\d+\)$/,Wo);function Ya(){this._err=null}var Xa=(Object.defineProperty(Ya.prototype,"error",{get:function(){return this._err},set:function(t){null===this._err&&(this._err=t)},enumerable:!1,configurable:!0}),Ya.prototype.filter=function(t,e,n){if(e.filterVisible&&(t=t.filter(c.positionUtils.isElementVisible),this._assertFilterError(t,n,Wa)),e.filterHidden&&(t=t.filter(function(t){return!c.positionUtils.isElementVisible(t)}),this._assertFilterError(t,n,ja)),e.counterMode)return null===e.index?t.length:Ya._getNodeByIndex(t,e.index)?1:0;var i;if(e.collectionMode)return null!==e.index&&(t=(i=Ya._getNodeByIndex(t,e.index))?[i]:[],this._assertFilterError(t,n,Ga)),t;var r=Ya._getNodeByIndex(t,e.index||0);return r||(this.error=Ya._getErrorItem(n,Ga)),r},Ya.prototype.cast=function(t){if(null==t)return[];if(t instanceof u.nativeMethods.Node)return[t];if(function(t){if(u.nativeMethods.isArray(t)){for(var e=0;e<t.length;e++)if(!(t[e]instanceof u.nativeMethods.Node))return;return 1}}(t))return t;if((e=t)instanceof u.nativeMethods.HTMLCollection||e instanceof u.nativeMethods.NodeList)return function(t){for(var e=t.length,n=[],i=0;i<e;i++)n.push(t[i]);return n}(t);var e;throw new Ps},Ya.prototype._assertFilterError=function(t,e,n){0===t.length&&(this.error=Ya._getErrorItem(e,n))},Ya._getErrorItem=function(t,e){var n=t.apiFnChain,i=t.apiFnID;if(e)for(var r=i;r<n.length;r++)if(qa[e].test(n[r]))return r;return null},Ya._getNodeByIndex=function(t,e){return e<0?t[t.length+e]:t[e]},new Ya);function Ka(t,e){return new u.nativeMethods.Function("fnCode","__dependencies$","Promise","RegExp",'"use strict"; return eval(fnCode)')(t,e,u.Promise,RegExp)}var Ja=(Qa.prototype.shouldTransform=function(t){return"function"===t},Qa.prototype.toSerializable=function(){return""},Qa.prototype.fromSerializable=function(t){var e=t.fnCode,n=t.dependencies;return"filterOptions"in n&&(n.selectorFilter=Xa),Ka(e,n)},Qa);function Qa(){this.type="Function"}var Za=(tl.prototype.shouldTransform=function(t,e){if(e instanceof u.nativeMethods.Node)throw new Bs(this._instantiationCallsiteName);return!1},tl.prototype.toSerializable=function(){},tl.prototype.fromSerializable=function(){},tl);function tl(t){this.type="Node",this._instantiationCallsiteName=t}var el=(nl.prototype.getResult=function(){var e=this;return u.Promise.resolve().then(function(){var t=e.replicator.decode(e.command.args);return e._executeFn(t)}).catch(function(t){throw t.isTestCafeError||(t=new Hs(e.command.instantiationCallsiteName,t)),t})},nl.prototype.encodeResult=function(t){return this.replicator.encode(t)},nl.prototype._createReplicator=function(){return yr([new Za(this.command.instantiationCallsiteName),new Ja])},nl.prototype._executeFn=function(t){return this.fn.apply(mu,t)},nl);function nl(t){this.command=t,this.replicator=this._createReplicator(),this.dependencies=this.replicator.decode(t.dependencies),this.fn=Ka(t.fnCode,this.dependencies)}var il=["nodeType","textContent","childNodeCount","hasChildNodes","childElementCount","hasChildElements"],rl=["tagName","attributes"],sl=["tagName","visible","focused","attributes","boundingClientRect","classNames","style","innerText","namespaceURI","id","value","checked","selected","selectedIndex","scrollWidth","scrollHeight","scrollLeft","scrollTop","offsetWidth","offsetHeight","offsetLeft","offsetTop","clientWidth","clientHeight","clientLeft","clientTop"];il.concat(sl);var ol={childNodeCount:function(t){return t.childNodes.length},hasChildNodes:function(t){return!!ol.childNodeCount(t)},childElementCount:function(t){var e;return(null===(e=t.children)||void 0===e?void 0:e.length)||0},hasChildElements:function(t){return!!ol.childElementCount(t)}},al=(ll.prototype._initializeProperties=function(t,e,n){for(var i=0,r=e;i<r.length;i++){var s=r[i],o=n[s];this[s]=o?o(t):t[s]}},ll);function ll(){}var ul,cl=(Q(hl,ul=al),hl);function hl(t){var e=ul.call(this)||this;return e._initializeProperties(t,il,ol),e}var dl,fl={tagName:function(t){return t.tagName.toLowerCase()},visible:function(t){return c.positionUtils.isElementVisible(t)},focused:function(t){return u.utils.dom.getActiveElement()===t},attributes:function(t){for(var e=t.attributes,n={},i=e.length-1;0<=i;i--)n[e[i].name]=e[i].value;return n},boundingClientRect:function(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width,height:e.height}},classNames:function(t){var e=t.className;return"string"==typeof e.animVal&&(e=e.animVal),e.replace(/^\s+|\s+$/g,"").split(/\s+/g)},style:function(t){for(var e={},n=mu.getComputedStyle(t),i=0;i<n.length;i++){var r=n[i];e[r]=n[r]}return e},innerText:function(t){return t.innerText}};function pl(t){var e=dl.call(this)||this;return e._initializeProperties(t,rl,fl),e}Q(pl,dl=al);var ml,vl=(Q(gl,ml=cl),gl);function gl(t){var e=ml.call(this,t)||this;return e._initializeProperties(t,sl,fl),e}var yl=(_l.prototype._extend=function(t,e){for(var n=0,i=u.nativeMethods.objectKeys(this._customDOMProperties);n<i.length;n++){var r=i[n];try{t[r]=this._customDOMProperties[r](e)}catch(t){throw new jo(this._instantiationCallsiteName,t,r)}}},_l.prototype.shouldTransform=function(t,e){return e instanceof u.nativeMethods.Node},_l.prototype.toSerializable=function(t){var e=new(1===t.nodeType?vl:cl)(t);return this._extend(e,t),e},_l.prototype.fromSerializable=function(){},_l);function _l(t,e){void 0===t&&(t={}),this.type="Node",this._customDOMProperties=t,this._instantiationCallsiteName=e}var Cl,bl=(Q(El,Cl=el),El.prototype._createReplicator=function(){return yr([new Ja])},El.prototype._getTimeoutErrorParams=function(t){return{apiFnIndex:Xa.error,apiFnChain:this.command.apiFnChain,reason:c.positionUtils.getHiddenReason(t)}},El.prototype._getTimeoutError=function(t){return t?this.createIsInvisibleError:this.createNotFoundError},El.prototype._validateElement=function(o,a){var l=this;return u.Promise.resolve().then(function(){return Cl.prototype._executeFn.call(l,o)}).then(function(t){var e=t,n=!!e,i=!l.command.visibilityCheck||e&&c.positionUtils.isElementVisible(e),r=u.nativeMethods.dateNow()-a>=l.timeout;if(n&&(i||u.utils.dom.isShadowRoot(e)))return e;if(!r)return c.delay(200).then(function(){return l._validateElement(o,a)});var s=l.getVisibleValueMode?null:l._getTimeoutError(n);if(s)throw s(l._getTimeoutErrorParams(e));return null})},El.prototype._executeFn=function(t){return this.counterMode?Cl.prototype._executeFn.call(this,t):this._validateElement(t,u.nativeMethods.dateNow())},El);function El(t,e,n,i,r){var s,o=Cl.call(this,t)||this;o.createNotFoundError=i,o.createIsInvisibleError=r,o.timeout="number"==typeof t.timeout?t.timeout:e,o.counterMode=o.dependencies.filterOptions.counterMode,o.getVisibleValueMode=o.dependencies.filterOptions.getVisibleValueMode,o.dependencies.selectorFilter=Xa,n&&(s=u.nativeMethods.dateNow()-n,o.timeout=Math.max(o.timeout-s,0));var a=o.dependencies.customDOMProperties;return o.replicator.addTransforms([new yl(a,t.instantiationCallsiteName)]),o}var wl={testCafeDriver:"%testCafeDriver%",testCafeIframeDriver:"%testCafeIframeDriver%",testCafeEmbeddingUtils:"%testCafeEmbeddingUtils%",testCafeDriverInstance:"%testCafeDriverInstance%"},Sl=5e3;function Tl(){return null}function xl(){return null}function Il(n){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){switch(t.label){case 0:return e=u.nativeMethods.date(),[4,new bl(n,Sl,e,Tl,xl).getResult()];case 1:return[2,t.sent()]}})})}function Al(e){return Z(this,void 0,void 0,function(){return tt(this,function(t){switch(t.label){case 0:return[4,function(n){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){return e=mu[wl.testCafeDriverInstance].communicationUrls,[2,c.browser.parseSelector(e.parseSelector,u.createNativeXHR,n)]})})}(e)];case 1:return[2,Il(t.sent()).catch(function(){return null})]}})})}var Ml=n.default.nativeMethods;function Bl(t){return Ml.isArray(t)?t:[t]}var Nl,Ul=n.default.eventSandbox.listeners,Rl=i.default.serviceUtils,Dl="list-changed",kl="selector-selected";function Vl(){var e=Nl.call(this)||this;return e._pickedSelectors=[],e.element=we(De),nr.on(Qi,function(t){e.pickedSelectors=t}),e}var Ol=(Q(Vl,Nl=Rl.EventEmitter),Object.defineProperty(Vl.prototype,"pickedSelectors",{get:function(){return this._pickedSelectors},set:function(t){void 0===t&&(t=[]),this._pickedSelectors!==t&&(this._pickedSelectors=t,this.emit(Dl,t))},enumerable:!1,configurable:!0}),Vl.prototype._renderSelectors=function(){var n=this;this.pickedSelectors.forEach(function(t){var e=we({text:t.value,class:"selector-value"});n.element.appendChild(e)}),this.renderedSelectors=this.pickedSelectors},Vl.prototype._clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.renderedSelectors=null},Vl.prototype._addClickListener=function(){var e=this,n=function(t){He(e.element),t.target.parentElement===e.element&&e.emit(kl,t.target.innerText),Ul.removeInternalEventBeforeListener(mu,["click"],n)};Ul.addFirstInternalEventBeforeListener(mu,["click"],n)},Vl.prototype.show=function(t){var e,n=t.left,i=t.bottom,r=t.width;this.pickedSelectors&&0!==this.pickedSelectors.length&&(this.pickedSelectors!==this.renderedSelectors&&(this._clear(),this._renderSelectors()),e={left:n+"px",bottom:i+"px",width:r+"px"},ze(this.element),Te(this.element,e),this._addClickListener())},Vl.prototype.clear=function(){this.pickedSelectors=null},new Vl),Pl=n.default.nativeMethods,Fl=n.default.shadowUI,$l=i.default.eventUtils,Ll="enabled",zl={notFound:"not-found",invalid:"invalid",ok:"ok"},Hl=(Object.defineProperty(Wl.prototype,"value",{get:function(){return Pl.inputValueGetter.call(this.input)},set:function(t){Pl.inputValueSetter.call(this.input,t)},enumerable:!1,configurable:!0}),Wl.prototype._createElements=function(){this.element=we(Be),this.input=we(Ie),this.indicator=we(Ae),this.expandButton=we(Me),this.element.appendChild(this.input),this.element.appendChild(this.indicator),this.element.appendChild(this.expandButton)},Wl.prototype._addEventListeners=function(){var e=this;$l.bind(this.expandButton,"click",function(){return e._expandSelectorsList()}),$l.bind(this.input,"input",function(){return e._onSelectorTyped()}),$l.bind(this.input,"focus",function(){return e._onFocusInput()}),$l.bind(this.input,"blur",function(){return Wi.stopHighlighting()}),Ol.on(Dl,function(t){e._updateExpandButton(t)}),Ol.on(kl,function(t){e._setSelectorInputValue({value:t})}),nr.on(Qi,function(t){e._setSelectorInputValue(t[0])})},Wl.prototype._setMatchIndicatorText=function(t){Pl.nodeTextContentSetter.call(this.indicator,t)},Wl.prototype._setMatchIndicatorClass=function(t){for(var e in zl)Fl.removeClass(this.indicator,zl[e]);Fl.addClass(this.indicator,t)},Wl.prototype._indicateMatches=function(t){return null===t?(this._setMatchIndicatorText("Invalid Selector"),void this._setMatchIndicatorClass(zl.invalid)):0===t.length?(this._setMatchIndicatorText("No Matching Elements"),void this._setMatchIndicatorClass(zl.notFound)):(this._setMatchIndicatorText("Found: ".concat(t.length)),void this._setMatchIndicatorClass(zl.ok))},Wl.prototype._highlightElements=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];Wi.highlight(i)}},Wl.prototype._setSelectorInputValue=function(t){this.value=t.value,this.input.focus()},Wl.prototype._expandSelectorsList=function(){var t=this.element.getBoundingClientRect(),e=t.left,n=t.top,i={left:e,width:t.width,bottom:vu.documentElement.clientHeight-n+1};Ol.show(i)},Wl.prototype._updateExpandButton=function(t){t&&t.length?Fl.addClass(this.expandButton,Ll):Fl.removeClass(this.expandButton,Ll)},Wl.prototype._onSelectorTyped=function(){Ol.clear(),this._onFocusInput()},Wl.prototype._onFocusInput=function(){return Z(this,void 0,void 0,function(){var e;return tt(this,function(t){switch(t.label){case 0:return Wi.stopHighlighting(),this.value?[4,Al(this.value)]:(this._indicateMatches([]),[2]);case 1:return e=t.sent(),this._indicateMatches(e),this._highlightElements(e),[2]}})})},Wl.prototype.debugSelector=function(i){return Z(this,void 0,void 0,function(){var e,n;return tt(this,function(t){switch(t.label){case 0:return Wi.stopHighlighting(),this.value=i.apiFnChain.join(""),n=Bl,[4,Il(i)];case 1:return e=n.apply(void 0,[t.sent()]),this._indicateMatches(e),this._highlightElements(e),[2]}})})},Wl);function Wl(){this._createElements(),this._addEventListeners()}var jl=n.default.nativeMethods,Gl=i.default.eventUtils,ql="Copy",Yl="Copied!",Xl=(Kl.prototype._copySelector=function(){var t,e;t=this.sourceElement.value,ze(e=we(Le)),e.value=t,e.select(),vu.execCommand("copy"),He(e),this._animate()},Kl.prototype._animate=function(){var t=this;this._changeAppearance(Yl,"bold"),jl.setTimeout.call(mu,function(){return t._resetAppearance()},1200)},Kl.prototype._resetAppearance=function(){this._changeAppearance(ql,"")},Kl.prototype._changeAppearance=function(t,e){jl.inputValueSetter.call(this.element,t),Te(this.element,{fontWeight:e})},Kl);function Kl(t){var e=this;this.element=we(Ne),this.sourceElement=t,Gl.bind(this.element,"click",function(){return e._copySelector()})}var Jl=n.default.nativeMethods,Ql=i.default.eventUtils,Zl=(tu.prototype._showAndHide=function(t){Jl.elementClassListGetter.call(t).toggle("selector-inspector-panel--hidden-hammerhead-shadow-ui")},tu);function tu(t){var e=this,n=we(Re);this.element=we(Ue),this.element.appendChild(n),this.element.appendChild(we(ke)),Ql.bind(this.element,"click",function(){return e._showAndHide(t)})}var eu=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this;this.element=we(Oe),t.forEach(function(t){return n.element.appendChild(t)})},nu=(iu.prototype.show=function(t){this.selectorInputContainer.debugSelector(t),this.element.parentElement||h.insertFirstChildToPanelsContainer(this.element),Te(this.element,{display:"flex"})},iu.prototype.hide=function(){Te(this.element,{display:"none"})},iu);function iu(){this.elementPicker=nr,this.element=we(Ve),this.selectorInputContainer=new Hl;var t=new rr,e=new Xl(this.selectorInputContainer),n=new eu(t.element,this.selectorInputContainer.element,e.element),i=new Zl(this.element);this.element.appendChild(n.element),this.element.appendChild(i.element)}var ru=n.default.Promise,su=n.default.eventSandbox.message,ou=i.default.sendRequestToFrame,au="ui|hide|request",lu="ui|hide|response",uu="ui|show|request",cu="ui|show|response";su.on(su.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===au?(h.hide(),su.sendServiceMsg({cmd:lu},t.source)):t.message.cmd===uu&&(h.show(),su.sendServiceMsg({cmd:cu},t.source))});var hu={};hu.uiRoot=h,hu.cursorUI=ye,hu.iframeCursorUI=_e,hu.selectElement=s,hu.modalBackground=V,hu.ProgressPanel=X,hu.StatusBar=Yt,hu.IframeStatusBar=Zt,hu.SelectorInspectorPanel=nu,hu.hide=function(t){return t?ou({cmd:au},lu,mu.top):(h.hide(),ru.resolve())},hu.show=function(t){return t?ou({cmd:uu},cu,mu.top):(h.show(),ru.resolve())},hu.showScreenshotMark=function(t){return Ce.show(t)},hu.hideScreenshotMark=function(){return Ce.hide()};var du=n.default.nativeMethods,fu=n.default.EVENTS.evalIframeScript;du.objectDefineProperty(mu,"%testCafeUI%",{configurable:!0,value:hu}),n.default.on(fu,function(t){return pu(du.contentWindowGetter.call(t.iframe))})}(mu["%hammerhead%"],mu["%testCafeCore%"],mu["%hammerhead%"].Promise)}(window);
Binary file
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SelectorNodeTransform = exports.FunctionTransform = exports.createReplicator = void 0;
7
7
  const lodash_1 = require("lodash");
8
- const replicator_1 = __importDefault(require("replicator"));
8
+ const replicator_1 = __importDefault(require("../utils/replicator"));
9
9
  const builder_symbol_1 = __importDefault(require("./builder-symbol"));
10
10
  const compile_client_function_1 = __importDefault(require("../compiler/compile-client-function"));
11
11
  function createReplicator(transforms) {
@@ -59,4 +59,4 @@ class SelectorNodeTransform {
59
59
  }
60
60
  }
61
61
  exports.SelectorNodeTransform = SelectorNodeTransform;
62
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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0aW9uKSxcbiAgICAgICAgICAgIGRlcGVuZGVuY2llczoge30sXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnJvbVNlcmlhbGl6YWJsZSAoKSB7XG4gICAgICAgIHJldHVybiB2b2lkIDA7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgU2VsZWN0b3JOb2RlVHJhbnNmb3JtIHtcbiAgICBjb25zdHJ1Y3RvciAoKSB7XG4gICAgICAgIHRoaXMudHlwZSA9ICdOb2RlJztcbiAgICB9XG5cbiAgICBzaG91bGRUcmFuc2Zvcm0gKCkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgZnJvbVNlcmlhbGl6YWJsZSAobm9kZVNuYXBzaG90KSB7XG4gICAgICAgIHJldHVybiBub2RlU25hcHNob3Q7XG4gICAgfVxufVxuIl19
@@ -4,7 +4,6 @@
4
4
  // Do not use any browser or node-specific API!
5
5
  // -------------------------------------------------------------
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- /* eslint-disable no-undef */
8
7
  function selectorAttributeFilter(node, index, originNode, attrName, attrValue) {
9
8
  if (node.nodeType !== 1)
10
9
  return false;
@@ -19,6 +18,5 @@ function selectorAttributeFilter(node, index, originNode, attrName, attrValue) {
19
18
  return false;
20
19
  }
21
20
  exports.default = selectorAttributeFilter;
22
- /* eslint-enable no-undef */
23
21
  module.exports = exports.default;
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0b3ItYXR0cmlidXRlLWZpbHRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbGllbnQtZnVuY3Rpb25zL3NlbGVjdG9ycy9zZWxlY3Rvci1hdHRyaWJ1dGUtZmlsdGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxnRUFBZ0U7QUFDaEUsZ0VBQWdFO0FBQ2hFLCtDQUErQzt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YXR0ciA9IGF0dHJpYnV0ZXNbaV07XG5cbiAgICAgICAgaWYgKGNoZWNrKGF0dHIubm9kZU5hbWUsIGF0dHJOYW1lKSAmJiAoIWF0dHJWYWx1ZSB8fCBjaGVjayhhdHRyLm5vZGVWYWx1ZSwgYXR0clZhbHVlKSkpXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICByZXR1cm4gZmFsc2U7XG59XG4iXX0=
@@ -4,7 +4,6 @@
4
4
  // Do not use any browser or node-specific API!
5
5
  // -------------------------------------------------------------
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- /* eslint-disable no-undef */
8
7
  function selectorTextFilter(node, index, originNode, textFilter) {
9
8
  function hasChildrenWithText(parentNode) {
10
9
  const cnCount = parentNode.childNodes.length;
@@ -38,6 +37,5 @@ function selectorTextFilter(node, index, originNode, textFilter) {
38
37
  return checkNodeText(node.textContent);
39
38
  }
40
39
  exports.default = selectorTextFilter;
41
- /* eslint-enable no-undef */
42
40
  module.exports = exports.default;
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0b3ItdGV4dC1maWx0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2xpZW50LWZ1bmN0aW9ucy9zZWxlY3RvcnMvc2VsZWN0b3ItdGV4dC1maWx0ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGdFQUFnRTtBQUNoRSxnRUFBZ0U7QUFDaEUsK0NBQStDO0FBQy9DLGdFQUFnRTs7QUFFaEUsNkJBQTZCO0FBQzdCLFNBQXdCLGtCQUFrQixDQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFFM0UsU0FBUyxtQkFBbUIsQ0FBRSxVQUFVO1FBQ3BDLE1BQU0sT0FBTyxHQUFHLFVBQVUsQ0FBQyxVQUFVLENBQUMsT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C8vIEVsZW1lbnRcbiAgICBpZiAobm9kZS5ub2RlVHlwZSA9PT0gMSkge1xuICAgICAgICAvLyBOT1RFOiBJbiBGaXJlZm94LCA8b3B0aW9uPiBlbGVtZW50cyBkb24ndCBoYXZlIGBpbm5lclRleHRgLlxuICAgICAgICAvLyBTbywgd2UgZmFsbGJhY2sgdG8gYHRleHRDb250ZW50YCBpbiB0aGF0IGNhc2UgKHNlZSBHSC04NjEpLlxuICAgICAgICAvLyBTVkcgZWxlbWVudHMgZG8gbm90IGhhdmUgYGlubmVyVGV4dGAgcHJvcGVydHkgYXMgd2VsbFxuICAgICAgICByZXR1cm4gY2hlY2tOb2RlVGV4dChub2RlLmlubmVyVGV4dCB8fCBub2RlLnRleHRDb250ZW50KTtcbiAgICB9XG5cbiAgICAvLyBEb2N1bWVudFxuICAgIGlmIChub2RlLm5vZGVUeXBlID09PSA5KSB7XG4gICAgICAgIGNvbnN0IGhlYWQgPSBub2RlLnF1ZXJ5U2VsZWN0b3IoJ2hlYWQnKTtcbiAgICAgICAgY29uc3QgYm9keSA9IG5vZGUucXVlcnlTZWxlY3RvcignYm9keScpO1xuXG4gICAgICAgIHJldHVybiBoYXNDaGlsZHJlbldpdGhUZXh0KGhlYWQsIHRleHRGaWx0ZXIpIHx8IGhhc0NoaWxkcmVuV2l0aFRleHQoYm9keSwgdGV4dEZpbHRlcik7XG4gICAgfVxuXG4gICAgLy8gRG9jdW1lbnRGcmFnbWVudFxuICAgIGlmIChub2RlLm5vZGVUeXBlID09PSAxMSlcbiAgICAgICAgcmV0dXJuIGhhc0NoaWxkcmVuV2l0aFRleHQobm9kZSwgdGV4dEZpbHRlcik7XG5cbiAgICByZXR1cm4gY2hlY2tOb2RlVGV4dChub2RlLnRleHRDb250ZW50KTtcbn1cbiJdfQ==
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
- const RequestHook = require('../api/request-hooks/hook');
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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ZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFyc1xudHlwZSBPcHRpb25WYWx1ZSA9IHVuZGVmaW5lZCB8IG51bGwgfCBzdHJpbmcgfCBib29sZWFuIHwgbnVtYmVyIHwgc3RyaW5nW10gfCBGdW5jdGlvbiB8IHsgW2tleTogc3RyaW5nXTogYW55IH0gfCBTY3JlZW5zaG90T3B0aW9uVmFsdWUgfCBRdWFyYW50aW5lT3B0aW9uVmFsdWUgfCBDb21waWxlck9wdGlvbnMgfCBHbG9iYWxIb29rcyB8IFNraXBKc0Vycm9yc09wdGlvblZhbHVlIHwgQ3VzdG9tQWN0aW9ucztcbiJdfQ==
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LXNjcmlwdC1pbml0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2N1c3RvbS1jbGllbnQtc2NyaXB0cy9jbGllbnQtc2NyaXB0LWluaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJlcXVlc3RGaWx0ZXJSdWxlSW5pdCB9IGZyb20gJ3Rlc3RjYWZlLWhhbW1lcmhlYWQnO1xuXG5pbnRlcmZhY2UgQ2xpZW50U2NyaXB0SW5pdCB7XG4gICAgcGF0aDogc3RyaW5nO1xuICAgIGNvbnRlbnQ6IHN0cmluZztcbiAgICBtb2R1bGU6IHN0cmluZztcbiAgICBwYWdlOiBSZXF1ZXN0RmlsdGVyUnVsZUluaXQ7XG59XG5cbi8vTk9URTogaHR0cHM6Ly9naXRodWIuY29tL01pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy8zMTk0XG5leHBvcnQgZGVmYXVsdCBDbGllbnRTY3JpcHRJbml0OyAvKmVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWYqL1xuIl19
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LXNjcmlwdC1pbml0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2N1c3RvbS1jbGllbnQtc2NyaXB0cy9jbGllbnQtc2NyaXB0LWluaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJlcXVlc3RGaWx0ZXJSdWxlSW5pdCB9IGZyb20gJ3Rlc3RjYWZlLWhhbW1lcmhlYWQnO1xuXG5pbnRlcmZhY2UgQ2xpZW50U2NyaXB0SW5pdCB7XG4gICAgcGF0aDogc3RyaW5nO1xuICAgIGNvbnRlbnQ6IHN0cmluZztcbiAgICBtb2R1bGU6IHN0cmluZztcbiAgICBwYWdlOiBSZXF1ZXN0RmlsdGVyUnVsZUluaXQ7XG59XG5cbi8vTk9URTogaHR0cHM6Ly9naXRodWIuY29tL01pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy8zMTk0XG5leHBvcnQgZGVmYXVsdCBDbGllbnRTY3JpcHRJbml0O1xuIl19
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvYmxlbWF0aWMtc2NyaXB0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jdXN0b20tY2xpZW50LXNjcmlwdHMvcHJvYmxlbWF0aWMtc2NyaXB0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IENsaWVudFNjcmlwdCBmcm9tICcuL2NsaWVudC1zY3JpcHQnO1xuXG5pbnRlcmZhY2UgUHJvYmxlbWF0aWNTY3JpcHRzIHtcbiAgICBkdXBsaWNhdGVkQ29udGVudDogQ2xpZW50U2NyaXB0W107XG4gICAgZW1wdHk6IENsaWVudFNjcmlwdFtdO1xufVxuXG4vL05PVEU6IGh0dHBzOi8vZ2l0aHViLmNvbS9NaWNyb3NvZnQvVHlwZVNjcmlwdC9pc3N1ZXMvMzE5NFxuZXhwb3J0IGRlZmF1bHQgUHJvYmxlbWF0aWNTY3JpcHRzOyAvKmVzbGludC1kaXNhYmxlLWxpbmUgbm8tdW5kZWYqL1xuIl19
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvYmxlbWF0aWMtc2NyaXB0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jdXN0b20tY2xpZW50LXNjcmlwdHMvcHJvYmxlbWF0aWMtc2NyaXB0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IENsaWVudFNjcmlwdCBmcm9tICcuL2NsaWVudC1zY3JpcHQnO1xuXG5pbnRlcmZhY2UgUHJvYmxlbWF0aWNTY3JpcHRzIHtcbiAgICBkdXBsaWNhdGVkQ29udGVudDogQ2xpZW50U2NyaXB0W107XG4gICAgZW1wdHk6IENsaWVudFNjcmlwdFtdO1xufVxuXG4vL05PVEU6IGh0dHBzOi8vZ2l0aHViLmNvbS9NaWNyb3NvZnQvVHlwZVNjcmlwdC9pc3N1ZXMvMzE5NFxuZXhwb3J0IGRlZmF1bHQgUHJvYmxlbWF0aWNTY3JpcHRzO1xuIl19
@@ -19,14 +19,14 @@ function getDuplicatedScripts(collection) {
19
19
  const duplicatedScripts = [];
20
20
  contentGroups.forEach(contentGroup => {
21
21
  const pageGroups = getScriptGroupValues(contentGroup, (s) => s.page.toString());
22
- if (pageGroups.length === 1 && testcafe_hammerhead_1.RequestFilterRule.isANY(pageGroups[0][0].page)) { /*eslint-disable-line no-extra-parens*/
22
+ if (pageGroups.length === 1 && testcafe_hammerhead_1.RequestFilterRule.isANY(pageGroups[0][0].page)) {
23
23
  duplicatedScripts.push(pageGroups[0][0]);
24
24
  return;
25
25
  }
26
- const forAllPagesGroup = pageGroups.find(pg => testcafe_hammerhead_1.RequestFilterRule.isANY(pg[0].page)); /*eslint-disable-line no-extra-parens*/
26
+ const forAllPagesGroup = pageGroups.find(pg => testcafe_hammerhead_1.RequestFilterRule.isANY(pg[0].page));
27
27
  if (forAllPagesGroup) {
28
28
  pageGroups
29
- .filter(pg => !testcafe_hammerhead_1.RequestFilterRule.isANY(pg[0].page)) /*eslint-disable-line no-extra-parens*/
29
+ .filter(pg => !testcafe_hammerhead_1.RequestFilterRule.isANY(pg[0].page))
30
30
  .forEach(pg => {
31
31
  duplicatedScripts.push(pg[0]);
32
32
  });
@@ -58,4 +58,4 @@ function findProblematicScripts(collection) {
58
58
  };
59
59
  }
60
60
  exports.findProblematicScripts = findProblematicScripts;
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3VzdG9tLWNsaWVudC1zY3JpcHRzL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLG1DQUErQjtBQUMvQiw2REFBMEU7QUFDMUUsb0VBQTJDO0FBRzNDLFNBQVMsb0JBQW9CLENBQUUsVUFBMEIsRUFBRSxnQkFBMEIsRUFBRSxlQUFtRTtJQUN0SixPQUFPLElBQUEsY0FBSyxFQUFDLFVBQVUsQ0FBQztTQUNuQixPQUFPLENBQUMsZ0JBQWdCLENBQUM7U0FDekIsTUFBTSxDQUFDLGVBQWUsQ0FBQztTQUN2QixNQUFNLEVBQUU7U0FDUixLQUFLLEVBQXNCLENBQU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jb25zdCBzY3JpcHRzV2l0aER1cGxpY2F0ZWRVcmxzID0gZ2V0RHVwbGljYXRlZFNjcmlwdHMoY29sbGVjdGlvbik7XG5cbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNjcmlwdHNXaXRoRHVwbGljYXRlZFVybHMubGVuZ3RoOyBpKyspXG4gICAgICAgIHNjcmlwdHNXaXRoRHVwbGljYXRlZFVybHNbaV0udXJsID0gc2NyaXB0c1dpdGhEdXBsaWNhdGVkVXJsc1tpXS51cmwgKyAnLScgKyBnZW5lcmF0ZVVuaXF1ZUlkKENsaWVudFNjcmlwdC5VUkxfVU5JUVVFX1BBUlRfTEVOR1RIKTtcblxuICAgIHJldHVybiBjb2xsZWN0aW9uO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZmluZFByb2JsZW1hdGljU2NyaXB0cyAoY29sbGVjdGlvbjogQ2xpZW50U2NyaXB0W10pOiBQcm9ibGVtYXRpY1NjcmlwdHMge1xuICAgIGNvbnN0IG5vbkVtcHR5U2NyaXB0cyAgICAgICAgICAgICAgPSBjb2xsZWN0aW9uLmZpbHRlcihzID0+ICEhcy5jb250ZW50KTtcbiAgICBjb25zdCBkdXBsaWNhdGVkQ29udGVudCAgICAgICAgICAgID0gZ2V0RHVwbGljYXRlZFNjcmlwdHMobm9uRW1wdHlTY3JpcHRzKTtcbiAgICBjb25zdCBlbXB0eSAgICAgICAgICAgICAgICAgICAgICAgID0gY29sbGVjdGlvbi5maWx0ZXIocyA9PiAhcy5jb250ZW50KTtcblxuICAgIHJldHVybiB7XG4gICAgICAgIGR1cGxpY2F0ZWRDb250ZW50LFxuICAgICAgICBlbXB0eSxcbiAgICB9O1xufVxuIl19
61
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY3VzdG9tLWNsaWVudC1zY3JpcHRzL3V0aWxzLnRzIl0sI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sZW5ndGggPT09IDEgJiYgUmVxdWVzdEZpbHRlclJ1bGUuaXNBTlkoKHBhZ2VHcm91cHNbMF1bMF0gYXMgQ2xpZW50U2NyaXB0KS5wYWdlKSkge1xuICAgICAgICAgICAgZHVwbGljYXRlZFNjcmlwdHMucHVzaChwYWdlR3JvdXBzWzBdWzBdIGFzIENsaWVudFNjcmlwdCk7XG5cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGZvckFsbFBhZ2VzR3JvdXAgPSBwYWdlR3JvdXBzLmZpbmQocGcgPT4gUmVxdWVzdEZpbHRlclJ1bGUuaXNBTlkoKHBnWzBdIGFzIENsaWVudFNjcmlwdCkucGFnZSkpO1xuXG4gICAgICAgIGlmIChmb3JBbGxQYWdlc0dyb3VwKSB7XG4gICAgICAgICAgICBwYWdlR3JvdXBzXG4gICAgICAgICAgICAgICAgLmZpbHRlcihwZyA9PiAhUmVxdWVzdEZpbHRlclJ1bGUuaXNBTlkoKHBnWzBdIGFzIENsaWVudFNjcmlwdCkucGFnZSkpXG4gICAgICAgICAgICAgICAgLmZvckVhY2gocGcgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkdXBsaWNhdGVkU2NyaXB0cy5wdXNoKHBnWzBdIGFzIENsaWVudFNjcmlwdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBwYWdlR3JvdXBzXG4gICAgICAgICAgICAgICAgLmZpbHRlcihwZyA9PiBwZy5sZW5ndGggPiAxKVxuICAgICAgICAgICAgICAgIC5mb3JFYWNoKHBnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgZHVwbGljYXRlZFNjcmlwdHMucHVzaChwZ1swXSBhcyBDbGllbnRTY3JpcHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gZHVwbGljYXRlZFNjcmlwdHM7XG59X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