{"version":3,"sources":["webpack:///node_modules/@angular/localize/fesm2015/init.js","webpack:///src/polyfills.ts","webpack:///node_modules/zone.js/dist/zone-evergreen.js"],"names":["__globalThis","globalThis","__window","window","__self","self","WorkerGlobalScope","__global","global","$localize","messageParts","expressions","translate","translation","message","stripBlock","raw","i","length","messagePart","rawMessagePart","charAt","substring","cooked","cookedIndex","rawIndex","Error","performance","mark","name","performanceMeasure","label","symbolPrefix","__symbol__","checkDuplicate","Zone","parent","zoneSpec","this","_parent","_name","_properties","properties","_zoneDelegate","ZoneDelegate","patches","zone","current","_currentZoneFrame","_currentTask","fn","hasOwnProperty","perfName","_api","key","getZoneWith","fork","callback","source","_callback","intercept","runGuarded","arguments","applyThis","applyArgs","invoke","error","handleError","task","NO_ZONE","state","notScheduled","type","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","data","isPeriodic","cancelFn","undefined","invokeTask","unknown","_updateTaskCount","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","scheduleTask","err","customSchedule","ZoneTask","microTask","customCancel","canceling","cancelTask","count","DELEGATE_ZS","onHasTask","delegate","_","target","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","targetZone","apply","returnTask","push","scheduleFn","scheduleMicroTask","value","isEmpty","counts","prev","next","change","options","_state","useG","call","args","_numberOfNestedTaskFrames","runTask","drainMicroTaskQueue","toState","fromState1","fromState2","handleId","toString","Object","prototype","symbolSetTimeout","symbolPromise","symbolThen","nativeMicroTaskQueuePromise","_microTaskQueue","_isDrainingMicrotaskQueue","resolve","nativeThen","queue","onUnhandledError","microtaskDrainDone","symbol","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","setNativePromise","NativePromise","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","__load_patch","api","getOwnPropertyDescriptor","defineProperty","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","e","rejection","console","stack","uncaughtPromiseError","shift","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","handler","isThenable","then","forwardResolution","forwardRejection","ZoneAwarePromise","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","makeResolver","promise","v","resolvePromise","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","wasCalled","wrappedFunction","TypeError","clearRejectedNoCatch","trace","currentTask","configurable","enumerable","writable","scheduleResolveOrReject","obj","constructor","JSON","stringify","REJECTION_HANDLED_HANDLER","splice","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","run","values","res","rej","onResolve","onReject","allWithCallback","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","get","Symbol","toStringTag","species","C","onFinally","race","all","ZONE_AWARE_PROMISE","desc","set","NewNativePromise","symbolThenPatched","Ctor","proto","prop","originalThen","fetch","resultPromise","ctor","Promise","ObjectGetPrototypeOf","getPrototypeOf","create","Array","slice","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","ZONE_SYMBOL_PREFIX","wrap","scheduleMacroTaskWithCurrentZone","scheduleMacroTask","zoneSymbol","isWindowExists","internalWindow","_global","NULL_ON_PROP_VALUE","isPropertyWritable","propertyDesc","isWebWorker","isNode","process","isBrowser","isMix","zoneSymbolEventNames","wrapFn","event","eventNameSymbol","listener","result","errorEvent","filename","lineno","colno","preventDefault","patchProperty","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","substr","newValue","removeEventListener","addEventListener","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","a","instance","patchFn","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","meta","patched","original","isDetectedIEOrEdge","ieOrEdge","isIE","ua","navigator","userAgent","indexOf","originalFunctionToString","Function","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames$1","globalSources","EVENT_NAME_SYMBOL_REGX","RegExp","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","add","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","listeners","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","once","globalZoneAwareCallback","tasks","copyTasks","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","buildEventListenerOptions","passive","capture","assign","prepend","isExisting","symbolEventNames","symbolEventName","existingTasks","allRemoved","compare","diff","typeOfDelegate","blackListedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","constructorName","targetSource","scheduleEventTask","unshift","existingTask","findEventTasks","captureTasks","removeTasks","keys","match","exec","evtName","results","foundTasks","captureFalseTasks","captureTrueTasks","concat","Event","targetName","method","callbacks","nativeDelegate","opts","forEach","descriptor","windowEventNames","mediaElementEventNames","frameEventNames","frameSetEventNames","marqueeEventNames","XMLHttpRequestEventNames","IDBIndexEventNames","websocketEventNames","workerEventNames","eventNames","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","propertyDescriptorPatch","supportsWebSocket","WebSocket","ignoreErrorProperties","Document","Element","HTMLElement","HTMLMediaElement","HTMLFrameSetElement","HTMLBodyElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","TRUE_STR","FALSE_STR","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","delay","handle","ref","unref","bind","id","eventTargetPatch","EVENT_TARGET","legacyPatch","blockingMethods","s","customElements","XMLHttpRequestPrototype","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","XHR_SCHEDULED","XHR_ERROR_BEFORE_SCHEDULED","XHR_LISTENER","newListener","readyState","DONE","aborted","loadTasks","oriInvoke","XHR_TASK","sendNative","placeholderCallback","abortNative","openNative","XHR_SYNC","XHR_URL","fetchTaskAborting","fetchTaskScheduling","url","geolocation","fnNames","findPromiseRejectionHandler","PromiseRejectionEvent","evt"],"mappings":"qHAaA,MAAMA,EAAqC,oBAAfC,YAA8BA,WACpDC,EAA6B,oBAAXC,QAA0BA,OAC5CC,EAAyB,oBAATC,MAAqD,oBAAtBC,mBACjDD,gBAAgBC,mBAAqBD,KACnCE,EAA6B,oBAAXC,QAA0BA,OAwG5CC,EAAY,SAAUC,KAAiBC,GACzC,GAAIF,EAAUG,UAAW,CAErB,M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,YACA,aACA,aACA,YACA,WACA,YACA,UACA,aACA,oBACA,QACA,OACA,UACA,gBACA,cACA,eACA,eACA,oBACA,uBACA,4BACA,mBACA,sBACA,yBACA,cACA,WACA,cACA,YACA,WACA,aACA,QACA,SACA,SACA,SACA,UACA,SACA,kBACA,cACA,OACA,OACA,UACA,SACA,UACA,aACA,eACA,cACA,YACA,aACA,WACA,mBACA,gBACA,UACA,SAoH6ClB,OAbzB,CAAC,uBAAwB,mBAAoB,6BAC9C,CAAC,eAAgB,qBACf,CAAC,UAvGC,CACvB,qBAAsB,sBAAuB,mBAAoB,SAAU,mBAC3E,sBAAuB,yBAA0B,qBAAsB,kBACvE,qBAAsB,wBAAyB,oBAAqB,mBACpE,mBAAoB,UA8GuGS,EA5EjG,CAC1B,aAAc,YAAa,cAAe,OAAQ,MAAO,QAAS,YAAa,UAC/E,iBAAkB,SAAU,gBAAiB,kBAAmB,qBAChE,2BAA4B,uBAAwB,uBAG5B,CACxB,WACA,cACA,cACA,iBACA,mBACA,kBACA,eACA,aACA,gBACA,gBACA,iBACA,kBACA,cACA,eACA,iBACA,cACA,OACA,UACA,YACA,iBACA,YACA,cACA,WACA,UACA,aACA,eACA,UACA,0BACA,aACA,OACA,gBACA,6BACA,kBACA,qBACA,eACA,gBACA,iBACA,eACA,sBACA,iBACA,uBACA,kBACA,gBACA,iBACA,iBACA,iBACA,gBACA,eACA,gBACA,cACA,aACA,gCACA,mBACA,OACA,kBAgBJ,SAASzQ,GAAiBlG,EAAQ8O,EAAcuI,GAC5C,IAAKA,GAAgD,IAA5BA,EAAiB7c,OACtC,OAAOsU,EAEX,MAAMwI,EAAMD,EAAiBE,OAAOC,GAAMA,EAAGxX,SAAWA,GACxD,IAAKsX,GAAsB,IAAfA,EAAI9c,OACZ,OAAOsU,EAEX,MAAM2I,EAAyBH,EAAI,GAAGD,iBACtC,OAAOvI,EAAayI,OAAOG,IAA8C,IAAxCD,EAAuBpH,QAAQqH,IAEpE,SAASC,GAAwB3X,EA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EAA4B,yBAj3FmB,oC","file":"x","sourcesContent":["/**\n * @license Angular v10.0.3\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n// Always use __globalThis if available; this is the spec-defined global variable across all\n// environments.\n// Then fallback to __global first; in Node tests both __global and __window may be defined.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Tag a template literal string for localization.\n *\n * For example:\n *\n * ```ts\n * $localize `some string to localize`\n * ```\n *\n * **Providing meaning, description and id**\n *\n * You can optionally specify one or more of `meaning`, `description` and `id` for a localized\n * string by pre-pending it with a colon delimited block of the form:\n *\n * ```ts\n * $localize`:meaning|description@@id:source message text`;\n *\n * $localize`:meaning|:source message text`;\n * $localize`:description:source message text`;\n * $localize`:@@id:source message text`;\n * ```\n *\n * This format is the same as that used for `i18n` markers in Angular templates. See the\n * [Angular 18n guide](guide/i18n#template-translations).\n *\n * **Naming placeholders**\n *\n * If the template literal string contains expressions, then the expressions will be automatically\n * associated with placeholder names for you.\n *\n * For example:\n *\n * ```ts\n * $localize `Hi ${name}! There are ${items.length} items.`;\n * ```\n *\n * will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.\n *\n * The recommended practice is to name the placeholder associated with each expression though.\n *\n * Do this by providing the placeholder name wrapped in `:` characters directly after the\n * expression. These placeholder names are stripped out of the rendered localized string.\n *\n * For example, to name the `items.length` expression placeholder `itemCount` you write:\n *\n * ```ts\n * $localize `There are ${items.length}:itemCount: items`;\n * ```\n *\n * **Escaping colon markers**\n *\n * If you need to use a `:` character directly at the start of a tagged string that has no\n * metadata block, or directly after a substitution expression that has no name you must escape\n * the `:` by preceding it with a backslash:\n *\n * For example:\n *\n * ```ts\n * // message has a metadata block so no need to escape colon\n * $localize `:some description::this message starts with a colon (:)`;\n * // no metadata block so the colon must be escaped\n * $localize `\\:this message starts with a colon (:)`;\n * ```\n *\n * ```ts\n * // named substitution so no need to escape colon\n * $localize `${label}:label:: ${}`\n * // anonymous substitution so colon must be escaped\n * $localize `${label}\\: ${}`\n * ```\n *\n * **Processing localized strings:**\n *\n * There are three scenarios:\n *\n * * **compile-time inlining**: the `$localize` tag is transformed at compile time by a\n * transpiler, removing the tag and replacing the template literal string with a translated\n * literal string from a collection of translations provided to the transpilation tool.\n *\n * * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and\n * reorders the parts (static strings and expressions) of the template literal string with strings\n * from a collection of translations loaded at run-time.\n *\n * * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates\n * the original template literal string without applying any translations to the parts. This\n * version is used during development or where there is no need to translate the localized\n * template literals.\n * @param messageParts a collection of the static parts of the template string.\n * @param expressions a collection of the values of each placeholder in the template string.\n * @returns the translated string, with the `messageParts` and `expressions` interleaved together.\n */\nconst $localize = function (messageParts, ...expressions) {\n if ($localize.translate) {\n // Don't use array expansion here to avoid the compiler adding `__read()` helper unnecessarily.\n const translation = $localize.translate(messageParts, expressions);\n messageParts = translation[0];\n expressions = translation[1];\n }\n let message = stripBlock(messageParts[0], messageParts.raw[0]);\n for (let i = 1; i < messageParts.length; i++) {\n message += expressions[i - 1] + stripBlock(messageParts[i], messageParts.raw[i]);\n }\n return message;\n};\nconst BLOCK_MARKER = ':';\n/**\n * Strip a delimited \"block\" from the start of the `messagePart`, if it is found.\n *\n * If a marker character (:) actually appears in the content at the start of a tagged string or\n * after a substitution expression, where a block has not been provided the character must be\n * escaped with a backslash, `\\:`. This function checks for this by looking at the `raw`\n * messagePart, which should still contain the backslash.\n *\n * @param messagePart The cooked message part to process.\n * @param rawMessagePart The raw message part to check.\n * @returns the message part with the placeholder name stripped, if found.\n * @throws an error if the block is unterminated\n */\nfunction stripBlock(messagePart, rawMessagePart) {\n return rawMessagePart.charAt(0) === BLOCK_MARKER ?\n messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1) :\n messagePart;\n}\n/**\n * Find the end of a \"marked block\" indicated by the first non-escaped colon.\n *\n * @param cooked The cooked string (where escaped chars have been processed)\n * @param raw The raw string (where escape sequences are still in place)\n *\n * @returns the index of the end of block marker\n * @throws an error if the block is unterminated\n */\nfunction findEndOfBlock(cooked, raw) {\n /***********************************************************************************************\n * This function is repeated in `src/utils/messages.ts` and the two should be kept in sync.\n * The reason is that this file is marked as having side-effects, and if we import `messages.ts`\n * into it, the whole of `src/utils` will be included in this bundle and none of the functions\n * will be tree shaken.\n ***********************************************************************************************/\n for (let cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) {\n if (raw[rawIndex] === '\\\\') {\n rawIndex++;\n }\n else if (cooked[cookedIndex] === BLOCK_MARKER) {\n return cookedIndex;\n }\n }\n throw new Error(`Unterminated $localize metadata block in \"${raw}\".`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Attach $localize to the global context, as a side-effect of this module.\n_global.$localize = $localize;\n//# sourceMappingURL=init.js.map\n","/***************************************************************************************************\r\n * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.\r\n */\r\nimport '@angular/localize/init';\r\n/**\r\n * This file includes polyfills needed by Angular and is loaded before the app.\r\n * You can add your own extra polyfills to this file.\r\n *\r\n * This file is divided into 2 sections:\r\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\r\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\r\n * file.\r\n *\r\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\r\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\r\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\r\n *\r\n * Learn more in https://angular.io/guide/browser-support\r\n */\r\n\r\n/***************************************************************************************************\r\n * BROWSER POLYFILLS\r\n */\r\n\r\n/** IE10 and IE11 requires the following for NgClass support on SVG elements */\r\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\r\n\r\n/**\r\n * Web Animations `@angular/platform-browser/animations`\r\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\r\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\r\n */\r\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\r\n\r\n/**\r\n * By default, zone.js will patch all possible macroTask and DomEvents\r\n * user can disable parts of macroTask/DomEvents patch by setting following flags\r\n * because those flags need to be set before `zone.js` being loaded, and webpack\r\n * will put import in the top of bundle, so user need to create a separate file\r\n * in this directory (for example: zone-flags.ts), and put the following flags\r\n * into that file, and then add the following code before importing zone.js.\r\n * import './zone-flags.ts';\r\n *\r\n * The flags allowed in zone-flags.ts are listed here.\r\n *\r\n * The following flags will work for all browsers.\r\n *\r\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\r\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\r\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\r\n *\r\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\r\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\r\n *\r\n * (window as any).__Zone_enable_cross_context_check = true;\r\n *\r\n */\r\n\r\n/***************************************************************************************************\r\n * Zone JS is required by default for Angular itself.\r\n */\r\nimport 'zone.js/dist/zone'; // Included with Angular CLI.\r\n\r\n\r\n/***************************************************************************************************\r\n * APPLICATION IMPORTS\r\n */\r\n","/**\n* @license Angular v9.1.0-next.4+61.sha-e552591.with-local-changes\n* (c) 2010-2020 Google LLC. https://angular.io/\n* License: MIT\n*/\n(function (factory) {\n typeof define === 'function' && define.amd ? define(factory) :\n factory();\n}((function () { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n const Zone$1 = (function (global) {\n const performance = global['performance'];\n function mark(name) { performance && performance['mark'] && performance['mark'](name); }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) { return symbolPrefix + name; }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() { return _currentZoneFrame.zone; }\n static get currentTask() { return _currentTask; }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn) {\n if (patches.hasOwnProperty(name)) {\n if (checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() { return this._parent; }\n get name() { return this._name; }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__symbol__ = __symbol__;\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS =\n zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt = zoneSpec &&\n (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone = zoneSpec &&\n (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ?\n this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ?\n this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ?\n this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() { return this._zone; }\n get state() { return this._state; }\n cancelScheduleRequest() { this._transitionTo(notScheduled, scheduling); }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue);\n }\n else {\n global[symbolSetTimeout](drainMicroTaskQueue, 0);\n }\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = { name: 'NO ZONE' };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n setNativePromise: (NativePromise) => {\n // sometimes NativePromise.resolve static function\n // is not ready yet, (such as core-js/es6.promise)\n // so we need to check here.\n if (NativePromise && typeof NativePromise.resolve === 'function') {\n nativeMicroTaskQueuePromise = NativePromise.resolve(0);\n }\n },\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n })(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => { throw uncaughtPromiseError; });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) { return value && value.then; }\n function forwardResolution(value) { return value; }\n function forwardRejection(rejection) { return ZoneAwarePromise.reject(rejection); }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => { resolvePromise(promise, false, err); })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => { resolvePromise(promise, false, err); })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n if (!isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // and the rejected value is an Error object,\n // use the value instead of wrapping it.\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected : forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n class ZoneAwarePromise {\n static toString() { return ZONE_AWARE_PROMISE_TO_STRING; }\n static resolve(value) {\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) { resolve(value); }\n function onReject(error) { reject(error); }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) { return ZoneAwarePromise.allWithCallback(values); }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() { return 'Promise'; }\n get [Symbol.species]() { return ZoneAwarePromise; }\n then(onFulfilled, onRejected) {\n let C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n let C = this.constructor[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n const ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');\n let desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');\n if (!desc || desc.configurable) {\n desc && delete desc.writable;\n desc && delete desc.value;\n if (!desc) {\n desc = { configurable: true, enumerable: true };\n }\n desc.get = function () {\n // if we already set ZoneAwarePromise, use patched one\n // otherwise return native one.\n return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];\n };\n desc.set = function (NewNativePromise) {\n if (NewNativePromise === ZoneAwarePromise) {\n // if the NewNativePromise is ZoneAwarePromise\n // save to global\n global[ZONE_AWARE_PROMISE] = NewNativePromise;\n }\n else {\n // if the NewNativePromise is not ZoneAwarePromise\n // for example: after load zone.js, some library just\n // set es6-promise to global, if we set it to global\n // directly, assertZonePatched will fail and angular\n // will not loaded, so we just set the NewNativePromise\n // to global[symbolPromise], so the result is just like\n // we load ES6 Promise before zone.js\n global[symbolPromise] = NewNativePromise;\n if (!NewNativePromise.prototype[symbolThen]) {\n patchThen(NewNativePromise);\n }\n api.setNativePromise(NewNativePromise);\n }\n };\n ObjectDefineProperty(global, 'Promise', desc);\n }\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => { originalThen.call(this, resolve, reject); });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function () {\n let resultPromise = fn.apply(this, arguments);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n const fetch = global['fetch'];\n if (typeof fetch == 'function') {\n global[api.symbol('fetch')] = fetch;\n global['fetch'] = zoneify(fetch);\n }\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n });\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n /// \n // issue #989, to reduce bundle size, use short name\n /** Object.getOwnPropertyDescriptor */\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n /** Object.defineProperty */\n const ObjectDefineProperty = Object.defineProperty;\n /** Object.getPrototypeOf */\n const ObjectGetPrototypeOf = Object.getPrototypeOf;\n /** Object.create */\n const ObjectCreate = Object.create;\n /** Array.prototype.slice */\n const ArraySlice = Array.prototype.slice;\n /** addEventListener string const */\n const ADD_EVENT_LISTENER_STR = 'addEventListener';\n /** removeEventListener string const */\n const REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n /** zoneSymbol addEventListener */\n const ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n /** zoneSymbol removeEventListener */\n const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n /** true string const */\n const TRUE_STR = 'true';\n /** false string const */\n const FALSE_STR = 'false';\n /** Zone symbol prefix string const. */\n const ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\n function wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n }\n function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n }\n const zoneSymbol = Zone.__symbol__;\n const isWindowExists = typeof window !== 'undefined';\n const internalWindow = isWindowExists ? window : undefined;\n const _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\n const REMOVE_ATTRIBUTE = 'removeAttribute';\n const NULL_ON_PROP_VALUE = [null];\n function bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n }\n function patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n }\n function isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n }\n const isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n // this code.\n const isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\n const isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n // we are in electron of nw, so we are both browser and nodejs\n // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n // this code.\n const isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\n const zoneSymbolEventNames = {};\n const wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signiture\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n };\n function patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // substr(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.substr(2);\n let eventNameSymbol = zoneSymbolEventNames[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n let previousValue = target[eventNameSymbol];\n if (previousValue) {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n if (originalDescSet) {\n originalDescSet.apply(target, NULL_ON_PROP_VALUE);\n }\n if (typeof newValue === 'function') {\n target[eventNameSymbol] = newValue;\n target.addEventListener(eventName, wrapFn, false);\n }\n else {\n target[eventNameSymbol] = null;\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet && originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n }\n function patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.substr(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n }\n const originalInstanceKey = zoneSymbol('originalInstance');\n // wrap some native API on `window`\n function patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () { return this[originalInstanceKey][prop]; }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n }\n function copySymbolProperties(src, dest) {\n if (typeof Object.getOwnPropertySymbols !== 'function') {\n return;\n }\n const symbols = Object.getOwnPropertySymbols(src);\n symbols.forEach((symbol) => {\n const desc = Object.getOwnPropertyDescriptor(src, symbol);\n Object.defineProperty(dest, symbol, {\n get: function () { return src[symbol]; },\n set: function (value) {\n if (desc && (!desc.writable || typeof desc.set !== 'function')) {\n // if src[symbol] is not writable or not have a setter, just return\n return;\n }\n src[symbol] = value;\n },\n enumerable: desc ? desc.enumerable : true,\n configurable: desc ? desc.configurable : true\n });\n });\n }\n let shouldCopySymbolProperties = false;\n function patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && !(delegate = proto[delegateName])) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () { return patchDelegate(this, arguments); };\n attachOriginToPatched(proto[name], delegate);\n if (shouldCopySymbolProperties) {\n copySymbolProperties(delegate, proto[name]);\n }\n }\n }\n return delegate;\n }\n // TODO: @JiaLiPassion, support cancel task later if necessary\n function patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () { task.invoke.apply(this, arguments); };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n }\n function attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n }\n let isDetectedIEOrEdge = false;\n let ieOrEdge = false;\n function isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n }\n function isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // override Function.prototype.toString to make zone.js patched function\n // look like native function\n Zone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n });\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n let passiveSupported = false;\n if (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', { get: function () { passiveSupported = true; } });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n }\n // an identifier to tell ZoneTask do not create a new invoke closure\n const OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n };\n const zoneSymbolEventNames$1 = {};\n const globalSources = {};\n const EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\n const IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\n function prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames$1[eventName] = {};\n zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;\n }\n function patchEventTarget(_global, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n task.invoke(task, target, [event]);\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = this || event.target || _global;\n const tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = this || event.target || _global;\n const tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames$1[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const blackListedEvents = Zone[zoneSymbol('BLACK_LISTED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n if (blackListedEvents) {\n // check black list\n for (let i = 0; i < blackListedEvents.length; i++) {\n if (eventName === blackListedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames$1[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames$1[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n }\n function findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames$1[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames$1[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n }\n function patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n const globalEventHandlersEventNames = [\n 'abort',\n 'animationcancel',\n 'animationend',\n 'animationiteration',\n 'auxclick',\n 'beforeinput',\n 'blur',\n 'cancel',\n 'canplay',\n 'canplaythrough',\n 'change',\n 'compositionstart',\n 'compositionupdate',\n 'compositionend',\n 'cuechange',\n 'click',\n 'close',\n 'contextmenu',\n 'curechange',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragenter',\n 'dragexit',\n 'dragleave',\n 'dragover',\n 'drop',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'focus',\n 'focusin',\n 'focusout',\n 'gotpointercapture',\n 'input',\n 'invalid',\n 'keydown',\n 'keypress',\n 'keyup',\n 'load',\n 'loadstart',\n 'loadeddata',\n 'loadedmetadata',\n 'lostpointercapture',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'mousewheel',\n 'orientationchange',\n 'pause',\n 'play',\n 'playing',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerlockchange',\n 'mozpointerlockchange',\n 'webkitpointerlockerchange',\n 'pointerlockerror',\n 'mozpointerlockerror',\n 'webkitpointerlockerror',\n 'pointermove',\n 'pointout',\n 'pointerover',\n 'pointerup',\n 'progress',\n 'ratechange',\n 'reset',\n 'resize',\n 'scroll',\n 'seeked',\n 'seeking',\n 'select',\n 'selectionchange',\n 'selectstart',\n 'show',\n 'sort',\n 'stalled',\n 'submit',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'touchcancel',\n 'touchmove',\n 'touchstart',\n 'touchend',\n 'transitioncancel',\n 'transitionend',\n 'waiting',\n 'wheel'\n ];\n const documentEventNames = [\n 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',\n 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',\n 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',\n 'visibilitychange', 'resume'\n ];\n const windowEventNames = [\n 'absolutedeviceorientation',\n 'afterinput',\n 'afterprint',\n 'appinstalled',\n 'beforeinstallprompt',\n 'beforeprint',\n 'beforeunload',\n 'devicelight',\n 'devicemotion',\n 'deviceorientation',\n 'deviceorientationabsolute',\n 'deviceproximity',\n 'hashchange',\n 'languagechange',\n 'message',\n 'mozbeforepaint',\n 'offline',\n 'online',\n 'paint',\n 'pageshow',\n 'pagehide',\n 'popstate',\n 'rejectionhandled',\n 'storage',\n 'unhandledrejection',\n 'unload',\n 'userproximity',\n 'vrdisplayconnected',\n 'vrdisplaydisconnected',\n 'vrdisplaypresentchange'\n ];\n const htmlElementEventNames = [\n 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',\n 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',\n 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'\n ];\n const mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];\n const ieElementEventNames = [\n 'activate',\n 'afterupdate',\n 'ariarequest',\n 'beforeactivate',\n 'beforedeactivate',\n 'beforeeditfocus',\n 'beforeupdate',\n 'cellchange',\n 'controlselect',\n 'dataavailable',\n 'datasetchanged',\n 'datasetcomplete',\n 'errorupdate',\n 'filterchange',\n 'layoutcomplete',\n 'losecapture',\n 'move',\n 'moveend',\n 'movestart',\n 'propertychange',\n 'resizeend',\n 'resizestart',\n 'rowenter',\n 'rowexit',\n 'rowsdelete',\n 'rowsinserted',\n 'command',\n 'compassneedscalibration',\n 'deactivate',\n 'help',\n 'mscontentzoom',\n 'msmanipulationstatechanged',\n 'msgesturechange',\n 'msgesturedoubletap',\n 'msgestureend',\n 'msgesturehold',\n 'msgesturestart',\n 'msgesturetap',\n 'msgotpointercapture',\n 'msinertiastart',\n 'mslostpointercapture',\n 'mspointercancel',\n 'mspointerdown',\n 'mspointerenter',\n 'mspointerhover',\n 'mspointerleave',\n 'mspointermove',\n 'mspointerout',\n 'mspointerover',\n 'mspointerup',\n 'pointerout',\n 'mssitemodejumplistitemremoved',\n 'msthumbnailclick',\n 'stop',\n 'storagecommit'\n ];\n const webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];\n const formEventNames = ['autocomplete', 'autocompleteerror'];\n const detailEventNames = ['toggle'];\n const frameEventNames = ['load'];\n const frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];\n const marqueeEventNames = ['bounce', 'finish', 'start'];\n const XMLHttpRequestEventNames = [\n 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',\n 'readystatechange'\n ];\n const IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];\n const websocketEventNames = ['close', 'error', 'open', 'message'];\n const workerEventNames = ['error', 'message'];\n const eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);\n function filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n }\n function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n }\n function propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const supportsWebSocket = typeof WebSocket !== 'undefined';\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n if (isBrowser) {\n const internalWindow = window;\n const ignoreErrorProperties = isIE ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);\n if (typeof internalWindow['SVGElement'] !== 'undefined') {\n patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);\n }\n patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);\n patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);\n patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);\n const HTMLMarqueeElement = internalWindow['HTMLMarqueeElement'];\n if (HTMLMarqueeElement) {\n patchFilteredProperties(HTMLMarqueeElement.prototype, marqueeEventNames, ignoreProperties);\n }\n const Worker = internalWindow['Worker'];\n if (Worker) {\n patchFilteredProperties(Worker.prototype, workerEventNames, ignoreProperties);\n }\n }\n const XMLHttpRequest = _global['XMLHttpRequest'];\n if (XMLHttpRequest) {\n // XMLHttpRequest is not available in ServiceWorker, so we need to check here\n patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n const XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n if (typeof IDBIndex !== 'undefined') {\n patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);\n }\n if (supportsWebSocket) {\n patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('util', (global, Zone, api) => {\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({ globalSources, zoneSymbolEventNames: zoneSymbolEventNames$1, eventNames, isBrowser, isMix, isNode, TRUE_STR,\n FALSE_STR, ZONE_SYMBOL_PREFIX, ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR });\n });\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n const taskSymbol = zoneSymbol('zoneTask');\n function patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n function timer() {\n try {\n task.invoke.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n if (!(task.data && task.data.isPeriodic)) {\n if (typeof data.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[data.handleId];\n }\n else if (data.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n data.handleId[taskSymbol] = null;\n }\n }\n }\n }\n data.args[0] = timer;\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) { return clearNative(task.data.handleId); }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n }\n function patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n Zone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n });\n Zone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n });\n Zone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n });\n Zone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n });\n Zone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);\n }\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n patchClass('IntersectionObserver');\n patchClass('FileReader');\n });\n Zone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n });\n Zone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n });\n Zone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) { return target[XHR_TASK]; }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n });\n Zone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n });\n Zone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n });\n\n})));\n"]}