Initial commit: notification-elements-demo app

Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Giuliano Silvestro
2026-02-13 21:49:19 +10:00
commit 5d0c9ec7eb
36473 changed files with 3778146 additions and 0 deletions

1576
node_modules/zone.js/CHANGELOG.md generated vendored Executable file

File diff suppressed because it is too large Load Diff

21
node_modules/zone.js/LICENSE generated vendored Executable file
View File

@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
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.

24
node_modules/zone.js/LICENSE.wrapped generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
@license
The MIT License
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
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.
*/

145
node_modules/zone.js/README.md generated vendored Executable file
View File

@@ -0,0 +1,145 @@
# Zone.js
[![CDNJS](https://img.shields.io/cdnjs/v/zone.js.svg)](https://cdnjs.com/libraries/zone.js)
Implements _Zones_ for JavaScript, inspired by [Dart](https://dart.dev/articles/archive/zones).
> If you're using zone.js via unpkg (i.e. using `https://unpkg.com/zone.js`)
> and 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
## Development Status of Zone.js
As Angular moves towards a zoneless application development model, Zone.js is no longer accepting new features, including additional patches for native platform APIs. The team will also not be accepting any low priority bug fixes. Any critical bug fixes that relate to Angular's direct use of Zone.js will still be accepted.
While still a supported part of Angular, the Angular team strongly discourages using Zone.js outside of Angular application contexts.
## NEW Zone.js POST-v0.6.0
See the new API [here](./lib/zone.ts).
Read up on [Zone Primer](https://docs.google.com/document/d/1F5Ug0jcrm031vhSMJEOgp1l-Is-Vf0UCNDY-LsQtAIY).
## BREAKING CHANGES since Zone.js v0.11.1
Prior to `v0.11.1`, Zone.js provided two distribution bundle formats in the `dist` folder.
They were (1) `ES5` bundle distributed as `zone.js` and (2) `ES2015` bundle distributed as `zone-evergreen.js`.
Both of these bundles were in `UMD` format, and are used for Angular's differential-loading mechanism.
Starting with `v0.11.1`, Zone.js follows the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs). Therefor the new Zone.js file layout is:
- `bundles`: `ES5` bundle in `UMD` format.
- `fesm2015`: `ES5` bundle in `ESM` format.
- `dist`: `ES5` bundle in `UMD` format. This directory is present to keep backward compatibility.
If you are using `Angular CLI`, the `polyfills.ts` file will contain:
```
import 'zone.js/dist/zone';
```
Starting with Zone.js `v0.11.1+` the import changes to:
```
import 'zone.js';
```
Prior to `v0.11.1` the import would load the `ES5` bundle in `UMD` format from `dist/zone.js`.
Starting with `v0.11.1` the import loads the `ES2015` bundle in `ESM` format instead.
This is a breaking change for legacy browsers such as `IE11`.
For backwards compatibility `zone.js` continues to distribute the same bundles under `dist`.
To restore the old behavior import from the `dist` directory instead like so:
```
import 'zone.js/dist/zone';
```
For details, please refer the [changelog](./CHANGELOG.md) and the [PR](https://github.com/angular/angular/pull/36540).
## What's a Zone?
A Zone is an execution context that persists across async tasks.
You can think of it as [thread-local storage](https://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&t=150)
## See also
* [async-listener](https://github.com/othiym23/async-listener) - a similar library for node
* [Async stack traces in Chrome](https://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).
## Nonstandard API support
We are adding support to some nonstandard APIs, such as MediaQuery and
Notification. Please see [NON-STANDARD-APIS.md](NON-STANDARD-APIS.md) for more details.
## Examples
You can find some samples to describe how to use zone.js in [SAMPLE.md](SAMPLE.md).
## 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).
## Bundles
Starting with `v0.11.0`, `zone.js` uses `Angular Package Format` for bundle distribution.
(For backwards compatibility, all bundles can still be accessed from `dist` folder.)
|Bundle|Summary|
|---|---|
|`zone.js`| The default bundle. Contains the most used APIs such as `setTimeout/Promise/EventTarget...`, it also supports differential loading by importing this bundle using `import zone.js`. In legacy browsers it includes some additional patches such as `registerElement` and `EventTarget` like APIs.|
|`zone-testing.js`| The bundle for zone testing support of `jasmine` / `mocha` / `jest`. Also includes test utility functions `async` / `fakeAsync` / `sync`.|
|`zone-node.js`|The NodeJS support bundle.|
|`zone-mix.js`|A mixed bundle which supports both browser and NodeJS. Useful for mixed environment such as Electron.|
|`zone-externs.js`|the API definitions for `closure compiler`.|
Additional optional patches not included in the `zone.js` bundles which extend functionality.
The additional bundles can be found under `zone.js/plugins` folder.
To use these bundles, add the following code after importing zone.js bundle.
```
import 'zone.js';
// For example, import canvas patch
import 'zone.js/plugins/zone-patch-canvas';
```
|Patch|Summary|
|---|---|
|`webapis-media-query.js`|patch for `MediaQuery APIs`|
|`webapis-notification.js`|patch for `Notification APIs`|
|`webapis-rtc-peer-connection.js`|patch for `RTCPeerConnection APIs`|
|`webapis-shadydom.js`|patch for `Shady DOM APIs`|
|`zone-bluebird.js`|patch for `Bluebird APIs`|
|`zone-error.js`|patch for `Error Global Object`, supports adding zone information to stack frame, and also removing unrelated stack frames from `zone.js` internally|
|`zone-patch-canvas.js`|patch for `Canvas API`|
|`zone-patch-cordova.js`|patch for `Cordova API`|
|`zone-patch-electron.js`|patch for `Electron API`|
|`zone-patch-fetch.js`|patch for `Fetch API`|
|`zone-patch-jsonp.js`|helper utility for `jsonp API`|
|`zone-patch-resize-observer.js`|patch for `ResizeObserver API`|
|`zone-patch-rxjs.js`|patch for `rxjs API`|
|`zone-patch-rxjs-fake-async.js`|patch for `rxjs fakeasync test`|
|`zone-patch-socket-io.js`|patch for `socket-io`|
|`zone-patch-user-media.js`|patch for `UserMedia API`|
|`zone-patch-message-port.js`|patch for `MessagePort API`|
## License
MIT

287
node_modules/zone.js/bundles/async-test.umd.js generated vendored Executable file
View File

@@ -0,0 +1,287 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var global$1 = globalThis;
// __Zone_symbol_prefix global can be used to override the default zone
// symbol prefix with a custom one if needed.
function __symbol__(name) {
var symbolPrefix = global$1['__Zone_symbol_prefix'] || '__zone_symbol__';
return symbolPrefix + name;
}
var __global = (typeof window !== 'undefined' && window) || (typeof self !== 'undefined' && self) || global;
var AsyncTestZoneSpec = /** @class */ (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this._pendingMicroTasks = false;
this._pendingMacroTasks = false;
this._alreadyErrored = false;
this._isSync = false;
this._existingFinishTimer = null;
this.entryFunction = null;
this.runZone = Zone.current;
this.unresolvedChainedPromiseCount = 0;
this.supportWaitUnresolvedChainedPromise = false;
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
__global[__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
Object.defineProperty(AsyncTestZoneSpec, "symbolParentUnresolved", {
// Needs to be a getter and not a plain property in order run this just-in-time. Otherwise
// `__symbol__` would be evaluated during top-level execution prior to the Zone prefix being
// changed for tests.
get: function () {
return __symbol__('parentUnresolved');
},
enumerable: false,
configurable: true
});
AsyncTestZoneSpec.prototype.isUnresolvedChainedPromisePending = function () {
return this.unresolvedChainedPromiseCount > 0;
};
AsyncTestZoneSpec.prototype._finishCallbackIfDone = function () {
var _this = this;
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
}
if (!(this._pendingMicroTasks ||
this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(function () {
_this._existingFinishTimer = setTimeout(function () {
if (!_this._alreadyErrored && !(_this._pendingMicroTasks || _this._pendingMacroTasks)) {
_this.finishCallback();
}
}, 0);
});
}
};
AsyncTestZoneSpec.prototype.patchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.unPatchPromiseForTest = function () {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
var unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
};
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
}
return delegate.scheduleTask(target, task);
};
AsyncTestZoneSpec.prototype.onInvokeTask = function (delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.invokeTask(target, task, applyThis, applyArgs);
};
AsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.cancelTask(target, task);
};
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
AsyncTestZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
}
};
AsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
var result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
};
AsyncTestZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
};
return AsyncTestZoneSpec;
}());
function patchAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
Zone.__load_patch('asynctest', function (global, Zone, api) {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, function (err) {
if (typeof err === 'string') {
return done.fail(new Error(err));
}
else {
done.fail(err);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function () {
var _this = this;
return new Promise(function (finishCallback, failCallback) {
runInTestZone(fn, _this, finishCallback, failCallback);
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
var currentZone = Zone.current;
var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
var proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
var previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(function () {
var testZoneSpec = new AsyncTestZoneSpec(function () {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
finishCallback();
});
}, function (error) {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(function () {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
return Zone.current.runGuarded(fn, context);
}
});
}
patchAsyncTest(Zone);
}));

6
node_modules/zone.js/bundles/async-test.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=globalThis;function n(n){return(e.__Zone_symbol_prefix||"__zone_symbol__")+n}var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,i=function(){function e(e,i,s){this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.finishCallback=e,this.failCallback=i,this.name="asyncTestZone for "+s,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===t[n("supportWaitUnResolvedChainedPromise")]}return Object.defineProperty(e,"symbolParentUnresolved",{get:function(){return n("parentUnresolved")},enumerable:!1,configurable:!0}),e.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},e.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},e.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},e.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},e.prototype.onScheduleTask=function(n,t,i,s){return"eventTask"!==s.type&&(this._isSync=!1),"microTask"===s.type&&s.data&&s.data instanceof Promise&&!0===s.data[e.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,n.scheduleTask(i,s)},e.prototype.onInvokeTask=function(e,n,t,i,s,o){return"eventTask"!==i.type&&(this._isSync=!1),e.invokeTask(t,i,s,o)},e.prototype.onCancelTask=function(e,n,t,i){return"eventTask"!==i.type&&(this._isSync=!1),e.cancelTask(t,i)},e.prototype.onInvoke=function(e,n,t,i,s,o,r){this.entryFunction||(this.entryFunction=i);try{return this._isSync=!0,e.invoke(t,i,s,o,r)}finally{this._isSync&&this.entryFunction===i&&this._finishCallbackIfDone()}},e.prototype.onHandleError=function(e,n,t,i){return e.handleError(t,i)&&(this.failCallback(i),this._alreadyErrored=!0),!1},e.prototype.onHasTask=function(e,n,t,i){e.hasTask(t,i),n===t&&("microTask"==i.change?(this._pendingMicroTasks=i.microTask,this._finishCallbackIfDone()):"macroTask"==i.change&&(this._pendingMacroTasks=i.macroTask,this._finishCallbackIfDone()))},e}();!function s(e){e.AsyncTestZoneSpec=i,e.__load_patch("asynctest",(function(e,n,t){function i(e,t,i,s){var o=n.current,r=n.AsyncTestZoneSpec;if(void 0===r)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");var a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");var c=a.get();a.assertPresent();var u=n.current.getZoneWith("ProxyZoneSpec"),h=c.getDelegate();return u.parent.run((function(){var e=new r((function(){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){i()}))}),(function(n){c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((function(){s(n)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,t)}n[t.symbol("asyncTest")]=function n(t){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),i(t,this,e,(function(n){if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){var e=this;return new Promise((function(n,s){i(t,e,n,s)}))}}}))}(Zone)}));

877
node_modules/zone.js/bundles/fake-async-test.umd.js generated vendored Executable file
View File

@@ -0,0 +1,877 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || globalThis.global;
var OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
var d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
}
else {
var args = Array.prototype.slice.call(arguments);
return new (OriginalDate.bind.apply(OriginalDate, __spreadArray([void 0], args, false)))();
}
}
FakeDate.now = function () {
var fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
}
return OriginalDate.now.apply(this, arguments);
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
var patchedTimers;
var timeoutCallback = function () { };
var Scheduler = /** @class */ (function () {
function Scheduler() {
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
this._schedulerQueue = [];
// Current simulated time in millis.
this._currentTickTime = 0;
// Current fake system base time in millis.
this._currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
this._currentTickRequeuePeriodicEntries = [];
}
Scheduler.getNextId = function () {
var id = patchedTimers.nativeSetTimeout.call(global, timeoutCallback, 0);
patchedTimers.nativeClearTimeout.call(global, id);
if (typeof id === 'number') {
return id;
}
// in NodeJS, we just use a number for fakeAsync, since it will not
// conflict with native TimeoutId
return Scheduler.nextNodeJSId++;
};
Scheduler.prototype.getCurrentTickTime = function () {
return this._currentTickTime;
};
Scheduler.prototype.getFakeSystemTime = function () {
return this._currentFakeBaseSystemTime + this._currentTickTime;
};
Scheduler.prototype.setFakeBaseSystemTime = function (fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
};
Scheduler.prototype.getRealSystemTime = function () {
return OriginalDate.now();
};
Scheduler.prototype.scheduleFunction = function (cb, delay, options) {
options = __assign({
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false,
}, options);
var currentId = options.id < 0 ? Scheduler.nextId : options.id;
Scheduler.nextId = Scheduler.getNextId();
var endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame,
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
}
var i = 0;
for (; i < this._schedulerQueue.length; i++) {
var currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
};
Scheduler.prototype.removeScheduledFunctionWithId = function (id) {
for (var i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
}
};
Scheduler.prototype.removeAll = function () {
this._schedulerQueue = [];
};
Scheduler.prototype.getTimerCount = function () {
return this._schedulerQueue.length;
};
Scheduler.prototype.tickToNext = function (step, doTick, tickOptions) {
if (step === void 0) { step = 1; }
if (this._schedulerQueue.length < step) {
return;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
};
Scheduler.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
var finalTime = this._currentTickTime + millis;
var lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
var schedulerQueue = tickOptions.processNewMacroTasksSynchronously
? this._schedulerQueue
: this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
var current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
else {
// Time to run scheduled function. Remove it from the head of queue.
var current_1 = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
var idx = this._schedulerQueue.indexOf(current_1);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current_1.endTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
var retval = current_1.func.apply(global, current_1.isRequestAnimationFrame ? [this._currentTickTime] : current_1.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach(function (newEntry) {
var i = 0;
for (; i < schedulerQueue.length; i++) {
var currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
};
Scheduler.prototype.flushOnlyPendingTimers = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
};
Scheduler.prototype.flush = function (limit, flushPeriodic, doTick) {
if (limit === void 0) { limit = 20; }
if (flushPeriodic === void 0) { flushPeriodic = false; }
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
else {
return this.flushNonPeriodic(limit, doTick);
}
};
Scheduler.prototype.flushPeriodic = function (doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
var startTime = this._currentTickTime;
var lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
};
Scheduler.prototype.flushNonPeriodic = function (limit, doTick) {
var startTime = this._currentTickTime;
var lastCurrentTime = 0;
var count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' +
limit +
' tasks. Does your code use a polling timeout?');
}
// 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;
}
var current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
var retval = current.func.apply(global, current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
return this._currentTickTime - startTime;
};
// Next scheduler id.
Scheduler.nextNodeJSId = 1;
Scheduler.nextId = -1;
return Scheduler;
}());
var FakeAsyncTestZoneSpec = /** @class */ (function () {
function FakeAsyncTestZoneSpec(namePrefix, trackPendingRequestAnimationFrame, macroTaskOptions) {
if (trackPendingRequestAnimationFrame === void 0) { trackPendingRequestAnimationFrame = false; }
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.patchDateLocked = false;
this.properties = { 'FakeAsyncTestZoneSpec': this };
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
}
FakeAsyncTestZoneSpec.assertInZone = function () {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
};
FakeAsyncTestZoneSpec.prototype._fnAndFlush = function (fn, completers) {
var _this = this;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
fn.apply(global, args);
if (_this._lastError === null) {
// Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
// Flush microtasks only on success.
_this.flushMicrotasks();
}
else {
// Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
return _this._lastError === null;
};
};
FakeAsyncTestZoneSpec._removeTimer = function (timers, id) {
var index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
}
};
FakeAsyncTestZoneSpec.prototype._dequeueTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingTimers, id);
};
};
FakeAsyncTestZoneSpec.prototype._requeuePeriodicTimer = function (fn, interval, args, id) {
var _this = this;
return function () {
// Requeue the timer callback if it's not been canceled.
if (_this.pendingPeriodicTimers.indexOf(id) !== -1) {
_this._scheduler.scheduleFunction(fn, interval, {
args: args,
isPeriodic: true,
id: id,
isRequeuePeriodic: true,
});
}
};
};
FakeAsyncTestZoneSpec.prototype._dequeuePeriodicTimer = function (id) {
var _this = this;
return function () {
FakeAsyncTestZoneSpec._removeTimer(_this.pendingPeriodicTimers, id);
};
};
FakeAsyncTestZoneSpec.prototype._setTimeout = function (fn, delay, args, isTimer) {
if (isTimer === void 0) { isTimer = true; }
var removeTimerFn = this._dequeueTimer(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: args, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
}
return id;
};
FakeAsyncTestZoneSpec.prototype._clearTimeout = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._setInterval = function (fn, interval, args) {
var id = Scheduler.nextId;
var completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
var cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args: args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
};
FakeAsyncTestZoneSpec.prototype._clearInterval = function (id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._resetLastErrorAndThrow = function () {
var error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
};
FakeAsyncTestZoneSpec.prototype.getCurrentTickTime = function () {
return this._scheduler.getCurrentTickTime();
};
FakeAsyncTestZoneSpec.prototype.getFakeSystemTime = function () {
return this._scheduler.getFakeSystemTime();
};
FakeAsyncTestZoneSpec.prototype.setFakeBaseSystemTime = function (realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
};
FakeAsyncTestZoneSpec.prototype.getRealSystemTime = function () {
return this._scheduler.getRealSystemTime();
};
FakeAsyncTestZoneSpec.patchDate = function () {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
}
if (global['Date'] === FakeDate) {
// already patched
return;
}
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
};
FakeAsyncTestZoneSpec.resetDate = function () {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
};
FakeAsyncTestZoneSpec.checkTimerPatch = function () {
if (!patchedTimers) {
throw new Error('Expected timers to have been patched.');
}
if (global.setTimeout !== patchedTimers.setTimeout) {
global.setTimeout = patchedTimers.setTimeout;
global.clearTimeout = patchedTimers.clearTimeout;
}
if (global.setInterval !== patchedTimers.setInterval) {
global.setInterval = patchedTimers.setInterval;
global.clearInterval = patchedTimers.clearInterval;
}
};
FakeAsyncTestZoneSpec.prototype.lockDatePatch = function () {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
};
FakeAsyncTestZoneSpec.prototype.unlockDatePatch = function () {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
};
FakeAsyncTestZoneSpec.prototype.tickToNext = function (steps, doTick, tickOptions) {
if (steps === void 0) { steps = 1; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
if (steps <= 0) {
return;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.tick = function (millis, doTick, tickOptions) {
if (millis === void 0) { millis = 0; }
if (tickOptions === void 0) { tickOptions = { processNewMacroTasksSynchronously: true }; }
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
};
FakeAsyncTestZoneSpec.prototype.flushMicrotasks = function () {
var _this = this;
FakeAsyncTestZoneSpec.assertInZone();
var flushErrors = function () {
if (_this._lastError !== null || _this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
_this._resetLastErrorAndThrow();
}
};
while (this._microtasks.length > 0) {
var microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
flushErrors();
};
FakeAsyncTestZoneSpec.prototype.flush = function (limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
};
FakeAsyncTestZoneSpec.prototype.flushOnlyPendingTimers = function (doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
var elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
};
FakeAsyncTestZoneSpec.prototype.removeAllTimers = function () {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
};
FakeAsyncTestZoneSpec.prototype.getTimerCount = function () {
return this._scheduler.getTimerCount() + this._microtasks.length;
};
FakeAsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
var args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
var additionalArgs = void 0;
if (args) {
var callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
}
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target,
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var args_1 = task.data && task.data['args'];
var delay = args_1 && args_1.length > 1 ? args_1[1] : 0;
var callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args_1;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
};
FakeAsyncTestZoneSpec.prototype.onCancelTask = function (delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
var macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
var handleId = task.data['handleId'];
return macroTaskOption.isPeriodic
? this._clearInterval(handleId)
: this._clearTimeout(handleId);
}
return delegate.cancelTask(target, task);
}
};
FakeAsyncTestZoneSpec.prototype.onInvoke = function (delegate, current, target, callback, applyThis, applyArgs, source) {
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
}
};
FakeAsyncTestZoneSpec.prototype.findMacroTaskOption = function (task) {
if (!this.macroTaskOptions) {
return null;
}
for (var i = 0; i < this.macroTaskOptions.length; i++) {
var macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
}
}
return null;
};
FakeAsyncTestZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
// ComponentFixture has a special-case handling to detect FakeAsyncTestZoneSpec
// and prevent rethrowing the error from the onError subscription since it's handled here.
this._lastError = error;
return false; // Don't propagate error to parent zone.
};
return FakeAsyncTestZoneSpec;
}());
var _fakeAsyncTestZoneSpec = null;
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
var _sharedProxyZoneSpec = null;
var _sharedProxyZone = null;
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
var _a, _b;
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
}
_fakeAsyncTestZoneSpec = null;
(_b = (_a = getProxyZoneSpec()) === null || _a === void 0 ? void 0 : _a.get()) === null || _b === void 0 ? void 0 : _b.resetDelegate();
_sharedProxyZoneSpec === null || _sharedProxyZoneSpec === void 0 ? void 0 : _sharedProxyZoneSpec.resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* When flush is `false`, if there are any pending timers at the end of the function,
* an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @param options
* flush: when true, will drain the macrotask queue after the test function completes.
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn, options) {
if (options === void 0) { options = {}; }
var _a = options.flush, flush = _a === void 0 ? true : _a;
// Not using an arrow function to preserve context passed from call site
var fakeAsyncFn = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the fakeAsync() test helper but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
var proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
var FakeAsyncTestZoneSpec_1 = Zone && Zone['FakeAsyncTestZoneSpec'];
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec_1) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec_1();
}
var res = void 0;
var lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
res = fn.apply(this, args);
if (flush) {
_fakeAsyncTestZoneSpec.flush(20, true);
}
else {
flushMicrotasks();
}
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
if (!flush) {
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length, " ") +
"periodic timer(s) still in the queue.");
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error("".concat(_fakeAsyncTestZoneSpec.pendingTimers.length, " timer(s) still in the queue."));
}
}
return res;
}
finally {
resetFakeAsyncZone();
}
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
return _fakeAsyncTestZoneSpec;
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer
* callback has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis, ignoreNestedTimeout) {
if (millis === void 0) { millis = 0; }
if (ignoreNestedTimeout === void 0) { ignoreNestedTimeout = false; }
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
var zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Wraps a function to be executed in a shared ProxyZone.
*
* If no shared ProxyZone exists, one is created and reused for subsequent calls.
* Useful for wrapping test setup (beforeEach) and test execution (it) when test
* runner patching isn't available or desired for setting up the ProxyZone.
*
* @param fn The function to wrap.
* @returns A function that executes the original function within the shared ProxyZone.
*
* @experimental
*/
function withProxyZone(fn) {
var autoProxyFn = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var proxyZoneSpec = getProxyZoneSpec();
if (proxyZoneSpec === undefined) {
throw new Error('ProxyZoneSpec is needed for the withProxyZone() test helper but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
var proxyZone = proxyZoneSpec.get() !== undefined ? Zone.current : getOrCreateRootProxy();
return proxyZone.run(fn, this, args);
};
return autoProxyFn;
}
function getOrCreateRootProxy() {
var ProxyZoneSpec = getProxyZoneSpec();
if (ProxyZoneSpec === undefined) {
throw new Error('ProxyZoneSpec is needed for withProxyZone but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
// Ensure the shared ProxyZoneSpec instance exists
if (_sharedProxyZoneSpec === null) {
_sharedProxyZoneSpec = new ProxyZoneSpec();
}
_sharedProxyZone = Zone.root.fork(_sharedProxyZoneSpec);
return _sharedProxyZone;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
function patchFakeAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
Zone.__load_patch('fakeasync', function (global, Zone, api) {
Zone[api.symbol('fakeAsyncTest')] = {
resetFakeAsyncZone: resetFakeAsyncZone,
flushMicrotasks: flushMicrotasks,
discardPeriodicTasks: discardPeriodicTasks,
tick: tick,
flush: flush,
fakeAsync: fakeAsync,
withProxyZone: withProxyZone,
};
}, true);
patchedTimers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval,
nativeSetTimeout: global[Zone.__symbol__('setTimeout')],
nativeClearTimeout: global[Zone.__symbol__('clearTimeout')],
};
Scheduler.nextId = Scheduler.getNextId();
}
patchFakeAsyncTest(Zone);
}));

7
node_modules/zone.js/bundles/fake-async-test.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

350
node_modules/zone.js/bundles/jasmine-patch.umd.js generated vendored Executable file
View File

@@ -0,0 +1,350 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchJasmine(Zone) {
Zone.__load_patch('jasmine', function (global, Zone, api) {
var __extends = function (d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
var ambientZone = Zone.current;
var symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
var disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we
// also automatically disable the auto jump into fakeAsync feature
var enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
(global[symbol('fakeAsyncPatchLock')] === true ||
global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true);
var ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
var globalErrors_1 = jasmine.GlobalErrors;
if (globalErrors_1 && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors_1;
jasmine.GlobalErrors = function () {
var instance = new globalErrors_1();
var originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
var isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined.
// Otherwise, it installs the browser rejection handler through the
// `global.addEventListener`. This code may be run in the browser environment where
// `process` is not defined, and this will lead to a runtime exception since webpack 5
// removed automatic Node.js polyfills. Note, that events are named differently, it's
// `unhandledRejection` in Node.js and `unhandledrejection` in the browser.
var originalHandlers = isNode
? process.listeners('unhandledRejection')
: global.eventListeners('unhandledrejection');
var result = originalInstall.apply(this, arguments);
isNode
? process.removeAllListeners('unhandledRejection')
: global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach(function (handler) {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
}
return result;
};
}
return instance;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
var jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach(function (methodName) {
var originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
var originalClockFn_1 = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
var clock = originalClockFn_1.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
var originalTick_1 = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
}
return originalTick_1.apply(this, arguments);
};
var originalMockDate_1 = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
var fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
var dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function'
? [dateTime.getTime()]
: arguments);
}
return originalMockDate_1.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach(function (methodName) {
var originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
var FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return clock;
};
}
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
var originalCreateSpyObj_1 = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj_1;
jasmine.createSpyObj = function () {
var args = Array.prototype.slice.call(arguments);
var propertyNames = args.length >= 3 ? args[2] : null;
var spyObj;
if (propertyNames) {
var defineProperty_1 = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty_1.call(this, obj, p, __assign(__assign({}, attributes), { configurable: true, enumerable: true }));
};
try {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
finally {
Object.defineProperty = defineProperty_1;
}
}
else {
spyObj = originalCreateSpyObj_1.apply(this, args);
}
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec("jasmine.describe#".concat(description)));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
var isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
var testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
var fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
}
else {
return testProxyZone.run(testBody, applyThis);
}
}
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody &&
(testBody.length
? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
}
: function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
var _this = this;
if (attrs.onComplete) {
attrs.onComplete = (function (fn) { return function () {
// All functions are done, clear the test zone.
_this.testProxyZone = null;
_this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
}; })(attrs.onComplete);
}
var nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
var nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout,
};
}
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
var onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
var proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
var pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
}
catch (err) { }
}
}
if (onException) {
onException.call(this, error);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
var zone = Zone.current;
var isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
})(QueueRunner);
});
}
patchJasmine(Zone);
}));

