13 | */!function(e){let n=null,o=null;const c=function(){const c=e.wtf;return!(!c||(n=c.trace,!n)||(o=n.events,0))}();class t{constructor(){this.name="WTF"}onFork(e,n,o,c){const a=e.fork(o,c);return t.forkInstance(s(o),a.name),a}onInvoke(e,c,a,r,l,i,u){const k=u||"unknown";let f=t.invokeScope[k];return f||(f=t.invokeScope[k]=o.createScope(`Zone:invoke:${u}(ascii zone)`)),n.leaveScope(f(s(a)),e.invoke(a,r,l,i,u))}onHandleError(e,n,o,c){return e.handleError(o,c)}onScheduleTask(e,n,c,r){const l=r.type+":"+r.source;let i=t.scheduleInstance[l];i||(i=t.scheduleInstance[l]=o.createInstance(`Zone:schedule:${l}(ascii zone, any data)`));const u=e.scheduleTask(c,r);return i(s(c),a(r.data,2)),u}onInvokeTask(e,c,a,r,l,i){const u=r.source;let k=t.invokeTaskScope[u];return k||(k=t.invokeTaskScope[u]=o.createScope(`Zone:invokeTask:${u}(ascii zone)`)),n.leaveScope(k(s(a)),e.invokeTask(a,r,l,i))}onCancelTask(e,n,c,r){const l=r.source;let i=t.cancelInstance[l];i||(i=t.cancelInstance[l]=o.createInstance(`Zone:cancel:${l}(ascii zone, any options)`));const u=e.cancelTask(c,r);return i(s(c),a(r.data,2)),u}}function a(e,n){if(!e||!n)return null;const o={};for(const c in e)if(e.hasOwnProperty(c)){let t=e[c];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}o[c]=t}return o}function s(e){let n=e.name,o=e.parent;for(;null!=o;)n=o.name+"::"+n,o=o.parent;return n}t.forkInstance=c?o.createInstance("Zone:fork(ascii zone, ascii newZone)"):null,t.scheduleInstance={},t.cancelInstance={},t.invokeScope={},t.invokeTaskScope={},Zone.wtfZoneSpec=c?new t:null}("object"==typeof window&&window||"object"==typeof self&&self||global); |
---|