mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
32 KiB
8 lines
32 KiB
'use strict';
|
|
/**
|
|
* @license Angular
|
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
* License: MIT
|
|
*/
|
|
var gt=Object.defineProperty,yt=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var $e=Object.getOwnPropertySymbols;var vt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable;var Ze=(e,s,c)=>s in e?gt(e,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[s]=c,Ie=(e,s)=>{for(var c in s||(s={}))vt.call(s,c)&&Ze(e,c,s[c]);if($e)for(var c of $e(s))wt.call(s,c)&&Ze(e,c,s[c]);return e},Je=(e,s)=>yt(e,bt(s));var Pe=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(s,c)=>(typeof require!="undefined"?require:s)[c]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var w=(e,s,c)=>(Ze(e,typeof s!="symbol"?s+"":s,c),c);var ce=globalThis;function Q(e){return(ce.__Zone_symbol_prefix||"__zone_symbol__")+e}function Qe(){let e=ce.performance;function s(F){e&&e.mark&&e.mark(F)}function c(F,n){e&&e.measure&&e.measure(F,n)}s("Zone");let q=class q{constructor(n,r){w(this,"_parent");w(this,"_name");w(this,"_properties");w(this,"_zoneDelegate");this._parent=n,this._name=r?r.name||"unnamed":"<root>",this._properties=r&&r.properties||{},this._zoneDelegate=new h(this,this._parent&&this._parent._zoneDelegate,r)}static assertZonePatched(){if(ce.Promise!==N.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=q.current;for(;n.parent;)n=n.parent;return n}static get current(){return M.zone}static get currentTask(){return oe}static __load_patch(n,r,o=!1){if(N.hasOwnProperty(n)){let E=ce[Q("forceDuplicateZoneCheck")]===!0;if(!o&&E)throw Error("Already loaded patch: "+n)}else if(!ce["__Zone_disable_"+n]){let E="Zone:"+n;s(E),N[n]=r(ce,q,ee),c(E,E)}}get parent(){return this._parent}get name(){return this._name}get(n){let r=this.getZoneWith(n);if(r)return r._properties[n]}getZoneWith(n){let r=this;for(;r;){if(r._properties.hasOwnProperty(n))return r;r=r._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,r){if(typeof n!="function")throw new Error("Expecting function got: "+n);let o=this._zoneDelegate.intercept(this,n,r),E=this;return function(){return E.runGuarded(o,this,arguments,r)}}run(n,r,o,E){M={parent:M,zone:this};try{return this._zoneDelegate.invoke(this,n,r,o,E)}finally{M=M.parent}}runGuarded(n,r=null,o,E){M={parent:M,zone:this};try{try{return this._zoneDelegate.invoke(this,n,r,o,E)}catch(I){if(this._zoneDelegate.handleError(this,I))throw I}}finally{M=M.parent}}runTask(n,r,o){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||$).name+"; Execution: "+this.name+")");let E=n,{type:I,data:{isPeriodic:O=!1,isRefreshable:se=!1}={}}=n;if(n.state===G&&(I===B||I===m))return;let le=n.state!=x;le&&E._transitionTo(x,d);let ue=oe;oe=E,M={parent:M,zone:this};try{I==m&&n.data&&!O&&!se&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,E,r,o)}catch(te){if(this._zoneDelegate.handleError(this,te))throw te}}finally{let te=n.state;if(te!==G&&te!==U)if(I==B||O||se&&te===y)le&&E._transitionTo(d,x,y);else{let f=E._zoneDelegates;this._updateTaskCount(E,-1),le&&E._transitionTo(G,x,G),se&&(E._zoneDelegates=f)}M=M.parent,oe=ue}}scheduleTask(n){if(n.zone&&n.zone!==this){let o=this;for(;o;){if(o===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);o=o.parent}}n._transitionTo(y,G);let r=[];n._zoneDelegates=r,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(o){throw n._transitionTo(U,y,G),this._zoneDelegate.handleError(this,o),o}return n._zoneDelegates===r&&this._updateTaskCount(n,1),n.state==y&&n._transitionTo(d,y),n}scheduleMicroTask(n,r,o,E){return this.scheduleTask(new _(H,n,r,o,E,void 0))}scheduleMacroTask(n,r,o,E,I){return this.scheduleTask(new _(m,n,r,o,E,I))}scheduleEventTask(n,r,o,E,I){return this.scheduleTask(new _(B,n,r,o,E,I))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||$).name+"; Execution: "+this.name+")");if(!(n.state!==d&&n.state!==x)){n._transitionTo(V,d,x);try{this._zoneDelegate.cancelTask(this,n)}catch(r){throw n._transitionTo(U,V),this._zoneDelegate.handleError(this,r),r}return this._updateTaskCount(n,-1),n._transitionTo(G,V),n.runCount=-1,n}}_updateTaskCount(n,r){let o=n._zoneDelegates;r==-1&&(n._zoneDelegates=null);for(let E=0;E<o.length;E++)o[E]._updateTaskCount(n.type,r)}};w(q,"__symbol__",Q);let i=q,a={name:"",onHasTask:(F,n,r,o)=>F.hasTask(r,o),onScheduleTask:(F,n,r,o)=>F.scheduleTask(r,o),onInvokeTask:(F,n,r,o,E,I)=>F.invokeTask(r,o,E,I),onCancelTask:(F,n,r,o)=>F.cancelTask(r,o)};class h{constructor(n,r,o){w(this,"_zone");w(this,"_taskCounts",{microTask:0,macroTask:0,eventTask:0});w(this,"_parentDelegate");w(this,"_forkDlgt");w(this,"_forkZS");w(this,"_forkCurrZone");w(this,"_interceptDlgt");w(this,"_interceptZS");w(this,"_interceptCurrZone");w(this,"_invokeDlgt");w(this,"_invokeZS");w(this,"_invokeCurrZone");w(this,"_handleErrorDlgt");w(this,"_handleErrorZS");w(this,"_handleErrorCurrZone");w(this,"_scheduleTaskDlgt");w(this,"_scheduleTaskZS");w(this,"_scheduleTaskCurrZone");w(this,"_invokeTaskDlgt");w(this,"_invokeTaskZS");w(this,"_invokeTaskCurrZone");w(this,"_cancelTaskDlgt");w(this,"_cancelTaskZS");w(this,"_cancelTaskCurrZone");w(this,"_hasTaskDlgt");w(this,"_hasTaskDlgtOwner");w(this,"_hasTaskZS");w(this,"_hasTaskCurrZone");this._zone=n,this._parentDelegate=r,this._forkZS=o&&(o&&o.onFork?o:r._forkZS),this._forkDlgt=o&&(o.onFork?r:r._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:r._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:r._interceptZS),this._interceptDlgt=o&&(o.onIntercept?r:r._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:r._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:r._invokeZS),this._invokeDlgt=o&&(o.onInvoke?r:r._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:r._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:r._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?r:r._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:r._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:r._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?r:r._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:r._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:r._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?r:r._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:r._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:r._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?r:r._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:r._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let E=o&&o.onHasTask,I=r&&r._hasTaskZS;(E||I)&&(this._hasTaskZS=E?o:a,this._hasTaskDlgt=r,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=r,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=r,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=r,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(n,r){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,n,r):new i(n,r)}intercept(n,r,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,n,r,o):r}invoke(n,r,o,E,I){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,n,r,o,E,I):r.apply(o,E)}handleError(n,r){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,n,r):!0}scheduleTask(n,r){let o=r;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,n,r),o||(o=r);else if(r.scheduleFn)r.scheduleFn(r);else if(r.type==H)J(r);else throw new Error("Task is missing scheduleFn.");return o}invokeTask(n,r,o,E){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,n,r,o,E):r.callback.apply(o,E)}cancelTask(n,r){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,n,r);else{if(!r.cancelFn)throw Error("Task is not cancelable");o=r.cancelFn(r)}return o}hasTask(n,r){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,n,r)}catch(o){this.handleError(n,o)}}_updateTaskCount(n,r){let o=this._taskCounts,E=o[n],I=o[n]=E+r;if(I<0)throw new Error("More tasks executed then were scheduled.");if(E==0||I==0){let O={microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:n};this.hasTask(this._zone,O)}}}class _{constructor(n,r,o,E,I,O){w(this,"type");w(this,"source");w(this,"invoke");w(this,"callback");w(this,"data");w(this,"scheduleFn");w(this,"cancelFn");w(this,"_zone",null);w(this,"runCount",0);w(this,"_zoneDelegates",null);w(this,"_state","notScheduled");if(this.type=n,this.source=r,this.data=E,this.scheduleFn=I,this.cancelFn=O,!o)throw new Error("callback is not defined");this.callback=o;let se=this;n===B&&E&&E.useG?this.invoke=_.invokeTask:this.invoke=function(){return _.invokeTask.call(ce,se,this,arguments)}}static invokeTask(n,r,o){n||(n=this),ae++;try{return n.runCount++,n.zone.runTask(n,r,o)}finally{ae==1&&Z(),ae--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(G,y)}_transitionTo(n,r,o){if(this._state===r||this._state===o)this._state=n,n==G&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${n}', expecting state '${r}'${o?" or '"+o+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId!="undefined"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let p=Q("setTimeout"),k=Q("Promise"),S=Q("then"),b=[],C=!1,j;function z(F){if(j||ce[k]&&(j=ce[k].resolve(0)),j){let n=j[S];n||(n=j.then),n.call(j,F)}else ce[p](F,0)}function J(F){ae===0&&b.length===0&&z(Z),F&&b.push(F)}function Z(){if(!C){for(C=!0;b.length;){let F=b;b=[];for(let n=0;n<F.length;n++){let r=F[n];try{r.zone.runTask(r,null,null)}catch(o){ee.onUnhandledError(o)}}}ee.microtaskDrainDone(),C=!1}}let $={name:"NO ZONE"},G="notScheduled",y="scheduling",d="scheduled",x="running",V="canceling",U="unknown",H="microTask",m="macroTask",B="eventTask",N={},ee={symbol:Q,currentZoneFrame:()=>M,onUnhandledError:Y,microtaskDrainDone:Y,scheduleMicroTask:J,showUncaughtError:()=>!i[Q("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:Y,patchMethod:()=>Y,bindArguments:()=>[],patchThen:()=>Y,patchMacroTask:()=>Y,patchEventPrototype:()=>Y,getGlobalObjects:()=>{},ObjectDefineProperty:()=>Y,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>Y,wrapWithCurrentZone:()=>Y,filterProperties:()=>[],attachOriginToPatched:()=>Y,_redefineProperty:()=>Y,patchCallbacks:()=>Y,nativeScheduleMicroTask:z},M={parent:null,zone:new i(null,null)},oe=null,ae=0;function Y(){}return c("Zone","Zone"),i}var xe=Object.getOwnPropertyDescriptor,Pt=Object.defineProperty,Me=Object.getPrototypeOf;var et=Array.prototype.slice,Le="addEventListener",Ae="removeEventListener",Vt=Q(Le),Ft=Q(Ae),fe="true",he="false",ve=Q("");function St(e,s){return Zone.current.wrap(e,s)}function je(e,s,c,i,a){return Zone.current.scheduleMacroTask(e,s,c,i,a)}var W=Q,Re=typeof window!="undefined",De=Re?window:void 0,X=Re&&De||globalThis,Rt="removeAttribute";function tt(e,s){for(let c=e.length-1;c>=0;c--)typeof e[c]=="function"&&(e[c]=St(e[c],s+"_"+c));return e}function Dt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set=="undefined"):!0}var nt=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,Ve=!("nw"in X)&&typeof X.process!="undefined"&&X.process.toString()==="[object process]",Ct=!Ve&&!nt&&!!(Re&&De.HTMLElement),Fe=typeof X.process!="undefined"&&X.process.toString()==="[object process]"&&!nt&&!!(Re&&De.HTMLElement),Se={},Nt=W("enable_beforeunload"),Ke=function(e){if(e=e||X.event,!e)return;let s=Se[e.type];s||(s=Se[e.type]=W("ON_PROPERTY"+e.type));let c=this||e.target||X,i=c[s],a;if(Ct&&c===De&&e.type==="error"){let h=e;a=i&&i.call(this,h.message,h.filename,h.lineno,h.colno,h.error),a===!0&&e.preventDefault()}else a=i&&i.apply(this,arguments),e.type==="beforeunload"&&X[Nt]&&typeof a=="string"?e.returnValue=a:a!=null&&!a&&e.preventDefault();return a};function Xe(e,s,c){let i=xe(e,s);if(!i&&c&&xe(c,s)&&(i={enumerable:!0,configurable:!0}),!i||!i.configurable)return;let a=W("on"+s+"patched");if(e.hasOwnProperty(a)&&e[a])return;delete i.writable,delete i.value;let h=i.get,_=i.set,p=s.slice(2),k=Se[p];k||(k=Se[p]=W("ON_PROPERTY"+p)),i.set=function(S){let b=this;if(!b&&e===X&&(b=X),!b)return;typeof b[k]=="function"&&b.removeEventListener(p,Ke),_==null||_.call(b,null),b[k]=S,typeof S=="function"&&b.addEventListener(p,Ke,!1)},i.get=function(){let S=this;if(!S&&e===X&&(S=X),!S)return null;let b=S[k];if(b)return b;if(h){let C=h.call(this);if(C)return i.set.call(this,C),typeof S[Rt]=="function"&&S.removeAttribute(s),C}return null},Pt(e,s,i),e[a]=!0}function rt(e,s,c){if(s)for(let i=0;i<s.length;i++)Xe(e,"on"+s[i],c);else{let i=[];for(let a in e)a.slice(0,2)=="on"&&i.push(a);for(let a=0;a<i.length;a++)Xe(e,i[a],c)}}var Ht=W("originalInstance");function Ot(e,s){if(typeof Object.getOwnPropertySymbols!="function")return;Object.getOwnPropertySymbols(e).forEach(i=>{let a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,{get:function(){return e[i]},set:function(h){a&&(!a.writable||typeof a.set!="function")||(e[i]=h)},enumerable:a?a.enumerable:!0,configurable:a?a.configurable:!0})})}var ot=!1;function st(e){ot=e}function de(e,s,c){let i=e;for(;i&&!i.hasOwnProperty(s);)i=Me(i);!i&&e[s]&&(i=e);let a=W(s),h=null;if(i&&(!(h=i[a])||!i.hasOwnProperty(a))){h=i[a]=i[s];let _=i&&xe(i,s);if(Dt(_)){let p=c(h,a,s);i[s]=function(){return p(this,arguments)},ke(i[s],h),ot&&Ot(h,i[s])}}return h}function me(e,s,c){let i=null;function a(h){let _=h.data;return _.args[_.cbIdx]=function(){h.invoke.apply(this,arguments)},i.apply(_.target,_.args),h}i=de(e,s,h=>function(_,p){let k=c(_,p);return k.cbIdx>=0&&typeof p[k.cbIdx]=="function"?je(k.name,p[k.cbIdx],k,a):h.apply(_,p)})}function it(e,s,c){let i=null;function a(h){let _=h.data;return _.args[_.cbIdx]=function(){h.invoke.apply(this,arguments)},i.apply(_.target,_.args),h}i=de(e,s,h=>function(_,p){let k=c(_,p);return k.cbIdx>=0&&typeof p[k.cbIdx]=="function"?Zone.current.scheduleMicroTask(k.name,p[k.cbIdx],k,a):h.apply(_,p)})}function ke(e,s){e[W("OriginalDelegate")]=s}function He(e){return typeof e=="function"}function ze(e){return typeof e=="number"}function ct(e){e.__load_patch("ZoneAwarePromise",(s,c,i)=>{let a=Object.getOwnPropertyDescriptor,h=Object.defineProperty;function _(f){if(f&&f.toString===Object.prototype.toString){let l=f.constructor&&f.constructor.name;return(l||"")+": "+JSON.stringify(f)}return f?f.toString():Object.prototype.toString.call(f)}let p=i.symbol,k=[],S=s[p("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,b=p("Promise"),C=p("then"),j="__creationTrace__";i.onUnhandledError=f=>{if(i.showUncaughtError()){let l=f&&f.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(f)}},i.microtaskDrainDone=()=>{for(;k.length;){let f=k.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(l){J(l)}}};let z=p("unhandledPromiseRejectionHandler");function J(f){i.onUnhandledError(f);try{let l=c[z];typeof l=="function"&&l.call(this,f)}catch(l){}}function Z(f){return f&&typeof f.then=="function"}function $(f){return f}function G(f){return O.reject(f)}let y=p("state"),d=p("value"),x=p("finally"),V=p("parentPromiseValue"),U=p("parentPromiseState"),H="Promise.then",m=null,B=!0,N=!1,ee=0;function M(f,l){return t=>{try{q(f,l,t)}catch(u){q(f,!1,u)}}}let oe=function(){let f=!1;return function(t){return function(){f||(f=!0,t.apply(null,arguments))}}},ae="Promise resolved with itself",Y=p("currentTaskTrace");function q(f,l,t){let u=oe();if(f===t)throw new TypeError(ae);if(f[y]===m){let g=null;try{(typeof t=="object"||typeof t=="function")&&(g=t&&t.then)}catch(v){return u(()=>{q(f,!1,v)})(),f}if(l!==N&&t instanceof O&&t.hasOwnProperty(y)&&t.hasOwnProperty(d)&&t[y]!==m)n(t),q(f,t[y],t[d]);else if(l!==N&&typeof g=="function")try{g.call(t,u(M(f,l)),u(M(f,!1)))}catch(v){u(()=>{q(f,!1,v)})()}else{f[y]=l;let v=f[d];if(f[d]=t,f[x]===x&&l===B&&(f[y]=f[U],f[d]=f[V]),l===N&&t instanceof Error){let T=c.currentTask&&c.currentTask.data&&c.currentTask.data[j];T&&h(t,Y,{configurable:!0,enumerable:!1,writable:!0,value:T})}for(let T=0;T<v.length;)r(f,v[T++],v[T++],v[T++],v[T++]);if(v.length==0&&l==N){f[y]=ee;let T=t;try{throw new Error("Uncaught (in promise): "+_(t)+(t&&t.stack?`
|
|
`+t.stack:""))}catch(P){T=P}S&&(T.throwOriginal=!0),T.rejection=t,T.promise=f,T.zone=c.current,T.task=c.currentTask,k.push(T),i.scheduleMicroTask()}}}return f}let F=p("rejectionHandledHandler");function n(f){if(f[y]===ee){try{let l=c[F];l&&typeof l=="function"&&l.call(this,{rejection:f[d],promise:f})}catch(l){}f[y]=N;for(let l=0;l<k.length;l++)f===k[l].promise&&k.splice(l,1)}}function r(f,l,t,u,g){n(f);let v=f[y],T=v?typeof u=="function"?u:$:typeof g=="function"?g:G;l.scheduleMicroTask(H,()=>{try{let P=f[d],R=!!t&&x===t[x];R&&(t[V]=P,t[U]=v);let D=l.run(T,void 0,R&&T!==G&&T!==$?[]:[P]);q(t,!0,D)}catch(P){q(t,!1,P)}},t)}let o="function ZoneAwarePromise() { [native code] }",E=function(){},I=s.AggregateError;class O{static toString(){return o}static resolve(l){return l instanceof O?l:q(new this(null),B,l)}static reject(l){return q(new this(null),N,l)}static withResolvers(){let l={};return l.promise=new O((t,u)=>{l.resolve=t,l.reject=u}),l}static any(l){if(!l||typeof l[Symbol.iterator]!="function")return Promise.reject(new I([],"All promises were rejected"));let t=[],u=0;try{for(let T of l)u++,t.push(O.resolve(T))}catch(T){return Promise.reject(new I([],"All promises were rejected"))}if(u===0)return Promise.reject(new I([],"All promises were rejected"));let g=!1,v=[];return new O((T,P)=>{for(let R=0;R<t.length;R++)t[R].then(D=>{g||(g=!0,T(D))},D=>{v.push(D),u--,u===0&&(g=!0,P(new I(v,"All promises were rejected")))})})}static race(l){let t,u,g=new this((P,R)=>{t=P,u=R});function v(P){t(P)}function T(P){u(P)}for(let P of l)Z(P)||(P=this.resolve(P)),P.then(v,T);return g}static all(l){return O.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof O?this:O).allWithCallback(l,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(l,t){let u,g,v=new this((D,L)=>{u=D,g=L}),T=2,P=0,R=[];for(let D of l){Z(D)||(D=this.resolve(D));let L=P;try{D.then(A=>{R[L]=t?t.thenCallback(A):A,T--,T===0&&u(R)},A=>{t?(R[L]=t.errorCallback(A),T--,T===0&&u(R)):g(A)})}catch(A){g(A)}T++,P++}return T-=2,T===0&&u(R),v}constructor(l){let t=this;if(!(t instanceof O))throw new Error("Must be an instanceof Promise.");t[y]=m,t[d]=[];try{let u=oe();l&&l(u(M(t,B)),u(M(t,N)))}catch(u){q(t,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return O}then(l,t){var T;let u=(T=this.constructor)==null?void 0:T[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||O);let g=new u(E),v=c.current;return this[y]==m?this[d].push(v,g,l,t):r(this,v,g,l,t),g}catch(l){return this.then(null,l)}finally(l){var v;let t=(v=this.constructor)==null?void 0:v[Symbol.species];(!t||typeof t!="function")&&(t=O);let u=new t(E);u[x]=x;let g=c.current;return this[y]==m?this[d].push(g,u,l,l):r(this,g,u,l,l),u}}O.resolve=O.resolve,O.reject=O.reject,O.race=O.race,O.all=O.all;let se=s[b]=s.Promise;s.Promise=O;let le=p("thenPatched");function ue(f){let l=f.prototype,t=a(l,"then");if(t&&(t.writable===!1||!t.configurable))return;let u=l.then;l[C]=u,f.prototype.then=function(g,v){return new O((P,R)=>{u.call(this,P,R)}).then(g,v)},f[le]=!0}i.patchThen=ue;function te(f){return function(l,t){let u=f.apply(l,t);if(u instanceof O)return u;let g=u.constructor;return g[le]||ue(g),u}}return se&&(ue(se),de(s,"fetch",f=>te(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=k,O})}function at(e){e.__load_patch("toString",s=>{let c=Function.prototype.toString,i=W("OriginalDelegate"),a=W("Promise"),h=W("Error"),_=function(){if(typeof this=="function"){let b=this[i];if(b)return typeof b=="function"?c.call(b):Object.prototype.toString.call(b);if(this===Promise){let C=s[a];if(C)return c.call(C)}if(this===Error){let C=s[h];if(C)return c.call(C)}}return c.call(this)};_[i]=c,Function.prototype.toString=_;let p=Object.prototype.toString,k="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?k:p.call(this)}})}function lt(){var c;let e=globalThis,s=e[Q("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(s||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return(c=e.Zone)!=null||(e.Zone=Qe()),e.Zone}var Zt={useG:!0},re={},It={},ut=new RegExp("^"+ve+"(\\w+)(true|false)$"),xt=W("propagationStopped");function ft(e,s){let c=(s?s(e):e)+he,i=(s?s(e):e)+fe,a=ve+c,h=ve+i;re[e]={},re[e][he]=a,re[e][fe]=h}function ht(e,s,c,i){let a=i&&i.add||Le,h=i&&i.rm||Ae,_=i&&i.listeners||"eventListeners",p=i&&i.rmAll||"removeAllListeners",k=W(a),S="."+a+":",b="prependListener",C="."+b+":",j=function(y,d,x){if(y.isRemoved)return;let V=y.callback;typeof V=="object"&&V.handleEvent&&(y.callback=m=>V.handleEvent(m),y.originalDelegate=V);let U;try{y.invoke(y,d,[x])}catch(m){U=m}let H=y.options;if(H&&typeof H=="object"&&H.once){let m=y.originalDelegate?y.originalDelegate:y.callback;d[h].call(d,x.type,m,H)}return U};function z(y,d,x){if(d=d||e.event,!d)return;let V=y||d.target||e,U=V[re[d.type][x?fe:he]];if(U){let H=[];if(U.length===1){let m=j(U[0],V,d);m&&H.push(m)}else{let m=U.slice();for(let B=0;B<m.length&&!(d&&d[xt]===!0);B++){let N=j(m[B],V,d);N&&H.push(N)}}if(H.length===1)throw H[0];for(let m=0;m<H.length;m++){let B=H[m];s.nativeScheduleMicroTask(()=>{throw B})}}}let J=function(y){return z(this,y,!1)},Z=function(y){return z(this,y,!0)};function $(y,d){if(!y)return!1;let x=!0;d&&d.useG!==void 0&&(x=d.useG);let V=d&&d.vh,U=!0;d&&d.chkDup!==void 0&&(U=d.chkDup);let H=!1;d&&d.rt!==void 0&&(H=d.rt);let m=y;for(;m&&!m.hasOwnProperty(a);)m=Me(m);if(!m&&y[a]&&(m=y),!m||m[k])return!1;let B=d&&d.eventNameToString,N={},ee=m[k]=m[a],M=m[W(h)]=m[h],oe=m[W(_)]=m[_],ae=m[W(p)]=m[p],Y;d&&d.prepend&&(Y=m[W(d.prepend)]=m[d.prepend]);function q(t,u){return u?typeof t=="boolean"?{capture:t,passive:!0}:t?typeof t=="object"&&t.passive!==!1?Je(Ie({},t),{passive:!0}):t:{passive:!0}:t}let F=function(t){if(!N.isExisting)return ee.call(N.target,N.eventName,N.capture?Z:J,N.options)},n=function(t){if(!t.isRemoved){let u=re[t.eventName],g;u&&(g=u[t.capture?fe:he]);let v=g&&t.target[g];if(v){for(let T=0;T<v.length;T++)if(v[T]===t){v.splice(T,1),t.isRemoved=!0,t.removeAbortListener&&(t.removeAbortListener(),t.removeAbortListener=null),v.length===0&&(t.allRemoved=!0,t.target[g]=null);break}}}if(t.allRemoved)return M.call(t.target,t.eventName,t.capture?Z:J,t.options)},r=function(t){return ee.call(N.target,N.eventName,t.invoke,N.options)},o=function(t){return Y.call(N.target,N.eventName,t.invoke,N.options)},E=function(t){return M.call(t.target,t.eventName,t.invoke,t.options)},I=x?F:r,O=x?n:E,se=function(t,u){let g=typeof u;return g==="function"&&t.callback===u||g==="object"&&t.originalDelegate===u},le=(d==null?void 0:d.diff)||se,ue=Zone[W("UNPATCHED_EVENTS")],te=e[W("PASSIVE_EVENTS")];function f(t){if(typeof t=="object"&&t!==null){let u=Ie({},t);return t.signal&&(u.signal=t.signal),u}return t}let l=function(t,u,g,v,T=!1,P=!1){return function(){let R=this||e,D=arguments[0];d&&d.transferEventName&&(D=d.transferEventName(D));let L=arguments[1];if(!L)return t.apply(this,arguments);if(Ve&&D==="uncaughtException")return t.apply(this,arguments);let A=!1;if(typeof L!="function"){if(!L.handleEvent)return t.apply(this,arguments);A=!0}if(V&&!V(t,L,R,arguments))return;let _e=!!te&&te.indexOf(D)!==-1,K=f(q(arguments[2],_e)),Te=K==null?void 0:K.signal;if(Te!=null&&Te.aborted)return;if(ue){for(let ie=0;ie<ue.length;ie++)if(D===ue[ie])return _e?t.call(R,D,L,K):t.apply(this,arguments)}let Ne=K?typeof K=="boolean"?!0:K.capture:!1,Ue=K&&typeof K=="object"?K.once:!1,kt=Zone.current,Oe=re[D];Oe||(ft(D,B),Oe=re[D]);let We=Oe[Ne?fe:he],Ee=R[We],Be=!1;if(Ee){if(Be=!0,U){for(let ie=0;ie<Ee.length;ie++)if(le(Ee[ie],L))return}}else Ee=R[We]=[];let we,Ye=R.constructor.name,qe=It[Ye];qe&&(we=qe[D]),we||(we=Ye+u+(B?B(D):D)),N.options=K,Ue&&(N.options.once=!1),N.target=R,N.capture=Ne,N.eventName=D,N.isExisting=Be;let be=x?Zt:void 0;be&&(be.taskData=N),Te&&(N.options.signal=void 0);let ne=kt.scheduleEventTask(we,L,be,g,v);if(Te){N.options.signal=Te;let ie=()=>ne.zone.cancelTask(ne);t.call(Te,"abort",ie,{once:!0}),ne.removeAbortListener=()=>Te.removeEventListener("abort",ie)}if(N.target=null,be&&(be.taskData=null),Ue&&(N.options.once=!0),typeof ne.options!="boolean"&&(ne.options=K),ne.target=R,ne.capture=Ne,ne.eventName=D,A&&(ne.originalDelegate=L),P?Ee.unshift(ne):Ee.push(ne),T)return R}};return m[a]=l(ee,S,I,O,H),Y&&(m[b]=l(Y,C,o,O,H,!0)),m[h]=function(){let t=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let g=arguments[2],v=g?typeof g=="boolean"?!0:g.capture:!1,T=arguments[1];if(!T)return M.apply(this,arguments);if(V&&!V(M,T,t,arguments))return;let P=re[u],R;P&&(R=P[v?fe:he]);let D=R&&t[R];if(D)for(let L=0;L<D.length;L++){let A=D[L];if(le(A,T)){if(D.splice(L,1),A.isRemoved=!0,D.length===0&&(A.allRemoved=!0,t[R]=null,!v&&typeof u=="string")){let _e=ve+"ON_PROPERTY"+u;t[_e]=null}return A.zone.cancelTask(A),H?t:void 0}}return M.apply(this,arguments)},m[_]=function(){let t=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let g=[],v=Ge(t,B?B(u):u);for(let T=0;T<v.length;T++){let P=v[T],R=P.originalDelegate?P.originalDelegate:P.callback;g.push(R)}return g},m[p]=function(){let t=this||e,u=arguments[0];if(u){d&&d.transferEventName&&(u=d.transferEventName(u));let g=re[u];if(g){let v=g[he],T=g[fe],P=t[v],R=t[T];if(P){let D=P.slice();for(let L=0;L<D.length;L++){let A=D[L],_e=A.originalDelegate?A.originalDelegate:A.callback;this[h].call(this,u,_e,A.options)}}if(R){let D=R.slice();for(let L=0;L<D.length;L++){let A=D[L],_e=A.originalDelegate?A.originalDelegate:A.callback;this[h].call(this,u,_e,A.options)}}}}else{let g=Object.keys(t);for(let v=0;v<g.length;v++){let T=g[v],P=ut.exec(T),R=P&&P[1];R&&R!=="removeListener"&&this[p].call(this,R)}this[p].call(this,"removeListener")}if(H)return this},ke(m[a],ee),ke(m[h],M),ae&&ke(m[p],ae),oe&&ke(m[_],oe),!0}let G=[];for(let y=0;y<c.length;y++)G[y]=$(c[y],i);return G}function Ge(e,s){if(!s){let h=[];for(let _ in e){let p=ut.exec(_),k=p&&p[1];if(k&&(!s||k===s)){let S=e[_];if(S)for(let b=0;b<S.length;b++)h.push(S[b])}}return h}let c=re[s];c||(ft(s),c=re[s]);let i=e[c[he]],a=e[c[fe]];return i?a?i.concat(a):i.slice():a?a.slice():[]}function dt(e,s){s.patchMethod(e,"queueMicrotask",c=>function(i,a){Zone.current.scheduleMicroTask("queueMicrotask",a[0])})}var Ce=W("zoneTask");function pe(e,s,c,i){let a=null,h=null;s+=i,c+=i;let _={};function p(S){let b=S.data;b.args[0]=function(){return S.invoke.apply(this,arguments)};let C=a.apply(e,b.args);return ze(C)?b.handleId=C:(b.handle=C,b.isRefreshable=He(C.refresh)),S}function k(S){let{handle:b,handleId:C}=S.data;return h.call(e,b!=null?b:C)}a=de(e,s,S=>function(b,C){var j;if(He(C[0])){let z={isRefreshable:!1,isPeriodic:i==="Interval",delay:i==="Timeout"||i==="Interval"?C[1]||0:void 0,args:C},J=C[0];C[0]=function(){try{return J.apply(this,arguments)}finally{let{handle:V,handleId:U,isPeriodic:H,isRefreshable:m}=z;!H&&!m&&(U?delete _[U]:V&&(V[Ce]=null))}};let Z=je(s,C[0],z,p,k);if(!Z)return Z;let{handleId:$,handle:G,isRefreshable:y,isPeriodic:d}=Z.data;if($)_[$]=Z;else if(G&&(G[Ce]=Z,y&&!d)){let x=G.refresh;G.refresh=function(){let{zone:V,state:U}=Z;return U==="notScheduled"?(Z._state="scheduled",V._updateTaskCount(Z,1)):U==="running"&&(Z._state="scheduling"),x.call(this)}}return(j=G!=null?G:$)!=null?j:Z}else return S.apply(e,C)}),h=de(e,c,S=>function(b,C){let j=C[0],z;ze(j)?(z=_[j],delete _[j]):(z=j==null?void 0:j[Ce],z?j[Ce]=null:z=j),z!=null&&z.type?z.cancelFn&&z.zone.cancelTask(z):S.apply(e,C)})}function _t(e){e.__load_patch("EventEmitter",(s,c,i)=>{let a="addListener",h="prependListener",_="removeListener",p="removeAllListeners",k="listeners",S="on",b="off",C=function(Z,$){return Z.callback===$||Z.callback.listener===$},j=function(Z){return typeof Z=="string"?Z:Z?Z.toString().replace("(","_").replace(")","_"):""};function z(Z){let $=ht(s,i,[Z],{useG:!1,add:a,rm:_,prepend:h,rmAll:p,listeners:k,chkDup:!1,rt:!0,diff:C,eventNameToString:j});$&&$[0]&&(Z[S]=Z[a],Z[b]=Z[_])}let J;try{J=Pe("events")}catch(Z){}J&&J.EventEmitter&&z(J.EventEmitter.prototype)})}function Tt(e){e.__load_patch("fs",(s,c,i)=>{var p;let a;try{a=Pe("fs")}catch(k){}if(!a)return;["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile","writev"].filter(k=>!!a[k]&&typeof a[k]=="function").forEach(k=>{me(a,k,(S,b)=>({name:"fs."+k,args:b,cbIdx:b.length>0?b.length-1:-1,target:S}))});let _=(p=a.realpath)==null?void 0:p[i.symbol("OriginalDelegate")];_!=null&&_.native&&(a.realpath.native=_.native,me(a.realpath,"native",(k,S)=>({args:S,target:k,cbIdx:S.length>0?S.length-1:-1,name:"fs.realpath.native"})))})}function mt(e){e.__load_patch("node_util",(s,c,i)=>{i.patchOnProperties=rt,i.patchMethod=de,i.bindArguments=tt,i.patchMacroTask=me,st(!0)})}var ge="set",ye="clear";function pt(e){mt(e),_t(e),Tt(e),e.__load_patch("node_timers",(s,c)=>{let i=!1;try{let a=Pe("timers");if(!(s.setTimeout===a.setTimeout)&&!Fe){let _=a.setTimeout;a.setTimeout=function(){return i=!0,_.apply(this,arguments)};let p=s.setTimeout(()=>{},100);clearTimeout(p),a.setTimeout=_}pe(a,ge,ye,"Timeout"),pe(a,ge,ye,"Interval"),pe(a,ge,ye,"Immediate")}catch(a){}Fe||(i?(s[c.__symbol__("setTimeout")]=s.setTimeout,s[c.__symbol__("setInterval")]=s.setInterval,s[c.__symbol__("setImmediate")]=s.setImmediate):(pe(s,ge,ye,"Timeout"),pe(s,ge,ye,"Interval"),pe(s,ge,ye,"Immediate")))}),e.__load_patch("nextTick",()=>{it(process,"nextTick",(s,c)=>({name:"process.nextTick",args:c,cbIdx:c.length>0&&typeof c[0]=="function"?0:-1,target:process}))}),e.__load_patch("handleUnhandledPromiseRejection",(s,c,i)=>{c[i.symbol("unhandledPromiseRejectionHandler")]=a("unhandledRejection"),c[i.symbol("rejectionHandledHandler")]=a("rejectionHandled");function a(h){return function(_){Ge(process,h).forEach(k=>{h==="unhandledRejection"?k.invoke(_.rejection,_.promise):h==="rejectionHandled"&&k.invoke(_.promise)})}}}),e.__load_patch("crypto",()=>{let s;try{s=Pe("crypto")}catch(c){}s&&["randomBytes","pbkdf2"].forEach(i=>{me(s,i,(a,h)=>({name:"crypto."+i,args:h,cbIdx:h.length>0&&typeof h[h.length-1]=="function"?h.length-1:-1,target:s}))})}),e.__load_patch("console",(s,c)=>{["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach(a=>{let h=console[c.__symbol__(a)]=console[a];h&&(console[a]=function(){let _=et.call(arguments);return c.current===c.root?h.apply(this,_):c.root.run(h,this,_)})})}),e.__load_patch("queueMicrotask",(s,c,i)=>{dt(s,i)})}function Et(){let e=lt();return pt(e),ct(e),at(e),e}Et();
|
|
|