6
node_modules/zone.js/bundles/jasmine-patch.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("jasmine",(function(e,n,t){if(!n)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=n.SyncTestZoneSpec,o=n.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!o)throw new Error("Missing: ProxyZoneSpec");var i=n.current,s=n.__symbol__,a=!0===e[s("fakeAsyncDisablePatchingClock")],c=!a&&(!0===e[s("fakeAsyncPatchLock")]||!0===e[s("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[s("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[s("GlobalErrors")]&&(jasmine[s("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var n=new u,t=n.install;return t&&!n[s("install")]&&(n[s("install")]=t,n.install=function(){var n="undefined"!=typeof process&&!!process.on,r=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),o=t.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(t){n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),o}),n})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var n=l[e];l[e]=function(e,t){return n.call(this,e,function o(e,n){return function(){return i.fork(new r("jasmine.describe#".concat(e))).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t,r){return arguments[1]=m(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var n=l[e];l[s(e)]=n,l[e]=function(e,t){return arguments[0]=m(e),n.apply(this,arguments)}})),!a){var f=jasmine[s("clock")]=jasmine.clock;jasmine.clock=function(){var e=f.apply(this,arguments);if(!e[s("patched")]){e[s("patched")]=s("patched");var t=e[s("tick")]=e.tick;e.tick=function(){var e=n.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):t.apply(this,arguments)};var r=e[s("mockDate")]=e.mockDate;e.mockDate=function(){var e=n.current.get("FakeAsyncTestZoneSpec");if(e){var t=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,t&&"function"==typeof t.getTime?[t.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(t){var r=e[s(t)]=e[t];e[t]=function(){if(!n.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[s("clockInstalled")]="install"===t}}))}return e}}if(!jasmine[n.__symbol__("createSpyObj")]){var p=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=p,jasmine.createSpyObj=function(){var e,n=Array.prototype.slice.call(arguments);if(n.length>=3&&n[2]){var t=Object.defineProperty;Object.defineProperty=function(e,n,r){return t.call(this,e,n,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=p.apply(this,n)}finally{Object.defineProperty=t}}else e=p.apply(this,n);return e}}var h=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function r(r){var o,s=this;r.onComplete&&(r.onComplete=(o=r.onComplete,function(){s.testProxyZone=null,s.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",o)}));var a=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];a&&(r.timeout={setTimeout:a||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var n=this&&this.testProxyZoneSpec;if(n){var t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}u&&u.call(this,e)},t.call(this,r)}return function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function r(){this.constructor=e}e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(r,t),r.prototype.execute=function(){for(var e=this,r=n.current,s=!1;r;){if(r===i){s=!0;break}r=r.parent}if(!s)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new o,this.testProxyZone=i.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return h.prototype.execute.call(e)}))},r}(h)}function y(e,t,r,o){var i=!!jasmine[s("clockInstalled")],a=r.testProxyZone;if(i&&c){var u=n[n.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return o?a.run(e,t,[o]):a.run(e,t)}function m(e){return e&&(e.length?function(n){return y(e,this,this.queueRunner,n)}:function(){return y(e,this,this.queueRunner)})}}))}(Zone)}));

188
node_modules/zone.js/bundles/long-stack-trace-zone.umd.js generated vendored Executable file
View File

@@ -0,0 +1,188 @@
'use strict';
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {globalThis}
*/
function patchLongStackTrace(Zone) {
var NEWLINE = '\n';
var IGNORE_FRAMES = {};
var creationTrace = '__creationTrace__';
var ERROR_TAG = 'STACKTRACE TRACKING';
var SEP_TAG = '__SEP_TAG__';
var sepTemplate = SEP_TAG + '@[native]';
var LongStackTrace = /** @class */ (function () {
function LongStackTrace() {
this.error = getStacktrace();
this.timestamp = new Date();
}
return LongStackTrace;
}());
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
}
catch (err) {
return err;
}
}
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var caughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack
? getStacktraceWithUncaughtError
: caughtError.stack
? getStacktraceWithCaughtError
: getStacktraceWithUncaughtError;
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
var trace = getFrames(error);
for (var i = 0; i < trace.length; i++) {
var frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
}
}
}
function renderLongStackTrace(frames, stack) {
var longTrace = [stack ? stack.trim() : ''];
if (frames) {
var timestamp = new Date().getTime();
for (var i = 0; i < frames.length; i++) {
var traceFrames = frames[i];
var lastTime = traceFrames.timestamp;
var separator = "____________________Elapsed ".concat(timestamp - lastTime.getTime(), " ms; At: ").concat(lastTime);
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
}
}
return longTrace.join(NEWLINE);
}
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
var trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
var currentTask = Zone.currentTask;
var trace = (currentTask && currentTask.data && currentTask.data[creationTrace]) || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = __assign({}, task.data);
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) { }
}
}
return parentZoneDelegate.handleError(targetZone, error);
},
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames(new LongStackTrace().error));
captureStackTraces(stackTraces, count - 1);
}
}
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
var frames = [];
captureStackTraces(frames, 2);
var frames1 = frames[0];
var frames2 = frames[1];
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
var match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
break;
}
}
}
for (var i = 0; i < frames1.length; i++) {
var frame1 = frames1[i];
var frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;
}
}
}
computeIgnoreFrames();
}
patchLongStackTrace(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var a,n=1,r=arguments.length;n<r;n++)for(var e in a=arguments[n])Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);return t},__assign.apply(this,arguments)};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(a){var n={},r="__creationTrace__",e="STACKTRACE TRACKING",c="__SEP_TAG__",i=c+"@[native]",o=function o(){this.error=h(),this.timestamp=new Date};function s(){return new Error(e)}function _(){try{throw s()}catch(t){return t}}var f=s(),u=_(),h=f.stack?s:u.stack?_:s;function l(t){return t.stack?t.stack.split("\n"):[]}function g(t,a){for(var r=l(a),e=0;e<r.length;e++)n.hasOwnProperty(r[e])||t.push(r[e])}function k(t,a){var n=[a?a.trim():""];if(t)for(var r=(new Date).getTime(),e=0;e<t.length;e++){var o=t[e],s=o.timestamp,_="____________________Elapsed ".concat(r-s.getTime()," ms; At: ").concat(s);_=_.replace(/[^\w\d]/g,"_"),n.push(i.replace(c,_)),g(n,o.error),r=s.getTime()}return n.join("\n")}function T(){return Error.stackTraceLimit>0}function d(t,a){a>0&&(t.push(l((new o).error)),d(t,a-1))}a.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var n=t[a.__symbol__("currentTaskTrace")];return n?k(n,t.stack):t.stack}},onScheduleTask:function(t,n,e,c){if(T()){var i=a.currentTask,s=i&&i.data&&i.data[r]||[];(s=[new o].concat(s)).length>this.longStackTraceLimit&&(s.length=this.longStackTraceLimit),c.data||(c.data={}),"eventTask"===c.type&&(c.data=__assign({},c.data)),c.data[r]=s}return t.scheduleTask(e,c)},onHandleError:function(t,n,e,c){if(T()){var i=a.currentTask||c.task;if(c instanceof Error&&i){var o=k(i.data&&i.data[r],c.stack);try{c.stack=c.longStack=o}catch(t){}}}return t.handleError(e,c)}},function p(){if(T()){var t=[];d(t,2);for(var a=t[0],r=t[1],o=0;o<a.length;o++)if(-1==(_=a[o]).indexOf(e)){var s=_.match(/^\s*at\s+/);if(s){i=s[0]+c+" (http://localhost)";break}}for(o=0;o<a.length;o++){var _;if((_=a[o])!==r[o])break;n[_]=!0}}}()}(Zone)}));

166
node_modules/zone.js/bundles/mocha-patch.umd.js generated vendored Executable file
View File

@@ -0,0 +1,166 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchMocha(Zone) {
Zone.__load_patch('mocha', function (global, Zone) {
var Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
var rootZone = Zone.current;
var syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
var testZone = null;
var suiteZone = rootZone.fork(new ProxyZoneSpec());
var mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it,
};
function modifyArguments(args, syncTest, asyncTest) {
var _loop_1 = function (i) {
var arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = arg.length === 0 ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
return args;
}
function wrapDescribeInZone(args) {
var syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
};
};
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
};
};
var syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
var asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
};
};
var syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
global.xdescribe =
global.suite.skip =
global.describe.skip =
function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
global.it =
global.specify =
global.test =
function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit =
global.xspecify =
global.it.skip =
function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
(function (originalRunTest, originalRun) {
Mocha.Runner.prototype.runTest = function (fn) {
var _this = this;
Zone.current.scheduleMicroTask('mocha.forceTask', function () {
originalRunTest.call(_this, fn);
});
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', function (e) {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', function (test, err) {
var proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
}
catch (error) { }
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
}
patchMocha(Zone);
}));

6
node_modules/zone.js/bundles/mocha-patch.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(t){t.__load_patch("mocha",(function(n,t){var e=n.Mocha;if(void 0!==e){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var o,u,c=t.current,f=c.fork(new i("Mocha.describe")),s=null,a=c.fork(new r),p={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};n.describe=n.suite=function(){return p.describe.apply(this,y(arguments))},n.xdescribe=n.suite.skip=n.describe.skip=function(){return p.describe.skip.apply(this,y(arguments))},n.describe.only=n.suite.only=function(){return p.describe.only.apply(this,y(arguments))},n.it=n.specify=n.test=function(){return p.it.apply(this,l(arguments))},n.xit=n.xspecify=n.it.skip=function(){return p.it.skip.apply(this,l(arguments))},n.it.only=n.test.only=function(){return p.it.only.apply(this,l(arguments))},n.after=n.suiteTeardown=function(){return p.after.apply(this,d(arguments))},n.afterEach=n.teardown=function(){return p.afterEach.apply(this,l(arguments))},n.before=n.suiteSetup=function(){return p.before.apply(this,d(arguments))},n.beforeEach=n.setup=function(){return p.beforeEach.apply(this,l(arguments))},o=e.Runner.prototype.runTest,u=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){o.call(e,n)}))},e.Runner.prototype.run=function(n){return this.on("test",(function(n){s=c.fork(new r)})),this.on("fail",(function(n,t){var e=s&&s.get("ProxyZoneSpec");if(e&&t)try{t.message+=e.getAndClearPendingTasksInfo()}catch(n){}})),u.call(this,n)}}function h(n,t,e){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?t(i):e(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function y(n){return h(n,(function(n){return function(){return f.run(n,this,arguments)}}))}function l(n){return h(n,(function(n){return function(){return s.run(n,this)}}),(function(n){return function(t){return s.run(n,this,[t])}}))}function d(n){return h(n,(function(n){return function(){return a.run(n,this)}}),(function(n){return function(t){return a.run(n,this,[t])}}))}}))}(Zone)}));

184
node_modules/zone.js/bundles/proxy.umd.js generated vendored Executable file
View File

@@ -0,0 +1,184 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var ProxyZoneSpec = /** @class */ (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
this.name = 'ProxyZone';
this._delegateSpec = null;
this.properties = { 'ProxyZoneSpec': this };
this.propertyKeys = null;
this.lastTaskState = null;
this.isNeedToTriggerHasTask = false;
this.tasks = [];
this.defaultSpecDelegate = defaultSpecDelegate;
this.setDelegate(defaultSpecDelegate);
}
ProxyZoneSpec.get = function () {
return Zone.current.get('ProxyZoneSpec');
};
ProxyZoneSpec.isLoaded = function () {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
};
ProxyZoneSpec.assertPresent = function () {
var spec = ProxyZoneSpec.get();
if (spec === undefined) {
throw new Error("Expected to be running in 'ProxyZone', but it was not found.");
}
return spec;
};
ProxyZoneSpec.prototype.setDelegate = function (delegateSpec) {
var _this = this;
var isNewDelegate = this._delegateSpec !== delegateSpec;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach(function (key) { return delete _this.properties[key]; });
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach(function (k) { return (_this.properties[k] = delegateSpec.properties[k]); });
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
this.getDelegate();
this.setDelegate(this.defaultSpecDelegate);
};
ProxyZoneSpec.prototype.tryTriggerHasTask = function (parentZoneDelegate, currentZone, targetZone) {
if (this.isNeedToTriggerHasTask && this.lastTaskState) {
// last delegateSpec has microTask or macroTask
// should call onHasTask in current delegateSpec
this.isNeedToTriggerHasTask = false;
this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
}
};
ProxyZoneSpec.prototype.removeFromTasks = function (task) {
if (!this.tasks) {
return;
}
for (var i = 0; i < this.tasks.length; i++) {
if (this.tasks[i] === task) {
this.tasks.splice(i, 1);
return;
}
}
};
ProxyZoneSpec.prototype.getAndClearPendingTasksInfo = function () {
if (this.tasks.length === 0) {
return '';
}
var taskInfo = this.tasks.map(function (task) {
var dataInfo = task.data &&
Object.keys(task.data)
.map(function (key) {
return key + ':' + task.data[key];
})
.join(',');
return "type: ".concat(task.type, ", source: ").concat(task.source, ", args: {").concat(dataInfo, "}");
});
var pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';
// clear tasks
this.tasks = [];
return pendingTasksInfo;
};
ProxyZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
};
ProxyZoneSpec.prototype.onIntercept = function (parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
};
ProxyZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
};
ProxyZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
};
ProxyZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.tasks.push(task);
}
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvokeTask) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
};
ProxyZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
this.lastTaskState = hasTaskState;
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
};
return ProxyZoneSpec;
}());
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
}));

6
node_modules/zone.js/bundles/proxy.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.defaultSpecDelegate=e,this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){var t=e.get();if(void 0===t)throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return t},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,r,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,r,o):e.invoke(s,n,a,r,o)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,r){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,r):e.invokeTask(s,n,a,r)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();!function t(s){s.ProxyZoneSpec=e}(Zone)}));

36
node_modules/zone.js/bundles/sync-test.umd.js generated vendored Executable file
View File

@@ -0,0 +1,36 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchSyncTest(Zone) {
var SyncTestZoneSpec = /** @class */ (function () {
function SyncTestZoneSpec(namePrefix) {
this.runZone = Zone.current;
this.name = 'syncTestZone for ' + namePrefix;
}
SyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error("Cannot call ".concat(task.source, " from within a sync test (").concat(this.name, ")."));
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
};
return SyncTestZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
}
patchSyncTest(Zone);
}));

6
node_modules/zone.js/bundles/sync-test.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(e){var t=function(){function n(n){this.runZone=e.current,this.name="syncTestZone for "+n}return n.prototype.onScheduleTask=function(n,e,t,c){switch(c.type){case"microTask":case"macroTask":throw new Error("Cannot call ".concat(c.source," from within a sync test (").concat(this.name,")."));case"eventTask":c=n.scheduleTask(t,c)}return c},n}();e.SyncTestZoneSpec=t}(Zone)}));

82
node_modules/zone.js/bundles/task-tracking.umd.js generated vendored Executable file
View File

@@ -0,0 +1,82 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* A `TaskTrackingZoneSpec` allows one to track all outstanding Tasks.
*
* This is useful in tests. For example to see which tasks are preventing a test from completing
* or an automated way of releasing all of the event listeners at the end of the test.
*/
var TaskTrackingZoneSpec = /** @class */ (function () {
function TaskTrackingZoneSpec() {
this.name = 'TaskTrackingZone';
this.microTasks = [];
this.macroTasks = [];
this.eventTasks = [];
this.properties = { 'TaskTrackingZone': this };
}
TaskTrackingZoneSpec.get = function () {
return Zone.current.get('TaskTrackingZone');
};
TaskTrackingZoneSpec.prototype.getTasksFor = function (type) {
switch (type) {
case 'microTask':
return this.microTasks;
case 'macroTask':
return this.macroTasks;
case 'eventTask':
return this.eventTasks;
}
throw new Error('Unknown task format: ' + type);
};
TaskTrackingZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
task['creationLocation'] = new Error("Task '".concat(task.type, "' from '").concat(task.source, "'."));
var tasks = this.getTasksFor(task.type);
tasks.push(task);
return parentZoneDelegate.scheduleTask(targetZone, task);
};
TaskTrackingZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var tasks = this.getTasksFor(task.type);
for (var i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.cancelTask(targetZone, task);
};
TaskTrackingZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
var _a;
if (task.type === 'eventTask' || ((_a = task.data) === null || _a === void 0 ? void 0 : _a.isPeriodic))
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
var tasks = this.getTasksFor(task.type);
for (var i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
};
TaskTrackingZoneSpec.prototype.clearEvents = function () {
while (this.eventTasks.length) {
Zone.current.cancelTask(this.eventTasks[0]);
}
};
return TaskTrackingZoneSpec;
}());
function patchTaskTracking(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}
patchTaskTracking(Zone);
}));

6
node_modules/zone.js/bundles/task-tracking.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(){this.name="TaskTrackingZone",this.microTasks=[],this.macroTasks=[],this.eventTasks=[],this.properties={TaskTrackingZone:this}}return e.get=function(){return Zone.current.get("TaskTrackingZone")},e.prototype.getTasksFor=function(e){switch(e){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+e)},e.prototype.onScheduleTask=function(e,t,n,s){return s.creationLocation=new Error("Task '".concat(s.type,"' from '").concat(s.source,"'.")),this.getTasksFor(s.type).push(s),e.scheduleTask(n,s)},e.prototype.onCancelTask=function(e,t,n,s){for(var r=this.getTasksFor(s.type),o=0;o<r.length;o++)if(r[o]==s){r.splice(o,1);break}return e.cancelTask(n,s)},e.prototype.onInvokeTask=function(e,t,n,s,r,o){var a;if("eventTask"===s.type||(null===(a=s.data)||void 0===a?void 0:a.isPeriodic))return e.invokeTask(n,s,r,o);for(var i=this.getTasksFor(s.type),c=0;c<i.length;c++)if(i[c]==s){i.splice(c,1);break}return e.invokeTask(n,s,r,o)},e.prototype.clearEvents=function(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])},e}();!function t(n){n.TaskTrackingZoneSpec=e}(Zone)}));

76
node_modules/zone.js/bundles/webapis-media-query.umd.js generated vendored Executable file
View File

@@ -0,0 +1,76 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchMediaQuery(Zone) {
Zone.__load_patch('mediaQuery', function (global, Zone, api) {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}; });
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
var wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
else {
return delegate.apply(self, args);
}
}; });
}
if (global['MediaQueryList']) {
var proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', function (delegate) { return function (self, args) {
var mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
var proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
}; });
}
});
}
patchMediaQuery(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("mediaQuery",(function(e,t,n){function r(e){n.patchMethod(e,"addListener",(function(e){return function(r,a){var i=a.length>0?a[0]:null;if("function"==typeof i){var u=t.current.wrap(i,"MediaQuery");return i[n.symbol("mediaQueryCallback")]=u,e.call(r,u)}return e.apply(r,a)}}))}function a(e){n.patchMethod(e,"removeListener",(function(e){return function(t,r){var a=r.length>0?r[0]:null;if("function"==typeof a){var i=a[n.symbol("mediaQueryCallback")];return i?e.call(t,i):e.apply(t,r)}return e.apply(t,r)}}))}if(e.MediaQueryList){var i=e.MediaQueryList.prototype;r(i),a(i)}else e.matchMedia&&n.patchMethod(e,"matchMedia",(function(e){return function(t,n){var i=e.apply(t,n);if(i){var u=Object.getPrototypeOf(i);u&&u.addListener?(r(u),a(u),r(i),a(i)):i.addListener&&(r(i),a(i))}return i}}))}))}(Zone)}));

26
node_modules/zone.js/bundles/webapis-notification.umd.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchNotifications(Zone) {
Zone.__load_patch('notification', function (global, Zone, api) {
var Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
var desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
}
patchNotifications(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(o){o.__load_patch("notification",(function(t,o,n){var e=t.Notification;if(e&&e.prototype){var i=Object.getOwnPropertyDescriptor(e.prototype,"onerror");i&&i.configurable&&n.patchOnProperties(e.prototype,null)}}))}(Zone)}));

View File

@@ -0,0 +1,30 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchRtcPeerConnection(Zone) {
Zone.__load_patch('RTCPeerConnection', function (global, Zone, api) {
var RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
var addSymbol = api.symbol('addEventListener');
var removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
}
patchRtcPeerConnection(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("RTCPeerConnection",(function(e,t,n){var o=e.RTCPeerConnection;if(o){var r=n.symbol("addEventListener"),p=n.symbol("removeEventListener");o.prototype.addEventListener=o.prototype[r],o.prototype.removeEventListener=o.prototype[p],o.prototype[r]=null,o.prototype[p]=null,n.patchEventTarget(e,n,[o.prototype],{useG:!1})}}))}(Zone)}));

39
node_modules/zone.js/bundles/webapis-shadydom.umd.js generated vendored Executable file
View File

@@ -0,0 +1,39 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchShadyDom(Zone) {
Zone.__load_patch('shadydom', function (global, Zone, api) {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
var HTMLSlotElement = global.HTMLSlotElement;
var prototypes = [
Object.getPrototypeOf(window),
Node.prototype,
Text.prototype,
Element.prototype,
HTMLElement.prototype,
HTMLSlotElement && HTMLSlotElement.prototype,
DocumentFragment.prototype,
Document.prototype,
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
});
});
}
patchShadyDom(Zone);
}));

6
node_modules/zone.js/bundles/webapis-shadydom.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(e){e.__load_patch("shadydom",(function(t,e,o){var n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}))}(Zone)}));

123
node_modules/zone.js/bundles/wtf.umd.js generated vendored Executable file
View File

@@ -0,0 +1,123 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {missingRequire}
*/
var _global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || global;
function patchWtf(Zone) {
// Detect and setup WTF.
var wtfTrace = null;
var wtfEvents = null;
var wtfEnabled = (function () {
var wtf = _global['wtf'];
if (wtf) {
wtfTrace = wtf.trace;
if (wtfTrace) {
wtfEvents = wtfTrace.events;
return true;
}
}
return false;
})();
var WtfZoneSpec = /** @class */ (function () {
function WtfZoneSpec() {
this.name = 'WTF';
}
WtfZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
var retValue = parentZoneDelegate.fork(targetZone, zoneSpec);
WtfZoneSpec.forkInstance(zonePathName(targetZone), retValue.name);
return retValue;
};
WtfZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
var src = source || 'unknown';
var scope = WtfZoneSpec.invokeScope[src];
if (!scope) {
scope = WtfZoneSpec.invokeScope[src] = wtfEvents.createScope("Zone:invoke:".concat(source, "(ascii zone)"));
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));
};
WtfZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
return parentZoneDelegate.handleError(targetZone, error);
};
WtfZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var key = task.type + ':' + task.source;
var instance = WtfZoneSpec.scheduleInstance[key];
if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key] = wtfEvents.createInstance("Zone:schedule:".concat(key, "(ascii zone, any data)"));
}
var retValue = parentZoneDelegate.scheduleTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
WtfZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
var source = task.source;
var scope = WtfZoneSpec.invokeTaskScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source] = wtfEvents.createScope("Zone:invokeTask:".concat(source, "(ascii zone)"));
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));
};
WtfZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var key = task.source;
var instance = WtfZoneSpec.cancelInstance[key];
if (!instance) {
instance = WtfZoneSpec.cancelInstance[key] = wtfEvents.createInstance("Zone:cancel:".concat(key, "(ascii zone, any options)"));
}
var retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
};
WtfZoneSpec.forkInstance = wtfEnabled
? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)')
: null;
WtfZoneSpec.scheduleInstance = {};
WtfZoneSpec.cancelInstance = {};
WtfZoneSpec.invokeScope = {};
WtfZoneSpec.invokeTaskScope = {};
return WtfZoneSpec;
}());
function shallowObj(obj, depth) {
if (!obj || !depth)
return null;
var out = {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
// explicit : any due to https://github.com/microsoft/TypeScript/issues/33191
var value = obj[key];
switch (typeof value) {
case 'object':
var name_1 = value && value.constructor && value.constructor.name;
value = name_1 == Object.name ? shallowObj(value, depth - 1) : name_1;
break;
case 'function':
value = value.name || undefined;
break;
}
out[key] = value;
}
}
return out;
}
function zonePathName(zone) {
var name = zone.name;
var localZone = zone.parent;
while (localZone != null) {
name = localZone.name + '::' + name;
localZone = localZone.parent;
}
return name;
}
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
}
patchWtf(Zone);
}));

6
node_modules/zone.js/bundles/wtf.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){var n="object"==typeof window&&window||"object"==typeof self&&self||global;!function e(o){var c,t=null,a=null,r=!(!(c=n.wtf)||!(t=c.trace)||(a=t.events,0)),i=function(){function n(){this.name="WTF"}return n.prototype.onFork=function(e,o,c,t){var a=e.fork(c,t);return n.forkInstance(u(c),a.name),a},n.prototype.onInvoke=function(e,o,c,r,i,s,f){var l=f||"unknown",p=n.invokeScope[l];return p||(p=n.invokeScope[l]=a.createScope("Zone:invoke:".concat(f,"(ascii zone)"))),t.leaveScope(p(u(c)),e.invoke(c,r,i,s,f))},n.prototype.onHandleError=function(n,e,o,c){return n.handleError(o,c)},n.prototype.onScheduleTask=function(e,o,c,t){var r=t.type+":"+t.source,i=n.scheduleInstance[r];i||(i=n.scheduleInstance[r]=a.createInstance("Zone:schedule:".concat(r,"(ascii zone, any data)")));var f=e.scheduleTask(c,t);return i(u(c),s(t.data,2)),f},n.prototype.onInvokeTask=function(e,o,c,r,i,s){var f=r.source,l=n.invokeTaskScope[f];return l||(l=n.invokeTaskScope[f]=a.createScope("Zone:invokeTask:".concat(f,"(ascii zone)"))),t.leaveScope(l(u(c)),e.invokeTask(c,r,i,s))},n.prototype.onCancelTask=function(e,o,c,t){var r=t.source,i=n.cancelInstance[r];i||(i=n.cancelInstance[r]=a.createInstance("Zone:cancel:".concat(r,"(ascii zone, any options)")));var f=e.cancelTask(c,t);return i(u(c),s(t.data,2)),f},n.forkInstance=r?a.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,n.scheduleInstance={},n.cancelInstance={},n.invokeScope={},n.invokeTaskScope={},n}();function s(n,e){if(!n||!e)return null;var o={};for(var c in n)if(n.hasOwnProperty(c)){var t=n[c];switch(typeof t){case"object":var a=t&&t.constructor&&t.constructor.name;t=a==Object.name?s(t,e-1):a;break;case"function":t=t.name||void 0}o[c]=t}return o}function u(n){for(var e=n.name,o=n.parent;null!=o;)e=o.name+"::"+e,o=o.parent;return e}o.wtfZoneSpec=r?new i:null}(Zone)}));

95
node_modules/zone.js/bundles/zone-bluebird.umd.js generated vendored Executable file
View File

@@ -0,0 +1,95 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchBluebird(Zone) {
Zone.__load_patch('bluebird', function (global, Zone, api) {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
var BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
var bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach(function (bapi) {
api.patchMethod(Bluebird.prototype, bapi, function (delegate) { return function (self, args) {
var zone = Zone.current;
var _loop_1 = function (i) {
var func = args[i];
if (typeof func === 'function') {
args[i] = function () {
var argSelf = this;
var argArgs = arguments;
return new Bluebird(function (res, rej) {
zone.scheduleMicroTask('Promise.then', function () {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
});
});
};
}
};
for (var i = 0; i < args.length; i++) {
_loop_1(i);
}
return delegate.apply(self, args);
}; });
});
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
var error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
}
}
});
}
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', function (reason, p) {
if (reason && reason.isHandledByZone) {
var listeners_1 = process.listeners('unhandledRejection');
if (listeners_1) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(function () {
listeners_1.forEach(function (listener) { return process.on('unhandledRejection', listener); });
});
}
}
});
}
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(function () {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
// override global promise
global.Promise = Bluebird;
};
});
}
patchBluebird(Zone);
}));

6
node_modules/zone.js/bundles/zone-bluebird.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(e){e.__load_patch("bluebird",(function(n,e,o){e[e.__symbol__("bluebird")]=function t(i){["then","spread","finally"].forEach((function(n){o.patchMethod(i.prototype,n,(function(n){return function(o,t){for(var r=e.current,c=function(n){var e=t[n];"function"==typeof e&&(t[n]=function(){var n=this,o=arguments;return new i((function(t,i){r.scheduleMicroTask("Promise.then",(function(){try{t(e.apply(n,o))}catch(n){i(n)}}))}))})},d=0;d<t.length;d++)c(d);return n.apply(o,t)}}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(n){var e=n.detail&&n.detail.reason;e&&e.isHandledByZone&&(n.preventDefault(),"function"==typeof n.stopImmediatePropagation&&n.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",(function(n,e){if(n&&n.isHandledByZone){var o=process.listeners("unhandledRejection");o&&(process.removeAllListeners("unhandledRejection"),process.nextTick((function(){o.forEach((function(n){return process.on("unhandledRejection",n)}))})))}})),i.onPossiblyUnhandledRejection((function(n,t){try{e.current.runGuarded((function(){throw n.isHandledByZone=!0,n}))}catch(n){n.isHandledByZone=!1,o.onUnhandledError(n)}})),n.Promise=i}}))}(Zone)}));

346
node_modules/zone.js/bundles/zone-error.umd.js generated vendored Executable file
View File

@@ -0,0 +1,346 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {globalThis,undefinedVars}
*/
function patchError(Zone) {
Zone.__load_patch('Error', function (global, Zone, api) {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
var zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
var NativeError = (global[api.symbol('Error')] = global['Error']);
// Store the frames which should be removed from the stack frames
var zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
var zoneAwareFrame1;
var zoneAwareFrame2;
var zoneAwareFrame1WithoutNew;
var zoneAwareFrame2WithoutNew;
var zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
var stackRewrite = 'stackRewrite';
var zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] ||
'default';
function buildZoneFrameNames(zoneFrame) {
var zoneFrameName = { zoneName: zoneFrame.zone.name };
var result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
var parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame) {
if (isZoneFrame === void 0) { isZoneFrame = true; }
var frames = originalStack.split('\n');
var i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 ||
frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew ||
frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
for (; i < frames.length && zoneFrame; i++) {
var frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame
? " [".concat(zoneFrame.zone.name, "]")
: " [".concat(zoneFrame.zoneName, "]");
}
}
}
return frames.join('\n');
}
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
var _this = this;
// We always have to return native error otherwise the browser console will not work.
var error = NativeError.apply(this, arguments);
// Save original stack trace
var originalStack = (error['originalStack'] = error.stack);
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
var zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
}
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error)
.concat('stack', 'message', 'cause')
.forEach(function (key) {
var value = error[key];
if (value !== undefined) {
try {
_this[key] = value;
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
}
}
});
return this;
}
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
var zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
},
});
}
// those properties need special handling
var specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
var nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach(function (prop) {
if (specialPropertyNames.filter(function (sp) { return sp === prop; }).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
},
});
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
get: function () {
return NativeError.stackTraceLimit;
},
set: function (value) {
return (NativeError.stackTraceLimit = value);
},
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
},
});
}
var ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.prepareStackTrace;
},
set: function (value) {
if (!value || typeof value !== 'function') {
return (NativeError.prepareStackTrace = value);
}
return (NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (var i = 0; i < structuredStackTrace.length; i++) {
var st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
}
}
}
return value.call(this, error, structuredStackTrace);
});
},
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
var detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
var frames_1 = error.originalStack.split(/\n/);
var runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames_1.length) {
var frame = frames_1.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
var fnName = frame.split('(')[0].split('@')[0];
var frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew = frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
}
}
return false;
},
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
var childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
},
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
var originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(function () {
childDetectZone.runGuarded(function () {
var fakeTransitionTo = function () { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, function () {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw new Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, function () {
throw Error();
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, function () { });
}, undefined, function (t) {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, function () { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
}
patchError(Zone);
}));

6
node_modules/zone.js/bundles/zone-error.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(r){"function"==typeof define&&define.amd?define(r):r()}((function(){!function r(e){e.__load_patch("Error",(function(r,e,n){var t,a,o,i,c,s=n.symbol("zoneJsInternalStackFrames"),u=r[n.symbol("Error")]=r.Error,f={};r.Error=d;var k="stackRewrite",l=r.__Zone_Error_BlacklistedStackFrames_policy||r.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(r,e,n){void 0===n&&(n=!0);for(var s=r.split("\n"),u=0;s[u]!==t&&s[u]!==a&&s[u]!==o&&s[u]!==i&&s[u]!==c&&u<s.length;)u++;for(;u<s.length&&e;u++){var k=s[u];if(k.trim())switch(f[k]){case 0:s.splice(u,1),u--;break;case 1:e=e.parent?e.parent:null,s.splice(u,1),u--;break;default:s[u]+=" [".concat(n?e.zone.name:e.zoneName,"]")}}return s.join("\n")}function d(){var r=this,e=u.apply(this,arguments),t=e.originalStack=e.stack;if(d[k]&&t){var a=n.currentZoneFrame();if("lazy"===l)e[n.symbol("zoneFrameNames")]=function r(e){for(var n={zoneName:e.zone.name},t=n;e.parent;){var a={zoneName:(e=e.parent).zone.name};n.parent=a,n=a}return t}(a);else if("default"===l)try{e.stack=e.zoneAwareStack=p(t,a)}catch(r){}}return this instanceof u&&this.constructor!=u?(Object.keys(e).concat("stack","message","cause").forEach((function(n){var t=e[n];if(void 0!==t)try{r[n]=t}catch(r){}})),this):e}d.prototype=u.prototype,d[s]=f,d[k]=!1;var m=n.symbol("zoneAwareStack");"lazy"===l&&Object.defineProperty(d.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)),this[m]},set:function(r){this.originalStack=r,this[m]=p(this.originalStack,this[n.symbol("zoneFrameNames")],!1)}});var h=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(u);if(T&&T.forEach((function(r){0===h.filter((function(e){return e===r})).length&&Object.defineProperty(d,r,{get:function(){return u[r]},set:function(e){u[r]=e}})})),u.hasOwnProperty("stackTraceLimit")&&(u.stackTraceLimit=Math.max(u.stackTraceLimit,15),Object.defineProperty(d,"stackTraceLimit",{get:function(){return u.stackTraceLimit},set:function(r){return u.stackTraceLimit=r}})),u.hasOwnProperty("captureStackTrace")&&Object.defineProperty(d,"captureStackTrace",{value:function r(e,n){u.captureStackTrace(e,n)}}),Object.defineProperty(d,"prepareStackTrace",{get:function(){return u.prepareStackTrace},set:function(r){return u.prepareStackTrace=r&&"function"==typeof r?function(e,n){if(n)for(var t=0;t<n.length;t++)if("zoneCaptureStackTrace"===n[t].getFunctionName()){n.splice(t,1);break}return r.call(this,e,n)}:r}}),"disable"!==l){var v=e.current.fork({name:"detect",onHandleError:function(r,e,n,s){if(s.originalStack&&Error===d)for(var u=s.originalStack.split(/\n/),l=!1,p=!1,m=!1;u.length;){var h=u.shift();if(/:\d+:\d+/.test(h)||"ZoneAwareError"===h){var T=h.split("(")[0].split("@")[0],v=1;if(-1!==T.indexOf("ZoneAwareError")&&(-1!==T.indexOf("new ZoneAwareError")?(t=h,a=h.replace("new ZoneAwareError","new Error.ZoneAwareError")):(o=h,i=h.replace("Error.",""),-1===h.indexOf("Error.ZoneAwareError")&&(c=h.replace("ZoneAwareError","Error.ZoneAwareError"))),f[a]=0),-1!==T.indexOf("runGuarded")?p=!0:-1!==T.indexOf("runTask")?m=!0:-1!==T.indexOf("run")?l=!0:v=0,f[h]=v,l&&p&&m){d[k]=!0;break}}}return!1}}).fork({name:"child",onScheduleTask:function(r,e,n,t){return r.scheduleTask(n,t)},onInvokeTask:function(r,e,n,t,a,o){return r.invokeTask(n,t,a,o)},onCancelTask:function(r,e,n,t){return r.cancelTask(n,t)},onInvoke:function(r,e,n,t,a,o,i){return r.invoke(n,t,a,o,i)}}),E=Error.stackTraceLimit;Error.stackTraceLimit=100,v.run((function(){v.runGuarded((function(){var r=function(){};v.scheduleEventTask(s,(function(){v.scheduleMacroTask(s,(function(){v.scheduleMicroTask(s,(function(){throw new Error}),void 0,(function(e){e._transitionTo=r,e.invoke()})),v.scheduleMicroTask(s,(function(){throw Error()}),void 0,(function(e){e._transitionTo=r,e.invoke()}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}),void 0,(function(e){e._transitionTo=r,e.invoke()}),(function(){}))}))})),Error.stackTraceLimit=E}}))}(Zone)}));

706
node_modules/zone.js/bundles/zone-legacy.umd.js generated vendored Executable file
View File

@@ -0,0 +1,706 @@
'use strict';
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/*
* This is necessary for Chrome and Chrome mobile, to enable
* things like redefining `createdCallback` on an element.
*/
var zoneSymbol;
var _defineProperty;
var _getOwnPropertyDescriptor;
var _create;
var unconfigurablesKey;
function propertyPatch() {
zoneSymbol = Zone.__symbol__;
_defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;
_getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =
Object.getOwnPropertyDescriptor;
_create = Object.create;
unconfigurablesKey = zoneSymbol('unconfigurables');
Object.defineProperty = function (obj, prop, desc) {
if (isUnconfigurable(obj, prop)) {
throw new TypeError("Cannot assign to read only property '" + prop + "' of " + obj);
}
var originalConfigurableFlag = desc.configurable;
if (prop !== 'prototype') {
desc = rewriteDescriptor(obj, prop, desc);
}
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
};
Object.defineProperties = function (obj, props) {
Object.keys(props).forEach(function (prop) {
Object.defineProperty(obj, prop, props[prop]);
});
for (var _i = 0, _a = Object.getOwnPropertySymbols(props); _i < _a.length; _i++) {
var sym = _a[_i];
var desc = Object.getOwnPropertyDescriptor(props, sym);
// Since `Object.getOwnPropertySymbols` returns *all* symbols,
// including non-enumerable ones, retrieve property descriptor and check
// enumerability there. Proceed with the rewrite only when a property is
// enumerable to make the logic consistent with the way regular
// properties are retrieved (via `Object.keys`, which respects
// `enumerable: false` flag). More information:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties#retrieval
if (desc === null || desc === void 0 ? void 0 : desc.enumerable) {
Object.defineProperty(obj, sym, props[sym]);
}
}
return obj;
};
Object.create = function (proto, propertiesObject) {
if (typeof propertiesObject === 'object' && !Object.isFrozen(propertiesObject)) {
Object.keys(propertiesObject).forEach(function (prop) {
propertiesObject[prop] = rewriteDescriptor(proto, prop, propertiesObject[prop]);
});
}
return _create(proto, propertiesObject);
};
Object.getOwnPropertyDescriptor = function (obj, prop) {
var desc = _getOwnPropertyDescriptor(obj, prop);
if (desc && isUnconfigurable(obj, prop)) {
desc.configurable = false;
}
return desc;
};
}
function _redefineProperty(obj, prop, desc) {
var originalConfigurableFlag = desc.configurable;
desc = rewriteDescriptor(obj, prop, desc);
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
}
function isUnconfigurable(obj, prop) {
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}
function rewriteDescriptor(obj, prop, desc) {
// issue-927, if the desc is frozen, don't try to change the desc
if (!Object.isFrozen(desc)) {
desc.configurable = true;
}
if (!desc.configurable) {
// issue-927, if the obj is frozen, don't try to set the desc to obj
if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
}
if (obj[unconfigurablesKey]) {
obj[unconfigurablesKey][prop] = true;
}
}
return desc;
}
function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
if (desc.configurable) {
// In case of errors, when the configurable flag was likely set by rewriteDescriptor(),
// let's retry with the original flag value
if (typeof originalConfigurableFlag == 'undefined') {
delete desc.configurable;
}
else {
desc.configurable = originalConfigurableFlag;
}
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
var swallowError = false;
if (prop === 'createdCallback' ||
prop === 'attachedCallback' ||
prop === 'detachedCallback' ||
prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch
// this is the work around since some applications
// fail if we throw the error
swallowError = true;
}
if (!swallowError) {
throw error;
}
// TODO: @JiaLiPassion, Some application such as `registerElement` patch
// still need to swallow the error, in the future after these applications
// are updated, the following logic can be removed.
var descJson = null;
try {
descJson = JSON.stringify(desc);
}
catch (error) {
descJson = desc.toString();
}
console.log("Attempting to configure '".concat(prop, "' with descriptor '").concat(descJson, "' on object '").concat(obj, "' and got error, giving up: ").concat(error));
}
}
else {
throw error;
}
}
}
function eventTargetLegacyPatch(_global, api) {
var _a = api.getGlobalObjects(), eventNames = _a.eventNames, globalSources = _a.globalSources, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;
var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'.split(',');
var EVENT_TARGET = 'EventTarget';
var apis = [];
var isWtf = _global['wtf'];
var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
if (isWtf) {
// Workaround for: https://github.com/google/tracing-framework/issues/555
apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
}
else if (_global[EVENT_TARGET]) {
apis.push(EVENT_TARGET);
}
else {
// Note: EventTarget is not available in all browsers,
// if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
apis = NO_EVENT_TARGET;
}
var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
var ieOrEdge = api.isIEOrEdge();
var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
var FUNCTION_WRAPPER = '[object FunctionWrapper]';
var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
var pointerEventsMap = {
'MSPointerCancel': 'pointercancel',
'MSPointerDown': 'pointerdown',
'MSPointerEnter': 'pointerenter',
'MSPointerHover': 'pointerhover',
'MSPointerLeave': 'pointerleave',
'MSPointerMove': 'pointermove',
'MSPointerOut': 'pointerout',
'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup',
};
// predefine all __zone_symbol__ + eventName + true/false string
for (var i = 0; i < eventNames.length; i++) {
var eventName = eventNames[i];
var falseEventName = eventName + FALSE_STR;
var trueEventName = eventName + TRUE_STR;
var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames[eventName] = {};
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
}
// predefine all task.source string
for (var i = 0; i < WTF_ISSUE_555_ARRAY.length; i++) {
var target = WTF_ISSUE_555_ARRAY[i];
var targets = (globalSources[target] = {});
for (var j = 0; j < eventNames.length; j++) {
var eventName = eventNames[j];
targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
}
}
var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
if (!isDisableIECheck && ieOrEdge) {
if (isEnableCrossContextCheck) {
try {
var testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
else {
var testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
}
}
else if (isEnableCrossContextCheck) {
try {
delegate.toString();
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
return true;
};
var apiTypes = [];
for (var i = 0; i < apis.length; i++) {
var type = _global[apis[i]];
apiTypes.push(type && type.prototype);
}
// vh is validateHandler to check event handler
// is valid or not(for security check)
api.patchEventTarget(_global, api, apiTypes, {
vh: checkIEAndCrossContext,
transferEventName: function (eventName) {
var pointerEventName = pointerEventsMap[eventName];
return pointerEventName || eventName;
},
});
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
// we have to patch the instance since the proto is non-configurable
function apply(api, _global) {
var _a = api.getGlobalObjects(), ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR;
var WS = _global.WebSocket;
// On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
// On older Chrome, no need since EventTarget was already patched
if (!_global.EventTarget) {
api.patchEventTarget(_global, api, [WS.prototype]);
}
_global.WebSocket = function (x, y) {
var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
var proxySocket;
var proxySocketProto;
// Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
if (onmessageDesc && onmessageDesc.configurable === false) {
proxySocket = api.ObjectCreate(socket);
// socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
// but proxySocket not, so we will keep socket as prototype and pass it to
// patchOnProperties method
proxySocketProto = socket;
[ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
proxySocket[propName] = function () {
var args = api.ArraySlice.call(arguments);
if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
var eventName = args.length > 0 ? args[0] : undefined;
if (eventName) {
var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
socket[propertySymbol] = proxySocket[propertySymbol];
}
}
return socket[propName].apply(socket, args);
};
});
}
else {
// we can patch the real socket
proxySocket = socket;
}
api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
return proxySocket;
};
var globalWebSocket = _global['WebSocket'];
for (var prop in WS) {
globalWebSocket[prop] = WS[prop];
}
}
/**
* @fileoverview
* @suppress {globalThis}
*/
function propertyDescriptorLegacyPatch(api, _global) {
var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix;
if (isNode && !isMix) {
return;
}
if (!canPatchViaPropertyDescriptor(api, _global)) {
var supportsWebSocket = typeof WebSocket !== 'undefined';
// Safari, Android browsers (Jelly Bean)
patchViaCapturingAllTheEvents(api);
api.patchClass('XMLHttpRequest');
if (supportsWebSocket) {
apply(api, _global);
}
Zone[api.symbol('patchEvents')] = true;
}
}
function canPatchViaPropertyDescriptor(api, _global) {
var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;
if ((isBrowser || isMix) &&
!api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
typeof Element !== 'undefined') {
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
// IDL interface attributes are not configurable
var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
if (desc && !desc.configurable)
return false;
// try to use onclick to detect whether we can patch via propertyDescriptor
// because XMLHttpRequest is not available in service worker
if (desc) {
api.ObjectDefineProperty(Element.prototype, 'onclick', {
enumerable: true,
configurable: true,
get: function () {
return true;
},
});
var div = document.createElement('div');
var result = !!div.onclick;
api.ObjectDefineProperty(Element.prototype, 'onclick', desc);
return result;
}
}
var XMLHttpRequest = _global['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
return false;
}
var ON_READY_STATE_CHANGE = 'onreadystatechange';
var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);
// add enumerable and configurable here because in opera
// by default XMLHttpRequest.prototype.onreadystatechange is undefined
// without adding enumerable and configurable will cause onreadystatechange
// non-configurable
// and if XMLHttpRequest.prototype.onreadystatechange is undefined,
// we should set a real desc instead a fake one
if (xhrDesc) {
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return true;
},
});
var req = new XMLHttpRequest();
var result = !!req.onreadystatechange;
// restore original desc
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
return result;
}
else {
var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake');
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];
},
set: function (value) {
this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
},
});
var req = new XMLHttpRequest();
var detectFunc = function () { };
req.onreadystatechange = detectFunc;
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
req.onreadystatechange = null;
return result;
}
}
var globalEventHandlersEventNames = [
'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',
];
var documentEventNames = [
'afterscriptexecute',
'beforescriptexecute',
'DOMContentLoaded',
'freeze',
'fullscreenchange',
'mozfullscreenchange',
'webkitfullscreenchange',
'msfullscreenchange',
'fullscreenerror',
'mozfullscreenerror',
'webkitfullscreenerror',
'msfullscreenerror',
'readystatechange',
'visibilitychange',
'resume',
];
var windowEventNames = [
'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',
'vrdisplayconnected',
'vrdisplaydisconnected',
'vrdisplaypresentchange',
];
var htmlElementEventNames = [
'beforecopy',
'beforecut',
'beforepaste',
'copy',
'cut',
'paste',
'dragstart',
'loadend',
'animationstart',
'search',
'transitionrun',
'transitionstart',
'webkitanimationend',
'webkitanimationiteration',
'webkitanimationstart',
'webkittransitionend',
];
var ieElementEventNames = [
'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',
];
var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
var formEventNames = ['autocomplete', 'autocompleteerror'];
var detailEventNames = ['toggle'];
var eventNames = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], globalEventHandlersEventNames, true), webglEventNames, true), formEventNames, true), detailEventNames, true), documentEventNames, true), windowEventNames, true), htmlElementEventNames, true), ieElementEventNames, true);
// Whenever any eventListener fires, we check the eventListener target and all parents
// for `onwhatever` properties and replace them with zone-bound functions
// - Chrome (for now)
function patchViaCapturingAllTheEvents(api) {
var unboundKey = api.symbol('unbound');
var _loop_1 = function (i) {
var property = eventNames[i];
var onproperty = 'on' + property;
self.addEventListener(property, function (event) {
var elt = event.target, bound, source;
if (elt) {
source = elt.constructor['name'] + '.' + onproperty;
}
else {
source = 'unknown.' + onproperty;
}
while (elt) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = api.wrapWithCurrentZone(elt[onproperty], source);
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;
}
elt = elt.parentElement;
}
}, true);
};
for (var i = 0; i < eventNames.length; i++) {
_loop_1(i);
}
}
function registerElementPatch(_global, api) {
var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;
if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
return;
}
var callbacks = [
'createdCallback',
'attachedCallback',
'detachedCallback',
'attributeChangedCallback',
];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);
}
/**
* @fileoverview
* @suppress {missingRequire}
*/
function patchBrowserLegacy() {
var _global = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};
var symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';
function __symbol__(name) {
return symbolPrefix + name;
}
_global[__symbol__('legacyPatch')] = function () {
var Zone = _global['Zone'];
Zone.__load_patch('defineProperty', function (global, Zone, api) {
api._redefineProperty = _redefineProperty;
propertyPatch();
});
Zone.__load_patch('registerElement', function (global, Zone, api) {
registerElementPatch(global, api);
});
Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) {
eventTargetLegacyPatch(global, api);
propertyDescriptorLegacyPatch(api, global);
});
};
}
patchBrowserLegacy();
}));

6
node_modules/zone.js/bundles/zone-legacy.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

3331
node_modules/zone.js/bundles/zone-mix.umd.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

6
node_modules/zone.js/bundles/zone-mix.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

2721
node_modules/zone.js/bundles/zone-node.umd.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

6
node_modules/zone.js/bundles/zone-node.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

25
node_modules/zone.js/bundles/zone-patch-canvas.umd.js generated vendored Executable file
View File

@@ -0,0 +1,25 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchCanvas(Zone) {
Zone.__load_patch('canvas', function (global, Zone, api) {
var HTMLCanvasElement = global['HTMLCanvasElement'];
if (typeof HTMLCanvasElement !== 'undefined' &&
HTMLCanvasElement.prototype &&
HTMLCanvasElement.prototype.toBlob) {
api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
});
}
});
}
patchCanvas(Zone);
}));

6
node_modules/zone.js/bundles/zone-patch-canvas.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){!function t(n){n.__load_patch("canvas",(function(t,n,o){var e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&o.patchMacroTask(e.prototype,"toBlob",(function(t,n){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:n}}))}))}(Zone)}));

47
node_modules/zone.js/bundles/zone-patch-cordova.umd.js generated vendored Executable file
View File

@@ -0,0 +1,47 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchCordova(Zone) {
Zone.__load_patch('cordova', function (global, Zone, api) {
if (global.cordova) {
var SUCCESS_SOURCE_1 = 'cordova.exec.success';
var ERROR_SOURCE_1 = 'cordova.exec.error';
var FUNCTION_1 = 'function';
var nativeExec_1 = api.patchMethod(global.cordova, 'exec', function () { return function (self, args) {
if (args.length > 0 && typeof args[0] === FUNCTION_1) {
args[0] = Zone.current.wrap(args[0], SUCCESS_SOURCE_1);
}
if (args.length > 1 && typeof args[1] === FUNCTION_1) {
args[1] = Zone.current.wrap(args[1], ERROR_SOURCE_1);
}
return nativeExec_1.apply(self, args);
}; });
}
});
Zone.__load_patch('cordova.FileReader', function (global, Zone) {
if (global.cordova && typeof global['FileReader'] !== 'undefined') {
document.addEventListener('deviceReady', function () {
var FileReader = global['FileReader'];
['abort', 'error', 'load', 'loadstart', 'loadend', 'progress'].forEach(function (prop) {
var eventNameSymbol = Zone.__symbol__('ON_PROPERTY' + prop);
Object.defineProperty(FileReader.prototype, eventNameSymbol, {
configurable: true,
get: function () {
return this._realReader && this._realReader[eventNameSymbol];
},
});
});
});
}
});
}
patchCordova(Zone);
}));

6
node_modules/zone.js/bundles/zone-patch-cordova.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("cordova",(function(e,o,r){if(e.cordova)var n="function",t=r.patchMethod(e.cordova,"exec",(function(){return function(e,r){return r.length>0&&typeof r[0]===n&&(r[0]=o.current.wrap(r[0],"cordova.exec.success")),r.length>1&&typeof r[1]===n&&(r[1]=o.current.wrap(r[1],"cordova.exec.error")),t.apply(e,r)}}))})),o.__load_patch("cordova.FileReader",(function(e,o){e.cordova&&void 0!==e.FileReader&&document.addEventListener("deviceReady",(function(){var r=e.FileReader;["abort","error","load","loadstart","loadend","progress"].forEach((function(e){var n=o.__symbol__("ON_PROPERTY"+e);Object.defineProperty(r.prototype,n,{configurable:!0,get:function(){return this._realReader&&this._realReader[n]}})}))}))}))}(Zone)}));

50
node_modules/zone.js/bundles/zone-patch-electron.umd.js generated vendored Executable file
View File

@@ -0,0 +1,50 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchElectron(Zone) {
Zone.__load_patch('electron', function (global, Zone, api) {
function patchArguments(target, name, source) {
return api.patchMethod(target, name, function (delegate) { return function (self, args) {
return delegate && delegate.apply(self, api.bindArguments(args, source));
}; });
}
var _a = require('electron'), desktopCapturer = _a.desktopCapturer, shell = _a.shell, CallbacksRegistry = _a.CallbacksRegistry, ipcRenderer = _a.ipcRenderer;
if (!CallbacksRegistry) {
try {
// Try to load CallbacksRegistry class from @electron/remote src
// since from electron 14+, the CallbacksRegistry is moved to @electron/remote
// package and not exported to outside, so this is a hack to patch CallbacksRegistry.
CallbacksRegistry =
require('@electron/remote/dist/src/renderer/callbacks-registry').CallbacksRegistry;
}
catch (err) { }
}
// patch api in renderer process directly
// desktopCapturer
if (desktopCapturer) {
patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
}
// shell
if (shell) {
patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
}
// patch api in main process through CallbackRegistry
if (!CallbacksRegistry) {
if (ipcRenderer) {
patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
}
return;
}
patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
});
}
patchElectron(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(r){r.__load_patch("electron",(function(e,r,t){function n(e,r,n){return t.patchMethod(e,r,(function(e){return function(r,c){return e&&e.apply(r,t.bindArguments(c,n))}}))}var c=require("electron"),o=c.desktopCapturer,i=c.shell,a=c.CallbacksRegistry,l=c.ipcRenderer;if(!a)try{a=require("@electron/remote/dist/src/renderer/callbacks-registry").CallbacksRegistry}catch(e){}o&&n(o,"getSources","electron.desktopCapturer.getSources"),i&&n(i,"openExternal","electron.shell.openExternal"),a?n(a.prototype,"add","CallbackRegistry.add"):l&&n(l,"on","ipcRenderer.on")}))}(Zone)}));

107
node_modules/zone.js/bundles/zone-patch-fetch.umd.js generated vendored Executable file
View File

@@ -0,0 +1,107 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
/**
* @fileoverview
* @suppress {missingRequire}
*/
function patchFetch(Zone) {
Zone.__load_patch('fetch', function (global, Zone, api) {
var fetch = global['fetch'];
if (typeof fetch !== 'function') {
return;
}
var originalFetch = global[api.symbol('fetch')];
if (originalFetch) {
// restore unpatched fetch first
fetch = originalFetch;
}
var ZoneAwarePromise = global.Promise;
var symbolThenPatched = api.symbol('thenPatched');
var fetchTaskScheduling = api.symbol('fetchTaskScheduling');
var OriginalResponse = global.Response;
var placeholder = function () { };
var createFetchTask = function (source, data, originalImpl, self, args, ac) { return new Promise(function (resolve, reject) {
var task = Zone.current.scheduleMacroTask(source, placeholder, data, function () {
// The promise object returned by the original implementation passed into the
// function. This might be a `fetch` promise, `Response.prototype.json` promise,
// etc.
var implPromise;
var zone = Zone.current;
try {
zone[fetchTaskScheduling] = true;
implPromise = originalImpl.apply(self, args);
}
catch (error) {
reject(error);
return;
}
finally {
zone[fetchTaskScheduling] = false;
}
if (!(implPromise instanceof ZoneAwarePromise)) {
var ctor = implPromise.constructor;
if (!ctor[symbolThenPatched]) {
api.patchThen(ctor);
}
}
implPromise.then(function (resource) {
if (task.state !== 'notScheduled') {
task.invoke();
}
resolve(resource);
}, function (error) {
if (task.state !== 'notScheduled') {
task.invoke();
}
reject(error);
});
}, function () {
ac === null || ac === void 0 ? void 0 : ac.abort();
});
}); };
global['fetch'] = function () {
var args = Array.prototype.slice.call(arguments);
var options = args.length > 1 ? args[1] : {};
var signal = options === null || options === void 0 ? void 0 : options.signal;
var ac = new AbortController();
var fetchSignal = ac.signal;
options.signal = fetchSignal;
args[1] = options;
var onAbort;
if (signal) {
var nativeAddEventListener = signal[Zone.__symbol__('addEventListener')] ||
signal.addEventListener;
onAbort = function () { return ac.abort(); };
nativeAddEventListener.call(signal, 'abort', onAbort, { once: true });
}
return createFetchTask('fetch', { fetchArgs: args }, fetch, this, args, ac).finally(function () {
// We need to be good citizens and remove the `abort` listener once
// the fetch is settled. The `abort` listener may not be called at all,
// which means the event listener closure would retain a reference to
// the `ac` object even if it goes out of scope. Since browser's garbage
// collectors work differently, some may not be smart enough to collect a signal.
signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', onAbort);
});
};
if (OriginalResponse === null || OriginalResponse === void 0 ? void 0 : OriginalResponse.prototype) {
// https://fetch.spec.whatwg.org/#body-mixin
['arrayBuffer', 'blob', 'formData', 'json', 'text']
// Safely check whether the method exists on the `Response` prototype before patching.
.filter(function (method) { return typeof OriginalResponse.prototype[method] === 'function'; })
.forEach(function (method) {
api.patchMethod(OriginalResponse.prototype, method, function (delegate) { return function (self, args) { return createFetchTask("Response.".concat(method), undefined, delegate, self, args, undefined); }; });
});
}
});
}
patchFetch(Zone);
}));

6
node_modules/zone.js/bundles/zone-patch-fetch.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(t){t.__load_patch("fetch",(function(n,t,e){var o=n.fetch;if("function"==typeof o){var r=n[e.symbol("fetch")];r&&(o=r);var c=n.Promise,i=e.symbol("thenPatched"),f=e.symbol("fetchTaskScheduling"),a=n.Response,u=function(){},l=function(n,o,r,a,l,s){return new Promise((function(h,d){var p=t.current.scheduleMacroTask(n,u,o,(function(){var n,o=t.current;try{o[f]=!0,n=r.apply(a,l)}catch(n){return void d(n)}finally{o[f]=!1}if(!(n instanceof c)){var u=n.constructor;u[i]||e.patchThen(u)}n.then((function(n){"notScheduled"!==p.state&&p.invoke(),h(n)}),(function(n){"notScheduled"!==p.state&&p.invoke(),d(n)}))}),(function(){null==s||s.abort()}))}))};n.fetch=function(){var n,e=Array.prototype.slice.call(arguments),r=e.length>1?e[1]:{},c=null==r?void 0:r.signal,i=new AbortController;return r.signal=i.signal,e[1]=r,c&&(c[t.__symbol__("addEventListener")]||c.addEventListener).call(c,"abort",n=function(){return i.abort()},{once:!0}),l("fetch",{fetchArgs:e},o,this,e,i).finally((function(){null==c||c.removeEventListener("abort",n)}))},(null==a?void 0:a.prototype)&&["arrayBuffer","blob","formData","json","text"].filter((function(n){return"function"==typeof a.prototype[n]})).forEach((function(n){e.patchMethod(a.prototype,n,(function(t){return function(e,o){return l("Response.".concat(n),void 0,t,e,o,void 0)}}))}))}}))}(Zone)}));

82
node_modules/zone.js/bundles/zone-patch-jsonp.umd.js generated vendored Executable file
View File

@@ -0,0 +1,82 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchJsonp(Zone) {
Zone.__load_patch('jsonp', function (global, Zone, api) {
// because jsonp is not a standard api, there are a lot of
// implementations, so zone.js just provide a helper util to
// patch the jsonp send and onSuccess/onError callback
// the options is an object which contains
// - jsonp, the jsonp object which hold the send function
// - sendFuncName, the name of the send function
// - successFuncName, success func name
// - failedFuncName, failed func name
Zone[Zone.__symbol__('jsonp')] = function patchJsonp(options) {
if (!options || !options.jsonp || !options.sendFuncName) {
return;
}
var noop = function () { };
[options.successFuncName, options.failedFuncName].forEach(function (methodName) {
if (!methodName) {
return;
}
var oriFunc = global[methodName];
if (oriFunc) {
api.patchMethod(global, methodName, function (delegate) { return function (self, args) {
var task = global[api.symbol('jsonTask')];
if (task) {
task.callback = delegate;
return task.invoke.apply(self, args);
}
else {
return delegate.apply(self, args);
}
}; });
}
else {
Object.defineProperty(global, methodName, {
configurable: true,
enumerable: true,
get: function () {
return function () {
var task = global[api.symbol('jsonpTask')];
var delegate = global[api.symbol("jsonp".concat(methodName, "callback"))];
if (task) {
if (delegate) {
task.callback = delegate;
}
global[api.symbol('jsonpTask')] = undefined;
return task.invoke.apply(this, arguments);
}
else {
if (delegate) {
return delegate.apply(this, arguments);
}
}
return null;
};
},
set: function (callback) {
this[api.symbol("jsonp".concat(methodName, "callback"))] = callback;
},
});
}
});
api.patchMethod(options.jsonp, options.sendFuncName, function (delegate) { return function (self, args) {
global[api.symbol('jsonpTask')] = Zone.current.scheduleMacroTask('jsonp', noop, {}, function (task) {
return delegate.apply(self, args);
}, noop);
}; });
};
});
}
patchJsonp(Zone);
}));

6
node_modules/zone.js/bundles/zone-patch-jsonp.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){!function n(o){o.__load_patch("jsonp",(function(n,o,c){o[o.__symbol__("jsonp")]=function e(t){if(t&&t.jsonp&&t.sendFuncName){var a=function(){};[t.successFuncName,t.failedFuncName].forEach((function(o){o&&(n[o]?c.patchMethod(n,o,(function(o){return function(e,t){var a=n[c.symbol("jsonTask")];return a?(a.callback=o,a.invoke.apply(e,t)):o.apply(e,t)}})):Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return function(){var e=n[c.symbol("jsonpTask")],t=n[c.symbol("jsonp".concat(o,"callback"))];return e?(t&&(e.callback=t),n[c.symbol("jsonpTask")]=void 0,e.invoke.apply(this,arguments)):t?t.apply(this,arguments):null}},set:function(n){this[c.symbol("jsonp".concat(o,"callback"))]=n}}))})),c.patchMethod(t.jsonp,t.sendFuncName,(function(e){return function(t,s){n[c.symbol("jsonpTask")]=o.current.scheduleMacroTask("jsonp",a,{},(function(n){return e.apply(t,s)}),a)}}))}}}))}(Zone)}));

25
node_modules/zone.js/bundles/zone-patch-message-port.umd.js generated vendored Executable file
View File

@@ -0,0 +1,25 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchMessagePort(Zone) {
/**
* Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror`
* properties to make the callback in the zone when the value are set.
*/
Zone.__load_patch('MessagePort', function (global, Zone, api) {
var MessagePort = global['MessagePort'];
if (typeof MessagePort !== 'undefined' && MessagePort.prototype) {
api.patchOnProperties(MessagePort.prototype, ['message', 'messageerror']);
}
});
}
patchMessagePort(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("MessagePort",(function(e,o,t){var n=e.MessagePort;void 0!==n&&n.prototype&&t.patchOnProperties(n.prototype,["message","messageerror"])}))}(Zone)}));

73
node_modules/zone.js/bundles/zone-patch-promise-test.umd.js generated vendored Executable file
View File

@@ -0,0 +1,73 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchPromiseTesting(Zone) {
/**
* Promise for async/fakeAsync zoneSpec test
* can support async operation which not supported by zone.js
* such as
* it ('test jsonp in AsyncZone', async() => {
* new Promise(res => {
* jsonp(url, (data) => {
* // success callback
* res(data);
* });
* }).then((jsonpResult) => {
* // get jsonp result.
*
* // user will expect AsyncZoneSpec wait for
* // then, but because jsonp is not zone aware
* // AsyncZone will finish before then is called.
* });
* });
*/
Zone.__load_patch('promisefortest', function (global, Zone, api) {
var symbolState = api.symbol('state');
var UNRESOLVED = null;
var symbolParentUnresolved = api.symbol('parentUnresolved');
// patch Promise.prototype.then to keep an internal
// number for tracking unresolved chained promise
// we will decrease this number when the parent promise
// being resolved/rejected and chained promise was
// scheduled as a microTask.
// so we can know such kind of chained promise still
// not resolved in AsyncTestZone
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
return;
}
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
Promise.prototype.then = function () {
var chained = oriThen.apply(this, arguments);
if (this[symbolState] === UNRESOLVED) {
// parent promise is unresolved.
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
if (asyncTestZoneSpec) {
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
chained[symbolParentUnresolved] = true;
}
}
return chained;
};
};
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
// restore origin then
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
if (oriThen) {
Promise.prototype.then = oriThen;
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
}
};
});
}
patchPromiseTesting(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(o){o.__load_patch("promisefortest",(function(e,o,n){var s=n.symbol("state"),t=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n||(n=Promise[o.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[s]){var r=o.current.get("AsyncTestZoneSpec");r&&(r.unresolvedChainedPromiseCount++,e[t]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[o.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[o.__symbol__("ZonePromiseThen")]=void 0)}}))}(Zone)}));

View File

@@ -0,0 +1,94 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchResizeObserver(Zone) {
Zone.__load_patch('ResizeObserver', function (global, Zone, api) {
var ResizeObserver = global['ResizeObserver'];
if (!ResizeObserver) {
return;
}
var resizeObserverSymbol = api.symbol('ResizeObserver');
api.patchMethod(global, 'ResizeObserver', function (delegate) { return function (self, args) {
var callback = args.length > 0 ? args[0] : null;
if (callback) {
args[0] = function (entries, observer) {
var _this = this;
var zones = {};
var currZone = Zone.current;
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var entry = entries_1[_i];
var zone = entry.target[resizeObserverSymbol];
if (!zone) {
zone = currZone;
}
var zoneEntriesInfo = zones[zone.name];
if (!zoneEntriesInfo) {
zones[zone.name] = zoneEntriesInfo = { entries: [], zone: zone };
}
zoneEntriesInfo.entries.push(entry);
}
Object.keys(zones).forEach(function (zoneName) {
var zoneEntriesInfo = zones[zoneName];
if (zoneEntriesInfo.zone !== Zone.current) {
zoneEntriesInfo.zone.run(callback, _this, [zoneEntriesInfo.entries, observer], 'ResizeObserver');
}
else {
callback.call(_this, zoneEntriesInfo.entries, observer);
}
});
};
}
return args.length > 0 ? new ResizeObserver(args[0]) : new ResizeObserver();
}; });
api.patchMethod(ResizeObserver.prototype, 'observe', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (!targets) {
targets = self[resizeObserverSymbol] = [];
}
targets.push(target);
target[resizeObserverSymbol] = Zone.current;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'unobserve', function (delegate) { return function (self, args) {
var target = args.length > 0 ? args[0] : null;
if (!target) {
return delegate.apply(self, args);
}
var targets = self[resizeObserverSymbol];
if (targets) {
for (var i = 0; i < targets.length; i++) {
if (targets[i] === target) {
targets.splice(i, 1);
break;
}
}
}
target[resizeObserverSymbol] = undefined;
return delegate.apply(self, args);
}; });
api.patchMethod(ResizeObserver.prototype, 'disconnect', function (delegate) { return function (self, args) {
var targets = self[resizeObserverSymbol];
if (targets) {
targets.forEach(function (target) {
target[resizeObserverSymbol] = undefined;
});
self[resizeObserverSymbol] = undefined;
}
return delegate.apply(self, args);
}; });
});
}
patchResizeObserver(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("ResizeObserver",(function(e,n,r){var t=e.ResizeObserver;if(t){var o=r.symbol("ResizeObserver");r.patchMethod(e,"ResizeObserver",(function(e){return function(e,r){var i=r.length>0?r[0]:null;return i&&(r[0]=function(e,r){for(var t=this,u={},a=n.current,c=0,f=e;c<f.length;c++){var p=f[c],s=p.target[o];s||(s=a);var v=u[s.name];v||(u[s.name]=v={entries:[],zone:s}),v.entries.push(p)}Object.keys(u).forEach((function(e){var o=u[e];o.zone!==n.current?o.zone.run(i,t,[o.entries,r],"ResizeObserver"):i.call(t,o.entries,r)}))}),r.length>0?new t(r[0]):new t}})),r.patchMethod(t.prototype,"observe",(function(e){return function(r,t){var i=t.length>0?t[0]:null;if(!i)return e.apply(r,t);var u=r[o];return u||(u=r[o]=[]),u.push(i),i[o]=n.current,e.apply(r,t)}})),r.patchMethod(t.prototype,"unobserve",(function(e){return function(n,r){var t=r.length>0?r[0]:null;if(!t)return e.apply(n,r);var i=n[o];if(i)for(var u=0;u<i.length;u++)if(i[u]===t){i.splice(u,1);break}return t[o]=void 0,e.apply(n,r)}})),r.patchMethod(t.prototype,"disconnect",(function(e){return function(n,r){var t=n[o];return t&&(t.forEach((function(e){e[o]=void 0})),n[o]=void 0),e.apply(n,r)}}))}}))}(Zone)}));

View File

@@ -0,0 +1,184 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
var ProxyZoneSpec = /** @class */ (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
this.name = 'ProxyZone';
this._delegateSpec = null;
this.properties = { 'ProxyZoneSpec': this };
this.propertyKeys = null;
this.lastTaskState = null;
this.isNeedToTriggerHasTask = false;
this.tasks = [];
this.defaultSpecDelegate = defaultSpecDelegate;
this.setDelegate(defaultSpecDelegate);
}
ProxyZoneSpec.get = function () {
return Zone.current.get('ProxyZoneSpec');
};
ProxyZoneSpec.isLoaded = function () {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
};
ProxyZoneSpec.assertPresent = function () {
var spec = ProxyZoneSpec.get();
if (spec === undefined) {
throw new Error("Expected to be running in 'ProxyZone', but it was not found.");
}
return spec;
};
ProxyZoneSpec.prototype.setDelegate = function (delegateSpec) {
var _this = this;
var isNewDelegate = this._delegateSpec !== delegateSpec;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach(function (key) { return delete _this.properties[key]; });
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach(function (k) { return (_this.properties[k] = delegateSpec.properties[k]); });
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
this.getDelegate();
this.setDelegate(this.defaultSpecDelegate);
};
ProxyZoneSpec.prototype.tryTriggerHasTask = function (parentZoneDelegate, currentZone, targetZone) {
if (this.isNeedToTriggerHasTask && this.lastTaskState) {
// last delegateSpec has microTask or macroTask
// should call onHasTask in current delegateSpec
this.isNeedToTriggerHasTask = false;
this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
}
};
ProxyZoneSpec.prototype.removeFromTasks = function (task) {
if (!this.tasks) {
return;
}
for (var i = 0; i < this.tasks.length; i++) {
if (this.tasks[i] === task) {
this.tasks.splice(i, 1);
return;
}
}
};
ProxyZoneSpec.prototype.getAndClearPendingTasksInfo = function () {
if (this.tasks.length === 0) {
return '';
}
var taskInfo = this.tasks.map(function (task) {
var dataInfo = task.data &&
Object.keys(task.data)
.map(function (key) {
return key + ':' + task.data[key];
})
.join(',');
return "type: ".concat(task.type, ", source: ").concat(task.source, ", args: {").concat(dataInfo, "}");
});
var pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';
// clear tasks
this.tasks = [];
return pendingTasksInfo;
};
ProxyZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
};
ProxyZoneSpec.prototype.onIntercept = function (parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
};
ProxyZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
};
ProxyZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
};
ProxyZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.tasks.push(task);
}
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvokeTask) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
};
ProxyZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
this.lastTaskState = hasTaskState;
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
};
return ProxyZoneSpec;
}());
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e=function(){function e(e){void 0===e&&(e=null),this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.defaultSpecDelegate=e,this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){var t=e.get();if(void 0===t)throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return t},e.prototype.setDelegate=function(e){var t=this,s=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(s){return t.properties[s]=e.properties[s]}))),s&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,n):e.fork(s,n)},e.prototype.onIntercept=function(e,t,s,n,a){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,n,a):e.intercept(s,n,a)},e.prototype.onInvoke=function(e,t,s,n,a,r,o){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,n,a,r,o):e.invoke(s,n,a,r,o)},e.prototype.onHandleError=function(e,t,s,n){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,n):e.handleError(s,n)},e.prototype.onScheduleTask=function(e,t,s,n){return"eventTask"!==n.type&&this.tasks.push(n),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,n):e.scheduleTask(s,n)},e.prototype.onInvokeTask=function(e,t,s,n,a,r){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,n,a,r):e.invokeTask(s,n,a,r)},e.prototype.onCancelTask=function(e,t,s,n){return"eventTask"!==n.type&&this.removeFromTasks(n),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,n):e.cancelTask(s,n)},e.prototype.onHasTask=function(e,t,s,n){this.lastTaskState=n,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,n):e.hasTask(s,n)},e}();!function t(s){s.ProxyZoneSpec=e}(Zone)}));

204
node_modules/zone.js/bundles/zone-patch-rxjs.umd.js generated vendored Executable file
View File

@@ -0,0 +1,204 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('rxjs')) :
typeof define === 'function' && define.amd ? define(['rxjs'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.rxjs));
})(this, (function (rxjs) {
'use strict';
function patchRxJs(Zone) {
Zone.__load_patch('rxjs', function (global, Zone, api) {
var symbol = Zone.__symbol__;
var nextSource = 'rxjs.Subscriber.next';
var errorSource = 'rxjs.Subscriber.error';
var completeSource = 'rxjs.Subscriber.complete';
var ObjectDefineProperties = Object.defineProperties;
var patchObservable = function () {
var ObservablePrototype = rxjs.Observable.prototype;
var _symbolSubscribe = symbol('_subscribe');
var _subscribe = (ObservablePrototype[_symbolSubscribe] = ObservablePrototype._subscribe);
ObjectDefineProperties(rxjs.Observable.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneSource: { value: null, writable: true, configurable: true },
_zoneSubscribe: { value: null, writable: true, configurable: true },
source: {
configurable: true,
get: function () {
return this._zoneSource;
},
set: function (source) {
this._zone = Zone.current;
this._zoneSource = source;
},
},
_subscribe: {
configurable: true,
get: function () {
if (this._zoneSubscribe) {
return this._zoneSubscribe;
}
else if (this.constructor === rxjs.Observable) {
return _subscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._subscribe;
},
set: function (subscribe) {
this._zone = Zone.current;
if (!subscribe) {
this._zoneSubscribe = subscribe;
}
else {
this._zoneSubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
var tearDown_1 = this._zone.run(subscribe, this, arguments);
if (typeof tearDown_1 === 'function') {
var zone_1 = this._zone;
return function () {
if (zone_1 !== Zone.current) {
return zone_1.run(tearDown_1, this, arguments);
}
return tearDown_1.apply(this, arguments);
};
}
else {
return tearDown_1;
}
}
else {
return subscribe.apply(this, arguments);
}
};
}
},
},
subjectFactory: {
get: function () {
return this._zoneSubjectFactory;
},
set: function (factory) {
var zone = this._zone;
this._zoneSubjectFactory = function () {
if (zone && zone !== Zone.current) {
return zone.run(factory, this, arguments);
}
return factory.apply(this, arguments);
};
},
},
});
};
api.patchMethod(rxjs.Observable.prototype, 'lift', function (delegate) { return function (self, args) {
var observable = delegate.apply(self, args);
if (observable.operator) {
observable.operator._zone = Zone.current;
api.patchMethod(observable.operator, 'call', function (operatorDelegate) { return function (operatorSelf, operatorArgs) {
if (operatorSelf._zone && operatorSelf._zone !== Zone.current) {
return operatorSelf._zone.run(operatorDelegate, operatorSelf, operatorArgs);
}
return operatorDelegate.apply(operatorSelf, operatorArgs);
}; });
}
return observable;
}; });
var patchSubscription = function () {
ObjectDefineProperties(rxjs.Subscription.prototype, {
_zone: { value: null, writable: true, configurable: true },
_zoneUnsubscribe: { value: null, writable: true, configurable: true },
_unsubscribe: {
get: function () {
if (this._zoneUnsubscribe || this._zoneUnsubscribeCleared) {
return this._zoneUnsubscribe;
}
var proto = Object.getPrototypeOf(this);
return proto && proto._unsubscribe;
},
set: function (unsubscribe) {
this._zone = Zone.current;
if (!unsubscribe) {
this._zoneUnsubscribe = unsubscribe;
// In some operator such as `retryWhen`, the _unsubscribe
// method will be set to null, so we need to set another flag
// to tell that we should return null instead of finding
// in the prototype chain.
this._zoneUnsubscribeCleared = true;
}
else {
this._zoneUnsubscribeCleared = false;
this._zoneUnsubscribe = function () {
if (this._zone && this._zone !== Zone.current) {
return this._zone.run(unsubscribe, this, arguments);
}
else {
return unsubscribe.apply(this, arguments);
}
};
}
},
},
});
};
var patchSubscriber = function () {
var next = rxjs.Subscriber.prototype.next;
var error = rxjs.Subscriber.prototype.error;
var complete = rxjs.Subscriber.prototype.complete;
Object.defineProperty(rxjs.Subscriber.prototype, 'destination', {
configurable: true,
get: function () {
return this._zoneDestination;
},
set: function (destination) {
this._zone = Zone.current;
this._zoneDestination = destination;
},
});
// patch Subscriber.next to make sure it run
// into SubscriptionZone
rxjs.Subscriber.prototype.next = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(next, this, arguments, nextSource);
}
else {
return next.apply(this, arguments);
}
};
rxjs.Subscriber.prototype.error = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(error, this, arguments, errorSource);
}
else {
return error.apply(this, arguments);
}
};
rxjs.Subscriber.prototype.complete = function () {
var currentZone = Zone.current;
var subscriptionZone = this._zone;
// for performance concern, check Zone.current
// equal with this._zone(SubscriptionZone) or not
if (subscriptionZone && subscriptionZone !== currentZone) {
return subscriptionZone.run(complete, this, arguments, completeSource);
}
else {
return complete.call(this);
}
};
};
patchObservable();
patchSubscription();
patchSubscriber();
});
}
patchRxJs(Zone);
}));

6
node_modules/zone.js/bundles/zone-patch-rxjs.umd.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("rxjs")):"function"==typeof define&&define.amd?define(["rxjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rxjs)}(this,(function(e){!function t(r){r.__load_patch("rxjs",(function(t,r,n){var i,o,u,s,c,b=r.__symbol__,a=Object.defineProperties;n.patchMethod(e.Observable.prototype,"lift",(function(e){return function(t,i){var o=e.apply(t,i);return o.operator&&(o.operator._zone=r.current,n.patchMethod(o.operator,"call",(function(e){return function(t,n){return t._zone&&t._zone!==r.current?t._zone.run(e,t,n):e.apply(t,n)}}))),o}})),o=(i=e.Observable.prototype)[b("_subscribe")]=i._subscribe,a(e.Observable.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneSource:{value:null,writable:!0,configurable:!0},_zoneSubscribe:{value:null,writable:!0,configurable:!0},source:{configurable:!0,get:function(){return this._zoneSource},set:function(e){this._zone=r.current,this._zoneSource=e}},_subscribe:{configurable:!0,get:function(){if(this._zoneSubscribe)return this._zoneSubscribe;if(this.constructor===e.Observable)return o;var t=Object.getPrototypeOf(this);return t&&t._subscribe},set:function(e){this._zone=r.current,this._zoneSubscribe=e?function(){if(this._zone&&this._zone!==r.current){var t=this._zone.run(e,this,arguments);if("function"==typeof t){var n=this._zone;return function(){return n!==r.current?n.run(t,this,arguments):t.apply(this,arguments)}}return t}return e.apply(this,arguments)}:e}},subjectFactory:{get:function(){return this._zoneSubjectFactory},set:function(e){var t=this._zone;this._zoneSubjectFactory=function(){return t&&t!==r.current?t.run(e,this,arguments):e.apply(this,arguments)}}}}),a(e.Subscription.prototype,{_zone:{value:null,writable:!0,configurable:!0},_zoneUnsubscribe:{value:null,writable:!0,configurable:!0},_unsubscribe:{get:function(){if(this._zoneUnsubscribe||this._zoneUnsubscribeCleared)return this._zoneUnsubscribe;var e=Object.getPrototypeOf(this);return e&&e._unsubscribe},set:function(e){this._zone=r.current,e?(this._zoneUnsubscribeCleared=!1,this._zoneUnsubscribe=function(){return this._zone&&this._zone!==r.current?this._zone.run(e,this,arguments):e.apply(this,arguments)}):(this._zoneUnsubscribe=e,this._zoneUnsubscribeCleared=!0)}}}),u=e.Subscriber.prototype.next,s=e.Subscriber.prototype.error,c=e.Subscriber.prototype.complete,Object.defineProperty(e.Subscriber.prototype,"destination",{configurable:!0,get:function(){return this._zoneDestination},set:function(e){this._zone=r.current,this._zoneDestination=e}}),e.Subscriber.prototype.next=function(){var e=this._zone;return e&&e!==r.current?e.run(u,this,arguments,"rxjs.Subscriber.next"):u.apply(this,arguments)},e.Subscriber.prototype.error=function(){var e=this._zone;return e&&e!==r.current?e.run(s,this,arguments,"rxjs.Subscriber.error"):s.apply(this,arguments)},e.Subscriber.prototype.complete=function(){var e=this._zone;return e&&e!==r.current?e.run(c,this,arguments,"rxjs.Subscriber.complete"):c.call(this)}}))}(Zone)}));

34
node_modules/zone.js/bundles/zone-patch-socket-io.umd.js generated vendored Executable file
View File

@@ -0,0 +1,34 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchSocketIo(Zone) {
Zone.__load_patch('socketio', function (global, Zone, api) {
Zone[Zone.__symbol__('socketio')] = function patchSocketIO(io) {
// patch io.Socket.prototype event listener related method
api.patchEventTarget(global, api, [io.Socket.prototype], {
useG: false,
chkDup: false,
rt: true,
diff: function (task, delegate) {
return task.callback === delegate;
},
});
// also patch io.Socket.prototype.on/off/removeListener/removeAllListeners
io.Socket.prototype.on = io.Socket.prototype.addEventListener;
io.Socket.prototype.off =
io.Socket.prototype.removeListener =
io.Socket.prototype.removeAllListeners =
io.Socket.prototype.removeEventListener;
};
});
}
patchSocketIo(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(t){t.__load_patch("socketio",(function(e,t,o){t[t.__symbol__("socketio")]=function t(n){o.patchEventTarget(e,o,[n.Socket.prototype],{useG:!1,chkDup:!1,rt:!0,diff:function(e,t){return e.callback===t}}),n.Socket.prototype.on=n.Socket.prototype.addEventListener,n.Socket.prototype.off=n.Socket.prototype.removeListener=n.Socket.prototype.removeAllListeners=n.Socket.prototype.removeEventListener}}))}(Zone)}));

28
node_modules/zone.js/bundles/zone-patch-user-media.umd.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
})((function () {
'use strict';
function patchUserMedia(Zone) {
Zone.__load_patch('getUserMedia', function (global, Zone, api) {
function wrapFunctionArgs(func, source) {
return function () {
var args = Array.prototype.slice.call(arguments);
var wrappedArgs = api.bindArguments(args, func.name);
return func.apply(this, wrappedArgs);
};
}
var navigator = global['navigator'];
if (navigator && navigator.getUserMedia) {
navigator.getUserMedia = wrapFunctionArgs(navigator.getUserMedia);
}
});
}
patchUserMedia(Zone);
}));

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function e(n){n.__load_patch("getUserMedia",(function(e,n,t){var i=e.navigator;i&&i.getUserMedia&&(i.getUserMedia=function r(e){return function(){var n=Array.prototype.slice.call(arguments),i=t.bindArguments(n,e.name);return e.apply(this,i)}}(i.getUserMedia))}))}(Zone)}));

2376
node_modules/zone.js/bundles/zone-testing.umd.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

7
node_modules/zone.js/bundles/zone-testing.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

2996
node_modules/zone.js/bundles/zone.umd.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

6
node_modules/zone.js/bundles/zone.umd.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

281
node_modules/zone.js/fesm2015/async-test.js generated vendored Executable file
View File

