Socket
Socket
Sign inDemoInstall

zone.js

Package Overview
Dependencies
0
Maintainers
3
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.14 to 0.8.16

dist/zone_externs.js

44

CHANGELOG.md

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

<a name="0.8.16"></a>
## [0.8.16](https://github.com/angular/zone.js/compare/v0.8.15...0.8.16) (2017-07-27)
### Bug Fixes
* **console:** console.log in nodejs should run in root Zone ([#855](https://github.com/angular/zone.js/issues/855)) ([5900d3a](https://github.com/angular/zone.js/commit/5900d3a))
* **promise:** fix [#850](https://github.com/angular/zone.js/issues/850), check Promise.then writable ([#851](https://github.com/angular/zone.js/issues/851)) ([6e44cab](https://github.com/angular/zone.js/commit/6e44cab))
* **spec:** do not count requestAnimationFrame as a pending timer ([#854](https://github.com/angular/zone.js/issues/854)) ([eca04b0](https://github.com/angular/zone.js/commit/eca04b0))
### Features
* **spec:** add an option to FakeAsyncTestZoneSpec to flush periodic timers ([#857](https://github.com/angular/zone.js/issues/857)) ([5c5ca1a](https://github.com/angular/zone.js/commit/5c5ca1a))
<a name="0.8.15"></a>
## [0.8.15](https://github.com/angular/zone.js/compare/v0.8.13...0.8.15) (2017-07-27)
### Features
* **rxjs:** fix [#830](https://github.com/angular/zone.js/issues/830), monkey patch rxjs to make rxjs run in correct zone ([#843](https://github.com/angular/zone.js/issues/843)) ([1ed83d0](https://github.com/angular/zone.js/commit/1ed83d0))
<a name="0.8.14"></a>
## [0.8.14](https://github.com/angular/zone.js/compare/v0.8.13...0.8.14) (2017-07-20)
### Bug Fixes
* **event:** fix [#836](https://github.com/angular/zone.js/issues/836), handle event callback call removeEventListener case ([#839](https://github.com/angular/zone.js/issues/839)) ([f301fa2](https://github.com/angular/zone.js/commit/f301fa2))
* **event:** fix memory leak for once, add more test cases ([#841](https://github.com/angular/zone.js/issues/841)) ([2143d9c](https://github.com/angular/zone.js/commit/2143d9c))
* **task:** fix [#832](https://github.com/angular/zone.js/issues/832), fix [#835](https://github.com/angular/zone.js/issues/835), task.data should be an object ([#834](https://github.com/angular/zone.js/issues/834)) ([3a4bfbd](https://github.com/angular/zone.js/commit/3a4bfbd))
### Features
* **rxjs:** fix [#830](https://github.com/angular/zone.js/issues/830), monkey patch rxjs to make rxjs run in correct zone ([#843](https://github.com/angular/zone.js/issues/843)) ([1ed83d0](https://github.com/angular/zone.js/commit/1ed83d0))
<a name="0.8.14"></a>
## [0.8.14](https://github.com/angular/zone.js/compare/v0.8.13...0.8.14) (2017-07-18)

@@ -3,0 +47,0 @@

56

dist/fake-async-test.js

@@ -31,5 +31,6 @@ /**

}
Scheduler.prototype.scheduleFunction = function (cb, delay, args, isPeriodic, id) {
Scheduler.prototype.scheduleFunction = function (cb, delay, args, isPeriodic, isRequestAnimationFrame, id) {
if (args === void 0) { args = []; }
if (isPeriodic === void 0) { isPeriodic = false; }
if (isRequestAnimationFrame === void 0) { isRequestAnimationFrame = false; }
if (id === void 0) { id = -1; }

@@ -45,3 +46,4 @@ var currentId = id < 0 ? this.nextId++ : id;

delay: delay,
isPeriodic: isPeriodic
isPeriodic: isPeriodic,
isRequestAnimationFrame: isRequestAnimationFrame
};

@@ -88,6 +90,9 @@ var i = 0;

};
Scheduler.prototype.flush = function (limit) {
Scheduler.prototype.flush = function (limit, flushPeriodic) {
var _this = this;
if (limit === void 0) { limit = 20; }
if (flushPeriodic === void 0) { flushPeriodic = false; }
var startTime = this._currentTime;
var count = 0;
var seenTimers = [];
while (this._schedulerQueue.length > 0) {

@@ -99,7 +104,25 @@ count++;

}
// If the only remaining tasks are periodic, finish flushing.
if (!(this._schedulerQueue.filter(function (task) { return !task.isPeriodic; }).length)) {
break;
if (!flushPeriodic) {
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter(function (task) { return !task.isPeriodic && !task.isRequestAnimationFrame; })
.length === 0) {
break;
}
}
else {
// flushPeriodic has been requested.
// Stop when all timer id-s have been seen at least once.
if (this._schedulerQueue
.filter(function (task) {
return seenTimers.indexOf(task.id) === -1 || _this._currentTime === task.endTime;
})
.length === 0) {
break;
}
}
var current = this._schedulerQueue.shift();
if (seenTimers.indexOf(current.id) === -1) {
seenTimers.push(current.id);
}
this._currentTime = current.endTime;

@@ -117,3 +140,5 @@ var retval = current.func.apply(global, current.args);

var FakeAsyncTestZoneSpec = (function () {
function FakeAsyncTestZoneSpec(namePrefix) {
function FakeAsyncTestZoneSpec(namePrefix, trackPendingRequestAnimationFrame) {
if (trackPendingRequestAnimationFrame === void 0) { trackPendingRequestAnimationFrame = false; }
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this._scheduler = new Scheduler();

@@ -174,3 +199,3 @@ this._microtasks = [];

if (_this.pendingPeriodicTimers.indexOf(id) !== -1) {
_this._scheduler.scheduleFunction(fn, interval, args, true, id);
_this._scheduler.scheduleFunction(fn, interval, args, true, false, id);
}

@@ -185,8 +210,11 @@ };

};
FakeAsyncTestZoneSpec.prototype._setTimeout = function (fn, delay, args) {
FakeAsyncTestZoneSpec.prototype._setTimeout = function (fn, delay, args, isTimer) {
if (isTimer === void 0) { isTimer = true; }
var removeTimerFn = this._dequeueTimer(this._scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
var cb = this._fnAndFlush(fn, { onSuccess: removeTimerFn, onError: removeTimerFn });
var id = this._scheduler.scheduleFunction(cb, delay, args);
this.pendingTimers.push(id);
var id = this._scheduler.scheduleFunction(cb, delay, args, false, !isTimer);
if (isTimer) {
this.pendingTimers.push(id);
}
return id;

@@ -247,6 +275,6 @@ };

};
FakeAsyncTestZoneSpec.prototype.flush = function (limit) {
FakeAsyncTestZoneSpec.prototype.flush = function (limit, flushPeriodic) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flush(limit);
var elapsed = this._scheduler.flush(limit, flushPeriodic);
if (this._lastError !== null) {

@@ -294,3 +322,3 @@ this._resetLastErrorAndThrow();

// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args']);
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;

@@ -297,0 +325,0 @@ default:

@@ -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--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function t(t,n){for(var r=t.constructor.name,o=function(o){var a=n[o],i=t[a];i&&(t[a]=function(t){var n=function(){return t.apply(this,e(arguments,r+"."+a))};return s(n,t),n}(i))},a=0;a<n.length;a++)o(a)}function n(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=w("_"+t);r.set=function(t){var n=this;if(n||e!==E||(n=E),n){var r=n[s];if(r&&n.removeEventListener(i,r),"function"==typeof t){var o=function(e){var n=t.apply(this,arguments);return void 0==n||n||e.preventDefault(),n};n[s]=o,n.addEventListener(i,o,!1)}else n[s]=null}},r.get=function(){var n=this;if(n||e!==E||(n=E),!n)return null;if(n.hasOwnProperty(s))return n[s];if(a){var o=a&&a.apply(this);if(o)return r.set.apply(this,[o]),"function"==typeof n.removeAttribute&&n.removeAttribute(t),o}return null},Object.defineProperty(e,t,r)}}function r(e,t,r){if(t)for(var o=0;o<t.length;o++)n(e,"on"+t[o],r);else{var a=[];for(var i in e)"on"==i.substr(0,2)&&a.push(i);for(var s=0;s<a.length;s++)n(e,a[s],r)}}function o(t){var n=E[t];if(n){E[w(t)]=n,E[t]=function(){var r=e(arguments,t);switch(r.length){case 0:this[z]=new n;break;case 1:this[z]=new n(r[0]);break;case 2:this[z]=new n(r[0],r[1]);break;case 3:this[z]=new n(r[0],r[1],r[2]);break;case 4:this[z]=new n(r[0],r[1],r[2],r[3]);break;default:throw new Error("Arg list too long.")}},s(E[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||!function(e){"function"==typeof o[e]?E[t].prototype[e]=function(){return this[z][e].apply(this[z],arguments)}:Object.defineProperty(E[t].prototype,e,{set:function(n){"function"==typeof n?(this[z][e]=Zone.current.wrap(n,t+"."+e),s(this[z][e],n)):this[z][e]=n},get:function(){return this[z][e]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(E[t][r]=n[r])}}function a(e,t,n){for(var r=e;r&&!r.hasOwnProperty(t);)r=Object.getPrototypeOf(r);!r&&e[t]&&(r=e);var o,a=w(t);if(r&&!(o=r[a])){o=r[a]=r[t];var i=n(o,a,t);r[t]=function(){return i(this,arguments)},s(r[t],o)}return o}function i(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=a(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 s(e,t){e[w("OriginalDelegate")]=t}function c(){if(P)return j;P=!0;try{var e=window.navigator.userAgent;e.indexOf("MSIE ");return e.indexOf("MSIE ")===-1&&e.indexOf("Trident/")===-1&&e.indexOf("Edge/")===-1||(j=!0),j}catch(t){}}function u(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],E=m[w(a)]=m[a],D=m[w(i)]=m[i],Z=m[w(c)]=m[c];n&&n.prependEventListenerFnName&&(_=m[w(n.prependEventListenerFnName)]=m[n.prependEventListenerFnName]);var S=function(e){if(!b.isExisting)return T.apply(b.target,[b.eventName,b.capture?g:v,b.options])},O=function(e){if(!e.isRemoved){var t=I[e.eventName],n=void 0;t&&(n=t[e.capture?C:L]);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 E.apply(e.target,[e.eventName,e.capture?g:v,e.options])},z=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 E.apply(e.target,[e.eventName,e.invoke,e.options])},N=r?S:z,A=r?O:j,X=function(e,t){var n=typeof t;return n===R&&e.callback===t||n===x&&e.originalDelegate===t},W=n&&n.compareTaskCallbackVsDelegate?n.compareTaskCallbackVsDelegate:X,U=function(t,n,o,a,i,s){return void 0===i&&(i=!1),void 0===s&&(s=!1),function(){var c=this||e,u=(Zone.current,arguments[1]);if(!u)return t.apply(this,arguments);var l=!1;if(typeof u!==R){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=I[f];if(m)g=m[p?C:L];else{var _=f+L,T=f+C,w=q+_,E=q+T;I[f]={},I[f][L]=w,I[f][C]=E,g=p?E:w}var D=c[g],Z=!1;if(D){if(Z=!0,y)for(var S=0;S<D.length;S++)if(W(D[S],u))return}else D=c[g]=[];var O,z=c.constructor[F],P=H[z];P&&(O=P[f]),O||(O=z+n+f),b.options=h,v&&(b.options.once=!1),b.target=c,b.capture=p,b.eventName=f,b.isExisting=Z;var j=r?M:null,x=k.scheduleEventTask(O,u,j,o,a);return v&&(h.once=!0),x.options=h,x.target=c,x.capture=p,x.eventName=f,l&&(x.originalDelegate=u),s?D.unshift(x):D.push(x),i?c:void 0}}};return m[o]=U(T,p,N,A,k),_&&(m[f]=U(_,h,P,A,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 E.apply(this,arguments);if(!d||d(E,a,n,arguments)){var i,s=I[r];s&&(i=s[t?C:L]);var c=i&&n[i];if(c)for(var u=0;u<c.length;u++){var l=c[u];if(W(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=l(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[c]=function(){var t=this||e,n=arguments[0];if(n){var r=I[n];if(r){var o=r[L],i=r[C],s=t[o],u=t[i];if(s)for(var l=s.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=B.exec(v),y=g&&g[1];y&&"removeListener"!==y&&this[c].apply(this,[y])}this[c].apply(this,["removeListener"])}},s(m[o],T),s(m[a],E),Z&&s(m[c],Z),D&&s(m[i],D),!0}for(var o=n&&n.addEventListenerFnName||"addEventListener",a=n&&n.removeEventListenerFnName||"removeEventListener",i=n&&n.listenersFnName||"eventListeners",c=n&&n.removeAllFnName||"removeAllListeners",u=w(o),p="."+o+":",f="prependListener",h="."+f+":",d=function(e,t,n){if(!e.isRemoved){var r=e.callback;typeof r===x&&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){var n=this||e,r=n[I[t.type][L]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length;a++)d(o[a],n,t)},g=function(t){var n=this||e,r=n[I[t.type][C]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length;a++)d(o[a],n,t)},y=[],k=0;k<t.length;k++)y[k]=r(t[k],n);return y}function l(e,t){var n=[];for(var r in e){var o=B.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 p(e,t,n,r){function o(t){function n(){try{t.invoke.apply(this,arguments)}finally{"number"==typeof r.handleId&&delete u[r.handleId]}}var r=t.data;return r.args[0]=n,r.handleId=s.apply(e,r.args),"number"==typeof r.handleId&&(u[r.handleId]=t),t}function i(e){return"number"==typeof e.data.handleId&&delete u[e.data.handleId],c(e.data.handleId)}var s=null,c=null;t+=r,n+=r;var u={};s=a(e,t,function(n){return function(a,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,i);if(!l)return l;var p=l.data.handleId;return p&&p.ref&&p.unref&&"function"==typeof p.ref&&"function"==typeof p.unref&&(l.ref=p.ref.bind(p),l.unref=p.unref.bind(p)),l}return n.apply(e,s)}}),c=a(e,n,function(t){return function(n,r){var o="number"==typeof r[0]?u[r[0]]:r[0];o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}function f(){Object.defineProperty=function(e,t,n){if(d(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=v(e,t,n)),g(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]=v(e,n,t[n])}),X(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=A(e,t);return d(e,t)&&(n.configurable=!1),n}}function h(e,t,n){var r=n.configurable;return n=v(e,t,n),g(e,t,n,r)}function d(e,t){return e&&e[W]&&e[W][t]}function v(e,t,n){return n.configurable=!0,n.configurable||(e[W]||N(e,W,{writable:!0,value:{}}),e[W][t]=!0),n}function g(e,t,n,r){try{return N(e,t,n)}catch(o){if(!n.configurable)throw o;"undefined"==typeof r?delete n.configurable:n.configurable=r;try{return N(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 y(e,t){var n=t.WebSocket;t.EventTarget||u(e,t,[n.prototype]),t.WebSocket=function(e,t){var o,a,i=arguments.length>1?new n(e,t):new n(e),s=Object.getOwnPropertyDescriptor(i,"onmessage");return s&&s.configurable===!1?(o=Object.create(i),a=i,["addEventListener","removeEventListener","send","close"].forEach(function(e){o[e]=function(){return i[e].apply(i,arguments)}})):o=i,r(o,["close","error","message","open"],a),o};for(var o in n)t.WebSocket[o]=n[o]}function k(e,t){if(!Z||O){var n="undefined"!=typeof WebSocket;if(m()){if(S){r(window,se,Object.getPrototypeOf(window)),r(Document.prototype,se),"undefined"!=typeof window.SVGElement&&r(window.SVGElement.prototype,se),r(Element.prototype,se),r(HTMLElement.prototype,se),r(HTMLMediaElement.prototype,J),r(HTMLFrameSetElement.prototype,V.concat(ne)),r(HTMLBodyElement.prototype,V.concat(ne)),r(HTMLFrameElement.prototype,te),r(HTMLIFrameElement.prototype,te);var a=window.HTMLMarqueeElement;a&&r(a.prototype,re)}r(XMLHttpRequest.prototype,oe);var i=t.XMLHttpRequestEventTarget;i&&r(i&&i.prototype,oe),"undefined"!=typeof IDBIndex&&(r(IDBIndex.prototype,ae),r(IDBRequest.prototype,ae),r(IDBOpenDBRequest.prototype,ae),r(IDBDatabase.prototype,ae),r(IDBTransaction.prototype,ae),r(IDBCursor.prototype,ae)),n&&r(WebSocket.prototype,ie)}else _(),o("XMLHttpRequest"),n&&y(e,t)}}function m(){if((S||O)&&!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}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[w("fakeonreadystatechange")]},set:function(e){this[w("fakeonreadystatechange")]=e}});var n=new XMLHttpRequest,o=function(){};n.onreadystatechange=o;var r=n[w("fakeonreadystatechange")]===o;return n.onreadystatechange=null,r}function _(){for(var e=function(e){var t=se[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][ce]&&(t=Zone.current.wrap(o[n],r),t[ce]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<se.length;t++)e(t)}function b(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 l=e.__Zone_disable_IE_check||!1,p=e.__Zone_enable_cross_context_check||!1,f=c(),h=".addEventListener:",d="[object FunctionWrapper]",v="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",g=0;g<se.length;g++){var y=se[g],k=y+L,m=y+C,_=q+k,b=q+m;I[y]={},I[y][L]=_,I[y][C]=b}for(var g=0;g<n.length;g++)for(var T=s[g],w=H[T]={},E=0;E<se.length;E++){var y=se[E];w[y]=T+h+y}for(var D=function(e,t,n,r){if(!l&&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},Z=[],g=0;g<a.length;g++){var S=e[a[g]];Z.push(S&&S.prototype)}return u(e,Z,{validateHandler:D}),t.patchEventTarget=u,!0}function T(e){if((S||O)&&"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),h(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])},s(document.registerElement,t)}}(function(e){function t(e){s&&s.mark&&s.mark(e)}function n(e,t){s&&s.measure&&s.measure(e,t)}function r(t){0===j&&0===v.length&&(e[h]?e[h].resolve(0)[d](o):e[f](o,0)),t&&v.push(t)}function o(){if(!g){for(g=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){O.onUnhandledError(r)}}}!c[i("ignoreConsoleErrorUncaughtError")];O.microtaskDrainDone(),g=!1}}function a(){}function i(e){return"__zone_symbol__"+e}var s=e.performance;if(t("Zone"),e.Zone)throw new Error("Zone already loaded.");var c=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 l(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==S.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 z.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return P},enumerable:!0,configurable:!0}),r.__load_patch=function(o,a){if(S.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var i="Zone:"+o;t(i),S[o]=a(e,r,O),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("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)}},r.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{z=z.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||y).name+"; Execution: "+this.name+")");var r=e.state===k;if(!r||e.type!==Z){var o=e.state!=b;o&&e._transitionTo(b,_),e.runCount++;var a=P;P=e,z={parent:z,zone:this};try{e.type==D&&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!==k&&e.state!==w&&(e.type==Z||e.data&&e.data.isPeriodic?o&&e._transitionTo(_,b):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(k,b,k))),z=z.parent,P=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(m,k);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(w,m,k),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(_,m),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new p(E,e,t,n,r,null))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new p(D,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new p(Z,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||y).name+"; Execution: "+this.name+")");e._transitionTo(T,_,b);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,T),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(k,T),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}();c.__symbol__=i;var u={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)}},l=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:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,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 c(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!=E)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)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};this.hasTask(this.zone,a)}},e}(),p=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===Z&&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),j++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==j&&o(),j--}},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(k,m)},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==k&&(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}(),f=i("setTimeout"),h=i("Promise"),d=i("then"),v=[],g=!1,y={name:"NO ZONE"},k="notScheduled",m="scheduling",_="scheduled",b="running",T="canceling",w="unknown",E="microTask",D="macroTask",Z="eventTask",S={},O={symbol:i,currentZoneFrame:function(){return z},onUnhandledError:a,microtaskDrainDone:a,scheduleMicroTask:r,showUncaughtError:function(){return!c[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:a,patchMethod:function(){return a}},z={parent:null,zone:new c(null,null)},P=null,j=0;return n("Zone","Zone"),e.Zone=c})("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);Zone.__load_patch("ZoneAwarePromise",function(e,t,n){function r(e){n.onUnhandledError(e);try{var r=t[h("unhandledPromiseRejectionHandler")];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 D.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=E();if(e===o)throw new TypeError("Promise resolved with itself");if(e[y]===_){var i=null;try{"object"!=typeof o&&"function"!=typeof o||(i=o&&o.then)}catch(p){return a(function(){c(e,!1,p)})(),e}if(r!==T&&o instanceof D&&o.hasOwnProperty(y)&&o.hasOwnProperty(k)&&o[y]!==_)u(o),c(e,o[y],o[k]);else if(r!==T&&"function"==typeof i)try{i.apply(o,[a(s(e,r)),a(s(e,!1))])}catch(p){a(function(){c(e,!1,p)})()}else{e[y]=r;var f=e[k];e[k]=o,r===T&&o instanceof Error&&(o[h("currentTask")]=t.currentTask);for(var v=0;v<f.length;)l(e,f[v++],f[v++],f[v++],f[v++]);if(0==f.length&&r==T){e[y]=w;try{throw new Error("Uncaught (in promise): "+o+(o&&o.stack?"\n"+o.stack:""))}catch(p){var g=p;g.rejection=o,g.promise=e,g.zone=t.current,g.task=t.currentTask,d.push(g),n.scheduleMicroTask()}}}}return e}function u(e){if(e[y]===w){try{var n=t[h("rejectionHandledHandler")];n&&"function"==typeof n&&n.apply(this,[{rejection:e[k],promise:e}])}catch(r){}e[y]=T;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[y]?"function"==typeof r?r:a:"function"==typeof o?o:i;t.scheduleMicroTask(m,function(){try{c(n,!0,t.run(s,void 0,[e[k]]))}catch(r){c(n,!1,r)}})}function p(e){var t=e.prototype,n=t.then;t[g]=n,e.prototype.then=function(e,t){var r=this,o=new D(function(e,t){n.call(r,e,t)});return o.then(e,t)},e[S]=!0}function f(e){return function(){var t=e.apply(this,arguments);if(t instanceof D)return t;var n=t.constructor;return n[S]||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("state"),k=h("value"),m="Promise.then",_=null,b=!0,T=!1,w=0,E=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},D=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[y]=_,n[k]=[];try{t&&t(s(n,b),s(n,T))}catch(r){c(n,!1,r)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return c(new this(null),b,e)},e.reject=function(e){return c(new this(null),T,e)},e.race=function(e){function t(e){i&&(i=r(e))}function n(e){i&&(i=a(e))}for(var r,a,i=new this(function(e,t){n=[e,t],r=n[0],a=n[1];var n}),s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(t,n)}return i},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),a=0,i=[],s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(function(e){return function(n){i[e]=n,a--,a||t(i)}}(a),n),a++}return a||t(i),r},e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[y]==_?this[k].push(o,r,e,n):l(this,o,r,e,n),r},e.prototype["catch"]=function(e){return this.then(null,e)},e}();D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;var Z=e[v]=e.Promise;e.Promise=D;var S=h("thenPatched");if(Z){p(Z);var O=e.fetch;"function"==typeof O&&(e.fetch=f(O))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=d,D});var w=Zone.__symbol__,E="object"==typeof window&&window||"object"==typeof self&&self||global,D="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Z=!("nw"in E)&&"undefined"!=typeof E.process&&"[object process]"==={}.toString.call(E.process),S=!Z&&!D&&!("undefined"==typeof window||!window.HTMLElement),O="undefined"!=typeof E.process&&"[object process]"==={}.toString.call(E.process)&&!D&&!("undefined"==typeof window||!window.HTMLElement),z=w("originalInstance"),P=!1,j=!1;Zone.__load_patch("toString",function(e,t,n){var r=t.__zone_symbol__originalToString=Function.prototype.toString;Function.prototype.toString=function(){if("function"==typeof this){var t=this[w("OriginalDelegate")];if(t)return"function"==typeof t?r.apply(this[w("OriginalDelegate")],arguments):Object.prototype.toString.call(t);if(this===Promise){var n=e[w("Promise")];if(n)return r.apply(n,arguments)}if(this===Error){var o=e[w("Error")];if(o)return r.apply(o,arguments)}}return r.apply(this,arguments)};var o=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":o.apply(this,arguments)}});var C="true",L="false",M={isUsingGlobalCallback:!0},I={},H={},F="name",R="function",x="object",q="__zone_symbol__",B=/^__zone_symbol__(\w+)(true|false)$/,N=Object[w("defineProperty")]=Object.defineProperty,A=Object[w("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,X=Object.create,W=w("unconfigurables"),U=["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","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","transitioncancel","transitionend","waiting","wheel"],G=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange"],V=["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"],K=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],J=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],Q=["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"],$=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],Y=["autocomplete","autocompleteerror"],ee=["toggle"],te=["load"],ne=["blur","error","focus","load","resize","scroll"],re=["bounce","finish","start"],oe=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],ae=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],ie=["close","error","open","message"],se=U.concat($,Y,ee,G,V,K,Q),ce=w("unbound");
Zone.__load_patch("timers",function(e,t,n){var r="set",o="clear";p(e,r,o,"Timeout"),p(e,r,o,"Interval"),p(e,r,o,"Immediate"),p(e,"request","cancel","AnimationFrame"),p(e,"mozRequest","mozCancel","AnimationFrame"),p(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 i=r[o];a(e,i,function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){b(e,n);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),o("MutationObserver"),o("WebKitMutationObserver"),o("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){k(n,e),f(),T(e)}),Zone.__load_patch("canvas",function(e,t,n){var r=e.HTMLCanvasElement;"undefined"!=typeof r&&r.prototype&&r.prototype.toBlob&&i(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[s],r=t.target[w("addEventListener")],a=t.target[w("removeEventListener")];n&&a.apply(t.target,["readystatechange",n]);var i=t.target[s]=function(){t.target.readyState===t.target.DONE&&!t.aborted&&XMLHttpRequest[c]&&"scheduled"===e.state&&e.invoke()};r.apply(t.target,["readystatechange",i]);var u=t.target[o];return u||(t.target[o]=e),f.apply(t.target,t.args),XMLHttpRequest[c]=!0,e}function u(){}function l(e){var t=e.data;return t.aborted=!0,h.apply(t.target,t.args)}var p=a(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[i]=0==t[2],p.apply(e,t)}}),f=a(e.XMLHttpRequest.prototype,"send",function(){return function(e,n){var o=t.current;if(e[i])return f.apply(e,n);var a={target:e,isPeriodic:!1,delay:null,args:n,aborted:!1};return o.scheduleMacroTask("XMLHttpRequest.send",u,a,r,l)}}),h=a(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,t){var r=n(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}}})}r(e);var o=w("xhrTask"),i=w("xhrSync"),s=w("xhrListener"),c=w("xhrScheduled")}),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=l(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[w("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),t[w("rejectionHandledHandler")]=r("rejectionhandled"))}),Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=r,n.patchMethod=a})});
!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--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function t(t,n){for(var r=t.constructor.name,o=function(o){var a=n[o],i=t[a];i&&(t[a]=function(t){var n=function(){return t.apply(this,e(arguments,r+"."+a))};return s(n,t),n}(i))},a=0;a<n.length;a++)o(a)}function n(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=w("_"+t);r.set=function(t){var n=this;if(n||e!==E||(n=E),n){var r=n[s];if(r&&n.removeEventListener(i,r),"function"==typeof t){var o=function(e){var n=t.apply(this,arguments);return void 0==n||n||e.preventDefault(),n};n[s]=o,n.addEventListener(i,o,!1)}else n[s]=null}},r.get=function(){var n=this;if(n||e!==E||(n=E),!n)return null;if(n.hasOwnProperty(s))return n[s];if(a){var o=a&&a.apply(this);if(o)return r.set.apply(this,[o]),"function"==typeof n.removeAttribute&&n.removeAttribute(t),o}return null},Object.defineProperty(e,t,r)}}function r(e,t,r){if(t)for(var o=0;o<t.length;o++)n(e,"on"+t[o],r);else{var a=[];for(var i in e)"on"==i.substr(0,2)&&a.push(i);for(var s=0;s<a.length;s++)n(e,a[s],r)}}function o(t){var n=E[t];if(n){E[w(t)]=n,E[t]=function(){var r=e(arguments,t);switch(r.length){case 0:this[z]=new n;break;case 1:this[z]=new n(r[0]);break;case 2:this[z]=new n(r[0],r[1]);break;case 3:this[z]=new n(r[0],r[1],r[2]);break;case 4:this[z]=new n(r[0],r[1],r[2],r[3]);break;default:throw new Error("Arg list too long.")}},s(E[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||!function(e){"function"==typeof o[e]?E[t].prototype[e]=function(){return this[z][e].apply(this[z],arguments)}:Object.defineProperty(E[t].prototype,e,{set:function(n){"function"==typeof n?(this[z][e]=Zone.current.wrap(n,t+"."+e),s(this[z][e],n)):this[z][e]=n},get:function(){return this[z][e]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(E[t][r]=n[r])}}function a(e,t,n){for(var r=e;r&&!r.hasOwnProperty(t);)r=Object.getPrototypeOf(r);!r&&e[t]&&(r=e);var o,a=w(t);if(r&&!(o=r[a])){o=r[a]=r[t];var i=n(o,a,t);r[t]=function(){return i(this,arguments)},s(r[t],o)}return o}function i(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=a(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 s(e,t){e[w("OriginalDelegate")]=t}function c(){if(P)return j;P=!0;try{var e=window.navigator.userAgent;e.indexOf("MSIE ");return e.indexOf("MSIE ")===-1&&e.indexOf("Trident/")===-1&&e.indexOf("Edge/")===-1||(j=!0),j}catch(t){}}function u(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],E=m[w(a)]=m[a],D=m[w(i)]=m[i],Z=m[w(c)]=m[c];n&&n.prependEventListenerFnName&&(b=m[w(n.prependEventListenerFnName)]=m[n.prependEventListenerFnName]);var O=function(e){if(!_.isExisting)return T.apply(_.target,[_.eventName,_.capture?g:v,_.options])},S=function(e){if(!e.isRemoved){var t=I[e.eventName],n=void 0;t&&(n=t[e.capture?C:L]);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 E.apply(e.target,[e.eventName,e.capture?g:v,e.options])},z=function(e){return T.apply(_.target,[_.eventName,e.invoke,_.options])},P=function(e){return b.apply(_.target,[_.eventName,e.invoke,_.options])},j=function(e){return E.apply(e.target,[e.eventName,e.invoke,e.options])},N=r?O:z,A=r?S:j,X=function(e,t){var n=typeof t;return n===R&&e.callback===t||n===x&&e.originalDelegate===t},W=n&&n.compareTaskCallbackVsDelegate?n.compareTaskCallbackVsDelegate:X,U=function(t,n,o,a,i,s){return void 0===i&&(i=!1),void 0===s&&(s=!1),function(){var c=this||e,u=(Zone.current,arguments[1]);if(!u)return t.apply(this,arguments);var l=!1;if(typeof u!==R){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=I[f];if(m)g=m[p?C:L];else{var b=f+L,T=f+C,w=q+b,E=q+T;I[f]={},I[f][L]=w,I[f][C]=E,g=p?E:w}var D=c[g],Z=!1;if(D){if(Z=!0,y)for(var O=0;O<D.length;O++)if(W(D[O],u))return}else D=c[g]=[];var S,z=c.constructor[F],P=H[z];P&&(S=P[f]),S||(S=z+n+f),_.options=h,v&&(_.options.once=!1),_.target=c,_.capture=p,_.eventName=f,_.isExisting=Z;var j=r?M:null,x=k.scheduleEventTask(S,u,j,o,a);return v&&(h.once=!0),x.options=h,x.target=c,x.capture=p,x.eventName=f,l&&(x.originalDelegate=u),s?D.unshift(x):D.push(x),i?c:void 0}}};return m[o]=U(T,p,N,A,k),b&&(m[f]=U(b,h,P,A,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 E.apply(this,arguments);if(!d||d(E,a,n,arguments)){var i,s=I[r];s&&(i=s[t?C:L]);var c=i&&n[i];if(c)for(var u=0;u<c.length;u++){var l=c[u];if(W(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=l(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[c]=function(){var t=this||e,n=arguments[0];if(n){var r=I[n];if(r){var o=r[L],i=r[C],s=t[o],u=t[i];if(s)for(var l=s.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=B.exec(v),y=g&&g[1];y&&"removeListener"!==y&&this[c].apply(this,[y])}this[c].apply(this,["removeListener"])}},s(m[o],T),s(m[a],E),Z&&s(m[c],Z),D&&s(m[i],D),!0}for(var o=n&&n.addEventListenerFnName||"addEventListener",a=n&&n.removeEventListenerFnName||"removeEventListener",i=n&&n.listenersFnName||"eventListeners",c=n&&n.removeAllFnName||"removeAllListeners",u=w(o),p="."+o+":",f="prependListener",h="."+f+":",d=function(e,t,n){if(!e.isRemoved){var r=e.callback;typeof r===x&&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){var n=this||e,r=n[I[t.type][L]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length;a++)d(o[a],n,t)},g=function(t){var n=this||e,r=n[I[t.type][C]];if(r)if(1===r.length)d(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length;a++)d(o[a],n,t)},y=[],k=0;k<t.length;k++)y[k]=r(t[k],n);return y}function l(e,t){var n=[];for(var r in e){var o=B.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 p(e,t,n,r){function o(t){function n(){try{t.invoke.apply(this,arguments)}finally{"number"==typeof r.handleId&&delete u[r.handleId]}}var r=t.data;return r.args[0]=n,r.handleId=s.apply(e,r.args),"number"==typeof r.handleId&&(u[r.handleId]=t),t}function i(e){return"number"==typeof e.data.handleId&&delete u[e.data.handleId],c(e.data.handleId)}var s=null,c=null;t+=r,n+=r;var u={};s=a(e,t,function(n){return function(a,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,i);if(!l)return l;var p=l.data.handleId;return p&&p.ref&&p.unref&&"function"==typeof p.ref&&"function"==typeof p.unref&&(l.ref=p.ref.bind(p),l.unref=p.unref.bind(p)),l}return n.apply(e,s)}}),c=a(e,n,function(t){return function(n,r){var o="number"==typeof r[0]?u[r[0]]:r[0];o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}function f(){Object.defineProperty=function(e,t,n){if(d(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=v(e,t,n)),g(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]=v(e,n,t[n])}),X(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=A(e,t);return d(e,t)&&(n.configurable=!1),n}}function h(e,t,n){var r=n.configurable;return n=v(e,t,n),g(e,t,n,r)}function d(e,t){return e&&e[W]&&e[W][t]}function v(e,t,n){return n.configurable=!0,n.configurable||(e[W]||N(e,W,{writable:!0,value:{}}),e[W][t]=!0),n}function g(e,t,n,r){try{return N(e,t,n)}catch(o){if(!n.configurable)throw o;"undefined"==typeof r?delete n.configurable:n.configurable=r;try{return N(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 y(e,t){var n=t.WebSocket;t.EventTarget||u(e,t,[n.prototype]),t.WebSocket=function(e,t){var o,a,i=arguments.length>1?new n(e,t):new n(e),s=Object.getOwnPropertyDescriptor(i,"onmessage");return s&&s.configurable===!1?(o=Object.create(i),a=i,["addEventListener","removeEventListener","send","close"].forEach(function(e){o[e]=function(){return i[e].apply(i,arguments)}})):o=i,r(o,["close","error","message","open"],a),o};for(var o in n)t.WebSocket[o]=n[o]}function k(e,t){if(!Z||S){var n="undefined"!=typeof WebSocket;if(m()){if(O){r(window,se,Object.getPrototypeOf(window)),r(Document.prototype,se),"undefined"!=typeof window.SVGElement&&r(window.SVGElement.prototype,se),r(Element.prototype,se),r(HTMLElement.prototype,se),r(HTMLMediaElement.prototype,J),r(HTMLFrameSetElement.prototype,V.concat(ne)),r(HTMLBodyElement.prototype,V.concat(ne)),r(HTMLFrameElement.prototype,te),r(HTMLIFrameElement.prototype,te);var a=window.HTMLMarqueeElement;a&&r(a.prototype,re)}r(XMLHttpRequest.prototype,oe);var i=t.XMLHttpRequestEventTarget;i&&r(i&&i.prototype,oe),"undefined"!=typeof IDBIndex&&(r(IDBIndex.prototype,ae),r(IDBRequest.prototype,ae),r(IDBOpenDBRequest.prototype,ae),r(IDBDatabase.prototype,ae),r(IDBTransaction.prototype,ae),r(IDBCursor.prototype,ae)),n&&r(WebSocket.prototype,ie)}else b(),o("XMLHttpRequest"),n&&y(e,t)}}function m(){if((O||S)&&!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}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[w("fakeonreadystatechange")]},set:function(e){this[w("fakeonreadystatechange")]=e}});var n=new XMLHttpRequest,o=function(){};n.onreadystatechange=o;var r=n[w("fakeonreadystatechange")]===o;return n.onreadystatechange=null,r}function b(){for(var e=function(e){var t=se[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][ce]&&(t=Zone.current.wrap(o[n],r),t[ce]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<se.length;t++)e(t)}function _(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 l=e.__Zone_disable_IE_check||!1,p=e.__Zone_enable_cross_context_check||!1,f=c(),h=".addEventListener:",d="[object FunctionWrapper]",v="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",g=0;g<se.length;g++){var y=se[g],k=y+L,m=y+C,b=q+k,_=q+m;I[y]={},I[y][L]=b,I[y][C]=_}for(var g=0;g<n.length;g++)for(var T=s[g],w=H[T]={},E=0;E<se.length;E++){var y=se[E];w[y]=T+h+y}for(var D=function(e,t,n,r){if(!l&&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},Z=[],g=0;g<a.length;g++){var O=e[a[g]];Z.push(O&&O.prototype)}return u(e,Z,{validateHandler:D}),t.patchEventTarget=u,!0}function T(e){if((O||S)&&"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),h(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])},s(document.registerElement,t)}}(function(e){function t(e){s&&s.mark&&s.mark(e)}function n(e,t){s&&s.measure&&s.measure(e,t)}function r(t){0===j&&0===v.length&&(e[h]?e[h].resolve(0)[d](o):e[f](o,0)),t&&v.push(t)}function o(){if(!g){for(g=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){S.onUnhandledError(r)}}}!c[i("ignoreConsoleErrorUncaughtError")];S.microtaskDrainDone(),g=!1}}function a(){}function i(e){return"__zone_symbol__"+e}var s=e.performance;if(t("Zone"),e.Zone)throw new Error("Zone already loaded.");var c=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 l(this,this._parent&&this._parent._zoneDelegate,t)}return r.assertZonePatched=function(){if(e.Promise!==O.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 z.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return P},enumerable:!0,configurable:!0}),r.__load_patch=function(o,a){if(O.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var i="Zone:"+o;t(i),O[o]=a(e,r,S),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("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)}},r.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},r.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{z=z.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||y).name+"; Execution: "+this.name+")");var r=e.state===k;if(!r||e.type!==Z){var o=e.state!=_;o&&e._transitionTo(_,b),e.runCount++;var a=P;P=e,z={parent:z,zone:this};try{e.type==D&&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!==k&&e.state!==w&&(e.type==Z||e.data&&e.data.isPeriodic?o&&e._transitionTo(b,_):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(k,_,k))),z=z.parent,P=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(m,k);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(w,m,k),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(b,m),e},r.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new p(E,e,t,n,r,null))},r.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new p(D,e,t,n,r,o))},r.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new p(Z,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||y).name+"; Execution: "+this.name+")");e._transitionTo(T,b,_);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(w,T),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(k,T),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}();c.__symbol__=i;var u={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)}},l=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:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,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 c(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!=E)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)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};this.hasTask(this.zone,a)}},e}(),p=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===Z&&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),j++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==j&&o(),j--}},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(k,m)},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==k&&(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}(),f=i("setTimeout"),h=i("Promise"),d=i("then"),v=[],g=!1,y={name:"NO ZONE"},k="notScheduled",m="scheduling",b="scheduled",_="running",T="canceling",w="unknown",E="microTask",D="macroTask",Z="eventTask",O={},S={symbol:i,currentZoneFrame:function(){return z},onUnhandledError:a,microtaskDrainDone:a,scheduleMicroTask:r,showUncaughtError:function(){return!c[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:a,patchMethod:function(){return a}},z={parent:null,zone:new c(null,null)},P=null,j=0;return n("Zone","Zone"),e.Zone=c})("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);Zone.__load_patch("ZoneAwarePromise",function(e,t,n){function r(e){n.onUnhandledError(e);try{var r=t[h("unhandledPromiseRejectionHandler")];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 D.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=E();if(e===o)throw new TypeError("Promise resolved with itself");if(e[y]===b){var i=null;try{"object"!=typeof o&&"function"!=typeof o||(i=o&&o.then)}catch(p){return a(function(){c(e,!1,p)})(),e}if(r!==T&&o instanceof D&&o.hasOwnProperty(y)&&o.hasOwnProperty(k)&&o[y]!==b)u(o),c(e,o[y],o[k]);else if(r!==T&&"function"==typeof i)try{i.apply(o,[a(s(e,r)),a(s(e,!1))])}catch(p){a(function(){c(e,!1,p)})()}else{e[y]=r;var f=e[k];e[k]=o,r===T&&o instanceof Error&&(o[h("currentTask")]=t.currentTask);for(var v=0;v<f.length;)l(e,f[v++],f[v++],f[v++],f[v++]);if(0==f.length&&r==T){e[y]=w;try{throw new Error("Uncaught (in promise): "+o+(o&&o.stack?"\n"+o.stack:""))}catch(p){var g=p;g.rejection=o,g.promise=e,g.zone=t.current,g.task=t.currentTask,d.push(g),n.scheduleMicroTask()}}}}return e}function u(e){if(e[y]===w){try{var n=t[h("rejectionHandledHandler")];n&&"function"==typeof n&&n.apply(this,[{rejection:e[k],promise:e}])}catch(r){}e[y]=T;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[y]?"function"==typeof r?r:a:"function"==typeof o?o:i;t.scheduleMicroTask(m,function(){try{c(n,!0,t.run(s,void 0,[e[k]]))}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 D(function(e,t){n.call(r,e,t)});return o.then(e,t)},e[O]=!0}function f(e){return function(){var t=e.apply(this,arguments);if(t instanceof D)return t;var n=t.constructor;return n[O]||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("state"),k=h("value"),m="Promise.then",b=null,_=!0,T=!1,w=0,E=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},D=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[y]=b,n[k]=[];try{t&&t(s(n,_),s(n,T))}catch(r){c(n,!1,r)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return c(new this(null),_,e)},e.reject=function(e){return c(new this(null),T,e)},e.race=function(e){function t(e){i&&(i=r(e))}function n(e){i&&(i=a(e))}for(var r,a,i=new this(function(e,t){n=[e,t],r=n[0],a=n[1];var n}),s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(t,n)}return i},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),a=0,i=[],s=0,c=e;s<c.length;s++){var u=c[s];o(u)||(u=this.resolve(u)),u.then(function(e){return function(n){i[e]=n,a--,a||t(i)}}(a),n),a++}return a||t(i),r},e.prototype.then=function(e,n){var r=new this.constructor(null),o=t.current;return this[y]==b?this[k].push(o,r,e,n):l(this,o,r,e,n),r},e.prototype["catch"]=function(e){return this.then(null,e)},e}();D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;var Z=e[v]=e.Promise;e.Promise=D;var O=h("thenPatched");if(Z){p(Z);var S=e.fetch;"function"==typeof S&&(e.fetch=f(S))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=d,D});var w=Zone.__symbol__,E="object"==typeof window&&window||"object"==typeof self&&self||global,D="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Z=!("nw"in E)&&"undefined"!=typeof E.process&&"[object process]"==={}.toString.call(E.process),O=!Z&&!D&&!("undefined"==typeof window||!window.HTMLElement),S="undefined"!=typeof E.process&&"[object process]"==={}.toString.call(E.process)&&!D&&!("undefined"==typeof window||!window.HTMLElement),z=w("originalInstance"),P=!1,j=!1;Zone.__load_patch("toString",function(e,t,n){var r=t.__zone_symbol__originalToString=Function.prototype.toString;Function.prototype.toString=function(){if("function"==typeof this){var t=this[w("OriginalDelegate")];if(t)return"function"==typeof t?r.apply(this[w("OriginalDelegate")],arguments):Object.prototype.toString.call(t);if(this===Promise){var n=e[w("Promise")];if(n)return r.apply(n,arguments)}if(this===Error){var o=e[w("Error")];if(o)return r.apply(o,arguments)}}return r.apply(this,arguments)};var o=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":o.apply(this,arguments)}});var C="true",L="false",M={isUsingGlobalCallback:!0},I={},H={},F="name",R="function",x="object",q="__zone_symbol__",B=/^__zone_symbol__(\w+)(true|false)$/,N=Object[w("defineProperty")]=Object.defineProperty,A=Object[w("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,X=Object.create,W=w("unconfigurables"),U=["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","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","transitioncancel","transitionend","waiting","wheel"],G=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange"],V=["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"],K=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],J=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],Q=["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"],$=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],Y=["autocomplete","autocompleteerror"],ee=["toggle"],te=["load"],ne=["blur","error","focus","load","resize","scroll"],re=["bounce","finish","start"],oe=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],ae=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],ie=["close","error","open","message"],se=U.concat($,Y,ee,G,V,K,Q),ce=w("unbound");
Zone.__load_patch("timers",function(e,t,n){var r="set",o="clear";p(e,r,o,"Timeout"),p(e,r,o,"Interval"),p(e,r,o,"Immediate"),p(e,"request","cancel","AnimationFrame"),p(e,"mozRequest","mozCancel","AnimationFrame"),p(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 i=r[o];a(e,i,function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}})}}),Zone.__load_patch("EventTarget",function(e,t,n){_(e,n);var r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),o("MutationObserver"),o("WebKitMutationObserver"),o("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){k(n,e),f(),T(e)}),Zone.__load_patch("canvas",function(e,t,n){var r=e.HTMLCanvasElement;"undefined"!=typeof r&&r.prototype&&r.prototype.toBlob&&i(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[s],r=t.target[w("addEventListener")],a=t.target[w("removeEventListener")];n&&a.apply(t.target,["readystatechange",n]);var i=t.target[s]=function(){t.target.readyState===t.target.DONE&&!t.aborted&&XMLHttpRequest[c]&&"scheduled"===e.state&&e.invoke()};r.apply(t.target,["readystatechange",i]);var u=t.target[o];return u||(t.target[o]=e),f.apply(t.target,t.args),XMLHttpRequest[c]=!0,e}function u(){}function l(e){var t=e.data;return t.aborted=!0,h.apply(t.target,t.args)}var p=a(e.XMLHttpRequest.prototype,"open",function(){return function(e,t){return e[i]=0==t[2],p.apply(e,t)}}),f=a(e.XMLHttpRequest.prototype,"send",function(){return function(e,n){var o=t.current;if(e[i])return f.apply(e,n);var a={target:e,isPeriodic:!1,delay:null,args:n,aborted:!1};return o.scheduleMacroTask("XMLHttpRequest.send",u,a,r,l)}}),h=a(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,t){var r=n(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}}})}r(e);var o=w("xhrTask"),i=w("xhrSync"),s=w("xhrListener"),c=w("xhrScheduled")}),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=l(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[w("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),t[w("rejectionHandledHandler")]=r("rejectionhandled"))}),Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=r,n.patchMethod=a})});

@@ -333,2 +333,9 @@ /**

// check Ctor.prototype.then propertyDescritor is writable or not
// in meteor env, writable is false, we have to make it to be true.
const prop = Object.getOwnPropertyDescriptor(Ctor.prototype, 'then');
if (prop && prop.writable === false && prop.configurable) {
Object.defineProperty(Ctor.prototype, 'then', {writable: true});
}
Ctor.prototype.then = function(onResolve: any, onReject: any) {

@@ -335,0 +342,0 @@ const wrapped = new ZoneAwarePromise((resolve, reject) => {

@@ -137,1 +137,19 @@ /**

});
Zone.__load_patch('console', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
const consoleMethods =
['dir', 'log', 'info', 'error', 'warn', 'assert', 'debug', 'timeEnd', 'trace'];
consoleMethods.forEach((m: string) => {
const originalMethod = (console as any)[Zone.__symbol__(m)] = (console as any)[m];
if (originalMethod) {
(console as any)[m] = function() {
const args = Array.prototype.slice.call(arguments);
if (Zone.current === Zone.root) {
return originalMethod.apply(this, args);
} else {
return Zone.root.run(originalMethod, this, args);
}
};
}
});
});

@@ -17,2 +17,3 @@ /**

isPeriodic: boolean;
isRequestAnimationFrame: boolean;
}

@@ -39,3 +40,3 @@

cb: Function, delay: number, args: any[] = [], isPeriodic: boolean = false,
id: number = -1): number {
isRequestAnimationFrame: boolean = false, id: number = -1): number {
let currentId: number = id < 0 ? this.nextId++ : id;

@@ -51,3 +52,4 @@ let endTime = this._currentTime + delay;

delay: delay,
isPeriodic: isPeriodic
isPeriodic: isPeriodic,
isRequestAnimationFrame: isRequestAnimationFrame
};

@@ -95,5 +97,6 @@ let i = 0;

flush(limit: number = 20): number {
flush(limit: number = 20, flushPeriodic = false): number {
const startTime = this._currentTime;
let count = 0;
let seenTimers: number[] = [];
while (this._schedulerQueue.length > 0) {

@@ -106,7 +109,24 @@ count++;

}
// If the only remaining tasks are periodic, finish flushing.
if (!(this._schedulerQueue.filter(task => !task.isPeriodic).length)) {
break;
if (!flushPeriodic) {
// flush only non-periodic timers.
// If the only remaining tasks are periodic(or requestAnimationFrame), finish flushing.
if (this._schedulerQueue.filter(task => !task.isPeriodic && !task.isRequestAnimationFrame)
.length === 0) {
break;
}
} else {
// flushPeriodic has been requested.
// Stop when all timer id-s have been seen at least once.
if (this._schedulerQueue
.filter(
task =>
seenTimers.indexOf(task.id) === -1 || this._currentTime === task.endTime)
.length === 0) {
break;
}
}
let current = this._schedulerQueue.shift();
if (seenTimers.indexOf(current.id) === -1) {
seenTimers.push(current.id);
}
this._currentTime = current.endTime;

@@ -139,3 +159,3 @@ let retval = current.func.apply(global, current.args);

constructor(namePrefix: string) {
constructor(namePrefix: string, private trackPendingRequestAnimationFrame = false) {
this.name = 'fakeAsyncTestZone for ' + namePrefix;

@@ -183,3 +203,3 @@ }

if (this.pendingPeriodicTimers.indexOf(id) !== -1) {
this._scheduler.scheduleFunction(fn, interval, args, true, id);
this._scheduler.scheduleFunction(fn, interval, args, true, false, id);
}

@@ -195,8 +215,10 @@ };

private _setTimeout(fn: Function, delay: number, args: any[]): number {
private _setTimeout(fn: Function, delay: number, args: any[], isTimer = true): number {
let removeTimerFn = this._dequeueTimer(this._scheduler.nextId);
// Queue the callback and dequeue the timer on success and error.
let cb = this._fnAndFlush(fn, {onSuccess: removeTimerFn, onError: removeTimerFn});
let id = this._scheduler.scheduleFunction(cb, delay, args);
this.pendingTimers.push(id);
let id = this._scheduler.scheduleFunction(cb, delay, args, false, !isTimer);
if (isTimer) {
this.pendingTimers.push(id);
}
return id;

@@ -260,6 +282,6 @@ }

flush(limit?: number): number {
flush(limit?: number, flushPeriodic?: boolean): number {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
let elapsed = this._scheduler.flush(limit);
let elapsed = this._scheduler.flush(limit, flushPeriodic);
if (this._lastError !== null) {

@@ -314,3 +336,5 @@ this._resetLastErrorAndThrow();

// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, (task.data as any)['args']);
task.data['handleId'] = this._setTimeout(
task.invoke, 16, (task.data as any)['args'],
this.trackPendingRequestAnimationFrame);
break;

@@ -317,0 +341,0 @@ default:

{
"name": "zone.js",
"version": "0.8.14",
"version": "0.8.16",
"description": "Zones for JavaScript",

@@ -35,4 +35,4 @@ "main": "dist/zone-node.js",

"ws-server": "node ./test/ws-server.js",
"tsc": "tsc",
"tsc:w": "tsc -w",
"tsc": "tsc -p .",
"tsc:w": "tsc -w -p .",
"test": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine\"",

@@ -91,2 +91,3 @@ "test:phantomjs": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine:phantomjs\"",

"pump": "^1.0.1",
"rxjs": "^5.4.2",
"selenium-webdriver": "^3.4.0",

@@ -93,0 +94,0 @@ "systemjs": "^0.19.37",

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc