Comparing version 0.0.21 to 0.0.22-alpha
@@ -1,2 +0,2 @@ | ||
!function(){function initTestCafeClientDrivers(window,isIFrameWithoutSrc){var document=window.document;!function(t){"use strict";var e,n,r,o,i,a={".js":[],".json":[],".css":[],".html":[]},s="function"==typeof require?require:null;return o=function(t){var e=new Error("Could not find module '"+t+"'");return e.code="MODULE_NOT_FOUND",e},i=function(t,e,n){var r,o;if("function"==typeof t[e+n])return e+n;for(r=0;o=a[n][r];++r)if("function"==typeof t[e+o])return e+o;return null},e=function(t,r,a,s,u,c){var l,f,d,h,m,p;for(a=a.split(/[\\/]/),l=a.pop(),"."!==l&&".."!==l||(a.push(l),l="");null!=(f=a.shift());)if(f&&"."!==f&&(".."===f?(t=r.pop(),c=c.slice(0,c.lastIndexOf("/"))):(r.push(t),t=t[f],c+="/"+f),!t))throw o(s);if(l&&"function"!=typeof t[l]&&(p=i(t,l,".js"),p||(p=i(t,l,".json")),p||(p=i(t,l,".css")),p||(p=i(t,l,".html")),p?l=p:2!==u&&"object"==typeof t[l]&&(r.push(t),t=t[l],c+="/"+l,l="")),!l)return 1!==u&&t[":mainpath:"]?e(t,r,t[":mainpath:"],s,1,c):e(t,r,"index",s,2,c);if(m=t[l],!m)throw o(s);return m.hasOwnProperty("module")?m.module.exports:(d={},m.module=h={exports:d,id:c+"/"+l},m.call(d,d,h,n(t,r,c)),h.exports)},r=function(n,r,i,a){var u,c=i,l=i.charAt(0),f=0;if("/"===l){if(c=c.slice(1),n=t["/"],!n){if(s)return s(i);throw o(i)}a="/",r=[]}else if("."!==l){if(u=c.split("/",1)[0],n=t[u],!n){if(s)return s(i);throw o(i)}a=u,r=[],c=c.slice(u.length+1),c||(c=n[":mainpath:"],c?f=1:(c="index",f=2))}return e(n,r,c,i,f,a)},(n=function(t,e,n){return function(o){return r(t,[].concat(e),o,n)}})(t,[],"")}({pinkie:{"index.js":function(t,e,n){function r(){for(var t=0;t<S.length;t++)S[t][0](S[t][1]);S=[],E=!1}function o(t,e){S.push([t,e]),E||(E=!0,b(r,0))}function i(t,e){function n(t){u(e,t)}function r(t){l(e,t)}try{t(n,r)}catch(o){r(o)}}function a(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n=w;try{r=o(r)}catch(a){l(i,a)}}s(i,r)||(n===w&&u(i,r),n===_&&l(i,r))}function s(t,e){var n;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"===("undefined"==typeof e?"undefined":v(e)))){var r=e.then;if("function"==typeof r)return r.call(e,function(r){n||(n=!0,e===r?c(t,r):u(t,r))},function(e){n||(n=!0,l(t,e))}),!0}}catch(o){return n||l(t,o),!0}return!1}function u(t,e){t!==e&&s(t,e)||c(t,e)}function c(t,e){t._state===g&&(t._state=y,t._data=e,o(d,t))}function l(t,e){t._state===g&&(t._state=y,t._data=e,o(h,t))}function f(t){t._then=t._then.forEach(a)}function d(t){t._state=w,f(t)}function h(t){t._state=_,f(t),!t._handled&&C&&global.process.emit("unhandledRejection",t._data,t)}function m(t){global.process.emit("rejectionHandled",t)}function p(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof p==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],i(t,this)}var E,v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},g="pending",y="settled",w="fulfilled",_="rejected",I=function(){},C="undefined"!=typeof global&&"undefined"!=typeof global.process&&"function"==typeof global.process.emit,b="undefined"==typeof setImmediate?setTimeout:setImmediate,S=[];p.prototype={constructor:p,_state:g,_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(I),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,this._state===_&&C&&o(m,this)),this._state===w||this._state===_?o(a,n):this._then.push(n),n.then},"catch":function(t){return this.then(null,t)}},p.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new p(function(e,n){function r(t){return a++,function(n){i[t]=n,--a||e(i)}}for(var o,i=[],a=0,s=0;s<t.length;s++)o=t[s],o&&"function"==typeof o.then?o.then(r(s),n):i[s]=o;a||e(i)})},p.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new p(function(e,n){for(var r,o=0;o<t.length;o++)r=t[o],r&&"function"==typeof r.then?r.then(e,n):e(r)})},p.resolve=function(t){return t&&"object"===("undefined"==typeof t?"undefined":v(t))&&t.constructor===p?t:new p(function(e){e(t)})},p.reject=function(t){return new p(function(e,n){n(t)})},e.exports=p}},replicator:{":mainpath:":"index.js","index.js":function(t,e,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o="@t",i="@r",a=/^#*@(t|r)$/,s=function(){var t=eval;return t("this")}(),u="function"==typeof ArrayBuffer,c="function"==typeof Map,l="function"==typeof Set,f=Array.prototype.slice,d={serialize:function(t){return JSON.stringify(t)},deserialize:function(t){return JSON.parse(t)}},h=function(t,e){this.references=t,this.transforms=e,this.circularCandidates=[],this.circularCandidatesDescrs=[],this.circularRefCount=0};h._createRefMark=function(t){var e=Object.create(null);return e[i]=t,e},h.prototype._createCircularCandidate=function(t,e,n){this.circularCandidates.push(t),this.circularCandidatesDescrs.push({parent:e,key:n,refIdx:-1})},h.prototype._applyTransform=function(t,e,n,i){var a=Object.create(null),s=i.toSerializable(t);return"object"===("undefined"==typeof s?"undefined":r(s))&&this._createCircularCandidate(t,e,n),a[o]=i.type,a.data=this._handleValue(s,e,n),a},h.prototype._handleArray=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=this._handleValue(t[n],e,n);return e},h.prototype._handlePlainObject=function(t){var e=Object.create(null);for(var n in t)if(t.hasOwnProperty(n)){var r=a.test(n)?"#"+n:n;e[r]=this._handleValue(t[n],e,r)}return e},h.prototype._handleObject=function(t,e,n){return this._createCircularCandidate(t,e,n),Array.isArray(t)?this._handleArray(t):this._handlePlainObject(t)},h.prototype._ensureCircularReference=function(t){var e=this.circularCandidates.indexOf(t);if(e>-1){var n=this.circularCandidatesDescrs[e];return-1===n.refIdx&&(n.refIdx=n.parent?++this.circularRefCount:0),h._createRefMark(n.refIdx)}return null},h.prototype._handleValue=function(t,e,n){var o="undefined"==typeof t?"undefined":r(t),i="object"===o&&null!==t;if(i){var a=this._ensureCircularReference(t);if(a)return a}for(var s=0;s<this.transforms.length;s++){var u=this.transforms[s];if(u.shouldTransform(o,t))return this._applyTransform(t,e,n,u)}return i?this._handleObject(t,e,n):t},h.prototype.transform=function(){for(var t=[this._handleValue(this.references,null,null)],e=0;e<this.circularCandidatesDescrs.length;e++){var n=this.circularCandidatesDescrs[e];n.refIdx>0&&(t[n.refIdx]=n.parent[n.key],n.parent[n.key]=h._createRefMark(n.refIdx))}return t};var m=function(t,e){this.references=t,this.transformMap=e,this.activeTransformsStack=[],this.visitedRefs=Object.create(null)};m.prototype._handlePlainObject=function(t){var e=Object.create(null);for(var n in t)t.hasOwnProperty(n)&&(this._handleValue(t[n],t,n),a.test(n)&&(e[n.substring(1)]=t[n],delete t[n]));for(var r in e)t[r]=e[r]},m.prototype._handleTransformedObject=function(t,e,n){var r=t[o],i=this.transformMap[r];if(!i)throw new Error("Can't find transform for \""+r+'" type.');this.activeTransformsStack.push(t),this._handleValue(t.data,t,"data"),this.activeTransformsStack.pop(),e[n]=i.fromSerializable(t.data)},m.prototype._handleCircularSelfRefDuringTransform=function(t,e,n){var r=this.references;Object.defineProperty(e,n,{val:void 0,configurable:!0,enumerable:!0,get:function(){return void 0===this.val&&(this.val=r[t]),this.val},set:function(t){this.val=t}})},m.prototype._handleCircularRef=function(t,e,n){this.activeTransformsStack.indexOf(this.references[t])>-1?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])},m.prototype._handleValue=function(t,e,n){if("object"===("undefined"==typeof t?"undefined":r(t))&&null!==t){var a=t[i];if(void 0!==a)this._handleCircularRef(a,e,n);else if(t[o])this._handleTransformedObject(t,e,n);else if(Array.isArray(t))for(var s=0;s<t.length;s++)this._handleValue(t[s],t,s);else this._handlePlainObject(t)}},m.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=s[t.name]||Error,n=new e(t.message);return n.stack=t.stack,n}},{type:"[[ArrayBuffer]]",shouldTransform:function(t,e){return u&&e instanceof ArrayBuffer},toSerializable:function(t){var e=new Int8Array(t);return f.call(e)},fromSerializable:function(t){if(u){var e=new ArrayBuffer(t.length),n=new Int8Array(e);return n.set(t),e}return t}},{type:"[[TypedArray]]",shouldTransform:function(t,e){return u&&(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)},toSerializable:function(t){return{ctorName:t.constructor.name,arr:f.call(t)}},fromSerializable:function(t){return u?new s[t.ctorName](t.arr):t.arr}},{type:"[[Map]]",shouldTransform:function(t,e){return c&&e instanceof Map},toSerializable:function(t){var e=[];return t.forEach(function(t,n){e.push(n),e.push(t)}),e},fromSerializable:function(t){if(c){for(var e=new Map,n=0;n<t.length;n+=2)e.set(t[n],t[n+1]);return e}for(var r=[],o=0;o<t.length;o+=2)r.push([t[n],t[n+1]]);return r}},{type:"[[Set]]",shouldTransform:function(t,e){return l&&e instanceof Set},toSerializable:function(t){var e=[];return t.forEach(function(t){e.push(t)}),e},fromSerializable:function(t){if(l){for(var e=new Set,n=0;n<t.length;n++)e.add(t[n]);return e}return t}}],E=e.exports=function(t){this.transforms=[],this.transformsMap=Object.create(null),this.serializer=t||d,this.addTransforms(p)};E.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},E.prototype.removeTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e],r=this.transforms.indexOf(n);r>-1&&this.transforms.splice(r,1),delete this.transformsMap[n.type]}return this},E.prototype.encode=function(t){var e=new h(t,this.transforms),n=e.transform();return this.serializer.serialize(n)},E.prototype.decode=function(t){var e=this.serializer.deserialize(t),n=new m(e,this.transformsMap);return n.transform()}}},testcafe:{src:{"browser-connection":{"command.js":function(t,e,n){t.__esModule=!0,t["default"]={run:"run",idle:"idle"},e.exports=t["default"]}},client:{browser:{"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return new c["default"](function(n,r){var o=e();o.open("GET",t,!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?n(o.responseText?JSON.parse(o.responseText):""):r("disconnected"))},o.send(null)})}function i(t){return document.location.href.toLowerCase()===t.toLowerCase()}function a(t,e){o(t,e),window.setInterval(function(){return o(t,e)},d)}function s(t,e){return o(t,e).then(function(t){return(t.cmd===f["default"].run||t.cmd===f["default"].idle&&!i(t.url))&&(document.location=t.url),t.cmd})}t.__esModule=!0,t.startHeartbeat=a,t.checkStatus=s;var u=n("pinkie"),c=r(u),l=n("../../browser-connection/command"),f=r(l),d=3e4}},driver:{"command-executors":{"client-functions":{"client-function-executor.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../../deps/hammerhead"),a=n("../../status"),s=r(a),u=n("./replicator"),c=n("./eval-function"),l=r(c),f=n("../../../../errors/test-run"),d=function(){function t(e){o(this,t),this.command=e,this.replicator=this._createReplicator()}return t.prototype.getResult=function(){var t=this;return i.Promise.resolve().then(function(){var e=t.replicator.decode(t.command.scopeVars);return(0,l["default"])(t.command.fnCode,e)}).then(function(e){var n=t.replicator.decode(t.command.args);return t._executeFn(e,n)})["catch"](function(e){throw e.isTestCafeError||(e=new f.UncaughtErrorInClientFunctionCode(t.command.instantiationCallsiteName,e)),e})},t.prototype.getResultDriverStatus=function(){var t=this;return this.getResult().then(function(e){return new s["default"]({isCommandResult:!0,result:t.replicator.encode(e)})})["catch"](function(t){return new s["default"]({isCommandResult:!0,executionError:t})})},t.prototype._createReplicator=function(){return(0,u.createReplicator)([new u.ClientFunctionNodeTransform(this.command.instantiationCallsiteName),new u.FunctionTransform])},t.prototype._executeFn=function(t,e){return t.apply(window,e)},t}();t["default"]=d,e.exports=t["default"]},"eval-function.js":function(exports,module,require){function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function evalFunction(fnCode,scopeVars){"use strict";return eval(fnCode)}exports.__esModule=!0,exports["default"]=evalFunction;var _hammerhead=require("../../deps/hammerhead"),_hammerhead2=_interopRequireDefault(_hammerhead),Promise=_hammerhead2["default"].Promise;module.exports=exports["default"]},"node-snapshots.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function u(t){var e="("+t.toString()+")";return e=(0,c.processScript)(e,!1),(0,d["default"])(e,null)}t.__esModule=!0,t.ElementSnapshot=t.NodeSnapshot=void 0;var c=n("../../deps/hammerhead"),l=n("../../deps/testcafe-core"),f=n("./eval-function"),d=r(f),h=new RegExp(s(c.PROCESSING_COMMENTS.scriptStart)+".*?"+s(c.PROCESSING_COMMENTS.scriptEnd),"g"),m=new RegExp(s(c.PROCESSING_COMMENTS.stylesheetStart)+".*?"+s(c.PROCESSING_COMMENTS.stylesheetEnd),"g"),p=u(function(t){return t.attributes}),E=u(function(t){return t.childNodes}),v=u(function(t){return t.children}),g=u(function(t){return t.textContent}),y=u(function(t){return t.className}),w=u(function(t){return t.innerText}),_=t.NodeSnapshot=function(){function t(e){a(this,t),this.nodeType=e.nodeType,this.textContent=g(e),this.childNodeCount=E(e).length,this.hasChildNodes=!!this.childNodeCount,this.childElementCount=t._getChildElementCount(e),this.hasChildElements=!!this.childElementCount}return t._getChildElementCount=function(t){var e=v(t);if(e)return e.length;for(var n=0,r=t.childNodes.length,o=0;r>o;o++)1===t.childNodes[o].nodeType&&n++;return n},t}();t.ElementSnapshot=function(t){function e(n){a(this,e);var r=o(this,t.call(this,n));return r.tagName=n.tagName.toLowerCase(),r.visible=l.positionUtils.isElementVisible(n),r.focused=document.activeElement===n,r.attributes=e._getAttrsDictionary(n),r.boundingClientRect=e._getBoundingClientRect(n),r.classNames=e._getClassNames(n),r.style=e._getStyle(n),r.innerText=e._getInnerText(n),["namespaceURI","id","value","checked","scrollWidth","scrollHeight","scrollLeft","scrollTop","offsetWidth","offsetHeight","offsetLeft","offsetTop","clientWidth","clientHeight","clientLeft","clientTop"].forEach(function(t){return r[t]=n[t]}),r}return i(e,t),e._getBoundingClientRect=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}},e._getClassNames=function(t){var e=y(t);return e="string"==typeof e.animVal?e.animVal:e,e.replace(/^\s+|\s+$/g,"").split(/\s+/g)},e._getAttrsDictionary=function(t){for(var e=p(t),n={},r=e.length-1;r>=0;r--)n[e[r].name]=e[r].value;return n},e._getStyle=function(t){for(var e={},n=window.getComputedStyle(t),r=0;r<n.length;r++){var o=n[r];e[o]=n[o]}return e},e._getInnerText=function(t){var e=w(t);return e&&e.replace(h,"").replace(m,"").replace(/\r\n/g,"\n")},e}(_)},"replicator.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=new s["default"]({serialize:h,deserialize:h});return e.addTransforms(t)}t.__esModule=!0,t.ClientFunctionNodeTransform=t.SelectorNodeTransform=t.FunctionTransform=void 0,t.createReplicator=i;var a=n("replicator"),s=r(a),u=n("./eval-function"),c=r(u),l=n("./node-snapshots"),f=n("../../../../errors/test-run"),d=window.Node,h=function(t){return t};t.FunctionTransform=function(){function t(){o(this,t),this.type="Function"}return t.prototype.shouldTransform=function(t){return"function"===t},t.prototype.toSerializable=function(){return""},t.prototype.fromSerializable=function(t){var e=t.fnCode,n=t.scopeVars;return(0,c["default"])(e,n)},t}(),t.SelectorNodeTransform=function(){function t(){o(this,t),this.type="Node"}return t.prototype.shouldTransform=function(t,e){return e instanceof d},t.prototype.toSerializable=function(t){return 1===t.nodeType?new l.ElementSnapshot(t):new l.NodeSnapshot(t)},t}(),t.ClientFunctionNodeTransform=function(){function t(e){o(this,t),this.type="Node",this.instantiationCallsiteName=e}return t.prototype.shouldTransform=function(t,e){if(e instanceof d)throw new f.DomNodeClientFunctionResultError(this.instantiationCallsiteName)},t}()},"selector-executor.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return!!t}function u(t){return l.positionUtils.isElementVisible(t)}t.__esModule=!0;var c=n("../../deps/hammerhead"),l=n("../../deps/testcafe-core"),f=n("../../deps/testcafe-ui"),d=n("./client-function-executor"),h=r(d),m=n("./replicator"),p=n("../../../../errors/test-run"),E=200,v="Waiting for an element to appear",g=window.Node,y=function(t){function e(n,r,a,s,u){o(this,e);var c=i(this,t.call(this,n));if(c.createNotFoundError=s,c.createIsInvisibleError=u,c.timeout="number"==typeof n.timeout?n.timeout:r,a){var l=new Date-a;c.timeout=Math.max(c.timeout-l,0)}return c}return a(e,t),e.prototype._createReplicator=function(){return(0,m.createReplicator)([new m.SelectorNodeTransform,new m.FunctionTransform])},e.prototype._checkElement=function(t,e,n,r,o){if(n(t))return t;var i=new Date-e>=this.timeout;if(i){if(r)throw r();return null}return(0,l.delay)(E).then(o)},e.prototype._ensureExists=function(t,e,n){var r=this,o=function(){return r._ensureExists(t,e,n)};return c.Promise.resolve().then(function(){return t.apply(window,e)}).then(function(t){if(!(t instanceof g)&&null!==t&&void 0!==t)throw new p.NonDomNodeSelectorResultError(r.command.instantiationCallsiteName);return r._checkElement(t,n,s,r.createNotFoundError,o)})},e.prototype._ensureVisible=function(t,e){var n=this,r=function(){return n._ensureVisible(t,e)};return this._checkElement(t,e,u,this.createIsInvisibleError,r)},e.prototype._executeFn=function(t,e){var n=this,r=new Date,o=new f.ProgressPanel;return o.show(v,this.timeout),this._ensureExists(t,e,r).then(function(t){return t&&n.command.visibilityCheck?n._ensureVisible(t,r):t})["catch"](function(t){throw o.close(!1),t}).then(function(t){return o.close(!!t),t})},e}(h["default"]);t["default"]=y,e.exports=t["default"]}},"execute-action.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(!E.domUtils.isEditableElement(t))throw new x.ActionElementNonEditableError}function i(t){if(!E.domUtils.isTextAreaElement(t))throw new x.ActionElementNotTextAreaError}function a(t,e){if(!E.domUtils.isContentEditableElement(t))throw new x.ActionElementNonContentEditableError(e)}function s(t){if(!E.contentEditable.getNearestCommonAncestor(t[0],t[1]))throw new x.ActionRootContainerNotFoundError;return t}function u(t){if(!E.domUtils.isFileInput(t))throw new x.ActionElementIsNotFileInputError}function c(t,e){t.type===b["default"].selectText?o(e[0]):t.type===b["default"].selectTextAreaContent?i(e[0]):t.type===b["default"].selectEditableContent?(a(e[0],"startSelector"),a(e[1],"endSelector"),s(e)):t.type!==b["default"].setFilesToUpload&&t.type!==b["default"].clearUpload||u(e[0])}function l(t,e){var n=[],r=p.Promise.resolve(),o=new Date,i=function(t,i,a){r=r.then(function(){var n=new I["default"](t,e,o,i,a);return n.getResult()}).then(function(t){return n.push(t)})};return t.selector&&i(t.selector,function(){return new x.ActionElementNotFoundError},function(){return new x.ActionElementIsInvisibleError}),t.type===b["default"].dragToElement?i(t.destinationSelector,function(){return new x.ActionAdditionalElementNotFoundError("destinationSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("destinationSelector")}):t.type===b["default"].selectEditableContent&&(i(t.startSelector,function(){return new x.ActionAdditionalElementNotFoundError("startSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("startSelector")}),i(t.endSelector||t.startSelector,function(){return new x.ActionAdditionalElementNotFoundError("endSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("endSelector")})),r.then(function(){return c(t,n),n})}function f(t){if(t.type===b["default"].pressKey){var e=k(t.keys);if(e.error)throw new x.ActionIncorrectKeysError("keys")}}function d(t,e){var n=(0,S.getOffsetOptions)(t,e.offsetX,e.offsetY),r=n.offsetX,o=n.offsetY;e.offsetX=r,e.offsetY=o}function h(t,e){var n=null;switch(e.options&&"offsetX"in e.options&&"offsetY"in e.options&&d(t[0],e.options),e.type){case b["default"].click:return new N(t[0],e.options);case b["default"].rightClick:return new A(t[0],e.options);case b["default"].doubleClick:return new T(t[0],e.options);case b["default"].hover:return new F(t[0],e.options);case b["default"].drag:return new M(t[0],e.dragOffsetX,e.dragOffsetY,e.options);case b["default"].dragToElement:return new R(t[0],t[1],e.options);case b["default"].typeText:return new O(t[0],e.text,e.options);case b["default"].selectText:case b["default"].selectTextAreaContent:return n=U(t[0],e),new P(t[0],n.startPos,n.endPos);case b["default"].selectEditableContent:return new j(t[0],t[1]);case b["default"].pressKey:return new D(k(e.keys).combinations);case b["default"].setFilesToUpload:return new L(t[0],e.filePath,function(t){return new x.ActionCanNotFindFileToUploadError(t)});case b["default"].clearUpload:return new L(t[0])}}function m(t,e){var n=null,r=new p.Promise(function(t){return n=t}),o=new p.Promise(function(r){var o=null;l(t,e).then(function(e){return n(),o=new E.RequestBarrier,f(t),h(e,t).run()}).then(function(){return p.Promise.all([o.wait(),E.pageUnloadBarrier.wait()])}).then(function(){return r(new w["default"]({isCommandResult:!0}))})["catch"](function(t){var e=t.message===V.elementIsInvisibleError?new x.ActionElementIsInvisibleError:t;return r(new w["default"]({isCommandResult:!0,executionError:e}))})});return{startPromise:r,completionPromise:o}}t.__esModule=!0,t["default"]=m;var p=n("../deps/hammerhead"),E=n("../deps/testcafe-core"),v=n("../deps/testcafe-runner"),g=r(v),y=n("../status"),w=r(y),_=n("./client-functions/selector-executor"),I=r(_),C=n("../../../test-run/commands/type"),b=r(C),S=n("../../runner/utils/mouse"),x=n("../../../errors/test-run"),N=g["default"].get("./automation/playback/click"),A=g["default"].get("./automation/playback/rclick"),T=g["default"].get("./automation/playback/dblclick"),M=g["default"].get("./automation/playback/drag/to-offset"),R=g["default"].get("./automation/playback/drag/to-element"),F=g["default"].get("./automation/playback/hover"),O=g["default"].get("./automation/playback/type"),P=g["default"].get("./automation/playback/select/select-text"),j=g["default"].get("./automation/playback/select/select-editable-content"),D=g["default"].get("./automation/playback/press"),k=g["default"].get("./automation/playback/press/parse-key-sequence"),U=g["default"].get("./automation/playback/select/get-select-position-arguments"),L=g["default"].get("./automation/playback/upload"),V=g["default"].get("./automation/errors");e.exports=t["default"]},"execute-navigate-to.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=new d;return a["default"].navigateTo(t.url),f.all([e.wait(),h.wait()]).then(function(){return new l["default"]({isCommandResult:!0})})["catch"](function(t){return new l["default"]({isCommandResult:!0,executionError:t})})}t.__esModule=!0,t["default"]=o;var i=n("../deps/hammerhead"),a=r(i),s=n("../deps/testcafe-core"),u=r(s),c=n("../status"),l=r(c),f=a["default"].Promise,d=u["default"].RequestBarrier,h=u["default"].pageUnloadBarrier;e.exports=t["default"]},"prepare-browser-manipulation.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=document.title,n="[ "+t+" ]",r=null,o=null;return r=h.setInterval.call(window,function(){document.title!==n&&(e=document.title,document.title=n)},E),document.title=n,p(v).then(function(){var t={cmd:l["default"].readyForBrowserManipulation,currentWidth:window.innerWidth,currentHeight:window.innerHeight};return m.queuedAsyncServiceMsg(t)}).then(function(t){return o=t,h.clearInterval.call(window,r),document.title=e,p(g)}).then(function(){return new d["default"]({isCommandResult:!0,result:o})})}t.__esModule=!0,t["default"]=o;var i=n("../deps/hammerhead"),a=r(i),s=n("../deps/testcafe-core"),u=r(s),c=n("../../../test-run/client-messages"),l=r(c),f=n("../status"),d=r(f),h=a["default"].nativeMethods,m=a["default"].transport,p=u["default"].delay,E=50,v=500,g=100;e.exports=t["default"]}},deps:{"hammerhead.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%hammerhead%"],e.exports=t["default"]},"testcafe-core.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeCore%"],e.exports=t["default"]},"testcafe-runner.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeRunner%"],e.exports=t["default"]},"testcafe-ui.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeUI%"],e.exports=t["default"]}},"driver-link":{"child.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../deps/hammerhead"),a=n("../deps/testcafe-core"),s=n("../../../errors/test-run"),u=n("./send-message-to-driver"),c=r(u),l=n("./messages"),f=n("../status"),d=r(f),h=1e3,m=200,p=500,E=function(){function t(e,n,r){o(this,t),this.driverWindow=e,this.driverIframe=a.domUtils.findIframeByWindow(e),this.driverId=n,this.iframeAvailabilityTimeout=r}return t.prototype._ensureIframe=function(){var t=this;return a.domUtils.isElementInDocument(this.driverIframe)?(0,a.waitFor)(function(){return a.positionUtils.isElementVisible(t.driverIframe)?t.driverIframe:null},m,this.iframeAvailabilityTimeout)["catch"](function(){throw new s.CurrentIframeIsInvisibleError}):i.Promise.reject(new s.CurrentIframeNotFoundError)},t.prototype._waitForIframeRemovedOrHidden=function(){var t=this;return new i.Promise(function(e){t.checkIframeInterval=i.nativeMethods.setInterval.call(window,function(){t._ensureIframe()["catch"](function(){return(0,a.delay)(p).then(function(){return e(new d["default"]({isCommandResult:!0}))})})},h)})},t.prototype._waitForCommandResult=function(){var t=this,e=null,n=function(){return new i.Promise(function(t){e=function(e){e.message.type===l.TYPE.commandExecuted&&t(e.message.driverStatus)},i.eventSandbox.message.on(i.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,e)})};return i.Promise.race([this._waitForIframeRemovedOrHidden(),n()]).then(function(n){return i.eventSandbox.message.off(i.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,e),i.nativeMethods.clearInterval.call(window,t.checkIframeInterval),n})},t.prototype.confirmConnectionEstablished=function(t){var e=new l.ConfirmationMessage(t,{id:this.driverId});i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t.prototype.executeCommand=function(t){var e=this;return this._ensureIframe().then(function(){var n=new l.ExecuteCommandMessage(t);return i.Promise.all([(0,c["default"])(n,e.driverWindow,e.timeout,s.CurrentIframeIsNotLoadedError),e._waitForCommandResult()])}).then(function(t){return t[1]})},t}();t["default"]=E,e.exports=t["default"]},"messages.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.ConfirmationMessage=t.ExecuteCommandMessage=t.CommandExecutedMessage=t.EstablishConnectionMessage=t.TYPE=void 0;var s=n("../generate-id"),u=r(s),c=t.TYPE={establishConnection:"driver|establish-connection",commandExecuted:"driver|command-executed",executeCommand:"driver|execute-command",confirmation:"driver|confirmation"},l=function f(t){a(this,f),this.type=t,this.id=(0,u["default"])()};t.EstablishConnectionMessage=function(t){function e(){return a(this,e),o(this,t.call(this,c.establishConnection))}return i(e,t),e}(l),t.CommandExecutedMessage=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c.commandExecuted));return r.driverStatus=n,r}return i(e,t),e}(l),t.ExecuteCommandMessage=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c.executeCommand));return r.command=n,r}return i(e,t),e}(l),t.ConfirmationMessage=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c.confirmation));return i.requestMessageId=n,i.result=r,i}return i(e,t),e}(l)},"parent.js":function(t,e,n){ | ||
function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../deps/hammerhead"),a=n("./messages"),s=n("../../../errors/test-run"),u=n("./send-message-to-driver"),c=r(u),l=5e3,f=function(){function t(e){o(this,t),this.driverWindow=e}return t.prototype.establishConnection=function(){var t=new a.EstablishConnectionMessage;return(0,c["default"])(t,this.driverWindow,l,s.CurrentIframeIsNotLoadedError).then(function(t){return t.result.id})},t.prototype.confirmMessageReceived=function(t){var e=new a.ConfirmationMessage(t);i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t.prototype.onCommandExecuted=function(t){var e=new a.CommandExecutedMessage(t);i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t}();t["default"]=f,e.exports=t["default"]},"send-message-to-driver.js":function(t,e,n){function r(t,e,n,r){var c=null,l=null,f=null;n=Math.max(n||0,s);var d=function(){return new o.Promise(function(n){f=function(e){e.message.type===a.TYPE.confirmation&&e.message.requestMessageId===t.id&&n(e.message)},o.eventSandbox.message.on(o.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,f),c=o.nativeMethods.setInterval.call(window,function(){return o.eventSandbox.message.sendServiceMsg(t,e)},u),o.eventSandbox.message.sendServiceMsg(t,e)})};return o.Promise.race([(0,i.delay)(n),d()]).then(function(t){if(o.nativeMethods.clearInterval.call(window,c),o.nativeMethods.clearTimeout.call(window,l),o.eventSandbox.message.off(o.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,f),!t)throw new r;return t})}t.__esModule=!0,t["default"]=r;var o=n("../deps/hammerhead"),i=n("../deps/testcafe-core"),a=n("./messages"),s=2500,u=1e3;e.exports=t["default"]}},"driver.js":function(t,e,n){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=n("./deps/hammerhead"),s=o(a),u=n("./deps/testcafe-core"),c=n("./deps/testcafe-ui"),l=n("../../test-run/client-messages"),f=o(l),d=n("../../test-run/commands/type"),h=o(d),m=n("../../errors/test-run"),p=n("../browser"),E=r(p),v=n("./driver-link/messages"),g=n("./storage"),y=o(g),w=n("./status"),_=o(w),I=n("./generate-id"),C=o(I),b=n("./driver-link/child"),S=o(b),x=n("./command-executors/prepare-browser-manipulation"),N=o(x),A=n("./command-executors/execute-action"),T=o(A),M=n("./command-executors/execute-navigate-to"),R=o(M),F=n("./command-executors/client-functions/client-function-executor"),O=o(F),P=n("./command-executors/client-functions/selector-executor"),j=o(P),D=s["default"].transport,k=s["default"].Promise,U=s["default"].eventSandbox.message,L="testcafe|driver|test-done-sent-flag",V="testcafe|driver|pending-status",G="testcafe|driver|executing-client-function-descriptor",z="testcafe|driver|selector-execution-start-time",B="testcafe|driver|pending-page-error",W="testcafe|driver|active-iframe-selector",X=500,Y={NotLoadedError:m.ActionIframeIsNotLoadedError,NotFoundError:m.ActionElementNotFoundError,IsInvisibleError:m.ActionElementIsInvisibleError},q={NotLoadedError:m.CurrentIframeIsNotLoadedError,NotFoundError:m.CurrentIframeNotFoundError,IsInvisibleError:m.CurrentIframeIsInvisibleError},K=new k(u.noop),H=function(){function t(e,n,r,o){var a=this;i(this,t),this.COMMAND_EXECUTING_FLAG="testcafe|driver|command-executing-flag",this.EXECUTING_IN_IFRAME_FLAG="testcafe|driver|executing-in-iframe-flag",this.testRunId=e,this.selectorTimeout=n,this.heartbeatUrl=r,this.browserStatusUrl=o,this.contextStorage=null,this.childDriverLinks=[],this.activeChildDriverLink=null,this.beforeUnloadRaised=!1,this.pageInitialRequestBarrier=new u.RequestBarrier,this.readyPromise=u.eventUtils.documentReady().then(function(){return a.pageInitialRequestBarrier.wait(!0)}),this._initChildDriverListening(),u.pageUnloadBarrier.init(),(0,u.preventRealEvents)(),s["default"].on(s["default"].EVENTS.uncaughtJsError,function(t){return a._onJsError(t)}),s["default"].on(s["default"].EVENTS.beforeUnload,function(){return a.beforeUnloadRaised=!0})}return t.prototype._onJsError=function(t){if(this.contextStorage.getItem(L))return k.resolve();var e=new m.UncaughtErrorOnPage(t.msg||t.message,t.pageUrl);this.contextStorage.getItem(B)||this.contextStorage.setItem(B,e)},t.prototype._failIfClientCodeExecutionIsInterrupted=function(){var t=this.contextStorage.getItem(G);return t?(this._onReady(new _["default"]({isCommandResult:!0,executionError:new m.ClientFunctionExecutionInterruptionError(t.instantiationCallsiteName)})),!0):!1},t.prototype._addPendingErrorToStatus=function(t){var e=this.contextStorage.getItem(B);e&&(this.contextStorage.setItem(B,null),t.pageError=e)},t.prototype._sendStatus=function(t){var e=this;return this._addPendingErrorToStatus(t),this.contextStorage.setItem(V,t),this.beforeUnloadRaised?K:D.queuedAsyncServiceMsg({cmd:f["default"].ready,status:t}).then(function(t){return e.beforeUnloadRaised?K:(e.contextStorage.setItem(V,null),t)})},t.prototype._initChildDriverListening=function(){var t=this;U.on(U.SERVICE_MSG_RECEIVED_EVENT,function(e){var n=e.message,r=e.source;if(n.type===v.TYPE.establishConnection){var o=t._getChildDriverLinkByWindow(r);if(!o){var i=t.testRunId+"-"+(0,C["default"])();o=new S["default"](r,i),t.childDriverLinks.push(o)}o.confirmConnectionEstablished(n.id)}})},t.prototype._getChildDriverLinkByWindow=function(t){return this.childDriverLinks.filter(function(e){return e.driverWindow===t})[0]},t.prototype._runInActiveIframe=function(t){var e=this,n=k.resolve(),r=this.contextStorage.getItem(W);!this.activeChildDriverLink&&r&&(n=this._switchToIframe(r,q)),n.then(function(){return e.contextStorage.setItem(e.EXECUTING_IN_IFRAME_FLAG,!0),e.activeChildDriverLink.executeCommand(t)}).then(function(t){return e._onCommandExecutedInIframe(t)})["catch"](function(t){return e._onCommandExecutedInIframe(new _["default"]({isCommandResult:!0,executionError:t}))})},t.prototype._onCommandExecutedInIframe=function(t){this.contextStorage.setItem(this.EXECUTING_IN_IFRAME_FLAG,!1),this._onReady(t)},t.prototype._ensureChildDriverLink=function(t,e){var n=this;return(0,u.waitFor)(function(){return n._getChildDriverLinkByWindow(t)},X,this.selectorTimeout)["catch"](function(){throw new e})},t.prototype._switchToIframe=function(t,e){var n=this,r=new j["default"](t,this.selectorTimeout,null,function(){return new e.NotFoundError},function(){return e.IsInvisibleError()});return r.getResult().then(function(t){if(!u.domUtils.isIframeElement(t))throw new m.ActionElementNotIframe;return n._ensureChildDriverLink(t.contentWindow,e.NotLoadedError)}).then(function(e){n.activeChildDriverLink=e,n.contextStorage.setItem(W,t)})},t.prototype._switchToMainWindow=function(t){this.activeChildDriverLink&&this.activeChildDriverLink.executeCommand(t),this.contextStorage.setItem(W,null),this.activeChildDriverLink=null},t.prototype._onActionCommand=function(t){var e=this,n=(0,T["default"])(t,this.selectorTimeout),r=n.startPromise,o=n.completionPromise;r.then(function(){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!0)}),o.then(function(t){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!1),e._onReady(t)})},t.prototype._onNavigateToCommand=function(t){var e=this;this.contextStorage.setItem(this.COMMAND_EXECUTING_FLAG,!0),(0,R["default"])(t).then(function(t){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!1),e._onReady(t)})},t.prototype._onExecuteClientFunctionCommand=function(t){var e=this;this.contextStorage.setItem(G,{instantiationCallsiteName:t.instantiationCallsiteName});var n=new O["default"](t);n.getResultDriverStatus().then(function(t){e.contextStorage.setItem(G,null),e._onReady(t)})},t.prototype._onExecuteSelectorCommand=function(t){var e=this,n=this.contextStorage.getItem(z)||new Date,r=new j["default"](t,this.selectorTimeout,n);r.getResultDriverStatus().then(function(t){e.contextStorage.setItem(z,null),e._onReady(t)})},t.prototype._onSwitchToMainWindowCommand=function(t){this._switchToMainWindow(t),this._onReady(new _["default"]({isCommandResult:!0}))},t.prototype._onSwitchToIframeCommand=function(t){var e=this;this._switchToIframe(t.selector,Y).then(function(){return e._onReady(new _["default"]({isCommandResult:!0}))})["catch"](function(t){return e._onReady(new _["default"]({isCommandResult:!0,executionError:t}))})},t.prototype._onPrepareBrowserManipulationCommand=function(){var t=this;this.contextStorage.setItem(this.COMMAND_EXECUTING_FLAG,!0),(0,N["default"])(this.testRunId).then(function(e){return t.contextStorage.setItem(t.COMMAND_EXECUTING_FLAG,!1),t._onReady(e)})},t.prototype._onTestDone=function(){var t=this;this.contextStorage.setItem(L,!0),this._sendStatus(new _["default"]({isCommandResult:!0})).then(function(){return E.checkStatus(t.browserStatusUrl,s["default"].createNativeXHR)})},t.prototype._onReady=function(t){var e=this;this._sendStatus(t).then(function(t){t?e._onCommand(t):e._onReady(new _["default"])})},t.prototype._onCommand=function(t){var e=this;this.readyPromise.then(function(){t.type===h["default"].testDone?e._onTestDone():t.type===h["default"].prepareBrowserManipulation?e._onPrepareBrowserManipulationCommand():t.type===h["default"].switchToMainWindow?e._onSwitchToMainWindowCommand(t):e.activeChildDriverLink||e.contextStorage.getItem(W)?e._runInActiveIframe(t):t.type===h["default"].switchToIframe?e._onSwitchToIframeCommand(t):t.type===h["default"].executeClientFunction?e._onExecuteClientFunctionCommand(t):t.type===h["default"].executeSelector?e._onExecuteSelectorCommand(t):e.contextStorage.getItem(B)?e._onReady(new _["default"]({isCommandResult:!0})):t.type===h["default"].navigateTo?e._onNavigateToCommand(t):e._onActionCommand(t)})},t.prototype.start=function(){this.contextStorage=new y["default"](window,this.testRunId),E.startHeartbeat(this.heartbeatUrl,s["default"].createNativeXHR),c.modalBackground.initAndShowLoadingText(),this.readyPromise.then(function(){return c.modalBackground.hide()});var t=this.contextStorage.getItem(V);if(this.contextStorage.getItem(L))return void(t?this._onTestDone():E.checkStatus(this.browserStatusUrl,s["default"].createNativeXHR));if(!this._failIfClientCodeExecutionIsInterrupted()){var e=this.contextStorage.getItem(this.COMMAND_EXECUTING_FLAG)||this.contextStorage.getItem(this.EXECUTING_IN_IFRAME_FLAG),n=t||new _["default"]({isCommandResult:e});this._onReady(n)}},t}();t["default"]=H,e.exports=t["default"]},"generate-id.js":function(t,e,n){t.__esModule=!0,t["default"]=function(){return"function"==typeof r.nativeMethods.performanceNow?r.nativeMethods.performanceNow().toString():(r.nativeMethods.dateNow()+Math.random()).toString()};var r=n("./deps/hammerhead");e.exports=t["default"]},"iframe-driver.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}t.__esModule=!0;var s=n("./deps/hammerhead"),u=n("./driver"),c=r(u),l=n("./storage"),f=r(l),d=n("./status"),h=r(d),m=n("./driver-link/parent"),p=r(m),E=n("./driver-link/messages"),v=function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return a.lastParentDriverMessageId=null,a.parentDriverLink=new p["default"](window.parent),a._initParentDriverListening(),a}return a(e,t),e.prototype._onJsError=function(){},e.prototype._initParentDriverListening=function(){var t=this;s.eventSandbox.message.on(s.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,function(e){var n=e.message;if(!t.beforeUnloadRaised&&n.type===E.TYPE.executeCommand){if(t.lastParentDriverMessageId===n.id)return;t.lastParentDriverMessageId=n.id,t.parentDriverLink.confirmMessageReceived(n.id),t._onCommand(n.command)}})},e.prototype._onSwitchToMainWindowCommand=function(t){this._switchToMainWindow(t)},e.prototype._onReady=function(t){this.parentDriverLink.onCommandExecuted(t)},e.prototype.start=function(){var t=this;this.parentDriverLink.establishConnection().then(function(e){if(t.contextStorage=new f["default"](window,e),!t._failIfClientCodeExecutionIsInterrupted()){var n=t.contextStorage.getItem(t.COMMAND_EXECUTING_FLAG)||t.contextStorage.getItem(t.EXECUTING_IN_IFRAME_FLAG);n&&t._onReady(new h["default"]({isCommandResult:!0}))}})},e}(c["default"]);t["default"]=v,e.exports=t["default"]},"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}var o=n("./deps/hammerhead"),i=r(o),a=n("./driver"),s=r(a),u=n("./iframe-driver"),c=r(u);Object.defineProperty(window,"%testCafeDriver%",{enumerable:!1,configurable:!1,writable:!1,value:s["default"]}),Object.defineProperty(window,"%testCafeIframeDriver%",{enumerable:!1,configurable:!1,writable:!1,value:c["default"]}),i["default"].on(i["default"].EVENTS.evalIframeScript,function(t){return initTestCafeClientDrivers(t.iframe.contentWindow,!0)})},"status.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}t.__esModule=!0;var s=n("../../utils/assignable"),u=r(s),c=n("./generate-id"),l=r(c),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.id=(0,l["default"])(),r.isCommandResult=!1,r.executionError=null,r.pageError=null,r.result=null,r._assignFrom(n,!0),r}return a(e,t),e.prototype._getAssignableProperties=function(){return[{name:"isCommandResult"},{name:"executionError"},{name:"pageError"},{name:"result"}]},e}(u["default"]);t["default"]=f,e.exports=t["default"]},"storage.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("./deps/hammerhead"),a=r(i),s=a["default"].json,u="testcafe|driver|",c=function(){function t(e,n){o(this,t),this.storage=e.sessionStorage,this.storageKey=u+n,this.data={},this._loadFromStorage()}return t.prototype._loadFromStorage=function(){var t=this.storage.getItem(this.storageKey);t&&(this.data=s.parse(t),this.storage.removeItem(this.storageKey))},t.prototype._saveToStorage=function(){this.storage.setItem(this.storageKey,s.stringify(this.data))},t.prototype.setItem=function(t,e){this.data[t]=e,this._saveToStorage()},t.prototype.getItem=function(t){return this.data[t]},t.prototype.dispose=function(){this.storage.removeItem(this.storageKey)},t}();t["default"]=c,e.exports=t["default"]}},runner:{deps:{"testcafe-core.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeCore%"],e.exports=t["default"]}},utils:{"mouse.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=f.getElementRectangle(t);return{offsetX:Math.round(e.width/2),offsetY:Math.round(e.height/2)}}function i(t,e,n){var r=f.containsOffset(t,e,n);if(r)return{offsetX:e,offsetY:n};var o=a(t,e,n);return{offsetX:o.x,offsetY:o.y}}function a(t,e,n){var r=f.getOffsetPosition(t),o=t===document.documentElement?0:r.left,i=t===document.documentElement?0:r.top;return{x:o+e,y:i+n}}function s(t,e){var n=d.getElementScroll(t);return!/html/i.test(t.tagName)&&d.hasScroll(t)&&(e.x-=n.left,e.y-=n.top),f.offsetToClientCoords(e)}function u(t,e,n){var r=o(t);return{offsetX:"number"==typeof e?Math.round(e):r.offsetX,offsetY:"number"==typeof n?Math.round(n):r.offsetY}}t.__esModule=!0,t.getDefaultAutomationOffsets=o,t.getMoveAutomationOffsets=i,t.getAutomationPoint=a,t.convertToClient=s,t.getOffsetOptions=u;var c=n("../deps/testcafe-core"),l=r(c),f=l["default"].positionUtils,d=l["default"].styleUtils}}}},errors:{"test-run":{"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.CurrentIframeIsInvisibleError=t.CurrentIframeNotFoundError=t.CurrentIframeIsNotLoadedError=t.ActionIframeIsNotLoadedError=t.ActionElementNotIframe=t.ActionElementIsNotFileInputError=t.ActionCanNotFindFileToUploadError=t.ActionIncorrectKeysError=t.ActionRootContainerNotFoundError=t.ActionElementNonContentEditableError=t.ActionElementNotTextAreaError=t.ActionElementNonEditableError=t.ActionAdditionalElementIsInvisibleError=t.ActionAdditionalElementNotFoundError=t.ActionElementIsInvisibleError=t.ActionElementNotFoundError=t.ActionSelectorError=t.ActionUnsupportedDeviceTypeError=t.ActionUnsupportedUrlProtocolError=t.ActionStringArrayElementError=t.ActionStringOrStringArrayArgumentError=t.ActionPositiveIntegerArgumentError=t.ActionIntegerArgumentError=t.ActionStringArgumentError=t.ActionOptionsTypeError=t.ActionBooleanOptionError=t.ActionPositiveIntegerOptionError=t.ExternalAssertionLibraryError=t.UncaughtErrorInClientFunctionCode=t.UncaughtNonErrorObjectInTestCode=t.UncaughtErrorInTestCode=t.UncaughtErrorOnPage=t.PageLoadError=t.NonDomNodeSelectorResultError=t.DomNodeClientFunctionResultError=t.ClientFunctionExecutionInterruptionError=t.MissingAwaitError=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},u=n("./type"),c=r(u),l=function h(t){a(this,h),this.type=t,this.isTestCafeError=!0,this.callsite=null},f=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,n));return s.optionName=r,s.actualValue=i,s}return i(e,t),e}(l),d=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,n));return s.argumentName=r,s.actualValue=i,s}return i(e,t),e}(l);t.MissingAwaitError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].missingAwaitError));return r.callsite=n,r}return i(e,t),e}(l),t.ClientFunctionExecutionInterruptionError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].clientFunctionExecutionInterruptionError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.DomNodeClientFunctionResultError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].domNodeClientFunctionResultError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.NonDomNodeSelectorResultError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].nonDomNodeSelectorResultError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.PageLoadError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].pageLoadError));return r.errMsg=n,r}return i(e,t),e}(l),t.UncaughtErrorOnPage=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorOnPage));return i.errMsg=n,i.pageDestUrl=r,i}return i(e,t),e}(l),t.UncaughtErrorInTestCode=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorInTestCode));return i.errMsg=String(n),i.callsite=r,i}return i(e,t),e}(l),t.UncaughtNonErrorObjectInTestCode=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].uncaughtNonErrorObjectInTestCode));return r.objType="undefined"==typeof n?"undefined":s(n),r.objStr=String(n),r}return i(e,t),e}(l),t.UncaughtErrorInClientFunctionCode=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorInClientFunctionCode));return i.errMsg=String(r),i.instantiationCallsiteName=n,i}return i(e,t),e}(l),t.ExternalAssertionLibraryError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].externalAssertionLibraryError));return i.errMsg=String(n),i.callsite=r,i}return i(e,t),e}(l),t.ActionPositiveIntegerOptionError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionPositiveIntegerOptionError,n,r))}return i(e,t),e}(f),t.ActionBooleanOptionError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionBooleanOptionError,n,r))}return i(e,t),e}(f),t.ActionOptionsTypeError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionOptionsTypeError));return r.actualType=n,r}return i(e,t),e}(l),t.ActionStringArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionStringArgumentError,n,r))}return i(e,t),e}(d),t.ActionIntegerArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionIntegerArgumentError,n,r))}return i(e,t),e}(d),t.ActionPositiveIntegerArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionPositiveIntegerArgumentError,n,r))}return i(e,t),e}(d),t.ActionStringOrStringArrayArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionStringOrStringArrayArgumentError,n,r))}return i(e,t),e}(d),t.ActionStringArrayElementError=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,c["default"].actionStringArrayElementError,n,r));return s.elementIndex=i,s}return i(e,t),e}(d),t.ActionUnsupportedUrlProtocolError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].actionUnsupportedUrlProtocolError));return i.argumentName=n,i.protocol=r,i}return i(e,t),e}(l),t.ActionUnsupportedDeviceTypeError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionUnsupportedDeviceTypeError,n,r))}return i(e,t),e}(d),t.ActionSelectorError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].actionSelectorError));return i.selectorName=n,i.errMsg=r,i}return i(e,t),e}(l),t.ActionElementNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotFoundError))}return i(e,t),e}(l),t.ActionElementIsInvisibleError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementIsInvisibleError))}return i(e,t),e}(l),t.ActionAdditionalElementNotFoundError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionAdditionalElementNotFoundError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionAdditionalElementIsInvisibleError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionAdditionalElementIsInvisibleError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionElementNonEditableError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNonEditableError))}return i(e,t),e}(l),t.ActionElementNotTextAreaError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotTextAreaError))}return i(e,t),e}(l),t.ActionElementNonContentEditableError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionElementNonContentEditableError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionRootContainerNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionRootContainerNotFoundError))}return i(e,t),e}(l),t.ActionIncorrectKeysError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionIncorrectKeysError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionCanNotFindFileToUploadError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionCanNotFindFileToUploadError));return r.filePaths=n,r}return i(e,t),e}(l),t.ActionElementIsNotFileInputError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementIsNotFileInputError))}return i(e,t),e}(l),t.ActionElementNotIframe=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotIframeError))}return i(e,t),e}(l),t.ActionIframeIsNotLoadedError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionIframeIsNotLoadedError))}return i(e,t),e}(l),t.CurrentIframeIsNotLoadedError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeIsNotLoadedError))}return i(e,t),e}(l),t.CurrentIframeNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeNotFoundError))}return i(e,t),e}(l),t.CurrentIframeIsInvisibleError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeIsInvisibleError))}return i(e,t),e}(l)},"type.js":function(t,e,n){t.__esModule=!0,t["default"]={uncaughtErrorOnPage:"uncaughtErrorOnPage",uncaughtErrorInTestCode:"uncaughtErrorInTestCode",uncaughtNonErrorObjectInTestCode:"uncaughtNonErrorObjectInTestCode",uncaughtErrorInClientFunctionCode:"uncaughtErrorInClientFunctionCode",missingAwaitError:"missingAwaitError",actionPositiveIntegerOptionError:"actionPositiveIntegerOptionError",actionBooleanOptionError:"actionBooleanOptionError",actionOptionsTypeError:"actionOptionsTypeError",actionStringArgumentError:"actionStringArgumentError",actionStringOrStringArrayArgumentError:"actionStringOrStringArrayArgumentError",actionStringArrayElementError:"actionStringArrayElementError",actionIntegerArgumentError:"actionIntegerArgumentError",actionPositiveIntegerArgumentError:"actionPositiveIntegerArgumentError",actionSelectorError:"actionSelectorError",actionUnsupportedUrlProtocolError:"actionUnsupportedUrlProtocolError",actionElementNotFoundError:"actionElementNotFoundError",actionElementIsInvisibleError:"actionElementIsInvisibleError",actionAdditionalElementNotFoundError:"actionAdditionalElementNotFoundError",actionAdditionalElementIsInvisibleError:"actionAdditionalElementIsInvisibleError",actionElementNonEditableError:"actionElementNonEditableError",actionElementNotTextAreaError:"actionElementNotTextAreaError",actionElementNonContentEditableError:"actionElementNonContentEditableError",actionElementIsNotFileInputError:"actionElementIsNotFileInputError",actionRootContainerNotFoundError:"actionRootContainerNotFoundError",actionIncorrectKeysError:"actionIncorrectKeysError",actionCanNotFindFileToUploadError:"actionCanNotFindFileToUploadError",actionUnsupportedDeviceTypeError:"actionUnsupportedDeviceTypeError",actionIframeIsNotLoadedError:"actionIframeIsNotLoadedError",currentIframeIsNotLoadedError:"currentIframeIsNotLoadedError",currentIframeNotFoundError:"currentIframeNotFoundError",currentIframeIsInvisibleError:"currentIframeIsInvisibleError",clientFunctionExecutionInterruptionError:"clientFunctionExecutionInterruptionError",domNodeClientFunctionResultError:"domNodeClientFunctionResultError",nonDomNodeSelectorResultError:"nonDomNodeSelectorResultError",externalAssertionLibraryError:"externalAssertionLibraryError",pageLoadError:"pageLoadError"},e.exports=t["default"]}}},"test-run":{"client-messages.js":function(t,e,n){t.__esModule=!0,t["default"]={ready:"ready",readyForBrowserManipulation:"ready-for-browser-manipulation"},e.exports=t["default"]},commands:{"type.js":function(t,e,n){t.__esModule=!0,t["default"]={click:"click",rightClick:"right-click",doubleClick:"double-click",drag:"drag",dragToElement:"drag-to-element",hover:"hover",typeText:"type-text",selectText:"select-text",selectTextAreaContent:"select-text-area-content",selectEditableContent:"select-editable-content",pressKey:"press-key",wait:"wait",navigateTo:"navigate-to",setFilesToUpload:"set-files-to-upload",clearUpload:"clear-upload",executeClientFunction:"execute-client-function",executeSelector:"execute-selector",takeScreenshot:"take-screenshot",takeScreenshotOnFail:"take-screenshot-on-fail",prepareBrowserManipulation:"prepare-browser-manipulation",resizeWindow:"resize-window",resizeWindowToFitDevice:"resize-window-to-fit-device",switchToIframe:"switch-to-iframe",switchToMainWindow:"switch-to-main-window",testDone:"test-done"},e.exports=t["default"]}}},utils:{"assignable.js":function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function t(){r(this,t)}return t.prototype._getAssignableProperties=function(){throw new Error("Not implemented")},t.prototype._assignFrom=function(t,e){if(t)for(var n=this._getAssignableProperties(),r=0;r<n.length;r++){for(var o=n[r],i=o.name,a=o.type,s=o.required,u=o.init,c=i.split("."),l=c.length-1,f=c[l],d=t,h=this,m=0;l>m&&d&&h;m++)d=d[c[m]],h=h[c[m]];if(d&&h){var p=d[f];(void 0!==p||s)&&(e&&a&&a(i,p),h[f]=u?u(i,p):p)}}},t}();t["default"]=o,e.exports=t["default"]}}}}})("testcafe/src/client/driver/index")}initTestCafeClientDrivers(window)}(); | ||
!function(){function initTestCafeClientDrivers(window,isIFrameWithoutSrc){var document=window.document;!function(t){"use strict";var e,n,r,o,i,a={".js":[],".json":[],".css":[],".html":[]},s="function"==typeof require?require:null;return o=function(t){var e=new Error("Could not find module '"+t+"'");return e.code="MODULE_NOT_FOUND",e},i=function(t,e,n){var r,o;if("function"==typeof t[e+n])return e+n;for(r=0;o=a[n][r];++r)if("function"==typeof t[e+o])return e+o;return null},e=function(t,r,a,s,u,c){var l,f,d,h,m,p;for(a=a.split(/[\\/]/),l=a.pop(),"."!==l&&".."!==l||(a.push(l),l="");null!=(f=a.shift());)if(f&&"."!==f&&(".."===f?(t=r.pop(),c=c.slice(0,c.lastIndexOf("/"))):(r.push(t),t=t[f],c+="/"+f),!t))throw o(s);if(l&&"function"!=typeof t[l]&&(p=i(t,l,".js"),p||(p=i(t,l,".json")),p||(p=i(t,l,".css")),p||(p=i(t,l,".html")),p?l=p:2!==u&&"object"==typeof t[l]&&(r.push(t),t=t[l],c+="/"+l,l="")),!l)return 1!==u&&t[":mainpath:"]?e(t,r,t[":mainpath:"],s,1,c):e(t,r,"index",s,2,c);if(m=t[l],!m)throw o(s);return m.hasOwnProperty("module")?m.module.exports:(d={},m.module=h={exports:d,id:c+"/"+l},m.call(d,d,h,n(t,r,c)),h.exports)},r=function(n,r,i,a){var u,c=i,l=i.charAt(0),f=0;if("/"===l){if(c=c.slice(1),n=t["/"],!n){if(s)return s(i);throw o(i)}a="/",r=[]}else if("."!==l){if(u=c.split("/",1)[0],n=t[u],!n){if(s)return s(i);throw o(i)}a=u,r=[],c=c.slice(u.length+1),c||(c=n[":mainpath:"],c?f=1:(c="index",f=2))}return e(n,r,c,i,f,a)},(n=function(t,e,n){return function(o){return r(t,[].concat(e),o,n)}})(t,[],"")}({pinkie:{"index.js":function(t,e,n){function r(){for(var t=0;t<S.length;t++)S[t][0](S[t][1]);S=[],E=!1}function o(t,e){S.push([t,e]),E||(E=!0,b(r,0))}function i(t,e){function n(t){u(e,t)}function r(t){l(e,t)}try{t(n,r)}catch(o){r(o)}}function a(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n=w;try{r=o(r)}catch(a){l(i,a)}}s(i,r)||(n===w&&u(i,r),n===_&&l(i,r))}function s(t,e){var n;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"===("undefined"==typeof e?"undefined":g(e)))){var r=e.then;if("function"==typeof r)return r.call(e,function(r){n||(n=!0,e===r?c(t,r):u(t,r))},function(e){n||(n=!0,l(t,e))}),!0}}catch(o){return n||l(t,o),!0}return!1}function u(t,e){t!==e&&s(t,e)||c(t,e)}function c(t,e){t._state===v&&(t._state=y,t._data=e,o(d,t))}function l(t,e){t._state===v&&(t._state=y,t._data=e,o(h,t))}function f(t){t._then=t._then.forEach(a)}function d(t){t._state=w,f(t)}function h(t){t._state=_,f(t),!t._handled&&C&&global.process.emit("unhandledRejection",t._data,t)}function m(t){global.process.emit("rejectionHandled",t)}function p(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof p==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],i(t,this)}var E,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},v="pending",y="settled",w="fulfilled",_="rejected",I=function(){},C="undefined"!=typeof global&&"undefined"!=typeof global.process&&"function"==typeof global.process.emit,b="undefined"==typeof setImmediate?setTimeout:setImmediate,S=[];p.prototype={constructor:p,_state:v,_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(I),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,this._state===_&&C&&o(m,this)),this._state===w||this._state===_?o(a,n):this._then.push(n),n.then},"catch":function(t){return this.then(null,t)}},p.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new p(function(e,n){function r(t){return a++,function(n){i[t]=n,--a||e(i)}}for(var o,i=[],a=0,s=0;s<t.length;s++)o=t[s],o&&"function"==typeof o.then?o.then(r(s),n):i[s]=o;a||e(i)})},p.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new p(function(e,n){for(var r,o=0;o<t.length;o++)r=t[o],r&&"function"==typeof r.then?r.then(e,n):e(r)})},p.resolve=function(t){return t&&"object"===("undefined"==typeof t?"undefined":g(t))&&t.constructor===p?t:new p(function(e){e(t)})},p.reject=function(t){return new p(function(e,n){n(t)})},e.exports=p}},replicator:{":mainpath:":"index.js","index.js":function(t,e,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o="@t",i="@r",a=/^#*@(t|r)$/,s=function(){var t=eval;return t("this")}(),u="function"==typeof ArrayBuffer,c="function"==typeof Map,l="function"==typeof Set,f=Array.prototype.slice,d={serialize:function(t){return JSON.stringify(t)},deserialize:function(t){return JSON.parse(t)}},h=function(t,e){this.references=t,this.transforms=e,this.circularCandidates=[],this.circularCandidatesDescrs=[],this.circularRefCount=0};h._createRefMark=function(t){var e=Object.create(null);return e[i]=t,e},h.prototype._createCircularCandidate=function(t,e,n){this.circularCandidates.push(t),this.circularCandidatesDescrs.push({parent:e,key:n,refIdx:-1})},h.prototype._applyTransform=function(t,e,n,i){var a=Object.create(null),s=i.toSerializable(t);return"object"===("undefined"==typeof s?"undefined":r(s))&&this._createCircularCandidate(t,e,n),a[o]=i.type,a.data=this._handleValue(s,e,n),a},h.prototype._handleArray=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=this._handleValue(t[n],e,n);return e},h.prototype._handlePlainObject=function(t){var e=Object.create(null);for(var n in t)if(t.hasOwnProperty(n)){var r=a.test(n)?"#"+n:n;e[r]=this._handleValue(t[n],e,r)}return e},h.prototype._handleObject=function(t,e,n){return this._createCircularCandidate(t,e,n),Array.isArray(t)?this._handleArray(t):this._handlePlainObject(t)},h.prototype._ensureCircularReference=function(t){var e=this.circularCandidates.indexOf(t);if(e>-1){var n=this.circularCandidatesDescrs[e];return n.refIdx===-1&&(n.refIdx=n.parent?++this.circularRefCount:0),h._createRefMark(n.refIdx)}return null},h.prototype._handleValue=function(t,e,n){var o="undefined"==typeof t?"undefined":r(t),i="object"===o&&null!==t;if(i){var a=this._ensureCircularReference(t);if(a)return a}for(var s=0;s<this.transforms.length;s++){var u=this.transforms[s];if(u.shouldTransform(o,t))return this._applyTransform(t,e,n,u)}return i?this._handleObject(t,e,n):t},h.prototype.transform=function(){for(var t=[this._handleValue(this.references,null,null)],e=0;e<this.circularCandidatesDescrs.length;e++){var n=this.circularCandidatesDescrs[e];n.refIdx>0&&(t[n.refIdx]=n.parent[n.key],n.parent[n.key]=h._createRefMark(n.refIdx))}return t};var m=function(t,e){this.references=t,this.transformMap=e,this.activeTransformsStack=[],this.visitedRefs=Object.create(null)};m.prototype._handlePlainObject=function(t){var e=Object.create(null);for(var n in t)t.hasOwnProperty(n)&&(this._handleValue(t[n],t,n),a.test(n)&&(e[n.substring(1)]=t[n],delete t[n]));for(var r in e)t[r]=e[r]},m.prototype._handleTransformedObject=function(t,e,n){var r=t[o],i=this.transformMap[r];if(!i)throw new Error("Can't find transform for \""+r+'" type.');this.activeTransformsStack.push(t),this._handleValue(t.data,t,"data"),this.activeTransformsStack.pop(),e[n]=i.fromSerializable(t.data)},m.prototype._handleCircularSelfRefDuringTransform=function(t,e,n){var r=this.references;Object.defineProperty(e,n,{val:void 0,configurable:!0,enumerable:!0,get:function(){return void 0===this.val&&(this.val=r[t]),this.val},set:function(t){this.val=t}})},m.prototype._handleCircularRef=function(t,e,n){this.activeTransformsStack.indexOf(this.references[t])>-1?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])},m.prototype._handleValue=function(t,e,n){if("object"===("undefined"==typeof t?"undefined":r(t))&&null!==t){var a=t[i];if(void 0!==a)this._handleCircularRef(a,e,n);else if(t[o])this._handleTransformedObject(t,e,n);else if(Array.isArray(t))for(var s=0;s<t.length;s++)this._handleValue(t[s],t,s);else this._handlePlainObject(t)}},m.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=s[t.name]||Error,n=new e(t.message);return n.stack=t.stack,n}},{type:"[[ArrayBuffer]]",shouldTransform:function(t,e){return u&&e instanceof ArrayBuffer},toSerializable:function(t){var e=new Int8Array(t);return f.call(e)},fromSerializable:function(t){if(u){var e=new ArrayBuffer(t.length),n=new Int8Array(e);return n.set(t),e}return t}},{type:"[[TypedArray]]",shouldTransform:function(t,e){return u&&(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)},toSerializable:function(t){return{ctorName:t.constructor.name,arr:f.call(t)}},fromSerializable:function(t){return u?new s[t.ctorName](t.arr):t.arr}},{type:"[[Map]]",shouldTransform:function(t,e){return c&&e instanceof Map},toSerializable:function(t){var e=[];return t.forEach(function(t,n){e.push(n),e.push(t)}),e},fromSerializable:function(t){if(c){for(var e=new Map,n=0;n<t.length;n+=2)e.set(t[n],t[n+1]);return e}for(var r=[],o=0;o<t.length;o+=2)r.push([t[n],t[n+1]]);return r}},{type:"[[Set]]",shouldTransform:function(t,e){return l&&e instanceof Set},toSerializable:function(t){var e=[];return t.forEach(function(t){e.push(t)}),e},fromSerializable:function(t){if(l){for(var e=new Set,n=0;n<t.length;n++)e.add(t[n]);return e}return t}}],E=e.exports=function(t){this.transforms=[],this.transformsMap=Object.create(null),this.serializer=t||d,this.addTransforms(p)};E.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},E.prototype.removeTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e],r=this.transforms.indexOf(n);r>-1&&this.transforms.splice(r,1),delete this.transformsMap[n.type]}return this},E.prototype.encode=function(t){var e=new h(t,this.transforms),n=e.transform();return this.serializer.serialize(n)},E.prototype.decode=function(t){var e=this.serializer.deserialize(t),n=new m(e,this.transformsMap);return n.transform()}}},testcafe:{src:{"browser-connection":{"command.js":function(t,e,n){t.__esModule=!0,t["default"]={run:"run",idle:"idle"},e.exports=t["default"]}},client:{browser:{"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return new c["default"](function(n,r){var o=e();o.open("GET",t,!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?n(o.responseText?JSON.parse(o.responseText):""):r("disconnected"))},o.send(null)})}function i(t){return document.location.href.toLowerCase()===t.toLowerCase()}function a(t,e){o(t,e),window.setInterval(function(){return o(t,e)},d)}function s(t,e){return o(t,e).then(function(t){return(t.cmd===f["default"].run||t.cmd===f["default"].idle&&!i(t.url))&&(document.location=t.url),t.cmd})}t.__esModule=!0,t.startHeartbeat=a,t.checkStatus=s;var u=n("pinkie"),c=r(u),l=n("../../browser-connection/command"),f=r(l),d=3e4}},driver:{"command-executors":{"client-functions":{"client-function-executor.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../../deps/hammerhead"),a=n("../../status"),s=r(a),u=n("./replicator"),c=n("./eval-function"),l=r(c),f=n("../../../../errors/test-run"),d=function(){function t(e){o(this,t),this.command=e,this.replicator=this._createReplicator()}return t.prototype.getResult=function(){var t=this;return i.Promise.resolve().then(function(){var e=t.replicator.decode(t.command.scopeVars);return(0,l["default"])(t.command.fnCode,e)}).then(function(e){var n=t.replicator.decode(t.command.args);return t._executeFn(e,n)})["catch"](function(e){throw e.isTestCafeError||(e=new f.UncaughtErrorInClientFunctionCode(t.command.instantiationCallsiteName,e)),e})},t.prototype.getResultDriverStatus=function(){var t=this;return this.getResult().then(function(e){return new s["default"]({isCommandResult:!0,result:t.replicator.encode(e)})})["catch"](function(t){return new s["default"]({isCommandResult:!0,executionError:t})})},t.prototype._createReplicator=function(){return(0,u.createReplicator)([new u.ClientFunctionNodeTransform(this.command.instantiationCallsiteName),new u.FunctionTransform])},t.prototype._executeFn=function(t,e){return t.apply(window,e)},t}();t["default"]=d,e.exports=t["default"]},"eval-function.js":function(exports,module,require){function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function evalFunction(fnCode,scopeVars){"use strict";return eval(fnCode)}exports.__esModule=!0,exports["default"]=evalFunction;var _hammerhead=require("../../deps/hammerhead"),_hammerhead2=_interopRequireDefault(_hammerhead),Promise=_hammerhead2["default"].Promise;module.exports=exports["default"]},"node-snapshots.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function u(t){var e="("+t.toString()+")";return e=(0,c.processScript)(e,!1),(0,d["default"])(e,null)}t.__esModule=!0,t.ElementSnapshot=t.NodeSnapshot=void 0;var c=n("../../deps/hammerhead"),l=n("../../deps/testcafe-core"),f=n("./eval-function"),d=r(f),h=new RegExp(s(c.PROCESSING_COMMENTS.scriptStart)+".*?"+s(c.PROCESSING_COMMENTS.scriptEnd),"g"),m=new RegExp(s(c.PROCESSING_COMMENTS.stylesheetStart)+".*?"+s(c.PROCESSING_COMMENTS.stylesheetEnd),"g"),p=u(function(t){return t.attributes}),E=u(function(t){return t.childNodes}),g=u(function(t){return t.children}),v=u(function(t){return t.textContent}),y=u(function(t){return t.className}),w=u(function(t){return t.innerText}),_=t.NodeSnapshot=function(){function t(e){a(this,t),this.nodeType=e.nodeType,this.textContent=v(e),this.childNodeCount=E(e).length,this.hasChildNodes=!!this.childNodeCount,this.childElementCount=t._getChildElementCount(e),this.hasChildElements=!!this.childElementCount}return t._getChildElementCount=function(t){var e=g(t);if(e)return e.length;for(var n=0,r=t.childNodes.length,o=0;o<r;o++)1===t.childNodes[o].nodeType&&n++;return n},t}();t.ElementSnapshot=function(t){function e(n){a(this,e);var r=o(this,t.call(this,n));return r.tagName=n.tagName.toLowerCase(),r.visible=l.positionUtils.isElementVisible(n),r.focused=document.activeElement===n,r.attributes=e._getAttrsDictionary(n),r.boundingClientRect=e._getBoundingClientRect(n),r.classNames=e._getClassNames(n),r.style=e._getStyle(n),r.innerText=e._getInnerText(n),["namespaceURI","id","value","checked","scrollWidth","scrollHeight","scrollLeft","scrollTop","offsetWidth","offsetHeight","offsetLeft","offsetTop","clientWidth","clientHeight","clientLeft","clientTop"].forEach(function(t){return r[t]=n[t]}),r}return i(e,t),e._getBoundingClientRect=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}},e._getClassNames=function(t){var e=y(t);return e="string"==typeof e.animVal?e.animVal:e,e.replace(/^\s+|\s+$/g,"").split(/\s+/g)},e._getAttrsDictionary=function(t){for(var e=p(t),n={},r=e.length-1;r>=0;r--)n[e[r].name]=e[r].value;return n},e._getStyle=function(t){for(var e={},n=window.getComputedStyle(t),r=0;r<n.length;r++){var o=n[r];e[o]=n[o]}return e},e._getInnerText=function(t){var e=w(t);return e&&e.replace(h,"").replace(m,"").replace(/\r\n/g,"\n")},e}(_)},"replicator.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=new s["default"]({serialize:h,deserialize:h});return e.addTransforms(t)}t.__esModule=!0,t.ClientFunctionNodeTransform=t.SelectorNodeTransform=t.FunctionTransform=void 0,t.createReplicator=i;var a=n("replicator"),s=r(a),u=n("./eval-function"),c=r(u),l=n("./node-snapshots"),f=n("../../../../errors/test-run"),d=window.Node,h=function(t){return t};t.FunctionTransform=function(){function t(){o(this,t),this.type="Function"}return t.prototype.shouldTransform=function(t){return"function"===t},t.prototype.toSerializable=function(){return""},t.prototype.fromSerializable=function(t){var e=t.fnCode,n=t.scopeVars;return(0,c["default"])(e,n)},t}(),t.SelectorNodeTransform=function(){function t(){o(this,t),this.type="Node"}return t.prototype.shouldTransform=function(t,e){return e instanceof d},t.prototype.toSerializable=function(t){return 1===t.nodeType?new l.ElementSnapshot(t):new l.NodeSnapshot(t)},t}(),t.ClientFunctionNodeTransform=function(){function t(e){o(this,t),this.type="Node",this.instantiationCallsiteName=e}return t.prototype.shouldTransform=function(t,e){if(e instanceof d)throw new f.DomNodeClientFunctionResultError(this.instantiationCallsiteName)},t}()},"selector-executor.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return!!t}function u(t){return l.domUtils.isOptionElement(t)||"optgroup"===l.domUtils.getTagName(t)?f.selectElement.isOptionElementVisible(t):l.positionUtils.isElementVisible(t)}t.__esModule=!0;var c=n("../../deps/hammerhead"),l=n("../../deps/testcafe-core"),f=n("../../deps/testcafe-ui"),d=n("./client-function-executor"),h=r(d),m=n("./replicator"),p=n("../../../../errors/test-run"),E=200,g="Waiting for an element to appear",v=window.Node,y=function(t){function e(n,r,a,s,u){o(this,e);var c=i(this,t.call(this,n));if(c.createNotFoundError=s,c.createIsInvisibleError=u,c.timeout="number"==typeof n.timeout?n.timeout:r,a){var l=new Date-a;c.timeout=Math.max(c.timeout-l,0)}return c}return a(e,t),e.prototype._createReplicator=function(){return(0,m.createReplicator)([new m.SelectorNodeTransform,new m.FunctionTransform])},e.prototype._checkElement=function(t,e,n,r,o){if(n(t))return t;var i=new Date-e>=this.timeout;if(i){if(r)throw r();return null}return(0,l.delay)(E).then(o)},e.prototype._ensureExists=function(t,e,n){var r=this,o=function(){return r._ensureExists(t,e,n)};return c.Promise.resolve().then(function(){return t.apply(window,e)}).then(function(t){if(!(t instanceof v)&&null!==t&&void 0!==t)throw new p.NonDomNodeSelectorResultError(r.command.instantiationCallsiteName);return r._checkElement(t,n,s,r.createNotFoundError,o)})},e.prototype._ensureVisible=function(t,e){var n=this,r=function(){return n._ensureVisible(t,e)};return this._checkElement(t,e,u,this.createIsInvisibleError,r)},e.prototype._executeFn=function(t,e){var n=this,r=new Date,o=new f.ProgressPanel;return o.show(g,this.timeout),this._ensureExists(t,e,r).then(function(t){return t&&n.command.visibilityCheck?n._ensureVisible(t,r):t})["catch"](function(t){throw o.close(!1),t}).then(function(t){return o.close(!!t),t})},e}(h["default"]);t["default"]=y,e.exports=t["default"]}},"execute-action.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(!E.domUtils.isEditableElement(t))throw new x.ActionElementNonEditableError}function i(t){if(!E.domUtils.isTextAreaElement(t))throw new x.ActionElementNotTextAreaError}function a(t,e){if(!E.domUtils.isContentEditableElement(t))throw new x.ActionElementNonContentEditableError(e)}function s(t){if(!E.contentEditable.getNearestCommonAncestor(t[0],t[1]))throw new x.ActionRootContainerNotFoundError;return t}function u(t){if(!E.domUtils.isFileInput(t))throw new x.ActionElementIsNotFileInputError}function c(t,e){t.type===b["default"].selectText?o(e[0]):t.type===b["default"].selectTextAreaContent?i(e[0]):t.type===b["default"].selectEditableContent?(a(e[0],"startSelector"),a(e[1],"endSelector"),s(e)):t.type!==b["default"].setFilesToUpload&&t.type!==b["default"].clearUpload||u(e[0])}function l(t,e){var n=[],r=p.Promise.resolve(),o=new Date,i=function(t,i,a){r=r.then(function(){var n=new I["default"](t,e,o,i,a);return n.getResult()}).then(function(t){return n.push(t)})};return t.selector&&i(t.selector,function(){return new x.ActionElementNotFoundError},function(){return new x.ActionElementIsInvisibleError}),t.type===b["default"].dragToElement?i(t.destinationSelector,function(){return new x.ActionAdditionalElementNotFoundError("destinationSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("destinationSelector")}):t.type===b["default"].selectEditableContent&&(i(t.startSelector,function(){return new x.ActionAdditionalElementNotFoundError("startSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("startSelector")}),i(t.endSelector||t.startSelector,function(){return new x.ActionAdditionalElementNotFoundError("endSelector")},function(){return new x.ActionAdditionalElementIsInvisibleError("endSelector")})),r.then(function(){return c(t,n),n})}function f(t){if(t.type===b["default"].pressKey){var e=U(t.keys);if(e.error)throw new x.ActionIncorrectKeysError("keys")}}function d(t,e){var n=(0,S.getOffsetOptions)(t,e.offsetX,e.offsetY),r=n.offsetX,o=n.offsetY;e.offsetX=r,e.offsetY=o}function h(t,e){var n=null;switch(e.options&&"offsetX"in e.options&&"offsetY"in e.options&&d(t[0],e.options),e.type){case b["default"].click:return new N(t[0],e.options);case b["default"].rightClick:return new A(t[0],e.options);case b["default"].doubleClick:return new T(t[0],e.options);case b["default"].hover:return new F(t[0],e.options);case b["default"].drag:return new M(t[0],e.dragOffsetX,e.dragOffsetY,e.options);case b["default"].dragToElement:return new R(t[0],t[1],e.options);case b["default"].typeText:return new O(t[0],e.text,e.options);case b["default"].selectText:case b["default"].selectTextAreaContent:return n=k(t[0],e),new P(t[0],n.startPos,n.endPos);case b["default"].selectEditableContent:return new j(t[0],t[1]);case b["default"].pressKey:return new D(U(e.keys).combinations);case b["default"].setFilesToUpload:return new L(t[0],e.filePath,function(t){return new x.ActionCanNotFindFileToUploadError(t)});case b["default"].clearUpload:return new L(t[0])}}function m(t,e){var n=null,r=new p.Promise(function(t){return n=t}),o=new p.Promise(function(r){var o=null;l(t,e).then(function(e){return n(),o=new E.RequestBarrier,f(t),h(e,t).run()}).then(function(){return p.Promise.all([o.wait(),E.pageUnloadBarrier.wait()])}).then(function(){return r(new w["default"]({isCommandResult:!0}))})["catch"](function(t){var e=t.message===V.elementIsInvisibleError?new x.ActionElementIsInvisibleError:t;return r(new w["default"]({isCommandResult:!0,executionError:e}))})});return{startPromise:r,completionPromise:o}}t.__esModule=!0,t["default"]=m;var p=n("../deps/hammerhead"),E=n("../deps/testcafe-core"),g=n("../deps/testcafe-runner"),v=r(g),y=n("../status"),w=r(y),_=n("./client-functions/selector-executor"),I=r(_),C=n("../../../test-run/commands/type"),b=r(C),S=n("../../runner/utils/mouse"),x=n("../../../errors/test-run"),N=v["default"].get("./automation/playback/click"),A=v["default"].get("./automation/playback/rclick"),T=v["default"].get("./automation/playback/dblclick"),M=v["default"].get("./automation/playback/drag/to-offset"),R=v["default"].get("./automation/playback/drag/to-element"),F=v["default"].get("./automation/playback/hover"),O=v["default"].get("./automation/playback/type"),P=v["default"].get("./automation/playback/select/select-text"),j=v["default"].get("./automation/playback/select/select-editable-content"),D=v["default"].get("./automation/playback/press"),U=v["default"].get("./automation/playback/press/parse-key-sequence"),k=v["default"].get("./automation/playback/select/get-select-position-arguments"),L=v["default"].get("./automation/playback/upload"),V=v["default"].get("./automation/errors");e.exports=t["default"]},"execute-navigate-to.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=new d;return a["default"].navigateTo(t.url),f.all([e.wait(),h.wait()]).then(function(){return new l["default"]({isCommandResult:!0})})["catch"](function(t){return new l["default"]({isCommandResult:!0,executionError:t})})}t.__esModule=!0,t["default"]=o;var i=n("../deps/hammerhead"),a=r(i),s=n("../deps/testcafe-core"),u=r(s),c=n("../status"),l=r(c),f=a["default"].Promise,d=u["default"].RequestBarrier,h=u["default"].pageUnloadBarrier;e.exports=t["default"]},"prepare-browser-manipulation.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=document.title,n="[ "+t+" ]",r=null,o=null;return r=h.setInterval.call(window,function(){document.title!==n&&(e=document.title,document.title=n)},E),document.title=n,p(g).then(function(){var t={cmd:l["default"].readyForBrowserManipulation,currentWidth:window.innerWidth,currentHeight:window.innerHeight};return m.queuedAsyncServiceMsg(t)}).then(function(t){return o=t,h.clearInterval.call(window,r),document.title=e,p(v)}).then(function(){return new d["default"]({isCommandResult:!0,result:o})})}t.__esModule=!0,t["default"]=o;var i=n("../deps/hammerhead"),a=r(i),s=n("../deps/testcafe-core"),u=r(s),c=n("../../../test-run/client-messages"),l=r(c),f=n("../status"),d=r(f),h=a["default"].nativeMethods,m=a["default"].transport,p=u["default"].delay,E=50,g=500,v=100;e.exports=t["default"]}},deps:{"hammerhead.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%hammerhead%"],e.exports=t["default"]},"testcafe-core.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeCore%"],e.exports=t["default"]},"testcafe-runner.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeRunner%"],e.exports=t["default"]},"testcafe-ui.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeUI%"],e.exports=t["default"]}},"driver-link":{"child.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../deps/hammerhead"),a=n("../deps/testcafe-core"),s=n("../../../errors/test-run"),u=n("./send-message-to-driver"),c=r(u),l=n("./messages"),f=n("../status"),d=r(f),h=1e3,m=200,p=500,E=function(){function t(e,n,r){o(this,t),this.driverWindow=e,this.driverIframe=a.domUtils.findIframeByWindow(e),this.driverId=n,this.iframeAvailabilityTimeout=r}return t.prototype._ensureIframe=function(){var t=this;return a.domUtils.isElementInDocument(this.driverIframe)?(0,a.waitFor)(function(){return a.positionUtils.isElementVisible(t.driverIframe)?t.driverIframe:null},m,this.iframeAvailabilityTimeout)["catch"](function(){throw new s.CurrentIframeIsInvisibleError}):i.Promise.reject(new s.CurrentIframeNotFoundError)},t.prototype._waitForIframeRemovedOrHidden=function(){var t=this;return new i.Promise(function(e){t.checkIframeInterval=i.nativeMethods.setInterval.call(window,function(){t._ensureIframe()["catch"](function(){return(0,a.delay)(p).then(function(){return e(new d["default"]({isCommandResult:!0}))})})},h)})},t.prototype._waitForCommandResult=function(){var t=this,e=null,n=function(){return new i.Promise(function(t){e=function(e){e.message.type===l.TYPE.commandExecuted&&t(e.message.driverStatus)},i.eventSandbox.message.on(i.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,e)})};return i.Promise.race([this._waitForIframeRemovedOrHidden(),n()]).then(function(n){return i.eventSandbox.message.off(i.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,e),i.nativeMethods.clearInterval.call(window,t.checkIframeInterval),n})},t.prototype.confirmConnectionEstablished=function(t){var e=new l.ConfirmationMessage(t,{id:this.driverId});i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t.prototype.executeCommand=function(t){var e=this;return this._ensureIframe().then(function(){var n=new l.ExecuteCommandMessage(t);return i.Promise.all([(0,c["default"])(n,e.driverWindow,e.timeout,s.CurrentIframeIsNotLoadedError),e._waitForCommandResult()])}).then(function(t){return t[1]})},t}();t["default"]=E,e.exports=t["default"]},"messages.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.ConfirmationMessage=t.ExecuteCommandMessage=t.CommandExecutedMessage=t.EstablishConnectionMessage=t.TYPE=void 0;var s=n("../generate-id"),u=r(s),c=t.TYPE={establishConnection:"driver|establish-connection",commandExecuted:"driver|command-executed",executeCommand:"driver|execute-command",confirmation:"driver|confirmation"},l=function f(t){a(this,f),this.type=t,this.id=(0,u["default"])()};t.EstablishConnectionMessage=function(t){function e(){return a(this,e),o(this,t.call(this,c.establishConnection))}return i(e,t),e}(l),t.CommandExecutedMessage=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c.commandExecuted));return r.driverStatus=n,r}return i(e,t),e}(l),t.ExecuteCommandMessage=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c.executeCommand));return r.command=n,r}return i(e,t),e}(l),t.ConfirmationMessage=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c.confirmation)); | ||
return i.requestMessageId=n,i.result=r,i}return i(e,t),e}(l)},"parent.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("../deps/hammerhead"),a=n("./messages"),s=n("../../../errors/test-run"),u=n("./send-message-to-driver"),c=r(u),l=5e3,f=function(){function t(e){o(this,t),this.driverWindow=e}return t.prototype.establishConnection=function(){var t=new a.EstablishConnectionMessage;return(0,c["default"])(t,this.driverWindow,l,s.CurrentIframeIsNotLoadedError).then(function(t){return t.result.id})},t.prototype.confirmMessageReceived=function(t){var e=new a.ConfirmationMessage(t);i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t.prototype.onCommandExecuted=function(t){var e=new a.CommandExecutedMessage(t);i.eventSandbox.message.sendServiceMsg(e,this.driverWindow)},t}();t["default"]=f,e.exports=t["default"]},"send-message-to-driver.js":function(t,e,n){function r(t,e,n,r){var c=null,l=null,f=null;n=Math.max(n||0,s);var d=function(){return new o.Promise(function(n){f=function(e){e.message.type===a.TYPE.confirmation&&e.message.requestMessageId===t.id&&n(e.message)},o.eventSandbox.message.on(o.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,f),c=o.nativeMethods.setInterval.call(window,function(){return o.eventSandbox.message.sendServiceMsg(t,e)},u),o.eventSandbox.message.sendServiceMsg(t,e)})};return o.Promise.race([(0,i.delay)(n),d()]).then(function(t){if(o.nativeMethods.clearInterval.call(window,c),o.nativeMethods.clearTimeout.call(window,l),o.eventSandbox.message.off(o.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,f),!t)throw new r;return t})}t.__esModule=!0,t["default"]=r;var o=n("../deps/hammerhead"),i=n("../deps/testcafe-core"),a=n("./messages"),s=2500,u=1e3;e.exports=t["default"]}},"driver.js":function(t,e,n){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=n("./deps/hammerhead"),s=o(a),u=n("./deps/testcafe-core"),c=n("./deps/testcafe-ui"),l=n("../../test-run/client-messages"),f=o(l),d=n("../../test-run/commands/type"),h=o(d),m=n("../../errors/test-run"),p=n("../browser"),E=r(p),g=n("./driver-link/messages"),v=n("./storage"),y=o(v),w=n("./status"),_=o(w),I=n("./generate-id"),C=o(I),b=n("./driver-link/child"),S=o(b),x=n("./command-executors/prepare-browser-manipulation"),N=o(x),A=n("./command-executors/execute-action"),T=o(A),M=n("./command-executors/execute-navigate-to"),R=o(M),F=n("./command-executors/client-functions/client-function-executor"),O=o(F),P=n("./command-executors/client-functions/selector-executor"),j=o(P),D=s["default"].transport,U=s["default"].Promise,k=s["default"].eventSandbox.message,L="testcafe|driver|test-done-sent-flag",V="testcafe|driver|pending-status",G="testcafe|driver|executing-client-function-descriptor",z="testcafe|driver|selector-execution-start-time",B="testcafe|driver|pending-page-error",W="testcafe|driver|active-iframe-selector",X=500,Y={NotLoadedError:m.ActionIframeIsNotLoadedError,NotFoundError:m.ActionElementNotFoundError,IsInvisibleError:m.ActionElementIsInvisibleError},q={NotLoadedError:m.CurrentIframeIsNotLoadedError,NotFoundError:m.CurrentIframeNotFoundError,IsInvisibleError:m.CurrentIframeIsInvisibleError},K=new U(u.noop),H=function(){function t(e,n,r,o){var a=this;i(this,t),this.COMMAND_EXECUTING_FLAG="testcafe|driver|command-executing-flag",this.EXECUTING_IN_IFRAME_FLAG="testcafe|driver|executing-in-iframe-flag",this.testRunId=e,this.selectorTimeout=n,this.heartbeatUrl=r,this.browserStatusUrl=o,this.contextStorage=null,this.childDriverLinks=[],this.activeChildDriverLink=null,this.beforeUnloadRaised=!1,this.pageInitialRequestBarrier=new u.RequestBarrier,this.readyPromise=u.eventUtils.documentReady().then(function(){return a.pageInitialRequestBarrier.wait(!0)}),this._initChildDriverListening(),u.pageUnloadBarrier.init(),(0,u.preventRealEvents)(),s["default"].on(s["default"].EVENTS.uncaughtJsError,function(t){return a._onJsError(t)}),s["default"].on(s["default"].EVENTS.beforeUnload,function(){return a.beforeUnloadRaised=!0})}return t.prototype._onJsError=function(t){if(this.contextStorage.getItem(L))return U.resolve();var e=new m.UncaughtErrorOnPage(t.msg||t.message,t.pageUrl);this.contextStorage.getItem(B)||this.contextStorage.setItem(B,e)},t.prototype._failIfClientCodeExecutionIsInterrupted=function(){var t=this.contextStorage.getItem(G);return!!t&&(this._onReady(new _["default"]({isCommandResult:!0,executionError:new m.ClientFunctionExecutionInterruptionError(t.instantiationCallsiteName)})),!0)},t.prototype._addPendingErrorToStatus=function(t){var e=this.contextStorage.getItem(B);e&&(this.contextStorage.setItem(B,null),t.pageError=e)},t.prototype._sendStatus=function(t){var e=this;return this._addPendingErrorToStatus(t),this.contextStorage.setItem(V,t),this.beforeUnloadRaised?K:D.queuedAsyncServiceMsg({cmd:f["default"].ready,status:t}).then(function(t){return e.beforeUnloadRaised?K:(e.contextStorage.setItem(V,null),t)})},t.prototype._initChildDriverListening=function(){var t=this;k.on(k.SERVICE_MSG_RECEIVED_EVENT,function(e){var n=e.message,r=e.source;if(n.type===g.TYPE.establishConnection){var o=t._getChildDriverLinkByWindow(r);if(!o){var i=t.testRunId+"-"+(0,C["default"])();o=new S["default"](r,i),t.childDriverLinks.push(o)}o.confirmConnectionEstablished(n.id)}})},t.prototype._getChildDriverLinkByWindow=function(t){return this.childDriverLinks.filter(function(e){return e.driverWindow===t})[0]},t.prototype._runInActiveIframe=function(t){var e=this,n=U.resolve(),r=this.contextStorage.getItem(W);!this.activeChildDriverLink&&r&&(n=this._switchToIframe(r,q)),n.then(function(){return e.contextStorage.setItem(e.EXECUTING_IN_IFRAME_FLAG,!0),e.activeChildDriverLink.executeCommand(t)}).then(function(t){return e._onCommandExecutedInIframe(t)})["catch"](function(t){return e._onCommandExecutedInIframe(new _["default"]({isCommandResult:!0,executionError:t}))})},t.prototype._onCommandExecutedInIframe=function(t){this.contextStorage.setItem(this.EXECUTING_IN_IFRAME_FLAG,!1),this._onReady(t)},t.prototype._ensureChildDriverLink=function(t,e){var n=this;return(0,u.waitFor)(function(){return n._getChildDriverLinkByWindow(t)},X,this.selectorTimeout)["catch"](function(){throw new e})},t.prototype._switchToIframe=function(t,e){var n=this,r=new j["default"](t,this.selectorTimeout,null,function(){return new e.NotFoundError},function(){return e.IsInvisibleError()});return r.getResult().then(function(t){if(!u.domUtils.isIframeElement(t))throw new m.ActionElementNotIframe;return n._ensureChildDriverLink(t.contentWindow,e.NotLoadedError)}).then(function(e){n.activeChildDriverLink=e,n.contextStorage.setItem(W,t)})},t.prototype._switchToMainWindow=function(t){this.activeChildDriverLink&&this.activeChildDriverLink.executeCommand(t),this.contextStorage.setItem(W,null),this.activeChildDriverLink=null},t.prototype._onActionCommand=function(t){var e=this,n=(0,T["default"])(t,this.selectorTimeout),r=n.startPromise,o=n.completionPromise;r.then(function(){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!0)}),o.then(function(t){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!1),e._onReady(t)})},t.prototype._onNavigateToCommand=function(t){var e=this;this.contextStorage.setItem(this.COMMAND_EXECUTING_FLAG,!0),(0,R["default"])(t).then(function(t){return e.contextStorage.setItem(e.COMMAND_EXECUTING_FLAG,!1),e._onReady(t)})},t.prototype._onExecuteClientFunctionCommand=function(t){var e=this;this.contextStorage.setItem(G,{instantiationCallsiteName:t.instantiationCallsiteName});var n=new O["default"](t);n.getResultDriverStatus().then(function(t){e.contextStorage.setItem(G,null),e._onReady(t)})},t.prototype._onExecuteSelectorCommand=function(t){var e=this,n=this.contextStorage.getItem(z)||new Date,r=new j["default"](t,this.selectorTimeout,n);r.getResultDriverStatus().then(function(t){e.contextStorage.setItem(z,null),e._onReady(t)})},t.prototype._onSwitchToMainWindowCommand=function(t){this._switchToMainWindow(t),this._onReady(new _["default"]({isCommandResult:!0}))},t.prototype._onSwitchToIframeCommand=function(t){var e=this;this._switchToIframe(t.selector,Y).then(function(){return e._onReady(new _["default"]({isCommandResult:!0}))})["catch"](function(t){return e._onReady(new _["default"]({isCommandResult:!0,executionError:t}))})},t.prototype._onPrepareBrowserManipulationCommand=function(){var t=this;this.contextStorage.setItem(this.COMMAND_EXECUTING_FLAG,!0),(0,N["default"])(this.testRunId).then(function(e){return t.contextStorage.setItem(t.COMMAND_EXECUTING_FLAG,!1),t._onReady(e)})},t.prototype._onTestDone=function(){var t=this;this.contextStorage.setItem(L,!0),this._sendStatus(new _["default"]({isCommandResult:!0})).then(function(){return E.checkStatus(t.browserStatusUrl,s["default"].createNativeXHR)})},t.prototype._onReady=function(t){var e=this;this._sendStatus(t).then(function(t){t?e._onCommand(t):e._onReady(new _["default"])})},t.prototype._onCommand=function(t){var e=this;this.readyPromise.then(function(){t.type===h["default"].testDone?e._onTestDone():t.type===h["default"].prepareBrowserManipulation?e._onPrepareBrowserManipulationCommand():t.type===h["default"].switchToMainWindow?e._onSwitchToMainWindowCommand(t):e.activeChildDriverLink||e.contextStorage.getItem(W)?e._runInActiveIframe(t):t.type===h["default"].switchToIframe?e._onSwitchToIframeCommand(t):t.type===h["default"].executeClientFunction?e._onExecuteClientFunctionCommand(t):t.type===h["default"].executeSelector?e._onExecuteSelectorCommand(t):e.contextStorage.getItem(B)?e._onReady(new _["default"]({isCommandResult:!0})):t.type===h["default"].navigateTo?e._onNavigateToCommand(t):e._onActionCommand(t)})},t.prototype.start=function(){this.contextStorage=new y["default"](window,this.testRunId),E.startHeartbeat(this.heartbeatUrl,s["default"].createNativeXHR),c.modalBackground.initAndShowLoadingText(),this.readyPromise.then(function(){return c.modalBackground.hide()});var t=this.contextStorage.getItem(V);if(this.contextStorage.getItem(L))return void(t?this._onTestDone():E.checkStatus(this.browserStatusUrl,s["default"].createNativeXHR));if(!this._failIfClientCodeExecutionIsInterrupted()){var e=this.contextStorage.getItem(this.COMMAND_EXECUTING_FLAG)||this.contextStorage.getItem(this.EXECUTING_IN_IFRAME_FLAG),n=t||new _["default"]({isCommandResult:e});this._onReady(n)}},t}();t["default"]=H,e.exports=t["default"]},"generate-id.js":function(t,e,n){t.__esModule=!0,t["default"]=function(){return"function"==typeof r.nativeMethods.performanceNow?r.nativeMethods.performanceNow().toString():(r.nativeMethods.dateNow()+Math.random()).toString()};var r=n("./deps/hammerhead");e.exports=t["default"]},"iframe-driver.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}t.__esModule=!0;var s=n("./deps/hammerhead"),u=n("./driver"),c=r(u),l=n("./storage"),f=r(l),d=n("./status"),h=r(d),m=n("./driver-link/parent"),p=r(m),E=n("./driver-link/messages"),g=function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return a.lastParentDriverMessageId=null,a.parentDriverLink=new p["default"](window.parent),a._initParentDriverListening(),a}return a(e,t),e.prototype._onJsError=function(){},e.prototype._initParentDriverListening=function(){var t=this;s.eventSandbox.message.on(s.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,function(e){var n=e.message;if(!t.beforeUnloadRaised&&n.type===E.TYPE.executeCommand){if(t.lastParentDriverMessageId===n.id)return;t.lastParentDriverMessageId=n.id,t.parentDriverLink.confirmMessageReceived(n.id),t._onCommand(n.command)}})},e.prototype._onSwitchToMainWindowCommand=function(t){this._switchToMainWindow(t)},e.prototype._onReady=function(t){this.parentDriverLink.onCommandExecuted(t)},e.prototype.start=function(){var t=this;this.parentDriverLink.establishConnection().then(function(e){if(t.contextStorage=new f["default"](window,e),!t._failIfClientCodeExecutionIsInterrupted()){var n=t.contextStorage.getItem(t.COMMAND_EXECUTING_FLAG)||t.contextStorage.getItem(t.EXECUTING_IN_IFRAME_FLAG);n&&t._onReady(new h["default"]({isCommandResult:!0}))}})},e}(c["default"]);t["default"]=g,e.exports=t["default"]},"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}var o=n("./deps/hammerhead"),i=r(o),a=n("./driver"),s=r(a),u=n("./iframe-driver"),c=r(u);Object.defineProperty(window,"%testCafeDriver%",{enumerable:!1,configurable:!1,writable:!1,value:s["default"]}),Object.defineProperty(window,"%testCafeIframeDriver%",{enumerable:!1,configurable:!1,writable:!1,value:c["default"]}),i["default"].on(i["default"].EVENTS.evalIframeScript,function(t){return initTestCafeClientDrivers(t.iframe.contentWindow,!0)})},"status.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}t.__esModule=!0;var s=n("../../utils/assignable"),u=r(s),c=n("./generate-id"),l=r(c),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.id=(0,l["default"])(),r.isCommandResult=!1,r.executionError=null,r.pageError=null,r.result=null,r._assignFrom(n,!0),r}return a(e,t),e.prototype._getAssignableProperties=function(){return[{name:"isCommandResult"},{name:"executionError"},{name:"pageError"},{name:"result"}]},e}(u["default"]);t["default"]=f,e.exports=t["default"]},"storage.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n("./deps/hammerhead"),a=r(i),s=a["default"].json,u="testcafe|driver|",c=function(){function t(e,n){o(this,t),this.storage=e.sessionStorage,this.storageKey=u+n,this.data={},this._loadFromStorage()}return t.prototype._loadFromStorage=function(){var t=this.storage.getItem(this.storageKey);t&&(this.data=s.parse(t),this.storage.removeItem(this.storageKey))},t.prototype._saveToStorage=function(){this.storage.setItem(this.storageKey,s.stringify(this.data))},t.prototype.setItem=function(t,e){this.data[t]=e,this._saveToStorage()},t.prototype.getItem=function(t){return this.data[t]},t.prototype.dispose=function(){this.storage.removeItem(this.storageKey)},t}();t["default"]=c,e.exports=t["default"]}},runner:{deps:{"testcafe-core.js":function(t,e,n){t.__esModule=!0,t["default"]=window["%testCafeCore%"],e.exports=t["default"]}},utils:{"mouse.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=f.getElementRectangle(t);return{offsetX:Math.round(e.width/2),offsetY:Math.round(e.height/2)}}function i(t,e,n){var r=f.containsOffset(t,e,n);if(r)return{offsetX:e,offsetY:n};var o=a(t,e,n);return{offsetX:o.x,offsetY:o.y}}function a(t,e,n){var r=f.getOffsetPosition(t),o=t===document.documentElement?0:r.left,i=t===document.documentElement?0:r.top;return{x:o+e,y:i+n}}function s(t,e){var n=d.getElementScroll(t);return!/html/i.test(t.tagName)&&d.hasScroll(t)&&(e.x-=n.left,e.y-=n.top),f.offsetToClientCoords(e)}function u(t,e,n){var r=o(t);return{offsetX:"number"==typeof e?Math.round(e):r.offsetX,offsetY:"number"==typeof n?Math.round(n):r.offsetY}}t.__esModule=!0,t.getDefaultAutomationOffsets=o,t.getMoveAutomationOffsets=i,t.getAutomationPoint=a,t.convertToClient=s,t.getOffsetOptions=u;var c=n("../deps/testcafe-core"),l=r(c),f=l["default"].positionUtils,d=l["default"].styleUtils}}}},errors:{"test-run":{"index.js":function(t,e,n){function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.CurrentIframeIsInvisibleError=t.CurrentIframeNotFoundError=t.CurrentIframeIsNotLoadedError=t.ActionIframeIsNotLoadedError=t.ActionElementNotIframe=t.ActionElementIsNotFileInputError=t.ActionCanNotFindFileToUploadError=t.ActionIncorrectKeysError=t.ActionRootContainerNotFoundError=t.ActionElementNonContentEditableError=t.ActionElementNotTextAreaError=t.ActionElementNonEditableError=t.ActionAdditionalElementIsInvisibleError=t.ActionAdditionalElementNotFoundError=t.ActionElementIsInvisibleError=t.ActionElementNotFoundError=t.ActionSelectorError=t.ActionUnsupportedDeviceTypeError=t.ActionUnsupportedUrlProtocolError=t.ActionStringArrayElementError=t.ActionStringOrStringArrayArgumentError=t.ActionPositiveIntegerArgumentError=t.ActionIntegerArgumentError=t.ActionStringArgumentError=t.ActionOptionsTypeError=t.ActionBooleanOptionError=t.ActionPositiveIntegerOptionError=t.ExternalAssertionLibraryError=t.UncaughtErrorInClientFunctionCode=t.UncaughtNonErrorObjectInTestCode=t.UncaughtErrorInTestCode=t.UncaughtErrorOnPage=t.PageLoadError=t.NonDomNodeSelectorResultError=t.DomNodeClientFunctionResultError=t.ClientFunctionExecutionInterruptionError=t.MissingAwaitError=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},u=n("./type"),c=r(u),l=function h(t){a(this,h),this.type=t,this.isTestCafeError=!0,this.callsite=null},f=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,n));return s.optionName=r,s.actualValue=i,s}return i(e,t),e}(l),d=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,n));return s.argumentName=r,s.actualValue=i,s}return i(e,t),e}(l);t.MissingAwaitError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].missingAwaitError));return r.callsite=n,r}return i(e,t),e}(l),t.ClientFunctionExecutionInterruptionError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].clientFunctionExecutionInterruptionError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.DomNodeClientFunctionResultError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].domNodeClientFunctionResultError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.NonDomNodeSelectorResultError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].nonDomNodeSelectorResultError));return r.instantiationCallsiteName=n,r}return i(e,t),e}(l),t.PageLoadError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].pageLoadError));return r.errMsg=n,r}return i(e,t),e}(l),t.UncaughtErrorOnPage=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorOnPage));return i.errMsg=n,i.pageDestUrl=r,i}return i(e,t),e}(l),t.UncaughtErrorInTestCode=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorInTestCode));return i.errMsg=String(n),i.callsite=r,i}return i(e,t),e}(l),t.UncaughtNonErrorObjectInTestCode=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].uncaughtNonErrorObjectInTestCode));return r.objType="undefined"==typeof n?"undefined":s(n),r.objStr=String(n),r}return i(e,t),e}(l),t.UncaughtErrorInClientFunctionCode=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].uncaughtErrorInClientFunctionCode));return i.errMsg=String(r),i.instantiationCallsiteName=n,i}return i(e,t),e}(l),t.ExternalAssertionLibraryError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].externalAssertionLibraryError));return i.errMsg=String(n),i.callsite=r,i}return i(e,t),e}(l),t.ActionPositiveIntegerOptionError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionPositiveIntegerOptionError,n,r))}return i(e,t),e}(f),t.ActionBooleanOptionError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionBooleanOptionError,n,r))}return i(e,t),e}(f),t.ActionOptionsTypeError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionOptionsTypeError));return r.actualType=n,r}return i(e,t),e}(l),t.ActionStringArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionStringArgumentError,n,r))}return i(e,t),e}(d),t.ActionIntegerArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionIntegerArgumentError,n,r))}return i(e,t),e}(d),t.ActionPositiveIntegerArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionPositiveIntegerArgumentError,n,r))}return i(e,t),e}(d),t.ActionStringOrStringArrayArgumentError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionStringOrStringArrayArgumentError,n,r))}return i(e,t),e}(d),t.ActionStringArrayElementError=function(t){function e(n,r,i){a(this,e);var s=o(this,t.call(this,c["default"].actionStringArrayElementError,n,r));return s.elementIndex=i,s}return i(e,t),e}(d),t.ActionUnsupportedUrlProtocolError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].actionUnsupportedUrlProtocolError));return i.argumentName=n,i.protocol=r,i}return i(e,t),e}(l),t.ActionUnsupportedDeviceTypeError=function(t){function e(n,r){return a(this,e),o(this,t.call(this,c["default"].actionUnsupportedDeviceTypeError,n,r))}return i(e,t),e}(d),t.ActionSelectorError=function(t){function e(n,r){a(this,e);var i=o(this,t.call(this,c["default"].actionSelectorError));return i.selectorName=n,i.errMsg=r,i}return i(e,t),e}(l),t.ActionElementNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotFoundError))}return i(e,t),e}(l),t.ActionElementIsInvisibleError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementIsInvisibleError))}return i(e,t),e}(l),t.ActionAdditionalElementNotFoundError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionAdditionalElementNotFoundError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionAdditionalElementIsInvisibleError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionAdditionalElementIsInvisibleError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionElementNonEditableError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNonEditableError))}return i(e,t),e}(l),t.ActionElementNotTextAreaError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotTextAreaError))}return i(e,t),e}(l),t.ActionElementNonContentEditableError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionElementNonContentEditableError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionRootContainerNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionRootContainerNotFoundError))}return i(e,t),e}(l),t.ActionIncorrectKeysError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionIncorrectKeysError));return r.argumentName=n,r}return i(e,t),e}(l),t.ActionCanNotFindFileToUploadError=function(t){function e(n){a(this,e);var r=o(this,t.call(this,c["default"].actionCanNotFindFileToUploadError));return r.filePaths=n,r}return i(e,t),e}(l),t.ActionElementIsNotFileInputError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementIsNotFileInputError))}return i(e,t),e}(l),t.ActionElementNotIframe=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionElementNotIframeError))}return i(e,t),e}(l),t.ActionIframeIsNotLoadedError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].actionIframeIsNotLoadedError))}return i(e,t),e}(l),t.CurrentIframeIsNotLoadedError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeIsNotLoadedError))}return i(e,t),e}(l),t.CurrentIframeNotFoundError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeNotFoundError))}return i(e,t),e}(l),t.CurrentIframeIsInvisibleError=function(t){function e(){return a(this,e),o(this,t.call(this,c["default"].currentIframeIsInvisibleError))}return i(e,t),e}(l)},"type.js":function(t,e,n){t.__esModule=!0,t["default"]={uncaughtErrorOnPage:"uncaughtErrorOnPage",uncaughtErrorInTestCode:"uncaughtErrorInTestCode",uncaughtNonErrorObjectInTestCode:"uncaughtNonErrorObjectInTestCode",uncaughtErrorInClientFunctionCode:"uncaughtErrorInClientFunctionCode",missingAwaitError:"missingAwaitError",actionPositiveIntegerOptionError:"actionPositiveIntegerOptionError",actionBooleanOptionError:"actionBooleanOptionError",actionOptionsTypeError:"actionOptionsTypeError",actionStringArgumentError:"actionStringArgumentError",actionStringOrStringArrayArgumentError:"actionStringOrStringArrayArgumentError",actionStringArrayElementError:"actionStringArrayElementError",actionIntegerArgumentError:"actionIntegerArgumentError",actionPositiveIntegerArgumentError:"actionPositiveIntegerArgumentError",actionSelectorError:"actionSelectorError",actionUnsupportedUrlProtocolError:"actionUnsupportedUrlProtocolError",actionElementNotFoundError:"actionElementNotFoundError",actionElementIsInvisibleError:"actionElementIsInvisibleError",actionAdditionalElementNotFoundError:"actionAdditionalElementNotFoundError",actionAdditionalElementIsInvisibleError:"actionAdditionalElementIsInvisibleError",actionElementNonEditableError:"actionElementNonEditableError",actionElementNotTextAreaError:"actionElementNotTextAreaError",actionElementNonContentEditableError:"actionElementNonContentEditableError",actionElementIsNotFileInputError:"actionElementIsNotFileInputError",actionRootContainerNotFoundError:"actionRootContainerNotFoundError",actionIncorrectKeysError:"actionIncorrectKeysError",actionCanNotFindFileToUploadError:"actionCanNotFindFileToUploadError",actionUnsupportedDeviceTypeError:"actionUnsupportedDeviceTypeError",actionIframeIsNotLoadedError:"actionIframeIsNotLoadedError",currentIframeIsNotLoadedError:"currentIframeIsNotLoadedError",currentIframeNotFoundError:"currentIframeNotFoundError",currentIframeIsInvisibleError:"currentIframeIsInvisibleError",clientFunctionExecutionInterruptionError:"clientFunctionExecutionInterruptionError",domNodeClientFunctionResultError:"domNodeClientFunctionResultError",nonDomNodeSelectorResultError:"nonDomNodeSelectorResultError",externalAssertionLibraryError:"externalAssertionLibraryError",pageLoadError:"pageLoadError"},e.exports=t["default"]}}},"test-run":{"client-messages.js":function(t,e,n){t.__esModule=!0,t["default"]={ready:"ready",readyForBrowserManipulation:"ready-for-browser-manipulation"},e.exports=t["default"]},commands:{"type.js":function(t,e,n){t.__esModule=!0,t["default"]={click:"click",rightClick:"right-click",doubleClick:"double-click",drag:"drag",dragToElement:"drag-to-element",hover:"hover",typeText:"type-text",selectText:"select-text",selectTextAreaContent:"select-text-area-content",selectEditableContent:"select-editable-content",pressKey:"press-key",wait:"wait",navigateTo:"navigate-to",setFilesToUpload:"set-files-to-upload",clearUpload:"clear-upload",executeClientFunction:"execute-client-function",executeSelector:"execute-selector",takeScreenshot:"take-screenshot",takeScreenshotOnFail:"take-screenshot-on-fail",prepareBrowserManipulation:"prepare-browser-manipulation",resizeWindow:"resize-window",resizeWindowToFitDevice:"resize-window-to-fit-device",switchToIframe:"switch-to-iframe",switchToMainWindow:"switch-to-main-window",testDone:"test-done"},e.exports=t["default"]}}},utils:{"assignable.js":function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=function(){function t(){r(this,t)}return t.prototype._getAssignableProperties=function(){throw new Error("Not implemented")},t.prototype._assignFrom=function(t,e){if(t)for(var n=this._getAssignableProperties(),r=0;r<n.length;r++){for(var o=n[r],i=o.name,a=o.type,s=o.required,u=o.init,c=i.split("."),l=c.length-1,f=c[l],d=t,h=this,m=0;m<l&&d&&h;m++)d=d[c[m]],h=h[c[m]];if(d&&h){var p=d[f];(void 0!==p||s)&&(e&&a&&a(i,p),h[f]=u?u(i,p):p)}}},t}();t["default"]=o,e.exports=t["default"]}}}}})("testcafe/src/client/driver/index")}initTestCafeClientDrivers(window)}(); |
@@ -1,1 +0,1 @@ | ||
!function(){function e(t){var n=t.document;!function(e){"use strict";var t,n,s,i,o,r={".js":[],".json":[],".css":[],".html":[]},a="function"==typeof require?require:null;return i=function(e){var t=new Error("Could not find module '"+e+"'");return t.code="MODULE_NOT_FOUND",t},o=function(e,t,n){var s,i;if("function"==typeof e[t+n])return t+n;for(s=0;i=r[n][s];++s)if("function"==typeof e[t+i])return t+i;return null},t=function(e,s,r,a,l,u){var d,c,f,h,p,m;for(r=r.split(/[\\/]/),d=r.pop(),"."!==d&&".."!==d||(r.push(d),d="");null!=(c=r.shift());)if(c&&"."!==c&&(".."===c?(e=s.pop(),u=u.slice(0,u.lastIndexOf("/"))):(s.push(e),e=e[c],u+="/"+c),!e))throw i(a);if(d&&"function"!=typeof e[d]&&(m=o(e,d,".js"),m||(m=o(e,d,".json")),m||(m=o(e,d,".css")),m||(m=o(e,d,".html")),m?d=m:2!==l&&"object"==typeof e[d]&&(s.push(e),e=e[d],u+="/"+d,d="")),!d)return 1!==l&&e[":mainpath:"]?t(e,s,e[":mainpath:"],a,1,u):t(e,s,"index",a,2,u);if(p=e[d],!p)throw i(a);return p.hasOwnProperty("module")?p.module.exports:(f={},p.module=h={exports:f,id:u+"/"+d},p.call(f,f,h,n(e,s,u)),h.exports)},s=function(n,s,o,r){var l,u=o,d=o.charAt(0),c=0;if("/"===d){if(u=u.slice(1),n=e["/"],!n){if(a)return a(o);throw i(o)}r="/",s=[]}else if("."!==d){if(l=u.split("/",1)[0],n=e[l],!n){if(a)return a(o);throw i(o)}r=l,s=[],u=u.slice(l.length+1),u||(u=n[":mainpath:"],u?c=1:(u="index",c=2))}return t(n,s,u,o,c,r)},(n=function(e,t,n){return function(i){return s(e,[].concat(t),i,n)}})(e,[],"")}({testcafe:{src:{client:{runner:{deps:{"hammerhead.js":function(e,n,s){e.__esModule=!0,e["default"]=t["%hammerhead%"],n.exports=e["default"]}},utils:{"iframe.js":function(e,t,n){function s(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0,e.sendRequestToFrame=void 0;var i=n("../deps/hammerhead"),o=s(i),r=o["default"].Promise,a=o["default"].eventSandbox.message;e.sendRequestToFrame=function(e,t,n){return new r(function(s){function i(e){e.message.cmd===t&&(a.off(a.SERVICE_MSG_RECEIVED_EVENT,i),s(e.message))}a.on(a.SERVICE_MSG_RECEIVED_EVENT,i),a.sendServiceMsg(e,n)})}}}},ui:{cursor:{"iframe-cursor.js":function(e,n,s){function i(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0;var o=s("./../deps/hammerhead"),r=i(o),a=s("./messages"),l=i(a),u=s("../../runner/utils/iframe"),d=r["default"].utils.browser,c=d.isIE?1:0;e["default"]={move:function(e,n){var s={cmd:l["default"].moveRequest,x:e+c,y:n+c};return(0,u.sendRequestToFrame)(s,l["default"].moveResponse,t.parent)},leftButtonDown:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].leftButtonDownRequest},l["default"].leftButtonDownResponse,t.parent)},rightButtonDown:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].rightButtonDownRequest},l["default"].rightButtonDownResponse,t.parent)},buttonUp:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].buttonUpRequest},l["default"].buttonUpResponse,t.parent)}},n.exports=e["default"]},"index.js":function(e,s,i){function o(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0;var r=i("./../deps/hammerhead"),a=o(r),l=i("./../deps/testcafe-core"),u=o(l),d=i("./messages"),c=o(d),f=a["default"].Promise,h=a["default"].shadowUI,p=a["default"].utils.browser,m=a["default"].eventSandbox.message,g=u["default"].styleUtils,v=u["default"].positionUtils,E=u["default"].eventUtils,_="cursor",x="touch",w="l-mouse-down",b="r-mouse-down",y=[w,b].join(" ");m.on(m.SERVICE_MSG_RECEIVED_EVENT,function(e){var t=e.message;switch(t.cmd){case c["default"].moveRequest:var n=v.getIframePointRelativeToParentFrame({x:t.x,y:t.y},e.source);C.move(n.x,n.y).then(function(){return m.sendServiceMsg({cmd:c["default"].moveResponse},e.source)});break;case c["default"].leftButtonDownRequest:C.leftButtonDown().then(function(){return m.sendServiceMsg({cmd:c["default"].leftButtonDownResponse},e.source)});break;case c["default"].rightButtonDownRequest:C.rightButtonDown().then(function(){return m.sendServiceMsg({cmd:c["default"].rightButtonDownResponse},e.source)});break;case c["default"].buttonUpRequest:C.buttonUp().then(function(){return m.sendServiceMsg({cmd:c["default"].buttonUpResponse},e.source)})}});var C={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){var e=this;this.cursorElement=n.createElement("div"),h.addClass(this.cursorElement,_),p.isTouchDevice&&!p.isIE&&(h.addClass(this.cursorElement,x),this.pointerOffsetX=Math.ceil(g.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(g.getHeight(this.cursorElement)/2)),h.getRoot().appendChild(this.cursorElement),E.bind(t,"scroll",function(){return e.move(e.x,e.y)})},isVisible:function(){return this.cursorElement&&"hidden"!==g.get(this.cursorElement,"visibility")},hide:function(){this.cursorElement||this._createElement(),g.set(this.cursorElement,"visibility","hidden")},show:function(){this.cursorElement||this._createElement(),g.set(this.cursorElement,"visibility","")},move:function(e,t){return this.x=e,this.y=t,this.cursorElement||this._createElement(),g.set(this.cursorElement,{left:this.x+g.getScrollLeft(n)-this.pointerOffsetX+"px",top:this.y+g.getScrollTop(n)-this.pointerOffsetY+"px"}),f.resolve()},leftButtonDown:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),h.addClass(this.cursorElement,w),f.resolve()},rightButtonDown:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),h.addClass(this.cursorElement,b),f.resolve()},buttonUp:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),f.resolve()}};e["default"]=C,s.exports=e["default"]},"messages.js":function(e,t,n){e.__esModule=!0,e["default"]={moveRequest:"ui|cursor|move|request",leftButtonDownRequest:"ui|cursor|leftbuttondown|request",rightButtonDownRequest:"ui|cursor|rightbuttondown|request",buttonUpRequest:"ui|cursor|buttonup|request",moveResponse:"ui|cursor|move|response",leftButtonDownResponse:"ui|cursor|leftbuttondown|response",rightButtonDownResponse:"ui|cursor|rightbuttondown|response",buttonUpResponse:"ui|cursor|buttonup|response"},t.exports=e["default"]}},deps:{"hammerhead.js":function(e,n,s){e.__esModule=!0,e["default"]=t["%hammerhead%"],n.exports=e["default"]},"testcafe-core.js":function(e,n,s){e.__esModule=!0,e["default"]=t["%testCafeCore%"],n.exports=e["default"]}},"index.js":function(n,s,i){function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}var a=i("./deps/hammerhead"),l=r(a),u=i("./select-element"),d=o(u),c=i("./modal-background"),f=o(c),h=i("./progress-panel"),p=r(h),m=i("./cursor"),g=r(m),v=i("./cursor/iframe-cursor"),E=o(v);n.cursorUI=g["default"],n.iframeCursorUI=E,n.selectElement=d,n.modalBackground=f,n.ProgressPanel=p["default"],n.get=i,Object.defineProperty(t,"%testCafeUI%",{enumerable:!1,configurable:!1,writable:!1,value:n}),l["default"].on(l["default"].EVENTS.evalIframeScript,function(t){return e(t.iframe.contentWindow,!0)})},"modal-background.js":function(e,s,i){function o(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=_.getRoot();M=n.createElement("div"),e.appendChild(M),_.addClass(M,y),S=n.createElement("div"),S.textContent=b,e.appendChild(S),_.addClass(S,C),R=n.createElement("div"),w.set(R,"visibility","hidden"),e.appendChild(R),_.addClass(R,D)}function a(){var e=w.getHeight(t),n=w.getWidth(t),s=!w.hasDimensions(S);s&&(w.set(S,"visibility","hidden"),w.set(S,"display","block")),w.set(S,{left:Math.max((n-w.getWidth(S))/2,0)+"px",top:Math.max((e-w.getHeight(S))/2,0)+"px"}),s&&(w.set(S,"display","none"),w.set(S,"visibility",""))}function l(){var e=function(){var e=w.getHeight(t),n=w.getWidth(t);w.set(M,"width",n+"px"),w.set(M,"height",e+"px"),w.set(R,{left:Math.round((n-w.getWidth(R))/2)+"px",top:Math.round((e-w.getHeight(R))/2)+"px"})};e(),x.bind(t,"resize",e)}function u(){r(),l(),a(),O=!0}function d(){var e=!1,s=function(){u(),w.set(M,"opacity",T),w.set(M,"display","block"),w.set(S,"display","block"),e=!0},i=function o(){e||(n.body?s():t.setTimeout(o,0))};i(),x.documentReady().then(function(){e||s()})}function c(e){O||u(),w.set(M,"opacity",e?0:I),w.set(M,"display","block")}function f(){O&&(w.set(S,"display","none"),w.set(M,"display","none"))}function h(){w.set(R,"visibility","visible")}function p(){w.set(R,"visibility","hidden")}e.__esModule=!0,e.initAndShowLoadingText=d,e.show=c,e.hide=f,e.showLoadingIcon=h,e.hideLoadingIcon=p;var m=i("./deps/hammerhead"),g=o(m),v=i("./deps/testcafe-core"),E=o(v),_=g["default"].shadowUI,x=E["default"].eventUtils,w=E["default"].styleUtils,b="Loading page...",y="modal-background",C="loading-text",I=.7,T=.8,D="loading-icon",M=null,S=null,R=null,O=!1},"progress-panel":{"index.js":function(e,s,i){function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var a=i("../deps/hammerhead"),l=o(a),u=i("../deps/testcafe-core"),d=o(u),c=i("./progress-bar"),f=o(c),h=l["default"].shadowUI,p=d["default"].eventUtils,m=d["default"].styleUtils,g="progress-panel",v="title",E="content",_=100,x=10,w=300,b=200,y=600,C=1e3,I=function(){function e(){var t=this;r(this,e),this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=n.createElement("div"),h.getRoot().appendChild(this.panelDiv),this.titleDiv=n.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=n.createElement("div"),this.panelDiv.appendChild(this.contentDiv),h.addClass(this.panelDiv,g),h.addClass(this.titleDiv,v),h.addClass(this.contentDiv,E),e._showAtWindowCenter(this.panelDiv),this.progressBar=new f["default"](this.contentDiv),this.disposePanel=function(){return e._showAtWindowCenter(t.panelDiv)}}return e._getInvisibleElementProperty=function(e,t){var n="none"===m.get(e,"display");n&&m.set(e,"display","block");var s=e[t];return n&&m.set(e,"display","none"),s},e._showAtWindowCenter=function(n){var s=e._getInvisibleElementProperty(n,"offsetHeight"),i=e._getInvisibleElementProperty(n,"offsetWidth"),o=Math.round(m.getHeight(t)/2-s/2),r=Math.round(m.getWidth(t)/2-i/2);m.set(n,{left:r+"px",top:o+"px"})},e.prototype._setCurrentProgress=function(){var e=Math.round((Date.now()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(e)},e.prototype._setSuccess=function(e){this.progressBar.setSuccess(e)},e.prototype._stopAnimation=function(){t.clearInterval(this.animationInterval)},e.prototype._animate=function(e,n,s,i){var o=this,r=Date.now(),a=s?0:1,l=0,u=0,d=0;s&&(m.set(e,"opacity",a),m.set(e,"display","block")),this._stopAnimation(),this.animationInterval=t.setInterval(function(){l=Date.now()-r,u=Math.min(l/n,1),d=.5-Math.cos(u*Math.PI)/2,m.set(e,"opacity",a+(s?d:-d)),1===u&&(o._stopAnimation(),i&&i())},x)},e.prototype._showPanel=function(){p.bind(t,"resize",this.disposePanel),this._animate(this.panelDiv,b,!0)},e.prototype._hidePanel=function(e){var n=this;this.startTime=null,p.unbind(t,"resize",this.disposePanel),this._animate(this.panelDiv,e?0:y,!1,function(){return m.set(n.panelDiv,"display","none")})},e.prototype.show=function(e,n){var s=this;this.startTime=Date.now(),this.maxTimeout=n,this.titleDiv.textContent=e,this._setSuccess(!1),this.openingTimeout=t.setTimeout(function(){s.openingTimeout=null,s._setCurrentProgress(),s._showPanel(),s.updateInterval=t.setInterval(function(){return s._setCurrentProgress()},_)},w)},e.prototype.close=function(e){var n=this;e&&this._setSuccess(!0),this.openingTimeout&&(t.clearTimeout(this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(t.clearInterval(this.updateInterval),this.updateInterval=null),e?this.startTime&&Date.now()-this.startTime<C?t.setTimeout(function(){t.setTimeout(function(){return n._hidePanel(!1)},b)},_):t.setTimeout(function(){return n._hidePanel(!1)},b):this._hidePanel(!0)},e}();e["default"]=I,s.exports=e["default"]},"progress-bar.js":function(e,t,s){function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=s("../deps/hammerhead"),a=i(r),l=s("../deps/testcafe-core"),u=i(l),d=a["default"].shadowUI,c=u["default"].styleUtils,f="progress-bar",h="value",p="success",m=function(){function e(t){o(this,e),this.containerElement=n.createElement("div"),this.valueElement=n.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),d.addClass(this.containerElement,f),d.addClass(this.valueElement,h)}return e.prototype.setValue=function(e){e="number"!=typeof e?0:Math.min(Math.max(e,0),100),c.set(this.valueElement,"width",e+"%")},e.prototype.setSuccess=function(e){e?d.addClass(this.containerElement,p):d.removeClass(this.containerElement,p)},e}();e["default"]=m,t.exports=e["default"]}},"select-element.js":function(e,s,i){function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){(e.target||e.srcElement)===q||I.containsElement(q,e.target)||I.containsElement(B,e.target)||c()}function a(e,t){var s=n.createElement("div"),i=e.disabled||"optgroup"===I.getTagName(e.parentElement)&&e.parentElement.disabled;s.textContent=e.text,t.appendChild(s),w.addClass(s,O),i&&(w.addClass(s,U),T.set(s,"color",T.get(e,"color"))),i&&b.isWebKit?D.bind(s,"click",function(){return!1}):D.bind(s,"click",function(){var e=q.selectedIndex,t=M.indexOf(F,this),n=q.getElementsByTagName("option")[t],s=!i&&t!==e,o=b.isSafari&&b.hasTouchEvents||b.isAndroid;s&&!b.isIE&&(q.selectedIndex=t),b.isFirefox||b.isIE||!s||y.change(q),(b.isFirefox||b.isIE)&&y.mousedown(b.isFirefox?n:q),o||y.mouseup(b.isFirefox?n:q),(b.isFirefox||b.isIE)&&s&&(b.isIE&&(q.selectedIndex=t),y.change(q)),o||y.click(b.isFirefox||b.isIE?n:q),i||c()}),F.push(s)}function l(e,t){var s=n.createElement("div");s.textContent=e.label||" ",t.appendChild(s),w.addClass(s,R),s.disabled&&(w.addClass(s,U),T.set(s,"color",T.get(e,"color"))),u(e.children,s),j.push(s)}function u(e,t){for(var n=0;n<e.length;n++)I.isOptionElement(e[n])?a(e[n],t):"optgroup"===I.getTagName(e[n])&&l(e[n],t)}function d(e){var s=e.children;if(s.length){if(q){var i=e===q;if(c(),i)return}q=e,B=n.createElement("div"),w.getRoot().appendChild(B),w.addClass(B,S),u(s,B),t.setTimeout(function(){D.bind(n,"mousedown",r)},0),T.set(B,{position:"absolute",fontSize:T.get(q,"fontSize"),fontFamily:T.get(q,"fontFamily"),minWidth:T.getWidth(q)+"px",left:C.getOffsetPosition(q).left+"px",height:I.getSelectVisibleChildren(e).length>P?T.getOptionHeight(e)*P:""});var o=C.getOffsetPosition(q).top,a=T.getHeight(B),l=o+T.getHeight(q)+2;if(l+a>T.getScrollTop(t)+T.getHeight(t)){var d=o-3-a;d>=T.getScrollTop(t)&&(l=d)}T.set(B,"top",l+"px")}}function c(){I.remove(B),D.unbind(n,"mousedown",r),B=null,q=null,F=[],j=[]}function f(e){return e?e===q:!!q}function h(e){var t="optgroup"===I.getTagName(e),n=t?I.getOptionGroupIndex(q,e):I.getOptionIndex(q,e);return t?j[n]:F[n]}function p(e){var t=I.getSelectParent(e);if(t){var n=T.getSelectElementSize(t),s=T.getOptionHeight(t),i=0,o=Math.max(T.getScrollTop(t)/s,0),r=o+n-1,a=I.getChildVisibleIndex(t,e);o>a?(i=s*(o-a),T.setScrollTop(t,Math.max(T.getScrollTop(t)-i,0))):a>r&&(i=s*(a-r),T.setScrollTop(t,T.getScrollTop(t)+i))}}function m(e){var t=I.getSelectParent(e);if(!t)return{x:0,y:0};var n=T.getOptionHeight(t),s=C.getElementRectangle(e);return{x:Math.round(s.left+s.width/2),y:Math.round(s.top+n/2)}}function g(e,t){var n=T.getSelectElementSize(e),s=!T.hasDimensions(w.select("."+S)[0]);if(/down|up/.test(t)||!b.isIE&&(1>=n||b.isFirefox)&&(s||b.isFirefox)&&/left|right/.test(t)){for(var i=e.querySelectorAll("option"),o=[],r=0;r<i.length;r++){var a=i[r].parentElement;i[r].disabled||"optgroup"===I.getTagName(a)&&a.disabled||o.push(i[r])}var l=M.indexOf(o,i[e.selectedIndex]),u=l+(/down|right/.test(t)?1:-1);u>=0&&u<o.length&&(e.selectedIndex=M.indexOf(i,o[u]),y.change(e))}}e.__esModule=!0,e.expandOptionList=d,e.collapseOptionList=c,e.isOptionListExpanded=f,e.getEmulatedChildElement=h,e.scrollOptionListByChild=p,e.getSelectChildCenter=m,e.switchOptionsByKeys=g;var v=i("./deps/hammerhead"),E=o(v),_=i("./deps/testcafe-core"),x=o(_),w=E["default"].shadowUI,b=E["default"].utils.browser,y=E["default"].eventSandbox.eventSimulator,C=x["default"].positionUtils,I=x["default"].domUtils,T=x["default"].styleUtils,D=x["default"].eventUtils,M=x["default"].arrayUtils,S="tcOptionList",R="tcOptionGroup",O="tcOption",U="disabled",P=b.isIE?30:20,q=null,B=null,j=[],F=[]}}}}}})("testcafe/src/client/ui/index")}e(window)}(); | ||
!function(){function e(t){var n=t.document;!function(e){"use strict";var t,n,i,s,o,r={".js":[],".json":[],".css":[],".html":[]},a="function"==typeof require?require:null;return s=function(e){var t=new Error("Could not find module '"+e+"'");return t.code="MODULE_NOT_FOUND",t},o=function(e,t,n){var i,s;if("function"==typeof e[t+n])return t+n;for(i=0;s=r[n][i];++i)if("function"==typeof e[t+s])return t+s;return null},t=function(e,i,r,a,l,u){var d,c,f,h,p,m;for(r=r.split(/[\\/]/),d=r.pop(),"."!==d&&".."!==d||(r.push(d),d="");null!=(c=r.shift());)if(c&&"."!==c&&(".."===c?(e=i.pop(),u=u.slice(0,u.lastIndexOf("/"))):(i.push(e),e=e[c],u+="/"+c),!e))throw s(a);if(d&&"function"!=typeof e[d]&&(m=o(e,d,".js"),m||(m=o(e,d,".json")),m||(m=o(e,d,".css")),m||(m=o(e,d,".html")),m?d=m:2!==l&&"object"==typeof e[d]&&(i.push(e),e=e[d],u+="/"+d,d="")),!d)return 1!==l&&e[":mainpath:"]?t(e,i,e[":mainpath:"],a,1,u):t(e,i,"index",a,2,u);if(p=e[d],!p)throw s(a);return p.hasOwnProperty("module")?p.module.exports:(f={},p.module=h={exports:f,id:u+"/"+d},p.call(f,f,h,n(e,i,u)),h.exports)},i=function(n,i,o,r){var l,u=o,d=o.charAt(0),c=0;if("/"===d){if(u=u.slice(1),n=e["/"],!n){if(a)return a(o);throw s(o)}r="/",i=[]}else if("."!==d){if(l=u.split("/",1)[0],n=e[l],!n){if(a)return a(o);throw s(o)}r=l,i=[],u=u.slice(l.length+1),u||(u=n[":mainpath:"],u?c=1:(u="index",c=2))}return t(n,i,u,o,c,r)},(n=function(e,t,n){return function(s){return i(e,[].concat(t),s,n)}})(e,[],"")}({testcafe:{src:{client:{runner:{deps:{"hammerhead.js":function(e,n,i){e.__esModule=!0,e["default"]=t["%hammerhead%"],n.exports=e["default"]}},utils:{"iframe.js":function(e,t,n){function i(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0,e.sendRequestToFrame=void 0;var s=n("../deps/hammerhead"),o=i(s),r=o["default"].Promise,a=o["default"].eventSandbox.message;e.sendRequestToFrame=function(e,t,n){return new r(function(i){function s(e){e.message.cmd===t&&(a.off(a.SERVICE_MSG_RECEIVED_EVENT,s),i(e.message))}a.on(a.SERVICE_MSG_RECEIVED_EVENT,s),a.sendServiceMsg(e,n)})}}}},ui:{cursor:{"iframe-cursor.js":function(e,n,i){function s(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0;var o=i("./../deps/hammerhead"),r=s(o),a=i("./messages"),l=s(a),u=i("../../runner/utils/iframe"),d=r["default"].utils.browser,c=d.isIE?1:0;e["default"]={move:function(e,n){var i={cmd:l["default"].moveRequest,x:e+c,y:n+c};return(0,u.sendRequestToFrame)(i,l["default"].moveResponse,t.parent)},leftButtonDown:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].leftButtonDownRequest},l["default"].leftButtonDownResponse,t.parent)},rightButtonDown:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].rightButtonDownRequest},l["default"].rightButtonDownResponse,t.parent)},buttonUp:function(){return(0,u.sendRequestToFrame)({cmd:l["default"].buttonUpRequest},l["default"].buttonUpResponse,t.parent)}},n.exports=e["default"]},"index.js":function(e,i,s){function o(e){return e&&e.__esModule?e:{"default":e}}e.__esModule=!0;var r=s("./../deps/hammerhead"),a=o(r),l=s("./../deps/testcafe-core"),u=o(l),d=s("./messages"),c=o(d),f=a["default"].Promise,h=a["default"].shadowUI,p=a["default"].utils.browser,m=a["default"].eventSandbox.message,g=u["default"].styleUtils,v=u["default"].positionUtils,E=u["default"].eventUtils,_="cursor",w="touch",b="l-mouse-down",x="r-mouse-down",y=[b,x].join(" ");m.on(m.SERVICE_MSG_RECEIVED_EVENT,function(e){var t=e.message;switch(t.cmd){case c["default"].moveRequest:var n=v.getIframePointRelativeToParentFrame({x:t.x,y:t.y},e.source);C.move(n.x,n.y).then(function(){return m.sendServiceMsg({cmd:c["default"].moveResponse},e.source)});break;case c["default"].leftButtonDownRequest:C.leftButtonDown().then(function(){return m.sendServiceMsg({cmd:c["default"].leftButtonDownResponse},e.source)});break;case c["default"].rightButtonDownRequest:C.rightButtonDown().then(function(){return m.sendServiceMsg({cmd:c["default"].rightButtonDownResponse},e.source)});break;case c["default"].buttonUpRequest:C.buttonUp().then(function(){return m.sendServiceMsg({cmd:c["default"].buttonUpResponse},e.source)})}});var C={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){var e=this;this.cursorElement=n.createElement("div"),h.addClass(this.cursorElement,_),p.isTouchDevice&&!p.isIE&&(h.addClass(this.cursorElement,w),this.pointerOffsetX=Math.ceil(g.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(g.getHeight(this.cursorElement)/2)),h.getRoot().appendChild(this.cursorElement),E.bind(t,"scroll",function(){return e.move(e.x,e.y)})},isVisible:function(){return this.cursorElement&&"hidden"!==g.get(this.cursorElement,"visibility")},hide:function(){this.cursorElement||this._createElement(),g.set(this.cursorElement,"visibility","hidden")},show:function(){this.cursorElement||this._createElement(),g.set(this.cursorElement,"visibility","")},move:function(e,t){return this.x=e,this.y=t,this.cursorElement||this._createElement(),g.set(this.cursorElement,{left:this.x+g.getScrollLeft(n)-this.pointerOffsetX+"px",top:this.y+g.getScrollTop(n)-this.pointerOffsetY+"px"}),f.resolve()},leftButtonDown:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),h.addClass(this.cursorElement,b),f.resolve()},rightButtonDown:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),h.addClass(this.cursorElement,x),f.resolve()},buttonUp:function(){return this.cursorElement||this._createElement(),h.removeClass(this.cursorElement,y),f.resolve()}};e["default"]=C,i.exports=e["default"]},"messages.js":function(e,t,n){e.__esModule=!0,e["default"]={moveRequest:"ui|cursor|move|request",leftButtonDownRequest:"ui|cursor|leftbuttondown|request",rightButtonDownRequest:"ui|cursor|rightbuttondown|request",buttonUpRequest:"ui|cursor|buttonup|request",moveResponse:"ui|cursor|move|response",leftButtonDownResponse:"ui|cursor|leftbuttondown|response",rightButtonDownResponse:"ui|cursor|rightbuttondown|response",buttonUpResponse:"ui|cursor|buttonup|response"},t.exports=e["default"]}},deps:{"hammerhead.js":function(e,n,i){e.__esModule=!0,e["default"]=t["%hammerhead%"],n.exports=e["default"]},"testcafe-core.js":function(e,n,i){e.__esModule=!0,e["default"]=t["%testCafeCore%"],n.exports=e["default"]}},"index.js":function(n,i,s){function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}var a=s("./deps/hammerhead"),l=r(a),u=s("./select-element"),d=o(u),c=s("./modal-background"),f=o(c),h=s("./progress-panel"),p=r(h),m=s("./cursor"),g=r(m),v=s("./cursor/iframe-cursor"),E=o(v);n.cursorUI=g["default"],n.iframeCursorUI=E,n.selectElement=d,n.modalBackground=f,n.ProgressPanel=p["default"],n.get=s,n.hide=function(){l["default"].shadowUI.getRoot().style.visibility="hidden"},n.show=function(){l["default"].shadowUI.getRoot().style.visibility=""},Object.defineProperty(t,"%testCafeUI%",{enumerable:!1,configurable:!1,writable:!1,value:n}),l["default"].on(l["default"].EVENTS.evalIframeScript,function(t){return e(t.iframe.contentWindow,!0)})},"modal-background.js":function(e,i,s){function o(e){return e&&e.__esModule?e:{"default":e}}function r(){var e=_.getRoot();M=n.createElement("div"),e.appendChild(M),_.addClass(M,y),S=n.createElement("div"),S.textContent=x,e.appendChild(S),_.addClass(S,C),R=n.createElement("div"),b.set(R,"visibility","hidden"),e.appendChild(R),_.addClass(R,D)}function a(){var e=b.getHeight(t),n=b.getWidth(t),i=!b.hasDimensions(S);i&&(b.set(S,"visibility","hidden"),b.set(S,"display","block")),b.set(S,{left:Math.max((n-b.getWidth(S))/2,0)+"px",top:Math.max((e-b.getHeight(S))/2,0)+"px"}),i&&(b.set(S,"display","none"),b.set(S,"visibility",""))}function l(){var e=function(){var e=b.getHeight(t),n=b.getWidth(t);b.set(M,"width",n+"px"),b.set(M,"height",e+"px"),b.set(R,{left:Math.round((n-b.getWidth(R))/2)+"px",top:Math.round((e-b.getHeight(R))/2)+"px"})};e(),w.bind(t,"resize",e)}function u(){r(),l(),a(),O=!0}function d(){var e=!1,i=function(){u(),b.set(M,"opacity",T),b.set(M,"display","block"),b.set(S,"display","block"),e=!0},s=function o(){e||(n.body?i():t.setTimeout(o,0))};s(),w.documentReady().then(function(){e||i()})}function c(e){O||u(),b.set(M,"opacity",e?0:I),b.set(M,"display","block")}function f(){O&&(b.set(S,"display","none"),b.set(M,"display","none"))}function h(){b.set(R,"visibility","visible")}function p(){b.set(R,"visibility","hidden")}e.__esModule=!0,e.initAndShowLoadingText=d,e.show=c,e.hide=f,e.showLoadingIcon=h,e.hideLoadingIcon=p;var m=s("./deps/hammerhead"),g=o(m),v=s("./deps/testcafe-core"),E=o(v),_=g["default"].shadowUI,w=E["default"].eventUtils,b=E["default"].styleUtils,x="Loading page...",y="modal-background",C="loading-text",I=.7,T=.8,D="loading-icon",M=null,S=null,R=null,O=!1},"progress-panel":{"index.js":function(e,i,s){function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var a=s("../deps/hammerhead"),l=o(a),u=s("../deps/testcafe-core"),d=o(u),c=s("./progress-bar"),f=o(c),h=l["default"].shadowUI,p=d["default"].eventUtils,m=d["default"].styleUtils,g="progress-panel",v="title",E="content",_=100,w=10,b=300,x=200,y=600,C=1e3,I=function(){function e(){var t=this;r(this,e),this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=n.createElement("div"),h.getRoot().appendChild(this.panelDiv),this.titleDiv=n.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=n.createElement("div"),this.panelDiv.appendChild(this.contentDiv),h.addClass(this.panelDiv,g),h.addClass(this.titleDiv,v),h.addClass(this.contentDiv,E),e._showAtWindowCenter(this.panelDiv),this.progressBar=new f["default"](this.contentDiv),this.disposePanel=function(){return e._showAtWindowCenter(t.panelDiv)}}return e._getInvisibleElementProperty=function(e,t){var n="none"===m.get(e,"display");n&&m.set(e,"display","block");var i=e[t];return n&&m.set(e,"display","none"),i},e._showAtWindowCenter=function(n){var i=e._getInvisibleElementProperty(n,"offsetHeight"),s=e._getInvisibleElementProperty(n,"offsetWidth"),o=Math.round(m.getHeight(t)/2-i/2),r=Math.round(m.getWidth(t)/2-s/2);m.set(n,{left:r+"px",top:o+"px"})},e.prototype._setCurrentProgress=function(){var e=Math.round((Date.now()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(e)},e.prototype._setSuccess=function(e){this.progressBar.setSuccess(e)},e.prototype._stopAnimation=function(){t.clearInterval(this.animationInterval)},e.prototype._animate=function(e,n,i,s){var o=this,r=Date.now(),a=i?0:1,l=0,u=0,d=0;i&&(m.set(e,"opacity",a),m.set(e,"display","block")),this._stopAnimation(),this.animationInterval=t.setInterval(function(){l=Date.now()-r,u=Math.min(l/n,1),d=.5-Math.cos(u*Math.PI)/2,m.set(e,"opacity",a+(i?d:-d)),1===u&&(o._stopAnimation(),s&&s())},w)},e.prototype._showPanel=function(){p.bind(t,"resize",this.disposePanel),this._animate(this.panelDiv,x,!0)},e.prototype._hidePanel=function(e){var n=this;this.startTime=null,p.unbind(t,"resize",this.disposePanel),this._animate(this.panelDiv,e?0:y,!1,function(){return m.set(n.panelDiv,"display","none")})},e.prototype.show=function(e,n){var i=this;this.startTime=Date.now(),this.maxTimeout=n,this.titleDiv.textContent=e,this._setSuccess(!1),this.openingTimeout=t.setTimeout(function(){i.openingTimeout=null,i._setCurrentProgress(),i._showPanel(),i.updateInterval=t.setInterval(function(){return i._setCurrentProgress()},_)},b)},e.prototype.close=function(e){var n=this;e&&this._setSuccess(!0),this.openingTimeout&&(t.clearTimeout(this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(t.clearInterval(this.updateInterval),this.updateInterval=null),e?this.startTime&&Date.now()-this.startTime<C?t.setTimeout(function(){t.setTimeout(function(){return n._hidePanel(!1)},x)},_):t.setTimeout(function(){return n._hidePanel(!1)},x):this._hidePanel(!0)},e}();e["default"]=I,i.exports=e["default"]},"progress-bar.js":function(e,t,i){function s(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=i("../deps/hammerhead"),a=s(r),l=i("../deps/testcafe-core"),u=s(l),d=a["default"].shadowUI,c=u["default"].styleUtils,f="progress-bar",h="value",p="success",m=function(){function e(t){o(this,e),this.containerElement=n.createElement("div"),this.valueElement=n.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),d.addClass(this.containerElement,f),d.addClass(this.valueElement,h)}return e.prototype.setValue=function(e){e="number"!=typeof e?0:Math.min(Math.max(e,0),100),c.set(this.valueElement,"width",e+"%")},e.prototype.setSuccess=function(e){e?d.addClass(this.containerElement,p):d.removeClass(this.containerElement,p)},e}();e["default"]=m,t.exports=e["default"]}},"select-element.js":function(e,i,s){function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){(e.target||e.srcElement)===B||T.containsElement(B,e.target)||T.containsElement(j,e.target)||c()}function a(e,t){var i=n.createElement("div"),s=e.disabled||"optgroup"===T.getTagName(e.parentElement)&&e.parentElement.disabled;i.textContent=e.text,t.appendChild(i),x.addClass(i,U),s&&(x.addClass(i,P),D.set(i,"color",D.get(e,"color"))),s&&y.isWebKit?M.bind(i,"click",function(){return!1}):M.bind(i,"click",function(){var e=B.selectedIndex,t=S.indexOf(k,this),n=B.getElementsByTagName("option")[t],i=!s&&t!==e,o=y.isSafari&&y.hasTouchEvents||y.isAndroid;i&&!y.isIE&&(B.selectedIndex=t),y.isFirefox||y.isIE||!i||C.change(B),(y.isFirefox||y.isIE)&&C.mousedown(y.isFirefox?n:B),o||C.mouseup(y.isFirefox?n:B),(y.isFirefox||y.isIE)&&i&&(y.isIE&&(B.selectedIndex=t),C.change(B)),o||C.click(y.isFirefox||y.isIE?n:B),s||c()}),k.push(i)}function l(e,t){var i=n.createElement("div");i.textContent=e.label||" ",t.appendChild(i),x.addClass(i,O),i.disabled&&(x.addClass(i,P),D.set(i,"color",D.get(e,"color"))),u(e.children,i),F.push(i)}function u(e,t){for(var n=0;n<e.length;n++)T.isOptionElement(e[n])?a(e[n],t):"optgroup"===T.getTagName(e[n])&&l(e[n],t)}function d(e){var i=e.children;if(i.length){if(B){var s=e===B;if(c(),s)return}B=e,j=n.createElement("div"),x.getRoot().appendChild(j),x.addClass(j,R),u(i,j),t.setTimeout(function(){M.bind(n,"mousedown",r)},0),D.set(j,{position:"absolute",fontSize:D.get(B,"fontSize"),fontFamily:D.get(B,"fontFamily"),minWidth:D.getWidth(B)+"px",left:I.getOffsetPosition(B).left+"px",height:T.getSelectVisibleChildren(e).length>q?D.getOptionHeight(e)*q:""});var o=I.getOffsetPosition(B).top,a=D.getHeight(j),l=o+D.getHeight(B)+2;if(l+a>D.getScrollTop(t)+D.getHeight(t)){var d=o-3-a;d>=D.getScrollTop(t)&&(l=d)}D.set(j,"top",l+"px")}}function c(){T.remove(j),M.unbind(n,"mousedown",r),j=null,B=null,k=[],F=[]}function f(e){return e?e===B:!!B}function h(e){var t="optgroup"===T.getTagName(e),n=t?T.getOptionGroupIndex(B,e):T.getOptionIndex(B,e);return t?F[n]:k[n]}function p(e){var t=T.getSelectParent(e);if(t){var n=D.getSelectElementSize(t),i=D.getOptionHeight(t),s=0,o=Math.max(D.getScrollTop(t)/i,0),r=o+n-1,a=T.getChildVisibleIndex(t,e);a<o?(s=i*(o-a),D.setScrollTop(t,Math.max(D.getScrollTop(t)-s,0))):a>r&&(s=i*(a-r),D.setScrollTop(t,D.getScrollTop(t)+s))}}function m(e){var t=T.getSelectParent(e);if(!t)return{x:0,y:0};var n=D.getOptionHeight(t),i=I.getElementRectangle(e);return{x:Math.round(i.left+i.width/2),y:Math.round(i.top+n/2)}}function g(e,t){var n=D.getSelectElementSize(e),i=!D.hasDimensions(x.select("."+R)[0]);if(/down|up/.test(t)||!y.isIE&&(n<=1||y.isFirefox)&&(i||y.isFirefox)&&/left|right/.test(t)){for(var s=e.querySelectorAll("option"),o=[],r=0;r<s.length;r++){var a=s[r].parentElement;s[r].disabled||"optgroup"===T.getTagName(a)&&a.disabled||o.push(s[r])}var l=S.indexOf(o,s[e.selectedIndex]),u=l+(/down|right/.test(t)?1:-1);u>=0&&u<o.length&&(e.selectedIndex=S.indexOf(s,o[u]),C.change(e))}}function v(e){var t=T.getSelectParent(e);if(!t)return!0;var n=f(t),i=D.getSelectElementSize(t);return n||i>1}e.__esModule=!0,e.expandOptionList=d,e.collapseOptionList=c,e.isOptionListExpanded=f,e.getEmulatedChildElement=h,e.scrollOptionListByChild=p,e.getSelectChildCenter=m,e.switchOptionsByKeys=g,e.isOptionElementVisible=v;var E=s("./deps/hammerhead"),_=o(E),w=s("./deps/testcafe-core"),b=o(w),x=_["default"].shadowUI,y=_["default"].utils.browser,C=_["default"].eventSandbox.eventSimulator,I=b["default"].positionUtils,T=b["default"].domUtils,D=b["default"].styleUtils,M=b["default"].eventUtils,S=b["default"].arrayUtils,R="tcOptionList",O="tcOptionGroup",U="tcOption",P="disabled",q=y.isIE?30:20,B=null,j=null,F=[],k=[]}}}}}})("testcafe/src/client/ui/index")}e(window)}(); |
@@ -49,16 +49,12 @@ 'use strict'; | ||
case 6: | ||
_context.next = 11; | ||
_context.next = 9; | ||
break; | ||
case 8: | ||
_context.next = 10; | ||
return endpointUtils.getMyHostname(); | ||
hostname = endpointUtils.getIPAddress(); | ||
case 10: | ||
hostname = _context.sent; | ||
case 11: | ||
case 9: | ||
return _context.abrupt('return', hostname); | ||
case 12: | ||
case 10: | ||
case 'end': | ||
@@ -65,0 +61,0 @@ return _context.stop(); |
{ | ||
"name": "testcafe", | ||
"version": "0.0.21", | ||
"version": "0.0.22-alpha", | ||
"main": "lib/index", | ||
@@ -22,3 +22,3 @@ "bin": { | ||
"elegant-spinner": "^1.0.1", | ||
"endpoint-utils": "^1.0.0", | ||
"endpoint-utils": "^1.0.2", | ||
"globby": "^3.0.1", | ||
@@ -25,0 +25,0 @@ "highlight-es": "^1.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
855142
8221
Updatedendpoint-utils@^1.0.2