@@ -0,0 +1,281 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
const global$1 = globalThis;
// __Zone_symbol_prefix global can be used to override the default zone
// symbol prefix with a custom one if needed.
function __symbol__(name) {
const symbolPrefix = global$1['__Zone_symbol_prefix'] || '__zone_symbol__';
return symbolPrefix + name;
}
const __global = (typeof window !== 'undefined' && window) || (typeof self !== 'undefined' && self) || global;
class AsyncTestZoneSpec {
finishCallback;
failCallback;
// Needs to be a getter and not a plain property in order run this just-in-time. Otherwise
// `__symbol__` would be evaluated during top-level execution prior to the Zone prefix being
// changed for tests.
static get symbolParentUnresolved() {
return __symbol__('parentUnresolved');
}
_pendingMicroTasks = false;
_pendingMacroTasks = false;
_alreadyErrored = false;
_isSync = false;
_existingFinishTimer = null;
entryFunction = null;
runZone = Zone.current;
unresolvedChainedPromiseCount = 0;
supportWaitUnresolvedChainedPromise = false;
constructor(finishCallback, failCallback, namePrefix) {
this.finishCallback = finishCallback;
this.failCallback = failCallback;
this.name = 'asyncTestZone for ' + namePrefix;
this.properties = { 'AsyncTestZoneSpec': this };
this.supportWaitUnresolvedChainedPromise =
__global[__symbol__('supportWaitUnResolvedChainedPromise')] === true;
}
isUnresolvedChainedPromisePending() {
return this.unresolvedChainedPromiseCount > 0;
}
_finishCallbackIfDone() {
// NOTE: Technically the `onHasTask` could fire together with the initial synchronous
// completion in `onInvoke`. `onHasTask` might call this method when it captured e.g.
// microtasks in the proxy zone that now complete as part of this async zone run.
// Consider the following scenario:
// 1. A test `beforeEach` schedules a microtask in the ProxyZone.
// 2. An actual empty `it` spec executes in the AsyncTestZone` (using e.g. `waitForAsync`).
// 3. The `onInvoke` invokes `_finishCallbackIfDone` because the spec runs synchronously.
// 4. We wait the scheduled timeout (see below) to account for unhandled promises.
// 5. The microtask from (1) finishes and `onHasTask` is invoked.
// --> We register a second `_finishCallbackIfDone` even though we have scheduled a timeout.
// If the finish timeout from below is already scheduled, terminate the existing scheduled
// finish invocation, avoiding calling `jasmine` `done` multiple times. *Note* that we would
// want to schedule a new finish callback in case the task state changes again.
if (this._existingFinishTimer !== null) {
clearTimeout(this._existingFinishTimer);
this._existingFinishTimer = null;
}
if (!(this._pendingMicroTasks ||
this._pendingMacroTasks ||
(this.supportWaitUnresolvedChainedPromise && this.isUnresolvedChainedPromisePending()))) {
// We wait until the next tick because we would like to catch unhandled promises which could
// cause test logic to be executed. In such cases we cannot finish with tasks pending then.
this.runZone.run(() => {
this._existingFinishTimer = setTimeout(() => {
if (!this._alreadyErrored && !(this._pendingMicroTasks || this._pendingMacroTasks)) {
this.finishCallback();
}
}, 0);
});
}
}
patchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
const patchPromiseForTest = Promise[Zone.__symbol__('patchPromiseForTest')];
if (patchPromiseForTest) {
patchPromiseForTest();
}
}
unPatchPromiseForTest() {
if (!this.supportWaitUnresolvedChainedPromise) {
return;
}
const unPatchPromiseForTest = Promise[Zone.__symbol__('unPatchPromiseForTest')];
if (unPatchPromiseForTest) {
unPatchPromiseForTest();
}
}
// ZoneSpec implementation below.
name;
properties;
onScheduleTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
if (task.type === 'microTask' && task.data && task.data instanceof Promise) {
// check whether the promise is a chained promise
if (task.data[AsyncTestZoneSpec.symbolParentUnresolved] === true) {
// chained promise is being scheduled
this.unresolvedChainedPromiseCount--;
}
}
return delegate.scheduleTask(target, task);
}
onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.invokeTask(target, task, applyThis, applyArgs);
}
onCancelTask(delegate, current, target, task) {
if (task.type !== 'eventTask') {
this._isSync = false;
}
return delegate.cancelTask(target, task);
}
// Note - we need to use onInvoke at the moment to call finish when a test is
// fully synchronous. TODO(juliemr): remove this when the logic for
// onHasTask changes and it calls whenever the task queues are dirty.
// updated by(JiaLiPassion), only call finish callback when no task
// was scheduled/invoked/canceled.
onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (!this.entryFunction) {
this.entryFunction = delegate;
}
try {
this._isSync = true;
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
finally {
// We need to check the delegate is the same as entryFunction or not.
// Consider the following case.
//
// asyncTestZone.run(() => { // Here the delegate will be the entryFunction
// Zone.current.run(() => { // Here the delegate will not be the entryFunction
// });
// });
//
// We only want to check whether there are async tasks scheduled
// for the entry function.
if (this._isSync && this.entryFunction === delegate) {
this._finishCallbackIfDone();
}
}
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
// Let the parent try to handle the error.
const result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this.failCallback(error);
this._alreadyErrored = true;
}
return false;
}
onHasTask(delegate, current, target, hasTaskState) {
delegate.hasTask(target, hasTaskState);
// We should only trigger finishCallback when the target zone is the AsyncTestZone
// Consider the following cases.
//
// const childZone = asyncTestZone.fork({
// name: 'child',
// onHasTask: ...
// });
//
// So we have nested zones declared the onHasTask hook, in this case,
// the onHasTask will be triggered twice, and cause the finishCallbackIfDone()
// is also be invoked twice. So we need to only trigger the finishCallbackIfDone()
// when the current zone is the same as the target zone.
if (current !== target) {
return;
}
if (hasTaskState.change == 'microTask') {
this._pendingMicroTasks = hasTaskState.microTask;
this._finishCallbackIfDone();
}
else if (hasTaskState.change == 'macroTask') {
this._pendingMacroTasks = hasTaskState.macroTask;
this._finishCallbackIfDone();
}
}
}
function patchAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
Zone.__load_patch('asynctest', (global, Zone, api) => {
/**
* Wraps a test function in an asynchronous test zone. The test will automatically
* complete when all asynchronous calls within this zone are done.
*/
Zone[api.symbol('asyncTest')] = function asyncTest(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'
// function when asynchronous activity is finished.
if (global.jasmine) {
// Not using an arrow function to preserve context passed from call site
return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) {
throw e;
};
}
runInTestZone(fn, this, done, (err) => {
if (typeof err === 'string') {
return done.fail(new Error(err));
}
else {
done.fail(err);
}
});
};
}
// Otherwise, return a promise which will resolve when asynchronous activity
// is finished. This will be correctly consumed by the Mocha framework with
// it('...', async(myFn)); or can be used in a custom framework.
// Not using an arrow function to preserve context passed from call site
return function () {
return new Promise((finishCallback, failCallback) => {
runInTestZone(fn, this, finishCallback, failCallback);
});
};
};
function runInTestZone(fn, context, finishCallback, failCallback) {
const currentZone = Zone.current;
const AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
if (AsyncTestZoneSpec === undefined) {
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/async-test');
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/plugins/proxy');
}
const proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
const previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(() => {
const testZoneSpec = new AsyncTestZoneSpec(() => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's
// still this one. Otherwise, assume
// it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
finishCallback();
});
}, (error) => {
// Need to restore the original zone.
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
testZoneSpec.unPatchPromiseForTest();
currentZone.run(() => {
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
testZoneSpec.patchPromiseForTest();
});
return Zone.current.runGuarded(fn, context);
}
});
}
patchAsyncTest(Zone);

6
node_modules/zone.js/fesm2015/async-test.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/const global$1=globalThis;function __symbol__(e){return(global$1.__Zone_symbol_prefix||"__zone_symbol__")+e}const __global="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global;class AsyncTestZoneSpec{finishCallback;failCallback;static get symbolParentUnresolved(){return __symbol__("parentUnresolved")}_pendingMicroTasks=!1;_pendingMacroTasks=!1;_alreadyErrored=!1;_isSync=!1;_existingFinishTimer=null;entryFunction=null;runZone=Zone.current;unresolvedChainedPromiseCount=0;supportWaitUnresolvedChainedPromise=!1;constructor(e,n,s){this.finishCallback=e,this.failCallback=n,this.name="asyncTestZone for "+s,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===__global[__symbol__("supportWaitUnResolvedChainedPromise")]}isUnresolvedChainedPromisePending(){return this.unresolvedChainedPromiseCount>0}_finishCallbackIfDone(){null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((()=>{this._existingFinishTimer=setTimeout((()=>{this._alreadyErrored||this._pendingMicroTasks||this._pendingMacroTasks||this.finishCallback()}),0)}))}patchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}unPatchPromiseForTest(){if(!this.supportWaitUnresolvedChainedPromise)return;const e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}name;properties;onScheduleTask(e,n,s,t){return"eventTask"!==t.type&&(this._isSync=!1),"microTask"===t.type&&t.data&&t.data instanceof Promise&&!0===t.data[AsyncTestZoneSpec.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(s,t)}onInvokeTask(e,n,s,t,i,o){return"eventTask"!==t.type&&(this._isSync=!1),e.invokeTask(s,t,i,o)}onCancelTask(e,n,s,t){return"eventTask"!==t.type&&(this._isSync=!1),e.cancelTask(s,t)}onInvoke(e,n,s,t,i,o,r){this.entryFunction||(this.entryFunction=t);try{return this._isSync=!0,e.invoke(s,t,i,o,r)}finally{this._isSync&&this.entryFunction===t&&this._finishCallbackIfDone()}}onHandleError(e,n,s,t){return e.handleError(s,t)&&(this.failCallback(t),this._alreadyErrored=!0),!1}onHasTask(e,n,s,t){e.hasTask(s,t),n===s&&("microTask"==t.change?(this._pendingMicroTasks=t.microTask,this._finishCallbackIfDone()):"macroTask"==t.change&&(this._pendingMacroTasks=t.macroTask,this._finishCallbackIfDone()))}}function patchAsyncTest(e){e.AsyncTestZoneSpec=AsyncTestZoneSpec,e.__load_patch("asynctest",((e,n,s)=>{function t(e,s,t,i){const o=n.current,r=n.AsyncTestZoneSpec;if(void 0===r)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/async-test");const a=n.ProxyZoneSpec;if(!a)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/plugins/proxy");const c=a.get();a.assertPresent();const l=n.current.getZoneWith("ProxyZoneSpec"),h=c.getDelegate();return l.parent.run((()=>{const e=new r((()=>{c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((()=>{t()}))}),(n=>{c.getDelegate()==e&&c.setDelegate(h),e.unPatchPromiseForTest(),o.run((()=>{i(n)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),n.current.runGuarded(e,s)}n[s.symbol("asyncTest")]=function n(s){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),t(s,this,e,(n=>{if("string"==typeof n)return e.fail(new Error(n));e.fail(n)}))}:function(){return new Promise(((e,n)=>{t(s,this,e,n)}))}}}))}patchAsyncTest(Zone);

825
node_modules/zone.js/fesm2015/fake-async-test.js generated vendored Executable file
View File

