Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zone.js

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone.js - npm Package Compare versions

Comparing version 0.6.18 to 0.6.19

6

dist/zone-node.js

@@ -534,2 +534,8 @@ ;

}());
// Protect against aggressive optimizers dropping seemingly unused properties.
// E.g. Closure Compiler in advanced mode.
ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
ZoneAwarePromise['race'] = ZoneAwarePromise.race;
ZoneAwarePromise['all'] = ZoneAwarePromise.all;
var NativePromise = global[__symbol__('Promise')] = global.Promise;

@@ -536,0 +542,0 @@ global.Promise = ZoneAwarePromise;

@@ -534,2 +534,8 @@ ;

}());
// Protect against aggressive optimizers dropping seemingly unused properties.
// E.g. Closure Compiler in advanced mode.
ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
ZoneAwarePromise['race'] = ZoneAwarePromise.race;
ZoneAwarePromise['all'] = ZoneAwarePromise.all;
var NativePromise = global[__symbol__('Promise')] = global.Promise;

@@ -536,0 +542,0 @@ global.Promise = ZoneAwarePromise;

2

dist/zone.min.js

@@ -1,1 +0,1 @@

function bindArguments(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function patchPrototype(e,t){for(var n=e.constructor.name,r=function(r){var o=t[r],a=e[o];a&&(e[o]=function(e){return function(){return e.apply(this,bindArguments(arguments,n+"."+o))}}(a))},o=0;o<t.length;o++)r(o)}function patchProperty(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){if(this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e){var t=function(t){var n;n=e.apply(this,arguments),void 0==n||n||t.preventDefault()};this[o]=t,this.addEventListener(r,t,!1)}else this[o]=null},n.get=function(){return this[o]||null},Object.defineProperty(e,t,n)}function patchOnProperties(e,t){var n=[];for(var r in e)"on"==r.substr(0,2)&&n.push(r);for(var o=0;o<n.length;o++)patchProperty(e,n[o]);if(t)for(var a=0;a<t.length;a++)patchProperty(e,"on"+t[a])}function findExistingRegisteredTask(e,t,n,r,o){var a=e[EVENT_TASKS];if(a)for(var i=0;i<a.length;i++){var s=a[i],c=s.data;if(c.handler===t&&c.useCapturing===r&&c.eventName===n)return o&&a.splice(i,1),s}return null}function attachRegisteredEvent(e,t){var n=e[EVENT_TASKS];n||(n=e[EVENT_TASKS]=[]),n.push(t)}function scheduleEventListener(e){var t=e.data;return attachRegisteredEvent(t.target,e),t.target[SYMBOL_ADD_EVENT_LISTENER](t.eventName,e.invoke,t.useCapturing)}function cancelEventListener(e){var t=e.data;findExistingRegisteredTask(t.target,e.invoke,t.eventName,t.useCapturing,!0),t.target[SYMBOL_REMOVE_EVENT_LISTENER](t.eventName,e.invoke,t.useCapturing)}function zoneAwareAddEventListener(e,t){var n=t[0],r=t[1],o=t[2]||!1,a=e||_global$1,i=null;"function"==typeof r?i=r:r&&r.handleEvent&&(i=function(e){return r.handleEvent(e)});var s=!1;try{s=r&&"[object FunctionWrapper]"===r.toString()}catch(c){return}if(!i||s)return a[SYMBOL_ADD_EVENT_LISTENER](n,r,o);var u=findExistingRegisteredTask(a,r,n,o,!1);if(u)return a[SYMBOL_ADD_EVENT_LISTENER](n,u.invoke,o);var l=Zone.current,p=a.constructor.name+".addEventListener:"+n,h={target:a,eventName:n,name:n,useCapturing:o,handler:r};l.scheduleEventTask(p,i,h,scheduleEventListener,cancelEventListener)}function zoneAwareRemoveEventListener(e,t){var n=t[0],r=t[1],o=t[2]||!1,a=e||_global$1,i=findExistingRegisteredTask(a,r,n,o,!0);i?i.zone.cancelTask(i):a[SYMBOL_REMOVE_EVENT_LISTENER](n,r,o)}function patchEventTargetMethods(e){return!(!e||!e.addEventListener)&&(patchMethod(e,ADD_EVENT_LISTENER,function(){return zoneAwareAddEventListener}),patchMethod(e,REMOVE_EVENT_LISTENER,function(){return zoneAwareRemoveEventListener}),!0)}function patchClass(e){var t=_global$1[e];if(t){_global$1[e]=function(){var n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}};var n,r=new t(function(){});for(n in r)"XMLHttpRequest"===e&&"responseBlob"===n||!function(t){"function"==typeof r[t]?_global$1[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:Object.defineProperty(_global$1[e].prototype,t,{set:function(n){"function"==typeof n?this[originalInstanceKey][t]=Zone.current.wrap(n,e+"."+t):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(n);for(n in t)"prototype"!==n&&t.hasOwnProperty(n)&&(_global$1[e][n]=t[n])}}function createNamedFn(e,t){try{return Function("f","return function "+e+"(){return f(this, arguments)}")(t)}catch(n){return function(){return t(this,arguments)}}}function patchMethod(e,t,n){for(var r=e;r&&!r.hasOwnProperty(t);)r=Object.getPrototypeOf(r);!r&&e[t]&&(r=e);var o,a=zoneSymbol(t);return r&&!(o=r[a])&&(o=r[a]=r[t],r[t]=createNamedFn(t,n(o,a,t))),o}function eventTargetPatch(e){var t=[],n=e.wtf;n?t=WTF_ISSUE_555.split(",").map(function(e){return"HTML"+e+"Element"}).concat(NO_EVENT_TARGET):e[EVENT_TARGET]?t.push(EVENT_TARGET):t=NO_EVENT_TARGET;for(var r=0;r<t.length;r++){var o=e[t[r]];patchEventTargetMethods(o&&o.prototype)}}function propertyPatch(){Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=rewriteDescriptor(e,n,t[n])}),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=_getOwnPropertyDescriptor(e,t);return isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){var r=n.configurable;return n=rewriteDescriptor(e,t,n),_tryDefineProperty(e,t,n,r)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return n.configurable=!0,n.configurable||(e[unconfigurablesKey]||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey][t]=!0),n}function _tryDefineProperty(e,t,n,r){try{return _defineProperty(e,t,n)}catch(o){if(!n.configurable)throw o;"undefined"==typeof r?delete n.configurable:n.configurable=r;try{return _defineProperty(e,t,n)}catch(o){var a=null;try{a=JSON.stringify(n)}catch(o){a=a.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+a+"' on object '"+e+"' and got error, giving up: "+o)}}}function registerElementPatch(e){if(isBrowser&&"registerElement"in e.document){var t=document.registerElement,n=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(e,r){return r&&r.prototype&&n.forEach(function(e){var t="Document.registerElement::"+e;if(r.prototype.hasOwnProperty(e)){var n=Object.getOwnPropertyDescriptor(r.prototype,e);n&&n.value?(n.value=Zone.current.wrap(n.value,t),_redefineProperty(r.prototype,e,n)):r.prototype[e]=Zone.current.wrap(r.prototype[e],t)}else r.prototype[e]&&(r.prototype[e]=Zone.current.wrap(r.prototype[e],t))}),t.apply(document,[e,r])}}}function apply(e){var t=e.WebSocket;e.EventTarget||patchEventTargetMethods(t.prototype),e.WebSocket=function(e,n){var r,o=arguments.length>1?new t(e,n):new t(e),a=Object.getOwnPropertyDescriptor(o,"onmessage");return a&&a.configurable===!1?(r=Object.create(o),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return o[e].apply(o,arguments)}})):r=o,patchOnProperties(r,["close","error","message","open"]),r};for(var n in t)e.WebSocket[n]=t[n]}function propertyDescriptorPatch(e){if(!isNode){var t="undefined"!=typeof WebSocket;canPatchViaPropertyDescriptor()?(isBrowser&&patchOnProperties(HTMLElement.prototype,eventNames),patchOnProperties(XMLHttpRequest.prototype,null),"undefined"!=typeof IDBIndex&&(patchOnProperties(IDBIndex.prototype,null),patchOnProperties(IDBRequest.prototype,null),patchOnProperties(IDBOpenDBRequest.prototype,null),patchOnProperties(IDBDatabase.prototype,null),patchOnProperties(IDBTransaction.prototype,null),patchOnProperties(IDBCursor.prototype,null)),t&&patchOnProperties(WebSocket.prototype,null)):(patchViaCapturingAllTheEvents(),patchClass("XMLHttpRequest"),t&&apply(e))}}function canPatchViaPropertyDescriptor(){if(isBrowser&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{get:function(){return!0}});var t=new XMLHttpRequest,n=!!t.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{}),n}function patchViaCapturingAllTheEvents(){for(var e=function(e){var t=eventNames[e],n="on"+t;document.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][unboundKey]&&(t=Zone.current.wrap(o[n],r),t[unboundKey]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<eventNames.length;t++)e(t)}function patchTimer(e,t,n,r){function o(t){var n=t.data;return n.args[0]=t.invoke,n.handleId=i.apply(e,n.args),t}function a(e){return s(e.data.handleId)}var i=null,s=null;t+=r,n+=r,i=patchMethod(e,t,function(n){return function(i,s){if("function"==typeof s[0]){var c=Zone.current,u={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?s[1]||0:null,args:s},l=c.scheduleMacroTask(t,s[0],u,o,a);if(!l)return l;var p=l.data.handleId;return p.ref&&p.unref&&(l.ref=p.ref.bind(p),l.unref=p.unref.bind(p)),l}return n.apply(e,s)}}),s=patchMethod(e,n,function(t){return function(n,r){var o=r[0];o&&"string"==typeof o.type?(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}function patchXHR(e){function t(e){var t=e[XHR_TASK];return t}function n(e){var t=e.data;t.target.addEventListener("readystatechange",function(){t.target.readyState===t.target.DONE&&(t.aborted||e.invoke())});var n=t.target[XHR_TASK];return n||(t.target[XHR_TASK]=e),i.apply(t.target,t.args),e}function r(){}function o(e){var t=e.data;return t.aborted=!0,s.apply(t.target,t.args)}var a=patchMethod(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[XHR_SYNC]=0==t[2],a.apply(e,t)}}),i=patchMethod(e.XMLHttpRequest.prototype,"send",function(){return function(e,t){var a=Zone.current;if(e[XHR_SYNC])return i.apply(e,t);var s={target:e,isPeriodic:!1,delay:null,args:t,aborted:!1};return a.scheduleMacroTask("XMLHttpRequest.send",r,s,n,o)}}),s=patchMethod(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,n){var r=t(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn)return;r.zone.cancelTask(r)}}})}var Zone$1=function(e){function t(e){return"__zone_symbol__"+e}function n(){0==S&&0==E.length&&(e[_]?e[_].resolve(0)[k](a):e[v](a,0))}function r(e){n(),E.push(e)}function o(e){var t=e&&e.rejection;t&&console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0),console.error(e)}function a(){if(!m){for(m=!0;E.length;){var e=E;E=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){o(r)}}}for(;w.length;)for(var a=function(){var e=w.shift();try{e.zone.runGuarded(function(){throw e})}catch(t){o(t)}};w.length;)a();m=!1}}function i(e){return e&&e.then}function s(e){return e}function c(e){return L.reject(e)}function u(e,t){return function(n){l(e,t,n)}}function l(e,t,r){if(e[D]===I)if(r instanceof L&&r[D]!==I)p(r),l(e,r[D],r[P]);else if(i(r))r.then(u(e,t),u(e,!1));else{e[D]=t;var o=e[P];e[P]=r;for(var a=0;a<o.length;)h(e,o[a++],o[a++],o[a++],o[a++]);if(0==o.length&&t==M){e[D]=z;try{throw new Error("Uncaught (in promise): "+r)}catch(s){var c=s;c.rejection=r,c.promise=e,c.zone=d.current,c.task=d.currentTask,w.push(c),n()}}}return e}function p(e){if(e[D]===z){e[D]=M;for(var t=0;t<w.length;t++)if(e===w[t].promise){w.splice(t,1);break}}}function h(e,t,n,r,o){p(e);var a=e[D]?r||s:o||c;t.scheduleMicroTask(O,function(){try{l(n,!0,t.run(a,null,[e[P]]))}catch(r){l(n,!1,r)}})}function f(e){var n=e.prototype,r=n[t("then")]=n.then;n.then=function(e,t){var n=this;return new L(function(e,t){r.call(n,e,t)}).then(e,t)}}if(e.Zone)throw new Error("Zone already loaded.");var d=function(){function n(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new g(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==L)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(n,"current",{get:function(){return T},enumerable:!0,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return b},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=T;T=this;try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{T=o}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=T;T=this;try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{T=o}},n.prototype.runTask=function(e,t,n){if(e.runCount++,e.zone!=this)throw new Error("A task can only be run in the zone which created it! (Creation: "+e.zone.name+"; Execution: "+this.name+")");var r=b;b=e;var o=T;T=this;try{"macroTask"==e.type&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{T=o,b=r}},n.prototype.scheduleMicroTask=function(e,t,n,r){return this._zoneDelegate.scheduleTask(this,new y("microTask",this,e,t,n,r,null))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new y("macroTask",this,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new y("eventTask",this,e,t,n,r,o))},n.prototype.cancelTask=function(e){var t=this._zoneDelegate.cancelTask(this,e);return e.runCount=-1,e.cancelFn=null,t},n.__symbol__=t,n}(),g=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._hasTaskZS=n&&(n.onHasTask?n:t._hasTaskZS),this._hasTaskDlgt=n&&(n.onHasTask?t:t._hasTaskDlgt)}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new d(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this.zone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this.zone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this.zone,e,t)},e.prototype.scheduleTask=function(e,t){try{if(this._scheduleTaskZS)return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this.zone,e,t);if(t.scheduleFn)t.scheduleFn(t);else{if("microTask"!=t.type)throw new Error("Task is missing scheduleFn.");r(t)}return t}finally{e==this.zone&&this._updateTaskCount(t.type,1)}},e.prototype.invokeTask=function(e,t,n,r){try{return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this.zone,e,t,n,r):t.callback.apply(n,r)}finally{e!=this.zone||"eventTask"==t.type||t.data&&t.data.isPeriodic||this._updateTaskCount(t.type,-1)}},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this.zone,e,t);else{if(!t.cancelFn)throw new Error("Task does not support cancellation, or is already canceled.");n=t.cancelFn(t)}return e==this.zone&&this._updateTaskCount(t.type,-1),n},e.prototype.hasTask=function(e,t){return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this.zone,e,t)},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};try{this.hasTask(this.zone,a)}finally{this._parentDelegate&&this._parentDelegate._updateTaskCount(e,t)}}},e}(),y=function(){function e(e,t,n,r,o,i,s){this.runCount=0,this.type=e,this.zone=t,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=s,this.callback=r;var c=this;this.invoke=function(){S++;try{return t.runTask(c,this,arguments)}finally{1==S&&a(),S--}}}return e.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:this.toString()},e}(),v=t("setTimeout"),_=t("Promise"),k=t("then"),T=new d(null,null),b=null,E=[],m=!1,w=[],S=0,D=t("state"),P=t("value"),O="Promise.then",I=null,R=!0,M=!1,z=0,L=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[D]=I,n[P]=[];try{t&&t(u(n,R),u(n,M))}catch(r){l(n,!1,r)}}return e.resolve=function(e){return l(new this(null),R,e)},e.reject=function(e){return l(new this(null),M,e)},e.race=function(e){function t(e){a&&(a=r(e))}function n(e){a&&(a=o(e))}for(var r,o,a=new this(function(e,t){r=e,o=t}),s=0,c=e;s<c.length;s++){var u=c[s];i(u)||(u=this.resolve(u)),u.then(t,n)}return a},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),o=0,a=[],s=0,c=e;s<c.length;s++){var u=c[s];i(u)||(u=this.resolve(u)),u.then(function(e){return function(n){a[e]=n,o--,o||t(a)}}(o),n),o++}return o||t(a),r},e.prototype.then=function(e,t){var n=new this.constructor(null),r=d.current;return this[D]==I?this[P].push(r,n,e,t):h(this,r,n,e,t),n},e.prototype["catch"]=function(e){return this.then(null,e)},e}(),N=e[t("Promise")]=e.Promise;if(e.Promise=L,N&&(f(N),"undefined"!=typeof e.fetch)){var Z=e.fetch();Z.then(function(){return null},function(){return null}),Z.constructor!=N&&f(Z.constructor)}return Promise[d.__symbol__("uncaughtPromiseErrors")]=w,e.Zone=d}("undefined"==typeof window?global:window),zoneSymbol=Zone.__symbol__,_global$1="undefined"==typeof window?global:window,isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),isBrowser=!isNode&&!isWebWorker&&!("undefined"==typeof window||!window.HTMLElement),EVENT_TASKS=zoneSymbol("eventTasks"),ADD_EVENT_LISTENER="addEventListener",REMOVE_EVENT_LISTENER="removeEventListener",SYMBOL_ADD_EVENT_LISTENER=zoneSymbol(ADD_EVENT_LISTENER),SYMBOL_REMOVE_EVENT_LISTENER=zoneSymbol(REMOVE_EVENT_LISTENER),originalInstanceKey=zoneSymbol("originalInstance"),WTF_ISSUE_555="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",NO_EVENT_TARGET="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex".split(","),EVENT_TARGET="EventTarget",_defineProperty=Object[zoneSymbol("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol("unconfigurables"),eventNames="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),unboundKey=zoneSymbol("unbound"),set="set",clear="clear",blockingMethods=["alert","prompt","confirm"],_global="undefined"==typeof window?global:window;patchTimer(_global,set,clear,"Timeout"),patchTimer(_global,set,clear,"Interval"),patchTimer(_global,set,clear,"Immediate"),patchTimer(_global,"request","cancel","AnimationFrame"),patchTimer(_global,"mozRequest","mozCancel","AnimationFrame"),patchTimer(_global,"webkitRequest","webkitCancel","AnimationFrame");for(var i=0;i<blockingMethods.length;i++){var name=blockingMethods[i];patchMethod(_global,name,function(e,t,n){return function(t,r){return Zone.current.run(e,_global,r,n)}})}eventTargetPatch(_global),propertyDescriptorPatch(_global),patchClass("MutationObserver"),patchClass("WebKitMutationObserver"),patchClass("FileReader"),propertyPatch(),registerElementPatch(_global),patchXHR(_global);var XHR_TASK=zoneSymbol("xhrTask"),XHR_SYNC=zoneSymbol("xhrSync");_global.navigator&&_global.navigator.geolocation&&patchPrototype(_global.navigator.geolocation,["getCurrentPosition","watchPosition"]);
function bindArguments(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function patchPrototype(e,t){for(var n=e.constructor.name,r=function(r){var o=t[r],a=e[o];a&&(e[o]=function(e){return function(){return e.apply(this,bindArguments(arguments,n+"."+o))}}(a))},o=0;o<t.length;o++)r(o)}function patchProperty(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){if(this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e){var t=function(t){var n;n=e.apply(this,arguments),void 0==n||n||t.preventDefault()};this[o]=t,this.addEventListener(r,t,!1)}else this[o]=null},n.get=function(){return this[o]||null},Object.defineProperty(e,t,n)}function patchOnProperties(e,t){var n=[];for(var r in e)"on"==r.substr(0,2)&&n.push(r);for(var o=0;o<n.length;o++)patchProperty(e,n[o]);if(t)for(var a=0;a<t.length;a++)patchProperty(e,"on"+t[a])}function findExistingRegisteredTask(e,t,n,r,o){var a=e[EVENT_TASKS];if(a)for(var i=0;i<a.length;i++){var s=a[i],c=s.data;if(c.handler===t&&c.useCapturing===r&&c.eventName===n)return o&&a.splice(i,1),s}return null}function attachRegisteredEvent(e,t){var n=e[EVENT_TASKS];n||(n=e[EVENT_TASKS]=[]),n.push(t)}function scheduleEventListener(e){var t=e.data;return attachRegisteredEvent(t.target,e),t.target[SYMBOL_ADD_EVENT_LISTENER](t.eventName,e.invoke,t.useCapturing)}function cancelEventListener(e){var t=e.data;findExistingRegisteredTask(t.target,e.invoke,t.eventName,t.useCapturing,!0),t.target[SYMBOL_REMOVE_EVENT_LISTENER](t.eventName,e.invoke,t.useCapturing)}function zoneAwareAddEventListener(e,t){var n=t[0],r=t[1],o=t[2]||!1,a=e||_global$1,i=null;"function"==typeof r?i=r:r&&r.handleEvent&&(i=function(e){return r.handleEvent(e)});var s=!1;try{s=r&&"[object FunctionWrapper]"===r.toString()}catch(c){return}if(!i||s)return a[SYMBOL_ADD_EVENT_LISTENER](n,r,o);var u=findExistingRegisteredTask(a,r,n,o,!1);if(u)return a[SYMBOL_ADD_EVENT_LISTENER](n,u.invoke,o);var l=Zone.current,p=a.constructor.name+".addEventListener:"+n,h={target:a,eventName:n,name:n,useCapturing:o,handler:r};l.scheduleEventTask(p,i,h,scheduleEventListener,cancelEventListener)}function zoneAwareRemoveEventListener(e,t){var n=t[0],r=t[1],o=t[2]||!1,a=e||_global$1,i=findExistingRegisteredTask(a,r,n,o,!0);i?i.zone.cancelTask(i):a[SYMBOL_REMOVE_EVENT_LISTENER](n,r,o)}function patchEventTargetMethods(e){return!(!e||!e.addEventListener)&&(patchMethod(e,ADD_EVENT_LISTENER,function(){return zoneAwareAddEventListener}),patchMethod(e,REMOVE_EVENT_LISTENER,function(){return zoneAwareRemoveEventListener}),!0)}function patchClass(e){var t=_global$1[e];if(t){_global$1[e]=function(){var n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}};var n,r=new t(function(){});for(n in r)"XMLHttpRequest"===e&&"responseBlob"===n||!function(t){"function"==typeof r[t]?_global$1[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:Object.defineProperty(_global$1[e].prototype,t,{set:function(n){"function"==typeof n?this[originalInstanceKey][t]=Zone.current.wrap(n,e+"."+t):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(n);for(n in t)"prototype"!==n&&t.hasOwnProperty(n)&&(_global$1[e][n]=t[n])}}function createNamedFn(e,t){try{return Function("f","return function "+e+"(){return f(this, arguments)}")(t)}catch(n){return function(){return t(this,arguments)}}}function patchMethod(e,t,n){for(var r=e;r&&!r.hasOwnProperty(t);)r=Object.getPrototypeOf(r);!r&&e[t]&&(r=e);var o,a=zoneSymbol(t);return r&&!(o=r[a])&&(o=r[a]=r[t],r[t]=createNamedFn(t,n(o,a,t))),o}function eventTargetPatch(e){var t=[],n=e.wtf;n?t=WTF_ISSUE_555.split(",").map(function(e){return"HTML"+e+"Element"}).concat(NO_EVENT_TARGET):e[EVENT_TARGET]?t.push(EVENT_TARGET):t=NO_EVENT_TARGET;for(var r=0;r<t.length;r++){var o=e[t[r]];patchEventTargetMethods(o&&o.prototype)}}function propertyPatch(){Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=rewriteDescriptor(e,n,t[n])}),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=_getOwnPropertyDescriptor(e,t);return isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){var r=n.configurable;return n=rewriteDescriptor(e,t,n),_tryDefineProperty(e,t,n,r)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return n.configurable=!0,n.configurable||(e[unconfigurablesKey]||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey][t]=!0),n}function _tryDefineProperty(e,t,n,r){try{return _defineProperty(e,t,n)}catch(o){if(!n.configurable)throw o;"undefined"==typeof r?delete n.configurable:n.configurable=r;try{return _defineProperty(e,t,n)}catch(o){var a=null;try{a=JSON.stringify(n)}catch(o){a=a.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+a+"' on object '"+e+"' and got error, giving up: "+o)}}}function registerElementPatch(e){if(isBrowser&&"registerElement"in e.document){var t=document.registerElement,n=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(e,r){return r&&r.prototype&&n.forEach(function(e){var t="Document.registerElement::"+e;if(r.prototype.hasOwnProperty(e)){var n=Object.getOwnPropertyDescriptor(r.prototype,e);n&&n.value?(n.value=Zone.current.wrap(n.value,t),_redefineProperty(r.prototype,e,n)):r.prototype[e]=Zone.current.wrap(r.prototype[e],t)}else r.prototype[e]&&(r.prototype[e]=Zone.current.wrap(r.prototype[e],t))}),t.apply(document,[e,r])}}}function apply(e){var t=e.WebSocket;e.EventTarget||patchEventTargetMethods(t.prototype),e.WebSocket=function(e,n){var r,o=arguments.length>1?new t(e,n):new t(e),a=Object.getOwnPropertyDescriptor(o,"onmessage");return a&&a.configurable===!1?(r=Object.create(o),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return o[e].apply(o,arguments)}})):r=o,patchOnProperties(r,["close","error","message","open"]),r};for(var n in t)e.WebSocket[n]=t[n]}function propertyDescriptorPatch(e){if(!isNode){var t="undefined"!=typeof WebSocket;canPatchViaPropertyDescriptor()?(isBrowser&&patchOnProperties(HTMLElement.prototype,eventNames),patchOnProperties(XMLHttpRequest.prototype,null),"undefined"!=typeof IDBIndex&&(patchOnProperties(IDBIndex.prototype,null),patchOnProperties(IDBRequest.prototype,null),patchOnProperties(IDBOpenDBRequest.prototype,null),patchOnProperties(IDBDatabase.prototype,null),patchOnProperties(IDBTransaction.prototype,null),patchOnProperties(IDBCursor.prototype,null)),t&&patchOnProperties(WebSocket.prototype,null)):(patchViaCapturingAllTheEvents(),patchClass("XMLHttpRequest"),t&&apply(e))}}function canPatchViaPropertyDescriptor(){if(isBrowser&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{get:function(){return!0}});var t=new XMLHttpRequest,n=!!t.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{}),n}function patchViaCapturingAllTheEvents(){for(var e=function(e){var t=eventNames[e],n="on"+t;document.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][unboundKey]&&(t=Zone.current.wrap(o[n],r),t[unboundKey]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<eventNames.length;t++)e(t)}function patchTimer(e,t,n,r){function o(t){var n=t.data;return n.args[0]=t.invoke,n.handleId=i.apply(e,n.args),t}function a(e){return s(e.data.handleId)}var i=null,s=null;t+=r,n+=r,i=patchMethod(e,t,function(n){return function(i,s){if("function"==typeof s[0]){var c=Zone.current,u={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?s[1]||0:null,args:s},l=c.scheduleMacroTask(t,s[0],u,o,a);if(!l)return l;var p=l.data.handleId;return p.ref&&p.unref&&(l.ref=p.ref.bind(p),l.unref=p.unref.bind(p)),l}return n.apply(e,s)}}),s=patchMethod(e,n,function(t){return function(n,r){var o=r[0];o&&"string"==typeof o.type?(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}function patchXHR(e){function t(e){var t=e[XHR_TASK];return t}function n(e){var t=e.data;t.target.addEventListener("readystatechange",function(){t.target.readyState===t.target.DONE&&(t.aborted||e.invoke())});var n=t.target[XHR_TASK];return n||(t.target[XHR_TASK]=e),i.apply(t.target,t.args),e}function r(){}function o(e){var t=e.data;return t.aborted=!0,s.apply(t.target,t.args)}var a=patchMethod(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[XHR_SYNC]=0==t[2],a.apply(e,t)}}),i=patchMethod(e.XMLHttpRequest.prototype,"send",function(){return function(e,t){var a=Zone.current;if(e[XHR_SYNC])return i.apply(e,t);var s={target:e,isPeriodic:!1,delay:null,args:t,aborted:!1};return a.scheduleMacroTask("XMLHttpRequest.send",r,s,n,o)}}),s=patchMethod(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,n){var r=t(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn)return;r.zone.cancelTask(r)}}})}var Zone$1=function(e){function t(e){return"__zone_symbol__"+e}function n(){0==S&&0==E.length&&(e[_]?e[_].resolve(0)[k](a):e[v](a,0))}function r(e){n(),E.push(e)}function o(e){var t=e&&e.rejection;t&&console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0),console.error(e)}function a(){if(!m){for(m=!0;E.length;){var e=E;E=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){o(r)}}}for(;w.length;)for(var a=function(){var e=w.shift();try{e.zone.runGuarded(function(){throw e})}catch(t){o(t)}};w.length;)a();m=!1}}function i(e){return e&&e.then}function s(e){return e}function c(e){return L.reject(e)}function u(e,t){return function(n){l(e,t,n)}}function l(e,t,r){if(e[D]===I)if(r instanceof L&&r[D]!==I)p(r),l(e,r[D],r[P]);else if(i(r))r.then(u(e,t),u(e,!1));else{e[D]=t;var o=e[P];e[P]=r;for(var a=0;a<o.length;)h(e,o[a++],o[a++],o[a++],o[a++]);if(0==o.length&&t==M){e[D]=z;try{throw new Error("Uncaught (in promise): "+r)}catch(s){var c=s;c.rejection=r,c.promise=e,c.zone=d.current,c.task=d.currentTask,w.push(c),n()}}}return e}function p(e){if(e[D]===z){e[D]=M;for(var t=0;t<w.length;t++)if(e===w[t].promise){w.splice(t,1);break}}}function h(e,t,n,r,o){p(e);var a=e[D]?r||s:o||c;t.scheduleMicroTask(O,function(){try{l(n,!0,t.run(a,null,[e[P]]))}catch(r){l(n,!1,r)}})}function f(e){var n=e.prototype,r=n[t("then")]=n.then;n.then=function(e,t){var n=this;return new L(function(e,t){r.call(n,e,t)}).then(e,t)}}if(e.Zone)throw new Error("Zone already loaded.");var d=function(){function n(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new g(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==L)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(n,"current",{get:function(){return T},enumerable:!0,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return b},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},n.prototype.run=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=T;T=this;try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{T=o}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=T;T=this;try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{T=o}},n.prototype.runTask=function(e,t,n){if(e.runCount++,e.zone!=this)throw new Error("A task can only be run in the zone which created it! (Creation: "+e.zone.name+"; Execution: "+this.name+")");var r=b;b=e;var o=T;T=this;try{"macroTask"==e.type&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{T=o,b=r}},n.prototype.scheduleMicroTask=function(e,t,n,r){return this._zoneDelegate.scheduleTask(this,new y("microTask",this,e,t,n,r,null))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new y("macroTask",this,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new y("eventTask",this,e,t,n,r,o))},n.prototype.cancelTask=function(e){var t=this._zoneDelegate.cancelTask(this,e);return e.runCount=-1,e.cancelFn=null,t},n.__symbol__=t,n}(),g=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._hasTaskZS=n&&(n.onHasTask?n:t._hasTaskZS),this._hasTaskDlgt=n&&(n.onHasTask?t:t._hasTaskDlgt)}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new d(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this.zone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this.zone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this.zone,e,t)},e.prototype.scheduleTask=function(e,t){try{if(this._scheduleTaskZS)return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this.zone,e,t);if(t.scheduleFn)t.scheduleFn(t);else{if("microTask"!=t.type)throw new Error("Task is missing scheduleFn.");r(t)}return t}finally{e==this.zone&&this._updateTaskCount(t.type,1)}},e.prototype.invokeTask=function(e,t,n,r){try{return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this.zone,e,t,n,r):t.callback.apply(n,r)}finally{e!=this.zone||"eventTask"==t.type||t.data&&t.data.isPeriodic||this._updateTaskCount(t.type,-1)}},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this.zone,e,t);else{if(!t.cancelFn)throw new Error("Task does not support cancellation, or is already canceled.");n=t.cancelFn(t)}return e==this.zone&&this._updateTaskCount(t.type,-1),n},e.prototype.hasTask=function(e,t){return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this.zone,e,t)},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};try{this.hasTask(this.zone,a)}finally{this._parentDelegate&&this._parentDelegate._updateTaskCount(e,t)}}},e}(),y=function(){function e(e,t,n,r,o,i,s){this.runCount=0,this.type=e,this.zone=t,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=s,this.callback=r;var c=this;this.invoke=function(){S++;try{return t.runTask(c,this,arguments)}finally{1==S&&a(),S--}}}return e.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:this.toString()},e}(),v=t("setTimeout"),_=t("Promise"),k=t("then"),T=new d(null,null),b=null,E=[],m=!1,w=[],S=0,D=t("state"),P=t("value"),O="Promise.then",I=null,R=!0,M=!1,z=0,L=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[D]=I,n[P]=[];try{t&&t(u(n,R),u(n,M))}catch(r){l(n,!1,r)}}return e.resolve=function(e){return l(new this(null),R,e)},e.reject=function(e){return l(new this(null),M,e)},e.race=function(e){function t(e){a&&(a=r(e))}function n(e){a&&(a=o(e))}for(var r,o,a=new this(function(e,t){r=e,o=t}),s=0,c=e;s<c.length;s++){var u=c[s];i(u)||(u=this.resolve(u)),u.then(t,n)}return a},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),o=0,a=[],s=0,c=e;s<c.length;s++){var u=c[s];i(u)||(u=this.resolve(u)),u.then(function(e){return function(n){a[e]=n,o--,o||t(a)}}(o),n),o++}return o||t(a),r},e.prototype.then=function(e,t){var n=new this.constructor(null),r=d.current;return this[D]==I?this[P].push(r,n,e,t):h(this,r,n,e,t),n},e.prototype["catch"]=function(e){return this.then(null,e)},e}();L.resolve=L.resolve,L.reject=L.reject,L.race=L.race,L.all=L.all;var N=e[t("Promise")]=e.Promise;if(e.Promise=L,N&&(f(N),"undefined"!=typeof e.fetch)){var Z=e.fetch();Z.then(function(){return null},function(){return null}),Z.constructor!=N&&f(Z.constructor)}return Promise[d.__symbol__("uncaughtPromiseErrors")]=w,e.Zone=d}("undefined"==typeof window?global:window),zoneSymbol=Zone.__symbol__,_global$1="undefined"==typeof window?global:window,isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),isBrowser=!isNode&&!isWebWorker&&!("undefined"==typeof window||!window.HTMLElement),EVENT_TASKS=zoneSymbol("eventTasks"),ADD_EVENT_LISTENER="addEventListener",REMOVE_EVENT_LISTENER="removeEventListener",SYMBOL_ADD_EVENT_LISTENER=zoneSymbol(ADD_EVENT_LISTENER),SYMBOL_REMOVE_EVENT_LISTENER=zoneSymbol(REMOVE_EVENT_LISTENER),originalInstanceKey=zoneSymbol("originalInstance"),WTF_ISSUE_555="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",NO_EVENT_TARGET="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex".split(","),EVENT_TARGET="EventTarget",_defineProperty=Object[zoneSymbol("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol("unconfigurables"),eventNames="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),unboundKey=zoneSymbol("unbound"),set="set",clear="clear",blockingMethods=["alert","prompt","confirm"],_global="undefined"==typeof window?global:window;patchTimer(_global,set,clear,"Timeout"),patchTimer(_global,set,clear,"Interval"),patchTimer(_global,set,clear,"Immediate"),patchTimer(_global,"request","cancel","AnimationFrame"),patchTimer(_global,"mozRequest","mozCancel","AnimationFrame"),patchTimer(_global,"webkitRequest","webkitCancel","AnimationFrame");for(var i=0;i<blockingMethods.length;i++){var name=blockingMethods[i];patchMethod(_global,name,function(e,t,n){return function(t,r){return Zone.current.run(e,_global,r,n)}})}eventTargetPatch(_global),propertyDescriptorPatch(_global),patchClass("MutationObserver"),patchClass("WebKitMutationObserver"),patchClass("FileReader"),propertyPatch(),registerElementPatch(_global),patchXHR(_global);var XHR_TASK=zoneSymbol("xhrTask"),XHR_SYNC=zoneSymbol("xhrSync");_global.navigator&&_global.navigator.geolocation&&patchPrototype(_global.navigator.geolocation,["getCurrentPosition","watchPosition"]);

@@ -919,3 +919,3 @@ /**

'; Task:', e.task && (<Task>e.task).source,
'; Value:', rejection,
'; Value:', rejection,
rejection instanceof Error ? rejection.stack : undefined

@@ -1125,2 +1125,8 @@ );

}
// Protect against aggressive optimizers dropping seemingly unused properties.
// E.g. Closure Compiler in advanced mode.
ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
ZoneAwarePromise['race'] = ZoneAwarePromise.race;
ZoneAwarePromise['all'] = ZoneAwarePromise.all;

@@ -1127,0 +1133,0 @@ const NativePromise = global[__symbol__('Promise')] = global.Promise;

{
"name": "zone.js",
"version": "0.6.18",
"version": "0.6.19",
"description": "Zones for JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/zone-node.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc