{"version":3,"sources":["webpack:///node_modules/@juggle/resize-observer/lib/utils/prettify.js","webpack:///node_modules/@juggle/resize-observer/lib/utils/scheduler.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","webpack:///node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","webpack:///node_modules/@juggle/resize-observer/lib/utils/element.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObservation.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","webpack:///node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","webpack:///node_modules/@juggle/resize-observer/lib/ResizeObserver.js","webpack:///source/web/src/polyfills.ts","webpack:///node_modules/zone.js/dist/zone-evergreen.js"],"names":["prettifyConsoleOutput","fn","toString","requestAnimationFrame","window","observerConfig","attributes","characterData","childList","subtree","events","rafSlot","Map","resizeObserverSlot","scheduled","dispatchCallbacksOnNextFrame","t","frameCallbacks","resizeObserverCallbacks","forEach","callback","push","clear","this","stopped","listener","schedule","frames","scheduler","set","elementsHaveResized","process","run","start","stop","cb","observer","observe","document","body","addEventListener","MutationObserver","name","disconnect","removeEventListener","rafIdBase","ResizeObserverBoxOptions","Error","handle","cancelAnimationFrame","delete","DOMRectReadOnly","x","y","width","height","top","left","bottom","right","Object","freeze","rectangle","isSVG","target","SVGElement","isHidden","getBBox","offsetWidth","offsetHeight","getClientRects","length","cache","scrollRegexp","IE","test","navigator","userAgent","parseDimension","pixel","parseFloat","inlineSize","blockSize","zeroBoxes","borderBoxSize","contentBoxSize","scrollBoxSize","devicePixelBorderBoxSize","contentRect","calculateBoxSizes","has","get","cs","getComputedStyle","dpr","devicePixelRatio","svg","removePadding","boxSizing","canScrollVertically","overflowY","canScrollHorizontally","overflowX","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderTopWidth","borderRight","borderRightWidth","borderBottom","borderBottomWidth","horizontalPadding","verticalPadding","horizontalBorderArea","borderLeftWidth","verticalBorderArea","horizontalScrollbarThickness","clientHeight","verticalScrollbarThickness","clientWidth","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","BORDER_BOX","SCROLL_BOX","DEVICE_PIXEL_BORDER_BOX","CONTENT_BOX","lastReportedSize","size","ResizeObserverDetail","resizeObserver","activeTargets","skippedTargets","observationTargets","msg","contentSize","scrollSize","calculateDepthForNode","node","Infinity","depth","parent","parentNode","broadcastActiveObservations","shallowestDepth","callbacks","resizeObservers","ro","entries","ot","entry","targetDepth","splice","gatherActiveObservationsAtDepth","isActive","observerMap","watching","updateCount","n","getObservationIndex","i","some","event","ErrorEvent","message","createEvent","initEvent","dispatchEvent","detail","options","box","index","indexOf","DPPB","arguments","TypeError","connect","Element","tagName","unobserve","global","performance","mark","performanceMeasure","label","symbolPrefix","__symbol__","checkDuplicate","Zone","zoneSpec","_parent","_name","_properties","properties","_zoneDelegate","ZoneDelegate","patches","zone","current","_currentZoneFrame","_currentTask","hasOwnProperty","perfName","_api","key","getZoneWith","fork","source","_callback","intercept","runGuarded","applyThis","applyArgs","invoke","error","handleError","task","NO_ZONE","state","notScheduled","type","eventTask","macroTask","reEntryGuard","running","_transitionTo","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","_","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","scheduleFn","scheduleMicroTask","value","isEmpty","counts","prev","next","change","_state","self","useG","call","args","_numberOfNestedTaskFrames","runTask","drainMicroTaskQueue","toState","fromState1","fromState2","handleId","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","clearRejectedNoCatch","trace","currentTask","configurable","enumerable","writable","scheduleResolveOrReject","obj","constructor","JSON","stringify","REJECTION_HANDLED_HANDLER","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","values","res","rej","onResolve","onReject","allWithCallback","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","Symbol","toStringTag","species","C","onFinally","race","all","ZONE_AWARE_PROMISE","desc","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","WorkerGlobalScope","isNode","isBrowser","isMix","zoneSymbolEventNames","wrapFn","eventNameSymbol","result","errorEvent","filename","lineno","colno","preventDefault","patchProperty","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","substr","newValue","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","a","instance","patchFn","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","meta","patched","original","isDetectedIEOrEdge","ieOrEdge","isIE","ua","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","nativeDelegate","opts","descriptor","windowEventNames","mediaElementEventNames","frameEventNames","frameSetEventNames","marqueeEventNames","XMLHttpRequestEventNames","IDBIndexEventNames","websocketEventNames","workerEventNames","eventNames","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","propertyDescriptorPatch","supportsWebSocket","WebSocket","ignoreErrorProperties","Document","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","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":"+HAAA,MACMA,EAAyBC,IAC3BA,EAAGC,SAAW,WACV,MAHwB,kDAKrBD,GCFLE,EAAwBC,OAAOD,sBAC/BE,EAAiB,CAAEC,YAAY,EAAMC,eAAe,EAAMC,WAAW,EAAMC,SAAS,GACpFC,EAAS,CACX,SACA,OACA,gBACA,eACA,iBACA,qBACA,QACA,UACA,UACA,YACA,YACA,WACA,OACA,SAEEC,EAAU,IAAIC,IACdC,EAAqB,IAAID,IAC/B,IAAIE,EACJ,MAAMC,EAA+B,KAC7BD,IAGJA,GAAY,EAqBZX,GAAsBA,SApBDa,GACjBF,GAAY,EACZ,MAAMG,EAAiB,GACjBC,EAA0B,GAChCP,EAAQQ,QAAQC,GAAYH,EAAeI,KAAKD,IAChDP,EAAmBM,QAAQC,GAAYF,EAAwBG,KAAKD,IACpET,EAAQW,QACRT,EAAmBS,QACnB,IACI,IAAK,IAAIF,KAAYH,EACjBG,EAASJ,GAGjB,QACI,IAAK,IAAII,KAAYF,EACjBE,EAASJ,SA2DnB,EAAY,IApDlB,MACI,cACIO,KAAKC,SAAU,EACfD,KAAKE,SAAW,IAAMF,KAAKG,WAE/B,IAAIC,GACA,MAAMC,EAAYL,KAClBV,EAAmBgB,IAAIN,MAAKA,WACxB,IAAIO,GAAsB,EAC1B,IACIA,EAAsBC,IAE1B,QACQD,EACAF,EAAUI,IAAI,IAETL,EACLC,EAAUI,IAAIL,EAAS,GAGvBC,EAAUK,YAItBlB,IAEJ,WACIQ,KAAKW,OACLX,KAAKS,IA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BACA,oBACA,iBACA,YACA,QACA,QACA,cACA,aACA,WACA,OACA,UACA,YACA,WACA,YACA,WACA,OACA,iBACA,UACA,QACA,QACA,QACA,UACA,WACA,oBACA,QACA,UACA,UACA,WACA,QACA,OACA,YACA,aACA,iBACA,qBACA,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,SAoH6ChB,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,UA8GuGO,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,SAAS3P,GAAiBnS,EAAQsa,EAAckI,GAC5C,IAAKA,GAAgD,IAA5BA,EAAiBjiB,OACtC,OAAO+Z,EAEX,MAAMmI,EAAMD,EAAiBE,OAAOC,GAAMA,EAAG3iB,SAAWA,GACxD,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AI2f,EAAuB,CACvB,MAAMC,EAAM,IAAID,EAAsBrG,EAAS,CAAEhN,QAASrB,EAAEqB,QAASkC,OAAQvD,EAAEC,YAC/EzI,EAAUR,OAAO2d,OAK7B5f,EAA8B,wBAC9BQ,EAAKqQ,EAAW,qCACZ6O,EAA4B,sBAChClf,EAAKqQ,EAAW,4BACZ6O,EAA4B,yBAj3FmB,oC","file":"x","sourcesContent":["const POLYFILL_CONSOLE_OUTPUT = 'function ResizeObserver () { [polyfill code] }';\nconst prettifyConsoleOutput = (fn) => {\n    fn.toString = function () {\n        return POLYFILL_CONSOLE_OUTPUT;\n    };\n    return fn;\n};\nexport { POLYFILL_CONSOLE_OUTPUT, prettifyConsoleOutput };\n","import { process } from '../ResizeObserverController';\nimport { prettifyConsoleOutput } from './prettify';\nconst CATCH_FRAMES = 60 / 5;\nconst requestAnimationFrame = window.requestAnimationFrame;\nconst observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nconst events = [\n    'resize',\n    'load',\n    'transitionend',\n    'animationend',\n    'animationstart',\n    'animationiteration',\n    'keyup',\n    'keydown',\n    'mouseup',\n    'mousedown',\n    'mouseover',\n    'mouseout',\n    'blur',\n    'focus'\n];\nconst rafSlot = new Map();\nconst resizeObserverSlot = new Map();\nlet scheduled;\nconst dispatchCallbacksOnNextFrame = () => {\n    if (scheduled) {\n        return;\n    }\n    scheduled = true;\n    function runSchedule(t) {\n        scheduled = false;\n        const frameCallbacks = [];\n        const resizeObserverCallbacks = [];\n        rafSlot.forEach(callback => frameCallbacks.push(callback));\n        resizeObserverSlot.forEach(callback => resizeObserverCallbacks.push(callback));\n        rafSlot.clear();\n        resizeObserverSlot.clear();\n        try {\n            for (let callback of frameCallbacks) {\n                callback(t);\n            }\n        }\n        finally {\n            for (let callback of resizeObserverCallbacks) {\n                callback(t);\n            }\n        }\n    }\n    ;\n    requestAnimationFrame(runSchedule);\n};\nclass Scheduler {\n    constructor() {\n        this.stopped = true;\n        this.listener = () => this.schedule();\n    }\n    run(frames) {\n        const scheduler = this;\n        resizeObserverSlot.set(this, function ResizeObserver() {\n            let elementsHaveResized = false;\n            try {\n                elementsHaveResized = process();\n            }\n            finally {\n                if (elementsHaveResized) {\n                    scheduler.run(60);\n                }\n                else if (frames) {\n                    scheduler.run(frames - 1);\n                }\n                else {\n                    scheduler.start();\n                }\n            }\n        });\n        dispatchCallbacksOnNextFrame();\n    }\n    schedule() {\n        this.stop();\n        this.run(CATCH_FRAMES);\n    }\n    observe() {\n        const cb = () => this.observer && this.observer.observe(document.body, observerConfig);\n        document.body ? cb() : window.addEventListener('DOMContentLoaded', cb);\n    }\n    start() {\n        if (this.stopped) {\n            this.stopped = false;\n            if ('MutationObserver' in window) {\n                this.observer = new MutationObserver(this.listener);\n                this.observe();\n            }\n            events.forEach(name => window.addEventListener(name, this.listener, true));\n        }\n    }\n    stop() {\n        if (!this.stopped) {\n            this.observer && this.observer.disconnect();\n            events.forEach(name => window.removeEventListener(name, this.listener, true));\n            this.stopped = true;\n        }\n    }\n}\nconst scheduler = new Scheduler();\nlet rafIdBase = 0;\nwindow.requestAnimationFrame = function (callback) {\n    if (typeof callback !== 'function') {\n        throw new Error('requestAnimationFrame expects 1 callback argument of type function.');\n    }\n    const handle = rafIdBase += 1;\n    rafSlot.set(handle, function AnimationFrame(t) { return callback(t); });\n    dispatchCallbacksOnNextFrame();\n    return handle;\n};\nwindow.cancelAnimationFrame = function (handle) {\n    rafSlot.delete(handle);\n};\nprettifyConsoleOutput(window.requestAnimationFrame);\nprettifyConsoleOutput(window.cancelAnimationFrame);\nexport { scheduler };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n    ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n    ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n    ResizeObserverBoxOptions[\"SCROLL_BOX\"] = \"scroll-box\";\n    ResizeObserverBoxOptions[\"DEVICE_PIXEL_BORDER_BOX\"] = \"device-pixel-border-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","class DOMRectReadOnly {\n    constructor(x, y, width, height) {\n        this.x = x;\n        this.y = y;\n        this.width = width;\n        this.height = height;\n        this.top = this.y;\n        this.left = this.x;\n        this.bottom = this.top + this.height;\n        this.right = this.left + this.width;\n        return Object.freeze(this);\n    }\n    static fromRect(rectangle) {\n        return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n    }\n}\nexport { DOMRectReadOnly };\n","const isSVG = (target) => target instanceof SVGElement && 'getBBox' in target;\nconst isHidden = (target) => {\n    if (isSVG(target)) {\n        const { width, height } = target.getBBox();\n        return !width && !height;\n    }\n    const { offsetWidth, offsetHeight } = target;\n    return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nexport { isSVG, isHidden };\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nconst cache = new Map();\nconst scrollRegexp = /auto|scroll/;\nconst IE = (/msie|trident/i).test(navigator.userAgent);\nconst parseDimension = (pixel) => parseFloat(pixel || '0');\nconst size = (inlineSize = 0, blockSize = 0) => {\n    return Object.freeze({ inlineSize, blockSize });\n};\nconst zeroBoxes = Object.freeze({\n    borderBoxSize: size(),\n    contentBoxSize: size(),\n    scrollBoxSize: size(),\n    devicePixelBorderBoxSize: size(),\n    contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nconst calculateBoxSizes = (target) => {\n    if (cache.has(target)) {\n        return cache.get(target);\n    }\n    if (isHidden(target)) {\n        cache.set(target, zeroBoxes);\n        return zeroBoxes;\n    }\n    const cs = getComputedStyle(target);\n    const dpr = window.devicePixelRatio;\n    const svg = isSVG(target) && target.getBBox();\n    const removePadding = !IE && cs.boxSizing === 'border-box';\n    const canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n    const canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n    const paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n    const paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n    const paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n    const paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n    const borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n    const borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n    const borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n    const borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n    const horizontalPadding = paddingLeft + paddingRight;\n    const verticalPadding = paddingTop + paddingBottom;\n    const horizontalBorderArea = borderLeft + borderRight;\n    const verticalBorderArea = borderTop + borderBottom;\n    const horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n    const verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n    const widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n    const heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n    const contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n    const contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n    const borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n    const borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n    const boxes = Object.freeze({\n        borderBoxSize: size(borderBoxWidth, borderBoxHeight),\n        contentBoxSize: size(contentWidth, contentHeight),\n        scrollBoxSize: size(contentWidth + horizontalPadding, contentHeight + verticalPadding),\n        devicePixelBorderBoxSize: size(borderBoxWidth * dpr, borderBoxHeight * dpr),\n        contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n    });\n    cache.set(target, boxes);\n    return boxes;\n};\nconst calculateBoxSize = (target, observedBox) => {\n    const boxes = calculateBoxSizes(target);\n    switch (observedBox) {\n        case ResizeObserverBoxOptions.BORDER_BOX:\n            return boxes.borderBoxSize;\n        case ResizeObserverBoxOptions.SCROLL_BOX:\n            return boxes.scrollBoxSize;\n        case ResizeObserverBoxOptions.DEVICE_PIXEL_BORDER_BOX:\n            return boxes.devicePixelBorderBoxSize;\n        case ResizeObserverBoxOptions.CONTENT_BOX:\n        default:\n            return boxes.contentBoxSize;\n    }\n};\nexport { calculateBoxSize, calculateBoxSizes, cache };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nclass ResizeObservation {\n    constructor(target, observedBox) {\n        this.target = target;\n        this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n        this.lastReportedSize = {\n            inlineSize: 0,\n            blockSize: 0\n        };\n    }\n    isActive() {\n        const size = calculateBoxSize(this.target, this.observedBox);\n        return this.lastReportedSize.inlineSize !== size.inlineSize\n            || this.lastReportedSize.blockSize !== size.blockSize;\n    }\n}\nexport { ResizeObservation };\n","class ResizeObserverDetail {\n    constructor(resizeObserver, callback) {\n        this.activeTargets = [];\n        this.skippedTargets = [];\n        this.observationTargets = [];\n        this.observer = resizeObserver;\n        this.callback = callback;\n    }\n}\nexport { ResizeObserverDetail };\n","import { resizeObservers } from '../ResizeObserverController';\nconst hasActiveObservations = () => {\n    return resizeObservers.some((ro) => ro.activeTargets.length > 0);\n};\nexport { hasActiveObservations };\n","const msg = 'ResizeObserver loop completed with undelivered notifications.';\nconst deliverResizeLoopError = () => {\n    let event;\n    if (typeof ErrorEvent === 'function') {\n        event = new ErrorEvent('error', {\n            message: msg\n        });\n    }\n    else {\n        event = document.createEvent('Event');\n        event.initEvent('error', false, false);\n        event.message = msg;\n    }\n    window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nclass ResizeObserverEntry {\n    constructor(target) {\n        const boxes = calculateBoxSizes(target);\n        this.target = target;\n        this.contentRect = boxes.contentRect;\n        this.borderBoxSize = boxes.borderBoxSize;\n        this.contentSize = boxes.contentBoxSize;\n        this.scrollSize = boxes.scrollBoxSize;\n        this.devicePixelBorderBoxSize = boxes.devicePixelBorderBoxSize;\n    }\n}\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nconst calculateDepthForNode = (node) => {\n    if (isHidden(node)) {\n        return Infinity;\n    }\n    let depth = 0;\n    let parent = node.parentNode;\n    while (parent) {\n        depth += 1;\n        parent = parent.parentNode;\n    }\n    return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../ResizeObserverController';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nconst broadcastActiveObservations = () => {\n    let shallowestDepth = Infinity;\n    const callbacks = [];\n    resizeObservers.forEach(function processObserver(ro) {\n        if (ro.activeTargets.length === 0) {\n            return;\n        }\n        const entries = [];\n        ro.activeTargets.forEach(function processTarget(ot) {\n            const entry = new ResizeObserverEntry(ot.target);\n            const targetDepth = calculateDepthForNode(ot.target);\n            entries.push(entry);\n            ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n            if (targetDepth < shallowestDepth) {\n                shallowestDepth = targetDepth;\n            }\n        });\n        callbacks.push(function resizeObserverCallback() { ro.callback(entries, ro.observer); });\n        ro.activeTargets.splice(0, ro.activeTargets.length);\n    });\n    for (let callback of callbacks) {\n        callback();\n    }\n    return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../ResizeObserverController';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { cache as sizeCache } from './calculateBoxSize';\nconst gatherActiveObservationsAtDepth = (depth) => {\n    sizeCache.clear();\n    resizeObservers.forEach(function processObserver(ro) {\n        ro.activeTargets.splice(0, ro.activeTargets.length);\n        ro.skippedTargets.splice(0, ro.skippedTargets.length);\n        ro.observationTargets.forEach(function processTarget(ot) {\n            if (ot.isActive()) {\n                if (calculateDepthForNode(ot.target) > depth) {\n                    ro.activeTargets.push(ot);\n                }\n                else {\n                    ro.skippedTargets.push(ot);\n                }\n            }\n        });\n    });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { scheduler } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { hasActiveObservations } from './algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from './algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from './algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from './algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from './algorithms/gatherActiveObservationsAtDepth';\nconst resizeObservers = [];\nconst observerMap = new Map();\nlet watching = 0;\nconst updateCount = (n) => {\n    !watching && n > 0 && scheduler.start();\n    watching += n;\n    !watching && scheduler.stop();\n};\nconst getObservationIndex = (observationTargets, target) => {\n    for (let i = 0; i < observationTargets.length; i += 1) {\n        if (observationTargets[i].target === target) {\n            return i;\n        }\n    }\n    return -1;\n};\nconst process = () => {\n    let depth = 0;\n    gatherActiveObservationsAtDepth(depth);\n    while (hasActiveObservations()) {\n        depth = broadcastActiveObservations();\n        gatherActiveObservationsAtDepth(depth);\n    }\n    if (hasSkippedObservations()) {\n        deliverResizeLoopError();\n    }\n    return depth > 0;\n};\nclass ResizeObserverController {\n    static connect(resizeObserver, callback) {\n        const detail = new ResizeObserverDetail(resizeObserver, callback);\n        resizeObservers.push(detail);\n        observerMap.set(resizeObserver, detail);\n    }\n    static observe(resizeObserver, target, options) {\n        if (observerMap.has(resizeObserver)) {\n            const detail = observerMap.get(resizeObserver);\n            if (getObservationIndex(detail.observationTargets, target) < 0) {\n                detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n                updateCount(1);\n                scheduler.schedule();\n            }\n        }\n    }\n    static unobserve(resizeObserver, target) {\n        if (observerMap.has(resizeObserver)) {\n            const detail = observerMap.get(resizeObserver);\n            const index = getObservationIndex(detail.observationTargets, target);\n            if (index >= 0) {\n                detail.observationTargets.splice(index, 1);\n                updateCount(-1);\n            }\n        }\n    }\n    static disconnect(resizeObserver) {\n        if (observerMap.has(resizeObserver)) {\n            const detail = observerMap.get(resizeObserver);\n            resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n            observerMap.delete(resizeObserver);\n            updateCount(-detail.observationTargets.length);\n        }\n    }\n}\nexport { ResizeObserverController, resizeObservers, process };\n","import { resizeObservers } from '../ResizeObserverController';\nconst hasSkippedObservations = () => {\n    return resizeObservers.some((ro) => ro.skippedTargets.length > 0);\n};\nexport { hasSkippedObservations };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { POLYFILL_CONSOLE_OUTPUT } from './utils/prettify';\nconst DPPB = ResizeObserverBoxOptions.DEVICE_PIXEL_BORDER_BOX;\nclass ResizeObserver {\n    constructor(callback) {\n        if (arguments.length === 0) {\n            throw new TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);\n        }\n        if (typeof callback !== 'function') {\n            throw new TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);\n        }\n        ResizeObserverController.connect(this, callback);\n    }\n    observe(target, options) {\n        if (arguments.length === 0) {\n            throw new TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);\n        }\n        if (target instanceof Element === false) {\n            throw new TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);\n        }\n        if (options && options.box === DPPB && target.tagName !== 'CANVAS') {\n            throw new Error(`Can only watch ${options.box} on canvas elements.`);\n        }\n        ResizeObserverController.observe(this, target, options);\n    }\n    unobserve(target) {\n        if (arguments.length === 0) {\n            throw new TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);\n        }\n        if (target instanceof Element === false) {\n            throw new TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);\n        }\n        ResizeObserverController.unobserve(this, target);\n    }\n    disconnect() {\n        ResizeObserverController.disconnect(this);\n    }\n    static toString() {\n        return POLYFILL_CONSOLE_OUTPUT;\n    }\n}\nexport default ResizeObserver;\nexport { ResizeObserver };\n","/**\r\n * Required to support Web Animations `@angular/platform-browser/animations`.\r\n * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation\r\n */\r\n// import 'web-animations-js';  // Run `npm install --save web-animations-js`.\r\n\r\n// This is a ResizeObserver ponyfill (not linked to Angular) that needs to come before Zone gets imported,\r\n// since it's getting a reference to window.requestAnimationFrame.\r\n// I want it to get the method before it has been patched by Zone, so that it's not affected by Angular change detection.\r\nimport '@juggle/resize-observer';\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 */\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__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\r\n\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 * 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 * 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' : '<root>';\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    /// <reference types=\"node\"/>\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 <button onclick=\"func();\">OK</button>\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"]}