@@ -0,0 +1,825 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
const global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || globalThis.global;
const OriginalDate = global.Date;
// Since when we compile this file to `es2015`, and if we define
// this `FakeDate` as `class FakeDate`, and then set `FakeDate.prototype`
// there will be an error which is `Cannot assign to read only property 'prototype'`
// so we need to use function implementation here.
function FakeDate() {
if (arguments.length === 0) {
const d = new OriginalDate();
d.setTime(FakeDate.now());
return d;
}
else {
const args = Array.prototype.slice.call(arguments);
return new OriginalDate(...args);
}
}
FakeDate.now = function () {
const fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncTestZoneSpec) {
return fakeAsyncTestZoneSpec.getFakeSystemTime();
}
return OriginalDate.now.apply(this, arguments);
};
FakeDate.UTC = OriginalDate.UTC;
FakeDate.parse = OriginalDate.parse;
// keep a reference for zone patched timer function
let patchedTimers;
const timeoutCallback = function () { };
class Scheduler {
// Next scheduler id.
static nextNodeJSId = 1;
static nextId = -1;
// Scheduler queue with the tuple of end time and callback function - sorted by end time.
_schedulerQueue = [];
// Current simulated time in millis.
_currentTickTime = 0;
// Current fake system base time in millis.
_currentFakeBaseSystemTime = OriginalDate.now();
// track requeuePeriodicTimer
_currentTickRequeuePeriodicEntries = [];
constructor() { }
static getNextId() {
const id = patchedTimers.nativeSetTimeout.call(global, timeoutCallback, 0);
patchedTimers.nativeClearTimeout.call(global, id);
if (typeof id === 'number') {
return id;
}
// in NodeJS, we just use a number for fakeAsync, since it will not
// conflict with native TimeoutId
return Scheduler.nextNodeJSId++;
}
getCurrentTickTime() {
return this._currentTickTime;
}
getFakeSystemTime() {
return this._currentFakeBaseSystemTime + this._currentTickTime;
}
setFakeBaseSystemTime(fakeBaseSystemTime) {
this._currentFakeBaseSystemTime = fakeBaseSystemTime;
}
getRealSystemTime() {
return OriginalDate.now();
}
scheduleFunction(cb, delay, options) {
options = {
...{
args: [],
isPeriodic: false,
isRequestAnimationFrame: false,
id: -1,
isRequeuePeriodic: false,
},
...options,
};
let currentId = options.id < 0 ? Scheduler.nextId : options.id;
Scheduler.nextId = Scheduler.getNextId();
let endTime = this._currentTickTime + delay;
// Insert so that scheduler queue remains sorted by end time.
let newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: options.args,
delay: delay,
isPeriodic: options.isPeriodic,
isRequestAnimationFrame: options.isRequestAnimationFrame,
};
if (options.isRequeuePeriodic) {
this._currentTickRequeuePeriodicEntries.push(newEntry);
}
let i = 0;
for (; i < this._schedulerQueue.length; i++) {
let currentEntry = this._schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
this._schedulerQueue.splice(i, 0, newEntry);
return currentId;
}
removeScheduledFunctionWithId(id) {
for (let i = 0; i < this._schedulerQueue.length; i++) {
if (this._schedulerQueue[i].id == id) {
this._schedulerQueue.splice(i, 1);
break;
}
}
}
removeAll() {
this._schedulerQueue = [];
}
getTimerCount() {
return this._schedulerQueue.length;
}
tickToNext(step = 1, doTick, tickOptions) {
if (this._schedulerQueue.length < step) {
return;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const targetTask = this._schedulerQueue[step - 1];
this.tick(targetTask.endTime - startTime, doTick, tickOptions);
}
tick(millis = 0, doTick, tickOptions) {
let finalTime = this._currentTickTime + millis;
let lastCurrentTime = 0;
tickOptions = Object.assign({ processNewMacroTasksSynchronously: true }, tickOptions);
// we need to copy the schedulerQueue so nested timeout
// will not be wrongly called in the current tick
// https://github.com/angular/angular/issues/33799
const schedulerQueue = tickOptions.processNewMacroTasksSynchronously
? this._schedulerQueue
: this._schedulerQueue.slice();
if (schedulerQueue.length === 0 && doTick) {
doTick(millis);
return;
}
while (schedulerQueue.length > 0) {
// clear requeueEntries before each loop
this._currentTickRequeuePeriodicEntries = [];
let current = schedulerQueue[0];
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
else {
// Time to run scheduled function. Remove it from the head of queue.
let current = schedulerQueue.shift();
if (!tickOptions.processNewMacroTasksSynchronously) {
const idx = this._schedulerQueue.indexOf(current);
if (idx >= 0) {
this._schedulerQueue.splice(idx, 1);
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
let retval = current.func.apply(global, current.isRequestAnimationFrame ? [this._currentTickTime] : current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
// check is there any requeue periodic entry is added in
// current loop, if there is, we need to add to current loop
if (!tickOptions.processNewMacroTasksSynchronously) {
this._currentTickRequeuePeriodicEntries.forEach((newEntry) => {
let i = 0;
for (; i < schedulerQueue.length; i++) {
const currentEntry = schedulerQueue[i];
if (newEntry.endTime < currentEntry.endTime) {
break;
}
}
schedulerQueue.splice(i, 0, newEntry);
});
}
}
}
lastCurrentTime = this._currentTickTime;
this._currentTickTime = finalTime;
if (doTick) {
doTick(this._currentTickTime - lastCurrentTime);
}
}
flushOnlyPendingTimers(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick, { processNewMacroTasksSynchronously: false });
return this._currentTickTime - startTime;
}
flush(limit = 20, flushPeriodic = false, doTick) {
if (flushPeriodic) {
return this.flushPeriodic(doTick);
}
else {
return this.flushNonPeriodic(limit, doTick);
}
}
flushPeriodic(doTick) {
if (this._schedulerQueue.length === 0) {
return 0;
}
// Find the last task currently queued in the scheduler queue and tick
// till that time.
const startTime = this._currentTickTime;
const lastTask = this._schedulerQueue[this._schedulerQueue.length - 1];
this.tick(lastTask.endTime - startTime, doTick);
return this._currentTickTime - startTime;
}
flushNonPeriodic(limit, doTick) {
const startTime = this._currentTickTime;
let lastCurrentTime = 0;
let count = 0;
while (this._schedulerQueue.length > 0) {
count++;
if (count > limit) {
throw new Error('flush failed after reaching the limit of ' +
limit +
' tasks. Does your code use a polling timeout?');
}
// 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;
}
const current = this._schedulerQueue.shift();
lastCurrentTime = this._currentTickTime;
this._currentTickTime = current.endTime;
if (doTick) {
// Update any secondary schedulers like Jasmine mock Date.
doTick(this._currentTickTime - lastCurrentTime);
}
const retval = current.func.apply(global, current.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
return this._currentTickTime - startTime;
}
}
class FakeAsyncTestZoneSpec {
trackPendingRequestAnimationFrame;
macroTaskOptions;
static assertInZone() {
if (Zone.current.get('FakeAsyncTestZoneSpec') == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
_scheduler = new Scheduler();
_microtasks = [];
_lastError = null;
_uncaughtPromiseErrors = Promise[Zone.__symbol__('uncaughtPromiseErrors')];
pendingPeriodicTimers = [];
pendingTimers = [];
patchDateLocked = false;
constructor(namePrefix, trackPendingRequestAnimationFrame = false, macroTaskOptions) {
this.trackPendingRequestAnimationFrame = trackPendingRequestAnimationFrame;
this.macroTaskOptions = macroTaskOptions;
this.name = 'fakeAsyncTestZone for ' + namePrefix;
// in case user can't access the construction of FakeAsyncTestSpec
// user can also define macroTaskOptions by define a global variable.
if (!this.macroTaskOptions) {
this.macroTaskOptions = global[Zone.__symbol__('FakeAsyncTestMacroTask')];
}
}
_fnAndFlush(fn, completers) {
return (...args) => {
fn.apply(global, args);
if (this._lastError === null) {
// Success
if (completers.onSuccess != null) {
completers.onSuccess.apply(global);
}
// Flush microtasks only on success.
this.flushMicrotasks();
}
else {
// Failure
if (completers.onError != null) {
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
return this._lastError === null;
};
}
static _removeTimer(timers, id) {
let index = timers.indexOf(id);
if (index > -1) {
timers.splice(index, 1);
}
}
_dequeueTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
};
}
_requeuePeriodicTimer(fn, interval, args, id) {
return () => {
// Requeue the timer callback if it's not been canceled.
if (this.pendingPeriodicTimers.indexOf(id) !== -1) {
this._scheduler.scheduleFunction(fn, interval, {
args,
isPeriodic: true,
id,
isRequeuePeriodic: true,
});
}
};
}
_dequeuePeriodicTimer(id) {
return () => {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
};
}
_setTimeout(fn, delay, args, isTimer = true) {
let removeTimerFn = this._dequeueTimer(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, isRequestAnimationFrame: !isTimer });
if (isTimer) {
this.pendingTimers.push(id);
}
return id;
}
_clearTimeout(id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
}
_setInterval(fn, interval, args) {
let id = Scheduler.nextId;
let completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
let cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, { args, isPeriodic: true });
this.pendingPeriodicTimers.push(id);
return id;
}
_clearInterval(id) {
FakeAsyncTestZoneSpec._removeTimer(this.pendingPeriodicTimers, id);
this._scheduler.removeScheduledFunctionWithId(id);
}
_resetLastErrorAndThrow() {
let error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
}
getCurrentTickTime() {
return this._scheduler.getCurrentTickTime();
}
getFakeSystemTime() {
return this._scheduler.getFakeSystemTime();
}
setFakeBaseSystemTime(realTime) {
this._scheduler.setFakeBaseSystemTime(realTime);
}
getRealSystemTime() {
return this._scheduler.getRealSystemTime();
}
static patchDate() {
if (!!global[Zone.__symbol__('disableDatePatching')]) {
// we don't want to patch global Date
// because in some case, global Date
// is already being patched, we need to provide
// an option to let user still use their
// own version of Date.
return;
}
if (global['Date'] === FakeDate) {
// already patched
return;
}
global['Date'] = FakeDate;
FakeDate.prototype = OriginalDate.prototype;
// try check and reset timers
// because jasmine.clock().install() may
// have replaced the global timer
FakeAsyncTestZoneSpec.checkTimerPatch();
}
static resetDate() {
if (global['Date'] === FakeDate) {
global['Date'] = OriginalDate;
}
}
static checkTimerPatch() {
if (!patchedTimers) {
throw new Error('Expected timers to have been patched.');
}
if (global.setTimeout !== patchedTimers.setTimeout) {
global.setTimeout = patchedTimers.setTimeout;
global.clearTimeout = patchedTimers.clearTimeout;
}
if (global.setInterval !== patchedTimers.setInterval) {
global.setInterval = patchedTimers.setInterval;
global.clearInterval = patchedTimers.clearInterval;
}
}
lockDatePatch() {
this.patchDateLocked = true;
FakeAsyncTestZoneSpec.patchDate();
}
unlockDatePatch() {
this.patchDateLocked = false;
FakeAsyncTestZoneSpec.resetDate();
}
tickToNext(steps = 1, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
if (steps <= 0) {
return;
}
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tickToNext(steps, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
}
tick(millis = 0, doTick, tickOptions = { processNewMacroTasksSynchronously: true }) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
this._scheduler.tick(millis, doTick, tickOptions);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
}
flushMicrotasks() {
FakeAsyncTestZoneSpec.assertInZone();
const flushErrors = () => {
if (this._lastError !== null || this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
this._resetLastErrorAndThrow();
}
};
while (this._microtasks.length > 0) {
let microtask = this._microtasks.shift();
microtask.func.apply(microtask.target, microtask.args);
}
flushErrors();
}
flush(limit, flushPeriodic, doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flush(limit, flushPeriodic, doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
}
flushOnlyPendingTimers(doTick) {
FakeAsyncTestZoneSpec.assertInZone();
this.flushMicrotasks();
const elapsed = this._scheduler.flushOnlyPendingTimers(doTick);
if (this._lastError !== null) {
this._resetLastErrorAndThrow();
}
return elapsed;
}
removeAllTimers() {
FakeAsyncTestZoneSpec.assertInZone();
this._scheduler.removeAll();
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
}
getTimerCount() {
return this._scheduler.getTimerCount() + this._microtasks.length;
}
// ZoneSpec implementation below.
name;
properties = { 'FakeAsyncTestZoneSpec': this };
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
let args = task.data && task.data.args;
// should pass additional arguments to callback if have any
// currently we know process.nextTick will have such additional
// arguments
let additionalArgs;
if (args) {
let callbackIndex = task.data.cbIdx;
if (typeof args.length === 'number' && args.length > callbackIndex + 1) {
additionalArgs = Array.prototype.slice.call(args, callbackIndex + 1);
}
}
this._microtasks.push({
func: task.invoke,
args: additionalArgs,
target: task.data && task.data.target,
});
break;
case 'macroTask':
switch (task.source) {
case 'setTimeout':
task.data['handleId'] = this._setTimeout(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'setImmediate':
task.data['handleId'] = this._setTimeout(task.invoke, 0, Array.prototype.slice.call(task.data['args'], 1));
break;
case 'setInterval':
task.data['handleId'] = this._setInterval(task.invoke, task.data['delay'], Array.prototype.slice.call(task.data['args'], 2));
break;
case 'XMLHttpRequest.send':
throw new Error('Cannot make XHRs from within a fake async test. Request URL: ' +
task.data['url']);
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
// Simulate a requestAnimationFrame by using a setTimeout with 16 ms.
// (60 frames per second)
task.data['handleId'] = this._setTimeout(task.invoke, 16, task.data['args'], this.trackPendingRequestAnimationFrame);
break;
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const args = task.data && task.data['args'];
const delay = args && args.length > 1 ? args[1] : 0;
let callbackArgs = macroTaskOption.callbackArgs ? macroTaskOption.callbackArgs : args;
if (!!macroTaskOption.isPeriodic) {
// periodic macroTask, use setInterval to simulate
task.data['handleId'] = this._setInterval(task.invoke, delay, callbackArgs);
task.data.isPeriodic = true;
}
else {
// not periodic, use setTimeout to simulate
task.data['handleId'] = this._setTimeout(task.invoke, delay, callbackArgs);
}
break;
}
throw new Error('Unknown macroTask scheduled in fake async test: ' + task.source);
}
break;
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
}
onCancelTask(delegate, current, target, task) {
switch (task.source) {
case 'setTimeout':
case 'requestAnimationFrame':
case 'webkitRequestAnimationFrame':
case 'mozRequestAnimationFrame':
return this._clearTimeout(task.data['handleId']);
case 'setInterval':
return this._clearInterval(task.data['handleId']);
default:
// user can define which macroTask they want to support by passing
// macroTaskOptions
const macroTaskOption = this.findMacroTaskOption(task);
if (macroTaskOption) {
const handleId = task.data['handleId'];
return macroTaskOption.isPeriodic
? this._clearInterval(handleId)
: this._clearTimeout(handleId);
}
return delegate.cancelTask(target, task);
}
}
onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {
try {
FakeAsyncTestZoneSpec.patchDate();
return delegate.invoke(target, callback, applyThis, applyArgs, source);
}
finally {
if (!this.patchDateLocked) {
FakeAsyncTestZoneSpec.resetDate();
}
}
}
findMacroTaskOption(task) {
if (!this.macroTaskOptions) {
return null;
}
for (let i = 0; i < this.macroTaskOptions.length; i++) {
const macroTaskOption = this.macroTaskOptions[i];
if (macroTaskOption.source === task.source) {
return macroTaskOption;
}
}
return null;
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
// ComponentFixture has a special-case handling to detect FakeAsyncTestZoneSpec
// and prevent rethrowing the error from the onError subscription since it's handled here.
this._lastError = error;
return false; // Don't propagate error to parent zone.
}
}
let _fakeAsyncTestZoneSpec = null;
function getProxyZoneSpec() {
return Zone && Zone['ProxyZoneSpec'];
}
let _sharedProxyZoneSpec = null;
let _sharedProxyZone = null;
/**
* Clears out the shared fake async zone for a test.
* To be called in a global `beforeEach`.
*
* @experimental
*/
function resetFakeAsyncZone() {
if (_fakeAsyncTestZoneSpec) {
_fakeAsyncTestZoneSpec.unlockDatePatch();
}
_fakeAsyncTestZoneSpec = null;
getProxyZoneSpec()?.get()?.resetDelegate();
_sharedProxyZoneSpec?.resetDelegate();
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* When flush is `false`, if there are any pending timers at the end of the function,
* an exception will be thrown.
*
* Can be used to wrap inject() calls.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @param fn
* @param options
* flush: when true, will drain the macrotask queue after the test function completes.
* @returns The function wrapped to be executed in the fakeAsync zone
*
* @experimental
*/
function fakeAsync(fn, options = {}) {
const { flush = true } = options;
// Not using an arrow function to preserve context passed from call site
const fakeAsyncFn = function (...args) {
const ProxyZoneSpec = getProxyZoneSpec();
if (!ProxyZoneSpec) {
throw new Error('ProxyZoneSpec is needed for the fakeAsync() test helper but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
const proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (Zone.current.get('FakeAsyncTestZoneSpec')) {
throw new Error('fakeAsync() calls can not be nested');
}
try {
// in case jasmine.clock init a fakeAsyncTestZoneSpec
if (!_fakeAsyncTestZoneSpec) {
const FakeAsyncTestZoneSpec = Zone && Zone['FakeAsyncTestZoneSpec'];
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();
}
let res;
const lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec.lockDatePatch();
try {
res = fn.apply(this, args);
if (flush) {
_fakeAsyncTestZoneSpec.flush(20, true);
}
else {
flushMicrotasks();
}
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
if (!flush) {
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +
`periodic timer(s) still in the queue.`);
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new Error(`${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);
}
}
return res;
}
finally {
resetFakeAsyncZone();
}
};
fakeAsyncFn.isFakeAsync = true;
return fakeAsyncFn;
}
function _getFakeAsyncZoneSpec() {
if (_fakeAsyncTestZoneSpec == null) {
_fakeAsyncTestZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (_fakeAsyncTestZoneSpec == null) {
throw new Error('The code should be running in the fakeAsync zone to call this function');
}
}
return _fakeAsyncTestZoneSpec;
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer
* callback has been executed.
*
* ## Example
*
* {@example core/testing/ts/fake_async.ts region='basic'}
*
* @experimental
*/
function tick(millis = 0, ignoreNestedTimeout = false) {
_getFakeAsyncZoneSpec().tick(millis, null, ignoreNestedTimeout);
}
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
* draining the macrotask queue until it is empty. The returned value is the milliseconds
* of time that would have been elapsed.
*
* @param maxTurns
* @returns The simulated time elapsed, in millis.
*
* @experimental
*/
function flush(maxTurns) {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
*
* @experimental
*/
function discardPeriodicTasks() {
const zoneSpec = _getFakeAsyncZoneSpec();
zoneSpec.pendingPeriodicTimers;
zoneSpec.pendingPeriodicTimers.length = 0;
}
/**
* Wraps a function to be executed in a shared ProxyZone.
*
* If no shared ProxyZone exists, one is created and reused for subsequent calls.
* Useful for wrapping test setup (beforeEach) and test execution (it) when test
* runner patching isn't available or desired for setting up the ProxyZone.
*
* @param fn The function to wrap.
* @returns A function that executes the original function within the shared ProxyZone.
*
* @experimental
*/
function withProxyZone(fn) {
const autoProxyFn = function (...args) {
const proxyZoneSpec = getProxyZoneSpec();
if (proxyZoneSpec === undefined) {
throw new Error('ProxyZoneSpec is needed for the withProxyZone() test helper but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
const proxyZone = proxyZoneSpec.get() !== undefined ? Zone.current : getOrCreateRootProxy();
return proxyZone.run(fn, this, args);
};
return autoProxyFn;
}
function getOrCreateRootProxy() {
const ProxyZoneSpec = getProxyZoneSpec();
if (ProxyZoneSpec === undefined) {
throw new Error('ProxyZoneSpec is needed for withProxyZone but could not be found. ' +
'Make sure that your environment includes zone-testing.js');
}
// Ensure the shared ProxyZoneSpec instance exists
if (_sharedProxyZoneSpec === null) {
_sharedProxyZoneSpec = new ProxyZoneSpec();
}
_sharedProxyZone = Zone.root.fork(_sharedProxyZoneSpec);
return _sharedProxyZone;
}
/**
* Flush any pending microtasks.
*
* @experimental
*/
function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
function patchFakeAsyncTest(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
Zone.__load_patch('fakeasync', (global, Zone, api) => {
Zone[api.symbol('fakeAsyncTest')] = {
resetFakeAsyncZone,
flushMicrotasks,
discardPeriodicTasks,
tick,
flush,
fakeAsync,
withProxyZone,
};
}, true);
patchedTimers = {
setTimeout: global.setTimeout,
setInterval: global.setInterval,
clearTimeout: global.clearTimeout,
clearInterval: global.clearInterval,
nativeSetTimeout: global[Zone.__symbol__('setTimeout')],
nativeClearTimeout: global[Zone.__symbol__('clearTimeout')],
};
Scheduler.nextId = Scheduler.getNextId();
}
patchFakeAsyncTest(Zone);

6
node_modules/zone.js/fesm2015/fake-async-test.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

336
node_modules/zone.js/fesm2015/jasmine-patch.js generated vendored Executable file
View File

@@ -0,0 +1,336 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchJasmine(Zone) {
Zone.__load_patch('jasmine', (global, Zone, api) => {
const __extends = function (d, b) {
for (const p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error('Missing: zone.js');
if (typeof jest !== 'undefined') {
// return if jasmine is a light implementation inside jest
// in this case, we are running inside jest not jasmine
return;
}
if (typeof jasmine == 'undefined' || jasmine['__zone_patch__']) {
return;
}
jasmine['__zone_patch__'] = true;
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error('Missing: ProxyZoneSpec');
const ambientZone = Zone.current;
const symbol = Zone.__symbol__;
// whether patch jasmine clock when in fakeAsync
const disablePatchingJasmineClock = global[symbol('fakeAsyncDisablePatchingClock')] === true;
// the original variable name fakeAsyncPatchLock is not accurate, so the name will be
// fakeAsyncAutoFakeAsyncWhenClockPatched and if this enablePatchingJasmineClock is false, we
// also automatically disable the auto jump into fakeAsync feature
const enableAutoFakeAsyncWhenClockPatched = !disablePatchingJasmineClock &&
(global[symbol('fakeAsyncPatchLock')] === true ||
global[symbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] === true);
const ignoreUnhandledRejection = global[symbol('ignoreUnhandledRejection')] === true;
if (!ignoreUnhandledRejection) {
const globalErrors = jasmine.GlobalErrors;
if (globalErrors && !jasmine[symbol('GlobalErrors')]) {
jasmine[symbol('GlobalErrors')] = globalErrors;
jasmine.GlobalErrors = function () {
const instance = new globalErrors();
const originalInstall = instance.install;
if (originalInstall && !instance[symbol('install')]) {
instance[symbol('install')] = originalInstall;
instance.install = function () {
const isNode = typeof process !== 'undefined' && !!process.on;
// Note: Jasmine checks internally if `process` and `process.on` is defined.
// Otherwise, it installs the browser rejection handler through the
// `global.addEventListener`. This code may be run in the browser environment where
// `process` is not defined, and this will lead to a runtime exception since webpack 5
// removed automatic Node.js polyfills. Note, that events are named differently, it's
// `unhandledRejection` in Node.js and `unhandledrejection` in the browser.
const originalHandlers = isNode
? process.listeners('unhandledRejection')
: global.eventListeners('unhandledrejection');
const result = originalInstall.apply(this, arguments);
isNode
? process.removeAllListeners('unhandledRejection')
: global.removeAllListeners('unhandledrejection');
if (originalHandlers) {
originalHandlers.forEach((handler) => {
if (isNode) {
process.on('unhandledRejection', handler);
}
else {
global.addEventListener('unhandledrejection', handler);
}
});
}
return result;
};
}
return instance;
};
}
}
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
const jasmineEnv = jasmine.getEnv();
['describe', 'xdescribe', 'fdescribe'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[methodName] = function (description, specDefinitions) {
return originalJasmineFn.call(this, description, wrapDescribeInZone(description, specDefinitions));
};
});
['it', 'xit', 'fit'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (description, specDefinitions, timeout) {
arguments[1] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach((methodName) => {
let originalJasmineFn = jasmineEnv[methodName];
jasmineEnv[symbol(methodName)] = originalJasmineFn;
jasmineEnv[methodName] = function (specDefinitions, timeout) {
arguments[0] = wrapTestInZone(specDefinitions);
return originalJasmineFn.apply(this, arguments);
};
});
if (!disablePatchingJasmineClock) {
// need to patch jasmine.clock().mockDate and jasmine.clock().tick() so
// they can work properly in FakeAsyncTest
const originalClockFn = (jasmine[symbol('clock')] = jasmine['clock']);
jasmine['clock'] = function () {
const clock = originalClockFn.apply(this, arguments);
if (!clock[symbol('patched')]) {
clock[symbol('patched')] = symbol('patched');
const originalTick = (clock[symbol('tick')] = clock.tick);
clock.tick = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
return fakeAsyncZoneSpec.tick.apply(fakeAsyncZoneSpec, arguments);
}
return originalTick.apply(this, arguments);
};
const originalMockDate = (clock[symbol('mockDate')] = clock.mockDate);
clock.mockDate = function () {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec) {
const dateTime = arguments.length > 0 ? arguments[0] : new Date();
return fakeAsyncZoneSpec.setFakeBaseSystemTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function'
? [dateTime.getTime()]
: arguments);
}
return originalMockDate.apply(this, arguments);
};
// for auto go into fakeAsync feature, we need the flag to enable it
if (enableAutoFakeAsyncWhenClockPatched) {
['install', 'uninstall'].forEach((methodName) => {
const originalClockFn = (clock[symbol(methodName)] = clock[methodName]);
clock[methodName] = function () {
const FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
if (FakeAsyncTestZoneSpec) {
jasmine[symbol('clockInstalled')] = 'install' === methodName;
return;
}
return originalClockFn.apply(this, arguments);
};
});
}
}
return clock;
};
}
// monkey patch createSpyObj to make properties enumerable to true
if (!jasmine[Zone.__symbol__('createSpyObj')]) {
const originalCreateSpyObj = jasmine.createSpyObj;
jasmine[Zone.__symbol__('createSpyObj')] = originalCreateSpyObj;
jasmine.createSpyObj = function () {
const args = Array.prototype.slice.call(arguments);
const propertyNames = args.length >= 3 ? args[2] : null;
let spyObj;
if (propertyNames) {
const defineProperty = Object.defineProperty;
Object.defineProperty = function (obj, p, attributes) {
return defineProperty.call(this, obj, p, {
...attributes,
configurable: true,
enumerable: true,
});
};
try {
spyObj = originalCreateSpyObj.apply(this, args);
}
finally {
Object.defineProperty = defineProperty;
}
}
else {
spyObj = originalCreateSpyObj.apply(this, args);
}
return spyObj;
};
}
/**
* Gets a function wrapping the body of a Jasmine `describe` block to execute in a
* synchronous-only zone.
*/
function wrapDescribeInZone(description, describeBody) {
return function () {
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe`.
const syncZone = ambientZone.fork(new SyncTestZoneSpec(`jasmine.describe#${description}`));
return syncZone.run(describeBody, this, arguments);
};
}
function runInTestZone(testBody, applyThis, queueRunner, done) {
const isClockInstalled = !!jasmine[symbol('clockInstalled')];
queueRunner.testProxyZoneSpec;
const testProxyZone = queueRunner.testProxyZone;
if (isClockInstalled && enableAutoFakeAsyncWhenClockPatched) {
// auto run a fakeAsync
const fakeAsyncModule = Zone[Zone.__symbol__('fakeAsyncTest')];
if (fakeAsyncModule && typeof fakeAsyncModule.fakeAsync === 'function') {
testBody = fakeAsyncModule.fakeAsync(testBody);
}
}
if (done) {
return testProxyZone.run(testBody, applyThis, [done]);
}
else {
return testProxyZone.run(testBody, applyThis);
}
}
/**
* Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
* execute in a ProxyZone zone.
* This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
*/
function wrapTestInZone(testBody) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody &&
(testBody.length
? function (done) {
return runInTestZone(testBody, this, this.queueRunner, done);
}
: function () {
return runInTestZone(testBody, this, this.queueRunner);
}));
}
const QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
__extends(ZoneQueueRunner, _super);
function ZoneQueueRunner(attrs) {
if (attrs.onComplete) {
attrs.onComplete = ((fn) => () => {
// All functions are done, clear the test zone.
this.testProxyZone = null;
this.testProxyZoneSpec = null;
ambientZone.scheduleMicroTask('jasmine.onComplete', fn);
})(attrs.onComplete);
}
const nativeSetTimeout = global[Zone.__symbol__('setTimeout')];
const nativeClearTimeout = global[Zone.__symbol__('clearTimeout')];
if (nativeSetTimeout) {
// should run setTimeout inside jasmine outside of zone
attrs.timeout = {
setTimeout: nativeSetTimeout ? nativeSetTimeout : global.setTimeout,
clearTimeout: nativeClearTimeout ? nativeClearTimeout : global.clearTimeout,
};
}
// create a userContext to hold the queueRunner itself
// so we can access the testProxy in it/xit/beforeEach ...
if (jasmine.UserContext) {
if (!attrs.userContext) {
attrs.userContext = new jasmine.UserContext();
}
attrs.userContext.queueRunner = this;
}
else {
if (!attrs.userContext) {
attrs.userContext = {};
}
attrs.userContext.queueRunner = this;
}
// patch attrs.onException
const onException = attrs.onException;
attrs.onException = function (error) {
if (error &&
error.message ===
'Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.') {
// jasmine timeout, we can make the error message more
// reasonable to tell what tasks are pending
const proxyZoneSpec = this && this.testProxyZoneSpec;
if (proxyZoneSpec) {
const pendingTasksInfo = proxyZoneSpec.getAndClearPendingTasksInfo();
try {
// try catch here in case error.message is not writable
error.message += pendingTasksInfo;
}
catch (err) { }
}
}
if (onException) {
onException.call(this, error);
}
};
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
let zone = Zone.current;
let isChildOfAmbientZone = false;
while (zone) {
if (zone === ambientZone) {
isChildOfAmbientZone = true;
break;
}
zone = zone.parent;
}
if (!isChildOfAmbientZone)
throw new Error('Unexpected Zone: ' + Zone.current.name);
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
this.testProxyZoneSpec = new ProxyZoneSpec();
this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', () => QueueRunner.prototype.execute.call(this));
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
})(QueueRunner);
});
}
patchJasmine(Zone);

6
node_modules/zone.js/fesm2015/jasmine-patch.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchJasmine(e){e.__load_patch("jasmine",((e,n,t)=>{if(!n)throw new Error("Missing: zone.js");if("undefined"!=typeof jest)return;if("undefined"==typeof jasmine||jasmine.__zone_patch__)return;jasmine.__zone_patch__=!0;const o=n.SyncTestZoneSpec,s=n.ProxyZoneSpec;if(!o)throw new Error("Missing: SyncTestZoneSpec");if(!s)throw new Error("Missing: ProxyZoneSpec");const r=n.current,c=n.__symbol__,i=!0===e[c("fakeAsyncDisablePatchingClock")],a=!i&&(!0===e[c("fakeAsyncPatchLock")]||!0===e[c("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[c("ignoreUnhandledRejection")]){const n=jasmine.GlobalErrors;n&&!jasmine[c("GlobalErrors")]&&(jasmine[c("GlobalErrors")]=n,jasmine.GlobalErrors=function(){const t=new n,o=t.install;return o&&!t[c("install")]&&(t[c("install")]=o,t.install=function(){const n="undefined"!=typeof process&&!!process.on,t=n?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),s=o.apply(this,arguments);return n?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),t&&t.forEach((t=>{n?process.on("unhandledRejection",t):e.addEventListener("unhandledrejection",t)})),s}),t})}const l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((e=>{let n=l[e];l[e]=function(e,t){return n.call(this,e,function s(e,n){return function(){return r.fork(new o(`jasmine.describe#${e}`)).run(n,this,arguments)}}(e,t))}})),["it","xit","fit"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t,o){return arguments[1]=p(t),n.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((e=>{let n=l[e];l[c(e)]=n,l[e]=function(e,t){return arguments[0]=p(e),n.apply(this,arguments)}})),!i){const e=jasmine[c("clock")]=jasmine.clock;jasmine.clock=function(){const t=e.apply(this,arguments);if(!t[c("patched")]){t[c("patched")]=c("patched");const e=t[c("tick")]=t.tick;t.tick=function(){const t=n.current.get("FakeAsyncTestZoneSpec");return t?t.tick.apply(t,arguments):e.apply(this,arguments)};const o=t[c("mockDate")]=t.mockDate;t.mockDate=function(){const e=n.current.get("FakeAsyncTestZoneSpec");if(e){const n=arguments.length>0?arguments[0]:new Date;return e.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return o.apply(this,arguments)},a&&["install","uninstall"].forEach((e=>{const o=t[c(e)]=t[e];t[e]=function(){if(!n.FakeAsyncTestZoneSpec)return o.apply(this,arguments);jasmine[c("clockInstalled")]="install"===e}}))}return t}}if(!jasmine[n.__symbol__("createSpyObj")]){const e=jasmine.createSpyObj;jasmine[n.__symbol__("createSpyObj")]=e,jasmine.createSpyObj=function(){const n=Array.prototype.slice.call(arguments);let t;if(n.length>=3&&n[2]){const o=Object.defineProperty;Object.defineProperty=function(e,n,t){return o.call(this,e,n,{...t,configurable:!0,enumerable:!0})};try{t=e.apply(this,n)}finally{Object.defineProperty=o}}else t=e.apply(this,n);return t}}function u(e,t,o,s){const r=!!jasmine[c("clockInstalled")],i=o.testProxyZone;if(r&&a){const t=n[n.__symbol__("fakeAsyncTest")];t&&"function"==typeof t.fakeAsync&&(e=t.fakeAsync(e))}return s?i.run(e,t,[s]):i.run(e,t)}function p(e){return e&&(e.length?function(n){return u(e,this,this.queueRunner,n)}:function(){return u(e,this,this.queueRunner)})}const f=jasmine.QueueRunner;jasmine.QueueRunner=function(t){function o(o){o.onComplete&&(o.onComplete=(e=>()=>{this.testProxyZone=null,this.testProxyZoneSpec=null,r.scheduleMicroTask("jasmine.onComplete",e)})(o.onComplete));const s=e[n.__symbol__("setTimeout")],c=e[n.__symbol__("clearTimeout")];s&&(o.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(o.userContext||(o.userContext=new jasmine.UserContext),o.userContext.queueRunner=this):(o.userContext||(o.userContext={}),o.userContext.queueRunner=this);const i=o.onException;o.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){const n=this&&this.testProxyZoneSpec;if(n){const t=n.getAndClearPendingTasksInfo();try{e.message+=t}catch(e){}}}i&&i.call(this,e)},t.call(this,o)}return function(e,n){for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);function t(){this.constructor=e}e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(o,t),o.prototype.execute=function(){let e=n.current,o=!1;for(;e;){if(e===r){o=!0;break}e=e.parent}if(!o)throw new Error("Unexpected Zone: "+n.current.name);this.testProxyZoneSpec=new s,this.testProxyZone=r.fork(this.testProxyZoneSpec),n.currentTask?t.prototype.execute.call(this):n.current.scheduleMicroTask("jasmine.execute().forceTask",(()=>f.prototype.execute.call(this)))},o}(f)}))}patchJasmine(Zone);

169
node_modules/zone.js/fesm2015/long-stack-trace-zone.js generated vendored Executable file
View File

@@ -0,0 +1,169 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @fileoverview
* @suppress {globalThis}
*/
function patchLongStackTrace(Zone) {
const NEWLINE = '\n';
const IGNORE_FRAMES = {};
const creationTrace = '__creationTrace__';
const ERROR_TAG = 'STACKTRACE TRACKING';
const SEP_TAG = '__SEP_TAG__';
let sepTemplate = SEP_TAG + '@[native]';
class LongStackTrace {
error = getStacktrace();
timestamp = new Date();
}
function getStacktraceWithUncaughtError() {
return new Error(ERROR_TAG);
}
function getStacktraceWithCaughtError() {
try {
throw getStacktraceWithUncaughtError();
}
catch (err) {
return err;
}
}
// Some implementations of exception handling don't create a stack trace if the exception
// isn't thrown, however it's faster not to actually throw the exception.
const error = getStacktraceWithUncaughtError();
const caughtError = getStacktraceWithCaughtError();
const getStacktrace = error.stack
? getStacktraceWithUncaughtError
: caughtError.stack
? getStacktraceWithCaughtError
: getStacktraceWithUncaughtError;
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
function addErrorStack(lines, error) {
let trace = getFrames(error);
for (let i = 0; i < trace.length; i++) {
const frame = trace[i];
// Filter out the Frames which are part of stack capturing.
if (!IGNORE_FRAMES.hasOwnProperty(frame)) {
lines.push(trace[i]);
}
}
}
function renderLongStackTrace(frames, stack) {
const longTrace = [stack ? stack.trim() : ''];
if (frames) {
let timestamp = new Date().getTime();
for (let i = 0; i < frames.length; i++) {
const traceFrames = frames[i];
const lastTime = traceFrames.timestamp;
let separator = `____________________Elapsed ${timestamp - lastTime.getTime()} ms; At: ${lastTime}`;
separator = separator.replace(/[^\w\d]/g, '_');
longTrace.push(sepTemplate.replace(SEP_TAG, separator));
addErrorStack(longTrace, traceFrames.error);
timestamp = lastTime.getTime();
}
}
return longTrace.join(NEWLINE);
}
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
function stackTracesEnabled() {
// Cast through any since this property only exists on Error in the nodejs
// typings.
return Error.stackTraceLimit > 0;
}
Zone['longStackTraceZoneSpec'] = {
name: 'long-stack-trace',
longStackTraceLimit: 10, // Max number of task to keep the stack trace for.
// add a getLongStackTrace method in spec to
// handle handled reject promise error.
getLongStackTrace: function (error) {
if (!error) {
return undefined;
}
const trace = error[Zone.__symbol__('currentTaskTrace')];
if (!trace) {
return error.stack;
}
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
if (stackTracesEnabled()) {
const currentTask = Zone.currentTask;
let trace = (currentTask && currentTask.data && currentTask.data[creationTrace]) || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
if (!task.data)
task.data = {};
if (task.type === 'eventTask') {
// Fix issue https://github.com/angular/zone.js/issues/1195,
// For event task of browser, by default, all task will share a
// singleton instance of data object, we should create a new one here
// The cast to `any` is required to workaround a closure bug which wrongly applies
// URL sanitization rules to .data access.
task.data = { ...task.data };
}
task.data[creationTrace] = trace;
}
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
if (stackTracesEnabled()) {
const parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
const longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) { }
}
}
return parentZoneDelegate.handleError(targetZone, error);
},
};
function captureStackTraces(stackTraces, count) {
if (count > 0) {
stackTraces.push(getFrames(new LongStackTrace().error));
captureStackTraces(stackTraces, count - 1);
}
}
function computeIgnoreFrames() {
if (!stackTracesEnabled()) {
return;
}
const frames = [];
captureStackTraces(frames, 2);
const frames1 = frames[0];
const frames2 = frames[1];
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
if (frame1.indexOf(ERROR_TAG) == -1) {
let match = frame1.match(/^\s*at\s+/);
if (match) {
sepTemplate = match[0] + SEP_TAG + ' (http://localhost)';
break;
}
}
}
for (let i = 0; i < frames1.length; i++) {
const frame1 = frames1[i];
const frame2 = frames2[i];
if (frame1 === frame2) {
IGNORE_FRAMES[frame1] = true;
}
else {
break;
}
}
}
computeIgnoreFrames();
}
patchLongStackTrace(Zone);

6
node_modules/zone.js/fesm2015/long-stack-trace-zone.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchLongStackTrace(t){const n={},e="__creationTrace__",a="STACKTRACE TRACKING",r="__SEP_TAG__";let c=r+"@[native]";class o{error=u();timestamp=new Date}function s(){return new Error(a)}function i(){try{throw s()}catch(t){return t}}const l=s(),_=i(),u=l.stack?s:_.stack?i:s;function f(t){return t.stack?t.stack.split("\n"):[]}function k(t,e){let a=f(e);for(let e=0;e<a.length;e++)n.hasOwnProperty(a[e])||t.push(a[e])}function h(t,n){const e=[n?n.trim():""];if(t){let n=(new Date).getTime();for(let a=0;a<t.length;a++){const o=t[a],s=o.timestamp;let i=`____________________Elapsed ${n-s.getTime()} ms; At: ${s}`;i=i.replace(/[^\w\d]/g,"_"),e.push(c.replace(r,i)),k(e,o.error),n=s.getTime()}}return e.join("\n")}function T(){return Error.stackTraceLimit>0}function g(t,n){n>0&&(t.push(f((new o).error)),g(t,n-1))}t.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(n){if(!n)return;const e=n[t.__symbol__("currentTaskTrace")];return e?h(e,n.stack):n.stack},onScheduleTask:function(n,a,r,c){if(T()){const n=t.currentTask;let a=n&&n.data&&n.data[e]||[];a=[new o].concat(a),a.length>this.longStackTraceLimit&&(a.length=this.longStackTraceLimit),c.data||(c.data={}),"eventTask"===c.type&&(c.data={...c.data}),c.data[e]=a}return n.scheduleTask(r,c)},onHandleError:function(n,a,r,c){if(T()){const n=t.currentTask||c.task;if(c instanceof Error&&n){const t=h(n.data&&n.data[e],c.stack);try{c.stack=c.longStack=t}catch(t){}}}return n.handleError(r,c)}},function d(){if(!T())return;const t=[];g(t,2);const e=t[0],o=t[1];for(let t=0;t<e.length;t++){const n=e[t];if(-1==n.indexOf(a)){let t=n.match(/^\s*at\s+/);if(t){c=t[0]+r+" (http://localhost)";break}}}for(let t=0;t<e.length;t++){const a=e[t];if(a!==o[t])break;n[a]=!0}}()}patchLongStackTrace(Zone);

157
node_modules/zone.js/fesm2015/mocha-patch.js generated vendored Executable file
View File

@@ -0,0 +1,157 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchMocha(Zone) {
Zone.__load_patch('mocha', (global, Zone) => {
const Mocha = global.Mocha;
if (typeof Mocha === 'undefined') {
// return if Mocha is not available, because now zone-testing
// will load mocha patch with jasmine/jest patch
return;
}
if (typeof Zone === 'undefined') {
throw new Error('Missing Zone.js');
}
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
if (!ProxyZoneSpec) {
throw new Error('Missing ProxyZoneSpec');
}
if (Mocha['__zone_patch__']) {
throw new Error('"Mocha" has already been patched with "Zone".');
}
Mocha['__zone_patch__'] = true;
const rootZone = Zone.current;
const syncZone = rootZone.fork(new SyncTestZoneSpec('Mocha.describe'));
let testZone = null;
const suiteZone = rootZone.fork(new ProxyZoneSpec());
const mochaOriginal = {
after: global.after,
afterEach: global.afterEach,
before: global.before,
beforeEach: global.beforeEach,
describe: global.describe,
it: global.it,
};
function modifyArguments(args, syncTest, asyncTest) {
for (let i = 0; i < args.length; i++) {
let arg = args[i];
if (typeof arg === 'function') {
// The `done` callback is only passed through if the function expects at
// least one argument.
// Note we have to make a function with correct number of arguments,
// otherwise mocha will
// think that all functions are sync or async.
args[i] = arg.length === 0 ? syncTest(arg) : asyncTest(arg);
// Mocha uses toString to view the test body in the result list, make sure we return the
// correct function body
args[i].toString = function () {
return arg.toString();
};
}
}
return args;
}
function wrapDescribeInZone(args) {
const syncTest = function (fn) {
return function () {
return syncZone.run(fn, this, arguments);
};
};
return modifyArguments(args, syncTest);
}
function wrapTestInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return testZone.run(fn, this, [done]);
};
};
const syncTest = function (fn) {
return function () {
return testZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
function wrapSuiteInZone(args) {
const asyncTest = function (fn) {
return function (done) {
return suiteZone.run(fn, this, [done]);
};
};
const syncTest = function (fn) {
return function () {
return suiteZone.run(fn, this);
};
};
return modifyArguments(args, syncTest, asyncTest);
}
global.describe = global.suite = function () {
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
};
global.xdescribe =
global.suite.skip =
global.describe.skip =
function () {
return mochaOriginal.describe.skip.apply(this, wrapDescribeInZone(arguments));
};
global.describe.only = global.suite.only = function () {
return mochaOriginal.describe.only.apply(this, wrapDescribeInZone(arguments));
};
global.it =
global.specify =
global.test =
function () {
return mochaOriginal.it.apply(this, wrapTestInZone(arguments));
};
global.xit =
global.xspecify =
global.it.skip =
function () {
return mochaOriginal.it.skip.apply(this, wrapTestInZone(arguments));
};
global.it.only = global.test.only = function () {
return mochaOriginal.it.only.apply(this, wrapTestInZone(arguments));
};
global.after = global.suiteTeardown = function () {
return mochaOriginal.after.apply(this, wrapSuiteInZone(arguments));
};
global.afterEach = global.teardown = function () {
return mochaOriginal.afterEach.apply(this, wrapTestInZone(arguments));
};
global.before = global.suiteSetup = function () {
return mochaOriginal.before.apply(this, wrapSuiteInZone(arguments));
};
global.beforeEach = global.setup = function () {
return mochaOriginal.beforeEach.apply(this, wrapTestInZone(arguments));
};
((originalRunTest, originalRun) => {
Mocha.Runner.prototype.runTest = function (fn) {
Zone.current.scheduleMicroTask('mocha.forceTask', () => {
originalRunTest.call(this, fn);
});
};
Mocha.Runner.prototype.run = function (fn) {
this.on('test', (e) => {
testZone = rootZone.fork(new ProxyZoneSpec());
});
this.on('fail', (test, err) => {
const proxyZoneSpec = testZone && testZone.get('ProxyZoneSpec');
if (proxyZoneSpec && err) {
try {
// try catch here in case err.message is not writable
err.message += proxyZoneSpec.getAndClearPendingTasksInfo();
}
catch (error) { }
}
});
return originalRun.call(this, fn);
};
})(Mocha.Runner.prototype.runTest, Mocha.Runner.prototype.run);
});
}
patchMocha(Zone);

6
node_modules/zone.js/fesm2015/mocha-patch.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchMocha(t){t.__load_patch("mocha",((t,n)=>{const e=t.Mocha;if(void 0===e)return;if(void 0===n)throw new Error("Missing Zone.js");const r=n.ProxyZoneSpec,o=n.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;const i=n.current,c=i.fork(new o("Mocha.describe"));let u=null;const s=i.fork(new r),f={after:t.after,afterEach:t.afterEach,before:t.before,beforeEach:t.beforeEach,describe:t.describe,it:t.it};function a(t,n,e){for(let r=0;r<t.length;r++){let o=t[r];"function"==typeof o&&(t[r]=0===o.length?n(o):e(o),t[r].toString=function(){return o.toString()})}return t}function h(t){return a(t,(function(t){return function(){return c.run(t,this,arguments)}}))}function p(t){return a(t,(function(t){return function(){return u.run(t,this)}}),(function(t){return function(n){return u.run(t,this,[n])}}))}function l(t){return a(t,(function(t){return function(){return s.run(t,this)}}),(function(t){return function(n){return s.run(t,this,[n])}}))}var y,d;t.describe=t.suite=function(){return f.describe.apply(this,h(arguments))},t.xdescribe=t.suite.skip=t.describe.skip=function(){return f.describe.skip.apply(this,h(arguments))},t.describe.only=t.suite.only=function(){return f.describe.only.apply(this,h(arguments))},t.it=t.specify=t.test=function(){return f.it.apply(this,p(arguments))},t.xit=t.xspecify=t.it.skip=function(){return f.it.skip.apply(this,p(arguments))},t.it.only=t.test.only=function(){return f.it.only.apply(this,p(arguments))},t.after=t.suiteTeardown=function(){return f.after.apply(this,l(arguments))},t.afterEach=t.teardown=function(){return f.afterEach.apply(this,p(arguments))},t.before=t.suiteSetup=function(){return f.before.apply(this,l(arguments))},t.beforeEach=t.setup=function(){return f.beforeEach.apply(this,p(arguments))},y=e.Runner.prototype.runTest,d=e.Runner.prototype.run,e.Runner.prototype.runTest=function(t){n.current.scheduleMicroTask("mocha.forceTask",(()=>{y.call(this,t)}))},e.Runner.prototype.run=function(t){return this.on("test",(t=>{u=i.fork(new r)})),this.on("fail",((t,n)=>{const e=u&&u.get("ProxyZoneSpec");if(e&&n)try{n.message+=e.getAndClearPendingTasksInfo()}catch(t){}})),d.call(this,t)}}))}patchMocha(Zone);

177
node_modules/zone.js/fesm2015/proxy.js generated vendored Executable file
View File

@@ -0,0 +1,177 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
class ProxyZoneSpec {
defaultSpecDelegate;
name = 'ProxyZone';
_delegateSpec = null;
properties = { 'ProxyZoneSpec': this };
propertyKeys = null;
lastTaskState = null;
isNeedToTriggerHasTask = false;
tasks = [];
static get() {
return Zone.current.get('ProxyZoneSpec');
}
static isLoaded() {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
}
static assertPresent() {
const spec = ProxyZoneSpec.get();
if (spec === undefined) {
throw new Error(`Expected to be running in 'ProxyZone', but it was not found.`);
}
return spec;
}
constructor(defaultSpecDelegate = null) {
this.defaultSpecDelegate = defaultSpecDelegate;
this.setDelegate(defaultSpecDelegate);
}
setDelegate(delegateSpec) {
const isNewDelegate = this._delegateSpec !== delegateSpec;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach((key) => delete this.properties[key]);
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach((k) => (this.properties[k] = delegateSpec.properties[k]));
}
// if a new delegateSpec was set, check if we need to trigger hasTask
if (isNewDelegate &&
this.lastTaskState &&
(this.lastTaskState.macroTask || this.lastTaskState.microTask)) {
this.isNeedToTriggerHasTask = true;
}
}
getDelegate() {
return this._delegateSpec;
}
resetDelegate() {
this.getDelegate();
this.setDelegate(this.defaultSpecDelegate);
}
tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone) {
if (this.isNeedToTriggerHasTask && this.lastTaskState) {
// last delegateSpec has microTask or macroTask
// should call onHasTask in current delegateSpec
this.isNeedToTriggerHasTask = false;
this.onHasTask(parentZoneDelegate, currentZone, targetZone, this.lastTaskState);
}
}
removeFromTasks(task) {
if (!this.tasks) {
return;
}
for (let i = 0; i < this.tasks.length; i++) {
if (this.tasks[i] === task) {
this.tasks.splice(i, 1);
return;
}
}
}
getAndClearPendingTasksInfo() {
if (this.tasks.length === 0) {
return '';
}
const taskInfo = this.tasks.map((task) => {
const dataInfo = task.data &&
Object.keys(task.data)
.map((key) => {
return key + ':' + task.data[key];
})
.join(',');
return `type: ${task.type}, source: ${task.source}, args: {${dataInfo}}`;
});
const pendingTasksInfo = '--Pending async tasks are: [' + taskInfo + ']';
// clear tasks
this.tasks = [];
return pendingTasksInfo;
}
onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
}
onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
}
onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
}
onScheduleTask(parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.tasks.push(task);
}
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
}
onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onInvokeTask) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
}
onCancelTask(parentZoneDelegate, currentZone, targetZone, task) {
if (task.type !== 'eventTask') {
this.removeFromTasks(task);
}
this.tryTriggerHasTask(parentZoneDelegate, currentZone, targetZone);
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
}
onHasTask(delegate, current, target, hasTaskState) {
this.lastTaskState = hasTaskState;
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
}
}
function patchProxyZoneSpec(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
}
patchProxyZoneSpec(Zone);

