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

elastic-apm-js-zone

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-apm-js-zone - npm Package Compare versions

Comparing version 0.8.18-prm to 0.8.18-tskdt

4

dist/zone.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(this,function(){"use strict";function e(e,t){for(var n=e.length-1;n>=0;n--)typeof e[n]===C&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function t(t,r){for(var o=t.constructor.name,a=function(a){var i=r[a],s=t[i];if(s){var u=Object.getOwnPropertyDescriptor(t,i);if(!n(u))return"continue";t[i]=function(t){var n=function(){return t.apply(this,e(arguments,o+"."+i))};return c(n,t),n}(s)}},i=0;i<r.length;i++)a(i)}function n(e){return!e||e.writable!==!1&&(typeof e.get!==C||typeof e.set!==L)}function r(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r&&n){var o=Object.getOwnPropertyDescriptor(n,t);o&&(r={enumerable:!0,configurable:!0})}if(r&&r.configurable){delete r.writable,delete r.value;var a=r.get,i=t.substr(2),s=F[i];s||(s=F[i]=z("ON_PROPERTY"+i)),r.set=function(t){var n=this;if(n||e!==j||(n=j),n){var r=n[s];r&&n.removeEventListener(i,q),"function"==typeof t?(n[s]=t,n.addEventListener(i,q,!1)):n[s]=null}},r.get=function(){var n=this;if(n||e!==j||(n=j),!n)return null;var o=n[s];if(o)return o;if(a){var i=a&&a.apply(this);if(i)return r.set.apply(this,[i]),typeof n[M]===C&&n.removeAttribute(t),i}return null},Object.defineProperty(e,t,r)}}function o(e,t,n){if(t)for(var o=0;o<t.length;o++)r(e,"on"+t[o],n);else{var a=[];for(var i in e)"on"==i.substr(0,2)&&a.push(i);for(var s=0;s<a.length;s++)r(e,a[s],n)}}function a(t){var n=j[t];if(n){j[z(t)]=n,j[t]=function(){var r=e(arguments,t);switch(r.length){case 0:this[N]=new n;break;case 1:this[N]=new n(r[0]);break;case 2:this[N]=new n(r[0],r[1]);break;case 3:this[N]=new n(r[0],r[1],r[2]);break;case 4:this[N]=new n(r[0],r[1],r[2],r[3]);break;default:throw new Error("Arg list too long.")}},c(j[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||!function(e){"function"==typeof o[e]?j[t].prototype[e]=function(){return this[N][e].apply(this[N],arguments)}:Object.defineProperty(j[t].prototype,e,{set:function(n){"function"==typeof n?(this[N][e]=Zone.current.wrap(n,t+"."+e),c(this[N][e],n)):this[N][e]=n},get:function(){return this[N][e]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(j[t][r]=n[r])}}function i(e,t,r){for(var o=e;o&&!o.hasOwnProperty(t);)o=Object.getPrototypeOf(o);!o&&e[t]&&(o=e);var a,i=z(t);if(o&&!(a=o[i])){a=o[i]=o[t];var s=o&&Object.getOwnPropertyDescriptor(o,t);if(n(s)){var u=r(a,i,t);o[t]=function(){return u(this,arguments)},c(o[t],a)}}return a}function s(e,t,n){function r(e){var t=e.data;return t.args[t.callbackIndex]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}var o=null;o=i(e,t,function(e){return function(t,o){var a=n(t,o);if(a.callbackIndex>=0&&"function"==typeof o[a.callbackIndex]){var i=Zone.current.scheduleMacroTask(a.name,o[a.callbackIndex],a,r,null);return i}return e.apply(t,o)}})}function c(e,t){e[z("OriginalDelegate")]=t}function u(){if(A)return B;A=!0;try{var e=window.navigator.userAgent;e.indexOf("MSIE ");return e.indexOf("MSIE ")===-1&&e.indexOf("Trident/")===-1&&e.indexOf("Edge/")===-1||(B=!0),B}catch(t){}}function l(e,t,n){function r(t,n){if(!t)return!1;var r=!0;n&&void 0!==n.useGlobalCallback&&(r=n.useGlobalCallback);var d=n&&n.validateHandler,y=!0;n&&void 0!==n.checkDuplicate&&(y=n.checkDuplicate);var k=!1;n&&void 0!==n.returnTarget&&(k=n.returnTarget);for(var m=t;m&&!m.hasOwnProperty(o);)m=Object.getPrototypeOf(m);if(!m&&t[o]&&(m=t),!m)return!1;if(m[u])return!1;var _,b={},T=m[u]=m[o],w=m[z(a)]=m[a],E=m[z(i)]=m[i],D=m[z(s)]=m[s];n&&n.prependEventListenerFnName&&(_=m[z(n.prependEventListenerFnName)]=m[n.prependEventListenerFnName]);var O=function(e){if(!b.isExisting)return T.apply(b.target,[b.eventName,b.capture?g:v,b.options])},Z=function(e){if(!e.isRemoved){var t=G[e.eventName],n=void 0;t&&(n=t[e.capture?X:W]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++){var a=r[o];if(a===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}}if(e.allRemoved)return w.apply(e.target,[e.eventName,e.capture?g:v,e.options])},S=function(e){return T.apply(b.target,[b.eventName,e.invoke,b.options])},P=function(e){return _.apply(b.target,[b.eventName,e.invoke,b.options])},j=function(e){return w.apply(e.target,[e.eventName,e.invoke,e.options])},C=r?O:S,L=r?Z:j,M=function(e,t){var n=typeof t;return n===Y&&e.callback===t||n===J&&e.originalDelegate===t},I=n&&n.compareTaskCallbackVsDelegate?n.compareTaskCallbackVsDelegate:M,R=function(t,n,o,a,i,s){return void 0===i&&(i=!1),void 0===s&&(s=!1),function(){var c=this||e,u=arguments[1];if(!u)return t.apply(this,arguments);var l=!1;if(typeof u!==Y){if(!u.handleEvent)return t.apply(this,arguments);l=!0}if(!d||d(t,u,c,arguments)){var p,f=arguments[0],h=arguments[2],v=!1;void 0===h?p=!1:h===!0?p=!0:h===!1?p=!1:(p=!!h&&!!h.capture,v=!!h&&!!h.once);var g,k=Zone.current,m=G[f];if(m)g=m[p?X:W];else{var _=f+W,T=f+X,w=Q+_,E=Q+T;G[f]={},G[f][W]=w,G[f][X]=E,g=p?E:w}var D=c[g],O=!1;if(D){if(O=!0,y)for(var Z=0;Z<D.length;Z++)if(I(D[Z],u))return}else D=c[g]=[];var S,P=c.constructor[K],z=V[P];z&&(S=z[f]),S||(S=P+n+f),b.options=h,v&&(b.options.once=!1),b.target=c,b.capture=p,b.eventName=f,b.isExisting=O;var j=r?U:null,C=k.scheduleEventTask(S,u,j,o,a);return v&&(h.once=!0),C.options=h,C.target=c,C.capture=p,C.eventName=f,l&&(C.originalDelegate=u),s?D.unshift(C):D.push(C),i?c:void 0}}};return m[o]=R(T,l,C,L,k),_&&(m[f]=R(_,h,P,L,k,!0)),m[a]=function(){var t,n=this||e,r=arguments[0],o=arguments[2];t=void 0!==o&&(o===!0||o!==!1&&(!!o&&!!o.capture));var a=arguments[1];if(!a)return w.apply(this,arguments);if(!d||d(w,a,n,arguments)){var i,s=G[r];s&&(i=s[t?X:W]);var c=i&&n[i];if(c)for(var u=0;u<c.length;u++){var l=c[u];if(I(l,a))return c.splice(u,1),l.isRemoved=!0,0===c.length&&(l.allRemoved=!0,n[i]=null),void l.zone.cancelTask(l)}}},m[i]=function(){for(var t=this||e,n=arguments[0],r=[],o=p(t,n),a=0;a<o.length;a++){var i=o[a],s=i.originalDelegate?i.originalDelegate:i.callback;r.push(s)}return r},m[s]=function(){var t=this||e,n=arguments[0];if(n){var r=G[n];if(r){var o=r[W],i=r[X],c=t[o],u=t[i];if(c)for(var l=c.slice(),p=0;p<l.length;p++){var f=l[p],h=f.originalDelegate?f.originalDelegate:f.callback;this[a].apply(this,[n,h,f.options])}if(u)for(var l=u.slice(),p=0;p<l.length;p++){var f=l[p],h=f.originalDelegate?f.originalDelegate:f.callback;this[a].apply(this,[n,h,f.options])}}}else{for(var d=Object.keys(t),p=0;p<d.length;p++){var v=d[p],g=$.exec(v),y=g&&g[1];y&&"removeListener"!==y&&this[s].apply(this,[y])}this[s].apply(this,["removeListener"])}},c(m[o],T),c(m[a],w),D&&c(m[s],D),E&&c(m[i],E),!0}for(var o=n&&n.addEventListenerFnName||"addEventListener",a=n&&n.removeEventListenerFnName||"removeEventListener",i=n&&n.listenersFnName||"eventListeners",s=n&&n.removeAllFnName||"removeAllListeners",u=z(o),l="."+o+":",f="prependListener",h="."+f+":",d=function(e,t,n){if(!e.isRemoved){var r=e.callback;typeof r===J&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;if(o&&"object"==typeof o&&o.once){var i=e.originalDelegate?e.originalDelegate:e.callback;t[a].apply(t,[n.type,i,o])}}},v=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[G[t.type][W]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||t[ee]!==!0);a++)d(o[a],n,t)}},g=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[G[t.type][X]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||t[ee]!==!0);a++)d(o[a],n,t)}},y=[],k=0;k<t.length;k++)y[k]=r(t[k],n);return y}function p(e,t){var n=[];for(var r in e){var o=$.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var s=0;s<i.length;s++)n.push(i[s])}}return n}function f(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(e,t){e[ee]=!0}})}function h(e,t,n,r){function o(t){function n(){try{t.invoke.apply(this,arguments)}finally{typeof r.handleId===l?delete u[r.handleId]:r.handleId&&(r.handleId[te]=null)}}var r=t.data;return r.args[0]=n,r.handleId=s.apply(e,r.args),t}function a(e){return c(e.data.handleId)}var s=null,c=null;t+=r,n+=r;var u={},l="number",p="string",f="function",h="Interval",d="Timeout",v="notScheduled";s=i(e,t,function(n){return function(i,s){if(typeof s[0]===f){var c=Zone.current,p={handleId:null,isPeriodic:r===h,delay:r===d||r===h?s[1]||0:null,args:s},v=c.scheduleMacroTask(t,s[0],p,o,a);if(!v)return v;var g=v.data.handleId;return typeof g===l?u[g]=v:g&&(g[te]=v),g&&g.ref&&g.unref&&typeof g.ref===f&&typeof g.unref===f&&(v.ref=g.ref.bind(g),v.unref=g.unref.bind(g)),typeof g===l||g?g:v}return n.apply(e,s)}}),c=i(e,n,function(t){return function(n,r){var o,a=r[0];typeof a===l?o=u[a]:(o=a&&a[te],o||(o=a)),o&&typeof o.type===p?o.state!==v&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&(typeof a===l?delete u[a]:a&&(a[te]=null),o.zone.cancelTask(o)):t.apply(e,r)}})}function d(){Object.defineProperty=function(e,t,n){if(g(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return t!==ie&&(n=y(e,t,n)),k(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 typeof t!==se||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=y(e,n,t[n])}),oe(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=re(e,t);return g(e,t)&&(n.configurable=!1),n}}function v(e,t,n){var r=n.configurable;return n=y(e,t,n),k(e,t,n,r)}function g(e,t){return e&&e[ae]&&e[ae][t]}function y(e,t,n){return n.configurable=!0,n.configurable||(e[ae]||ne(e,ae,{writable:!0,value:{}}),e[ae][t]=!0),n}function k(e,t,n,r){try{return ne(e,t,n)}catch(o){if(!n.configurable)throw o;typeof r==ce?delete n.configurable:n.configurable=r;try{return ne(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 m(e,t){var n=t.WebSocket;t.EventTarget||l(t,[n.prototype]),t.WebSocket=function(e,t){var r,a,i=arguments.length>1?new n(e,t):new n(e),s=Object.getOwnPropertyDescriptor(i,"onmessage");return s&&s.configurable===!1?(r=Object.create(i),a=i,["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){var t=Array.prototype.slice.call(arguments);if("addEventListener"===e||"removeEventListener"===e){var n=t.length>0?t[0]:void 0;if(n){var o=Zone.__symbol__("ON_PROPERTY"+n);i[o]=r[o]}}return i[e].apply(i,t)}})):r=i,o(r,["close","error","message","open"],a),r};var r=t.WebSocket;for(var a in n)r[a]=n[a]}function _(e,t,n){if(!n)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter(function(e){return o.indexOf(e)===-1})}function b(e,t,n,r){var a=_(e,t,n);o(e,a,r)}function T(e,t){if(!R||x){var n="undefined"!=typeof WebSocket;if(w()){var r=t.__Zone_ignore_on_properties;if(H){b(window,De.concat(["messageerror"]),r,Object.getPrototypeOf(window)),b(Document.prototype,De,r),"undefined"!=typeof window.SVGElement&&b(window.SVGElement.prototype,De,r),b(Element.prototype,De,r),b(HTMLElement.prototype,De,r),b(HTMLMediaElement.prototype,he,r),b(HTMLFrameSetElement.prototype,pe.concat(me),r),b(HTMLBodyElement.prototype,pe.concat(me),r),b(HTMLFrameElement.prototype,ke,r),b(HTMLIFrameElement.prototype,ke,r);var o=window.HTMLMarqueeElement;o&&b(o.prototype,_e,r);var i=window.Worker;i&&b(i.prototype,Ee,r)}b(XMLHttpRequest.prototype,be,r);var s=t.XMLHttpRequestEventTarget;s&&b(s&&s.prototype,be,r),"undefined"!=typeof IDBIndex&&(b(IDBIndex.prototype,Te,r),b(IDBRequest.prototype,Te,r),b(IDBOpenDBRequest.prototype,Te,r),b(IDBDatabase.prototype,Te,r),b(IDBTransaction.prototype,Te,r),b(IDBCursor.prototype,Te,r)),n&&b(WebSocket.prototype,we,r)}else E(),a("XMLHttpRequest"),n&&m(e,t)}}function w(){if((H||x)&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}var t=Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype,"onreadystatechange");if(t){Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var n=new XMLHttpRequest,r=!!n.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",t||{}),r}var o=z("fakeonreadystatechange");Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[o]},set:function(e){this[o]=e}});var n=new XMLHttpRequest,a=function(){};n.onreadystatechange=a;var r=n[o]===a;return n.onreadystatechange=null,r}function E(){for(var e=function(e){var t=De[e],n="on"+t;self.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][Oe]&&(t=Zone.current.wrap(o[n],r),t[Oe]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<De.length;t++)e(t)}function D(e,t){var n="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",r="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,WebSocket".split(","),o="EventTarget",a=[],i=e.wtf,s=n.split(",");i?a=s.map(function(e){return"HTML"+e+"Element"}).concat(r):e[o]?a.push(o):a=r;for(var c=e.__Zone_disable_IE_check||!1,p=e.__Zone_enable_cross_context_check||!1,f=u(),h=".addEventListener:",d="[object FunctionWrapper]",v="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",g=0;g<De.length;g++){var y=De[g],k=y+W,m=y+X,_=Q+k,b=Q+m;G[y]={},G[y][W]=_,G[y][X]=b}for(var g=0;g<n.length;g++)for(var T=s[g],w=V[T]={},E=0;E<De.length;E++){var y=De[E];w[y]=T+h+y}for(var D=function(e,t,n,r){if(!c&&f)if(p)try{var o=t.toString();if(o===d||o==v)return e.apply(n,r),!1}catch(a){return e.apply(n,r),!1}else{var o=t.toString();if(o===d||o==v)return e.apply(n,r),!1}else if(p)try{t.toString()}catch(a){return e.apply(n,r),!1}return!0},O=[],g=0;g<a.length;g++){var Z=e[a[g]];O.push(Z&&Z.prototype)}return l(e,O,{validateHandler:D}),t.patchEventTarget=l,!0}function O(e,t){f(e,t)}function Z(e){if((H||x)&&"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),v(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])},c(document.registerElement,t)}}var S=(function(e){function t(e){c&&c.mark&&c.mark(e)}function n(e,t){c&&c.measure&&c.measure(e,t)}function r(t){0===I&&0===y.length&&(l||e[v]&&(l=e[v].resolve(0)),l?l[g](o):e[d](o,0)),t&&y.push(t)}function o(){if(!k){for(k=!0;y.length;){var e=y;y=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){z.onUnhandledError(r)}}}!u[i("ignoreConsoleErrorUncaughtError")];z.microtaskDrainDone(),k=!1}}function a(){}function i(e){return"__zone_symbol__"+e}var s="function",c=e.performance;if(t("Zone"),e.Zone)throw new Error("Zone already loaded.");var u=function(){function r(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==P.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(r,"root",{get:function(){for(var e=r.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return L.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return M},enumerable:!0,configurable:!0}),r.__load_patch=function(o,a){if(P.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var i="Zone:"+o;t(i),P[o]=a(e,r,z),n(i,i)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.prototype.wrap=function(e,t){if(typeof e!==s)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)}},r.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),L={parent:L,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{L=L.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),L={parent:L,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{L=L.parent}},r.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");var r=e.state===_;if(!r||e.type!==S){var o=e.state!=w;o&&e._transitionTo(w,T),e.runCount++;var a=M;M=e,L={parent:L,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{e.state!==_&&e.state!==D&&(e.type==S||e.data&&e.data.isPeriodic?o&&e._transitionTo(T,w):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(_,w,_))),L=L.parent,M=a}}},r.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(b,_);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(D,b,_),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(T,b),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new h(O,e,t,n,r,null))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(Z,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(S,e,t,n,r,o))},r.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");e._transitionTo(E,T,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(D,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(_,E),e.runCount=0,e},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();u.__symbol__=i;var l,p={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},f=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._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask,o=t&&t._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:p,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=p,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=p,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=p,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new u(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=O)throw new Error("Task is missing scheduleFn.");r(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(n){this.handleError(e,n)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(!(o<0||0!=r&&0!=o)){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,a)}},e}(),h=function(){function t(n,r,o,a,i,s){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,this.callback=o;var c=this;n===S&&a&&a.isUsingGlobalCallback?this.invoke=t.invokeTask:this.invoke=function(){return t.invokeTask.apply(e,[c,this,arguments])}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&o(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(_,b)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==_&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,invoke:this.invoke,scheduleFn:this.scheduleFn,cancelFn:this.cancelFn,runCount:this.runCount,callback:this.callback}},t}(),d=i("setTimeout"),v=i("Promise"),g=i("then"),y=[],k=!1,m={name:"NO ZONE"},_="notScheduled",b="scheduling",T="scheduled",w="running",E="canceling",D="unknown",O="microTask",Z="macroTask",S="eventTask",P={},z={symbol:i,currentZoneFrame:function(){return L},onUnhandledError:a,microtaskDrainDone:a,scheduleMicroTask:r,showUncaughtError:function(){return!u[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:a,patchMethod:function(){return a},setNativePromise:function(e){l=e.resolve(0)}},j="__rootZoneSpec__",C=new u(null,null);e[j]&&(C=C.fork(e[j]),delete e[j]);var L={parent:null,zone:C},M=null,I=0;return n("Zone","Zone"),e.Zone=u}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(o)throw o.error}}return i}),P=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Zone.__load_patch("ZoneAwarePromise",function(e,t,n){function r(e){n.onUnhandledError(e);try{var r=t[y];r&&"function"==typeof r&&r.apply(this,[e])}catch(o){}}function o(e){return e&&e.then}function a(e){return e}function i(e){return M.reject(e)}function s(e,t){return function(n){try{c(e,t,n)}catch(r){c(e,!1,r)}}}function c(e,r,o){var a=D();if(e===o)throw new TypeError(O);if(e[k]===b){var i=null;try{typeof o!==Z&&typeof o!==z||(i=o&&o.then)}catch(p){return a(function(){c(e,!1,p)})(),e}if(r!==w&&o instanceof M&&o.hasOwnProperty(k)&&o.hasOwnProperty(m)&&o[k]!==b)u(o),c(e,o[k],o[m]);else if(r!==w&&typeof i===z)try{i.apply(o,[a(s(e,r)),a(s(e,!1))])}catch(p){a(function(){c(e,!1,p)})()}else{e[k]=r;var f=e[m];e[m]=o,r===w&&o instanceof Error&&(o[j]=t.currentTask);for(var h=0;h<f.length;)l(e,f[h++],f[h++],f[h++],f[h++]);if(0==f.length&&r==w){e[k]=E;try{throw new Error("Uncaught (in promise): "+o+(o&&o.stack?"\n"+o.stack:""))}catch(p){var v=p;v.rejection=o,v.promise=e,v.zone=t.current,v.task=t.currentTask,d.push(v),n.scheduleMicroTask()}}}}return e}function u(e){if(e[k]===E){try{var n=t[C];n&&typeof n===z&&n.apply(this,[{rejection:e[m],promise:e}])}catch(r){}e[k]=w;for(var o=0;o<d.length;o++)e===d[o].promise&&d.splice(o,1)}}function l(e,t,n,r,o){u(e);var s=e[k]?typeof r===z?r:a:typeof o===z?o:i;t.scheduleMicroTask(_,function(){try{c(n,!0,t.run(s,void 0,[e[m]]))}catch(r){c(n,!1,r)}})}function p(e){var t=e.prototype,n=t.then;t[g]=n;var r=Object.getOwnPropertyDescriptor(e.prototype,"then");r&&r.writable===!1&&r.configurable&&Object.defineProperty(e.prototype,"then",{writable:!0}),e.prototype.then=function(e,t){var r=this,o=new M(function(e,t){n.call(r,e,t)});return o.then(e,t)},e[x]=!0}function f(e){return function(){var t=e.apply(this,arguments);if(t instanceof M)return t;var n=t.constructor;return n[x]||p(n),t}}var h=n.symbol,d=[],v=h("Promise"),g=h("then");n.onUnhandledError=function(e){if(n.showUncaughtError()){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)}},n.microtaskDrainDone=function(){for(;d.length;)for(var e=function(){var e=d.shift();try{e.zone.runGuarded(function(){throw e})}catch(t){r(t)}};d.length;)e()};var y=h("unhandledPromiseRejectionHandler"),k=h("state"),m=h("value"),_="Promise.then",b=null,T=!0,w=!1,E=0,D=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},O="Promise resolved with itself",Z="object",z="function",j=h("currentTask"),C=h("rejectionHandledHandler"),L="function ZoneAwarePromise() { [native code] }",M=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[k]=b,n[m]=[];try{t&&t(s(n,T),s(n,w))}catch(r){c(n,!1,r)}}return e.toString=function(){return L},e.resolve=function(e){return c(new this(null),T,e)},e.reject=function(e){return c(new this(null),w,e)},e.race=function(e){function t(e){i&&(i=r(e))}function n(e){i&&(i=a(e))}var r,a,i=new this(function(e,t){n=S([e,t],2),r=n[0],a=n[1];var n});try{for(var s=P(e),c=s.next();!c.done;c=s.next()){var u=c.value;o(u)||(u=this.resolve(u)),u.then(t,n)}}catch(l){p={error:l}}finally{try{c&&!c.done&&(f=s["return"])&&f.call(s)}finally{if(p)throw p.error}}return i;var p,f},e.all=function(e){var t,n,r=new this(function(e,r){t=e,n=r}),a=0,i=[];try{for(var s=P(e),c=s.next();!c.done;c=s.next()){var u=c.value;o(u)||(u=this.resolve(u)),u.then(function(e){return function(n){i[e]=n,a--,a||t(i)}}(a),n),a++}}catch(l){p={error:l}}finally{try{c&&!c.done&&(f=s["return"])&&f.call(s)}finally{if(p)throw p.error}}return a||t(i),r;var p,f},e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[k]==b?this[m].push(o,r,e,n):l(this,o,r,e,n),r},e.prototype["catch"]=function(e){return this.then(null,e)},e}();M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;var I=e[v]=e.Promise,R=t.__symbol__("ZoneAwarePromise"),H=Object.getOwnPropertyDescriptor(e,"Promise");H&&!H.configurable||(H&&delete H.writable,H&&delete H.value,H||(H={configurable:!0,enumerable:!0}),H.get=function(){return e[R]?e[R]:e[v]},H.set=function(t){t===M?e[R]=t:(e[v]=t,t.prototype[g]||p(t),n.setNativePromise(t))},Object.defineProperty(e,"Promise",H)),e.Promise=M;var x=h("thenPatched");if(I){p(I);var F=e.fetch;typeof F==z&&(e.fetch=f(F))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=d,M});var z=Zone.__symbol__,j="object"==typeof window&&window||"object"==typeof self&&self||global,C="function",L="undefined",M="removeAttribute",I="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,R=!("nw"in j)&&"undefined"!=typeof j.process&&"[object process]"==={}.toString.call(j.process),H=!R&&!I&&!("undefined"==typeof window||!window.HTMLElement),x="undefined"!=typeof j.process&&"[object process]"==={}.toString.call(j.process)&&!I&&!("undefined"==typeof window||!window.HTMLElement),F={},q=function(e){if(e=e||j.event){var t=F[e.type];t||(t=F[e.type]=z("ON_PROPERTY"+e.type));var n=this||e.target||j,r=n[t],o=r&&r.apply(this,arguments);return void 0==o||o||e.preventDefault(),o}},N=z("originalInstance"),A=!1,B=!1;
Zone.__load_patch("toString",function(e,t,n){var r=t.__zone_symbol__originalToString=Function.prototype.toString,o="function",a=z("OriginalDelegate"),i=z("Promise"),s=z("Error");Function.prototype.toString=function(){if(typeof this===o){var t=this[a];if(t)return typeof t===o?r.apply(this[a],arguments):Object.prototype.toString.call(t);if(this===Promise){var n=e[i];if(n)return r.apply(n,arguments)}if(this===Error){var c=e[s];if(c)return r.apply(c,arguments)}}return r.apply(this,arguments)};var c=Object.prototype.toString,u="[object Promise]";Object.prototype.toString=function(){return this instanceof Promise?u:c.apply(this,arguments)}});var X="true",W="false",U={isUsingGlobalCallback:!0},G={},V={},K="name",Y="function",J="object",Q="__zone_symbol__",$=/^__zone_symbol__(\w+)(true|false)$/,ee="__zone_symbol__propagationStopped",te=z("zoneTask"),ne=Object[z("defineProperty")]=Object.defineProperty,re=Object[z("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,oe=Object.create,ae=z("unconfigurables"),ie="prototype",se="object",ce="undefined",ue=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],le=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange"],pe=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],fe=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],he=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],de=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],ve=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],ge=["autocomplete","autocompleteerror"],ye=["toggle"],ke=["load"],me=["blur","error","focus","load","resize","scroll","messageerror"],_e=["bounce","finish","start"],be=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Te=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],we=["close","error","open","message"],Ee=["error","message"],De=ue.concat(ve,ge,ye,le,pe,fe,de),Oe=z("unbound");Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=o,n.patchMethod=i}),Zone.__load_patch("timers",function(e,t,n){var r="set",o="clear";h(e,r,o,"Timeout"),h(e,r,o,"Interval"),h(e,r,o,"Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e,t,n){h(e,"request","cancel","AnimationFrame"),h(e,"mozRequest","mozCancel","AnimationFrame"),h(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t,n){for(var r=["alert","prompt","confirm"],o=0;o<r.length;o++){var a=r[o];i(e,a,function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){O(e,n),D(e,n);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),a("MutationObserver"),a("WebKitMutationObserver"),a("IntersectionObserver"),a("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){T(n,e),d(),Z(e)}),Zone.__load_patch("canvas",function(e,t,n){var r=e.HTMLCanvasElement;"undefined"!=typeof r&&r.prototype&&r.prototype.toBlob&&s(r.prototype,"toBlob",function(e,t){return{name:"HTMLCanvasElement.toBlob",target:e,callbackIndex:0,args:t}})}),Zone.__load_patch("XHR",function(e,t,n){function r(e){function n(e){var t=e[o];return t}function r(e){XMLHttpRequest[c]=!1;var t=e.data,n=t.target,r=n[s];d||(d=n[f],v=n[h]),r&&v.apply(n,[y,r]);var a=n[s]=function(){n.readyState===n.DONE&&!t.aborted&&XMLHttpRequest[c]&&e.state===k&&e.invoke()};d.apply(n,[y,a]);var i=n[o];return i||(n[o]=e),b.apply(n,t.args),XMLHttpRequest[c]=!0,e}function l(){}function p(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}var f=z("addEventListener"),h=z("removeEventListener"),d=XMLHttpRequest.prototype[f],v=XMLHttpRequest.prototype[h];if(!d){var g=e.XMLHttpRequestEventTarget;g&&(d=g.prototype[f],v=g.prototype[h])}var y="readystatechange",k="scheduled",m=i(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[a]=0==t[2],e[u]=t[1],m.apply(e,t)}}),_="XMLHttpRequest.send",b=i(e.XMLHttpRequest.prototype,"send",function(){return function(e,n){var o=t.current;if(e[a])return b.apply(e,n);var i={target:e,url:e[u],isPeriodic:!1,delay:null,args:n,aborted:!1};return o.scheduleMacroTask(_,l,i,r,p)}}),T="string",w=i(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,t){var r=n(e);if(r&&typeof r.type==T){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}}})}r(e);var o=z("xhrTask"),a=z("xhrSync"),s=z("xhrListener"),c=z("xhrScheduled"),u=z("xhrURL")}),Zone.__load_patch("geolocation",function(e,n,r){e.navigator&&e.navigator.geolocation&&t(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t,n){function r(t){return function(n){var r=p(e,t);r.forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}})}}e.PromiseRejectionEvent&&(t[z("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),t[z("rejectionHandledHandler")]=r("rejectionhandled"))})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(this,function(){"use strict";function e(e,t){for(var n=e.length-1;n>=0;n--)typeof e[n]===j&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function t(t,r){for(var o=t.constructor.name,a=function(a){var i=r[a],s=t[i];if(s){var u=Object.getOwnPropertyDescriptor(t,i);if(!n(u))return"continue";t[i]=function(t){var n=function(){return t.apply(this,e(arguments,o+"."+i))};return c(n,t),n}(s)}},i=0;i<r.length;i++)a(i)}function n(e){return!e||e.writable!==!1&&(typeof e.get!==j||typeof e.set!==C)}function r(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r&&n){var o=Object.getOwnPropertyDescriptor(n,t);o&&(r={enumerable:!0,configurable:!0})}if(r&&r.configurable){delete r.writable,delete r.value;var a=r.get,i=t.substr(2),s=x[i];s||(s=x[i]=P("ON_PROPERTY"+i)),r.set=function(t){var n=this;if(n||e!==z||(n=z),n){var r=n[s];r&&n.removeEventListener(i,F),"function"==typeof t?(n[s]=t,n.addEventListener(i,F,!1)):n[s]=null}},r.get=function(){var n=this;if(n||e!==z||(n=z),!n)return null;var o=n[s];if(o)return o;if(a){var i=a&&a.apply(this);if(i)return r.set.apply(this,[i]),typeof n[L]===j&&n.removeAttribute(t),i}return null},Object.defineProperty(e,t,r)}}function o(e,t,n){if(t)for(var o=0;o<t.length;o++)r(e,"on"+t[o],n);else{var a=[];for(var i in e)"on"==i.substr(0,2)&&a.push(i);for(var s=0;s<a.length;s++)r(e,a[s],n)}}function a(t){var n=z[t];if(n){z[P(t)]=n,z[t]=function(){var r=e(arguments,t);switch(r.length){case 0:this[q]=new n;break;case 1:this[q]=new n(r[0]);break;case 2:this[q]=new n(r[0],r[1]);break;case 3:this[q]=new n(r[0],r[1],r[2]);break;case 4:this[q]=new n(r[0],r[1],r[2],r[3]);break;default:throw new Error("Arg list too long.")}},c(z[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||!function(e){"function"==typeof o[e]?z[t].prototype[e]=function(){return this[q][e].apply(this[q],arguments)}:Object.defineProperty(z[t].prototype,e,{set:function(n){"function"==typeof n?(this[q][e]=Zone.current.wrap(n,t+"."+e),c(this[q][e],n)):this[q][e]=n},get:function(){return this[q][e]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(z[t][r]=n[r])}}function i(e,t,r){for(var o=e;o&&!o.hasOwnProperty(t);)o=Object.getPrototypeOf(o);!o&&e[t]&&(o=e);var a,i=P(t);if(o&&!(a=o[i])){a=o[i]=o[t];var s=o&&Object.getOwnPropertyDescriptor(o,t);if(n(s)){var u=r(a,i,t);o[t]=function(){return u(this,arguments)},c(o[t],a)}}return a}function s(e,t,n){function r(e){var t=e.data;return t.args[t.callbackIndex]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}var o=null;o=i(e,t,function(e){return function(t,o){var a=n(t,o);if(a.callbackIndex>=0&&"function"==typeof o[a.callbackIndex]){var i=Zone.current.scheduleMacroTask(a.name,o[a.callbackIndex],a,r,null);return i}return e.apply(t,o)}})}function c(e,t){e[P("OriginalDelegate")]=t}function u(){if(N)return A;N=!0;try{var e=window.navigator.userAgent;e.indexOf("MSIE ");return e.indexOf("MSIE ")===-1&&e.indexOf("Trident/")===-1&&e.indexOf("Edge/")===-1||(A=!0),A}catch(t){}}function l(e,t,n){function r(t,n){if(!t)return!1;var r=!0;n&&void 0!==n.useGlobalCallback&&(r=n.useGlobalCallback);var d=n&&n.validateHandler,y=!0;n&&void 0!==n.checkDuplicate&&(y=n.checkDuplicate);var k=!1;n&&void 0!==n.returnTarget&&(k=n.returnTarget);for(var m=t;m&&!m.hasOwnProperty(o);)m=Object.getPrototypeOf(m);if(!m&&t[o]&&(m=t),!m)return!1;if(m[u])return!1;var _,b={},T=m[u]=m[o],w=m[P(a)]=m[a],E=m[P(i)]=m[i],D=m[P(s)]=m[s];n&&n.prependEventListenerFnName&&(_=m[P(n.prependEventListenerFnName)]=m[n.prependEventListenerFnName]);var O=function(e){if(!b.isExisting)return T.apply(b.target,[b.eventName,b.capture?g:v,b.options])},Z=function(e){if(!e.isRemoved){var t=U[e.eventName],n=void 0;t&&(n=t[e.capture?B:X]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++){var a=r[o];if(a===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}}if(e.allRemoved)return w.apply(e.target,[e.eventName,e.capture?g:v,e.options])},S=function(e){return T.apply(b.target,[b.eventName,e.invoke,b.options])},z=function(e){return _.apply(b.target,[b.eventName,e.invoke,b.options])},j=function(e){return w.apply(e.target,[e.eventName,e.invoke,e.options])},C=r?O:S,L=r?Z:j,M=function(e,t){var n=typeof t;return n===K&&e.callback===t||n===Y&&e.originalDelegate===t},I=n&&n.compareTaskCallbackVsDelegate?n.compareTaskCallbackVsDelegate:M,R=function(t,n,o,a,i,s){return void 0===i&&(i=!1),void 0===s&&(s=!1),function(){var c=this||e,u=arguments[1];if(!u)return t.apply(this,arguments);var l=!1;if(typeof u!==K){if(!u.handleEvent)return t.apply(this,arguments);l=!0}if(!d||d(t,u,c,arguments)){var p,f=arguments[0],h=arguments[2],v=!1;void 0===h?p=!1:h===!0?p=!0:h===!1?p=!1:(p=!!h&&!!h.capture,v=!!h&&!!h.once);var g,k=Zone.current,m=U[f];if(m)g=m[p?B:X];else{var _=f+X,T=f+B,w=J+_,E=J+T;U[f]={},U[f][X]=w,U[f][B]=E,g=p?E:w}var D=c[g],O=!1;if(D){if(O=!0,y)for(var Z=0;Z<D.length;Z++)if(I(D[Z],u))return}else D=c[g]=[];var S,P=c.constructor[V],z=G[P];z&&(S=z[f]),S||(S=P+n+f),b.options=h,v&&(b.options.once=!1),b.target=c,b.capture=p,b.eventName=f,b.isExisting=O;var j=r?W:null;j&&(j.taskData=b);var C=k.scheduleEventTask(S,u,j,o,a);return j&&(j.taskData=null),v&&(h.once=!0),C.options=h,C.target=c,C.capture=p,C.eventName=f,l&&(C.originalDelegate=u),s?D.unshift(C):D.push(C),i?c:void 0}}};return m[o]=R(T,l,C,L,k),_&&(m[f]=R(_,h,z,L,k,!0)),m[a]=function(){var t,n=this||e,r=arguments[0],o=arguments[2];t=void 0!==o&&(o===!0||o!==!1&&(!!o&&!!o.capture));var a=arguments[1];if(!a)return w.apply(this,arguments);if(!d||d(w,a,n,arguments)){var i,s=U[r];s&&(i=s[t?B:X]);var c=i&&n[i];if(c)for(var u=0;u<c.length;u++){var l=c[u];if(I(l,a))return c.splice(u,1),l.isRemoved=!0,0===c.length&&(l.allRemoved=!0,n[i]=null),void l.zone.cancelTask(l)}}},m[i]=function(){for(var t=this||e,n=arguments[0],r=[],o=p(t,n),a=0;a<o.length;a++){var i=o[a],s=i.originalDelegate?i.originalDelegate:i.callback;r.push(s)}return r},m[s]=function(){var t=this||e,n=arguments[0];if(n){var r=U[n];if(r){var o=r[X],i=r[B],c=t[o],u=t[i];if(c)for(var l=c.slice(),p=0;p<l.length;p++){var f=l[p],h=f.originalDelegate?f.originalDelegate:f.callback;this[a].apply(this,[n,h,f.options])}if(u)for(var l=u.slice(),p=0;p<l.length;p++){var f=l[p],h=f.originalDelegate?f.originalDelegate:f.callback;this[a].apply(this,[n,h,f.options])}}}else{for(var d=Object.keys(t),p=0;p<d.length;p++){var v=d[p],g=Q.exec(v),y=g&&g[1];y&&"removeListener"!==y&&this[s].apply(this,[y])}this[s].apply(this,["removeListener"])}},c(m[o],T),c(m[a],w),D&&c(m[s],D),E&&c(m[i],E),!0}for(var o=n&&n.addEventListenerFnName||"addEventListener",a=n&&n.removeEventListenerFnName||"removeEventListener",i=n&&n.listenersFnName||"eventListeners",s=n&&n.removeAllFnName||"removeAllListeners",u=P(o),l="."+o+":",f="prependListener",h="."+f+":",d=function(e,t,n){if(!e.isRemoved){var r=e.callback;typeof r===Y&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;if(o&&"object"==typeof o&&o.once){var i=e.originalDelegate?e.originalDelegate:e.callback;t[a].apply(t,[n.type,i,o])}}},v=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[U[t.type][X]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||t[$]!==!0);a++)d(o[a],n,t)}},g=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[U[t.type][B]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||t[$]!==!0);a++)d(o[a],n,t)}},y=[],k=0;k<t.length;k++)y[k]=r(t[k],n);return y}function p(e,t){var n=[];for(var r in e){var o=Q.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var s=0;s<i.length;s++)n.push(i[s])}}return n}function f(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(e,t){e[$]=!0}})}function h(e,t,n,r){function o(t){function n(){try{t.invoke.apply(this,arguments)}finally{typeof r.handleId===l?delete u[r.handleId]:r.handleId&&(r.handleId[ee]=null)}}var r=t.data;return r.args[0]=n,r.handleId=s.apply(e,r.args),t}function a(e){return c(e.data.handleId)}var s=null,c=null;t+=r,n+=r;var u={},l="number",p="string",f="function",h="Interval",d="Timeout",v="notScheduled";s=i(e,t,function(n){return function(i,s){if(typeof s[0]===f){var c=Zone.current,p={handleId:null,isPeriodic:r===h,delay:r===d||r===h?s[1]||0:null,args:s},v=c.scheduleMacroTask(t,s[0],p,o,a);if(!v)return v;var g=v.data.handleId;return typeof g===l?u[g]=v:g&&(g[ee]=v),g&&g.ref&&g.unref&&typeof g.ref===f&&typeof g.unref===f&&(v.ref=g.ref.bind(g),v.unref=g.unref.bind(g)),typeof g===l||g?g:v}return n.apply(e,s)}}),c=i(e,n,function(t){return function(n,r){var o,a=r[0];typeof a===l?o=u[a]:(o=a&&a[ee],o||(o=a)),o&&typeof o.type===p?o.state!==v&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&(typeof a===l?delete u[a]:a&&(a[ee]=null),o.zone.cancelTask(o)):t.apply(e,r)}})}function d(){Object.defineProperty=function(e,t,n){if(g(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return t!==ae&&(n=y(e,t,n)),k(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 typeof t!==ie||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=y(e,n,t[n])}),re(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=ne(e,t);return g(e,t)&&(n.configurable=!1),n}}function v(e,t,n){var r=n.configurable;return n=y(e,t,n),k(e,t,n,r)}function g(e,t){return e&&e[oe]&&e[oe][t]}function y(e,t,n){return n.configurable=!0,n.configurable||(e[oe]||te(e,oe,{writable:!0,value:{}}),e[oe][t]=!0),n}function k(e,t,n,r){try{return te(e,t,n)}catch(o){if(!n.configurable)throw o;typeof r==se?delete n.configurable:n.configurable=r;try{return te(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 m(e,t){var n=t.WebSocket;t.EventTarget||l(t,[n.prototype]),t.WebSocket=function(e,t){var r,a,i=arguments.length>1?new n(e,t):new n(e),s=Object.getOwnPropertyDescriptor(i,"onmessage");return s&&s.configurable===!1?(r=Object.create(i),a=i,["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){var t=Array.prototype.slice.call(arguments);if("addEventListener"===e||"removeEventListener"===e){var n=t.length>0?t[0]:void 0;if(n){var o=Zone.__symbol__("ON_PROPERTY"+n);i[o]=r[o]}}return i[e].apply(i,t)}})):r=i,o(r,["close","error","message","open"],a),r};var r=t.WebSocket;for(var a in n)r[a]=n[a]}function _(e,t,n){if(!n)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter(function(e){return o.indexOf(e)===-1})}function b(e,t,n,r){var a=_(e,t,n);o(e,a,r)}function T(e,t){if(!I||H){var n="undefined"!=typeof WebSocket;if(w()){var r=t.__Zone_ignore_on_properties;if(R){b(window,Ee.concat(["messageerror"]),r,Object.getPrototypeOf(window)),b(Document.prototype,Ee,r),"undefined"!=typeof window.SVGElement&&b(window.SVGElement.prototype,Ee,r),b(Element.prototype,Ee,r),b(HTMLElement.prototype,Ee,r),b(HTMLMediaElement.prototype,fe,r),b(HTMLFrameSetElement.prototype,le.concat(ke),r),b(HTMLBodyElement.prototype,le.concat(ke),r),b(HTMLFrameElement.prototype,ye,r),b(HTMLIFrameElement.prototype,ye,r);var o=window.HTMLMarqueeElement;o&&b(o.prototype,me,r);var i=window.Worker;i&&b(i.prototype,we,r)}b(XMLHttpRequest.prototype,_e,r);var s=t.XMLHttpRequestEventTarget;s&&b(s&&s.prototype,_e,r),"undefined"!=typeof IDBIndex&&(b(IDBIndex.prototype,be,r),b(IDBRequest.prototype,be,r),b(IDBOpenDBRequest.prototype,be,r),b(IDBDatabase.prototype,be,r),b(IDBTransaction.prototype,be,r),b(IDBCursor.prototype,be,r)),n&&b(WebSocket.prototype,Te,r)}else E(),a("XMLHttpRequest"),n&&m(e,t)}}function w(){if((R||H)&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}var t=Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype,"onreadystatechange");if(t){Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var n=new XMLHttpRequest,r=!!n.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",t||{}),r}var o=P("fakeonreadystatechange");Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[o]},set:function(e){this[o]=e}});var n=new XMLHttpRequest,a=function(){};n.onreadystatechange=a;var r=n[o]===a;return n.onreadystatechange=null,r}function E(){for(var e=function(e){var t=Ee[e],n="on"+t;self.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][De]&&(t=Zone.current.wrap(o[n],r),t[De]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<Ee.length;t++)e(t)}function D(e,t){var n="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",r="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,WebSocket".split(","),o="EventTarget",a=[],i=e.wtf,s=n.split(",");i?a=s.map(function(e){return"HTML"+e+"Element"}).concat(r):e[o]?a.push(o):a=r;for(var c=e.__Zone_disable_IE_check||!1,p=e.__Zone_enable_cross_context_check||!1,f=u(),h=".addEventListener:",d="[object FunctionWrapper]",v="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",g=0;g<Ee.length;g++){var y=Ee[g],k=y+X,m=y+B,_=J+k,b=J+m;U[y]={},U[y][X]=_,U[y][B]=b}for(var g=0;g<n.length;g++)for(var T=s[g],w=G[T]={},E=0;E<Ee.length;E++){var y=Ee[E];w[y]=T+h+y}for(var D=function(e,t,n,r){if(!c&&f)if(p)try{var o=t.toString();if(o===d||o==v)return e.apply(n,r),!1}catch(a){return e.apply(n,r),!1}else{var o=t.toString();if(o===d||o==v)return e.apply(n,r),!1}else if(p)try{t.toString()}catch(a){return e.apply(n,r),!1}return!0},O=[],g=0;g<a.length;g++){var Z=e[a[g]];O.push(Z&&Z.prototype)}return l(e,O,{validateHandler:D}),t.patchEventTarget=l,!0}function O(e,t){f(e,t)}function Z(e){if((R||H)&&"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),v(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])},c(document.registerElement,t)}}var S=(function(e){function t(e){c&&c.mark&&c.mark(e)}function n(e,t){c&&c.measure&&c.measure(e,t)}function r(t){0===I&&0===y.length&&(l||e[v]&&(l=e[v].resolve(0)),l?l[g](o):e[d](o,0)),t&&y.push(t)}function o(){if(!k){for(k=!0;y.length;){var e=y;y=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){z.onUnhandledError(r)}}}!u[i("ignoreConsoleErrorUncaughtError")];z.microtaskDrainDone(),k=!1}}function a(){}function i(e){return"__zone_symbol__"+e}var s="function",c=e.performance;if(t("Zone"),e.Zone)throw new Error("Zone already loaded.");var u=function(){function r(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==P.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(r,"root",{get:function(){for(var e=r.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return L.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return M},enumerable:!0,configurable:!0}),r.__load_patch=function(o,a){if(P.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var i="Zone:"+o;t(i),P[o]=a(e,r,z),n(i,i)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},r.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},r.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},r.prototype.wrap=function(e,t){if(typeof e!==s)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)}},r.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),L={parent:L,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{L=L.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),L={parent:L,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{L=L.parent}},r.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");var r=e.state===_;if(!r||e.type!==S){var o=e.state!=w;o&&e._transitionTo(w,T),e.runCount++;var a=M;M=e,L={parent:L,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{e.state!==_&&e.state!==D&&(e.type==S||e.data&&e.data.isPeriodic?o&&e._transitionTo(T,w):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(_,w,_))),L=L.parent,M=a}}},r.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(b,_);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(D,b,_),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(T,b),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new h(O,e,t,n,r,null))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(Z,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(S,e,t,n,r,o))},r.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||m).name+"; Execution: "+this.name+")");e._transitionTo(E,T,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(D,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(_,E),e.runCount=0,e},r.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},r}();u.__symbol__=i;var l,p={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},f=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._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask,o=t&&t._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:p,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=p,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=p,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=p,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new u(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=O)throw new Error("Task is missing scheduleFn.");r(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(n){this.handleError(e,n)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(!(o<0||0!=r&&0!=o)){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,a)}},e}(),h=function(){function t(n,r,o,a,i,s){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=s,this.callback=o;var c=this;n===S&&a&&a.isUsingGlobalCallback?this.invoke=t.invokeTask:this.invoke=function(){return t.invokeTask.apply(e,[c,this,arguments])}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&o(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(_,b)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==_&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,invoke:this.invoke,scheduleFn:this.scheduleFn,cancelFn:this.cancelFn,runCount:this.runCount,callback:this.callback}},t}(),d=i("setTimeout"),v=i("Promise"),g=i("then"),y=[],k=!1,m={name:"NO ZONE"},_="notScheduled",b="scheduling",T="scheduled",w="running",E="canceling",D="unknown",O="microTask",Z="macroTask",S="eventTask",P={},z={symbol:i,currentZoneFrame:function(){return L},onUnhandledError:a,microtaskDrainDone:a,scheduleMicroTask:r,showUncaughtError:function(){return!u[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:a,patchMethod:function(){return a},setNativePromise:function(e){e&&typeof e.resolve===s&&(l=e.resolve(0))}},j="__rootZoneSpec__",C=new u(null,null);e[j]&&(C=C.fork(e[j]),delete e[j]);var L={parent:null,zone:C},M=null,I=0;return n("Zone","Zone"),e.Zone=u}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}});Zone.__load_patch("ZoneAwarePromise",function(e,t,n){function r(e){n.onUnhandledError(e);try{var r=t[y];r&&"function"==typeof r&&r.apply(this,[e])}catch(o){}}function o(e){return e&&e.then}function a(e){return e}function i(e){return L.reject(e)}function s(e,t){return function(n){try{c(e,t,n)}catch(r){c(e,!1,r)}}}function c(e,r,o){var a=D();if(e===o)throw new TypeError(O);if(e[k]===b){var i=null;try{typeof o!==Z&&typeof o!==P||(i=o&&o.then)}catch(p){return a(function(){c(e,!1,p)})(),e}if(r!==w&&o instanceof L&&o.hasOwnProperty(k)&&o.hasOwnProperty(m)&&o[k]!==b)u(o),c(e,o[k],o[m]);else if(r!==w&&typeof i===P)try{i.apply(o,[a(s(e,r)),a(s(e,!1))])}catch(p){a(function(){c(e,!1,p)})()}else{e[k]=r;var f=e[m];e[m]=o,r===w&&o instanceof Error&&(o[z]=t.currentTask);for(var h=0;h<f.length;)l(e,f[h++],f[h++],f[h++],f[h++]);if(0==f.length&&r==w){e[k]=E;try{throw new Error("Uncaught (in promise): "+o+(o&&o.stack?"\n"+o.stack:""))}catch(p){var v=p;v.rejection=o,v.promise=e,v.zone=t.current,v.task=t.currentTask,d.push(v),n.scheduleMicroTask()}}}}return e}function u(e){if(e[k]===E){try{var n=t[j];n&&typeof n===P&&n.apply(this,[{rejection:e[m],promise:e}])}catch(r){}e[k]=w;for(var o=0;o<d.length;o++)e===d[o].promise&&d.splice(o,1)}}function l(e,t,n,r,o){u(e);var s=e[k]?typeof r===P?r:a:typeof o===P?o:i;t.scheduleMicroTask(_,function(){try{c(n,!0,t.run(s,void 0,[e[m]]))}catch(r){c(n,!1,r)}})}function p(e){var t=e.prototype,n=t.then;t[g]=n;var r=Object.getOwnPropertyDescriptor(e.prototype,"then");r&&r.writable===!1&&r.configurable&&Object.defineProperty(e.prototype,"then",{writable:!0}),e.prototype.then=function(e,t){var r=this,o=new L(function(e,t){n.call(r,e,t)});return o.then(e,t)},e[H]=!0}function f(e){return function(){var t=e.apply(this,arguments);if(t instanceof L)return t;var n=t.constructor;return n[H]||p(n),t}}var h=n.symbol,d=[],v=h("Promise"),g=h("then");n.onUnhandledError=function(e){if(n.showUncaughtError()){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)}},n.microtaskDrainDone=function(){for(;d.length;)for(var e=function(){var e=d.shift();try{e.zone.runGuarded(function(){throw e})}catch(t){r(t)}};d.length;)e()};var y=h("unhandledPromiseRejectionHandler"),k=h("state"),m=h("value"),_="Promise.then",b=null,T=!0,w=!1,E=0,D=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},O="Promise resolved with itself",Z="object",P="function",z=h("currentTask"),j=h("rejectionHandledHandler"),C="function ZoneAwarePromise() { [native code] }",L=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[k]=b,n[m]=[];try{t&&t(s(n,T),s(n,w))}catch(r){c(n,!1,r)}}return e.toString=function(){return C},e.resolve=function(e){return c(new this(null),T,e)},e.reject=function(e){return c(new this(null),w,e)},e.race=function(e){function t(e){i&&(i=r(e))}function n(e){i&&(i=a(e))}var r,a,i=new this(function(e,t){r=e,a=t});try{for(var s=S(e),c=s.next();!c.done;c=s.next()){var u=c.value;o(u)||(u=this.resolve(u)),u.then(t,n)}}catch(l){p={error:l}}finally{try{c&&!c.done&&(f=s["return"])&&f.call(s)}finally{if(p)throw p.error}}return i;var p,f},e.all=function(e){var t,n,r=new this(function(e,r){t=e,n=r}),a=0,i=[];try{for(var s=S(e),c=s.next();!c.done;c=s.next()){var u=c.value;o(u)||(u=this.resolve(u)),u.then(function(e){return function(n){i[e]=n,a--,a||t(i)}}(a),n),a++}}catch(l){p={error:l}}finally{try{c&&!c.done&&(f=s["return"])&&f.call(s)}finally{if(p)throw p.error}}return a||t(i),r;var p,f},e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[k]==b?this[m].push(o,r,e,n):l(this,o,r,e,n),r},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 M=e[v]=e.Promise,I=t.__symbol__("ZoneAwarePromise"),R=Object.getOwnPropertyDescriptor(e,"Promise");R&&!R.configurable||(R&&delete R.writable,R&&delete R.value,R||(R={configurable:!0,enumerable:!0}),R.get=function(){return e[I]?e[I]:e[v]},R.set=function(t){t===L?e[I]=t:(e[v]=t,t.prototype[g]||p(t),n.setNativePromise(t))},Object.defineProperty(e,"Promise",R)),e.Promise=L;var H=h("thenPatched");if(M){p(M);var x=e.fetch;typeof x==P&&(e.fetch=f(x))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=d,L});var P=Zone.__symbol__,z="object"==typeof window&&window||"object"==typeof self&&self||global,j="function",C="undefined",L="removeAttribute",M="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,I=!("nw"in z)&&"undefined"!=typeof z.process&&"[object process]"==={}.toString.call(z.process),R=!I&&!M&&!("undefined"==typeof window||!window.HTMLElement),H="undefined"!=typeof z.process&&"[object process]"==={}.toString.call(z.process)&&!M&&!("undefined"==typeof window||!window.HTMLElement),x={},F=function(e){if(e=e||z.event){var t=x[e.type];t||(t=x[e.type]=P("ON_PROPERTY"+e.type));var n=this||e.target||z,r=n[t],o=r&&r.apply(this,arguments);return void 0==o||o||e.preventDefault(),o}},q=P("originalInstance"),N=!1,A=!1;Zone.__load_patch("toString",function(e,t,n){var r=t.__zone_symbol__originalToString=Function.prototype.toString,o="function",a=P("OriginalDelegate"),i=P("Promise"),s=P("Error");Function.prototype.toString=function(){
if(typeof this===o){var t=this[a];if(t)return typeof t===o?r.apply(this[a],arguments):Object.prototype.toString.call(t);if(this===Promise){var n=e[i];if(n)return r.apply(n,arguments)}if(this===Error){var c=e[s];if(c)return r.apply(c,arguments)}}return r.apply(this,arguments)};var c=Object.prototype.toString,u="[object Promise]";Object.prototype.toString=function(){return this instanceof Promise?u:c.apply(this,arguments)}});var B="true",X="false",W={isUsingGlobalCallback:!0},U={},G={},V="name",K="function",Y="object",J="__zone_symbol__",Q=/^__zone_symbol__(\w+)(true|false)$/,$="__zone_symbol__propagationStopped",ee=P("zoneTask"),te=Object[P("defineProperty")]=Object.defineProperty,ne=Object[P("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,re=Object.create,oe=P("unconfigurables"),ae="prototype",ie="object",se="undefined",ce=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],ue=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange"],le=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],pe=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],fe=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],he=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],de=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],ve=["autocomplete","autocompleteerror"],ge=["toggle"],ye=["load"],ke=["blur","error","focus","load","resize","scroll","messageerror"],me=["bounce","finish","start"],_e=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],be=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],Te=["close","error","open","message"],we=["error","message"],Ee=ce.concat(de,ve,ge,ue,le,pe,he),De=P("unbound");Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=o,n.patchMethod=i}),Zone.__load_patch("timers",function(e,t,n){var r="set",o="clear";h(e,r,o,"Timeout"),h(e,r,o,"Interval"),h(e,r,o,"Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e,t,n){h(e,"request","cancel","AnimationFrame"),h(e,"mozRequest","mozCancel","AnimationFrame"),h(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t,n){for(var r=["alert","prompt","confirm"],o=0;o<r.length;o++){var a=r[o];i(e,a,function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){O(e,n),D(e,n);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),a("MutationObserver"),a("WebKitMutationObserver"),a("IntersectionObserver"),a("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){T(n,e),d(),Z(e)}),Zone.__load_patch("canvas",function(e,t,n){var r=e.HTMLCanvasElement;"undefined"!=typeof r&&r.prototype&&r.prototype.toBlob&&s(r.prototype,"toBlob",function(e,t){return{name:"HTMLCanvasElement.toBlob",target:e,callbackIndex:0,args:t}})}),Zone.__load_patch("XHR",function(e,t,n){function r(e){function n(e){var t=e[o];return t}function r(e){XMLHttpRequest[c]=!1;var t=e.data,n=t.target,r=n[s];d||(d=n[f],v=n[h]),r&&v.apply(n,[y,r]);var a=n[s]=function(){n.readyState===n.DONE&&!t.aborted&&XMLHttpRequest[c]&&e.state===k&&e.invoke()};d.apply(n,[y,a]);var i=n[o];return i||(n[o]=e),b.apply(n,t.args),XMLHttpRequest[c]=!0,e}function l(){}function p(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}var f=P("addEventListener"),h=P("removeEventListener"),d=XMLHttpRequest.prototype[f],v=XMLHttpRequest.prototype[h];if(!d){var g=e.XMLHttpRequestEventTarget;g&&(d=g.prototype[f],v=g.prototype[h])}var y="readystatechange",k="scheduled",m=i(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[a]=0==t[2],e[u]=t[1],m.apply(e,t)}}),_="XMLHttpRequest.send",b=i(e.XMLHttpRequest.prototype,"send",function(){return function(e,n){var o=t.current;if(e[a])return b.apply(e,n);var i={target:e,url:e[u],isPeriodic:!1,delay:null,args:n,aborted:!1};return o.scheduleMacroTask(_,l,i,r,p)}}),T="string",w=i(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,t){var r=n(e);if(r&&typeof r.type==T){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}}})}r(e);var o=P("xhrTask"),a=P("xhrSync"),s=P("xhrListener"),c=P("xhrScheduled"),u=P("xhrURL")}),Zone.__load_patch("geolocation",function(e,n,r){e.navigator&&e.navigator.geolocation&&t(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t,n){function r(t){return function(n){var r=p(e,t);r.forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}})}}e.PromiseRejectionEvent&&(t[P("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),t[P("rejectionHandledHandler")]=r("rejectionhandled"))})});

@@ -399,5 +399,16 @@ /**

const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : null;
// keep taskData into data to allow onScheduleEventTask to acess the task information
if (data) {
(data as any).taskData = taskData;
}
const task: any =
zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);
// need to clear up taskData because it is a global object
if (data) {
(data as any).taskData = null;
}
// have to save those information to task in case

@@ -535,3 +546,3 @@ // application may call task.zone.cancelTask() directly

if (tasks) {
const removeTasks = [...tasks];
const removeTasks = tasks.slice();
for (let i = 0; i < removeTasks.length; i++) {

@@ -545,3 +556,3 @@ const task = removeTasks[i];

if (captureTasks) {
const removeTasks = [...captureTasks];
const removeTasks = captureTasks.slice();
for (let i = 0; i < removeTasks.length; i++) {

@@ -548,0 +559,0 @@ const task = removeTasks[i];

@@ -246,3 +246,4 @@ /**

let promise: any = new this((res, rej) => {
[resolve, reject] = [res, rej];
resolve = res;
reject = rej;
});

@@ -249,0 +250,0 @@ function onResolve(value: any) {

@@ -1324,3 +1324,8 @@ /**

setNativePromise: (NativePromise: any) => {
nativeMicroTaskQueuePromise = NativePromise.resolve(0);
// sometimes NativePromise.resolve static function
// is not ready yet, (such as core-js/es6.promise)
// so we need to check here.
if (NativePromise && typeof NativePromise.resolve === FUNCTION) {
nativeMicroTaskQueuePromise = NativePromise.resolve(0);
}
},

@@ -1327,0 +1332,0 @@ };

{
"name": "elastic-apm-js-zone",
"version": "0.8.18-prm",
"version": "0.8.18-tskdt",
"description": "Zones for JavaScript",

@@ -48,3 +48,3 @@ "main": "dist/zone-node.js",

"type": "git",
"url": "git://github.com/angular/zone.js.git"
"url": "git://github.com/elastic/apm-agent-js-zone.git"
},

@@ -54,3 +54,3 @@ "author": "Brian Ford",

"bugs": {
"url": "https://github.com/angular/zone.js/issues"
"url": "https://github.com/elastic/apm-agent-js-zone/issues"
},

@@ -57,0 +57,0 @@ "dependencies": {},

@@ -1,58 +0,8 @@

# Zone.js
# Elastic APM Zone
[![Build Status](https://travis-ci.org/angular/zone.js.png)](https://travis-ci.org/angular/zone.js)
[![CDNJS](https://img.shields.io/cdnjs/v/zone.js.svg)](https://cdnjs.com/libraries/zone.js)
Implements _Zones_ for JavaScript. Used in Elastic APM frontend JavaScript agent.
Implements _Zones_ for JavaScript, inspired by [Dart](https://www.dartlang.org/articles/zones/).
Based on [Zone.js](https://github.com/angular/zone.js)
> If you're using zone.js via unpkg please provide a query param `?main=browser`
`https://unpkg.com/zone.js?main=browser`
> If you're using any of the following libraries, make sure you import them first
> * 'newrelic' as it patches global.Promise before zone.js does
> * 'async-listener' as it patches global.setTimeout, global.setInterval before zone.js does
> * 'continuation-local-storage' as it uses async-listener
# NEW Zone.js POST-v0.6.0
See the new API [here](./dist/zone.js.d.ts).
Read up on [Zone Primer](https://docs.google.com/document/d/1F5Ug0jcrm031vhSMJEOgp1l-Is-Vf0UCNDY-LsQtAIY).
## What's a Zone?
A Zone is an execution context that persists across async tasks.
You can think of it as [thread-local storage](http://en.wikipedia.org/wiki/Thread-local_storage) for JavaScript VMs.
See this video from ng-conf 2014 for a detailed explanation:
[![screenshot of the zone.js presentation and ng-conf 2014](/presentation.png)](//www.youtube.com/watch?v=3IqtmUscE_U)
## See also
* [async-listener](https://github.com/othiym23/async-listener) - a similar library for node
* [Async stack traces in Chrome](http://www.html5rocks.com/en/tutorials/developertools/async-call-stack/)
* [strongloop/zone](https://github.com/strongloop/zone) (Deprecated)
* [vizone](https://github.com/gilbox/vizone) - control flow visualizer that uses zone.js
## Standard API support
zone.js patched most standard web APIs(such as DOM events, XMLHttpRequest...) and nodejs APIs
(EventEmitter,fs ...), for more details, please see [STANDARD-APIS.md](STANDARD-APIS.md).
## Non standard API support
We are adding support to some non standard APIs, such as MediaQuery and
Notification. Please see [NON-STANDARD-APIS.md](NON-STANDARD-APIS.md) for more details.
## Modules
zone.js patches the async APIs described above, but those patches will have some overhead.
Starting from zone.js v0.8.9, you can choose which web API module you want to patch.
For more details, please
see [MODULE.md](MODULE.md).
## Promise A+ test passed
[![Promises/A+ 1.1 compliant](https://promisesaplus.com/assets/logo-small.png)](https://promisesaplus.com/)
## License
MIT

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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