24 lines
28 KiB
JavaScript
24 lines
28 KiB
JavaScript
|
|
/**
|
||
|
|
The MIT License
|
||
|
|
|
||
|
|
Copyright (c) 2014-2017 Google, Inc. http://angular.io
|
||
|
|
|
||
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
|
|
of this software and associated documentation files (the "Software"), to deal
|
||
|
|
in the Software without restriction, including without limitation the rights
|
||
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
|
|
copies of the Software, and to permit persons to whom the Software is
|
||
|
|
furnished to do so, subject to the following conditions:
|
||
|
|
|
||
|
|
The above copyright notice and this permission notice shall be included in
|
||
|
|
all copies or substantial portions of the Software.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||
|
|
THE SOFTWARE.
|
||
|
|
**/
|
||
|
|
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){(function(e){"use strict";function t(e){function t(e){var t=e[v];return t}function n(e){var t=e.data;t.target.addEventListener("readystatechange",function(){t.target.readyState===XMLHttpRequest.DONE&&(t.aborted||e.invoke())});var n=t.target[v];return n||(t.target[v]=e),a.apply(t.target,t.args),e}function r(){}function o(e){var t=e.data;return t.aborted=!0,i.apply(t.target,t.args)}var a=c.patchMethod(e.XMLHttpRequest.prototype,"send",function(){return function(e,t){var a=Zone.current,i={target:e,isPeriodic:!1,delay:null,args:t,aborted:!1};return a.scheduleMacroTask("XMLHttpRequest.send",r,i,n,o)}}),i=c.patchMethod(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,n){var r=t(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn)return;r.zone.cancelTask(r)}}})}n(1);var r=n(2),o=n(4),a=n(5),i=n(6),u=n(8),c=n(3),s="set",l="clear",f=["alert","prompt","confirm"],p="undefined"==typeof window?e:window;u.patchTimer(p,s,l,"Timeout"),u.patchTimer(p,s,l,"Interval"),u.patchTimer(p,s,l,"Immediate"),u.patchTimer(p,"request","cancelMacroTask","AnimationFrame"),u.patchTimer(p,"mozRequest","mozCancel","AnimationFrame"),u.patchTimer(p,"webkitRequest","webkitCancel","AnimationFrame");for(var h=0;h<f.length;h++){var d=f[h];c.patchMethod(p,d,function(e,t,n){return function(t,r){return Zone.current.run(e,p,r,n)}})}r.eventTargetPatch(p),i.propertyDescriptorPatch(p),c.patchClass("MutationObserver"),c.patchClass("WebKitMutationObserver"),c.patchClass("FileReader"),o.propertyPatch(),a.registerElementPatch(p),t(p);var v=c.zoneSymbol("xhrTask");p.navigator&&p.navigator.geolocation&&c.patchPrototype(p.navigator.geolocation,["getCurrentPosition","watchPosition"])}).call(t,function(){return this}())},function(e,t){(function(e){(function(e){function t(e){return"__zone_symbol__"+e}function n(){E||T||0!=w.length||(e[g]?e[g].resolve(0)[k](a):e[y](a,0))}function r(e){n(),w.push(e)}function o(e){var t=e&&e.rejection;t&&console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t),console.error(e)}function a(){if(!_){for(_=!0;w.length;){var e=w;w=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){o(r)}}}for(;b.length;){var a=b;b=[];for(var i=function(e){var t=a[e];try{t.zone.runGuarded(function(){throw t})}catch(n){o(n)}},t=0;t<a.length;t++)i(t)}_=!1,E=!1}}function i(e){return e&&e.then}function u(e){return e}function c(e){return C.reject(e)}function s(e,t){return function(n){l(e,t,n)}}function l(e,t,r){if(e[S]===P)if(r instanceof C&&r[S]!==P)f(r),l(e,r[S],r[O]);else if(i(r))r.then(s(e,t),s(e,!1));else{e[S]=t;var o=e[O];e[O]=r;for(var a=0;a<o.length;)p(e,o[a++],o[a++],o[a++],o[a++]);if(0==o.length&&t==z){e[S]=j;try{throw new Error("Uncaught (in promise): "+r)}catch(u){var c=u;c.rejection=r,c.promise=e,c.zone=h.current,c.task=h.currentTask,b.push(c),n()}}}return e}function f(e){if(e[S]===j){e[S]=z;for(var t=0;t<b.length;t++)if(e===b[t].promise){b.splice(t,1);break}}}function p(e,t,n,r,o){f(e);var a=e[S]?r||u:o||c;t.scheduleMicroTask(D,function(){try{l(n,!0,t.run(a,null,[e[O]]))}catch(r){l(n,!1,r)}})}var h=function(){function e(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new d(this,this._parent&&this._parent._zoneDelegate,t)}return Object.defineProperty(e,"current",{get:function(){return m},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return T},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t._properti
|