6
node_modules/zone.js/fesm2015/proxy.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/class ProxyZoneSpec{defaultSpecDelegate;name="ProxyZone";_delegateSpec=null;properties={ProxyZoneSpec:this};propertyKeys=null;lastTaskState=null;isNeedToTriggerHasTask=!1;tasks=[];static get(){return Zone.current.get("ProxyZoneSpec")}static isLoaded(){return ProxyZoneSpec.get()instanceof ProxyZoneSpec}static assertPresent(){const e=ProxyZoneSpec.get();if(void 0===e)throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e}constructor(e=null){this.defaultSpecDelegate=e,this.setDelegate(e)}setDelegate(e){const t=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((e=>delete this.properties[e])),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((t=>this.properties[t]=e.properties[t]))),t&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)}getDelegate(){return this._delegateSpec}resetDelegate(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)}tryTriggerHasTask(e,t,s){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,s,this.lastTaskState))}removeFromTasks(e){if(this.tasks)for(let t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)}getAndClearPendingTasksInfo(){if(0===this.tasks.length)return"";const e="--Pending async tasks are: ["+this.tasks.map((e=>{const t=e.data&&Object.keys(e.data).map((t=>t+":"+e.data[t])).join(",");return`type: ${e.type}, source: ${e.source}, args: {${t}}`}))+"]";return this.tasks=[],e}onFork(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,s,a):e.fork(s,a)}onIntercept(e,t,s,a,r){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,s,a,r):e.intercept(s,a,r)}onInvoke(e,t,s,a,r,o,n){return this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,s,a,r,o,n):e.invoke(s,a,r,o,n)}onHandleError(e,t,s,a){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,s,a):e.handleError(s,a)}onScheduleTask(e,t,s,a){return"eventTask"!==a.type&&this.tasks.push(a),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,s,a):e.scheduleTask(s,a)}onInvokeTask(e,t,s,a,r,o){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,s,a,r,o):e.invokeTask(s,a,r,o)}onCancelTask(e,t,s,a){return"eventTask"!==a.type&&this.removeFromTasks(a),this.tryTriggerHasTask(e,t,s),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,s,a):e.cancelTask(s,a)}onHasTask(e,t,s,a){this.lastTaskState=a,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,s,a):e.hasTask(s,a)}}function patchProxyZoneSpec(e){e.ProxyZoneSpec=ProxyZoneSpec}patchProxyZoneSpec(Zone);

32
node_modules/zone.js/fesm2015/sync-test.js generated vendored Executable file
View File

@@ -0,0 +1,32 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchSyncTest(Zone) {
class SyncTestZoneSpec {
runZone = Zone.current;
constructor(namePrefix) {
this.name = 'syncTestZone for ' + namePrefix;
}
// ZoneSpec implementation below.
name;
onScheduleTask(delegate, current, target, task) {
switch (task.type) {
case 'microTask':
case 'macroTask':
throw new Error(`Cannot call ${task.source} from within a sync test (${this.name}).`);
case 'eventTask':
task = delegate.scheduleTask(target, task);
break;
}
return task;
}
}
// Export the class so that new instances can be created with proper
// constructor params.
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
}
patchSyncTest(Zone);

6
node_modules/zone.js/fesm2015/sync-test.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchSyncTest(e){e.SyncTestZoneSpec=class{runZone=e.current;constructor(e){this.name="syncTestZone for "+e}name;onScheduleTask(e,s,c,n){switch(n.type){case"microTask":case"macroTask":throw new Error(`Cannot call ${n.source} from within a sync test (${this.name}).`);case"eventTask":n=e.scheduleTask(c,n)}return n}}}patchSyncTest(Zone);

73
node_modules/zone.js/fesm2015/task-tracking.js generated vendored Executable file
View File

@@ -0,0 +1,73 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
/**
* A `TaskTrackingZoneSpec` allows one to track all outstanding Tasks.
*
* This is useful in tests. For example to see which tasks are preventing a test from completing
* or an automated way of releasing all of the event listeners at the end of the test.
*/
class TaskTrackingZoneSpec {
name = 'TaskTrackingZone';
microTasks = [];
macroTasks = [];
eventTasks = [];
properties = { 'TaskTrackingZone': this };
static get() {
return Zone.current.get('TaskTrackingZone');
}
getTasksFor(type) {
switch (type) {
case 'microTask':
return this.microTasks;
case 'macroTask':
return this.macroTasks;
case 'eventTask':
return this.eventTasks;
}
throw new Error('Unknown task format: ' + type);
}
onScheduleTask(parentZoneDelegate, currentZone, targetZone, task) {
task['creationLocation'] = new Error(`Task '${task.type}' from '${task.source}'.`);
const tasks = this.getTasksFor(task.type);
tasks.push(task);
return parentZoneDelegate.scheduleTask(targetZone, task);
}
onCancelTask(parentZoneDelegate, currentZone, targetZone, task) {
const tasks = this.getTasksFor(task.type);
for (let i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.cancelTask(targetZone, task);
}
onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (task.type === 'eventTask' || task.data?.isPeriodic)
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
const tasks = this.getTasksFor(task.type);
for (let i = 0; i < tasks.length; i++) {
if (tasks[i] == task) {
tasks.splice(i, 1);
break;
}
}
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
clearEvents() {
while (this.eventTasks.length) {
Zone.current.cancelTask(this.eventTasks[0]);
}
}
}
function patchTaskTracking(Zone) {
// Export the class so that new instances can be created with proper
// constructor params.
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
}
patchTaskTracking(Zone);

6
node_modules/zone.js/fesm2015/task-tracking.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/class TaskTrackingZoneSpec{name="TaskTrackingZone";microTasks=[];macroTasks=[];eventTasks=[];properties={TaskTrackingZone:this};static get(){return Zone.current.get("TaskTrackingZone")}getTasksFor(e){switch(e){case"microTask":return this.microTasks;case"macroTask":return this.macroTasks;case"eventTask":return this.eventTasks}throw new Error("Unknown task format: "+e)}onScheduleTask(e,s,a,r){return r.creationLocation=new Error(`Task '${r.type}' from '${r.source}'.`),this.getTasksFor(r.type).push(r),e.scheduleTask(a,r)}onCancelTask(e,s,a,r){const t=this.getTasksFor(r.type);for(let e=0;e<t.length;e++)if(t[e]==r){t.splice(e,1);break}return e.cancelTask(a,r)}onInvokeTask(e,s,a,r,t,n){if("eventTask"===r.type||r.data?.isPeriodic)return e.invokeTask(a,r,t,n);const k=this.getTasksFor(r.type);for(let e=0;e<k.length;e++)if(k[e]==r){k.splice(e,1);break}return e.invokeTask(a,r,t,n)}clearEvents(){for(;this.eventTasks.length;)Zone.current.cancelTask(this.eventTasks[0])}}function patchTaskTracking(e){e.TaskTrackingZoneSpec=TaskTrackingZoneSpec}patchTaskTracking(Zone);

71
node_modules/zone.js/fesm2015/webapis-media-query.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchMediaQuery(Zone) {
Zone.__load_patch('mediaQuery', (global, Zone, api) => {
function patchAddListener(proto) {
api.patchMethod(proto, 'addListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = Zone.current.wrap(callback, 'MediaQuery');
callback[api.symbol('mediaQueryCallback')] = wrapperedCallback;
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
});
}
function patchRemoveListener(proto) {
api.patchMethod(proto, 'removeListener', (delegate) => (self, args) => {
const callback = args.length > 0 ? args[0] : null;
if (typeof callback === 'function') {
const wrapperedCallback = callback[api.symbol('mediaQueryCallback')];
if (wrapperedCallback) {
return delegate.call(self, wrapperedCallback);
}
else {
return delegate.apply(self, args);
}
}
else {
return delegate.apply(self, args);
}
});
}
if (global['MediaQueryList']) {
const proto = global['MediaQueryList'].prototype;
patchAddListener(proto);
patchRemoveListener(proto);
}
else if (global['matchMedia']) {
api.patchMethod(global, 'matchMedia', (delegate) => (self, args) => {
const mql = delegate.apply(self, args);
if (mql) {
// try to patch MediaQueryList.prototype
const proto = Object.getPrototypeOf(mql);
if (proto && proto['addListener']) {
// try to patch proto, don't need to worry about patch
// multiple times, because, api.patchEventTarget will check it
patchAddListener(proto);
patchRemoveListener(proto);
patchAddListener(mql);
patchRemoveListener(mql);
}
else if (mql['addListener']) {
// proto not exists, or proto has no addListener method
// try to patch mql instance
patchAddListener(mql);
patchRemoveListener(mql);
}
}
return mql;
});
}
});
}
patchMediaQuery(Zone);

6
node_modules/zone.js/fesm2015/webapis-media-query.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchMediaQuery(e){e.__load_patch("mediaQuery",((e,t,a)=>{function n(e){a.patchMethod(e,"addListener",(e=>(n,r)=>{const c=r.length>0?r[0]:null;if("function"==typeof c){const r=t.current.wrap(c,"MediaQuery");return c[a.symbol("mediaQueryCallback")]=r,e.call(n,r)}return e.apply(n,r)}))}function r(e){a.patchMethod(e,"removeListener",(e=>(t,n)=>{const r=n.length>0?n[0]:null;if("function"==typeof r){const c=r[a.symbol("mediaQueryCallback")];return c?e.call(t,c):e.apply(t,n)}return e.apply(t,n)}))}if(e.MediaQueryList){const t=e.MediaQueryList.prototype;n(t),r(t)}else e.matchMedia&&a.patchMethod(e,"matchMedia",(e=>(t,a)=>{const c=e.apply(t,a);if(c){const e=Object.getPrototypeOf(c);e&&e.addListener?(n(e),r(e),n(c),r(c)):c.addListener&&(n(c),r(c))}return c}))}))}patchMediaQuery(Zone);

21
node_modules/zone.js/fesm2015/webapis-notification.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchNotifications(Zone) {
Zone.__load_patch('notification', (global, Zone, api) => {
const Notification = global['Notification'];
if (!Notification || !Notification.prototype) {
return;
}
const desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
if (!desc || !desc.configurable) {
return;
}
api.patchOnProperties(Notification.prototype, null);
});
}
patchNotifications(Zone);

6
node_modules/zone.js/fesm2015/webapis-notification.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchNotifications(t){t.__load_patch("notification",((t,o,i)=>{const n=t.Notification;if(!n||!n.prototype)return;const r=Object.getOwnPropertyDescriptor(n.prototype,"onerror");r&&r.configurable&&i.patchOnProperties(n.prototype,null)}))}patchNotifications(Zone);

25
node_modules/zone.js/fesm2015/webapis-rtc-peer-connection.js generated vendored Executable file
View File

@@ -0,0 +1,25 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchRtcPeerConnection(Zone) {
Zone.__load_patch('RTCPeerConnection', (global, Zone, api) => {
const RTCPeerConnection = global['RTCPeerConnection'];
if (!RTCPeerConnection) {
return;
}
const addSymbol = api.symbol('addEventListener');
const removeSymbol = api.symbol('removeEventListener');
RTCPeerConnection.prototype.addEventListener = RTCPeerConnection.prototype[addSymbol];
RTCPeerConnection.prototype.removeEventListener = RTCPeerConnection.prototype[removeSymbol];
// RTCPeerConnection extends EventTarget, so we must clear the symbol
// to allow patch RTCPeerConnection.prototype.addEventListener again
RTCPeerConnection.prototype[addSymbol] = null;
RTCPeerConnection.prototype[removeSymbol] = null;
api.patchEventTarget(global, api, [RTCPeerConnection.prototype], { useG: false });
});
}
patchRtcPeerConnection(Zone);

View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchRtcPeerConnection(e){e.__load_patch("RTCPeerConnection",((e,t,o)=>{const n=e.RTCPeerConnection;if(!n)return;const r=o.symbol("addEventListener"),p=o.symbol("removeEventListener");n.prototype.addEventListener=n.prototype[r],n.prototype.removeEventListener=n.prototype[p],n.prototype[r]=null,n.prototype[p]=null,o.patchEventTarget(e,o,[n.prototype],{useG:!1})}))}patchRtcPeerConnection(Zone);

34
node_modules/zone.js/fesm2015/webapis-shadydom.js generated vendored Executable file
View File

@@ -0,0 +1,34 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchShadyDom(Zone) {
Zone.__load_patch('shadydom', (global, Zone, api) => {
// https://github.com/angular/zone.js/issues/782
// in web components, shadydom will patch addEventListener/removeEventListener of
// Node.prototype and WindowPrototype, this will have conflict with zone.js
// so zone.js need to patch them again.
const HTMLSlotElement = global.HTMLSlotElement;
const prototypes = [
Object.getPrototypeOf(window),
Node.prototype,
Text.prototype,
Element.prototype,
HTMLElement.prototype,
HTMLSlotElement && HTMLSlotElement.prototype,
DocumentFragment.prototype,
Document.prototype,
];
prototypes.forEach(function (proto) {
if (proto && proto.hasOwnProperty('addEventListener')) {
proto[Zone.__symbol__('addEventListener')] = null;
proto[Zone.__symbol__('removeEventListener')] = null;
api.patchEventTarget(global, api, [proto]);
}
});
});
}
patchShadyDom(Zone);

6
node_modules/zone.js/fesm2015/webapis-shadydom.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchShadyDom(t){t.__load_patch("shadydom",((t,e,o)=>{const n=t.HTMLSlotElement;[Object.getPrototypeOf(window),Node.prototype,Text.prototype,Element.prototype,HTMLElement.prototype,n&&n.prototype,DocumentFragment.prototype,Document.prototype].forEach((function(n){n&&n.hasOwnProperty("addEventListener")&&(n[e.__symbol__("addEventListener")]=null,n[e.__symbol__("removeEventListener")]=null,o.patchEventTarget(t,o,[n]))}))}))}patchShadyDom(Zone);

115
node_modules/zone.js/fesm2015/wtf.js generated vendored Executable file
View File

@@ -0,0 +1,115 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @fileoverview
* @suppress {missingRequire}
*/
const _global = (typeof window === 'object' && window) || (typeof self === 'object' && self) || global;
function patchWtf(Zone) {
// Detect and setup WTF.
let wtfTrace = null;
let wtfEvents = null;
const wtfEnabled = (function () {
const wtf = _global['wtf'];
if (wtf) {
wtfTrace = wtf.trace;
if (wtfTrace) {
wtfEvents = wtfTrace.events;
return true;
}
}
return false;
})();
class WtfZoneSpec {
name = 'WTF';
static forkInstance = wtfEnabled
? wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)')
: null;
static scheduleInstance = {};
static cancelInstance = {};
static invokeScope = {};
static invokeTaskScope = {};
onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec) {
const retValue = parentZoneDelegate.fork(targetZone, zoneSpec);
WtfZoneSpec.forkInstance(zonePathName(targetZone), retValue.name);
return retValue;
}
onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
const src = source || 'unknown';
let scope = WtfZoneSpec.invokeScope[src];
if (!scope) {
scope = WtfZoneSpec.invokeScope[src] = wtfEvents.createScope(`Zone:invoke:${source}(ascii zone)`);
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));
}
onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
return parentZoneDelegate.handleError(targetZone, error);
}
onScheduleTask(parentZoneDelegate, currentZone, targetZone, task) {
const key = task.type + ':' + task.source;
let instance = WtfZoneSpec.scheduleInstance[key];
if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key] = wtfEvents.createInstance(`Zone:schedule:${key}(ascii zone, any data)`);
}
const retValue = parentZoneDelegate.scheduleTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
}
onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
const source = task.source;
let scope = WtfZoneSpec.invokeTaskScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source] = wtfEvents.createScope(`Zone:invokeTask:${source}(ascii zone)`);
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));
}
onCancelTask(parentZoneDelegate, currentZone, targetZone, task) {
const key = task.source;
let instance = WtfZoneSpec.cancelInstance[key];
if (!instance) {
instance = WtfZoneSpec.cancelInstance[key] = wtfEvents.createInstance(`Zone:cancel:${key}(ascii zone, any options)`);
}
const retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
return retValue;
}
}
function shallowObj(obj, depth) {
if (!obj || !depth)
return null;
const out = {};
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
// explicit : any due to https://github.com/microsoft/TypeScript/issues/33191
let value = obj[key];
switch (typeof value) {
case 'object':
const name = value && value.constructor && value.constructor.name;
value = name == Object.name ? shallowObj(value, depth - 1) : name;
break;
case 'function':
value = value.name || undefined;
break;
}
out[key] = value;
}
}
return out;
}
function zonePathName(zone) {
let name = zone.name;
let localZone = zone.parent;
while (localZone != null) {
name = localZone.name + '::' + name;
localZone = localZone.parent;
}
return name;
}
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
}
patchWtf(Zone);

6
node_modules/zone.js/fesm2015/wtf.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/const _global="object"==typeof window&&window||"object"==typeof self&&self||global;function patchWtf(e){let n=null,c=null;const o=function(){const e=_global.wtf;return!(!e||(n=e.trace,!n)||(c=n.events,0))}();class t{name="WTF";static forkInstance=o?c.createInstance("Zone:fork(ascii zone, ascii newZone)"):null;static scheduleInstance={};static cancelInstance={};static invokeScope={};static invokeTaskScope={};onFork(e,n,c,o){const a=e.fork(c,o);return t.forkInstance(s(c),a.name),a}onInvoke(e,o,a,r,l,i,u){const k=u||"unknown";let f=t.invokeScope[k];return f||(f=t.invokeScope[k]=c.createScope(`Zone:invoke:${u}(ascii zone)`)),n.leaveScope(f(s(a)),e.invoke(a,r,l,i,u))}onHandleError(e,n,c,o){return e.handleError(c,o)}onScheduleTask(e,n,o,r){const l=r.type+":"+r.source;let i=t.scheduleInstance[l];i||(i=t.scheduleInstance[l]=c.createInstance(`Zone:schedule:${l}(ascii zone, any data)`));const u=e.scheduleTask(o,r);return i(s(o),a(r.data,2)),u}onInvokeTask(e,o,a,r,l,i){const u=r.source;let k=t.invokeTaskScope[u];return k||(k=t.invokeTaskScope[u]=c.createScope(`Zone:invokeTask:${u}(ascii zone)`)),n.leaveScope(k(s(a)),e.invokeTask(a,r,l,i))}onCancelTask(e,n,o,r){const l=r.source;let i=t.cancelInstance[l];i||(i=t.cancelInstance[l]=c.createInstance(`Zone:cancel:${l}(ascii zone, any options)`));const u=e.cancelTask(o,r);return i(s(o),a(r.data,2)),u}}function a(e,n){if(!e||!n)return null;const c={};for(const o in e)if(e.hasOwnProperty(o)){let t=e[o];switch(typeof t){case"object":const e=t&&t.constructor&&t.constructor.name;t=e==Object.name?a(t,n-1):e;break;case"function":t=t.name||void 0}c[o]=t}return c}function s(e){let n=e.name,c=e.parent;for(;null!=c;)n=c.name+"::"+n,c=c.parent;return n}e.wtfZoneSpec=o?new t:null}patchWtf(Zone);

87
node_modules/zone.js/fesm2015/zone-bluebird.js generated vendored Executable file
View File

@@ -0,0 +1,87 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
function patchBluebird(Zone) {
Zone.__load_patch('bluebird', (global, Zone, api) => {
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
// global.Promise is not Bluebird, and Bluebird is just be
// used by other libraries such as sequelize, so I think it is
// safe to just expose a method to patch Bluebird explicitly
const BLUEBIRD = 'bluebird';
Zone[Zone.__symbol__(BLUEBIRD)] = function patchBluebird(Bluebird) {
// patch method of Bluebird.prototype which not using `then` internally
const bluebirdApis = ['then', 'spread', 'finally'];
bluebirdApis.forEach((bapi) => {
api.patchMethod(Bluebird.prototype, bapi, (delegate) => (self, args) => {
const zone = Zone.current;
for (let i = 0; i < args.length; i++) {
const func = args[i];
if (typeof func === 'function') {
args[i] = function () {
const argSelf = this;
const argArgs = arguments;
return new Bluebird((res, rej) => {
zone.scheduleMicroTask('Promise.then', () => {
try {
res(func.apply(argSelf, argArgs));
}
catch (error) {
rej(error);
}
});
});
};
}
}
return delegate.apply(self, args);
});
});
if (typeof window !== 'undefined') {
window.addEventListener('unhandledrejection', function (event) {
const error = event.detail && event.detail.reason;
if (error && error.isHandledByZone) {
event.preventDefault();
if (typeof event.stopImmediatePropagation === 'function') {
event.stopImmediatePropagation();
}
}
});
}
else if (typeof process !== 'undefined') {
process.on('unhandledRejection', (reason, p) => {
if (reason && reason.isHandledByZone) {
const listeners = process.listeners('unhandledRejection');
if (listeners) {
// remove unhandledRejection listeners so the callback
// will not be triggered.
process.removeAllListeners('unhandledRejection');
process.nextTick(() => {
listeners.forEach((listener) => process.on('unhandledRejection', listener));
});
}
}
});
}
Bluebird.onPossiblyUnhandledRejection(function (e, promise) {
try {
Zone.current.runGuarded(() => {
e.isHandledByZone = true;
throw e;
});
}
catch (err) {
err.isHandledByZone = false;
api.onUnhandledError(err);
}
});
// override global promise
global.Promise = Bluebird;
};
});
}
patchBluebird(Zone);

