Innovenergy_trunk/frontend/node_modules/testcafe-hammerhead/lib/client/hammerhead.min.js

19 lines
571 KiB
JavaScript
Raw Normal View History

!function e(){!function(){function t(e){var t={exports:{}};return e(t,t.exports),t.exports}function r(){for(var e=0;e<dc.length;e++)dc[e][0](dc[e][1]);dc=[],oc=!1}function n(e,t){dc.push([e,t]),oc||(oc=!0,hc(r,0))}function o(e,t){function r(e){s(t,e)}function n(e){l(t,e)}try{e(r,n)}catch(o){n(o)}}function i(e){var t=e.owner,r=t._state,n=t._data,o=e[r],i=e.then;if("function"==typeof o){r=cc;try{n=o(n)}catch(c){l(i,c)}}a(i,n)||(r===cc&&s(i,n),r===lc&&l(i,n))}function a(e,t){var r;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"==typeof t)){var n=t.then;if("function"==typeof n)return n.call(t,function(n){r||(r=!0,t===n?c(e,n):s(e,n))},function(t){r||(r=!0,l(e,t))}),!0}}catch(o){return r||l(e,o),!0}return!1}function s(e,t){e!==t&&a(e,t)||c(e,t)}function c(e,t){e._state===ac&&(e._state=sc,e._data=t,n(p,e))}function l(e,t){e._state===ac&&(e._state=sc,e._data=t,n(h,e))}function u(e){e._then=e._then.forEach(i)}function p(e){e._state=cc,u(e)}function h(e){e._state=lc,u(e),!e._handled&&pc&&ic.process.emit("unhandledRejection",e._data,e)}function d(e){ic.process.emit("rejectionHandled",e)}function f(e){if("function"!=typeof e)throw new TypeError("Promise resolver "+e+" is not a function");if(this instanceof f==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],o(e,this)}function m(e,t){function r(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gc(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function g(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function v(e,t,r){if(r&&e[t]){var n=e[t].toString();r.toString=function(){return n}}e[t]=r}function y(e,t,r){var n=r.getter,o=r.setter,i=r.value,a=Xc.objectGetOwnPropertyDescriptor(e,t);if((n||o)&&i)throw new Error("Cannot both specify accessors and a value or writable attribute.");if(a)return i?(Xc.objectHasOwnProperty.call(a,"writable")||(a.writable=!!a.set,delete a.get,delete a.set),a.value=i):(Xc.objectHasOwnProperty.call(a,"writable")&&(delete a.value,delete a.writable),null!==n&&v(a,"get",n),null!==o&&v(a,"set",o)),a}function _(e,t,r){if(e){var n=y(e,t,r);n?Xc.objectDefineProperty(e,t,n):_(Xc.objectGetPrototypeOf(e),t,r)}}function E(e,t){var r=Xc.objectGetOwnPropertyDescriptor(e,"name");r&&(r.value=t,Xc.objectDefineProperty(e,"name",r))}function S(e,t){Xc.objectDefineProperty(e,vc.nativeStrRepresentation,{value:Xc.Function.prototype.toString.call(t),configurable:!0})}function b(e,t){E(e,t.name),S(e,t)}function w(e){return!Xc.objectHasOwnProperty.call(e,vc.nativeStrRepresentation)}function x(e,t,r){var n=e[t];w(n)&&(b(r,n),e[t]=r)}function C(e,t,r,n){void 0===n&&(n=!1);var o=e[t].prototype;x(e,t,r),r.prototype=o,n&&(o.constructor=r)}function A(e){return null===e?"null":"undefined"}function T(e){return null===e||void 0===e}function I(e){var t=typeof e;return"object"!==t&&"function"!==t}function P(e){return Mc?null==e:null===e}function N(e){return"number"==typeof e}function O(e){return"function"==typeof e}function k(e){return"string"==typeof e?e.replace(/(^\s+)|(\s+$)/g,""):e}function L(e){var t={};if(!e)return t;for(var r=0,n=El;r<n.length;r++){var o=n[r],i=o.name,a=o.flag;e.indexOf(a)>-1&&(t[i]=!0)}return t}function D(e){if(!e)return null;for(var t="",r=0,n=El;r<n.length;r++){var o=n[r],i=o.name,a=o.flag;e[i]&&(t+=a)}return t||null}function M(e){return"null"===e?"":e.replace(al,function(e,t){return t?"s*":""})}function R(e){return e?sl.test(e)?e.replace(sl,"https://"):"http://"+e:"null"}function j(e,t){if(e=e.replace(/^www./i,""),t=t.replace(/^www./i,""),e===t)return!0;var r=t.lastIndexOf(e);return"."===t[r-1]&&t.length===r+e.length}function F(e,t){if(!t)return!0;var r=z(t),n=!r.host;if(n)return!0;var o=z(e),i=G(e);if(r.host===o.host&&r.protocol===
return{type:Lu.LogicalExpression,left:e,right:r,operator:t}}function po(e){return void 0===e&&(e=null),{type:Lu.ReturnStatement,argument:e}}function ho(e,t,r,n,o){return void 0===n&&(n=!1),void 0===o&&(o=!1),{type:Lu.FunctionExpression,id:e,params:t,body:r,async:n,generator:o}}function fo(e,t){return{type:Lu.UnaryExpression,operator:e,prefix:!0,argument:t}}function mo(){return fo("void",vo(0))}function go(e,t,r){return{type:Lu.ConditionalExpression,test:e,consequent:t,alternate:r}}function vo(e){return{type:Lu.Literal,value:e}}function yo(e,t){return ro(no(e,"=",t))}function _o(e){return{type:Lu.BlockStatement,body:e}}function Eo(e,t){return void 0===t&&(t=null),{type:Lu.VariableDeclarator,id:e,init:t}}function So(e,t){return{type:Lu.VariableDeclaration,declarations:t,kind:e}}function bo(e,t){var r=[e],n=to($u.processScript);return t&&r.push(vo(!0)),oo(n,r)}function wo(e){var t=to($u.getLocation);return oo(t,[e])}function xo(e,t,r){var n=to(Yu.generateName()),o=to($u.setLocation),i=oo(o,[e,n]),a=no(e,"=",n),s=to("call"),c=ho(null,[],_o([So("var",[Eo(n,t)]),po(uo(i,"||",a))])),l=ao(c,s,!1),u=oo(l,[lo()]);return r?co([vo(0),u]):u}function Co(e,t,r){var n=to($u.setProperty);return oo(n,[t,vo(e),r])}function Ao(e,t,r,n){void 0===n&&(n=!1);var o=to($u.callMethod),i=io(r),a=[e,t,i];return n&&a.push(vo(n)),oo(o,a)}function To(e,t,r){void 0===r&&(r=!1);var n=to($u.getProperty),o=[t,vo(e)];return r&&o.push(vo(r)),oo(n,o)}function Io(e,t,r){void 0===r&&(r=!1);var n=to($u.getProperty),o=[t,e];return r&&o.push(vo(r)),oo(n,o)}function Po(e,t,r){var n=to($u.setProperty);return oo(n,[t,e,r])}function No(e){var t=to($u.getEval);return oo(t,[e])}function Oo(e,t){var r=t(String(e.value),D({isScript:!0}));return vo(r)}function ko(e,t){var r=to($u.getProxyUrl),n=[e];return t&&n.push(vo(t)),oo(r,n)}function Lo(e){var t=to($u.getPostMessage),r=e.type===Lu.MemberExpression?[e.object]:[vo(null),e];return oo(t,r)}function Do(e){var t=to($u.arrayFrom);return oo(t,[e])}function Mo(e,t){return no(e,"=",so(e,"+",t))}function Ro(e){var t=to($u.processHtml),r=to("parent"),n=to("window"),o=ao(r,t,!1),i=oo(o,[n,e.expression]);return ro(i)}function jo(e){for(var t=[],r=0,n=e;r<n.length;r++){var o=n[r];t.push(Eo(to(o)))}return So("var",t)}function Fo(e){return rp(Zu,String(e))}function Ho(e){return rp(ep,String(e))}function Uo(e,t,r,n){var o=r[n];o instanceof Array?e?o[o.indexOf(e)]=t:o.unshift(t):r[n]=t,e?(t.originStart=t.start=e.start,t.originEnd=t.end=e.end):t.start=t.end=t.originStart=t.originEnd=o[1]?o[1].start:r.start+1}function Bo(e,t){for(var r=[],n=[],o=0,i=e.body;o<i.length;o++){var a=i[o];a.type===Lu.VariableDeclaration&&r.push.apply(r,a.declarations)}for(var s=0,c=r;s<c.length;s++){var l=c[s];if(l.type===Lu.VariableDeclarator&&(l.id.type===Lu.Identifier&&n.push(l.id),l.id.type===Lu.ArrayPattern&&n.push.apply(n,l.id.elements),l.id.type===Lu.ObjectPattern))for(var u=0,p=l.id.properties;u<p.length;u++){var h=p[u];"value"in h&&n.push(h.value)}}for(var d=0,f=n;d<f.length;d++){var m=f[d];m&&m.type===Lu.Identifier&&t(m)}}function Vo(e){var t,r=e.left,n=[],o=(null===(t=r.declarations[0])||void 0===t?void 0:t.id.type)===Lu.ArrayPattern,i=e.body.type===Lu.BlockStatement;if(o&&i){var a=r.declarations[0].id,s=a.elements;Bo(e.body,function(e){for(var t=0,r=s;t<r.length;t++){var o=r[t];o&&o.name===e.name&&n.push(o)}});for(var c=0,l=n;c<l.length;c++){var u=l[c],p=to(Yu.generateName());Uo(u,p,a,"elements")}}}function Wo(e,t,r,n){var o=e.value,i=e.computed||e.key.type===Lu.Literal,a=ao(t,e.key,i);Yo(o,a,r,n)}function Go(e,t){var r=to($u.restObject);return oo(r,[e,io(t)])}function qo(e,t){var r=to($u.restArray);return oo(r,[e,vo(t)])}function zo(e,t,r){if(e.type===Lu.Identifier&&Yu.isHHTempVariable(e.name))return e;var n=to(r||Yu.generateName(r));return t(n,e,!0),n}function Ko(e,t,r,n){if(t){var o=e.properties,i=o.length&&o[o.length-1].type===Lu.RestElement,a=zo(t,r,n),s=[],c=[];if(n||(n=a.name),i)for(var l=0;l<o.length-1;l++){var u=o[l],p=u.key;if(p.type===Lu.Identifier)s.push(u.computed?p:vo(p.name));else if(p.type===Lu.Literal)s.push(p);else{var h=to(Yu.gen
var o=n,i=o.slice(0,o.lastIndexOf("/"));e.path=i||"/"}e.expires||(e.expires="Infinity"),isNaN(e.maxAge)&&(e.maxAge="Infinity")}function js(e,t){if(!t)return!0;if(e=e.toLowerCase(),t=t.toLowerCase(),e===t)return!0;var r=e.indexOf(t);return r>0&&e.length===t.length+r&&"."===e.charAt(r-1)}function Fs(e,t){return!t||"/"!==t.charAt(0)||e===t||e.length>t.length&&0===e.indexOf(t)&&("/"===t.charAt(t.length-1)||"/"===e.charAt(t.length))}function Hs(e){if(arguments.length){if(isNaN(e))return null}else e=Xc.dateNow();return e=1e3*Math.floor(e/1e3),new Xc.date(e)}function Us(){return new mc(function(e){return Xc.setTimeout.call(window,e,0)})}function Bs(e){e=e.replace(/\r\n$/,"");var t=[];if(""===e)return t;e=e.split(/\r\n/);for(var r=0,n=e;r<n.length;r++){var o=n[r];"#"!==o&&t.push(o)}return t}function Vs(e){return"text"===e?"text/plain":"url"===e?"text/uri-list":e}function Ws(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e=e||{};var n=null,o=null;"object"!=typeof e&&"[object Function]"!==e.toString()&&(e={});for(var i=0;i<t.length;i++)if(n=t[i],null!==n)for(var a in n)o=n[a],e!==o&&void 0!==o&&(e[a]=o);return e}function Gs(e){return e.configurable=!0,e.enumerable=!0,e}function qs(e){return gv+e}function zs(e){return e.indexOf(gv)>-1}function Ks(e){return e.replace(gv,"")}function $s(e){var t=String(e).toLowerCase();return t===nd.wwwAuthenticate||t===nd.proxyAuthenticate}function Xs(e){return vv+e}function Ys(e){return e.indexOf(vv)>-1}function Qs(e){return e.replace(vv,"")}function Js(e){var t=String(e).toLowerCase();return t===nd.authorization||t===nd.proxyAuthorization}function Zs(e){switch(e=String(e).toLowerCase()){case"omit":return fc.omit;case"same-origin":return fc.sameOrigin;case"include":return fc.include;default:return fc.unknown}}function ec(e,t){return Mv+e+"|"+t}function tc(){var e=new Xc.Uint16Array(1);return Xc.cryptoGetRandomValues.call(Xc.crypto,e),e[0]}function rc(){return new mc(Es)}function nc(){var e=Xc.querySelector.call(document,uy);e&&Yi(e)}var oc,ic="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ac="pending",sc="settled",cc="fulfilled",lc="rejected",uc=function(){},pc="undefined"!=typeof ic&&"undefined"!=typeof ic.process&&"function"==typeof ic.process.emit,hc="undefined"==typeof setImmediate?setTimeout:setImmediate,dc=[];f.prototype={constructor:f,_state:ac,_then:null,_data:void 0,_handled:!1,then:function(e,t){var r={owner:this,then:new this.constructor(uc),fulfilled:e,rejected:t};return!t&&!e||this._handled||(this._handled=!0,this._state===lc&&pc&&n(d,this)),this._state===cc||this._state===lc?n(i,r):this._then.push(r),r.then},"catch":function(e){return this.then(null,e)}},f.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new f(function(t,r){function n(e){return a++,function(r){i[e]=r,--a||t(i)}}for(var o,i=[],a=0,s=0;s<e.length;s++)o=e[s],o&&"function"==typeof o.then?o.then(n(s),r):i[s]=o;a||t(i)})},f.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new f(function(t,r){for(var n,o=0;o<e.length;o++)n=e[o],n&&"function"==typeof n.then?n.then(t,r):t(n)})},f.resolve=function(e){return e&&"object"==typeof e&&e.constructor===f?e:new f(function(t){t(e)})},f.reject=function(e){return new f(function(t,r){r(e)})};var fc,mc=f,gc=function(e,t){return(gc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},vc={processDomMethodName:"hammerhead|process-dom-method",processedContext:"hammerhead|processed-context",documentWasCleaned:"hammerhead|document-was-cleaned",documentCharset:"hammerhead|document-charset",iframeNativeMethods:"hammerhead|iframe-native-methods",hammerhead:"%hammerhead%",selection:"hammerhead|selection",shadowUIElement:"hammerhead|shadow-ui-element",forceProxySrcForImage:"hammerhead|image|force-proxy-src-flag",skipNextLoadEventForImage:"hammerhead|i
this.historyReplaceState=e.history&&e.history.replaceState,this.postMessage=e.postMessage||r.postMessage,this.windowOpen=e.open||r.open,this.setTimeout=e.setTimeout||r.setTimeout,this.setInterval=e.setInterval||r.setInterval,this.clearTimeout=e.clearTimeout||r.clearTimeout,this.clearInterval=e.clearInterval||r.clearInterval,this.registerProtocolHandler=e.navigator.registerProtocolHandler,this.sendBeacon=e.Navigator&&e.Navigator.prototype.sendBeacon,e.XMLHttpRequest){var n=(e.EventTarget||e.XMLHttpRequest).prototype;this.xhrAbort=e.XMLHttpRequest.prototype.abort,this.xhrOpen=e.XMLHttpRequest.prototype.open,this.xhrSend=e.XMLHttpRequest.prototype.send,this.xhrAddEventListener=n.addEventListener,this.xhrRemoveEventListener=n.removeEventListener,this.xhrDispatchEvent=n.dispatchEvent,this.xhrGetResponseHeader=e.XMLHttpRequest.prototype.getResponseHeader,this.xhrGetAllResponseHeaders=e.XMLHttpRequest.prototype.getAllResponseHeaders,this.xhrSetRequestHeader=e.XMLHttpRequest.prototype.setRequestHeader,this.xhrOverrideMimeType=e.XMLHttpRequest.prototype.overrideMimeType}try{this.registerServiceWorker=e.navigator.serviceWorker.register,this.getRegistrationServiceWorker=e.navigator.serviceWorker.getRegistration}catch(o){this.registerServiceWorker=null,this.getRegistrationServiceWorker=null}this.createContextualFragment=e.Range&&e.Range.prototype.createContextualFragment;var i=e.performance;if(i){var a=e.performance.now||e.Performance.prototype.now;this.performanceNow=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.apply(i,e)}}if(this.fetch=e.fetch,this.Request=e.Request,e.Headers&&(this.Headers=e.Headers,this.headersSet=e.Headers.prototype.set,this.headersGet=e.Headers.prototype.get,this.headersDelete=e.Headers.prototype["delete"],this.headersEntries=e.Headers.prototype.entries,this.headersForEach=e.Headers.prototype.forEach,this.headersValues=e.Headers.prototype.values),this.windowAddEventListener=e.addEventListener||r.addEventListener,this.windowRemoveEventListener=e.removeEventListener||r.removeEventListener,this.windowDispatchEvent=e.dispatchEvent,this.WindowPointerEvent=e.PointerEvent||r.PointerEvent,this.WindowMSPointerEvent=e.MSPointerEvent||r.MSPointerEvent,this.WindowTouch=e.Touch||r.Touch,this.WindowTouchEvent=e.TouchEvent||r.TouchEvent,this.WindowKeyboardEvent=e.KeyboardEvent||r.KeyboardEvent,this.WindowFocusEvent=e.FocusEvent||r.FocusEvent,this.WindowTextEvent=e.TextEvent||r.TextEvent,this.WindowInputEvent=e.InputEvent||r.InputEvent,this.WindowMouseEvent=e.MouseEvent||r.MouseEvent,this.eventTargetGetter=e.Object.getOwnPropertyDescriptor(e.Event.prototype,"target").get,this.canvasContextDrawImage=e.CanvasRenderingContext2D&&e.CanvasRenderingContext2D.prototype.drawImage,this.formDataAppend=e.FormData&&e.FormData.prototype.append,this.date=e.Date,this.dateNow=e.Date.now,this.math=e.Math,this.mathRandom=e.Math.random,this.objectToString=e.Object.prototype.toString,this.objectAssign=e.Object.assign,this.objectKeys=e.Object.keys,this.objectDefineProperty=e.Object.defineProperty,this.objectDefineProperties=e.Object.defineProperties,this.objectCreate=e.Object.create,this.objectIsExtensible=e.Object.isExtensible,this.objectIsFrozen=e.Object.isFrozen,this.objectGetOwnPropertyDescriptor=e.Object.getOwnPropertyDescriptor,this.objectHasOwnProperty=e.Object.hasOwnProperty,this.objectGetOwnPropertyNames=e.Object.getOwnPropertyNames,this.objectGetPrototypeOf=e.Object.getPrototypeOf,this.objectSetPrototypeOf=e.Object.setPrototypeOf,this.objectGetOwnPropertySymbols=e.Object.getOwnPropertySymbols,this.arraySlice=e.Array.prototype.slice,this.arrayConcat=e.Array.prototype.concat,this.arrayFilter=e.Array.prototype.filter,this.arrayFind=e.Array.prototype.find,this.arrayMap=e.Array.prototype.map,this.arrayJoin=e.Array.prototype.join,this.arraySplice=e.Array.prototype.splice,this.arrayUnshift=e.Array.prototype.unshift,this.arrayForEach=e.Array.prototype.forEach,this.arrayIndexOf=e.Array.prototype.indexOf,this.arraySome=e.Array.prototype.some,this.arrayEvery=e.Array.prototype.every,this.arrayReverse=e.Array.protot
Vn(e)},ExportBatchSpecifier:function(){Gu.js+="*"},ArrayPattern:zn,ArrayExpression:zn,ClassExpression:function(e){var t=e.id,r=e.superClass,n=e.body,o="class";if(t){var i=Yn(t,Fu.e9);o=Rn(o,i)}if(r){var a=Yn(r,Fu.e4);a=Rn("extends",a),o=Rn(o,a)}Gu.js+=o+Gu.optSpace,zu[n.type](n,Fu.s2)},MetaProperty:function(e,t){var r=e.meta,n=e.property,o=Du.Member<t.precedence;o&&(Gu.js+="("),Gu.js+=("string"==typeof r?r:r.name)+"."+("string"==typeof n?n:n.name),o&&(Gu.js+=")")},MethodDefinition:function(e){var t=e["static"]?"static"+Gu.optSpace:"",r=Yn(e.key,Fu.e5);e.computed&&(r="["+r+"]"),"get"===e.kind||"set"===e.kind?(r=Rn(e.kind,r),Gu.js+=Rn(t,r)):e.value.generator?Gu.js+=t+"*"+r:e.value.async?Gu.js+=t+"async "+r:Gu.js+=Rn(t,r),Vn(e.value)},Property:function(e){var t=e.value,r=e.kind,n=Yn(e.key,Fu.e4);e.computed&&(n="["+n+"]"),"get"===r||"set"===r?(Gu.js+=r+Gu.space+n,Vn(t)):e.shorthand?Gu.js+=n:e.method?(t.generator?n="*"+n:t.async&&(n="async "+n),Gu.js+=n,Vn(t)):(Gu.js+=n+":"+Gu.optSpace,qu[t.type](t,Fu.e4))},ObjectExpression:function(e){var t=e.properties,r=t.length;if(r){var n=r-1,o=jn();Gu.js+="{";for(var i=0;i<r;i++){var a=t[i],s=a.type||ku.Property;Gu.js+=Gu.newline+Gu.indent,qu[s](a,Fu.e5),i!==n&&(Gu.js+=",")}Gu.indent=o,Gu.js+=Gu.newline+Gu.indent+"}"}else Gu.js+="{}"},ObjectPattern:function(e){var t=e.properties,r=t.length;if(r){var n=r-1,o=!1;if(1===r)o=t[0].value.type!==ku.Identifier;else for(var i=0;i<r;i++)if(!t[i].shorthand){o=!0;break}Gu.js+=o?"{"+Gu.newline:"{";for(var a=jn(),s=","+(o?Gu.newline:Gu.optSpace),i=0;i<r;i++){var c=t[i];o&&(Gu.js+=Gu.indent),qu[c.type](c,Fu.e5),i!==n&&(Gu.js+=s)}Gu.indent=a,Gu.js+=o?Gu.newline+Gu.indent+"}":"}"}else Gu.js+="{}"},ThisExpression:function(){Gu.js+="this"},Identifier:function(e,t,r){Gu.js+=e.name},ImportExpression:function(e,t){var r=Du.Call<t.precedence,n=e.source;r&&(Gu.js+="("),Gu.js+="import(",qu[n.type](n,Fu.e4),Gu.js+=")",r&&(Gu.js+=")")},ImportSpecifier:function(e){Gu.js+=e.imported.name,e.local&&(Gu.js+=Gu.space+"as"+Gu.space+e.local.name)},ExportSpecifier:function(e){Gu.js+=e.local.name,e.exported&&(Gu.js+=Gu.space+"as"+Gu.space+e.exported.name)},ChainExpression:function(e,t){var r=Du.OptionalChaining<t.precedence,n=e.expression;t=t||{};var o={precedence:Du.OptionalChaining,allowIn:t.allowIn,allowCall:t.allowCall,allowUnparenthesizedNew:t.allowUnparenthesizedNew};r&&(o.allowCall=!0,Gu.js+="("),qu[n.type](n,o),r&&(Gu.js+=")")},Literal:function(e){if(au.raw&&void 0!==e.raw)Gu.js+=e.raw;else if(null===e.value)Gu.js+="null";else{var t=typeof e.value;"string"===t?Gu.js+=Mn(e.value):"number"===t?Gu.js+=Pn(e.value):"boolean"===t?Gu.js+=e.value?"true":"false":Gu.js+=On(e.value)}},GeneratorExpression:Kn,ComprehensionExpression:Kn,ComprehensionBlock:function(e){var t=e.left,r=void 0,n=Yn(e.right,Fu.e5);r=t.type===ku.VariableDeclaration?t.kind+Gu.space+Qn(t.declarations[0],Fu.s6):Yn(t,Fu.e10),r=Rn(r,e.of?"of":"in"),Gu.js+="for"+Gu.optSpace+"("+Rn(r,n)+")"},RestElement:function(e){Gu.js+="..."+e.argument.name},SpreadElement:function(e){var t=e.argument;Gu.js+="...",qu[t.type](t,Fu.e4)},TaggedTemplateExpression:function(e,t){var r=e.tag,n=e.quasi,o=Du.TaggedTemplate<t.precedence;o&&(Gu.js+="("),qu[r.type](r,Fu.e11(t.allowCall)),qu[n.type](n,Fu.e12),o&&(Gu.js+=")")},TemplateElement:function(e){Gu.js+=e.value.raw},TemplateLiteral:function(e){var t=e.quasis,r=e.expressions,n=t.length,o=n-1;Gu.js+="`";for(var i=0;i<n;++i){var a=t[i];if(qu[a.type](a,Fu.e13),i!==o){var s=r[i];Gu.js+="${"+Gu.optSpace,qu[s.type](s,Fu.e5),Gu.js+=Gu.optSpace+"}"}}Gu.js+="`"},Super:function(){Gu.js+="super"}},Vu=/^{|^class(?:\s|{)|^(async )?function(?:\s|\*|\()/,Wu={BlockStatement:function(e,t){var r=e.body,n=r.length,o=n-1,i=jn();Gu.js+="{"+Gu.newline;for(var a=0;a<n;a++){var s=r[a];Gu.js+=Gu.indent,zu[s.type](s,Fu.s1(t.functionBody,a===o)),Gu.js+=Gu.newline}Gu.indent=i,Gu.js+=Gu.indent+"}"},BreakStatement:function(e,t){e.label?Gu.js+="break "+e.label.name:Gu.js+="break",!nu&&t.semicolonOptional||(Gu.js+=";")},ContinueStatement:function(e,t){e.label?Gu.js+="continue "+e.label.name:Gu.js+="continue",!n
l=u=null;var d=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],f=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239]}),rh=t(function(e,t){function r(e,t){return new o(e,{beforeExpr:!0,binop:t})}function n(e,t){return void 0===t&&(t={}),t.keyword=e,s[e]=new o(e,t)}t.__esModule=!0,t.types=t.keywords=t.TokenType=void 0;var o=function(){function e(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null}return e}();t.TokenType=o;var i={beforeExpr:!0},a={startsExpr:!0},s={};t.keywords=s;var c={num:new o("num",a),regexp:new o("regexp",a),string:new o("string",a),name:new o("name",a),privateId:new o("privateId",a),eof:new o("eof"),bracketL:new o("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new o("]"),braceL:new o("{",{beforeExpr:!0,startsExpr:!0}),braceR:new o("}"),parenL:new o("(",{beforeExpr:!0,startsExpr:!0}),parenR:new o(")"),comma:new o(",",i),semi:new o(";",i),colon:new o(":",i),dot:new o("."),question:new o("?",i),questionDot:new o("?."),arrow:new o("=>",i),template:new o("template"),invalidTemplate:new o("invalidTemplate"),ellipsis:new o("...",i),backQuote:new o("`",a),dollarBraceL:new o("${",{beforeExpr:!0,startsExpr:!0}),eq:new o("=",{beforeExpr:!0,isAssign:!0}),assign:new o("_=",{beforeExpr:!0,isAssign:!0}),incDec:new o("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new o("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:r("||",1),logicalAND:r("&&",2),bitwiseOR:r("|",3),bitwiseXOR:r("^",4),bitwiseAND:r("&",5),equality:r("==/!=/===/!==",6),relational:r("</>/<=/>=",7),bitShift:r("<</>>/>>>",8),plusMin:new o("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:r("%",10),star:r("*",10),slash:r("/",10),starstar:new o("**",{beforeExpr:!0}),coalesce:r("??",1),_break:n("break"),_case:n("case",i),_catch:n("catch"),_continue:n("continue"),_debugger:n("debugger"),_default:n("default",i),_do:n("do",{isLoop:!0,beforeExpr:!0}),_else:n("else",
this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==rh.types.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(rh.types._default)){this.checkExport(t,"default",this.lastTokStart);var r=void 0;if(this.type===rh.types._function||(r=this.isAsyncFunction())){var n=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(n,vh|_h,!1,r)}else if(this.type===rh.types._class){var o=this.startNode();e.declaration=this.parseClass(o,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==rh.types.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i,a=Si(e.specifiers);!(i=a()).done;){var s=i.value;this.checkUnreserved(s.local),this.checkLocalExport(s.local),"Literal"===s.local.type&&this.raise(s.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},dh.checkExport=function(e,t,r){e&&((0,oh.hasOwn)(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)},dh.checkPatternExport=function(e,t){var r=t.type;if("Identifier"===r)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===r)for(var n,o=Si(t.properties);!(n=o()).done;){var i=n.value;this.checkPatternExport(e,i)}else if("ArrayPattern"===r)for(var a,s=Si(t.elements);!(a=s()).done;){var c=a.value;c&&this.checkPatternExport(e,c)}else"Property"===r?this.checkPatternExport(e,t.value):"AssignmentPattern"===r?this.checkPatternExport(e,t.left):"RestElement"===r?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===r&&this.checkPatternExport(e,t.expression)},dh.checkVariableExport=function(e,t){if(e)for(var r,n=Si(t);!(r=n()).done;){var o=r.value;this.checkPatternExport(e,o.id)}},dh.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},dh.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(rh.types.braceL);!this.eat(rh.types.braceR);){if(r)r=!1;else if(this.expect(rh.types.comma),this.afterTrailingComma(rh.types.braceR))break;var n=this.startNode();n.local=this.parseModuleExportName(),n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local,this.checkExport(e,n.exported["Identifier"===n.exported.type?"name":"value"],n.exported.start),t.push(this.finishNode(n,"ExportSpecifier"))}return t},dh.parseImport=function(e){return this.next(),this.type===rh.types.string?(e.specifiers=gh,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===rh.types.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},dh.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===rh.types.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLValSimple(r.local,sh.BIND_LEXICAL),e.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(rh.types.comma))return e}if(this.type===rh.types.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLValSimple(r.local,sh.BIND_LEXICAL),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(rh.types.braceL);!this.eat(rh.types.braceR);){if(t)t=!1;else if(this.expect(rh.types.comma),this.afterTrailingComma(rh.types.braceR))break;var r=this.startNode();r.imported=this.parseModuleExportName(),this.eatContextual("as")?r.local=this.parseIdent():(this.che
this.options.ecmaVersion>=8&&(e.async=!1)},bh.parseMethod=function(e,t,r){var n=this.startNode(),o=this.yieldPos,i=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,sh.functionFlags)(t,n.generator)|sh.SCOPE_SUPER|(r?sh.SCOPE_DIRECT_SUPER:0)),this.expect(rh.types.parenL),n.params=this.parseBindingList(rh.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=o,this.awaitPos=i,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")},bh.parseArrowExpression=function(e,t,r,n){var o=this.yieldPos,i=this.awaitPos,a=this.awaitIdentPos;return this.enterScope((0,sh.functionFlags)(r,!1)|sh.SCOPE_ARROW),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=o,this.awaitPos=i,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},bh.parseFunctionBody=function(e,t,r,n){var o=t&&this.type!==rh.types.braceL,i=this.strict,a=!1;if(o)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!s||(a=this.strictDirective(this.end),a&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!i&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,sh.BIND_OUTSIDE),e.body=this.parseBlock(!1,void 0,a&&!i),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},bh.isSimpleParamList=function(e){for(var t,r=Pi(e);!(t=r()).done;){var n=t.value;if("Identifier"!==n.type)return!1}return!0},bh.checkParams=function(e,t){for(var r,n=Object.create(null),o=Pi(e.params);!(r=o()).done;){var i=r.value;this.checkLValInnerPattern(i,sh.BIND_VAR,t?null:n)}},bh.parseExprList=function(e,t,r,n){for(var o=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(rh.types.comma),t&&this.afterTrailingComma(e))break;var a=void 0;r&&this.type===rh.types.comma?a=null:this.type===rh.types.ellipsis?(a=this.parseSpread(n),n&&this.type===rh.types.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):a=this.parseMaybeAssign(!1,n),o.push(a)}return o},bh.checkUnreserved=function(e){var t=e.start,r=e.end,n=e.name;if(this.inGenerator&&"yield"===n&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===n&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===n&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==n&&"await"!==n||this.raise(t,"Cannot use ".concat(n," in class static initialization block")),this.keywords.test(n)&&this.raise(t,"Unexpected keyword '".concat(n,"'")),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var o=this.strict?this.reservedWordsStrict:this.reservedWords;o.test(n)&&(this.inAsync||"await"!==n||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '".concat(n,"' is reserved")))}},bh.parseIdent=function(e,t){var r=this.startNode();return this.type===rh.types.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,"class"!==r.name&&"function"!==r.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(r,"Identifier"),e||(this.checkUnreserved(r),"await"!==r.name||this.awaitIdentPos||(this.awaitIdentPos=r.start)),r},bh.parsePrivateIdent=function(){var e=this.startNode();return this.type===rh.types.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"Pri
}return this.finishOp(124===e?rh.types.logicalOR:rh.types.logicalAND,2)}return 61===t?this.finishOp(rh.types.assign,2):this.finishOp(124===e?rh.types.bitwiseOR:rh.types.bitwiseAND,1)},a.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(rh.types.assign,2):this.finishOp(rh.types.bitwiseXOR,1)},a.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!nh.lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(rh.types.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(rh.types.assign,2):this.finishOp(rh.types.plusMin,1)},a.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+r)?this.finishOp(rh.types.assign,r+1):this.finishOp(rh.types.bitShift,r)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(r=2),this.finishOp(rh.types.relational,r)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},a.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(rh.types.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(rh.types.arrow)):this.finishOp(61===e?rh.types.eq:rh.types.prefix,1)},a.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(rh.types.questionDot,2)}if(63===t){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(61===r)return this.finishOp(rh.types.assign,3)}return this.finishOp(rh.types.coalesce,2)}}return this.finishOp(rh.types.question,1)},a.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;return e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),(0,th.isIdentifierStart)(t,!0)||92===t)?this.finishToken(rh.types.privateId,this.readWord1()):void this.raise(this.pos,"Unexpected character '"+o(t)+"'")},a.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(rh.types.parenL);case 41:return++this.pos,this.finishToken(rh.types.parenR);case 59:return++this.pos,this.finishToken(rh.types.semi);case 44:return++this.pos,this.finishToken(rh.types.comma);case 91:return++this.pos,this.finishToken(rh.types.bracketL);case 93:return++this.pos,this.finishToken(rh.types.bracketR);case 123:return++this.pos,this.finishToken(rh.types.braceL);case 125:return++this.pos,this.finishToken(rh.types.braceR);case 58:return++this.pos,this.finishToken(rh.types.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(rh.types.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(rh.types.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+o(e)+"'")},a.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)},a.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(nh.l
},setter:function(e){var r=Le(t.location.toString(),Xc.anchorSearchSetter,e,p);return t.location=r,n(r),e}}),u.origin=y(l,"origin",{getter:function(){return V(ye())},setter:function(e){return e}}),u.hash=y(l,"hash",{getter:function(){return t.location.hash},setter:function(e){return t.location.hash=e,e}}),t.location.ancestorOrigins){var f=Xc.objectCreate(null),m=new Cd,g=function(e,t){var n=m.increment();f[n]=t,r.sendServiceMsg({id:n,cmd:Ad},e)};r&&r.on(r.SERVICE_MSG_RECEIVED_EVENT,function(e){var t=e.message,n=e.source;if(t.cmd===Ad)r.sendServiceMsg({id:t.id,cmd:Td,origin:o.origin},n);else if(t.cmd===Td){var i=f[t.id];i&&i(t.origin)}});var v=new bd(t,r?g:void 0);u.ancestorOrigins=y(l,"ancestorOrigins",{getter:function(){return v}})}var _=function(e,r){u[e]=y(l,e,{getter:function(){var r=Nt(t),n=r&&Jt(r),o=n?t.location:ye();return o[e]},setter:function(e){var o=Le(t.location.toString(),r,e,p);return t.location=o,n(o),e}})};if(_("port",Xc.anchorPortSetter),_("host",Xc.anchorHostSetter),_("hostname",Xc.anchorHostnameSetter),_("pathname",Xc.anchorPathnameSetter),_("protocol",Xc.anchorProtocolSetter),u.assign=y(l,"assign",{value:function(e){var r=d(e),o=t.location.assign(r);return n(r),o}}),u.replace=y(l,"replace",{value:function(e){var r=d(e),o=t.location.replace(r);return n(r),o}}),u.reload=y(l,"reload",{value:function(){var e=t.location.reload();return n(t.location.toString()),e}}),u.toString=y(l,"toString",{value:h}),!c&&Xc.objectHasOwnProperty.call(t.location,"valueOf")&&(u.valueOf=y(l,"valueOf",{value:function(){return o}})),Xc.objectDefineProperties(o,u),Rc)return o;for(var E=Xc.objectKeys(Location.prototype),S=o,b=function(e,r){if(O(e[r])){var n=e[r];e[r]=function(){var e=this===S?t.location:this;return n.apply(e,arguments)}}},w=0,x=E;w<x.length;w++){var C=x[w];if(!(C in u)){var A=Xc.objectGetOwnPropertyDescriptor(Location.prototype,C);b(A,"get"),b(A,"set"),b(A,"value"),Xc.objectDefineProperty(S,C,A),Xc.consoleMeths.log("testcafe-hammerhead: unwrapped Location.prototype.".concat(C," descriptor!"))}}return o}return m(t,e),t}(Id);O(Location)?b(Pd,Location):Pd.toString=function(){return Location.toString()};var Nd,Od="hammerhead|location-wrapper",kd=function(e){function t(t){var r=e.call(this)||this;return r._messageSandbox=t,r.LOCATION_CHANGED_EVENT="hammerhead|event|location-changed",r._locationChangedEventCallback=function(e){return r.emit(r.LOCATION_CHANGED_EVENT,e)},r}return m(t,e),t.isLocationWrapper=function(e){return e instanceof Pd},t.getLocationWrapper=function(e){if(Mc&&Bt(window,e))return e.location;try{return e[Od]}catch(t){return e.location}},t.prototype.attach=function(t){e.prototype.attach.call(this,t);var r=t.document,n=new Pd(t,this._messageSandbox,this._locationChangedEventCallback);Xc.objectDefineProperty(t,Od,{value:n,configurable:!0}),Xc.objectDefineProperty(r,Od,{value:n,configurable:!0}),Xc.objectDefineProperty(t,$u.getLocation,{value:function(e){return Mr(e)?n:e},configurable:!0}),Xc.objectDefineProperty(t,$u.setLocation,{value:function(e,t){return Mr(e)&&"string"==typeof t?(n.href=t,t):null},configurable:!0})},t}(Ou),Ld="hammerhead|iframe-window-inited",Dd=function(e){function t(t,r){var n=e.call(this)||this;return n._nodeMutation=t,n._cookieSandbox=r,n.RUN_TASK_SCRIPT_EVENT="hammerhead|event|run-task-script",n.EVAL_HAMMERHEAD_SCRIPT_EVENT="hammerhead|event|eval-hammerhead-script",n.EVAL_EXTERNAL_SCRIPT_EVENT="hammerhead|event|eval-external-script",n.IFRAME_DOCUMENT_CREATED_EVENT="hammerhead|event|iframe-document-created",n.on(n.RUN_TASK_SCRIPT_EVENT,n.iframeReadyToInitHandler),n._nodeMutation.on(n._nodeMutation.IFRAME_ADDED_TO_DOM_EVENT,function(e){return n.processIframe(e)}),n.iframeNativeMethodsBackup=null,n}return m(t,e),t.prototype._shouldSaveIframeNativeMethods=function(e){if(!Wc)return!1;var t=this.nativeMethods.getAttribute.call(e,"src");return _d.isJsProtocol(t)},t.prototype._ensureIframeNativeMethodsForChrome=function(e){var t=Xc.contentWindowGetter.call(e),r=Xc.contentDocumentGetter.call(e);this.iframeNativeMethodsBackup?(this.iframeNativeMethodsBackup.restoreDocumentMeths(t,r),this
t=e.namespaceURI?Xc.getAttributeNodeNS.call(this,e.namespaceURI,r):Xc.getAttributeNode.call(this,r),t&&Xc.removeAttributeNode.call(this,t)},t.prototype.removeAttributeCore=function(e,r,n){var o,i,a,s=n===uf.Ns,c=n===uf.Node;c?(i=r[0],o=i.name,a=t._removeStoredAttrNode):(o=String(r[s?1:0]),a=s?Xc.removeAttributeNS:Xc.removeAttribute);var l=o.toLowerCase(),u=Gt(e),p=void 0;if(Af.isUrlAttr(e,l,s?r[0]:null)||"sandbox"===l||"autocomplete"===l||Af.EVENTS.indexOf(l)!==-1||"target"===l&&_d.isTagWithTargetAttr(u)||"formtarget"===l&&_d.isTagWithFormTargetAttr(u)){var h=_d.getStoredAttrName(o);"autocomplete"===l?Xc.setAttribute.call(e,h,Af.AUTOCOMPLETE_ATTRIBUTE_ABSENCE_MARKER):a.apply(e,s?[r[0],h]:[c?i:h])}else if(s||"rel"!==l||"link"!==u){if(!s&&"required"===l&&wr(e)){var d=_d.getStoredAttrName(o);a.call(e,c?i:d)}else if(!s&&"type"===l&&tr(e)){var d=_d.getStoredAttrName("required");if(Xc.hasAttribute.call(e,d)){var f=Xc.getAttribute.call(e,d);Xc.setAttribute.call(e,"required",f),Xc.removeAttribute.call(e,d)}}}else{var m=_d.getStoredAttrName(o);a.apply(e,[c?i:m])}if(t._isHrefAttrForBaseElement(e,l)&&wl.updateBase(Tl(),this.document),"autocomplete"!==l)if(c){for(var g=[Xc.getAttributeNodeNS.call(e,i.namespaceURI,i.name)],v=1,y=r.length;v<y;++v)g.push(r[v]);p=Xc.removeAttributeNode.apply(e,g)}else{var _=s?Xc.removeAttributeNS:Xc.removeAttribute;p=_.apply(e,r)}return("target"===l&&_d.isTagWithTargetAttr(u)||"formtarget"===l&&_d.isTagWithFormTargetAttr(u))&&t._onTargetChanged(e),p},t._getChildNodesArray=function(e,t){var r=[],n=t[0],o=t[1];if(0===e.length)return r;for(var i=n;i<o;i++){var a=e[i];if($r(a)){var s=Xc.nodeChildNodesGetter.call(a);r.push.apply(r,mn(s))}else"string"!=typeof a&&r.push(a)}return r},t._ensureStringArguments=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=[],n=0;n<e.length;n++)r.push(String(e[n]));return r},t.prototype._addNodeCore=function(e,r,n,o,i,a,s){void 0===a&&(a=!0),void 0===s&&(s=!1),this._prepareNodesForInsertion(o,n,e,s);var c=null,l=t._getChildNodesArray(o,n);if(a&&Cr(e)&&Kt(e)){var u=Xc.arraySlice.apply(o,n);c=this._shadowUI.insertBeforeRoot(u)}else c=i.apply(r,o);for(var p=0,h=l;p<h.length;p++){var d=h[p];this._onElementAdded(d)}return c},t.prototype._removeNodeCore=function(e,t,r,n){this._onRemoveFileInputInfo(r),this._onRemoveIframe(r);var o=n.apply(e,t);return this._onElementRemoved(r),o},t.prototype._prepareNodesForInsertion=function(e,r,n,o){if(void 0===o&&(o=!1),0!==e.length)for(var i=r[0],a=r[1],s=i;s<a;s++){var c=e[s];qr(c)?c.data=t._processTextContent(c.data,n):Wt(c)||$r(c)||Kr(c)?this._nodeSandbox.processNodes(c):(o&&(c=String(c)),"string"==typeof c&&(e[s]=t._processTextContent(c,n)))}},t.prototype._insertAdjacentTextOrElement=function(e,t,r){var n,o,i=null===(o=null===(n=t[0])||void 0===n?void 0:n.toLocaleLowerCase)||void 0===o?void 0:o.call(n),a=i===Fd.beforeBegin||i===Fd.afterEnd?Xc.nodeParentNodeGetter.call(e):e;return a?this._addNodeCore(a,e,[1,2],t,r,i===Fd.beforeEnd):Xc.insertAdjacentElement.apply(e,t)},t.prototype._createOverriddenMethods=function(){var e=this;this.overriddenMethods={appendData:function(e){var r=Xc.nodeParentNodeGetter.call(this);Xc.nodeTextContentSetter.call(this,Xc.nodeTextContentGetter.call(this)+e),r&&(this.data=t._processTextContent(this.data,r))},insertRow:function(){var t=Qr(this)?Xc.insertTableRow:Xc.insertTBodyRow,r=t.apply(this,arguments);return e._nodeSandbox.processNodes(r),r},insertCell:function(){var t=Xc.insertCell.apply(this,arguments);return e._nodeSandbox.processNodes(t),t},insertAdjacentHTML:function(){for(var t,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=null===(r=null===(t=n[0])||void 0===t?void 0:t.toLocaleLowerCase)||void 0===r?void 0:r.call(t),a=n[1],s=i===Fd.beforeBegin||i===Fd.afterEnd?Xc.nodeParentNodeGetter.call(this):this;n.length>1&&null!==a&&s&&(n[1]=ca(String(a),{parentTag:s.tagName,processedContext:s[vc.processedContext]})),Xc.insertAdjacentHTML.apply(this,n),s&&(e._nodeSandbox.processNodes(s),Bf.onChildrenChanged(s))},insertAdjacentElement:function(){for(var t=[],r=0;r<arguments.lengt
var i=r[o];t.containsShadowUIClassPostfix(i)&&t.markElementAsShadow(i)}},t.prototype.getRoot=function(){var e=this;if(Bc&&!t.isShadowContainer(this.document.body)&&this._markShadowUIContainerAndCollections(this.document.body),!this.root||!this.document.body.contains(this.root))if(this.root)Xc.appendChild.call(this.document.body,this.root);else{this.root=Xc.createElement.call(this.document,"div"),Xc.setAttribute.call(this.root,"id",t.patchId(this.ROOT_ID)),Xc.setAttribute.call(this.root,"contenteditable","false"),this.addClass(this.root,this.ROOT_CLASS),t.markElementAsShadow(this.root),Xc.appendChild.call(this.document.body,this.root);for(var r=Xc.documentAddEventListener||Xc.addEventListener,n=0,o=Af.EVENTS;n<o.length;n++){var i=o[n];Xc.addEventListener.call(this.root,i,xa)}this._bringRootToWindowTopLeft(),r.call(this.document,"DOMContentLoaded",function(){e.onBodyElementMutation(),e._bringRootToWindowTopLeft()})}return this.root},t.prototype.attach=function(t){e.prototype.attach.call(this,t,t.document),this.markShadowUIContainers(this.document.head,this.document.body),this._overrideDocumentMethods(t,t.document),this._overrideElementMethods(t),t.document.head&&this._markElementsAsShadowInHead(t.document.head),this._initEvents()},t.prototype._initEvents=function(){this._iframeSandbox.on(this._iframeSandbox.RUN_TASK_SCRIPT_EVENT,this.runTaskScriptEventCallback),this._nodeMutation.on(this._nodeMutation.BEFORE_DOCUMENT_CLEANED_EVENT,this.beforeDocumentCleanedEventCallback),this._nodeMutation.on(this._nodeMutation.DOCUMENT_CLEANED_EVENT,this.documentCleanedEventCallback),this._nodeMutation.on(this._nodeMutation.DOCUMENT_CLOSED_EVENT,this.documentClosedEventCallback),this._nodeMutation.on(this._nodeMutation.BODY_CONTENT_CHANGED_EVENT,this.bodyContentChangedEventCallback),this._messageSandbox.on(this._messageSandbox.SERVICE_MSG_RECEIVED_EVENT,this.serviceMsgReceivedEventCallback),this._nodeMutation.on(this._nodeMutation.BODY_CREATED_EVENT,this.bodyCreatedEventCallback)},t.prototype.onBodyElementMutation=function(){if(this.root&&this.document.body){var e=sn(this.root,"html"),t=!this.nativeMethods.elementNextElementSiblingGetter.call(this.root),r=Xc.nodeParentNodeGetter.call(this.root)===this.document.body;e&&t&&r||this.nativeMethods.appendChild.call(this.document.body,this.root),this.markShadowUIContainers(this.document.head,this.document.body)}},t.prototype.getFirstChild=function(e){var t=Xc.nodeChildNodesGetter.call(e),r=Xc.nodeListLengthGetter.call(t),n=this._filterNodeList(t,r);return n[0]||null},t.prototype.getFirstElementChild=function(e){var t=Xc.elementChildrenGetter.call(e),r=Xc.htmlCollectionLengthGetter.call(t);return this._filterNodeList(t,r)[0]||null},t.prototype.getLastChild=function(e){var t=Xc.nodeChildNodesGetter.call(e),r=Xc.nodeListLengthGetter.call(t),n=this._filterNodeList(t,r),o=t===n?r-1:n.length-1;return o>=0?n[o]:null},t.prototype.getLastElementChild=function(e){var t=Xc.elementChildrenGetter.call(e),r=Xc.htmlCollectionLengthGetter.call(t),n=this._filterNodeList(t,r),o=t===n?r-1:n.length-1;return o>=0?n[o]:null},t.prototype.getNextSibling=function(e){if(!e)return e;do e=Xc.nodeNextSiblingGetter.call(e);while(e&&Or(e));return e},t.prototype.getPrevSibling=function(e){if(!e)return e;do e=Xc.nodePrevSiblingGetter.call(e);while(e&&Or(e));return e},t.prototype.getMutationRecordNextSibling=function(e){if(!e)return e;for(;e&&Or(e);)e=Xc.nodeNextSiblingGetter.call(e);return e},t.prototype.getMutationRecordPrevSibling=function(e){if(!e)return e;for(;e&&Or(e);)e=Xc.nodePrevSiblingGetter.call(e);return e},t.prototype.getNextElementSibling=function(e){do e=Xc.elementNextElementSiblingGetter.call(e);while(e&&Or(e));return e},t.prototype.getPrevElementSibling=function(e){do e=Xc.elementPrevElementSiblingGetter.call(e);while(e&&Or(e));return e},t._checkElementsPosition=function(e,t){if(t){for(var r=[],n=0;n<t;n++){var o=e[n];Or(o)&&r.push(o)}for(var i=r.length&&Xc.nodeParentNodeGetter.call(r[0]),a=0,s=r;a<s.length;a++){var c=s[a];Xc.appendChild.call(i,c)}}},t._hasFlag=function(e,t){try{return!!e[t]}catch(r){return!1}}
for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"string"==typeof e[0]&&(e[0]="/"),Xc.getRegistrationServiceWorker.apply(r.navigator.serviceWorker,e)}),r.Range.prototype.createContextualFragment&&x(r.Range.prototype,"createContextualFragment",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0];"string"==typeof r&&(e[0]=ca(r,{processedContext:this.startContainer&&this.startContainer[vc.processedContext]}));var n=Xc.createContextualFragment.apply(this,e);return i.processNodes(n),n}),r.EventTarget){var s=this.listenersSandbox.createOverriddenMethods();x(r.EventTarget.prototype,"addEventListener",s.addEventListener),x(r.EventTarget.prototype,"removeEventListener",s.removeEventListener)}if(this.proxyless||C(r,"Image",function(){var e=null;return e=arguments.length?1===arguments.length?new Xc.Image(arguments[0]):new Xc.Image(arguments[0],arguments[1]):new Xc.Image,e[vc.forceProxySrcForImage]=!0,i.processNodes(e),e}),C(r,"Function",function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.length-1;"string"==typeof e[n]&&(e[n]=zi(e[n],!1,!1,Fl));var o=Xc.Function.apply(this,e);return t._patchFunctionPrototype(o,this),o},!0),x(Xc.Function.prototype,"toString",function(){return Xc.objectHasOwnProperty.call(this,vc.nativeStrRepresentation)?this[vc.nativeStrRepresentation]:Xc.functionToString.call(this)}),O(r.history.pushState)&&O(r.history.replaceState)&&!this.proxyless){var c=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t[2];return t.length>2&&null!==n&&(Mc||void 0!==n)&&(t[2]=Dl(n)),e.apply(this,t)}};x(r.history,"pushState",c(Xc.historyPushState)),x(r.history,"replaceState",c(Xc.historyReplaceState))}Xc.sendBeacon&&!this.proxyless&&x(r.Navigator.prototype,"sendBeacon",function(){return"string"==typeof arguments[0]&&(arguments[0]=Dl(arguments[0])),Xc.sendBeacon.apply(this,arguments)}),r.navigator.registerProtocolHandler&&!this.proxyless&&x(r.navigator,"registerProtocolHandler",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1;if("string"==typeof e[r]){var n=ye().hostname,o=!1;if(Hc){var i=Ne(e[r]);o=i.hostname&&n===i.hostname}else o=pe(Tl(),e[r]);o&&(e[r]=Dl(e[r]))}return Xc.registerProtocolHandler.apply(navigator,e)}),r.FormData&&x(r.FormData.prototype,"append",function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],n=e[1];r!==Qc.uploadInfoHiddenInputName&&(2===e.length&&Dr(n)&&"name"in n&&(e[2]=n.name),Xc.formDataAppend.apply(this,e))}),r.WebSocket&&!this.proxyless&&(C(r,"WebSocket",function(e,t){if(0===arguments.length)return new Xc.WebSocket;var r=Dl(e,{resourceType:He({isWebSocket:!0})});return 1===arguments.length?new Xc.WebSocket(r):2===arguments.length?new Xc.WebSocket(r,t):new Xc.WebSocket(r,t,arguments[2])}),r.WebSocket.CONNECTING=Xc.WebSocket.CONNECTING,r.WebSocket.OPEN=Xc.WebSocket.OPEN,r.WebSocket.CLOSING=Xc.WebSocket.CLOSING,r.WebSocket.CLOSED=Xc.WebSocket.CLOSED,Xc.webSocketUrlGetter&&_(r.WebSocket.prototype,"url",{getter:function(){var e=Xc.webSocketUrlGetter.call(this),t=jl(e);return t&&t.destUrl?t.destUrl.replace(Hm,"ws"):e}})),this.proxyless||_(r.MessageEvent.prototype,"origin",{getter:function(){var e=Xc.eventTargetGetter.call(this),t=Xc.messageEventOriginGetter.call(this);if(Zr(e)){var r=Ne(e.url);if(r)return r.protocol+"//"+r.host}else if(kr(e)){var n=Xc.messageEventDataGetter.call(this);if(n)return n.originUrl}return t}}),_(r.HTMLCollection.prototype,"length",{getter:function(){var e=Xc.htmlCollectionLengthGetter.call(this);return gm.isShadowContainerCollection(this,e)?a.shadowUI.getShadowUICollectionLength(this,e):e}}),_(r.NodeList.prototype,"length",{getter:function(){var e=Xc.nodeListLengthGetter.call(this);return gm.isShadowContainerCollection(this)?a.shadowUI.getShadowUICollectionLength(this,e):e}}),_(r.Element.prototype,"childElementCount",{getter:function(){if(gm.isShadowContainer(this)){var e=Xc.elementChildrenGetter.call(this),t=Xc.htmlCollectionLengthGetter.call(e);return a.shadowUI.getShadowUICollectionLength(e,t)}return Xc.elementChildE
var t=this.__data__,r=Nr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ku.call(t,r,1),--this.size,!0}function ar(e){var t=this.__data__,r=Nr(t,e);return r<0?te:t[r][1]}function sr(e){return Nr(this.__data__,e)>-1}function cr(e,t){var r=this.__data__,n=Nr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function lr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ur(){this.size=0,this.__data__={hash:new Ht,map:new(ep||nr),string:new Ht}}function pr(e){var t=wi(this,e)["delete"](e);return this.size-=t?1:0,t}function hr(e){return wi(this,e).get(e)}function dr(e){return wi(this,e).has(e)}function fr(e,t){var r=wi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function mr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new lr;++t<r;)this.add(e[t])}function gr(e){return this.__data__.set(e,se),this}function vr(e){return this.__data__.has(e)}function yr(e){var t=this.__data__=new nr(e);this.size=t.size}function _r(){this.__data__=new nr,this.size=0}function Er(e){var t=this.__data__,r=t["delete"](e);return this.size=t.size,r}function Sr(e){return this.__data__.get(e)}function br(e){return this.__data__.has(e)}function wr(e,t){var r=this.__data__;if(r instanceof nr){var n=r.__data__;if(!ep||n.length<ne-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new lr(n)}return r.set(e,t),this.size=r.size,this}function xr(e,t){var r=yh(e),n=!r&&vh(e),o=!r&&!n&&Eh(e),i=!r&&!n&&!o&&Ch(e),a=r||n||o||i,s=a?I(e.length,pu):[],c=s.length;for(var l in e)!t&&!yu.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Mi(l,c))||s.push(l);return s}function Cr(e){var t=e.length;return t?e[to(0,t-1)]:te}function Ar(e,t){return ea(Fo(e),Rr(t,0,e.length))}function Tr(e){return ea(Fo(e))}function Ir(e,t,r){(r===te||Ks(e[t],r))&&(r!==te||t in e)||Dr(e,t,r)}function Pr(e,t,r){var n=e[t];yu.call(e,t)&&Ks(n,r)&&(r!==te||t in e)||Dr(e,t,r)}function Nr(e,t){for(var r=e.length;r--;)if(Ks(e[r][0],t))return r;return-1}function Or(e,t,r,n){return gp(e,function(e,o,i){t(n,e,r(e),i)}),n}function kr(e,t){return e&&Ho(t,Vc(t),e)}function Lr(e,t){return e&&Ho(t,Wc(t),e)}function Dr(e,t,r){"__proto__"==t&&Ru?Ru(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Mr(e,t){for(var r=-1,n=t.length,o=ou(n),i=null==e;++r<n;)o[r]=i?te:Hc(e,t[r]);return o}function Rr(e,t,r){return e===e&&(r!==te&&(e=e<=r?e:r),t!==te&&(e=e>=t?e:t)),e}function jr(e,t,r,n,i,a){var s,c=t&ue,l=t&pe,u=t&he;if(r&&(s=i?r(e,n,i,a):r(e)),s!==te)return s;if(!ac(e))return e;var p=yh(e);if(p){if(s=Ni(e),!c)return Fo(e,s)}else{var h=Ip(e),d=h==Ke||h==$e;if(Eh(e))return Io(e,c);if(h==Je||h==Ue||d&&!i){if(s=l||d?{}:Oi(e),!c)return l?Bo(e,Lr(s,e)):Uo(e,kr(s,e))}else{if(!$r[h])return i?e:{};s=ki(e,h,c)}}a||(a=new yr);var f=a.get(e);if(f)return f;a.set(e,s),xh(e)?e.forEach(function(n){s.add(jr(n,t,r,n,e,a))}):bh(e)&&e.forEach(function(n,o){s.set(o,jr(n,t,r,o,e,a))});var m=u?l?_i:yi:l?Wc:Vc,g=p?te:m(e);return o(g||e,function(n,o){g&&(o=n,n=e[o]),Pr(s,o,jr(n,t,r,o,e,a))}),s}function Fr(e){var t=Vc(e);return function(r){return Br(r,e,t)}}function Br(e,t,r){var n=r.length;if(null==e)return!n;for(e=lu(e);n--;){var o=r[n],i=t[o],a=e[o];if(a===te&&!(o in e)||!i(a))return!1}return!0}function Vr(e,t,r){if("function"!=typeof e)throw new hu(ie);return Op(function(){e.apply(te,r)},t)}function Wr(e,t,r,n){var o=-1,i=c,a=!0,s=e.length,p=[],h=t.length;if(!s)return p;r&&(t=u(t,O(r))),n?(i=l,a=!1):t.length>=ne&&(i=L,a=!1,t=new mr(t));e:for(;++o<s;){var d=e[o],f=null==r?d:r(d);if(d=n||0!==d?d:0,a&&f===f){for(var m=h;m--;)if(t[m]===f)continue e;p.push(d)}else i(t,f,n)||p.push(d)}return p}function Gr(e,t){var r=!0;return gp(e,function(e,n,o){return r=!!t(e,n,o)}),r}function Xr(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(s===te?a===a&&!yc(a):r(a,s)))var s=a,c=i}return c}function Yr(e,t,r,n){var o=e.length;for(r=xc(r),r<0&&(r=-r>o?0:o+r),n=n===te||n>o?o:xc(n),n<0&&(n+=o),n=r>n?0:Cc(n);r<n;)e[r++]=t;return e}function Qr(e,t){var r
m}var h,d,f,m,g,v,y=0,_=!1,E=!1,S=!0;if("function"!=typeof e)throw new hu(ie);return t=Ac(t)||0,ac(r)&&(_=!!r.leading,E="maxWait"in r,f=E?Ku(Ac(r.maxWait)||0,t):f,S="trailing"in r?!!r.trailing:S),p.cancel=l,p.flush=u,p}function ks(e){return ui(e,xe)}function Ls(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new hu(ie);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ls.Cache||lr),r}function Ds(e){if("function"!=typeof e)throw new hu(ie);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ms(e){return Is(2,e)}function Rs(e,t){if("function"!=typeof e)throw new hu(ie);return t=t===te?t:xc(t),oo(e,t)}function js(e,t){if("function"!=typeof e)throw new hu(ie);return t=null==t?0:Ku(xc(t),0),oo(function(n){var o=n[t],i=To(n,0,t);return o&&p(i,o),r(e,this,i)})}function Fs(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new hu(ie);return ac(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Os(e,t,{leading:n,maxWait:t,trailing:o})}function Hs(e){return Ts(e,1)}function Us(e,t){return hh(Co(t),e)}function Bs(){if(!arguments.length)return[];var e=arguments[0];return yh(e)?e:[e]}function Vs(e){return jr(e,he)}function Ws(e,t){return t="function"==typeof t?t:te,jr(e,he,t)}function Gs(e){return jr(e,ue|he)}function qs(e,t){return t="function"==typeof t?t:te,jr(e,ue|he,t)}function zs(e,t){return null==t||Br(e,t,Vc(t))}function Ks(e,t){return e===t||e!==e&&t!==t}function $s(e){return null!=e&&ic(e.length)&&!nc(e)}function Xs(e){return sc(e)&&$s(e)}function Ys(e){return e===!0||e===!1||sc(e)&&ln(e)==We}function Qs(e){return sc(e)&&1===e.nodeType&&!mc(e)}function Js(e){if(null==e)return!0;if($s(e)&&(yh(e)||"string"==typeof e||"function"==typeof e.splice||Eh(e)||Ch(e)||vh(e)))return!e.length;var t=Ip(e);if(t==Xe||t==rt)return!e.size;if(Bi(e))return!Un(e).length;for(var r in e)if(yu.call(e,r))return!1;return!0}function Zs(e,t){return On(e,t)}function ec(e,t,r){r="function"==typeof r?r:te;var n=r?r(e,t):te;return n===te?On(e,t,te,r):!!n}function tc(e){if(!sc(e))return!1;var t=ln(e);return t==ze||t==qe||"string"==typeof e.message&&"string"==typeof e.name&&!mc(e)}function rc(e){return"number"==typeof e&&Gu(e)}function nc(e){if(!ac(e))return!1;var t=ln(e);return t==Ke||t==$e||t==Ve||t==et}function oc(e){return"number"==typeof e&&e==xc(e)}function ic(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Le}function ac(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function sc(e){return null!=e&&"object"==typeof e}function cc(e,t){return e===t||Dn(e,t,xi(t))}function lc(e,t,r){return r="function"==typeof r?r:te,Dn(e,t,xi(t),r)}function uc(e){return fc(e)&&e!=+e}function pc(e){if(Pp(e))throw new au(oe);return Mn(e)}function hc(e){return null===e}function dc(e){return null==e}function fc(e){return"number"==typeof e||sc(e)&&ln(e)==Ye}function mc(e){if(!sc(e)||ln(e)!=Je)return!1;var t=Pu(e);if(null===t)return!0;var r=yu.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&vu.call(r)==bu}function gc(e){return oc(e)&&e>=-Le&&e<=Le}function vc(e){return"string"==typeof e||!yh(e)&&sc(e)&&ln(e)==nt}function yc(e){return"symbol"==typeof e||sc(e)&&ln(e)==ot}function _c(e){return e===te}function Ec(e){return sc(e)&&Ip(e)==at}function Sc(e){return sc(e)&&ln(e)==st}function bc(e){if(!e)return[];if($s(e))return vc(e)?Y(e):Fo(e);if(Du&&e[Du])return B(e[Du]());var t=Ip(e),r=t==Xe?V:t==rt?q:tl;return r(e)}function wc(e){if(!e)return 0===e?e:0;if(e=Ac(e),e===ke||e===-ke){var t=e<0?-1:1;return t*De}return e===e?e:0}function xc(e){var t=wc(e),r=t%1;return t===t?r?t-r:t:0}function Cc(e){return e?Rr(xc(e),0,Re):0}function Ac(e){if("number"==typeof e)return e;if(yc(e))return Me;if(ac(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ac(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var r=qt.test(e
var n=this,o=Ls();if(this._win!==this._win.top||this._win!==o&&!r)return this._delegateSyncBetweenWindowsToMainTopWindow(t),mc.resolve();var i=this._getWindowsForSync(r,this._win),a=[];if(this._win===o)for(var s=0,c=this._childWindowSandbox.getChildWindows();s<c.length;s++){var l=c[s],u=e._getCookieSandbox(l);u?a.push(u.getWindowSync().syncBetweenWindows(t,this._win)):a.push(this._sendSyncMessage(l,hg,t))}for(var p=0,h=i;p<h.length;p++){var l=h[p],u=e._getCookieSandbox(l);u?u.syncWindowCookie(t):a.push(this._sendSyncMessage(l,hg,t))}if(a.length){var d=mc.all(a);return this._win===o?d.then(function(){return n._removeSyncCookie(t)}):d.then()}return this._removeSyncCookie(t),mc.resolve()},e.prototype.attach=function(e){var t=this;this._win=e,this._messageSandbox.on(this._messageSandbox.SERVICE_MSG_RECEIVED_EVENT,function(e){return t._onMsgReceived(e)}),e===e.top&&(this._messageIdGenerator=this._messageIdGenerator||new Cd,this._resolversMap=this._resolversMap||new Map)},e}(),vg=/^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/,yg=/;+$/,_g=/((?:\s|,)[0-9]{1,2})(?:\s|-)([A-Za-z]{3})(?:\s|-)([0-9]{4}\s)/,Eg=Object.freeze({__proto__:null,parse:Ds,formatClientString:Ms,setDefaultValues:Rs,domainMatch:js,pathMatch:Fs,getUTCDate:Hs}),Sg=4096,bg=new Xc.date(0).toUTCString(),wg=function(){function e(){}return e.create=function(e,t,r){return e?new xg:new Cg(t,r)},e}(),xg=function(){function e(){}return e.prototype.getCookie=function(){return""},e.prototype.setCookie=function(){},e.prototype.syncCookie=function(){},e.prototype.syncWindowCookie=function(){},e.prototype.removeAllSyncCookie=function(){},e}(),Cg=function(){function e(e,t){this.document=null,this.document=e,this._windowSync=t}return e.prototype.getCookie=function(){return this.syncCookie(!0),Cl.get().cookie||""},e.prototype.setCookie=function(e){var t="string"==typeof e;if(this._canSetCookie(e,t)){var r=t?Ds(e):e;if(r&&!r.httpOnly){var n=ye();if(js(n.hostname,r.domain)){if((!r.secure||"https:"===n.protocol)&&Fs(n.pathname,r.path)){var o=Hs(),i=null;(!r.expires||"Infinity"===r.expires||r.expires>o)&&(P(r.maxAge)||isNaN(r.maxAge)||r.maxAge>0)&&(i=Ms(r)),Ag._updateClientCookieStr(r.key,i)}t&&(Rs(r,n),this._syncClientCookie(r),this.syncCookie())}}}},e.prototype.syncCookie=function(e){void 0===e&&(e=!1);for(var t=Xc.documentCookieGetter.call(this.document),r=As(t),n=Cl.get().sessionId,o=[],i=0,a=r.outdated;i<a.length;i++){var s=a[i];Xc.documentCookieSetter.call(this.document,ks(s))}for(var c=0,l=r.actual;c<l.length;c++){var u=l[c];if(u.sid===n)if(u.isServerSync)o.push(u);else if(u.isWindowSync)this.setCookie(u);else if(e&&u.isClientSync){var p=Hs(),h=!P(u.maxAge)&&Number(u.maxAge),d=Number(u.expires);(!isNaN(h)&&N(h)&&1e3*h<=p.getTime()-u.lastAccessed.getTime()||!isNaN(d)&&N(d)&&d<p.getTime())&&(Xc.documentCookieSetter.call(this.document,ks(u)),Ag._updateClientCookieStr(u.key,null))}}o.length&&this._syncServerCookie(o)},e.prototype._syncServerCookie=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];this.setCookie(n),Xc.documentCookieSetter.call(this.document,ks(n)),Ns(n,{server:!1,window:!0}),Xc.documentCookieSetter.call(this.document,Is(n))}this._windowSync.syncBetweenWindows(e)},e.prototype.syncWindowCookie=function(e){for(var t=Xc.documentCookieGetter.call(this.document),r=0,n=e;r<n.length;r++){var o=n[r];Ag.isSyncCookieExists(o,t)&&this.setCookie(o)}},e.prototype.removeAllSyncCookie=function(){for(var e=Xc.documentCookieGetter.call(this.document),t=As(e),r=Cl.get().sessionId,n=0,o=t.outdated;n<o.length;n++){var i=o[n];Xc.documentCookieSetter.call(this.document,ks(i))}for(var a=0,s=t.actual;a<s.length;a++){var c=s[a];c.sid===r&&(c.isWindowSync||c.isServerSync)&&(Xc.documentCookieSetter.call(this.document,ks(c)),c.isClientSync&&(Ns(c,{window:!1}),Xc.documentCookieSetter.call(this.document,Is(c))))}},e.prototype._canSetCookie=function(e,t){if(t&&(e.length>Sg||"file:"===ye().protocol))return!1;var r="key".concat(Xc.mathRandom.call(Xc.math),"=value");Xc.documentCookieSetter.call(this.document,r);var n=!Xc.documentCookieGetter.call(this.document);return n||Xc.documentCookieSetter.call
identifier:i.identifier,target:r.target,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,screenX:i.screenX,screenY:i.screenY,rotationAngle:0,radiusX:Yg,radiusY:Yg,force:Qg}),i.changedTouches=[i.touch],i.touches="touchend"===i.type?[]:i.changedTouches,Xc.documentCreateTouchList&&(i.changedTouches=(n=Xc.documentCreateTouchList).call.apply(n,g([document],i.changedTouches,!1)),i.touches=(o=Xc.documentCreateTouchList).call.apply(o,g([document],i.touches,!1))),i.targetTouches=i.touches,i},e.prototype._getTouchIdentifier=function(e){return"touchstart"===e&&this.touchIdentifier++,this.touchIdentifier},e.prototype._raiseNativeClick=function(e,t){var r=$t(e)&&It(e),n=r?Xc.contentWindowGetter.call(r):window,o=n.event;Rc&&delete n.event,t.call(e),Rc&&o&&Xc.objectDefineProperty(n,"event",{get:function(){return o},configurable:!0})},e.prototype._dispatchKeyEvent=function(t,r){var n=null;if(this.browserWithNewEventsStyle&&Xc.WindowKeyboardEvent){var o={bubbles:r.canBubble,composed:r.composed,cancelable:r.cancelable,cancelBubble:!1,defaultPrevented:!1,view:r.view,detail:r.detail,ctrlKey:r.ctrlKey,altKey:r.altKey,shiftKey:r.shiftKey,metaKey:r.metaKey,keyCode:r.keyCode,charCode:r.charCode,which:r.which};"keyIdentifier"in r&&(o.keyIdentifier=r.keyIdentifier),"key"in r&&(o.key=r.key),n=new Xc.WindowKeyboardEvent(r.type,o)}else Xc.documentCreateEvent&&(n=Xc.documentCreateEvent.call(document,"KeyboardEvent"),n.initKeyboardEvent(r.type,r.canBubble,r.cancelable,r.view,"",0,e._getModifiersAsString(r),!1,""));if(n){Xc.objectDefineProperty(n,"keyCode",{configurable:!0,enumerable:!0,get:function(){return r.keyCode}}),Xc.objectDefineProperty(n,"charCode",{configurable:!0,enumerable:!0,get:function(){return r.charCode}}),Xc.objectDefineProperty(n,"which",{configurable:!0,enumerable:!0,get:function(){return r.which}}),"key"in r&&Xc.objectDefineProperty(n,"key",{configurable:!0,enumerable:!0,get:function(){return r.key}}),"keyIdentifier"in r&&Xc.objectDefineProperty(n,"keyIdentifier",{configurable:!0,enumerable:!0,get:function(){return r.keyIdentifier}});var i=!1,a=!0;this.browserWithNewEventsStyle&&(n.preventDefault=function(){return i=!0,Xc.preventDefault.call(n),!1}),Uc&&Xc.objectDefineProperty(n,"returnValue",{get:function(){return a},set:function(e){e===!1&&n.preventDefault(),a=e}});var s=this._raiseDispatchEvent(t,n);return Uc?a&&!i:Mc?s:!i}return null},e.prototype._getPointerEventTypeInfo=function(e){return av[e]?{eventType:av[e],pointerType:"mouse"}:sv[e]?{eventType:sv[e],pointerType:"touch"}:null},e.prototype._dispatchPointerEvent=function(e,t){var r=this._getPointerEventTypeInfo(t.type);if(r){var n=r.eventType,o=r.pointerType,i=null,a=qa(e),s=Ye(e),c=za({x:a.left+s.left,y:a.top+s.top}),l=Ws({width:1,height:1,pressure:0,tiltX:0,tiltY:0,pointerId:1,pointerType:o,timeStamp:Xc.dateNow(),isPrimary:!0},t);l.type=n,l.offsetX=t.clientX-c.x,l.offsetY=t.clientY-c.y,"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type||(l.button=t.buttons===Of.noButton?Jg.noButton:l.button),Rc?(l.rotation=0,i=Xc.documentCreateEvent.call(document,"PointerEvent"),i.initPointerEvent(l.type,l.canBubble,l.cancelable,window,l.detail,l.screenX,l.screenY,l.clientX,l.clientY,l.ctrlKey,l.altKey,l.shiftKey,l.metaKey,l.button,null,l.offsetX,l.offsetY,l.width,l.height,l.pressure,l.rotation,l.tiltX,l.tiltY,l.pointerId,l.pointerType,l.timeStamp,l.isPrimary),Xc.objectDefineProperty(i,"target",{get:function(){return e},configurable:!0}),Xc.objectDefineProperty(i,"relatedTarget",{get:function(){return t.relatedTarget},configurable:!0}),Xc.objectDefineProperty(i,"buttons",{get:function(){return t.buttons}})):(l.bubbles=!0,l.cancelable=!0,i=new Xc.WindowPointerEvent(n,l)),this._raiseDispatchEvent(e,i)}},e.prototype._elementCanBeDisabled=function(e){for(var t=0,r=cv;t<r.length;t++){var n=r[t];if(n(e))return!0}return!1},e.prototype._dispatchMouseRelatedEvents=function(e,t,r){if(void 0===r&&(r={}),"mouseover"!==t.type&&"mouseenter"!==t.type&&Va(e,t.clientX,t.clientY))return!0;if(Mc&&("click"===t.type||"mouseup"===t.type||"mousedown"===t.type)){var n=Xc.nodeParentNod
this.internal.eventEmitter.on("change",e)},t.prototype.removeChangeEventListener=function(e){this.internal.eventEmitter.off("change",e)},t.prototype.unwrapProxy=function(){if(Xc.Proxy){var e=this[wv];return e||this}return this},t}(Iv),Nv=Xc.objectKeys(Pv.prototype);Nv.indexOf("internal")===-1&&Nv.push("internal");for(var Ov=0,kv=Nv;Ov<kv.length;Ov++){var Lv=kv[Ov];"constructor"!==Lv&&"internal"!==Lv&&Xc.objectDefineProperty(Pv.prototype,Lv,{value:Pv.prototype[Lv],configurable:!1,enumerable:!1,writable:!1})}var Dv=Xc.objectGetOwnPropertyDescriptor(Pv.prototype,"internal");Dv.configurable=!1,Dv.enumerable=!1,Xc.objectDefineProperty(Pv.prototype,"internal",Dv),Xc.objectDefineProperty(Pv.prototype,"constructor",Xc.objectGetOwnPropertyDescriptor(Storage.prototype,"constructor")),Xc.objectDefineProperty(Pv,"INTERNAL_METHODS",{value:Nv});var Mv="hammerhead|storage-wrapper|",Rv="hammerhead|api-key-prefix|",jv=Xc.arrayConcat.call(Xc.objectKeys(Storage.prototype),Pv.INTERNAL_METHODS),Fv=function(){function e(){}return e}(),Hv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.backup=function(){return{localStorage:Up(this._getStorageKeysAndValues(localStorage)),sessionStorage:Up(this._getStorageKeysAndValues(sessionStorage))}},t.prototype.attach=function(){},t.prototype.lock=function(){},t.prototype.dispose=function(){},t.prototype.clear=function(){},t.prototype.restore=function(){},t.prototype._getStorageKeysAndValues=function(e){for(var t=Xc.objectKeys(e),r=[],n=0,o=t;n<o.length;n++){var i=o[n];r.push(e[i])}return[t,r]},t}(Fv),Uv=function(e){function t(t,r,n,o,i){var a=e.call(this)||this;return a.window=null,a.nativeMethods=Xc,a.document=null,a.intervalId=null,a.isLocked=!1,a.sandbox=t,a.window=r,a._listeners=n,a._eventSimulator=o,a._unloadSandbox=i,a}return m(t,e),t.prototype.backup=function(){return{localStorage:Up(this.localStorageProxy.unwrapProxy().getCurrentState()),sessionStorage:Up(this.sessionStorageProxy.unwrapProxy().getCurrentState())}},t.prototype.restore=function(e){var t=e.localStorage,r=e.sessionStorage;this.localStorageProxy.unwrapProxy().restore(t),this.sessionStorageProxy.unwrapProxy().restore(r)},t.prototype.attach=function(e){var t=this;this._overrideStorageProps(),this._createStorageWrappers();var r=this.localStorageProxy.unwrapProxy(),n=this.sessionStorageProxy.unwrapProxy();this.intervalId=Xc.setInterval.call(this.window,function(){r.checkStorageChanged(),n.checkStorageChanged()},10),this.localStorageChangeHandler=function(e){return t._simulateStorageEvent(t.localStorageProxy,e)},this.sessionStorageChangeHandler=function(e){return t._simulateStorageEvent(t.sessionStorageProxy,e)},r.addChangeEventListener(this.localStorageChangeHandler),n.addChangeEventListener(this.sessionStorageChangeHandler),this._listeners.initElementListening(e,["storage"]),this._listeners.addInternalEventBeforeListener(e,["storage"],function(e,t,r){return!t&&r()}),this._overrideStorageEvent(),this._overrideStoragesGetters()},t.prototype.clear=function(){var e=this.localStorageProxy.unwrapProxy(),t=this.sessionStorageProxy.unwrapProxy();Xc.storageRemoveItem.call(e.internal.nativeStorage,e.internal.nativeStorageKey),Xc.storageRemoveItem.call(t.internal.nativeStorage,t.internal.nativeStorageKey)},t.prototype.dispose=function(){this.localStorageProxy.unwrapProxy().removeChangeEventListener(this.localStorageChangeHandler),this.sessionStorageProxy.unwrapProxy().removeChangeEventListener(this.sessionStorageChangeHandler);var e=Rt(this.window);this.window!==e||e.frameElement||Xc.clearInterval.call(this.window,this.intervalId)},t._wrapKey=function(e){var t=String(e);return jv.indexOf(t)!==-1?Rv+t:t},t._unwrapKey=function(e){return e.replace(Rv,"")},t.prototype._simulateStorageEvent=function(e,t){if(!this.sandbox.isDeactivated()&&e.unwrapProxy().getContext()!==this.window){var r=t;r.storageArea=e,this._eventSimulator.storage(this.window,r)}},t.prototype._createStorageWrappers=function(){var e=this,t=ye().host,r=Cl.get().sessionId,n=ec(r,t),o=Rt(this.window),i=o[vc.hammerhead],a=i.sandbox.storageSa
xhrCompleted:this.sandbox.xhr.XHR_COMPLETED_EVENT,xhrError:this.sandbox.xhr.XHR_ERROR_EVENT,beforeXhrSend:this.sandbox.xhr.BEFORE_XHR_SEND_EVENT,fetchSent:this.sandbox.fetch.FETCH_REQUEST_SENT_EVENT,pageNavigationTriggered:this.pageNavigationWatch.PAGE_NAVIGATION_TRIGGERED_EVENT,scriptElementAdded:this.sandbox.node.element.SCRIPT_ELEMENT_ADDED_EVENT,consoleMethCalled:this.sandbox.console.CONSOLE_METH_CALLED_EVENT,windowOpened:this.sandbox.childWindow.WINDOW_OPENED_EVENT},this.PROCESSING_INSTRUCTIONS={dom:{script:$u,internal_attributes:Qc,internal_props:vc}},this.SHADOW_UI_CLASS_NAME=Zc,this.SESSION_COMMAND=Sm,this.EventEmitter=Yc,this.doUpload=function(t,r){return e.sandbox.upload.doUpload(t,r)},this.createNativeXHR=Ev.createNativeXHR,this.processScript=zi,this.Promise=mc,this.json=Bp,this.nativeMethods=this.sandbox.nativeMethods,this.shadowUI=this.sandbox.shadowUI,this.storages=this.sandbox.storageSandbox,this.eventSandbox={listeners:this.sandbox.event.listeners,hover:this.sandbox.event.hover,focusBlur:this.sandbox.event.focusBlur,elementEditingWatcher:this.sandbox.event.elementEditingWatcher,eventSimulator:this.sandbox.event.eventSimulator,selection:this.sandbox.event.selection,message:this.sandbox.event.message,timers:this.sandbox.event.timers,DataTransfer:this.sandbox.event.DataTransfer,DragDataStore:this.sandbox.event.DragDataStore};var t={script:Uh,header:eh,instrumentation:np};this.utils={browser:qc,dom:Nu,event:Rf,position:nm,style:lu,types:zc,trim:k,extend:Ws,html:pf,url:Hl,featureDetection:su,destLocation:Il,overriding:Sc,cookie:Eg,getMimeType:es,urlResolver:wl,processing:t,removeInjectedScript:nc},this.sharedUtils={cookie:ug,url:Sl,headers:yv,stackProcessing:Dp,selfRemovingScripts:jd},this.settings=Cl,this.sandboxes={XhrSandbox:Ev,StyleSandbox:Kv,ShadowUISandbox:gm,ElectronSandbox:Vv,UploadSandbox:Im,ChildWindowSandbox:Jv},this.sandboxUtils={hiddenInfo:If,listeningContext:km,backup:Tm,domMutationTracker:Bf,defaultTarget:Rm,UploadInfoManager:Cm,FileListWrapper:bm,EventListeners:Mm,StorageWrapper:Pv,CodeInstrumentation:ng,LocationInstrumentation:kd,LocationWrapper:Pd},this.processors={styleProcessor:rd,domProcessor:Af,DomProcessor:_d}}return e.prototype._getEventOwner=function(e){switch(e){case this.EVENTS.pageNavigationTriggered:return this.pageNavigationWatch;case this.EVENTS.beforeUnload:case this.EVENTS.beforeBeforeUnload:case this.EVENTS.unload:return this.sandbox.event.unload;case this.EVENTS.bodyCreated:case this.EVENTS.documentCleaned:return this.sandbox.node.mutation;case this.EVENTS.uncaughtJsError:case this.EVENTS.unhandledRejection:return this.sandbox.node.win;case this.EVENTS.startFileUploading:case this.EVENTS.endFileUploading:return this.sandbox.upload;case this.EVENTS.evalIframeScript:return this.sandbox.iframe;case this.EVENTS.xhrCompleted:case this.EVENTS.xhrError:case this.EVENTS.beforeXhrSend:return this.sandbox.xhr;case this.EVENTS.beforeFormSubmit:case this.EVENTS.scriptElementAdded:return this.sandbox.node.element;case this.EVENTS.fetchSent:return this.sandbox.fetch;case this.EVENTS.consoleMethCalled:return this.sandbox.console;case this.EVENTS.windowOpened:return this.sandbox.childWindow;default:return null}},e._cleanLocalStorageServiceData=function(e,t){var r=Xc.winLocalStorageGetter.call(t);Xc.storageRemoveItem.call(r,e)},e._setProxylessForComponents=function(e){for(var t=[Af,wl,rd],r=0;r<t.length;r++)t[r].proxyless=e},e.prototype.on=function(e,t){var r=this._getEventOwner(e);r&&r.on(e,t)},e.prototype.off=function(e,t){var r=this._getEventOwner(e);r&&r.off(e,t)},e.prototype.navigateTo=function(e,t){var r=this,n=!!Cl.get().proxyless,o=we(e,this.win,n);o&&(this.win.location=o,t&&this.sandbox.node.win.on(this.sandbox.node.win.HASH_CHANGE_EVENT,function(){r.win.location.reload()}))},e.prototype.start=function(t,r){this.win=r||window,Cl.set(t),t.isFirstPageLoad&&e._cleanLocalStorageServiceData(t.sessionId,this.win),Af.forceProxySrcForImage=t.forceProxySrcForImage,Af.allowMultipleWindows=t.allowMultipleWindows,e._setProxylessForComponents(t.proxyless),this.transport.start(this.eventSandbox.m