7 lines
35 KiB
JavaScript
7 lines
35 KiB
JavaScript
|
|
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};
|
||
|
|
/**
|
||
|
|
* @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 t(t){return(e.__Zone_symbol_prefix||"__zone_symbol__")+t}var n,r="undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global,i=function(){function e(e,n,i){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=n,this.name="asyncTestZone for "+i,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===r[t("supportWaitUnResolvedChainedPromise")]}return Object.defineProperty(e,"symbolParentUnresolved",{get:function(){return t("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(t,n,r,i){return"eventTask"!==i.type&&(this._isSync=!1),"microTask"===i.type&&i.data&&i.data instanceof Promise&&!0===i.data[e.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,t.scheduleTask(r,i)},e.prototype.onInvokeTask=function(e,t,n,r,i,o){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,i,o)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},e.prototype.onInvoke=function(e,t,n,r,i,o,s){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,i,o,s)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}},e.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},e.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))},e}(),o="object"==typeof window&&window||"object"==typeof self&&self||globalThis.global,s=o.Date;function a(){if(0===arguments.length){var e=new s;return e.setTime(a.now()),e}var t=Array.prototype.slice.call(arguments);return new(s.bind.apply(s,__spreadArray([void 0],t,!1)))}a.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():s.now.apply(this,arguments)},a.UTC=s.UTC,a.parse=s.parse;var c=function(){},u=function(){function e(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=s.now(),this._currentTickRequeuePeriodicEntries=[]}return e.getNextId=function(){var t=n.nativeSetTimeout.call(o,c,0);return n.nativeClearTimeout.call(o,t),"number"==typeof t?t:e.nextNodeJSId++},e.prototype.getCurrentTickTime=function(){return this._currentTickTime},e.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},e.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},e.prototype.getRealSystemTime=function(){return s.now()},e.prototype.scheduleFunction=function(t,n,r){var i=(r=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?e.nextId:r.id;e.nextId=e.getNextId();var o={endTime:this._currentTickTime+n,id:i,func:t,args:r.
|