6
node_modules/zone.js/fesm2015/zone-bluebird.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchBluebird(e){e.__load_patch("bluebird",((e,n,o)=>{n[n.__symbol__("bluebird")]=function t(d){["then","spread","finally"].forEach((e=>{o.patchMethod(d.prototype,e,(e=>(o,t)=>{const r=n.current;for(let e=0;e<t.length;e++){const n=t[e];"function"==typeof n&&(t[e]=function(){const e=this,o=arguments;return new d(((t,d)=>{r.scheduleMicroTask("Promise.then",(()=>{try{t(n.apply(e,o))}catch(e){d(e)}}))}))})}return e.apply(o,t)}))})),"undefined"!=typeof window?window.addEventListener("unhandledrejection",(function(e){const n=e.detail&&e.detail.reason;n&&n.isHandledByZone&&(e.preventDefault(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation())})):"undefined"!=typeof process&&process.on("unhandledRejection",((e,n)=>{if(e&&e.isHandledByZone){const e=process.listeners("unhandledRejection");e&&(process.removeAllListeners("unhandledRejection"),process.nextTick((()=>{e.forEach((e=>process.on("unhandledRejection",e)))})))}})),d.onPossiblyUnhandledRejection((function(e,t){try{n.current.runGuarded((()=>{throw e.isHandledByZone=!0,e}))}catch(e){e.isHandledByZone=!1,o.onUnhandledError(e)}})),e.Promise=d}}))}patchBluebird(Zone);

339
node_modules/zone.js/fesm2015/zone-error.js generated vendored Executable file
View File

@@ -0,0 +1,339 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @fileoverview
* @suppress {globalThis,undefinedVars}
*/
function patchError(Zone) {
Zone.__load_patch('Error', (global, Zone, api) => {
/*
* This code patches Error so that:
* - It ignores un-needed stack frames.
* - It Shows the associated Zone for reach frame.
*/
const zoneJsInternalStackFramesSymbol = api.symbol('zoneJsInternalStackFrames');
const NativeError = (global[api.symbol('Error')] = global['Error']);
// Store the frames which should be removed from the stack frames
const zoneJsInternalStackFrames = {};
// We must find the frame where Error was created, otherwise we assume we don't understand stack
let zoneAwareFrame1;
let zoneAwareFrame2;
let zoneAwareFrame1WithoutNew;
let zoneAwareFrame2WithoutNew;
let zoneAwareFrame3WithoutNew;
global['Error'] = ZoneAwareError;
const stackRewrite = 'stackRewrite';
const zoneJsInternalStackFramesPolicy = global['__Zone_Error_BlacklistedStackFrames_policy'] ||
global['__Zone_Error_ZoneJsInternalStackFrames_policy'] ||
'default';
function buildZoneFrameNames(zoneFrame) {
let zoneFrameName = { zoneName: zoneFrame.zone.name };
let result = zoneFrameName;
while (zoneFrame.parent) {
zoneFrame = zoneFrame.parent;
const parentZoneFrameName = { zoneName: zoneFrame.zone.name };
zoneFrameName.parent = parentZoneFrameName;
zoneFrameName = parentZoneFrameName;
}
return result;
}
function buildZoneAwareStackFrames(originalStack, zoneFrame, isZoneFrame = true) {
let frames = originalStack.split('\n');
let i = 0;
// Find the first frame
while (!(frames[i] === zoneAwareFrame1 ||
frames[i] === zoneAwareFrame2 ||
frames[i] === zoneAwareFrame1WithoutNew ||
frames[i] === zoneAwareFrame2WithoutNew ||
frames[i] === zoneAwareFrame3WithoutNew) &&
i < frames.length) {
i++;
}
for (; i < frames.length && zoneFrame; i++) {
let frame = frames[i];
if (frame.trim()) {
switch (zoneJsInternalStackFrames[frame]) {
case 0 /* FrameType.zoneJsInternal */:
frames.splice(i, 1);
i--;
break;
case 1 /* FrameType.transition */:
if (zoneFrame.parent) {
// This is the special frame where zone changed. Print and process it accordingly
zoneFrame = zoneFrame.parent;
}
else {
zoneFrame = null;
}
frames.splice(i, 1);
i--;
break;
default:
frames[i] += isZoneFrame
? ` [${zoneFrame.zone.name}]`
: ` [${zoneFrame.zoneName}]`;
}
}
}
return frames.join('\n');
}
/**
* This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
* adds zone information to it.
*/
function ZoneAwareError() {
// We always have to return native error otherwise the browser console will not work.
let error = NativeError.apply(this, arguments);
// Save original stack trace
const originalStack = (error['originalStack'] = error.stack);
// Process the stack trace and rewrite the frames.
if (ZoneAwareError[stackRewrite] && originalStack) {
let zoneFrame = api.currentZoneFrame();
if (zoneJsInternalStackFramesPolicy === 'lazy') {
// don't handle stack trace now
error[api.symbol('zoneFrameNames')] = buildZoneFrameNames(zoneFrame);
}
else if (zoneJsInternalStackFramesPolicy === 'default') {
try {
error.stack = error.zoneAwareStack = buildZoneAwareStackFrames(originalStack, zoneFrame);
}
catch (e) {
// ignore as some browsers don't allow overriding of stack
}
}
}
if (this instanceof NativeError && this.constructor != NativeError) {
// We got called with a `new` operator AND we are subclass of ZoneAwareError
// in that case we have to copy all of our properties to `this`.
Object.keys(error)
.concat('stack', 'message', 'cause')
.forEach((key) => {
const value = error[key];
if (value !== undefined) {
try {
this[key] = value;
}
catch (e) {
// ignore the assignment in case it is a setter and it throws.
}
}
});
return this;
}
return error;
}
// Copy the prototype so that instanceof operator works as expected
ZoneAwareError.prototype = NativeError.prototype;
ZoneAwareError[zoneJsInternalStackFramesSymbol] = zoneJsInternalStackFrames;
ZoneAwareError[stackRewrite] = false;
const zoneAwareStackSymbol = api.symbol('zoneAwareStack');
// try to define zoneAwareStack property when zoneJsInternal frames policy is delay
if (zoneJsInternalStackFramesPolicy === 'lazy') {
Object.defineProperty(ZoneAwareError.prototype, 'zoneAwareStack', {
configurable: true,
enumerable: true,
get: function () {
if (!this[zoneAwareStackSymbol]) {
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
}
return this[zoneAwareStackSymbol];
},
set: function (newStack) {
this.originalStack = newStack;
this[zoneAwareStackSymbol] = buildZoneAwareStackFrames(this.originalStack, this[api.symbol('zoneFrameNames')], false);
},
});
}
// those properties need special handling
const specialPropertyNames = ['stackTraceLimit', 'captureStackTrace', 'prepareStackTrace'];
// those properties of NativeError should be set to ZoneAwareError
const nativeErrorProperties = Object.keys(NativeError);
if (nativeErrorProperties) {
nativeErrorProperties.forEach((prop) => {
if (specialPropertyNames.filter((sp) => sp === prop).length === 0) {
Object.defineProperty(ZoneAwareError, prop, {
get: function () {
return NativeError[prop];
},
set: function (value) {
NativeError[prop] = value;
},
});
}
});
}
if (NativeError.hasOwnProperty('stackTraceLimit')) {
// Extend default stack limit as we will be removing few frames.
NativeError.stackTraceLimit = Math.max(NativeError.stackTraceLimit, 15);
// make sure that ZoneAwareError has the same property which forwards to NativeError.
Object.defineProperty(ZoneAwareError, 'stackTraceLimit', {
get: function () {
return NativeError.stackTraceLimit;
},
set: function (value) {
return (NativeError.stackTraceLimit = value);
},
});
}
if (NativeError.hasOwnProperty('captureStackTrace')) {
Object.defineProperty(ZoneAwareError, 'captureStackTrace', {
// add named function here because we need to remove this
// stack frame when prepareStackTrace below
value: function zoneCaptureStackTrace(targetObject, constructorOpt) {
NativeError.captureStackTrace(targetObject, constructorOpt);
},
});
}
const ZONE_CAPTURESTACKTRACE = 'zoneCaptureStackTrace';
Object.defineProperty(ZoneAwareError, 'prepareStackTrace', {
get: function () {
return NativeError.prepareStackTrace;
},
set: function (value) {
if (!value || typeof value !== 'function') {
return (NativeError.prepareStackTrace = value);
}
return (NativeError.prepareStackTrace = function (error, structuredStackTrace) {
// remove additional stack information from ZoneAwareError.captureStackTrace
if (structuredStackTrace) {
for (let i = 0; i < structuredStackTrace.length; i++) {
const st = structuredStackTrace[i];
// remove the first function which name is zoneCaptureStackTrace
if (st.getFunctionName() === ZONE_CAPTURESTACKTRACE) {
structuredStackTrace.splice(i, 1);
break;
}
}
}
return value.call(this, error, structuredStackTrace);
});
},
});
if (zoneJsInternalStackFramesPolicy === 'disable') {
// don't need to run detectZone to populate zoneJs internal stack frames
return;
}
// Now we need to populate the `zoneJsInternalStackFrames` as well as find the
// run/runGuarded/runTask frames. This is done by creating a detect zone and then threading
// the execution through all of the above methods so that we can look at the stack trace and
// find the frames of interest.
let detectZone = Zone.current.fork({
name: 'detect',
onHandleError: function (parentZD, current, target, error) {
if (error.originalStack && Error === ZoneAwareError) {
let frames = error.originalStack.split(/\n/);
let runFrame = false, runGuardedFrame = false, runTaskFrame = false;
while (frames.length) {
let frame = frames.shift();
// On safari it is possible to have stack frame with no line number.
// This check makes sure that we don't filter frames on name only (must have
// line number or exact equals to `ZoneAwareError`)
if (/:\d+:\d+/.test(frame) || frame === 'ZoneAwareError') {
// Get rid of the path so that we don't accidentally find function name in path.
// In chrome the separator is `(` and `@` in FF and safari
// Chrome: at Zone.run (zone.js:100)
// Chrome: at Zone.run (http://localhost:9876/base/build/lib/zone.js:100:24)
// FireFox: Zone.prototype.run@http://localhost:9876/base/build/lib/zone.js:101:24
// Safari: run@http://localhost:9876/base/build/lib/zone.js:101:24
let fnName = frame.split('(')[0].split('@')[0];
let frameType = 1 /* FrameType.transition */;
if (fnName.indexOf('ZoneAwareError') !== -1) {
if (fnName.indexOf('new ZoneAwareError') !== -1) {
zoneAwareFrame1 = frame;
zoneAwareFrame2 = frame.replace('new ZoneAwareError', 'new Error.ZoneAwareError');
}
else {
zoneAwareFrame1WithoutNew = frame;
zoneAwareFrame2WithoutNew = frame.replace('Error.', '');
if (frame.indexOf('Error.ZoneAwareError') === -1) {
zoneAwareFrame3WithoutNew = frame.replace('ZoneAwareError', 'Error.ZoneAwareError');
}
}
zoneJsInternalStackFrames[zoneAwareFrame2] = 0 /* FrameType.zoneJsInternal */;
}
if (fnName.indexOf('runGuarded') !== -1) {
runGuardedFrame = true;
}
else if (fnName.indexOf('runTask') !== -1) {
runTaskFrame = true;
}
else if (fnName.indexOf('run') !== -1) {
runFrame = true;
}
else {
frameType = 0 /* FrameType.zoneJsInternal */;
}
zoneJsInternalStackFrames[frame] = frameType;
// Once we find all of the frames we can stop looking.
if (runFrame && runGuardedFrame && runTaskFrame) {
ZoneAwareError[stackRewrite] = true;
break;
}
}
}
}
return false;
},
});
// carefully constructor a stack frame which contains all of the frames of interest which
// need to be detected and marked as an internal zoneJs frame.
const childDetectZone = detectZone.fork({
name: 'child',
onScheduleTask: function (delegate, curr, target, task) {
return delegate.scheduleTask(target, task);
},
onInvokeTask: function (delegate, curr, target, task, applyThis, applyArgs) {
return delegate.invokeTask(target, task, applyThis, applyArgs);
},
onCancelTask: function (delegate, curr, target, task) {
return delegate.cancelTask(target, task);
},
onInvoke: function (delegate, curr, target, callback, applyThis, applyArgs, source) {
return delegate.invoke(target, callback, applyThis, applyArgs, source);
},
});
// we need to detect all zone related frames, it will
// exceed default stackTraceLimit, so we set it to
// larger number here, and restore it after detect finish.
// We cast through any so we don't need to depend on nodejs typings.
const originalStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 100;
// we schedule event/micro/macro task, and invoke them
// when onSchedule, so we can get all stack traces for
// all kinds of tasks with one error thrown.
childDetectZone.run(() => {
childDetectZone.runGuarded(() => {
const fakeTransitionTo = () => { };
childDetectZone.scheduleEventTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMacroTask(zoneJsInternalStackFramesSymbol, () => {
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw new Error();
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
childDetectZone.scheduleMicroTask(zoneJsInternalStackFramesSymbol, () => {
throw Error();
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
});
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, () => { });
}, undefined, (t) => {
t._transitionTo = fakeTransitionTo;
t.invoke();
}, () => { });
});
});
Error.stackTraceLimit = originalStackTraceLimit;
});
}
patchError(Zone);

6
node_modules/zone.js/fesm2015/zone-error.min.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/function patchError(e){e.__load_patch("Error",((e,r,t)=>{const n=t.symbol("zoneJsInternalStackFrames"),a=e[t.symbol("Error")]=e.Error,o={};let c,i,s,l,u;e.Error=h;const k="stackRewrite",f=e.__Zone_Error_BlacklistedStackFrames_policy||e.__Zone_Error_ZoneJsInternalStackFrames_policy||"default";function p(e,r,t=!0){let n=e.split("\n"),a=0;for(;n[a]!==c&&n[a]!==i&&n[a]!==s&&n[a]!==l&&n[a]!==u&&a<n.length;)a++;for(;a<n.length&&r;a++){let e=n[a];if(e.trim())switch(o[e]){case 0:n.splice(a,1),a--;break;case 1:r=r.parent?r.parent:null,n.splice(a,1),a--;break;default:n[a]+=t?` [${r.zone.name}]`:` [${r.zoneName}]`}}return n.join("\n")}function h(){let e=a.apply(this,arguments);const r=e.originalStack=e.stack;if(h[k]&&r){let n=t.currentZoneFrame();if("lazy"===f)e[t.symbol("zoneFrameNames")]=function a(e){let r={zoneName:e.zone.name},t=r;for(;e.parent;){const t={zoneName:(e=e.parent).zone.name};r.parent=t,r=t}return t}(n);else if("default"===f)try{e.stack=e.zoneAwareStack=p(r,n)}catch(e){}}return this instanceof a&&this.constructor!=a?(Object.keys(e).concat("stack","message","cause").forEach((r=>{const t=e[r];if(void 0!==t)try{this[r]=t}catch(e){}})),this):e}h.prototype=a.prototype,h[n]=o,h[k]=!1;const m=t.symbol("zoneAwareStack");"lazy"===f&&Object.defineProperty(h.prototype,"zoneAwareStack",{configurable:!0,enumerable:!0,get:function(){return this[m]||(this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)),this[m]},set:function(e){this.originalStack=e,this[m]=p(this.originalStack,this[t.symbol("zoneFrameNames")],!1)}});const d=["stackTraceLimit","captureStackTrace","prepareStackTrace"],T=Object.keys(a);if(T&&T.forEach((e=>{0===d.filter((r=>r===e)).length&&Object.defineProperty(h,e,{get:function(){return a[e]},set:function(r){a[e]=r}})})),a.hasOwnProperty("stackTraceLimit")&&(a.stackTraceLimit=Math.max(a.stackTraceLimit,15),Object.defineProperty(h,"stackTraceLimit",{get:function(){return a.stackTraceLimit},set:function(e){return a.stackTraceLimit=e}})),a.hasOwnProperty("captureStackTrace")&&Object.defineProperty(h,"captureStackTrace",{value:function e(r,t){a.captureStackTrace(r,t)}}),Object.defineProperty(h,"prepareStackTrace",{get:function(){return a.prepareStackTrace},set:function(e){return a.prepareStackTrace=e&&"function"==typeof e?function(r,t){if(t)for(let e=0;e<t.length;e++)if("zoneCaptureStackTrace"===t[e].getFunctionName()){t.splice(e,1);break}return e.call(this,r,t)}:e}}),"disable"===f)return;const E=r.current.fork({name:"detect",onHandleError:function(e,r,t,n){if(n.originalStack&&Error===h){let e=n.originalStack.split(/\n/),r=!1,t=!1,a=!1;for(;e.length;){let n=e.shift();if(/:\d+:\d+/.test(n)||"ZoneAwareError"===n){let e=n.split("(")[0].split("@")[0],f=1;if(-1!==e.indexOf("ZoneAwareError")&&(-1!==e.indexOf("new ZoneAwareError")?(c=n,i=n.replace("new ZoneAwareError","new Error.ZoneAwareError")):(s=n,l=n.replace("Error.",""),-1===n.indexOf("Error.ZoneAwareError")&&(u=n.replace("ZoneAwareError","Error.ZoneAwareError"))),o[i]=0),-1!==e.indexOf("runGuarded")?t=!0:-1!==e.indexOf("runTask")?a=!0:-1!==e.indexOf("run")?r=!0:f=0,o[n]=f,r&&t&&a){h[k]=!0;break}}}}return!1}}).fork({name:"child",onScheduleTask:function(e,r,t,n){return e.scheduleTask(t,n)},onInvokeTask:function(e,r,t,n,a,o){return e.invokeTask(t,n,a,o)},onCancelTask:function(e,r,t,n){return e.cancelTask(t,n)},onInvoke:function(e,r,t,n,a,o,c){return e.invoke(t,n,a,o,c)}}),y=Error.stackTraceLimit;Error.stackTraceLimit=100,E.run((()=>{E.runGuarded((()=>{const e=()=>{};E.scheduleEventTask(n,(()=>{E.scheduleMacroTask(n,(()=>{E.scheduleMicroTask(n,(()=>{throw new Error}),void 0,(r=>{r._transitionTo=e,r.invoke()})),E.scheduleMicroTask(n,(()=>{throw Error()}),void 0,(r=>{r._transitionTo=e,r.invoke()}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}),void 0,(r=>{r._transitionTo=e,r.invoke()}),(()=>{}))}))})),Error.stackTraceLimit=y}))}patchError(Zone);

702
node_modules/zone.js/fesm2015/zone-legacy.js generated vendored Executable file
View File

@@ -0,0 +1,702 @@
'use strict';
/**
* @license Angular v<unknown>
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
/*
* This is necessary for Chrome and Chrome mobile, to enable
* things like redefining `createdCallback` on an element.
*/
let zoneSymbol;
let _defineProperty;
let _getOwnPropertyDescriptor;
let _create;
let unconfigurablesKey;
function propertyPatch() {
zoneSymbol = Zone.__symbol__;
_defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;
_getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =
Object.getOwnPropertyDescriptor;
_create = Object.create;
unconfigurablesKey = zoneSymbol('unconfigurables');
Object.defineProperty = function (obj, prop, desc) {
if (isUnconfigurable(obj, prop)) {
throw new TypeError("Cannot assign to read only property '" + prop + "' of " + obj);
}
const originalConfigurableFlag = desc.configurable;
if (prop !== 'prototype') {
desc = rewriteDescriptor(obj, prop, desc);
}
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
};
Object.defineProperties = function (obj, props) {
Object.keys(props).forEach(function (prop) {
Object.defineProperty(obj, prop, props[prop]);
});
for (const sym of Object.getOwnPropertySymbols(props)) {
const desc = Object.getOwnPropertyDescriptor(props, sym);
// Since `Object.getOwnPropertySymbols` returns *all* symbols,
// including non-enumerable ones, retrieve property descriptor and check
// enumerability there. Proceed with the rewrite only when a property is
// enumerable to make the logic consistent with the way regular
// properties are retrieved (via `Object.keys`, which respects
// `enumerable: false` flag). More information:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties#retrieval
if (desc?.enumerable) {
Object.defineProperty(obj, sym, props[sym]);
}
}
return obj;
};
Object.create = function (proto, propertiesObject) {
if (typeof propertiesObject === 'object' && !Object.isFrozen(propertiesObject)) {
Object.keys(propertiesObject).forEach(function (prop) {
propertiesObject[prop] = rewriteDescriptor(proto, prop, propertiesObject[prop]);
});
}
return _create(proto, propertiesObject);
};
Object.getOwnPropertyDescriptor = function (obj, prop) {
const desc = _getOwnPropertyDescriptor(obj, prop);
if (desc && isUnconfigurable(obj, prop)) {
desc.configurable = false;
}
return desc;
};
}
function _redefineProperty(obj, prop, desc) {
const originalConfigurableFlag = desc.configurable;
desc = rewriteDescriptor(obj, prop, desc);
return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
}
function isUnconfigurable(obj, prop) {
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}
function rewriteDescriptor(obj, prop, desc) {
// issue-927, if the desc is frozen, don't try to change the desc
if (!Object.isFrozen(desc)) {
desc.configurable = true;
}
if (!desc.configurable) {
// issue-927, if the obj is frozen, don't try to set the desc to obj
if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
}
if (obj[unconfigurablesKey]) {
obj[unconfigurablesKey][prop] = true;
}
}
return desc;
}
function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
if (desc.configurable) {
// In case of errors, when the configurable flag was likely set by rewriteDescriptor(),
// let's retry with the original flag value
if (typeof originalConfigurableFlag == 'undefined') {
delete desc.configurable;
}
else {
desc.configurable = originalConfigurableFlag;
}
try {
return _defineProperty(obj, prop, desc);
}
catch (error) {
let swallowError = false;
if (prop === 'createdCallback' ||
prop === 'attachedCallback' ||
prop === 'detachedCallback' ||
prop === 'attributeChangedCallback') {
// We only swallow the error in registerElement patch
// this is the work around since some applications
// fail if we throw the error
swallowError = true;
}
if (!swallowError) {
throw error;
}
// TODO: @JiaLiPassion, Some application such as `registerElement` patch
// still need to swallow the error, in the future after these applications
// are updated, the following logic can be removed.
let descJson = null;
try {
descJson = JSON.stringify(desc);
}
catch (error) {
descJson = desc.toString();
}
console.log(`Attempting to configure '${prop}' with descriptor '${descJson}' on object '${obj}' and got error, giving up: ${error}`);
}
}
else {
throw error;
}
}
}
function eventTargetLegacyPatch(_global, api) {
const { eventNames, globalSources, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();
const WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
const NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'.split(',');
const EVENT_TARGET = 'EventTarget';
let apis = [];
const isWtf = _global['wtf'];
const WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
if (isWtf) {
// Workaround for: https://github.com/google/tracing-framework/issues/555
apis = WTF_ISSUE_555_ARRAY.map((v) => 'HTML' + v + 'Element').concat(NO_EVENT_TARGET);
}
else if (_global[EVENT_TARGET]) {
apis.push(EVENT_TARGET);
}
else {
// Note: EventTarget is not available in all browsers,
// if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
apis = NO_EVENT_TARGET;
}
const isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
const isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
const ieOrEdge = api.isIEOrEdge();
const ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
const FUNCTION_WRAPPER = '[object FunctionWrapper]';
const BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
const pointerEventsMap = {
'MSPointerCancel': 'pointercancel',
'MSPointerDown': 'pointerdown',
'MSPointerEnter': 'pointerenter',
'MSPointerHover': 'pointerhover',
'MSPointerLeave': 'pointerleave',
'MSPointerMove': 'pointermove',
'MSPointerOut': 'pointerout',
'MSPointerOver': 'pointerover',
'MSPointerUp': 'pointerup',
};
// predefine all __zone_symbol__ + eventName + true/false string
for (let i = 0; i < eventNames.length; i++) {
const eventName = eventNames[i];
const falseEventName = eventName + FALSE_STR;
const trueEventName = eventName + TRUE_STR;
const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
zoneSymbolEventNames[eventName] = {};
zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
}
// predefine all task.source string
for (let i = 0; i < WTF_ISSUE_555_ARRAY.length; i++) {
const target = WTF_ISSUE_555_ARRAY[i];
const targets = (globalSources[target] = {});
for (let j = 0; j < eventNames.length; j++) {
const eventName = eventNames[j];
targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
}
}
const checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
if (!isDisableIECheck && ieOrEdge) {
if (isEnableCrossContextCheck) {
try {
const testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
else {
const testString = delegate.toString();
if (testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS) {
nativeDelegate.apply(target, args);
return false;
}
}
}
else if (isEnableCrossContextCheck) {
try {
delegate.toString();
}
catch (error) {
nativeDelegate.apply(target, args);
return false;
}
}
return true;
};
const apiTypes = [];
for (let i = 0; i < apis.length; i++) {
const type = _global[apis[i]];
apiTypes.push(type && type.prototype);
}
// vh is validateHandler to check event handler
// is valid or not(for security check)
api.patchEventTarget(_global, api, apiTypes, {
vh: checkIEAndCrossContext,
transferEventName: (eventName) => {
const pointerEventName = pointerEventsMap[eventName];
return pointerEventName || eventName;
},
});
Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];
return true;
}
// we have to patch the instance since the proto is non-configurable
function apply(api, _global) {
const { ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR } = api.getGlobalObjects();
const WS = _global.WebSocket;
// On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
// On older Chrome, no need since EventTarget was already patched
if (!_global.EventTarget) {
api.patchEventTarget(_global, api, [WS.prototype]);
}
_global.WebSocket = function (x, y) {
const socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
let proxySocket;
let proxySocketProto;
// Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
const onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
if (onmessageDesc && onmessageDesc.configurable === false) {
proxySocket = api.ObjectCreate(socket);
// socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
// but proxySocket not, so we will keep socket as prototype and pass it to
// patchOnProperties method
proxySocketProto = socket;
[ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
proxySocket[propName] = function () {
const args = api.ArraySlice.call(arguments);
if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
const eventName = args.length > 0 ? args[0] : undefined;
if (eventName) {
const propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
socket[propertySymbol] = proxySocket[propertySymbol];
}
}
return socket[propName].apply(socket, args);
};
});
}
else {
// we can patch the real socket
proxySocket = socket;
}
api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
return proxySocket;
};
const globalWebSocket = _global['WebSocket'];
for (const prop in WS) {
globalWebSocket[prop] = WS[prop];
}
}
/**
* @fileoverview
* @suppress {globalThis}
*/
function propertyDescriptorLegacyPatch(api, _global) {
const { isNode, isMix } = api.getGlobalObjects();
if (isNode && !isMix) {
return;
}
if (!canPatchViaPropertyDescriptor(api, _global)) {
const supportsWebSocket = typeof WebSocket !== 'undefined';
// Safari, Android browsers (Jelly Bean)
patchViaCapturingAllTheEvents(api);
api.patchClass('XMLHttpRequest');
if (supportsWebSocket) {
apply(api, _global);
}
Zone[api.symbol('patchEvents')] = true;
}
}
function canPatchViaPropertyDescriptor(api, _global) {
const { isBrowser, isMix } = api.getGlobalObjects();
if ((isBrowser || isMix) &&
!api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
typeof Element !== 'undefined') {
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
// IDL interface attributes are not configurable
const desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
if (desc && !desc.configurable)
return false;
// try to use onclick to detect whether we can patch via propertyDescriptor
// because XMLHttpRequest is not available in service worker
if (desc) {
api.ObjectDefineProperty(Element.prototype, 'onclick', {
enumerable: true,
configurable: true,
get: function () {
return true;
},
});
const div = document.createElement('div');
const result = !!div.onclick;
api.ObjectDefineProperty(Element.prototype, 'onclick', desc);
return result;
}
}
const XMLHttpRequest = _global['XMLHttpRequest'];
if (!XMLHttpRequest) {
// XMLHttpRequest is not available in service worker
return false;
}
const ON_READY_STATE_CHANGE = 'onreadystatechange';
const XMLHttpRequestPrototype = XMLHttpRequest.prototype;
const xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);
// add enumerable and configurable here because in opera
// by default XMLHttpRequest.prototype.onreadystatechange is undefined
// without adding enumerable and configurable will cause onreadystatechange
// non-configurable
// and if XMLHttpRequest.prototype.onreadystatechange is undefined,
// we should set a real desc instead a fake one
if (xhrDesc) {
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return true;
},
});
const req = new XMLHttpRequest();
const result = !!req.onreadystatechange;
// restore original desc
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
return result;
}
else {
const SYMBOL_FAKE_ONREADYSTATECHANGE = api.symbol('fake');
api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
enumerable: true,
configurable: true,
get: function () {
return this[SYMBOL_FAKE_ONREADYSTATECHANGE];
},
set: function (value) {
this[SYMBOL_FAKE_ONREADYSTATECHANGE] = value;
},
});
const req = new XMLHttpRequest();
const detectFunc = () => { };
req.onreadystatechange = detectFunc;
const result = req[SYMBOL_FAKE_ONREADYSTATECHANGE] === detectFunc;
req.onreadystatechange = null;
return result;
}
}
const globalEventHandlersEventNames = [
'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',
];
const documentEventNames = [
'afterscriptexecute',
'beforescriptexecute',
'DOMContentLoaded',
'freeze',
'fullscreenchange',
'mozfullscreenchange',
'webkitfullscreenchange',
'msfullscreenchange',
'fullscreenerror',
'mozfullscreenerror',
'webkitfullscreenerror',
'msfullscreenerror',
'readystatechange',
'visibilitychange',
'resume',
];
const windowEventNames = [
'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',
'vrdisplayconnected',
'vrdisplaydisconnected',
'vrdisplaypresentchange',
];
const htmlElementEventNames = [
'beforecopy',
'beforecut',
'beforepaste',
'copy',
'cut',
'paste',
'dragstart',
'loadend',
'animationstart',
'search',
'transitionrun',
'transitionstart',
'webkitanimationend',
'webkitanimationiteration',
'webkitanimationstart',
'webkittransitionend',
];
const ieElementEventNames = [
'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',
];
const webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
const formEventNames = ['autocomplete', 'autocompleteerror'];
const detailEventNames = ['toggle'];
const eventNames = [
...globalEventHandlersEventNames,
...webglEventNames,
...formEventNames,
...detailEventNames,
...documentEventNames,
...windowEventNames,
...htmlElementEventNames,
...ieElementEventNames,
];
// Whenever any eventListener fires, we check the eventListener target and all parents
// for `onwhatever` properties and replace them with zone-bound functions
// - Chrome (for now)
function patchViaCapturingAllTheEvents(api) {
const unboundKey = api.symbol('unbound');
for (let i = 0; i < eventNames.length; i++) {
const property = eventNames[i];
const onproperty = 'on' + property;
self.addEventListener(property, function (event) {
let elt = event.target, bound, source;
if (elt) {
source = elt.constructor['name'] + '.' + onproperty;
}
else {
source = 'unknown.' + onproperty;
}
while (elt) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = api.wrapWithCurrentZone(elt[onproperty], source);
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;
}
elt = elt.parentElement;
}
}, true);
}
}
function registerElementPatch(_global, api) {
const { isBrowser, isMix } = api.getGlobalObjects();
if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
return;
}
const callbacks = [
'createdCallback',
'attachedCallback',
'detachedCallback',
'attributeChangedCallback',
];
api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);
}
/**
* @fileoverview
* @suppress {missingRequire}
*/
function patchBrowserLegacy() {
const _global = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};
const symbolPrefix = _global['__Zone_symbol_prefix'] || '__zone_symbol__';
function __symbol__(name) {
return symbolPrefix + name;
}
_global[__symbol__('legacyPatch')] = function () {
const Zone = _global['Zone'];
Zone.__load_patch('defineProperty', (global, Zone, api) => {
api._redefineProperty = _redefineProperty;
propertyPatch();
});
Zone.__load_patch('registerElement', (global, Zone, api) => {
registerElementPatch(global, api);
});
Zone.__load_patch('EventTargetLegacy', (global, Zone, api) => {
eventTargetLegacyPatch(global, api);
propertyDescriptorLegacyPatch(api, global);
});
};
}
patchBrowserLegacy();

6
node_modules/zone.js/fesm2015/zone-legacy.min.js generated vendored Executable file

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More