zone.js
Version:
Zones for JavaScript
10 lines (8 loc) • 39.6 kB
JavaScript
'use strict';
/**
* @license Angular
* (c) 2010-2026 Google LLC. https://angular.dev/
* License: MIT
*/(function(g,f){if(typeof define=="function"&&define.amd){define(f)}else if(typeof exports=="object" && typeof module<"u"){module.exports=f()}else{var m=f();for(var i in m) g[i]=m[i]}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(){var exports={};var __exports=exports;var module={exports};
"use strict";(function(ge,be){if(typeof define=="function"&&define.amd)define(be);else if(typeof exports=="object"&&typeof module<"u")module.exports=be();else{var Pe=be();for(var Ce in Pe)ge[Ce]=Pe[Ce]}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:exports,function(){var ge={},be=ge,Pe={exports:ge},Ce=Object.defineProperty,yr=Object.defineProperties,gr=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Ae=function(r,e,s){return e in r?Ce(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s},Je=function(r,e){for(var s in e||(e={}))mr.call(e,s)&&Ae(r,s,e[s]);if(qe)for(var t=0,u=qe(e);t<u.length;t++){var s=u[t];kr.call(e,s)&&Ae(r,s,e[s])}return r},br=function(r,e){return yr(r,gr(e))},S=function(r,e,s){return Ae(r,typeof e!="symbol"?e+"":e,s),s},fe=globalThis;function ae(r){var e=fe.__Zone_symbol_prefix||"__zone_symbol__";return e+r}function Pr(){var r=fe.performance;function e(v){r&&r.mark&&r.mark(v)}function s(v,i){r&&r.measure&&r.measure(v,i)}e("Zone");var t=function(){function v(i,o){S(this,"_parent"),S(this,"_name"),S(this,"_properties"),S(this,"_zoneDelegate"),this._parent=i,this._name=o?o.name||"unnamed":"<root>",this._properties=o&&o.properties||{},this._zoneDelegate=new _(this,this._parent&&this._parent._zoneDelegate,o)}return v.assertZonePatched=function(){if(fe.Promise!==N.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(v,"root",{get:function(){for(var i=v.current;i.parent;)i=i.parent;return i},enumerable:!1,configurable:!0}),Object.defineProperty(v,"current",{get:function(){return p.zone},enumerable:!1,configurable:!0}),Object.defineProperty(v,"currentTask",{get:function(){return V},enumerable:!1,configurable:!0}),v.__load_patch=function(i,o,a){if(a===void 0&&(a=!1),N.hasOwnProperty(i)){var E=fe[ae("forceDuplicateZoneCheck")]===!0;if(!a&&E)throw Error("Already loaded patch: "+i)}else if(!fe["__Zone_disable_"+i]){var M="Zone:"+i;e(M),N[i]=o(fe,v,ee),s(M,M)}},Object.defineProperty(v.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),v.prototype.get=function(i){var o=this.getZoneWith(i);if(o)return o._properties[i]},v.prototype.getZoneWith=function(i){for(var o=this;o;){if(o._properties.hasOwnProperty(i))return o;o=o._parent}return null},v.prototype.fork=function(i){if(!i)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,i)},v.prototype.wrap=function(i,o){if(typeof i!="function")throw new Error("Expecting function got: "+i);var a=this._zoneDelegate.intercept(this,i,o),E=this;return function(){return E.runGuarded(a,this,arguments,o)}},v.prototype.run=function(i,o,a,E){p={parent:p,zone:this};try{return this._zoneDelegate.invoke(this,i,o,a,E)}finally{p=p.parent}},v.prototype.runGuarded=function(i,o,a,E){o===void 0&&(o=null),p={parent:p,zone:this};try{try{return this._zoneDelegate.invoke(this,i,o,a,E)}catch(M){if(this._zoneDelegate.handleError(this,M))throw M}}finally{p=p.parent}},v.prototype.runTask=function(i,o,a){if(i.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(i.zone||ne).name+"; Execution: "+this.name+")");var E=i,M=i.type,X=i.data,ce=X===void 0?{}:X,ye=ce.isPeriodic,pe=ye===void 0?!1:ye,Ee=ce.isRefreshable,he=Ee===void 0?!1:Ee;if(!(i.state===I&&(M===G||M===w))){var c=i.state!=Y;c&&E._transitionTo(Y,d);var f=V;V=E,p={parent:p,zone:this};try{M==w&&i.data&&!pe&&!he&&(i.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,E,o,a)}catch(y){if(this._zoneDelegate.handleError(this,y))throw y}}finally{var n=i.state;if(n!==I&&n!==W)if(M==G||pe||he&&n===R)c&&E._transitionTo(d,Y,R);else{var h=E._zoneDelegates;this._updateTaskCount(E,-1),c&&E._transitionTo(I,Y,I),he&&(E._zoneDelegates=h)}p=p.parent,V=f}}},v.prototype.scheduleTask=function(i){if(i.zone&&i.zone!==this)for(var o=this;o;){if(o===i.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(i.zone.name));o=o.parent}i._transitionTo(R,I);var a=[];i._zoneDelegates=a,i._zone=this;try{i=this._zoneDelegate.scheduleTask(this,i)}catch(E){throw i._transitionTo(W,R,I),this._zoneDelegate.handleError(this,E),E}return i._zoneDelegates===a&&this._updateTaskCount(i,1),i.state==R&&i._transitionTo(d,R),i},v.prototype.scheduleMicroTask=function(i,o,a,E){return this.scheduleTask(new g(F,i,o,a,E,void 0))},v.prototype.scheduleMacroTask=function(i,o,a,E,M){return this.scheduleTask(new g(w,i,o,a,E,M))},v.prototype.scheduleEventTask=function(i,o,a,E,M){return this.scheduleTask(new g(G,i,o,a,E,M))},v.prototype.cancelTask=function(i){if(i.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(i.zone||ne).name+"; Execution: "+this.name+")");if(!(i.state!==d&&i.state!==Y)){i._transitionTo(U,d,Y);try{this._zoneDelegate.cancelTask(this,i)}catch(o){throw i._transitionTo(W,U),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(i,-1),i._transitionTo(I,U),i.runCount=-1,i}},v.prototype._updateTaskCount=function(i,o){var a=i._zoneDelegates;o==-1&&(i._zoneDelegates=null);for(var E=0;E<a.length;E++)a[E]._updateTaskCount(i.type,o)},v}();S(t,"__symbol__",ae);var u=t,l={name:"",onHasTask:function(v,i,o,a){return v.hasTask(o,a)},onScheduleTask:function(v,i,o,a){return v.scheduleTask(o,a)},onInvokeTask:function(v,i,o,a,E,M){return v.invokeTask(o,a,E,M)},onCancelTask:function(v,i,o,a){return v.cancelTask(o,a)}},_=function(){function v(i,o,a){S(this,"_zone"),S(this,"_taskCounts",{microTask:0,macroTask:0,eventTask:0}),S(this,"_parentDelegate"),S(this,"_forkDlgt"),S(this,"_forkZS"),S(this,"_forkCurrZone"),S(this,"_interceptDlgt"),S(this,"_interceptZS"),S(this,"_interceptCurrZone"),S(this,"_invokeDlgt"),S(this,"_invokeZS"),S(this,"_invokeCurrZone"),S(this,"_handleErrorDlgt"),S(this,"_handleErrorZS"),S(this,"_handleErrorCurrZone"),S(this,"_scheduleTaskDlgt"),S(this,"_scheduleTaskZS"),S(this,"_scheduleTaskCurrZone"),S(this,"_invokeTaskDlgt"),S(this,"_invokeTaskZS"),S(this,"_invokeTaskCurrZone"),S(this,"_cancelTaskDlgt"),S(this,"_cancelTaskZS"),S(this,"_cancelTaskCurrZone"),S(this,"_hasTaskDlgt"),S(this,"_hasTaskDlgtOwner"),S(this,"_hasTaskZS"),S(this,"_hasTaskCurrZone"),this._zone=i,this._parentDelegate=o,this._forkZS=a&&(a&&a.onFork?a:o._forkZS),this._forkDlgt=a&&(a.onFork?o:o._forkDlgt),this._forkCurrZone=a&&(a.onFork?this._zone:o._forkCurrZone),this._interceptZS=a&&(a.onIntercept?a:o._interceptZS),this._interceptDlgt=a&&(a.onIntercept?o:o._interceptDlgt),this._interceptCurrZone=a&&(a.onIntercept?this._zone:o._interceptCurrZone),this._invokeZS=a&&(a.onInvoke?a:o._invokeZS),this._invokeDlgt=a&&(a.onInvoke?o:o._invokeDlgt),this._invokeCurrZone=a&&(a.onInvoke?this._zone:o._invokeCurrZone),this._handleErrorZS=a&&(a.onHandleError?a:o._handleErrorZS),this._handleErrorDlgt=a&&(a.onHandleError?o:o._handleErrorDlgt),this._handleErrorCurrZone=a&&(a.onHandleError?this._zone:o._handleErrorCurrZone),this._scheduleTaskZS=a&&(a.onScheduleTask?a:o._scheduleTaskZS),this._scheduleTaskDlgt=a&&(a.onScheduleTask?o:o._scheduleTaskDlgt),this._scheduleTaskCurrZone=a&&(a.onScheduleTask?this._zone:o._scheduleTaskCurrZone),this._invokeTaskZS=a&&(a.onInvokeTask?a:o._invokeTaskZS),this._invokeTaskDlgt=a&&(a.onInvokeTask?o:o._invokeTaskDlgt),this._invokeTaskCurrZone=a&&(a.onInvokeTask?this._zone:o._invokeTaskCurrZone),this._cancelTaskZS=a&&(a.onCancelTask?a:o._cancelTaskZS),this._cancelTaskDlgt=a&&(a.onCancelTask?o:o._cancelTaskDlgt),this._cancelTaskCurrZone=a&&(a.onCancelTask?this._zone:o._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var E=a&&a.onHasTask,M=o&&o._hasTaskZS;(E||M)&&(this._hasTaskZS=E?a:l,this._hasTaskDlgt=o,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,a.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=o,this._scheduleTaskCurrZone=this._zone),a.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=o,this._invokeTaskCurrZone=this._zone),a.onCancelTask||(this._cancelTaskZS=l,this._cancelTaskDlgt=o,this._cancelTaskCurrZone=this._zone))}return Object.defineProperty(v.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),v.prototype.fork=function(i,o){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,i,o):new u(i,o)},v.prototype.intercept=function(i,o,a){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,i,o,a):o},v.prototype.invoke=function(i,o,a,E,M){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,i,o,a,E,M):o.apply(a,E)},v.prototype.handleError=function(i,o){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,i,o):!0},v.prototype.scheduleTask=function(i,o){var a=o;if(this._scheduleTaskZS)this._hasTaskZS&&a._zoneDelegates.push(this._hasTaskDlgtOwner),a=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,i,o),a||(a=o);else if(o.scheduleFn)o.scheduleFn(o);else if(o.type==F)x(o);else throw new Error("Task is missing scheduleFn.");return a},v.prototype.invokeTask=function(i,o,a,E){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,i,o,a,E):o.callback.apply(a,E)},v.prototype.cancelTask=function(i,o){var a;if(this._cancelTaskZS)a=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,i,o);else{if(!o.cancelFn)throw Error("Task is not cancelable");a=o.cancelFn(o)}return a},v.prototype.hasTask=function(i,o){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,i,o)}catch(a){this.handleError(i,a)}},v.prototype._updateTaskCount=function(i,o){var a=this._taskCounts,E=a[i],M=a[i]=E+o;if(M<0)throw new Error("More tasks executed then were scheduled.");if(E==0||M==0){var X={microTask:a.microTask>0,macroTask:a.macroTask>0,eventTask:a.eventTask>0,change:i};this.hasTask(this._zone,X)}},v}(),g=function(){function v(i,o,a,E,M,X){if(S(this,"type"),S(this,"source"),S(this,"invoke"),S(this,"callback"),S(this,"data"),S(this,"scheduleFn"),S(this,"cancelFn"),S(this,"_zone",null),S(this,"runCount",0),S(this,"_zoneDelegates",null),S(this,"_state","notScheduled"),this.type=i,this.source=o,this.data=E,this.scheduleFn=M,this.cancelFn=X,!a)throw new Error("callback is not defined");this.callback=a;var ce=this;i===G&&E&&E.useG?this.invoke=v.invokeTask:this.invoke=function(){return v.invokeTask.call(fe,ce,this,arguments)}}return v.invokeTask=function(i,o,a){i||(i=this),L++;try{return i.runCount++,i.zone.runTask(i,o,a)}finally{L==1&&te(),L--}},Object.defineProperty(v.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),v.prototype.cancelScheduleRequest=function(){this._transitionTo(I,R)},v.prototype._transitionTo=function(i,o,a){if(this._state===o||this._state===a)this._state=i,i==I&&(this._zoneDelegates=null);else throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(i,"', expecting state '").concat(o,"'").concat(a?" or '"+a+"'":"",", was '").concat(this._state,"'."))},v.prototype.toString=function(){return this.data&&typeof this.data.handleId!="undefined"?this.data.handleId.toString():Object.prototype.toString.call(this)},v.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},v}(),m=ae("setTimeout"),D=ae("Promise"),T=ae("then"),k=[],P=!1,A;function J(v){if(A||fe[D]&&(A=fe[D].resolve(0)),A){var i=A[T];i||(i=A.then),i.call(A,v)}else fe[m](v,0)}function x(v){L===0&&k.length===0&&J(te),v&&k.push(v)}function te(){if(!P){for(P=!0;k.length;){var v=k;k=[];for(var i=0;i<v.length;i++){var o=v[i];try{o.zone.runTask(o,null,null)}catch(a){ee.onUnhandledError(a)}}}ee.microtaskDrainDone(),P=!1}}var ne={name:"NO ZONE"},I="notScheduled",R="scheduling",d="scheduled",Y="running",U="canceling",W="unknown",F="microTask",w="macroTask",G="eventTask",N={},ee={symbol:ae,currentZoneFrame:function(){return p},onUnhandledError:H,microtaskDrainDone:H,scheduleMicroTask:x,showUncaughtError:function(){return!u[ae("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:H,patchMethod:function(){return H},bindArguments:function(){return[]},patchThen:function(){return H},patchMacroTask:function(){return H},patchEventPrototype:function(){return H},getGlobalObjects:function(){},ObjectDefineProperty:function(){return H},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return H},wrapWithCurrentZone:function(){return H},filterProperties:function(){return[]},attachOriginToPatched:function(){return H},_redefineProperty:function(){return H},patchCallbacks:function(){return H},nativeScheduleMicroTask:J},p={parent:null,zone:new u(null,null)},V=null,L=0;function H(){}return s("Zone","Zone"),u}function wr(){var r,e=globalThis,s=e[ae("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(s||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return(r=e.Zone)!=null||(e.Zone=Pr()),e.Zone}var we=Object.getOwnPropertyDescriptor,je=Object.defineProperty,He=Object.getPrototypeOf,Rr=Object.create,Sr=Array.prototype.slice,Fe="addEventListener",Ve="removeEventListener",Be=ae(Fe),Ge=ae(Ve),ve="true",_e="false",Re=ae("");function ze(r,e){return Zone.current.wrap(r,e)}function Ue(r,e,s,t,u){return Zone.current.scheduleMacroTask(r,e,s,t,u)}var B=ae,De=typeof window!="undefined",Ze=De?window:void 0,$=De&&Ze||globalThis,Or="removeAttribute";function xe(r,e){for(var s=r.length-1;s>=0;s--)typeof r[s]=="function"&&(r[s]=ze(r[s],e+"_"+s));return r}function Cr(r,e){for(var s=r.constructor.name,t=function(l){var _=e[l],g=r[_];if(g){var m=we(r,_);if(!Ke(m))return"continue";r[_]=function(D){var T=function(){return D.apply(this,xe(arguments,s+"."+_))};return Te(T,D),T}(g)}},u=0;u<e.length;u++)t(u)}function Ke(r){return r?r.writable===!1?!1:!(typeof r.get=="function"&&typeof r.set=="undefined"):!0}var Qe=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,Ne=!("nw"in $)&&typeof $.process!="undefined"&&$.process.toString()==="[object process]",We=!Ne&&!Qe&&!!(De&&Ze.HTMLElement),$e=typeof $.process!="undefined"&&$.process.toString()==="[object process]"&&!Qe&&!!(De&&Ze.HTMLElement),Le={},Dr=B("enable_beforeunload"),er=function(r){if(r=r||$.event,!!r){var e=Le[r.type];e||(e=Le[r.type]=B("ON_PROPERTY"+r.type));var s=this||r.target||$,t=s[e],u;if(We&&s===Ze&&r.type==="error"){var l=r;u=t&&t.call(this,l.message,l.filename,l.lineno,l.colno,l.error),u===!0&&r.preventDefault()}else u=t&&t.apply(this,arguments),r.type==="beforeunload"&&$[Dr]&&typeof u=="string"?r.returnValue=u:u!=null&&!u&&r.preventDefault();return u}};function rr(r,e,s){var t=we(r,e);if(!t&&s){var u=we(s,e);u&&(t={enumerable:!0,configurable:!0})}if(!(!t||!t.configurable)){var l=B("on"+e+"patched");if(!(r.hasOwnProperty(l)&&r[l])){delete t.writable,delete t.value;var _=t.get,g=t.set,m=e.slice(2),D=Le[m];D||(D=Le[m]=B("ON_PROPERTY"+m)),t.set=function(T){var k=this;if(!k&&r===$&&(k=$),!!k){var P=k[D];typeof P=="function"&&k.removeEventListener(m,er),g==null||g.call(k,null),k[D]=T,typeof T=="function"&&k.addEventListener(m,er,!1)}},t.get=function(){var T=this;if(!T&&r===$&&(T=$),!T)return null;var k=T[D];if(k)return k;if(_){var P=_.call(this);if(P)return t.set.call(this,P),typeof T[Or]=="function"&&T.removeAttribute(e),P}return null},je(r,e,t),r[l]=!0}}}function tr(r,e,s){if(e)for(var t=0;t<e.length;t++)rr(r,"on"+e[t],s);else{var u=[];for(var l in r)l.slice(0,2)=="on"&&u.push(l);for(var _=0;_<u.length;_++)rr(r,u[_],s)}}var ue=B("originalInstance");function Se(r){var e=$[r];if(e){$[B(r)]=e,$[r]=function(){var u=xe(arguments,r);switch(u.length){case 0:this[ue]=new e;break;case 1:this[ue]=new e(u[0]);break;case 2:this[ue]=new e(u[0],u[1]);break;case 3:this[ue]=new e(u[0],u[1],u[2]);break;case 4:this[ue]=new e(u[0],u[1],u[2],u[3]);break;default:throw new Error("Arg list too long.")}},Te($[r],e);var s=new e(function(){}),t;for(t in s)r==="XMLHttpRequest"&&t==="responseBlob"||function(u){typeof s[u]=="function"?$[r].prototype[u]=function(){return this[ue][u].apply(this[ue],arguments)}:je($[r].prototype,u,{set:function(l){typeof l=="function"?(this[ue][u]=ze(l,r+"."+u),Te(this[ue][u],l)):this[ue][u]=l},get:function(){return this[ue][u]}})}(t);for(t in e)t!=="prototype"&&e.hasOwnProperty(t)&&($[r][t]=e[t])}}function Zr(r,e){if(typeof Object.getOwnPropertySymbols=="function"){var s=Object.getOwnPropertySymbols(r);s.forEach(function(t){var u=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,{get:function(){return r[t]},set:function(l){u&&(!u.writable||typeof u.set!="function")||(r[t]=l)},enumerable:u?u.enumerable:!0,configurable:u?u.configurable:!0})})}}var Nr=!1;function de(r,e,s){for(var t=r;t&&!t.hasOwnProperty(e);)t=He(t);!t&&r[e]&&(t=r);var u=B(e),l=null;if(t&&(!(l=t[u])||!t.hasOwnProperty(u))){l=t[u]=t[e];var _=t&&we(t,e);if(Ke(_)){var g=s(l,u,e);t[e]=function(){return g(this,arguments)},Te(t[e],l),Nr&&Zr(l,t[e])}}return l}function Lr(r,e,s){var t=null;function u(l){var _=l.data;return _.args[_.cbIdx]=function(){l.invoke.apply(this,arguments)},t.apply(_.target,_.args),l}t=de(r,e,function(l){return function(_,g){var m=s(_,g);return m.cbIdx>=0&&typeof g[m.cbIdx]=="function"?Ue(m.name,g[m.cbIdx],m,u):l.apply(_,g)}})}function Te(r,e){r[B("OriginalDelegate")]=e}function nr(r){return typeof r=="function"}function or(r){return typeof r=="number"}var Ir={useG:!0},se={},ir={},ar=new RegExp("^"+Re+"(\\w+)(true|false)$"),sr=B("propagationStopped");function ur(r,e){var s=(e?e(r):r)+_e,t=(e?e(r):r)+ve,u=Re+s,l=Re+t;se[r]={},se[r][_e]=u,se[r][ve]=l}function Mr(r,e,s,t){var u=t&&t.add||Fe,l=t&&t.rm||Ve,_=t&&t.listeners||"eventListeners",g=t&&t.rmAll||"removeAllListeners",m=B(u),D="."+u+":",T="prependListener",k="."+T+":",P=function(R,d,Y){if(!R.isRemoved){var U=R.callback;typeof U=="object"&&U.handleEvent&&(R.callback=function(G){return U.handleEvent(G)},R.originalDelegate=U);var W;try{R.invoke(R,d,[Y])}catch(G){W=G}var F=R.options;if(F&&typeof F=="object"&&F.once){var w=R.originalDelegate?R.originalDelegate:R.callback;d[l].call(d,Y.type,w,F)}return W}};function A(R,d,Y){if(d=d||r.event,!!d){var U=R||d.target||r,W=U[se[d.type][Y?ve:_e]];if(W){var F=[];if(W.length===1){var w=P(W[0],U,d);w&&F.push(w)}else for(var G=W.slice(),N=0;N<G.length&&!(d&&d[sr]===!0);N++){var w=P(G[N],U,d);w&&F.push(w)}if(F.length===1)throw F[0];for(var ee=function(p){var V=F[p];e.nativeScheduleMicroTask(function(){throw V})},N=0;N<F.length;N++)ee(N)}}}var J=function(R){return A(this,R,!1)},x=function(R){return A(this,R,!0)};function te(R,d){if(!R)return!1;var Y=!0;d&&d.useG!==void 0&&(Y=d.useG);var U=d&&d.vh,W=!0;d&&d.chkDup!==void 0&&(W=d.chkDup);var F=!1;d&&d.rt!==void 0&&(F=d.rt);for(var w=R;w&&!w.hasOwnProperty(u);)w=He(w);if(!w&&R[u]&&(w=R),!w||w[m])return!1;var G=d&&d.eventNameToString,N={},ee=w[m]=w[u],p=w[B(l)]=w[l],V=w[B(_)]=w[_],L=w[B(g)]=w[g],H;d&&d.prepend&&(H=w[B(d.prepend)]=w[d.prepend]);function v(n,h){return h?typeof n=="boolean"?{capture:n,passive:!0}:n?typeof n=="object"&&n.passive!==!1?br(Je({},n),{passive:!0}):n:{passive:!0}:n}var i=function(n){if(!N.isExisting)return ee.call(N.target,N.eventName,N.capture?x:J,N.options)},o=function(n){if(!n.isRemoved){var h=se[n.eventName],y=void 0;h&&(y=h[n.capture?ve:_e]);var b=y&&n.target[y];if(b)for(var Z=0;Z<b.length;Z++){var j=b[Z];if(j===n){b.splice(Z,1),n.isRemoved=!0,n.removeAbortListener&&(n.removeAbortListener(),n.removeAbortListener=null),b.length===0&&(n.allRemoved=!0,n.target[y]=null);break}}}if(n.allRemoved)return p.call(n.target,n.eventName,n.capture?x:J,n.options)},a=function(n){return ee.call(N.target,N.eventName,n.invoke,N.options)},E=function(n){return H.call(N.target,N.eventName,n.invoke,N.options)},M=function(n){return p.call(n.target,n.eventName,n.invoke,n.options)},X=Y?i:a,ce=Y?o:M,ye=function(n,h){var y=typeof h;return y==="function"&&n.callback===h||y==="object"&&n.originalDelegate===h},pe=(d==null?void 0:d.diff)||ye,Ee=Zone[B("UNPATCHED_EVENTS")],he=r[B("PASSIVE_EVENTS")];function c(n){if(typeof n=="object"&&n!==null){var h=Je({},n);return n.signal&&(h.signal=n.signal),h}return n}var f=function(n,h,y,b,Z,j){return Z===void 0&&(Z=!1),j===void 0&&(j=!1),function(){var O=this||r,C=arguments[0];d&&d.transferEventName&&(C=d.transferEventName(C));var z=arguments[1];if(!z)return n.apply(this,arguments);if(Ne&&C==="uncaughtException")return n.apply(this,arguments);var K=!1;if(typeof z!="function"){if(!z.handleEvent)return n.apply(this,arguments);K=!0}if(!(U&&!U(n,z,O,arguments))){var ie=!!he&&he.indexOf(C)!==-1,re=c(v(arguments[2],ie)),Q=re==null?void 0:re.signal;if(!(Q!=null&&Q.aborted)){if(Ee){for(var q=0;q<Ee.length;q++)if(C===Ee[q])return ie?n.call(O,C,z,re):n.apply(this,arguments)}var oe=re?typeof re=="boolean"?!0:re.capture:!1,vr=re&&typeof re=="object"?re.once:!1,Yr=Zone.current,Ye=se[C];Ye||(ur(C,G),Ye=se[C]);var _r=Ye[oe?ve:_e],ke=O[_r],dr=!1;if(ke){if(dr=!0,W){for(var q=0;q<ke.length;q++)if(pe(ke[q],z))return}}else ke=O[_r]=[];var Me,Tr=O.constructor.name,pr=ir[Tr];pr&&(Me=pr[C]),Me||(Me=Tr+h+(G?G(C):C)),N.options=re,vr&&(N.options.once=!1),N.target=O,N.capture=oe,N.eventName=C,N.isExisting=dr;var Oe=Y?Ir:void 0;Oe&&(Oe.taskData=N),Q&&(N.options.signal=void 0);var le=Yr.scheduleEventTask(Me,z,Oe,y,b);if(Q){N.options.signal=Q;var Er=function(){return le.zone.cancelTask(le)};n.call(Q,"abort",Er,{once:!0}),le.removeAbortListener=function(){return Q.removeEventListener("abort",Er)}}if(N.target=null,Oe&&(Oe.taskData=null),vr&&(N.options.once=!0),typeof le.options!="boolean"&&(le.options=re),le.target=O,le.capture=oe,le.eventName=C,K&&(le.originalDelegate=z),j?ke.unshift(le):ke.push(le),Z)return O}}}};return w[u]=f(ee,D,X,ce,F),H&&(w[T]=f(H,k,E,ce,F,!0)),w[l]=function(){var n=this||r,h=arguments[0];d&&d.transferEventName&&(h=d.transferEventName(h));var y=arguments[2],b=y?typeof y=="boolean"?!0:y.capture:!1,Z=arguments[1];if(!Z)return p.apply(this,arguments);if(!(U&&!U(p,Z,n,arguments))){var j=se[h],O;j&&(O=j[b?ve:_e]);var C=O&&n[O];if(C)for(var z=0;z<C.length;z++){var K=C[z];if(pe(K,Z)){if(C.splice(z,1),K.isRemoved=!0,C.length===0&&(K.allRemoved=!0,n[O]=null,!b&&typeof h=="string")){var ie=Re+"ON_PROPERTY"+h;n[ie]=null}return K.zone.cancelTask(K),F?n:void 0}}return p.apply(this,arguments)}},w[_]=function(){var n=this||r,h=arguments[0];d&&d.transferEventName&&(h=d.transferEventName(h));for(var y=[],b=cr(n,G?G(h):h),Z=0;Z<b.length;Z++){var j=b[Z],O=j.originalDelegate?j.originalDelegate:j.callback;y.push(O)}return y},w[g]=function(){var n=this||r,h=arguments[0];if(h){d&&d.transferEventName&&(h=d.transferEventName(h));var C=se[h];if(C){var z=C[_e],K=C[ve],ie=n[z],re=n[K];if(ie)for(var Q=ie.slice(),b=0;b<Q.length;b++){var q=Q[b],oe=q.originalDelegate?q.originalDelegate:q.callback;this[l].call(this,h,oe,q.options)}if(re)for(var Q=re.slice(),b=0;b<Q.length;b++){var q=Q[b],oe=q.originalDelegate?q.originalDelegate:q.callback;this[l].call(this,h,oe,q.options)}}}else{for(var y=Object.keys(n),b=0;b<y.length;b++){var Z=y[b],j=ar.exec(Z),O=j&&j[1];O&&O!=="removeListener"&&this[g].call(this,O)}this[g].call(this,"removeListener")}if(F)return this},Te(w[u],ee),Te(w[l],p),L&&Te(w[g],L),V&&Te(w[_],V),!0}for(var ne=[],I=0;I<s.length;I++)ne[I]=te(s[I],t);return ne}function cr(r,e){if(!e){var s=[];for(var t in r){var u=ar.exec(t),l=u&&u[1];if(l&&(!e||l===e)){var _=r[t];if(_)for(var g=0;g<_.length;g++)s.push(_[g])}}return s}var m=se[e];m||(ur(e),m=se[e]);var D=r[m[_e]],T=r[m[ve]];return D?T?D.concat(T):D.slice():T?T.slice():[]}function Ar(r,e){var s=r.Event;s&&s.prototype&&e.patchMethod(s.prototype,"stopImmediatePropagation",function(t){return function(u,l){u[sr]=!0,t&&t.apply(u,l)}})}function jr(r,e){e.patchMethod(r,"queueMicrotask",function(s){return function(t,u){Zone.current.scheduleMicroTask("queueMicrotask",u[0])}})}var Ie=B("zoneTask");function me(r,e,s,t){var u=null,l=null;e+=t,s+=t;var _={};function g(D){var T=D.data;T.args[0]=function(){return D.invoke.apply(this,arguments)};var k=u.apply(r,T.args);return or(k)?T.handleId=k:(T.handle=k,T.isRefreshable=nr(k.refresh)),D}function m(D){var T=D.data,k=T.handle,P=T.handleId;return l.call(r,k!=null?k:P)}u=de(r,e,function(D){return function(T,k){var P;if(nr(k[0])){var A={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?k[1]||0:void 0,args:k},J=k[0];k[0]=function(){try{return J.apply(this,arguments)}finally{var W=A.handle,F=A.handleId,w=A.isPeriodic,G=A.isRefreshable;!w&&!G&&(F?delete _[F]:W&&(W[Ie]=null))}};var x=Ue(e,k[0],A,g,m);if(!x)return x;var te=x.data,ne=te.handleId,I=te.handle,R=te.isRefreshable,d=te.isPeriodic;if(ne)_[ne]=x;else if(I&&(I[Ie]=x,R&&!d)){var Y=I.refresh;I.refresh=function(){var U=x.zone,W=x.state;return W==="notScheduled"?(x._state="scheduled",U._updateTaskCount(x,1)):W==="running"&&(x._state="scheduling"),Y.call(this)}}return(P=I!=null?I:ne)!=null?P:x}else return D.apply(r,k)}}),l=de(r,s,function(D){return function(T,k){var P=k[0],A;or(P)?(A=_[P],delete _[P]):(A=P==null?void 0:P[Ie],A?P[Ie]=null:A=P),A!=null&&A.type?A.cancelFn&&A.zone.cancelTask(A):D.apply(r,k)}})}function Hr(r,e){var s=e.getGlobalObjects(),t=s.isBrowser,u=s.isMix;if(!(!t&&!u||!r.customElements||!("customElements"in r))){var l=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];e.patchCallbacks(e,r.customElements,"customElements","define",l)}}function Fr(r,e){if(!Zone[e.symbol("patchEventTarget")]){for(var s=e.getGlobalObjects(),t=s.eventNames,u=s.zoneSymbolEventNames,l=s.TRUE_STR,_=s.FALSE_STR,g=s.ZONE_SYMBOL_PREFIX,m=0;m<t.length;m++){var D=t[m],T=D+_,k=D+l,P=g+T,A=g+k;u[D]={},u[D][_]=P,u[D][l]=A}var J=r.EventTarget;if(!(!J||!J.prototype))return e.patchEventTarget(r,e,[J&&J.prototype]),!0}}function Vr(r,e){e.patchEventPrototype(r,e)}function lr(r,e,s){if(!s||s.length===0)return e;var t=s.filter(function(l){return l.target===r});if(t.length===0)return e;var u=t[0].ignoreProperties;return e.filter(function(l){return u.indexOf(l)===-1})}function fr(r,e,s,t){if(r){var u=lr(r,e,s);tr(r,u,t)}}function Xe(r){return Object.getOwnPropertyNames(r).filter(function(e){return e.startsWith("on")&&e.length>2}).map(function(e){return e.substring(2)})}function Br(r,e){if(!(Ne&&!$e)&&!Zone[r.symbol("patchEvents")]){var s=e.__Zone_ignore_on_properties,t=[];if(We){var u=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]),fr(u,Xe(u),s,He(u))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var l=0;l<t.length;l++){var _=e[t[l]];_!=null&&_.prototype&&fr(_.prototype,Xe(_.prototype),s)}}}function Gr(r){r.__load_patch("timers",function(e){var s="set",t="clear";me(e,s,t,"Timeout"),me(e,s,t,"Interval"),me(e,s,t,"Immediate")}),r.__load_patch("requestAnimationFrame",function(e){me(e,"request","cancel","AnimationFrame"),me(e,"mozRequest","mozCancel","AnimationFrame"),me(e,"webkitRequest","webkitCancel","AnimationFrame")}),r.__load_patch("blocking",function(e,s){for(var t=["alert","prompt","confirm"],u=0;u<t.length;u++){var l=t[u];de(e,l,function(_,g,m){return function(D,T){return s.current.run(_,e,T,m)}})}}),r.__load_patch("EventTarget",function(e,s,t){Vr(e,t),Fr(e,t);var u=e.XMLHttpRequestEventTarget;u&&u.prototype&&t.patchEventTarget(e,t,[u.prototype])}),r.__load_patch("MutationObserver",function(e,s,t){Se("MutationObserver"),Se("WebKitMutationObserver")}),r.__load_patch("IntersectionObserver",function(e,s,t){Se("IntersectionObserver")}),r.__load_patch("FileReader",function(e,s,t){Se("FileReader")}),r.__load_patch("on_property",function(e,s,t){Br(t,e)}),r.__load_patch("customElements",function(e,s,t){Hr(e,t)}),r.__load_patch("XHR",function(e,s){D(e);var t=B("xhrTask"),u=B("xhrSync"),l=B("xhrListener"),_=B("xhrScheduled"),g=B("xhrURL"),m=B("xhrErrorBeforeScheduled");function D(T){var k=T.XMLHttpRequest;if(!k)return;var P=k.prototype;function A(p){return p[t]}var J=P[Be],x=P[Ge];if(!J){var te=T.XMLHttpRequestEventTarget;if(te){var ne=te.prototype;J=ne[Be],x=ne[Ge]}}var I="readystatechange",R="scheduled";function d(p){var V=p.data,L=V.target;L[_]=!1,L[m]=!1;var H=L[l];J||(J=L[Be],x=L[Ge]),H&&x.call(L,I,H);var v=L[l]=function(){if(L.readyState===L.DONE)if(!V.aborted&&L[_]&&p.state===R){var o=L[s.__symbol__("loadfalse")];if(L.status!==0&&o&&o.length>0){var a=p.invoke;p.invoke=function(){for(var E=L[s.__symbol__("loadfalse")],M=0;M<E.length;M++)E[M]===p&&E.splice(M,1);!V.aborted&&p.state===R&&a.call(p)},o.push(p)}else p.invoke()}else!V.aborted&&L[_]===!1&&(L[m]=!0)};J.call(L,I,v);var i=L[t];return i||(L[t]=p),N.apply(L,V.args),L[_]=!0,p}function Y(){}function U(p){var V=p.data;return V.aborted=!0,ee.apply(V.target,V.args)}var W=de(P,"open",function(){return function(p,V){return p[u]=V[2]==!1,p[g]=V[1],W.apply(p,V)}}),F="XMLHttpRequest.send",w=B("fetchTaskAborting"),G=B("fetchTaskScheduling"),N=de(P,"send",function(){return function(p,V){if(s.current[G]===!0||p[u])return N.apply(p,V);var L={target:p,url:p[g],isPeriodic:!1,args:V,aborted:!1},H=Ue(F,Y,L,d,U);p&&p[m]===!0&&!L.aborted&&H.state===R&&H.invoke()}}),ee=de(P,"abort",function(){return function(p,V){var L=A(p);if(L&&typeof L.type=="string"){if(L.cancelFn==null||L.data&&L.data.aborted)return;L.zone.cancelTask(L)}else if(s.current[w]===!0)return ee.apply(p,V)}})}}),r.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&Cr(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),r.__load_patch("PromiseRejectionEvent",function(e,s){function t(u){return function(l){var _=cr(e,u);_.forEach(function(g){var m=e.PromiseRejectionEvent;if(m){var D=new m(u,{promise:l.promise,reason:l.rejection});g.invoke(D)}})}}e.PromiseRejectionEvent&&(s[B("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),s[B("rejectionHandledHandler")]=t("rejectionhandled"))}),r.__load_patch("queueMicrotask",function(e,s,t){jr(e,t)})}function zr(r){r.__load_patch("ZoneAwarePromise",function(e,s,t){var u=Object.getOwnPropertyDescriptor,l=Object.defineProperty;function _(c){if(c&&c.toString===Object.prototype.toString){var f=c.constructor&&c.constructor.name;return(f||"")+": "+JSON.stringify(c)}return c?c.toString():Object.prototype.toString.call(c)}var g=t.symbol,m=[],D=e[g("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,T=g("Promise"),k=g("then"),P="__creationTrace__";t.onUnhandledError=function(c){if(t.showUncaughtError()){var f=c&&c.rejection;f?console.error("Unhandled Promise rejection:",f instanceof Error?f.message:f,"; Zone:",c.zone.name,"; Task:",c.task&&c.task.source,"; Value:",f,f instanceof Error?f.stack:void 0):console.error(c)}},t.microtaskDrainDone=function(){for(var c=function(){var f=m.shift();try{f.zone.runGuarded(function(){throw f.throwOriginal?f.rejection:f})}catch(n){J(n)}};m.length;)c()};var A=g("unhandledPromiseRejectionHandler");function J(c){t.onUnhandledError(c);try{var f=s[A];typeof f=="function"&&f.call(this,c)}catch(n){}}function x(c){return c&&typeof c.then=="function"}function te(c){return c}function ne(c){return X.reject(c)}var I=g("state"),R=g("value"),d=g("finally"),Y=g("parentPromiseValue"),U=g("parentPromiseState"),W="Promise.then",F=null,w=!0,G=!1,N=0;function ee(c,f){return function(n){try{H(c,f,n)}catch(h){H(c,!1,h)}}}var p=function(){var c=!1;return function(n){return function(){c||(c=!0,n.apply(null,arguments))}}},V="Promise resolved with itself",L=g("currentTaskTrace");function H(c,f,n){var h=p();if(c===n)throw new TypeError(V);if(c[I]===F){var y=null;try{(typeof n=="object"||typeof n=="function")&&(y=n&&n.then)}catch(C){return h(function(){H(c,!1,C)})(),c}if(f!==G&&n instanceof X&&n.hasOwnProperty(I)&&n.hasOwnProperty(R)&&n[I]!==F)i(n),H(c,n[I],n[R]);else if(f!==G&&typeof y=="function")try{y.call(n,h(ee(c,f)),h(ee(c,!1)))}catch(C){h(function(){H(c,!1,C)})()}else{c[I]=f;var b=c[R];if(c[R]=n,c[d]===d&&f===w&&(c[I]=c[U],c[R]=c[Y]),f===G&&n instanceof Error){var Z=s.currentTask&&s.currentTask.data&&s.currentTask.data[P];Z&&l(n,L,{configurable:!0,enumerable:!1,writable:!0,value:Z})}for(var j=0;j<b.length;)o(c,b[j++],b[j++],b[j++],b[j++]);if(b.length==0&&f==G){c[I]=N;var O=n;try{throw new Error("Uncaught (in promise): "+_(n)+(n&&n.stack?"\n"+n.stack:""))}catch(C){O=C}D&&(O.throwOriginal=!0),O.rejection=n,O.promise=c,O.zone=s.current,O.task=s.currentTask,m.push(O),t.scheduleMicroTask()}}}return c}var v=g("rejectionHandledHandler");function i(c){if(c[I]===N){try{var f=s[v];f&&typeof f=="function"&&f.call(this,{rejection:c[R],promise:c})}catch(h){}c[I]=G;for(var n=0;n<m.length;n++)c===m[n].promise&&m.splice(n,1)}}function o(c,f,n,h,y){i(c);var b=c[I],Z=b?typeof h=="function"?h:te:typeof y=="function"?y:ne;f.scheduleMicroTask(W,function(){try{var j=c[R],O=!!n&&d===n[d];O&&(n[Y]=j,n[U]=b);var C=f.run(Z,void 0,O&&Z!==ne&&Z!==te?[]:[j]);H(n,!0,C)}catch(z){H(n,!1,z)}},n)}var a="function ZoneAwarePromise() { [native code] }",E=function(){},M=e.AggregateError,X=function(){function c(f){var n=this;if(!(n instanceof c))throw new Error("Must be an instanceof Promise.");n[I]=F,n[R]=[];try{var h=p();f&&f(h(ee(n,w)),h(ee(n,G)))}catch(y){H(n,!1,y)}}return c.toString=function(){return a},c.resolve=function(f){return f instanceof c?f:H(new this(null),w,f)},c.reject=function(f){return H(new this(null),G,f)},c.withResolvers=function(){var f={};return f.promise=new c(function(n,h){f.resolve=n,f.reject=h}),f},c.any=function(f){if(!f||typeof f[Symbol.iterator]!="function")return Promise.reject(new M([],"All promises were rejected"));var n=[],h=0;try{for(var y=0,b=f;y<b.length;y++){var Z=b[y];h++,n.push(c.resolve(Z))}}catch(C){return Promise.reject(new M([],"All promises were rejected"))}if(h===0)return Promise.reject(new M([],"All promises were rejected"));var j=!1,O=[];return new c(function(C,z){for(var K=0;K<n.length;K++)n[K].then(function(ie){j||(j=!0,C(ie))},function(ie){O.push(ie),h--,h===0&&(j=!0,z(new M(O,"All promises were rejected")))})})},c.race=function(f){var n,h,y=new this(function(z,K){n=z,h=K});function b(z){n(z)}function Z(z){h(z)}for(var j=0,O=f;j<O.length;j++){var C=O[j];x(C)||(C=this.resolve(C)),C.then(b,Z)}return y},c.all=function(f){return c.allWithCallback(f)},c.allSettled=function(f){var n=this&&this.prototype instanceof c?this:c;return n.allWithCallback(f,{thenCallback:function(h){return{status:"fulfilled",value:h}},errorCallback:function(h){return{status:"rejected",reason:h}}})},c.allWithCallback=function(f,n){for(var h,y,b=new this(function(Q,q){h=Q,y=q}),Z=2,j=0,O=[],C=function(Q){x(Q)||(Q=z.resolve(Q));var q=j;try{Q.then(function(oe){O[q]=n?n.thenCallback(oe):oe,Z--,Z===0&&h(O)},function(oe){n?(O[q]=n.errorCallback(oe),Z--,Z===0&&h(O)):y(oe)})}catch(oe){y(oe)}Z++,j++},z=this,K=0,ie=f;K<ie.length;K++){var re=ie[K];C(re)}return Z-=2,Z===0&&h(O),b},Object.defineProperty(c.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,Symbol.species,{get:function(){return c},enumerable:!1,configurable:!0}),c.prototype.then=function(f,n){var h,y=(h=this.constructor)==null?void 0:h[Symbol.species];(!y||typeof y!="function")&&(y=this.constructor||c);var b=new y(E),Z=s.current;return this[I]==F?this[R].push(Z,b,f,n):o(this,Z,b,f,n),b},c.prototype.catch=function(f){return this.then(null,f)},c.prototype.finally=function(f){var n,h=(n=this.constructor)==null?void 0:n[Symbol.species];(!h||typeof h!="function")&&(h=c);var y=new h(E);y[d]=d;var b=s.current;return this[I]==F?this[R].push(b,y,f,f):o(this,b,y,f,f),y},c}();X.resolve=X.resolve,X.reject=X.reject,X.race=X.race,X.all=X.all;var ce=e[T]=e.Promise;e.Promise=X;var ye=g("thenPatched");function pe(c){var f=c.prototype,n=u(f,"then");if(!(n&&(n.writable===!1||!n.configurable))){var h=f.then;f[k]=h,c.prototype.then=function(y,b){var Z=this,j=new X(function(O,C){h.call(Z,O,C)});return j.then(y,b)},c[ye]=!0}}t.patchThen=pe;function Ee(c){return function(f,n){var h=c.apply(f,n);if(h instanceof X)return h;var y=h.constructor;return y[ye]||pe(y),h}}if(ce){pe(ce);var he=ce.try;he&&typeof he=="function"&&(X.try=he),de(e,"fetch",function(c){return Ee(c)})}return Promise[s.__symbol__("uncaughtPromiseErrors")]=m,X})}function Ur(r){r.__load_patch("toString",function(e){var s=Function.prototype.toString,t=B("OriginalDelegate"),u=B("Promise"),l=B("Error"),_=function(){if(typeof this=="function"){var T=this[t];if(T)return typeof T=="function"?s.call(T):Object.prototype.toString.call(T);if(this===Promise){var k=e[u];if(k)return s.call(k)}if(this===Error){var P=e[l];if(P)return s.call(P)}}return s.call(this)};_[t]=s,Function.prototype.toString=_;var g=Object.prototype.toString,m="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?m:g.call(this)}})}function xr(r,e,s,t,u){var l=Zone.__symbol__(t);if(!e[l]){var _=e[l]=e[t];e[t]=function(g,m,D){return m&&m.prototype&&u.forEach(function(T){var k="".concat(s,".").concat(t,"::")+T,P=m.prototype;try{if(P.hasOwnProperty(T)){var A=r.ObjectGetOwnPropertyDescriptor(P,T);A&&A.value?(A.value=r.wrapWithCurrentZone(A.value,k),r._redefineProperty(m.prototype,T,A)):P[T]&&(P[T]=r.wrapWithCurrentZone(P[T],k))}else P[T]&&(P[T]=r.wrapWithCurrentZone(P[T],k))}catch(J){}}),_.call(e,g,m,D)},r.attachOriginToPatched(e[t],_)}}function Wr(r){r.__load_patch("util",function(e,s,t){var u=Xe(e);t.patchOnProperties=tr,t.patchMethod=de,t.bindArguments=xe,t.patchMacroTask=Lr;var l=s.__symbol__("BLACK_LISTED_EVENTS"),_=s.__symbol__("UNPATCHED_EVENTS");e[_]&&(e[l]=e[_]),e[l]&&(s[l]=s[_]=e[l]),t.patchEventPrototype=Ar,t.patchEventTarget=Mr,t.ObjectDefineProperty=je,t.ObjectGetOwnPropertyDescriptor=we,t.ObjectCreate=Rr,t.ArraySlice=Sr,t.patchClass=Se,t.wrapWithCurrentZone=ze,t.filterProperties=lr,t.attachOriginToPatched=Te,t._redefineProperty=Object.defineProperty,t.patchCallbacks=xr,t.getGlobalObjects=function(){return{globalSources:ir,zoneSymbolEventNames:se,eventNames:u,isBrowser:We,isMix:$e,isNode:Ne,TRUE_STR:ve,FALSE_STR:_e,ZONE_SYMBOL_PREFIX:Re,ADD_EVENT_LISTENER_STR:Fe,REMOVE_EVENT_LISTENER_STR:Ve}}})}function Xr(r){zr(r),Ur(r),Wr(r)}var hr=wr();return Xr(hr),Gr(hr),be!=ge&&(Pe.exports=ge),Pe.exports});
if(__exports != exports)module.exports = exports;return module.exports}));